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