OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_1_0/] [or1ksim/] [configure.in] - Blame information for rev 202

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 jrydberg
dnl
2
dnl Configure script for the OpenRISC 1000 simulator
3
dnl
4
dnl report bugs to jrydberg@phx.pp.se
5
dnl
6
dnl Process this file with autoconf to produce a configure script.
7
 
8 18 lampret
AC_INIT(cpu/or32/execute.c)
9 10 jrydberg
AC_CANONICAL_SYSTEM
10 26 lampret
AM_INIT_AUTOMAKE(or1ksim, 1.3)
11 7 jrydberg
AM_CONFIG_HEADER(config.h)
12
 
13 18 lampret
AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
14
SIMVERSION=1.2
15 7 jrydberg
 
16
dnl make sure we are using a recent autoconf version
17
AC_PREREQ(2.10)
18
AC_CANONICAL_HOST
19
 
20 28 lampret
dnl yuck
21
case "$target_cpu" in
22
or32*)  CPU_ARCH=or32;
23
        ARCH_ISA=OR32;;
24
or16*)  CPU_ARCH=or16;
25
        ARCH_ISA=OR16;;
26
dlx*)   CPU_ARCH=dlx;
27
        ARCH_ISA=DLX;;
28
esac
29
AC_SUBST(CPU_ARCH)
30
 
31 7 jrydberg
# We want these before the checks, so the checks can modify their values.
32
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
33
 
34
AC_PROG_CC
35
AC_MINIX
36
 
37 28 lampret
AC_PROG_MAKE_SET
38 7 jrydberg
 
39
# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
40 28 lampret
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2 -D$ARCH_ISA"
41 7 jrydberg
 
42
AC_PROG_GCC_TRADITIONAL
43
AC_PROG_INSTALL
44
AC_CHECK_PROG(AR, ar, ar)
45
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
46
dnl This allows people to set it when running configure or make
47
test -n "$ARFLAGS" || ARFLAGS="cr"
48
AC_PROG_RANLIB
49
 
50
MAKE_SHELL=/bin/sh
51
 
52
AC_SUBST(MAKE_SHELL)
53
 
54 28 lampret
AC_TYPE_SIGNAL
55 7 jrydberg
AC_HEADER_STAT
56
AC_HEADER_DIRENT
57
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
58
AC_FUNC_STRCOLL
59
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
60
                sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
61
                termcap.h termios.h termio.h sys/file.h locale.h)
62
 
63 202 erez
dnl check for "long long" (added by Erez)
64
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
65
 
66
dnl check for long long
67
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
68
 
69
dnl check for long long
70
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
71
 
72 16 jrydberg
dnl check for GNU readline
73
AC_ARG_ENABLE(readline,
74
  [  --enable-readline       Use GNU readline], AC_CHECK_LIB(readline, add_history))
75
 
76 7 jrydberg
dnl yuck
77
case "$host_os" in
78
aix*)   prefer_curses=yes ;;
79
esac
80
 
81
case "$host_cpu" in
82
*cray*) LOCAL_CFLAGS=-DCRAY ;;
83
esac
84
 
85
case "$host_os" in
86
isc*)   LOCAL_CFLAGS=-Disc386 ;;
87
esac
88
 
89 132 chris
case "$host_os" in
90
solaris*) LIBS="-lsocket -lnsl" ;;
91
esac
92
 
93 175 markom
dnl define options
94
 
95 167 markom
AC_MSG_CHECKING(whether to enable profiling)
96
AC_ARG_ENABLE(profiling,
97
    [  --enable-profiling      generate profiling code], [
98
    case "$enableval" in
99
        yes) profile="-pg" ;;
100
    esac
101
])
102
AC_MSG_RESULT(${enable_profiling-no})
103
 
104
AC_MSG_CHECKING(whether to disable CPU debugging module)
105
AC_ARG_ENABLE(debugmod,
106
    [  --disable-debugmod      turns off debug module], [
107
    case "$enableval" in
108
        no) debugmod="-DDEBUGMOD_OFF" ;;
109
    esac
110
])
111
AC_MSG_RESULT(${disable_debugmod-no})
112
 
113 175 markom
AC_SUBST(FPM)
114
AC_MSG_CHECKING(for implementation-specific data)
115
AC_ARG_ENABLE(impl,
116
    [  --enable-impl=     use -specific environment
117
                          (one of: bender, mp3, default)], [
118
    case "$enableval" in
119
        no|default)        IMPL="DEFAULT" ;;
120
        mp3)               IMPL="MP3"     ;;
121
        bender)            IMPL="BENDER"  ;;
122
        *)
123
            AC_MSG_RESULT(failed)
124
            AC_MSG_ERROR([bad --enable-impl option])
125
            ;;
126
    esac
127
])
128
AC_MSG_RESULT(${IMPL=DEFAULT})
129
if test "$IMPL" = "DEFAULT"
130
then
131
    AC_MSG_WARN([using default environment])
132
fi
133
IMPL="-DIMPL_$IMPL"
134
 
135 7 jrydberg
BUILD_DIR=`pwd`
136
AC_SUBST(BUILD_DIR)
137
 
138
AC_SUBST(CFLAGS)
139
AC_SUBST(LOCAL_CFLAGS)
140
AC_SUBST(LOCAL_LDFLAGS)
141
AC_SUBST(LOCAL_DEFS)
142
 
143
AC_SUBST(AR)
144
AC_SUBST(ARFLAGS)
145
 
146
AC_SUBST(host_cpu)
147
AC_SUBST(host_os)
148
AC_SUBST(host)
149
 
150
AC_SUBST(SUMVERSION)
151
AC_SUBST(TERMCAP_LIB)
152
 
153 123 markom
AC_DEFINE(HAS_EXECUTION)
154 7 jrydberg
 
155
dnl yuck
156 26 lampret
INCLUDES="-I\${top_srcdir}/cpu/common -I\${top_srcdir}/cpu/or1k \
157
-I\${top_srcdir}/cpu/$CPU_ARCH -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
158 103 lampret
-I\${top_srcdir}/bpb -I\${top_srcdir}/peripheral -I\${top_srcdir}/tick \
159
-I\${top_srcdir}/pm -I\${top_srcdir}/pic"
160 7 jrydberg
AC_SUBST(INCLUDES)
161
 
162 167 markom
test -n "$profile"  && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
163
test -n "$debugmod" && CFLAGS="$CFLAGS $debugmod"
164 175 markom
CFLAGS="$CFLAGS $IMPL"
165 7 jrydberg
 
166
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
167 18 lampret
        cpu/common/Makefile cpu/or32/Makefile cpu/or16/Makefile
168 26 lampret
        cpu/or1k/Makefile cpu/dlx/Makefile
169 103 lampret
        support/Makefile mmu/Makefile peripheral/Makefile tick/Makefile
170
        pm/Makefile pic/Makefile],
171 7 jrydberg
[
172
# Makefile uses this timestamp file to record whether config.h is up to date.
173
echo > stamp-h
174
])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.