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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [configure.in] - Blame information for rev 1075

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
dlx*)   CPU_ARCH=dlx;
25
        ARCH_ISA=DLX;;
26
esac
27
AC_SUBST(CPU_ARCH)
28
 
29 7 jrydberg
# We want these before the checks, so the checks can modify their values.
30
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
31
 
32
AC_PROG_CC
33
AC_MINIX
34
 
35 28 lampret
AC_PROG_MAKE_SET
36 7 jrydberg
 
37
# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
38 28 lampret
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2 -D$ARCH_ISA"
39 7 jrydberg
 
40
AC_PROG_GCC_TRADITIONAL
41
AC_PROG_INSTALL
42
AC_CHECK_PROG(AR, ar, ar)
43
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
44
dnl This allows people to set it when running configure or make
45
test -n "$ARFLAGS" || ARFLAGS="cr"
46
AC_PROG_RANLIB
47
 
48
MAKE_SHELL=/bin/sh
49
 
50
AC_SUBST(MAKE_SHELL)
51
 
52 28 lampret
AC_TYPE_SIGNAL
53 7 jrydberg
AC_HEADER_STAT
54
AC_HEADER_DIRENT
55
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
56
AC_FUNC_STRCOLL
57
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
58
                sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
59 345 erez
                termcap.h termios.h termio.h sys/file.h locale.h\
60
                net/ethernet.h)
61 7 jrydberg
 
62 202 erez
dnl check for "long long" (added by Erez)
63
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
64
 
65 16 jrydberg
dnl check for GNU readline
66
AC_ARG_ENABLE(readline,
67
  [  --enable-readline       Use GNU readline], AC_CHECK_LIB(readline, add_history))
68
 
69 7 jrydberg
dnl yuck
70
case "$host_os" in
71
aix*)   prefer_curses=yes ;;
72
esac
73
 
74
case "$host_cpu" in
75
*cray*) LOCAL_CFLAGS=-DCRAY ;;
76
esac
77
 
78
case "$host_os" in
79
isc*)   LOCAL_CFLAGS=-Disc386 ;;
80
esac
81
 
82 132 chris
case "$host_os" in
83
solaris*) LIBS="-lsocket -lnsl" ;;
84
esac
85
 
86 175 markom
dnl define options
87
 
88 517 markom
AC_MSG_CHECKING(whether to enable profiling)
89
AC_ARG_ENABLE(profiling,
90
    [  --enable-profiling      generate profiling code], [
91
    case "$enableval" in
92
        yes) profile="-pg -a" ;;
93
    esac
94
])
95
AC_MSG_RESULT(${enable_profiling-no})
96
 
97 566 simons
fast_sim="0"
98 551 markom
AC_MSG_CHECKING(whether to compile fsim)
99
AC_ARG_ENABLE(fsim,
100
    [  --enable-fsim      compiles fsim, based on fast_config.c], [
101
    case "$enableval" in
102 557 markom
  no)  fast_sim="0" ;;
103
        yes) fast_sim="1" ;;
104 551 markom
    esac
105
])
106
AC_MSG_RESULT(${enable_fsim-no})
107
 
108 706 markom
simple_execution="0"
109
AC_MSG_CHECKING(whether to use simple execution)
110
AC_ARG_ENABLE(simple,
111
    [  --enable-simple    compiles sim with simple execution], [
112
    case "$enableval" in
113
  no)  simple_execution="0" ;;
114
        yes) simple_execution="1" ;;
115
    esac
116
])
117
AC_MSG_RESULT(${enable_simple-no})
118
 
119 849 markom
eth_phy="0"
120
AC_MSG_CHECKING(whether to enable ethernet phy emulation)
121
AC_ARG_ENABLE(ethphy,
122 894 simons
    [  --enable-ethphy    compiles sim with ethernet phy support], [
123 849 markom
    case "$enableval" in
124
  no)  eth_phy="0" ;;
125
        yes) eth_phy="1" ;;
126
    esac
127
])
128
AC_MSG_RESULT(${enable_eth_phy-no})
129
 
130
 
131 721 markom
raw_range_stats="0"
132
AC_MSG_CHECKING(whether to use raw range stats)
133
AC_ARG_ENABLE(range_stats,
134
    [  --enable-range-stats      Specifies, whether we should do register accesses over time analysis.], [
135
    case "$enableval" in
136
  no)  raw_range_stats="0" ;;
137
        yes) raw_range_stats="1" simple_execution="1" ;;
138
    esac
139
])
140
AC_MSG_RESULT(${enable_range_stats-no})
141
 
142 910 lampret
set_ov_flag="0"
143 721 markom
AC_MSG_CHECKING(whether instructions set overflow flag)
144
AC_ARG_ENABLE(ov_flag,
145
    [  --enable-ov-flag      Whether instructions set overflow flag.], [
146
    case "$enableval" in
147
  no)  set_ov_flag="0" ;;
148
        yes) set_ov_flag="1" ;;
149
    esac
150
])
151
AC_MSG_RESULT(${enable_ov_flag-no})
152
 
153 910 lampret
set_arith_flag="0"
154 721 markom
AC_MSG_CHECKING(whether arithmethic instructions set flag)
155
AC_ARG_ENABLE(arith_flag,
156
    [  --enable-arith-flag      Whether arithmethic instructions setflag.], [
157
    case "$enableval" in
158
  no)  set_arith_flag="0" ;;
159
        yes) set_arith_flag="1" ;;
160
    esac
161
])
162
AC_MSG_RESULT(${enable_arith_flag-no})
163
 
164
AC_DEFINE_UNQUOTED(FAST_SIM, $fast_sim)
165
AC_DEFINE_UNQUOTED(RAW_RANGE_STATS, $raw_range_stats)
166
AC_DEFINE_UNQUOTED(SET_OV_FLAG, $set_ov_flag)
167
AC_DEFINE_UNQUOTED(ARITH_SET_FLAG, $set_arith_flag)
168 849 markom
AC_DEFINE_UNQUOTED(HAVE_ETH_PHY, $eth_phy)
169 706 markom
AC_DEFINE_UNQUOTED(SIMPLE_EXECUTION, $simple_execution)
170
AM_CONDITIONAL(SIMPLE_EXECUTION, test x$simple_execution = x1)
171
 
172 721 markom
 
173 175 markom
AC_MSG_CHECKING(for implementation-specific data)
174
AC_ARG_ENABLE(impl,
175
    [  --enable-impl=     use -specific environment
176
                          (one of: bender, mp3, default)], [
177
    case "$enableval" in
178
        no|default)        IMPL="DEFAULT" ;;
179
        mp3)               IMPL="MP3"     ;;
180
        bender)            IMPL="BENDER"  ;;
181
        *)
182
            AC_MSG_RESULT(failed)
183
            AC_MSG_ERROR([bad --enable-impl option])
184
            ;;
185
    esac
186
])
187
AC_MSG_RESULT(${IMPL=DEFAULT})
188
if test "$IMPL" = "DEFAULT"
189
then
190
    AC_MSG_WARN([using default environment])
191
fi
192 517 markom
 
193
test -n "$profile"  && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
194 175 markom
IMPL="-DIMPL_$IMPL"
195 518 markom
# CFLAGS="$CFLAGS -O4"
196 175 markom
 
197 7 jrydberg
BUILD_DIR=`pwd`
198
AC_SUBST(BUILD_DIR)
199
 
200
AC_SUBST(CFLAGS)
201
AC_SUBST(LOCAL_CFLAGS)
202
AC_SUBST(LOCAL_LDFLAGS)
203
AC_SUBST(LOCAL_DEFS)
204
 
205
AC_SUBST(AR)
206
AC_SUBST(ARFLAGS)
207
 
208
AC_SUBST(host_cpu)
209
AC_SUBST(host_os)
210
AC_SUBST(host)
211
 
212
AC_SUBST(SUMVERSION)
213
AC_SUBST(TERMCAP_LIB)
214
 
215 123 markom
AC_DEFINE(HAS_EXECUTION)
216 371 markom
AC_DEFINE(HAS_DEBUG)
217 7 jrydberg
 
218
dnl yuck
219 397 markom
INCLUDES="-I\${top_srcdir} -I\${top_srcdir}/cpu/common -I\${top_srcdir}/cpu/or1k \
220 26 lampret
-I\${top_srcdir}/cpu/$CPU_ARCH -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
221 103 lampret
-I\${top_srcdir}/bpb -I\${top_srcdir}/peripheral -I\${top_srcdir}/tick \
222 1075 rprescott
-I\${top_srcdir}/peripheral\channels \
223 807 markom
-I\${top_srcdir}/pm -I\${top_srcdir}/pic -I\${top_srcdir}/debug \
224 897 markom
-I\${top_srcdir}/vapi -I\${top_srcdir}/support -I\${top_srcdir}/cuc"
225 7 jrydberg
AC_SUBST(INCLUDES)
226
 
227
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
228 879 markom
        cpu/common/Makefile cpu/or32/Makefile cuc/Makefile
229 221 markom
        cpu/or1k/Makefile cpu/dlx/Makefile debug/Makefile
230 103 lampret
        support/Makefile mmu/Makefile peripheral/Makefile tick/Makefile
231 1074 rprescott
        peripheral/channels/Makefile
232 293 markom
        pm/Makefile pic/Makefile debug/Makefile vapi/Makefile],
233 7 jrydberg
[
234
# Makefile uses this timestamp file to record whether config.h is up to date.
235
echo > stamp-h
236
])

powered by: WebSVN 2.1.0

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