Part II of adding callback argument to sim_open(). Update all the
[deliverable/binutils-gdb.git] / sim / ppc / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.5)dnl
3 AC_INIT(Makefile.in)
4
5 AC_PROG_INSTALL
6 AC_PROG_CC
7
8 # Put a plausible default for CC_FOR_BUILD in Makefile.
9 AC_C_CROSS
10 if test "x$cross_compiling" = "xno"; then
11 CC_FOR_BUILD='$(CC)'
12 else
13 CC_FOR_BUILD=gcc
14 fi
15
16
17 AC_ARG_ENABLE(sim-alignment,
18 [ --enable-sim-alignment=align Specify strict or nonstrict alignment.],
19 [case "${enableval}" in
20 yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
21 no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
22 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";;
23 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";;
24 esac
25 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
26 echo "Setting alignment flags = $sim_alignment" 6>&1
27 fi],[sim_alignment=""])dnl
28
29
30 AC_ARG_ENABLE(sim-assert,
31 [ --enable-sim-assert Specify whether to perform random assertions.],
32 [case "${enableval}" in
33 yes) sim_assert="-DWITH_ASSERT=1";;
34 no) sim_assert="-DWITH_ASSERT=0";;
35 *) AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";;
36 esac
37 if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then
38 echo "Setting assert flags = $sim_assert" 6>&1
39 fi],[sim_assert=""])dnl
40
41
42 AC_ARG_ENABLE(sim-bitsize,
43 [ --enable-sim-bitsize=n Specify target bitsize (32 or 64).],
44 [case "${enableval}" in
45 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
46 *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64"); sim_bitsize="";;
47 esac
48 if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
49 echo "Setting bitsize flags = $sim_bitsize" 6>&1
50 fi],[sim_bitsize=""])dnl
51
52
53 AC_ARG_ENABLE(sim-bswap,
54 [ --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.],
55 [case "${enableval}" in
56 yes) sim_bswap="-DWITH_BSWAP=1";;
57 no) sim_bswap="-DWITH_BSWAP=0";;
58 *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";;
59 esac
60 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
61 echo "Setting bswap flags = $sim_bswap" 6>&1
62 fi],[sim_bswap=""])dnl
63
64
65 AC_ARG_ENABLE(sim-cflags,
66 [ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator],
67 [case "${enableval}" in
68 yes) sim_cflags="-O2 -fomit-frame-pointer";;
69 no) sim_cflags="";;
70 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
71 esac
72 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
73 echo "Setting sim cflags = $sim_cflags" 6>&1
74 fi],[sim_cflags=""])dnl
75
76
77 AC_ARG_ENABLE(sim-config,
78 [ --enable-sim-config=file Override default config file],
79 [case "${enableval}" in
80 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-config=file");;
81 *) if test -f "${srcdir}/${enableval}"; then
82 sim_config="${enableval}";
83 elif test -f "${srcdir}/${enableval}-config.h"; then
84 sim_config="${enableval}-config.h"
85 else
86 AC_MSG_ERROR("Config file $enableval was not found");
87 sim_config=std-config.h
88 fi;;
89 esac
90 if test x"$silent" != x"yes" && test x"$sim_config" != x""; then
91 echo "Setting config flags = $sim_config" 6>&1
92 fi],[sim_config="std-config.h"
93 if test x"$silent" != x"yes"; then
94 echo "Setting config flags = $sim_config" 6>&1
95 fi])dnl
96
97
98 AC_ARG_ENABLE(sim-decode-mechanism,
99 [ --enable-sim-decode-mechanism=which Specify the instruction decode mechanism.],
100 [case "${enableval}" in
101 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
102 array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
103 *) AC_MSG_ERROR("File $enableval is not an opcode rules file");
104 sim_decode_mechanism="switch";;
105 esac
106 if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then
107 echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1
108 fi],[sim_decode_mechanism=""
109 if test x"$silent" != x"yes"; then
110 echo "Setting decode mechanism flags = $sim_decode_mechanism"
111 fi])dnl
112
113
114 AC_ARG_ENABLE(sim-default-model,
115 [ --enable-sim-default-model=which Specify default PowerPC to model.],
116 [case "${enableval}" in
117 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");;
118 *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
119 esac
120 if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
121 echo "Setting default-model flags = $sim_default_model" 6>&1
122 fi],[sim_model=""])dnl
123
124
125 AC_ARG_ENABLE(sim-duplicate,
126 [ --enable-sim-duplicate Expand (duplicate) semantic functions.],
127 [case "${enableval}" in
128 yes) sim_dup="-E";;
129 no) sim_dup="";;
130 *) AC_MSG_ERROR("--enable-sim-duplicate does not take a value"); sim_dup="";;
131 esac
132 if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then
133 echo "Setting duplicate flags = $sim_dup" 6>&1
134 fi],[sim_dup="-E"
135 if test x"$silent" != x"yes"; then
136 echo "Setting duplicate flags = $sim_dup" 6>&1
137 fi])dnl
138
139
140 AC_ARG_ENABLE(sim-endian,
141 [ --enable-sim-endian=endian Specify target byte endian orientation.],
142 [case "${enableval}" in
143 yes) case "$target" in
144 *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
145 *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
146 *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
147 esac;;
148 no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
149 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
150 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
151 *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";;
152 esac
153 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
154 echo "Setting endian flags = $sim_endian" 6>&1
155 fi],[sim_endian=""])dnl
156
157
158 AC_ARG_ENABLE(sim-env,
159 [ --enable-sim-env=env Specify target environment (operating, virtual, user).],
160 [case "${enableval}" in
161 operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
162 virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
163 user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
164 no) sim_env="-DWITH_ENVIRONMENT=0";;
165 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-env"); sim_env="";;
166 esac
167 if test x"$silent" != x"yes" && test x"$sim_env" != x""; then
168 echo "Setting env flags = $sim_env" 6>&1
169 fi],[sim_env=""])dnl
170
171
172 AC_ARG_ENABLE(sim-filter,
173 [ --enable-sim-filter=rule Specify filter rules.],
174 [case "${enableval}" in
175 yes) AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no"); sim_filter="";;
176 no) sim_filter="";;
177 *) sim_filter="-F $enableval";;
178 esac
179 if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then
180 echo "Setting filter flags = $sim_filter" 6>&1
181 fi],[sim_filter="-F 32,f,o"
182 if test x"$silent" != x"yes"; then
183 echo "Setting filter flags = $sim_filter" 6>&1
184 fi])dnl
185
186
187 AC_ARG_ENABLE(sim-float,
188 [ --enable-sim-float Specify whether to use host floating point or simulate.],
189 [case "${enableval}" in
190 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
191 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
192 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
193 esac
194 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
195 echo "Setting float flags = $sim_float" 6>&1
196 fi],[sim_float=""])dnl
197
198
199 AC_ARG_ENABLE(sim-hardware,
200 [ --enable-sim-hardware=list Specify the hardware to be included in the build.],
201 [hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
202 case "${enableval}" in
203 yes) ;;
204 no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware"); hardware="";;
205 ,*) hardware="${hardware}${enableval}";;
206 *,) hardware="${enableval}${hardware}";;
207 *) hardware="${enableval}"'';;
208 esac
209 sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
210 sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
211 if test x"$silent" != x"yes" && test x"$hardware" != x""; then
212 echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
213 fi],[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
214 sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
215 sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
216 if test x"$silent" != x"yes"; then
217 echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
218 fi])dnl
219
220
221 AC_ARG_ENABLE(sim-hostbitsize,
222 [ --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64).],
223 [case "${enableval}" in
224 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
225 *) AC_MSG_ERROR("--enable-sim-hostbitsize was given $enableval. Expected 32 or 64"); sim_hostbitsize="";;
226 esac
227 if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then
228 echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
229 fi],[sim_hostbitsize=""])dnl
230
231
232 AC_ARG_ENABLE(sim-hostendian,
233 [ --enable-sim-hostendian=end Specify host byte endian orientation.],
234 [case "${enableval}" in
235 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
236 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
237 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
238 *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";;
239 esac
240 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
241 echo "Setting hostendian flags = $sim_hostendian" 6>&1
242 fi],[
243 if test "x$cross_compiling" = "xno"; then
244 AC_C_BIGENDIAN
245 if test $ac_cv_c_bigendian = yes; then
246 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
247 else
248 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
249 fi
250 else
251 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
252 fi])dnl
253
254
255 AC_ARG_ENABLE(sim-icache,
256 [ --enable-sim-icache=size Specify instruction-decode cache size and type.],
257 [icache="-R"
258 case "${enableval}" in
259 yes) icache="1024"; sim_icache="-I $icache";;
260 no) sim_icache="-R";;
261 *) icache=1024
262 sim_icache="-"
263 for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
264 case "$x" in
265 define) sim_icache="${sim_icache}R";;
266 semantic) sim_icache="${sim_icache}C";;
267 insn) sim_icache="${sim_icache}S";;
268 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
269 *) AC_MSG_ERROR("Unknown value $x for --enable-sim-icache"); sim_icache="";;
270 esac
271 done
272 sim_icache="${sim_icache}I $icache";;
273 esac
274 if test x"$silent" != x"yes" && test x"$icache" != x""; then
275 echo "Setting instruction cache size to $icache ($sim_icache)"
276 fi],[sim_icache="-CSRI 1024"
277 if test x"$silent" != x"yes"; then
278 echo "Setting instruction cache size to 1024 ($sim_icache)"
279 fi])dnl
280
281
282 AC_ARG_ENABLE(sim-inline,
283 [ --enable-sim-inline=inlines Specify which functions should be inlined.],
284 [sim_inline=""
285 case "$enableval" in
286 no) sim_inline="-DDEFAULT_INLINE=0";;
287 0) sim_inline="-DDEFAULT_INLINE=0";;
288 yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
289 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
290 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
291 new_flag=""
292 case "$x" in
293 *_INLINE=*) new_flag="-D$x";;
294 *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
295 *_INLINE) new_flag="-D$x=ALL_INLINE";;
296 *) new_flag="-D$x""_INLINE=ALL_INLINE";;
297 esac
298 if test x"$sim_inline" = x""; then
299 sim_inline="$new_flag"
300 else
301 sim_inline="$sim_inline $new_flag"
302 fi
303 done;;
304 esac
305 if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
306 echo "Setting inline flags = $sim_inline" 6>&1
307 fi],[if test x"$GCC" != ""; then
308 sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
309 if test x"$silent" != x"yes"; then
310 echo "Setting inline flags = $sim_inline" 6>&1
311 fi
312 else
313 sim_inline=""
314 fi])dnl
315
316
317 AC_ARG_ENABLE(sim-jump,
318 [ --enable-sim-jump Jump between semantic code (instead of call/return).],
319 [case "${enableval}" in
320 yes) sim_jump="-J";;
321 no) sim_jump="";;
322 *) AC_MSG_ERROR("--enable-sim-jump does not take a value"); sim_jump="";;
323 esac
324 if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then
325 echo "Setting jump flag = $sim_jump" 6>&1
326 fi],[sim_jump=""
327 if test x"$silent" != x"yes"; then
328 echo "Setting jump flag = $sim_jump" 6>&1
329 fi])dnl
330
331
332 AC_ARG_ENABLE(sim-line-nr,
333 [ --enable-sim-line-nr=opts Generate extra CPP code that references source rather than generated code],
334 [case "${enableval}" in
335 yes) sim_line_nr="";;
336 no) sim_line_nr="-L";;
337 *) AC_MSG_ERROR("--enable-sim-line-nr does not take a value"); sim_line_nr="";;
338 esac
339 if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then
340 echo "Setting warning flags = $sim_line_nr" 6>&1
341 fi],[sim_line_nr=""])dnl
342
343
344 AC_ARG_ENABLE(sim-model,
345 [ --enable-sim-model=which Specify PowerPC to model.],
346 [case "${enableval}" in
347 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-model=model");;
348 *) sim_model="-DWITH_MODEL=${enableval}";;
349 esac
350 if test x"$silent" != x"yes" && test x"$sim_model" != x""; then
351 echo "Setting model flags = $sim_model" 6>&1
352 fi],[sim_model=""])dnl
353
354
355 AC_ARG_ENABLE(sim-model-issue,
356 [ --enable-sim-model-issue Specify whether to simulate model specific actions],
357 [case "${enableval}" in
358 yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
359 no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
360 *) AC_MSG_ERROR("--enable-sim-model-issue does not take a value"); sim_model_issue="";;
361 esac
362 if test x"$silent" != x"yes"; then
363 echo "Setting model-issue flags = $sim_model_issue" 6>&1
364 fi],[sim_model_issue=""])dnl
365
366
367 AC_ARG_ENABLE(sim-monitor,
368 [ --enable-sim-monitor=mon Specify whether to enable monitoring events.],
369 [case "${enableval}" in
370 yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
371 no) sim_monitor="-DWITH_MON=0";;
372 instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
373 memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
374 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon"); sim_env="";;
375 esac
376 if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
377 echo "Setting monitor flags = $sim_monitor" 6>&1
378 fi],[sim_monitor=""])dnl
379
380
381 AC_ARG_ENABLE(sim-opcode,
382 [ --enable-sim-opcode=which Override default opcode lookup.],
383 [case "${enableval}" in
384 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");;
385 *) if test -f "${srcdir}/${enableval}"; then
386 sim_opcode="${enableval}"
387 elif test -f "${srcdir}/dc-${enableval}"; then
388 sim_opcode="dc-${enableval}"
389 else
390 AC_MSG_ERROR("File $enableval is not an opcode rules file");
391 sim_opcode="dc-complex"
392 fi;;
393 esac
394 if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then
395 echo "Setting opcode flags = $sim_opcode" 6>&1
396 fi],[sim_opcode="dc-complex"
397 if test x"$silent" != x"yes"; then
398 echo "Setting opcode flags = $sim_opcode"
399 fi])dnl
400
401
402 AC_ARG_ENABLE(sim-packages,
403 [ --enable-sim-packages=list Specify the packages to be included in the build.],
404 [packages=disklabel
405 case "${enableval}" in
406 yes) ;;
407 no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";;
408 ,*) packages="${packages}${enableval}";;
409 *,) packages="${enableval}${packages}";;
410 *) packages="${enableval}"'';;
411 esac
412 sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
413 sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
414 if test x"$silent" != x"yes" && test x"$packages" != x""; then
415 echo "Setting packages to $sim_pk_src, $sim_pk_obj"
416 fi],[packages=disklabel
417 sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
418 sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
419 if test x"$silent" != x"yes"; then
420 echo "Setting packages to $sim_pk_src, $sim_pk_obj"
421 fi])dnl
422
423
424 AC_ARG_ENABLE(sim-regparm,
425 [ --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific.],
426 [case "${enableval}" in
427 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";;
428 no) sim_regparm="" ;;
429 yes) sim_regparm="-DWITH_REGPARM=3";;
430 *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";;
431 esac
432 if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then
433 echo "Setting regparm flags = $sim_regparm" 6>&1
434 fi],[sim_regparm=""])dnl
435
436
437 AC_ARG_ENABLE(sim-reserved-bits,
438 [ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.],
439 [case "${enableval}" in
440 yes) sim_reserved="-DWITH_RESERVED_BITS=1";;
441 no) sim_reserved="-DWITH_RESERVED_BITS=0";;
442 *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved="";;
443 esac
444 if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then
445 echo "Setting reserved flags = $sim_reserved" 6>&1
446 fi],[sim_reserved=""])dnl
447
448
449 AC_ARG_ENABLE(sim-smp,
450 [ --enable-sim-smp=n Specify number of processors to configure for.],
451 [case "${enableval}" in
452 yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
453 no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
454 *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
455 esac
456 if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then
457 echo "Setting smp flags = $sim_smp" 6>&1
458 fi],[sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"
459 if test x"$silent" != x"yes"; then
460 echo "Setting smp flags = $sim_smp" 6>&1
461 fi])dnl
462
463
464 AC_ARG_ENABLE(sim-stdcall,
465 [ --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific.],
466 [case "${enableval}" in
467 no) sim_stdcall="" ;;
468 std*) sim_stdcall="-DWITH_STDCALL=1";;
469 yes) sim_stdcall="-DWITH_STDCALL=1";;
470 *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";;
471 esac
472 if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then
473 echo "Setting function call flags = $sim_stdcall" 6>&1
474 fi],[sim_stdcall=""])dnl
475
476
477 AC_ARG_ENABLE(sim-stdio,
478 [ --enable-sim-stdio Specify whether to use stdio for console input/output.],
479 [case "${enableval}" in
480 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
481 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
482 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";;
483 esac
484 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
485 echo "Setting stdio flags = $sim_stdio" 6>&1
486 fi],[sim_stdio=""])dnl
487
488
489 AC_ARG_ENABLE(sim-switch,
490 [ --enable-sim-switch Use a switch instead of a table for instruction call.],
491 [case "${enableval}" in
492 yes) sim_switch="-s";;
493 no) sim_switch="";;
494 *) AC_MSG_ERROR("--enable-sim-switch does not take a value"); sim_switch="";;
495 esac
496 if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then
497 echo "Setting switch flags = $sim_switch" 6>&1
498 fi],[sim_switch="";
499 if test x"$silent" != x"yes"; then
500 echo "Setting switch flags = $sim_switch" 6>&1
501 fi])dnl
502
503
504 AC_ARG_ENABLE(sim-timebase,
505 [ --enable-sim-timebase Specify whether the PPC timebase is supported.],
506 [case "${enableval}" in
507 yes) sim_timebase="-DWITH_TIME_BASE=1";;
508 no) sim_timebase="-DWITH_TIME_BASE=0";;
509 *) AC_MSG_ERROR("--enable-sim-timebase does not take a value"); sim_timebase="";;
510 esac
511 if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
512 echo "Setting timebase flags = $sim_timebase" 6>&1
513 fi],[sim_timebase=""])dnl
514
515
516 AC_ARG_ENABLE(sim-trace,
517 [ --enable-sim-trace Specify whether tracing is supported.],
518 [case "${enableval}" in
519 yes) sim_trace="-DWITH_TRACE=1";;
520 no) sim_trace="-DWITH_TRACE=0";;
521 *) AC_MSG_ERROR("--enable-sim-trace does not take a value"); sim_trace="";;
522 esac
523 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
524 echo "Setting trace flags = $sim_trace" 6>&1
525 fi],[sim_trace=""])dnl
526
527
528 AC_ARG_ENABLE(sim-warnings,
529 [ --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
530 [case "${enableval}" in
531 yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";;
532 no) sim_warnings="-w";;
533 *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
534 esac
535 if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
536 echo "Setting warning flags = $sim_warnings" 6>&1
537 fi],[sim_warnings=""])dnl
538
539
540 AC_ARG_ENABLE(sim-xor-endian,
541 [ --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).],
542 [case "${enableval}" in
543 yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
544 no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
545 *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
546 esac
547 if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
548 echo "Setting xor-endian flag = $sim_xor_endian" 6>&1
549 fi],[sim_xor_endian=""])dnl
550
551
552 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
553 AC_CANONICAL_SYSTEM
554 AC_ARG_PROGRAM
555
556 . ${srcdir}/../../bfd/configure.host
557
558 AC_CONFIG_HEADER(config.h:config.in)
559
560 AC_STRUCT_ST_BLKSIZE
561 AC_STRUCT_ST_BLOCKS
562 AC_STRUCT_ST_RDEV
563 AC_STRUCT_TIMEZONE
564
565 AC_TYPE_GETGROUPS
566 AC_TYPE_MODE_T
567 AC_TYPE_OFF_T
568 AC_TYPE_PID_T
569 AC_TYPE_SIGNAL
570 AC_TYPE_SIZE_T
571 AC_TYPE_UID_T
572
573 AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
574
575 AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h)
576 AC_HEADER_DIRENT
577
578 dnl Figure out what type of termio/termios support there is
579 sim_termio=""
580 AC_MSG_CHECKING(for struct termios)
581 AC_CACHE_VAL(ac_cv_termios_struct,
582 [AC_TRY_COMPILE([#include <sys/types.h>
583 #include <sys/termios.h>],
584 [static struct termios x;
585 x.c_iflag = 0;
586 x.c_oflag = 0;
587 x.c_cflag = 0;
588 x.c_lflag = 0;
589 x.c_cc[NCCS] = 0;],
590 ac_cv_termios_struct=yes, ac_cv_termios_struct=no)])
591 AC_MSG_RESULT($ac_cv_termios_struct)
592 if test $ac_cv_termios_struct = yes; then
593 sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"
594 fi
595
596 if test "$ac_cv_termios_struct" = "yes"; then
597 AC_MSG_CHECKING(for c_line field in struct termios)
598 AC_CACHE_VAL(ac_cv_termios_cline,
599 [AC_TRY_COMPILE([#include <sys/types.h>
600 #include <sys/termios.h>],
601 [static struct termios x; x.c_line = 0;],
602 ac_cv_termios_cline=yes, ac_cv_termios_cline=no)])
603
604 AC_MSG_RESULT($ac_cv_termios_cline)
605 if test $ac_cv_termios_cline = yes; then
606 sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE"
607 fi
608 else
609 ac_cv_termios_cline=no
610 fi
611
612 if test "$ac_cv_termios_struct" != "yes"; then
613 AC_MSG_CHECKING(for struct termio)
614 AC_CACHE_VAL(ac_cv_termio_struct,
615 [AC_TRY_COMPILE([#include <sys/types.h>
616 #include <sys/termio.h>],
617 [static struct termio x;
618 x.c_iflag = 0;
619 x.c_oflag = 0;
620 x.c_cflag = 0;
621 x.c_lflag = 0;
622 x.c_cc[NCC] = 0;],
623 ac_cv_termio_struct=yes, ac_cv_termio_struct=no)])
624 AC_MSG_RESULT($ac_cv_termio_struct)
625 if test $ac_cv_termio_struct = yes; then
626 sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE"
627 fi
628 else
629 ac_cv_termio_struct=no
630 fi
631
632 if test "$ac_cv_termio_struct" = "yes"; then
633 AC_MSG_CHECKING(for c_line field in struct termio)
634 AC_CACHE_VAL(ac_cv_termio_cline,
635 [AC_TRY_COMPILE([#include <sys/types.h>
636 #include <sys/termio.h>],
637 [static struct termio x; x.c_line = 0;],
638 ac_cv_termio_cline=yes, ac_cv_termio_cline=no)])
639
640 AC_MSG_RESULT($ac_cv_termio_cline)
641 if test $ac_cv_termio_cline = yes; then
642 sim_termio="$sim_termio -DHAVE_TERMIO_CLINE"
643 fi
644 else
645 ac_cv_termio_cline=no
646 fi
647
648 dnl Figure out if /dev/zero exists or not
649 sim_devzero=""
650 AC_MSG_CHECKING(for /dev/zero)
651 AC_CACHE_VAL(ac_cv_devzero,
652 [AC_TRY_RUN([#include <fcntl.h>
653 main () {
654 char buf[2048];
655 int i;
656 int fd = open ("/dev/zero", O_RDONLY);
657 if (fd < 0)
658 return 1;
659 for (i = 0; i < sizeof (buf); i++)
660 buf[i] = 1;
661 if (read (fd, buf, sizeof (buf)) != sizeof (buf))
662 return 1;
663 for (i = 0; i < sizeof (buf); i++)
664 if (buf[i])
665 return 1;
666 return 0;
667 }],[ac_cv_devzero=yes],[ac_cv_devzero=no],[ac_cv_devzero=no])])
668 AC_MSG_RESULT($ac_cv_devzero)
669 if test $ac_cv_devzero = yes; then
670 sim_devzero="-DHAVE_DEVZERO"
671 else
672 sim_devzero=""
673 fi
674
675 dnl Figure out if we are in the new Cygnus tree with a common directory or not
676 AC_MSG_CHECKING(for common simulator directory)
677 if test -f "${srcdir}/../common/callback.c"; then
678 AC_MSG_RESULT(yes)
679 sim_callback="callback.o targ-map.o"
680 sim_targ_vals="targ-vals.h targ-map.c targ-vals.def"
681 else
682 AC_MSG_RESULT(no)
683 sim_callback=""
684 sim_targ_vals=""
685 fi
686
687 AC_SUBST(CC_FOR_BUILD)
688 AC_SUBST(CFLAGS)
689 AC_SUBST(HDEFINES)
690 AR=${AR-ar}
691 AC_SUBST(AR)
692 AC_PROG_RANLIB
693 AC_SUBST(sim_cflags)
694 AC_SUBST(sim_warnings)
695 AC_SUBST(sim_line_nr)
696 AC_SUBST(sim_config)
697 AC_SUBST(sim_opcode)
698 AC_SUBST(sim_switch)
699 AC_SUBST(sim_dup)
700 AC_SUBST(sim_decode_mechanism)
701 AC_SUBST(sim_jump)
702 AC_SUBST(sim_filter)
703 AC_SUBST(sim_icache)
704 AC_SUBST(sim_hw_src)
705 AC_SUBST(sim_hw_obj)
706 AC_SUBST(sim_pk_src)
707 AC_SUBST(sim_pk_obj)
708 AC_SUBST(sim_inline)
709 AC_SUBST(sim_bswap)
710 AC_SUBST(sim_endian)
711 AC_SUBST(sim_regparm)
712 AC_SUBST(sim_stdcall)
713 AC_SUBST(sim_xor_endian)
714 AC_SUBST(sim_hostendian)
715 AC_SUBST(sim_smp)
716 AC_SUBST(sim_igen_smp)
717 AC_SUBST(sim_bitsize)
718 AC_SUBST(sim_hostbitsize)
719 AC_SUBST(sim_env)
720 AC_SUBST(sim_timebase)
721 AC_SUBST(sim_alignment)
722 AC_SUBST(sim_float)
723 AC_SUBST(sim_trace)
724 AC_SUBST(sim_assert)
725 AC_SUBST(sim_reserved)
726 AC_SUBST(sim_monitor)
727 AC_SUBST(sim_model)
728 AC_SUBST(sim_default_model)
729 AC_SUBST(sim_model_issue)
730 AC_SUBST(sim_stdio)
731 AC_SUBST(sim_termio)
732 AC_SUBST(sim_devzero)
733 AC_SUBST(sim_callback)
734 AC_SUBST(sim_targ_vals)
735
736 AC_OUTPUT(Makefile,
737 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.045321 seconds and 4 git commands to generate.