Commit | Line | Data |
---|---|---|
cb7a6892 MM |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_PREREQ(2.3)dnl | |
3 | AC_INIT(Makefile.in) | |
4 | ||
c494cadd | 5 | AC_ARG_ENABLE(sim-cflags, |
73c4941b | 6 | [ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], |
c494cadd MM |
7 | [case "${enableval}" in |
8 | yes) sim_cflags="-O2 -fomit-frame-pointer";; | |
9 | no) sim_cflags="";; | |
e61900e6 | 10 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; |
ba62bb1c | 11 | esac |
2bc7869d | 12 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then |
ba62bb1c MM |
13 | echo "Setting sim cflags = $sim_cflags" 6>&1 |
14 | fi],[sim_cflags=""])dnl | |
c494cadd | 15 | |
73c4941b | 16 | AC_ARG_ENABLE(sim-warnings, |
c5addc19 | 17 | [ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o], |
73c4941b | 18 | [case "${enableval}" in |
1dc7c0ed | 19 | yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes";; |
73c4941b MM |
20 | no) sim_warnings="-w";; |
21 | *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
ba62bb1c | 22 | esac |
2bc7869d | 23 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then |
ba62bb1c MM |
24 | echo "Setting warning flags = $sim_warnings" 6>&1 |
25 | fi],[sim_warnings=""])dnl | |
73c4941b | 26 | |
c494cadd | 27 | AC_ARG_ENABLE(sim-config, |
73c4941b | 28 | [ --enable-sim-config=file Override default config file], |
c494cadd | 29 | [case "${enableval}" in |
a3114052 | 30 | yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-config=file");; |
813ad010 | 31 | *) if test -f "${srcdir}/${enableval}"; then |
a3114052 | 32 | sim_config="${enableval}"; |
813ad010 | 33 | elif test -f "${srcdir}/${enableval}-config.h"; then |
a3114052 MM |
34 | sim_config="${enableval}-config.h" |
35 | else | |
36 | AC_MSG_ERROR("Config file $enableval was not found"); | |
37 | sim_config=std-config.h | |
38 | fi;; | |
ba62bb1c | 39 | esac |
2bc7869d | 40 | if test x"$silent" != x"yes" && test x"$sim_config" != x""; then |
ba62bb1c | 41 | echo "Setting config flags = $sim_config" 6>&1 |
a3114052 MM |
42 | fi],[sim_config="std-config.h" |
43 | if test x"$silent" != x"yes"; then | |
44 | echo "Setting config flags = $sim_config" 6>&1 | |
45 | fi])dnl | |
c494cadd MM |
46 | |
47 | AC_ARG_ENABLE(sim-opcode, | |
73c4941b | 48 | [ --enable-sim-opcode=which Override default opcode lookup.], |
c494cadd | 49 | [case "${enableval}" in |
a3114052 | 50 | yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");; |
813ad010 | 51 | *) if test -f "${srcdir}/${enableval}"; then |
a3114052 | 52 | sim_opcode="${enableval}" |
813ad010 | 53 | elif test -f "${srcdir}/ppc-opcode-${enableval}"; then |
a3114052 MM |
54 | sim_opcode="ppc-opcode-${enableval}" |
55 | else | |
56 | AC_MSG_ERROR("File $enableval is not an opcode rules file"); | |
57 | sim_opcode="ppc-opcode-complex" | |
58 | fi;; | |
ba62bb1c | 59 | esac |
2bc7869d | 60 | if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then |
ba62bb1c | 61 | echo "Setting opcode flags = $sim_opcode" 6>&1 |
a3114052 MM |
62 | fi],[sim_opcode="ppc-opcode-complex" |
63 | if test x"$silent" != x"yes"; then | |
64 | echo "Setting opcode flags = $sim_opcode" | |
65 | fi])dnl | |
c494cadd MM |
66 | |
67 | AC_ARG_ENABLE(sim-switch, | |
73c4941b | 68 | [ --enable-sim-switch Use a switch instead of a table for instruction call.], |
c494cadd MM |
69 | [case "${enableval}" in |
70 | yes) sim_switch="-s";; | |
a3114052 MM |
71 | no) sim_switch="";; |
72 | *) AC_MSG_ERROR("--enable-sim-switch does not take a value"); sim_switch="";; | |
ba62bb1c | 73 | esac |
2bc7869d | 74 | if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then |
ba62bb1c | 75 | echo "Setting switch flags = $sim_switch" 6>&1 |
2bc7869d MM |
76 | fi],[sim_switch="-s"; |
77 | if test x"$silent" != x"yes"; then | |
78 | echo "Setting switch flags = $sim_switch" 6>&1 | |
79 | fi])dnl | |
c494cadd MM |
80 | |
81 | AC_ARG_ENABLE(sim-duplicate, | |
73c4941b | 82 | [ --enable-sim-duplicate Expand (duplicate) semantic functions.], |
c494cadd | 83 | [case "${enableval}" in |
a3114052 MM |
84 | yes) sim_dup="-e";; |
85 | no) sim_dup="";; | |
86 | *) AC_MSG_ERROR("--enable-sim-duplicate does not take a value"); sim_dup="";; | |
ba62bb1c | 87 | esac |
2bc7869d | 88 | if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then |
ba62bb1c | 89 | echo "Setting duplicate flags = $sim_dup" 6>&1 |
2bc7869d MM |
90 | fi],[sim_dup="-e" |
91 | if test x"$silent" != x"yes"; then | |
92 | echo "Setting duplicate flags = $sim_dup" 6>&1 | |
93 | fi])dnl | |
c494cadd MM |
94 | |
95 | AC_ARG_ENABLE(sim-filter, | |
73c4941b | 96 | [ --enable-sim-filter=rule Specify filter rules.], |
c494cadd | 97 | [case "${enableval}" in |
a3114052 MM |
98 | yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no"); sim_filter="";; |
99 | no) sim_filter="";; | |
100 | *) sim_filter="-f $enableval";; | |
ba62bb1c | 101 | esac |
2bc7869d | 102 | if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then |
ba62bb1c | 103 | echo "Setting filter flags = $sim_filter" 6>&1 |
2bc7869d MM |
104 | fi],[sim_filter="-f 64" |
105 | if test x"$silent" != x"yes"; then | |
106 | echo "Setting filter flags = $sim_filter" 6>&1 | |
107 | fi])dnl | |
c494cadd MM |
108 | |
109 | AC_ARG_ENABLE(sim-icache, | |
73c4941b | 110 | [ --enable-sim-icache=size Specify instruction cache size.], |
c05c182d | 111 | icache="" |
c494cadd | 112 | [case "${enableval}" in |
f2181eff MM |
113 | yes) sim_icache="-r 1024"; icache="1024";; |
114 | define) sim_icache="-r 1024 -R"; icache="1024";; | |
115 | no) sim_icache="";; | |
116 | *) sim_icache="-r ${enableval}"; icache="${enableval}";; | |
c05c182d MM |
117 | esac |
118 | if test x"$silent" != x"yes" && test x"$icache" != x""; then | |
119 | echo "Setting instruction cache size to $icache" | |
120 | fi],[sim_icache="-r 1024" | |
121 | if test x"$silent" != x"yes"; then | |
122 | echo "Setting instruction cache size to 1024" | |
123 | fi])dnl | |
c494cadd MM |
124 | |
125 | AC_ARG_ENABLE(sim-inline, | |
73c4941b | 126 | [ --enable-sim-inline=inlines Specify which functions should be inlined.], |
c494cadd MM |
127 | [sim_inline="" |
128 | case "$enableval" in | |
1dc7c0ed | 129 | no) sim_inline="-DDEFAULT_INLINE=0 -DINLINE=";; |
b3737d33 MM |
130 | 0) sim_inline="-DDEFAULT_INLINE=0";; |
131 | yes | 2) sim_inline="-DDEFAULT_INLINE=2";; | |
132 | 1) sim_inline="-DDEFAULT_INLINE=1";; | |
c494cadd MM |
133 | *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do |
134 | new_flag="" | |
135 | case "$x" in | |
136 | *_INLINE=*) new_flag="-D$x";; | |
137 | *_INLINE) new_flag="-D$x=2";; | |
c05c182d | 138 | *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; |
c494cadd MM |
139 | *) new_flag="-D$x""_INLINE=2";; |
140 | esac | |
c05c182d | 141 | if test x"$sim_inline" = x""; then |
c494cadd MM |
142 | sim_inline="$new_flag" |
143 | else | |
c05c182d | 144 | sim_inline="$sim_inline $new_flag" |
c494cadd MM |
145 | fi |
146 | done;; | |
ba62bb1c | 147 | esac |
2bc7869d | 148 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then |
ba62bb1c MM |
149 | echo "Setting inline flags = $sim_inline" 6>&1 |
150 | fi],[if test x"$GCC" != ""; then | |
b51e5b4f | 151 | sim_inline="-DDEFAULT_INLINE=1" |
2bc7869d MM |
152 | if test x"$silent" != x"yes"; then |
153 | echo "Setting inline flags = $sim_inline" 6>&1 | |
154 | fi | |
ba62bb1c MM |
155 | else |
156 | sim_inline="" | |
157 | fi])dnl | |
c494cadd MM |
158 | |
159 | AC_ARG_ENABLE(sim-bswap, | |
73c4941b | 160 | [ --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.], |
c494cadd MM |
161 | [case "${enableval}" in |
162 | yes) sim_bswap="-DWITH_BSWAP=1";; | |
163 | no) sim_bswap="-DWITH_BSWAP=0";; | |
a3114052 | 164 | *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";; |
ba62bb1c | 165 | esac |
2bc7869d | 166 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then |
ba62bb1c MM |
167 | echo "Setting bswap flags = $sim_bswap" 6>&1 |
168 | fi],[sim_bswap=""])dnl | |
c494cadd MM |
169 | |
170 | AC_ARG_ENABLE(sim-endian, | |
73c4941b | 171 | [ --enable-sim-endian=endian Specify target byte endian orientation.], |
c494cadd MM |
172 | [case "${enableval}" in |
173 | yes) case "$target" in | |
174 | *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
175 | *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
176 | *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
177 | esac;; | |
178 | no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
179 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
180 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
a3114052 | 181 | *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; |
ba62bb1c | 182 | esac |
2bc7869d | 183 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then |
ba62bb1c MM |
184 | echo "Setting endian flags = $sim_endian" 6>&1 |
185 | fi],[sim_endian=""])dnl | |
c494cadd MM |
186 | |
187 | AC_ARG_ENABLE(sim-hostendian, | |
73c4941b | 188 | [ --enable-sim-hostendain=end Specify host byte endian orientation.], |
c494cadd MM |
189 | [case "${enableval}" in |
190 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
191 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
192 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
a3114052 | 193 | *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";; |
ba62bb1c | 194 | esac |
2bc7869d | 195 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then |
ba62bb1c MM |
196 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 |
197 | fi],[sim_hostendian=""])dnl | |
c494cadd MM |
198 | |
199 | AC_ARG_ENABLE(sim-smp, | |
73c4941b | 200 | [ --enable-sim-smp=n Specify number of processors to configure for.], |
c494cadd | 201 | [case "${enableval}" in |
1dc7c0ed | 202 | yes) sim_smp="-DWITH_SMP=5";; |
c494cadd MM |
203 | no) sim_smp="-DWITH_SMP=0";; |
204 | *) sim_smp="-DWITH_SMP=$enableval";; | |
ba62bb1c | 205 | esac |
2bc7869d | 206 | if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then |
ba62bb1c | 207 | echo "Setting smp flags = $sim_smp" 6>&1 |
2bc7869d MM |
208 | fi],[sim_smp="-DWITH_SMP=0" |
209 | if test x"$silent" != x"yes"; then | |
210 | echo "Setting smp flags = $sim_smp" 6>&1 | |
211 | fi])dnl | |
c494cadd | 212 | |
1dc7c0ed MM |
213 | AC_ARG_ENABLE(sim-xor-endian, |
214 | [ --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).], | |
215 | [case "${enableval}" in | |
216 | yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; | |
217 | no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; | |
218 | *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; | |
219 | esac],[sim_xor_endian=""])dnl | |
220 | ||
c494cadd | 221 | AC_ARG_ENABLE(sim-bitsize, |
73c4941b | 222 | [ --enable-sim-bitsize=n Specify target bitsize (32 or 64).], |
c494cadd | 223 | [case "${enableval}" in |
a3114052 MM |
224 | 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";; |
225 | *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval, expected 32 or 64"); sim_bitsize="";; | |
ba62bb1c | 226 | esac |
2bc7869d | 227 | if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then |
ba62bb1c MM |
228 | echo "Setting bitsize flags = $sim_bitsize" 6>&1 |
229 | fi],[sim_bitsize=""])dnl | |
c494cadd MM |
230 | |
231 | AC_ARG_ENABLE(sim-hostbitsize, | |
a3114052 | 232 | [ --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64).], |
c494cadd | 233 | [case "${enableval}" in |
a3114052 MM |
234 | 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";; |
235 | *) AC_MSG_ERROR("--enable-sim-hostbitsize was given $enableval, expected 32 or 64"); sim_hostbitsize="";; | |
ba62bb1c | 236 | esac |
2bc7869d | 237 | if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then |
ba62bb1c MM |
238 | echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1 |
239 | fi],[sim_hostbitsize=""])dnl | |
c494cadd MM |
240 | |
241 | AC_ARG_ENABLE(sim-env, | |
73c4941b | 242 | [ --enable-sim-env=env Specify target environment (operating, virtual, user).], |
c494cadd MM |
243 | [case "${enableval}" in |
244 | operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";; | |
245 | virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";; | |
246 | user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";; | |
a3114052 MM |
247 | no) sim_env="-DWITH_ENVIRONMENT=0";; |
248 | *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-env"); sim_env="";; | |
ba62bb1c | 249 | esac |
2bc7869d | 250 | if test x"$silent" != x"yes" && test x"$sim_env" != x""; then |
ba62bb1c MM |
251 | echo "Setting env flags = $sim_env" 6>&1 |
252 | fi],[sim_env=""])dnl | |
c494cadd MM |
253 | |
254 | AC_ARG_ENABLE(sim-timebase, | |
73c4941b | 255 | [ --enable-sim-timebase Specify whether the PPC timebase is supported.], |
c494cadd MM |
256 | [case "${enableval}" in |
257 | yes) sim_timebase="-DWITH_TIME_BASE=1";; | |
258 | no) sim_timebase="-DWITH_TIME_BASE=0";; | |
a3114052 | 259 | *) AC_MSG_ERROR("--enable-sim-timebase does not take a value"); sim_timebase="";; |
ba62bb1c | 260 | esac |
2bc7869d | 261 | if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then |
ba62bb1c MM |
262 | echo "Setting timebase flags = $sim_timebase" 6>&1 |
263 | fi],[sim_timebase=""])dnl | |
c494cadd MM |
264 | |
265 | AC_ARG_ENABLE(sim-alignment, | |
73c4941b | 266 | [ --enable-sim-alignment=align Specify strict or nonstrict alignment.], |
c494cadd MM |
267 | [case "${enableval}" in |
268 | yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; | |
ba62bb1c | 269 | no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; |
a3114052 | 270 | *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; |
ba62bb1c | 271 | esac |
2bc7869d | 272 | if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then |
ba62bb1c MM |
273 | echo "Setting alignment flags = $sim_alignment" 6>&1 |
274 | fi],[sim_alignment=""])dnl | |
c494cadd MM |
275 | |
276 | AC_ARG_ENABLE(sim-trace, | |
73c4941b | 277 | [ --enable-sim-trace Specify whether tracing is supported.], |
c494cadd MM |
278 | [case "${enableval}" in |
279 | yes) sim_trace="-DWITH_TRACE=1";; | |
280 | no) sim_trace="-DWITH_TRACE=0";; | |
a3114052 | 281 | *) AC_MSG_ERROR("--enable-sim-trace does not take a value"); sim_trace="";; |
ba62bb1c | 282 | esac |
2bc7869d | 283 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then |
ba62bb1c MM |
284 | echo "Setting trace flags = $sim_trace" 6>&1 |
285 | fi],[sim_trace=""])dnl | |
c494cadd MM |
286 | |
287 | AC_ARG_ENABLE(sim-assert, | |
73c4941b | 288 | [ --enable-sim-assert Specify whether to perform random assertions.], |
c494cadd MM |
289 | [case "${enableval}" in |
290 | yes) sim_assert="-DWITH_ASSERT=1";; | |
291 | no) sim_assert="-DWITH_ASSERT=0";; | |
a3114052 | 292 | *) AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";; |
ba62bb1c | 293 | esac |
2bc7869d | 294 | if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then |
ba62bb1c MM |
295 | echo "Setting assert flags = $sim_assert" 6>&1 |
296 | fi],[sim_assert=""])dnl | |
c494cadd | 297 | |
a3114052 MM |
298 | AC_ARG_ENABLE(sim-reserved-bits, |
299 | [ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.], | |
300 | [case "${enableval}" in | |
301 | yes) sim_reserved="-DWITH_RESERVED_BITS=1";; | |
302 | no) sim_reserved="-DWITH_RESERVED_BITS=0";; | |
303 | *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved="";; | |
304 | esac | |
305 | if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then | |
306 | echo "Setting reserved flags = $sim_reserved" 6>&1 | |
307 | fi],[sim_reserved=""])dnl | |
308 | ||
c494cadd | 309 | AC_ARG_ENABLE(sim-float, |
73c4941b | 310 | [ --enable-sim-float Specify whether to use host floating point or simulate.], |
c494cadd MM |
311 | [case "${enableval}" in |
312 | yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; | |
313 | no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; | |
a3114052 | 314 | *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";; |
ba62bb1c | 315 | esac |
2bc7869d | 316 | if test x"$silent" != x"yes" && test x"$sim_float" != x""; then |
ba62bb1c MM |
317 | echo "Setting float flags = $sim_float" 6>&1 |
318 | fi],[sim_float=""])dnl | |
c494cadd MM |
319 | |
320 | AC_ARG_ENABLE(sim-monitor, | |
73c4941b | 321 | [ --enable-sim-monitor=mon Specify whether to enable monitoring events.], |
c494cadd MM |
322 | [case "${enableval}" in |
323 | yes) sim_mon="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";; | |
324 | no) sim_mon="-DWITH_MON=0";; | |
325 | instruction) sim_mon="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";; | |
326 | memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";; | |
a3114052 | 327 | *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon"); sim_env="";; |
ba62bb1c | 328 | esac |
2bc7869d | 329 | if test x"$silent" != x"yes" && test x"$sim_mon" != x""; then |
ba62bb1c MM |
330 | echo "Setting monitor flags = $sim_mon" 6>&1 |
331 | fi],[sim_mon=""])dnl | |
c494cadd | 332 | |
73c4941b MM |
333 | AC_ARG_ENABLE(sim-model, |
334 | [ --enable-sim-model=which Specify PowerPC to model.], | |
335 | [case "${enableval}" in | |
a3114052 MM |
336 | yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-model=model");; |
337 | *) sim_model="-DWITH_MODEL=${enableval}";; | |
ba62bb1c | 338 | esac |
2bc7869d | 339 | if test x"$silent" != x"yes" && test x"$sim_model" != x""; then |
ba62bb1c MM |
340 | echo "Setting model flags = $sim_model" 6>&1 |
341 | fi],[sim_model=""])dnl | |
73c4941b MM |
342 | |
343 | AC_ARG_ENABLE(sim-default-model, | |
344 | [ --enable-sim-default-model=which Specify default PowerPC to model.], | |
345 | [case "${enableval}" in | |
a3114052 MM |
346 | yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");; |
347 | *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";; | |
ba62bb1c | 348 | esac |
2bc7869d | 349 | if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then |
ba62bb1c MM |
350 | echo "Setting default-model flags = $sim_default_model" 6>&1 |
351 | fi],[sim_model=""])dnl | |
8b3797aa | 352 | |
84bbbc35 MM |
353 | AC_ARG_ENABLE(sim-model-issue, |
354 | [ --enable-sim-model-issue Specify whether to simulate model specific actions], | |
355 | [case "${enableval}" in | |
290ad14a MM |
356 | yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";; |
357 | no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";; | |
84bbbc35 MM |
358 | *) AC_MSG_ERROR("--enable-sim-model-issue does not take a value"); sim_model_issue="";; |
359 | esac | |
360 | if test x"$silent" != x"yes"; then | |
361 | echo "Setting model-issue flags = $sim_model_issue" 6>&1 | |
362 | fi],[sim_model_issue=""])dnl | |
363 | ||
cb7a6892 MM |
364 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) |
365 | AC_CANONICAL_SYSTEM | |
366 | AC_ARG_PROGRAM | |
367 | ||
368 | . ${srcdir}/../../bfd/configure.host | |
369 | ||
ba62bb1c MM |
370 | AC_CONFIG_HEADER(config.h:config.in) |
371 | ||
8b3797aa MM |
372 | AC_PROG_CC |
373 | AC_SUBST(CFLAGS) | |
374 | AC_SUBST(HDEFINES) | |
375 | AR=${AR-ar} | |
376 | AC_SUBST(AR) | |
377 | AC_PROG_RANLIB | |
c494cadd | 378 | AC_SUBST(sim_cflags) |
73c4941b | 379 | AC_SUBST(sim_warnings) |
c494cadd MM |
380 | AC_SUBST(sim_config) |
381 | AC_SUBST(sim_opcode) | |
382 | AC_SUBST(sim_switch) | |
383 | AC_SUBST(sim_dup) | |
384 | AC_SUBST(sim_filter) | |
385 | AC_SUBST(sim_icache) | |
386 | AC_SUBST(sim_inline) | |
387 | AC_SUBST(sim_bswap) | |
388 | AC_SUBST(sim_endian) | |
1dc7c0ed | 389 | AC_SUBST(sim_xor_endian) |
c494cadd MM |
390 | AC_SUBST(sim_hostendian) |
391 | AC_SUBST(sim_smp) | |
392 | AC_SUBST(sim_bitsize) | |
393 | AC_SUBST(sim_hostbitsize) | |
394 | AC_SUBST(sim_env) | |
395 | AC_SUBST(sim_timebase) | |
396 | AC_SUBST(sim_alignment) | |
397 | AC_SUBST(sim_float) | |
398 | AC_SUBST(sim_trace) | |
399 | AC_SUBST(sim_assert) | |
a3114052 | 400 | AC_SUBST(sim_reserved) |
c494cadd | 401 | AC_SUBST(sim_monitor) |
73c4941b MM |
402 | AC_SUBST(sim_model) |
403 | AC_SUBST(sim_default_model) | |
84bbbc35 | 404 | AC_SUBST(sim_model_issue) |
c494cadd MM |
405 | |
406 | AC_CHECK_FUNCS(getrusage) | |
8b3797aa MM |
407 | |
408 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
409 | AC_C_CROSS | |
410 | if test "x$cross_compiling" = "xno"; then | |
411 | CC_FOR_BUILD='$(CC)' | |
cb7a6892 | 412 | else |
8b3797aa | 413 | CC_FOR_BUILD=gcc |
cb7a6892 | 414 | fi |
8b3797aa | 415 | AC_SUBST(CC_FOR_BUILD) |
cb7a6892 | 416 | |
70fc4ad3 | 417 | AC_CHECK_HEADERS(string.h strings.h stdlib.h time.h sys/types.h sys/time.h sys/times.h unistd.h sys/resource.h) |
cb7a6892 | 418 | |
8b3797aa MM |
419 | AC_OUTPUT(Makefile, |
420 | [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) |