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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_67/] [or1ksim/] [configure.in] - Blame information for rev 1765

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

powered by: WebSVN 2.1.0

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