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

Subversion Repositories or1k

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

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 1308 phoenix
test -z "$CFLAGS" && CFLAGS="-g -Wall" auto_cflags=1
31 7 jrydberg
 
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 1323 phoenix
AC_CHECK_FUNCS(strndup grantpt unlockpt ptsname on_exit isblank)
57 7 jrydberg
AC_FUNC_STRCOLL
58
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
59 1242 hpanther
                sys/ptem.h sys/pte.h sys/stream.h sys/stropts.h sys/select.h \
60 345 erez
                termcap.h termios.h termio.h sys/file.h locale.h\
61 1323 phoenix
                net/ethernet.h sys/ethernet.h malloc.h)
62 1242 hpanther
AC_C_BIGENDIAN
63 7 jrydberg
 
64 202 erez
dnl check for "long long" (added by Erez)
65
AC_TRY_COMPILE(,[long long ll; unsigned long long ull;],AC_DEFINE(CC_HAS_LONG_LONG))
66
 
67 16 jrydberg
dnl check for GNU readline
68
AC_ARG_ENABLE(readline,
69
  [  --enable-readline       Use GNU readline], AC_CHECK_LIB(readline, add_history))
70
 
71 7 jrydberg
dnl yuck
72
case "$host_os" in
73
aix*)   prefer_curses=yes ;;
74
esac
75
 
76
case "$host_cpu" in
77
*cray*) LOCAL_CFLAGS=-DCRAY ;;
78
esac
79
 
80
case "$host_os" in
81
isc*)   LOCAL_CFLAGS=-Disc386 ;;
82
esac
83
 
84 132 chris
case "$host_os" in
85
solaris*) LIBS="-lsocket -lnsl" ;;
86
esac
87
 
88 175 markom
dnl define options
89
 
90 517 markom
AC_MSG_CHECKING(whether to enable profiling)
91
AC_ARG_ENABLE(profiling,
92
    [  --enable-profiling      generate profiling code], [
93
    case "$enableval" in
94
        yes) profile="-pg -a" ;;
95
    esac
96
])
97
AC_MSG_RESULT(${enable_profiling-no})
98
 
99 566 simons
fast_sim="0"
100 551 markom
AC_MSG_CHECKING(whether to compile fsim)
101
AC_ARG_ENABLE(fsim,
102
    [  --enable-fsim      compiles fsim, based on fast_config.c], [
103
    case "$enableval" in
104 557 markom
  no)  fast_sim="0" ;;
105
        yes) fast_sim="1" ;;
106 551 markom
    esac
107
])
108
AC_MSG_RESULT(${enable_fsim-no})
109
 
110 706 markom
simple_execution="0"
111 1345 nogj
INCLUDES="-I\${top_builddir}/cpu/$CPU_ARCH"
112 706 markom
AC_MSG_CHECKING(whether to use simple execution)
113
AC_ARG_ENABLE(simple,
114
    [  --enable-simple    compiles sim with simple execution], [
115
    case "$enableval" in
116 1345 nogj
    no) INCLUDES="-I\${top_builddir}/cpu/$CPU_ARCH" simple_execution="0" ;;
117
    yes) INCLUDES="-I\${top_srcdir}/cpu/$CPU_ARCH" simple_execution="1" ;;
118 706 markom
    esac
119
])
120
AC_MSG_RESULT(${enable_simple-no})
121
 
122 849 markom
eth_phy="0"
123
AC_MSG_CHECKING(whether to enable ethernet phy emulation)
124
AC_ARG_ENABLE(ethphy,
125 894 simons
    [  --enable-ethphy    compiles sim with ethernet phy support], [
126 849 markom
    case "$enableval" in
127
  no)  eth_phy="0" ;;
128
        yes) eth_phy="1" ;;
129
    esac
130
])
131
AC_MSG_RESULT(${enable_eth_phy-no})
132
 
133
 
134 721 markom
raw_range_stats="0"
135
AC_MSG_CHECKING(whether to use raw range stats)
136
AC_ARG_ENABLE(range_stats,
137
    [  --enable-range-stats      Specifies, whether we should do register accesses over time analysis.], [
138
    case "$enableval" in
139
  no)  raw_range_stats="0" ;;
140
        yes) raw_range_stats="1" simple_execution="1" ;;
141
    esac
142
])
143
AC_MSG_RESULT(${enable_range_stats-no})
144
 
145 910 lampret
set_ov_flag="0"
146 721 markom
AC_MSG_CHECKING(whether instructions set overflow flag)
147
AC_ARG_ENABLE(ov_flag,
148
    [  --enable-ov-flag      Whether instructions set overflow flag.], [
149
    case "$enableval" in
150
  no)  set_ov_flag="0" ;;
151
        yes) set_ov_flag="1" ;;
152
    esac
153
])
154
AC_MSG_RESULT(${enable_ov_flag-no})
155
 
156 910 lampret
set_arith_flag="0"
157 721 markom
AC_MSG_CHECKING(whether arithmethic instructions set flag)
158
AC_ARG_ENABLE(arith_flag,
159
    [  --enable-arith-flag      Whether arithmethic instructions setflag.], [
160
    case "$enableval" in
161
  no)  set_arith_flag="0" ;;
162
        yes) set_arith_flag="1" ;;
163
    esac
164
])
165
AC_MSG_RESULT(${enable_arith_flag-no})
166
 
167
AC_DEFINE_UNQUOTED(FAST_SIM, $fast_sim)
168
AC_DEFINE_UNQUOTED(RAW_RANGE_STATS, $raw_range_stats)
169
AC_DEFINE_UNQUOTED(SET_OV_FLAG, $set_ov_flag)
170
AC_DEFINE_UNQUOTED(ARITH_SET_FLAG, $set_arith_flag)
171 849 markom
AC_DEFINE_UNQUOTED(HAVE_ETH_PHY, $eth_phy)
172 706 markom
AC_DEFINE_UNQUOTED(SIMPLE_EXECUTION, $simple_execution)
173
AM_CONDITIONAL(SIMPLE_EXECUTION, test x$simple_execution = x1)
174
 
175 721 markom
 
176 175 markom
AC_MSG_CHECKING(for implementation-specific data)
177
AC_ARG_ENABLE(impl,
178
    [  --enable-impl=     use -specific environment
179
                          (one of: bender, mp3, default)], [
180
    case "$enableval" in
181
        no|default)        IMPL="DEFAULT" ;;
182
        mp3)               IMPL="MP3"     ;;
183
        bender)            IMPL="BENDER"  ;;
184
        *)
185
            AC_MSG_RESULT(failed)
186
            AC_MSG_ERROR([bad --enable-impl option])
187
            ;;
188
    esac
189
])
190
AC_MSG_RESULT(${IMPL=DEFAULT})
191
if test "$IMPL" = "DEFAULT"
192
then
193
    AC_MSG_WARN([using default environment])
194
fi
195 517 markom
 
196
test -n "$profile"  && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
197 175 markom
IMPL="-DIMPL_$IMPL"
198 518 markom
# CFLAGS="$CFLAGS -O4"
199 175 markom
 
200 7 jrydberg
BUILD_DIR=`pwd`
201
AC_SUBST(BUILD_DIR)
202
 
203
AC_SUBST(CFLAGS)
204
AC_SUBST(LOCAL_CFLAGS)
205 1323 phoenix
dnl AC_SUBST(LOCAL_LDFLAGS) (LOCAL_LDFLAGS not defined)
206 7 jrydberg
AC_SUBST(LOCAL_DEFS)
207
 
208
AC_SUBST(AR)
209
AC_SUBST(ARFLAGS)
210
 
211
AC_SUBST(host_cpu)
212
AC_SUBST(host_os)
213
AC_SUBST(host)
214
 
215
AC_SUBST(SUMVERSION)
216
AC_SUBST(TERMCAP_LIB)
217
 
218 123 markom
AC_DEFINE(HAS_EXECUTION)
219 371 markom
AC_DEFINE(HAS_DEBUG)
220 7 jrydberg
 
221
dnl yuck
222 1345 nogj
INCLUDES="$INCLUDES -I\${top_srcdir} -I\${top_srcdir}/cpu/common \
223
-I\${top_srcdir}/cpu/or1k -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
224 103 lampret
-I\${top_srcdir}/bpb -I\${top_srcdir}/peripheral -I\${top_srcdir}/tick \
225 1345 nogj
-I\${top_srcdir}/peripheral/channels -I\${top_srcdir}/pm -I\${top_srcdir}/pic \
226
-I\${top_srcdir}/debug -I\${top_srcdir}/vapi -I\${top_srcdir}/support \
227
-I\${top_srcdir}/cuc"
228 7 jrydberg
AC_SUBST(INCLUDES)
229
 
230
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
231 879 markom
        cpu/common/Makefile cpu/or32/Makefile cuc/Makefile
232 221 markom
        cpu/or1k/Makefile cpu/dlx/Makefile debug/Makefile
233 103 lampret
        support/Makefile mmu/Makefile peripheral/Makefile tick/Makefile
234 1074 rprescott
        peripheral/channels/Makefile
235 1242 hpanther
        pm/Makefile pic/Makefile vapi/Makefile extras/Makefile],
236 7 jrydberg
[
237
# Makefile uses this timestamp file to record whether config.h is up to date.
238
echo > stamp-h
239
])

powered by: WebSVN 2.1.0

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