]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/ppc/configure
Turn on INLINES if using GCC to compile simulator; Print more stuff if requests ...
[thirdparty/binutils-gdb.git] / sim / ppc / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.4
5 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
16 ac_help="$ac_help
17 --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o"
18 ac_help="$ac_help
19 --enable-sim-config=file Override default config file"
20 ac_help="$ac_help
21 --enable-sim-opcode=which Override default opcode lookup."
22 ac_help="$ac_help
23 --enable-sim-switch Use a switch instead of a table for instruction call."
24 ac_help="$ac_help
25 --enable-sim-duplicate Expand (duplicate) semantic functions."
26 ac_help="$ac_help
27 --enable-sim-filter=rule Specify filter rules."
28 ac_help="$ac_help
29 --enable-sim-icache=size Specify instruction cache size."
30 ac_help="$ac_help
31 --enable-sim-inline=inlines Specify which functions should be inlined."
32 ac_help="$ac_help
33 --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums."
34 ac_help="$ac_help
35 --enable-sim-endian=endian Specify target byte endian orientation."
36 ac_help="$ac_help
37 --enable-sim-hostendain=end Specify host byte endian orientation."
38 ac_help="$ac_help
39 --enable-sim-smp=n Specify number of processors to configure for."
40 ac_help="$ac_help
41 --enable-sim-bitsize=n Specify target bitsize (32 or 64)."
42 ac_help="$ac_help
43 --enable-sim-hostbitsize=n Specify host bitsize (32 or 64)."
44 ac_help="$ac_help
45 --enable-sim-env=env Specify target environment (operating, virtual, user)."
46 ac_help="$ac_help
47 --enable-sim-timebase Specify whether the PPC timebase is supported."
48 ac_help="$ac_help
49 --enable-sim-alignment=align Specify strict or nonstrict alignment."
50 ac_help="$ac_help
51 --enable-sim-trace Specify whether tracing is supported."
52 ac_help="$ac_help
53 --enable-sim-assert Specify whether to perform random assertions."
54 ac_help="$ac_help
55 --enable-sim-float Specify whether to use host floating point or simulate."
56 ac_help="$ac_help
57 --enable-sim-monitor=mon Specify whether to enable monitoring events."
58 ac_help="$ac_help
59 --enable-sim-function-unit Specify whether detailed functional unit support is built."
60 ac_help="$ac_help
61 --enable-sim-model=which Specify PowerPC to model."
62 ac_help="$ac_help
63 --enable-sim-default-model=which Specify default PowerPC to model."
64
65 # Initialize some variables set by options.
66 # The variables have the same names as the options, with
67 # dashes changed to underlines.
68 build=NONE
69 cache_file=./config.cache
70 exec_prefix=NONE
71 host=NONE
72 no_create=
73 nonopt=NONE
74 no_recursion=
75 prefix=NONE
76 program_prefix=NONE
77 program_suffix=NONE
78 program_transform_name=s,x,x,
79 silent=
80 site=
81 srcdir=
82 target=NONE
83 verbose=
84 x_includes=NONE
85 x_libraries=NONE
86
87 # Initialize some other variables.
88 subdirs=
89
90 ac_prev=
91 for ac_option
92 do
93
94 # If the previous option needs an argument, assign it.
95 if test -n "$ac_prev"; then
96 eval "$ac_prev=\$ac_option"
97 ac_prev=
98 continue
99 fi
100
101 case "$ac_option" in
102 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
103 *) ac_optarg= ;;
104 esac
105
106 # Accept the important Cygnus configure options, so we can diagnose typos.
107
108 case "$ac_option" in
109
110 -build | --build | --buil | --bui | --bu | --b)
111 ac_prev=build ;;
112 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
113 build="$ac_optarg" ;;
114
115 -cache-file | --cache-file | --cache-fil | --cache-fi \
116 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117 ac_prev=cache_file ;;
118 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120 cache_file="$ac_optarg" ;;
121
122 -disable-* | --disable-*)
123 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
124 # Reject names that are not valid shell variable names.
125 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
126 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127 fi
128 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129 eval "enable_${ac_feature}=no" ;;
130
131 -enable-* | --enable-*)
132 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
133 # Reject names that are not valid shell variable names.
134 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
135 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 fi
137 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
138 case "$ac_option" in
139 *=*) ;;
140 *) ac_optarg=yes ;;
141 esac
142 eval "enable_${ac_feature}='$ac_optarg'" ;;
143
144 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
145 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
146 | --exec | --exe | --ex)
147 ac_prev=exec_prefix ;;
148 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
149 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
150 | --exec=* | --exe=* | --ex=*)
151 exec_prefix="$ac_optarg" ;;
152
153 -gas | --gas | --ga | --g)
154 # Obsolete; use --with-gas.
155 with_gas=yes ;;
156
157 -help | --help | --hel | --he)
158 # Omit some internal or obsolete options to make the list less imposing.
159 # This message is too long to be a string in the A/UX 3.1 sh.
160 cat << EOF
161 Usage: configure [options] [host]
162 Options: [defaults in brackets after descriptions]
163 Configuration:
164 --cache-file=FILE cache test results in FILE
165 --help print this message
166 --no-create do not create output files
167 --quiet, --silent do not print \`checking...' messages
168 --version print the version of autoconf that created configure
169 Directory and file names:
170 --prefix=PREFIX install architecture-independent files in PREFIX
171 [$ac_default_prefix]
172 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
173 [same as prefix]
174 --srcdir=DIR find the sources in DIR [configure dir or ..]
175 --program-prefix=PREFIX prepend PREFIX to installed program names
176 --program-suffix=SUFFIX append SUFFIX to installed program names
177 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
178 Host type:
179 --build=BUILD configure for building on BUILD [BUILD=HOST]
180 --host=HOST configure for HOST [guessed]
181 --target=TARGET configure for TARGET [TARGET=HOST]
182 Features and packages:
183 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
184 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
185 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
186 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
187 --x-includes=DIR X include files are in DIR
188 --x-libraries=DIR X library files are in DIR
189 --enable and --with options recognized:$ac_help
190 EOF
191 exit 0 ;;
192
193 -host | --host | --hos | --ho)
194 ac_prev=host ;;
195 -host=* | --host=* | --hos=* | --ho=*)
196 host="$ac_optarg" ;;
197
198 -nfp | --nfp | --nf)
199 # Obsolete; use --without-fp.
200 with_fp=no ;;
201
202 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
203 | --no-cr | --no-c)
204 no_create=yes ;;
205
206 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
207 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
208 no_recursion=yes ;;
209
210 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
211 ac_prev=prefix ;;
212 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
213 prefix="$ac_optarg" ;;
214
215 -program-prefix | --program-prefix | --program-prefi | --program-pref \
216 | --program-pre | --program-pr | --program-p)
217 ac_prev=program_prefix ;;
218 -program-prefix=* | --program-prefix=* | --program-prefi=* \
219 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
220 program_prefix="$ac_optarg" ;;
221
222 -program-suffix | --program-suffix | --program-suffi | --program-suff \
223 | --program-suf | --program-su | --program-s)
224 ac_prev=program_suffix ;;
225 -program-suffix=* | --program-suffix=* | --program-suffi=* \
226 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
227 program_suffix="$ac_optarg" ;;
228
229 -program-transform-name | --program-transform-name \
230 | --program-transform-nam | --program-transform-na \
231 | --program-transform-n | --program-transform- \
232 | --program-transform | --program-transfor \
233 | --program-transfo | --program-transf \
234 | --program-trans | --program-tran \
235 | --progr-tra | --program-tr | --program-t)
236 ac_prev=program_transform_name ;;
237 -program-transform-name=* | --program-transform-name=* \
238 | --program-transform-nam=* | --program-transform-na=* \
239 | --program-transform-n=* | --program-transform-=* \
240 | --program-transform=* | --program-transfor=* \
241 | --program-transfo=* | --program-transf=* \
242 | --program-trans=* | --program-tran=* \
243 | --progr-tra=* | --program-tr=* | --program-t=*)
244 program_transform_name="$ac_optarg" ;;
245
246 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
247 | -silent | --silent | --silen | --sile | --sil)
248 silent=yes ;;
249
250 -site | --site | --sit)
251 ac_prev=site ;;
252 -site=* | --site=* | --sit=*)
253 site="$ac_optarg" ;;
254
255 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
256 ac_prev=srcdir ;;
257 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
258 srcdir="$ac_optarg" ;;
259
260 -target | --target | --targe | --targ | --tar | --ta | --t)
261 ac_prev=target ;;
262 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
263 target="$ac_optarg" ;;
264
265 -v | -verbose | --verbose | --verbos | --verbo | --verb)
266 verbose=yes ;;
267
268 -version | --version | --versio | --versi | --vers)
269 echo "configure generated by autoconf version 2.4"
270 exit 0 ;;
271
272 -with-* | --with-*)
273 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
274 # Reject names that are not valid shell variable names.
275 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
276 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
277 fi
278 ac_package=`echo $ac_package| sed 's/-/_/g'`
279 case "$ac_option" in
280 *=*) ;;
281 *) ac_optarg=yes ;;
282 esac
283 eval "with_${ac_package}='$ac_optarg'" ;;
284
285 -without-* | --without-*)
286 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
287 # Reject names that are not valid shell variable names.
288 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
289 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
290 fi
291 ac_package=`echo $ac_package| sed 's/-/_/g'`
292 eval "with_${ac_package}=no" ;;
293
294 --x)
295 # Obsolete; use --with-x.
296 with_x=yes ;;
297
298 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
299 | --x-incl | --x-inc | --x-in | --x-i)
300 ac_prev=x_includes ;;
301 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
302 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
303 x_includes="$ac_optarg" ;;
304
305 -x-libraries | --x-libraries | --x-librarie | --x-librari \
306 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
307 ac_prev=x_libraries ;;
308 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
309 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
310 x_libraries="$ac_optarg" ;;
311
312 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
313 ;;
314
315 *)
316 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
317 echo "configure: warning: $ac_option: invalid host type" 1>&2
318 fi
319 if test "x$nonopt" != xNONE; then
320 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
321 fi
322 nonopt="$ac_option"
323 ;;
324
325 esac
326 done
327
328 if test -n "$ac_prev"; then
329 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
330 fi
331
332 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
333
334 # File descriptor usage:
335 # 0 standard input
336 # 1 file creation
337 # 2 errors and warnings
338 # 3 some systems may open it to /dev/tty
339 # 4 used on the Kubota Titan
340 # 6 checking for... messages and results
341 # 5 compiler messages saved in config.log
342 if test "$silent" = yes; then
343 exec 6>/dev/null
344 else
345 exec 6>&1
346 fi
347 exec 5>./config.log
348
349 echo "\
350 This file contains any messages produced by compilers while
351 running configure, to aid debugging if configure makes a mistake.
352 " 1>&5
353
354 # Strip out --no-create and --no-recursion so they do not pile up.
355 # Also quote any args containing shell metacharacters.
356 ac_configure_args=
357 for ac_arg
358 do
359 case "$ac_arg" in
360 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
361 | --no-cr | --no-c) ;;
362 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
363 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
364 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
365 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
366 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
367 esac
368 done
369
370 # NLS nuisances.
371 # Only set LANG and LC_ALL to C if already set.
372 # These must not be set unconditionally because not all systems understand
373 # e.g. LANG=C (notably SCO).
374 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
375 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
376
377 # confdefs.h avoids OS command line length limits that DEFS can exceed.
378 rm -rf conftest* confdefs.h
379 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
380 echo > confdefs.h
381
382 # A filename unique to this package, relative to the directory that
383 # configure is in, which we can look for to find out if srcdir is correct.
384 ac_unique_file=Makefile.in
385
386 # Find the source files, if location was not specified.
387 if test -z "$srcdir"; then
388 ac_srcdir_defaulted=yes
389 # Try the directory containing this script, then its parent.
390 ac_prog=$0
391 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
392 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
393 srcdir=$ac_confdir
394 if test ! -r $srcdir/$ac_unique_file; then
395 srcdir=..
396 fi
397 else
398 ac_srcdir_defaulted=no
399 fi
400 if test ! -r $srcdir/$ac_unique_file; then
401 if test "$ac_srcdir_defaulted" = yes; then
402 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
403 else
404 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
405 fi
406 fi
407 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
408
409 # Prefer explicitly selected file to automatically selected ones.
410 if test -z "$CONFIG_SITE"; then
411 if test "x$prefix" != xNONE; then
412 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
413 else
414 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
415 fi
416 fi
417 for ac_site_file in $CONFIG_SITE; do
418 if test -r "$ac_site_file"; then
419 echo "loading site script $ac_site_file"
420 . "$ac_site_file"
421 fi
422 done
423
424 if test -r "$cache_file"; then
425 echo "loading cache $cache_file"
426 . $cache_file
427 else
428 echo "creating cache $cache_file"
429 > $cache_file
430 fi
431
432 ac_ext=c
433 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
434 ac_cpp='$CPP $CPPFLAGS'
435 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
436 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
437
438 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
439 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
440 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
441 ac_n= ac_c='
442 ' ac_t=' '
443 else
444 ac_n=-n ac_c= ac_t=
445 fi
446 else
447 ac_n= ac_c='\c' ac_t=
448 fi
449
450
451
452 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
453 enableval="$enable_sim_cflags"
454 if test -n "$enableval"; then
455 case "${enableval}" in
456 yes) sim_cflags="-O2 -fomit-frame-pointer";;
457 no) sim_cflags="";;
458 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
459 esac
460 if test x"$sim_cflags" != x""; then
461 echo "Setting sim cflags = $sim_cflags" 6>&1
462 fi
463 else
464 sim_cflags=""
465 fi
466
467 # Check whether --enable-sim-warnings or --disable-sim-warnings was given.
468 enableval="$enable_sim_warnings"
469 if test -n "$enableval"; then
470 case "${enableval}" in
471 yes) sim_warnings="-Wall -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations";;
472 no) sim_warnings="-w";;
473 *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
474 esac
475 if test x"$sim_warnings" != x""; then
476 echo "Setting warning flags = $sim_warnings" 6>&1
477 fi
478 else
479 sim_warnings=""
480 fi
481
482 # Check whether --enable-sim-config or --disable-sim-config was given.
483 enableval="$enable_sim_config"
484 if test -n "$enableval"; then
485 case "${enableval}" in
486 yes) sim_config="std-config.h";;
487 no) sim_config="std-config.h";;
488 *) sim_config="${enableval}";;
489 esac
490 if test x"$sim_config" != x""; then
491 echo "Setting config flags = $sim_config" 6>&1
492 fi
493 else
494 sim_config="std-config.h"; echo "Setting config flags = $sim_config" 6>&1
495 fi
496
497 # Check whether --enable-sim-opcode or --disable-sim-opcode was given.
498 enableval="$enable_sim_opcode"
499 if test -n "$enableval"; then
500 case "${enableval}" in
501 yes) sim_opcode="ppc-opcode-simple";;
502 no) sim_opcode="ppc-opcode-simple";;
503 *) sim_opcode="ppc-opcode-${enableval}";;
504 esac
505 if test x"$sim_opcode" != x""; then
506 echo "Setting opcode flags = $sim_opcode" 6>&1
507 fi
508 else
509 sim_opcode="ppc-opcode-simple"; echo "Setting opcode flags = $sim_opcode"
510 fi
511
512 # Check whether --enable-sim-switch or --disable-sim-switch was given.
513 enableval="$enable_sim_switch"
514 if test -n "$enableval"; then
515 case "${enableval}" in
516 yes) sim_switch="-s";;
517 *) sim_switch="";;
518 esac
519 if test x"$sim_switch" != x""; then
520 echo "Setting switch flags = $sim_switch" 6>&1
521 fi
522 else
523 sim_switch="-s"; echo "Setting switch flags = $sim_switch" 6>&1
524 fi
525
526 # Check whether --enable-sim-duplicate or --disable-sim-duplicate was given.
527 enableval="$enable_sim_duplicate"
528 if test -n "$enableval"; then
529 case "${enableval}" in
530 yes) sim_dup="-e";;
531 *) sim_dup="";;
532 esac
533 if test x"$sim_dup" != x""; then
534 echo "Setting duplicate flags = $sim_dup" 6>&1
535 fi
536 else
537 sim_dup="-e"; echo "Setting duplicate flags = $sim_dup" 6>&1
538 fi
539
540 # Check whether --enable-sim-filter or --disable-sim-filter was given.
541 enableval="$enable_sim_filter"
542 if test -n "$enableval"; then
543 case "${enableval}" in
544 yes) sim_filter="";;
545 *) sim_filter="-f $enableval";;
546 esac
547 if test x"$sim_filter" != x""; then
548 echo "Setting filter flags = $sim_filter" 6>&1
549 fi
550 else
551 sim_filter="-f 64"; echo "Setting filter flags = $sim_filter" 6>&1
552 fi
553
554 # Check whether --enable-sim-icache or --disable-sim-icache was given.
555 enableval="$enable_sim_icache"
556 if test -n "$enableval"; then
557 case "${enableval}" in
558 yes) sim_icache="-r 1024";;
559 *) sim_icache="";;
560 esac
561 else
562 sim_icache=""
563 fi
564
565 # Check whether --enable-sim-inline or --disable-sim-inline was given.
566 enableval="$enable_sim_inline"
567 if test -n "$enableval"; then
568 sim_inline=""
569 case "$enableval" in
570 no) sim_inline="";;
571 0) sim_inline="-DDEFAULT_INLINE=0";;
572 yes | 2) sim_inline="-DDEFAULT_INLINE=2";;
573 1) sim_inline="-DDEFAULT_INLINE=1";;
574 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
575 new_flag=""
576 case "$x" in
577 *_INLINE=*) new_flag="-D$x";;
578 *_INLINE) new_flag="-D$x=2";;
579 *=*) new_flag=`sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
580 *) new_flag="-D$x""_INLINE=2";;
581 esac
582 if x"$sim_inline" = x""; then
583 sim_inline="$new_flag"
584 else
585 sim_inline="$flags $new_flag"
586 fi
587 done;;
588 esac
589 if test x"$sim_inline" != x""; then
590 echo "Setting inline flags = $sim_inline" 6>&1
591 fi
592 else
593 if test x"$GCC" != ""; then
594 sim_inline="-DDEFAULT_INLINE=2"; echo "Setting inline flags = $sim_inline" 6>&1
595 else
596 sim_inline=""
597 fi
598 fi
599
600 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
601 enableval="$enable_sim_bswap"
602 if test -n "$enableval"; then
603 case "${enableval}" in
604 yes) sim_bswap="-DWITH_BSWAP=1";;
605 no) sim_bswap="-DWITH_BSWAP=0";;
606 *) sim_bswap="";;
607 esac
608 if test x"$sim_bswap" != x""; then
609 echo "Setting bswap flags = $sim_bswap" 6>&1
610 fi
611 else
612 sim_bswap=""
613 fi
614
615 # Check whether --enable-sim-endian or --disable-sim-endian was given.
616 enableval="$enable_sim_endian"
617 if test -n "$enableval"; then
618 case "${enableval}" in
619 yes) case "$target" in
620 *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
621 *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
622 *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
623 esac;;
624 no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
625 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
626 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
627 *) sim_endian="";;
628 esac
629 if test x"$sim_endian" != x""; then
630 echo "Setting endian flags = $sim_endian" 6>&1
631 fi
632 else
633 sim_endian=""
634 fi
635
636 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
637 enableval="$enable_sim_hostendian"
638 if test -n "$enableval"; then
639 case "${enableval}" in
640 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
641 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
642 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
643 *) sim_hostendian="";;
644 esac
645 if test x"$sim_hostendian" != x""; then
646 echo "Setting hostendian flags = $sim_hostendian" 6>&1
647 fi
648 else
649 sim_hostendian=""
650 fi
651
652 # Check whether --enable-sim-smp or --disable-sim-smp was given.
653 enableval="$enable_sim_smp"
654 if test -n "$enableval"; then
655 case "${enableval}" in
656 yes) sim_smp="-DWITH_SMP=2";;
657 no) sim_smp="-DWITH_SMP=0";;
658 *) sim_smp="-DWITH_SMP=$enableval";;
659 esac
660 if test x"$sim_smp" != x""; then
661 echo "Setting smp flags = $sim_smp" 6>&1
662 fi
663 else
664 sim_smp="-DWITH_SMP=0"; echo "Setting smp flags = $sim_smp" 6>&1
665 fi
666
667 # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
668 enableval="$enable_sim_bitsize"
669 if test -n "$enableval"; then
670 case "${enableval}" in
671 yes) sim_bitsize="";;
672 no) sim_bitsize="";;
673 *) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
674 esac
675 if test x"$sim_bitsize" != x""; then
676 echo "Setting bitsize flags = $sim_bitsize" 6>&1
677 fi
678 else
679 sim_bitsize=""
680 fi
681
682 # Check whether --enable-sim-hostbitsize or --disable-sim-hostbitsize was given.
683 enableval="$enable_sim_hostbitsize"
684 if test -n "$enableval"; then
685 case "${enableval}" in
686 yes) sim_hostbitsize="";;
687 no) sim_hostbitsize="";;
688 *) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
689 esac
690 if test x"$sim_hostbitsize" != x""; then
691 echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
692 fi
693 else
694 sim_hostbitsize=""
695 fi
696
697 # Check whether --enable-sim-env or --disable-sim-env was given.
698 enableval="$enable_sim_env"
699 if test -n "$enableval"; then
700 case "${enableval}" in
701 operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
702 virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
703 user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
704 *) sim_env="";;
705 esac
706 if test x"$sim_env" != x""; then
707 echo "Setting env flags = $sim_env" 6>&1
708 fi
709 else
710 sim_env=""
711 fi
712
713 # Check whether --enable-sim-timebase or --disable-sim-timebase was given.
714 enableval="$enable_sim_timebase"
715 if test -n "$enableval"; then
716 case "${enableval}" in
717 yes) sim_timebase="-DWITH_TIME_BASE=1";;
718 no) sim_timebase="-DWITH_TIME_BASE=0";;
719 *) sim_timebase="";;
720 esac
721 if test x"$sim_timebase" != x""; then
722 echo "Setting timebase flags = $sim_timebase" 6>&1
723 fi
724 else
725 sim_timebase=""
726 fi
727
728 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
729 enableval="$enable_sim_alignment"
730 if test -n "$enableval"; then
731 case "${enableval}" in
732 yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
733 no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
734 *) sim_alignment="-DWITH_ALIGNMENT=$enableval";;
735 esac
736 if test x"$sim_alignment" != x""; then
737 echo "Setting alignment flags = $sim_alignment" 6>&1
738 fi
739 else
740 sim_alignment=""
741 fi
742
743 # Check whether --enable-sim-trace or --disable-sim-trace was given.
744 enableval="$enable_sim_trace"
745 if test -n "$enableval"; then
746 case "${enableval}" in
747 yes) sim_trace="-DWITH_TRACE=1";;
748 no) sim_trace="-DWITH_TRACE=0";;
749 *) sim_trace="";;
750 esac
751 if test x"$sim_trace" != x""; then
752 echo "Setting trace flags = $sim_trace" 6>&1
753 fi
754 else
755 sim_trace=""
756 fi
757
758 # Check whether --enable-sim-assert or --disable-sim-assert was given.
759 enableval="$enable_sim_assert"
760 if test -n "$enableval"; then
761 case "${enableval}" in
762 yes) sim_assert="-DWITH_ASSERT=1";;
763 no) sim_assert="-DWITH_ASSERT=0";;
764 *) sim_assert="";;
765 esac
766 if test x"$sim_assert" != x""; then
767 echo "Setting assert flags = $sim_assert" 6>&1
768 fi
769 else
770 sim_assert=""
771 fi
772
773 # Check whether --enable-sim-float or --disable-sim-float was given.
774 enableval="$enable_sim_float"
775 if test -n "$enableval"; then
776 case "${enableval}" in
777 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
778 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
779 *) sim_float="";;
780 esac
781 if test x"$sim_float" != x""; then
782 echo "Setting float flags = $sim_float" 6>&1
783 fi
784 else
785 sim_float=""
786 fi
787
788 # Check whether --enable-sim-monitor or --disable-sim-monitor was given.
789 enableval="$enable_sim_monitor"
790 if test -n "$enableval"; then
791 case "${enableval}" in
792 yes) sim_mon="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
793 no) sim_mon="-DWITH_MON=0";;
794 instruction) sim_mon="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
795 memory) sim_mon="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
796 *) sim_mon="-DWITH_MON='$enableval'";;
797 esac
798 if test x"$sim_mon" != x""; then
799 echo "Setting monitor flags = $sim_mon" 6>&1
800 fi
801 else
802 sim_mon=""
803 fi
804
805 # Check whether --enable-sim-function-unit or --disable-sim-function-unit was given.
806 enableval="$enable_sim_function_unit"
807 if test -n "$enableval"; then
808 case "${enableval}" in
809 yes) sim_func="-DWITH_FUNCTION_UNIT=1";;
810 no) sim_func="-DWITH_FUNCTION_UNIT=0";;
811 *) sim_func="";;
812 esac
813 if test x"$sim_func" != x""; then
814 echo "Setting function-unit flags = $sim_func" 6>&1
815 fi
816 else
817 sim_func=""
818 fi
819
820 # Check whether --enable-sim-model or --disable-sim-model was given.
821 enableval="$enable_sim_model"
822 if test -n "$enableval"; then
823 case "${enableval}" in
824 yes) sim_model="";;
825 no) sim_model="";;
826 *) sim_model="-DWITH_PPC_MODEL=${enableval}";;
827 esac
828 if test x"$sim_model" != x""; then
829 echo "Setting model flags = $sim_model" 6>&1
830 fi
831 else
832 sim_model=""
833 fi
834
835 # Check whether --enable-sim-default-model or --disable-sim-default-model was given.
836 enableval="$enable_sim_default_model"
837 if test -n "$enableval"; then
838 case "${enableval}" in
839 yes) sim_default_model="";;
840 no) sim_default_model="";;
841 *) sim_default_model="-DWITH_DEFAULT_PPC_MODEL=${enableval}";;
842 esac
843 if test x"$sim_default_model" != x""; then
844 echo "Setting default-model flags = $sim_default_model" 6>&1
845 fi
846 else
847 sim_model=""
848 fi
849
850 ac_aux_dir=
851 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
852 if test -f $ac_dir/install-sh; then
853 ac_aux_dir=$ac_dir
854 ac_install_sh="$ac_aux_dir/install-sh -c"
855 break
856 elif test -f $ac_dir/install.sh; then
857 ac_aux_dir=$ac_dir
858 ac_install_sh="$ac_aux_dir/install.sh -c"
859 break
860 fi
861 done
862 if test -z "$ac_aux_dir"; then
863 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
864 fi
865 ac_config_guess=$ac_aux_dir/config.guess
866 ac_config_sub=$ac_aux_dir/config.sub
867 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
868
869
870 # Do some error checking and defaulting for the host and target type.
871 # The inputs are:
872 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
873 #
874 # The rules are:
875 # 1. You are not allowed to specify --host, --target, and nonopt at the
876 # same time.
877 # 2. Host defaults to nonopt.
878 # 3. If nonopt is not specified, then host defaults to the current host,
879 # as determined by config.guess.
880 # 4. Target and build default to nonopt.
881 # 5. If nonopt is not specified, then target and build default to host.
882
883 # The aliases save the names the user supplied, while $host etc.
884 # will get canonicalized.
885 case $host---$target---$nonopt in
886 NONE---*---* | *---NONE---* | *---*---NONE) ;;
887 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
888 esac
889
890
891 # Make sure we can run config.sub.
892 if $ac_config_sub sun4 >/dev/null 2>&1; then :
893 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
894 fi
895
896 echo $ac_n "checking host system type""... $ac_c" 1>&6
897
898 host_alias=$host
899 case "$host_alias" in
900 NONE)
901 case $nonopt in
902 NONE)
903 if host_alias=`$ac_config_guess`; then :
904 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
905 fi ;;
906 *) host_alias=$nonopt ;;
907 esac ;;
908 esac
909
910 host=`$ac_config_sub $host_alias`
911 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
912 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
913 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
914 echo "$ac_t""$host" 1>&6
915
916 echo $ac_n "checking target system type""... $ac_c" 1>&6
917
918 target_alias=$target
919 case "$target_alias" in
920 NONE)
921 case $nonopt in
922 NONE) target_alias=$host_alias ;;
923 *) target_alias=$nonopt ;;
924 esac ;;
925 esac
926
927 target=`$ac_config_sub $target_alias`
928 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
929 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
930 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
931 echo "$ac_t""$target" 1>&6
932
933 echo $ac_n "checking build system type""... $ac_c" 1>&6
934
935 build_alias=$build
936 case "$build_alias" in
937 NONE)
938 case $nonopt in
939 NONE) build_alias=$host_alias ;;
940 *) build_alias=$nonopt ;;
941 esac ;;
942 esac
943
944 build=`$ac_config_sub $build_alias`
945 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
946 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
947 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
948 echo "$ac_t""$build" 1>&6
949
950 test "$host_alias" != "$target_alias" &&
951 test "$program_prefix$program_suffix$program_transform_name" = \
952 NONENONEs,x,x, &&
953 program_prefix=${target_alias}-
954
955 if test "$program_transform_name" = s,x,x,; then
956 program_transform_name=
957 else
958 # Double any \ or $.
959 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
960 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
961 rm -f conftestsed
962 fi
963 test "$program_prefix" != NONE &&
964 program_transform_name="s,^,${program_prefix},; $program_transform_name"
965 # Use a double $ so make ignores it.
966 test "$program_suffix" != NONE &&
967 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
968
969 # sed with no file args requires a program.
970 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
971
972
973 . ${srcdir}/../../bfd/configure.host
974
975
976
977 # Extract the first word of "gcc", so it can be a program name with args.
978 set dummy gcc; ac_word=$2
979 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
980 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
981 echo $ac_n "(cached) $ac_c" 1>&6
982 else
983 if test -n "$CC"; then
984 ac_cv_prog_CC="$CC" # Let the user override the test.
985 else
986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
987 for ac_dir in $PATH; do
988 test -z "$ac_dir" && ac_dir=.
989 if test -f $ac_dir/$ac_word; then
990 ac_cv_prog_CC="gcc"
991 break
992 fi
993 done
994 IFS="$ac_save_ifs"
995 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
996 fi
997 fi
998 CC="$ac_cv_prog_CC"
999 if test -n "$CC"; then
1000 echo "$ac_t""$CC" 1>&6
1001 else
1002 echo "$ac_t""no" 1>&6
1003 fi
1004
1005
1006 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1007 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010 cat > conftest.c <<EOF
1011 #ifdef __GNUC__
1012 yes;
1013 #endif
1014 EOF
1015 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
1016 ac_cv_prog_gcc=yes
1017 else
1018 ac_cv_prog_gcc=no
1019 fi
1020 fi
1021 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1022 if test $ac_cv_prog_gcc = yes; then
1023 GCC=yes
1024 if test "${CFLAGS+set}" != set; then
1025 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1026 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
1028 else
1029 echo 'void f(){}' > conftest.c
1030 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1031 ac_cv_prog_gcc_g=yes
1032 else
1033 ac_cv_prog_gcc_g=no
1034 fi
1035 rm -f conftest*
1036
1037 fi
1038 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1039 if test $ac_cv_prog_gcc_g = yes; then
1040 CFLAGS="-g -O"
1041 else
1042 CFLAGS="-O"
1043 fi
1044 fi
1045 else
1046 GCC=
1047 test "${CFLAGS+set}" = set || CFLAGS="-g"
1048 fi
1049
1050
1051
1052 AR=${AR-ar}
1053
1054 # Extract the first word of "ranlib", so it can be a program name with args.
1055 set dummy ranlib; ac_word=$2
1056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1057 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1058 echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060 if test -n "$RANLIB"; then
1061 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1062 else
1063 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1064 for ac_dir in $PATH; do
1065 test -z "$ac_dir" && ac_dir=.
1066 if test -f $ac_dir/$ac_word; then
1067 ac_cv_prog_RANLIB="ranlib"
1068 break
1069 fi
1070 done
1071 IFS="$ac_save_ifs"
1072 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1073 fi
1074 fi
1075 RANLIB="$ac_cv_prog_RANLIB"
1076 if test -n "$RANLIB"; then
1077 echo "$ac_t""$RANLIB" 1>&6
1078 else
1079 echo "$ac_t""no" 1>&6
1080 fi
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108 for ac_func in getrusage
1109 do
1110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1112 echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114 cat > conftest.$ac_ext <<EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1117 /* System header to define __stub macros and hopefully few prototypes,
1118 which can conflict with char $ac_func(); below. */
1119 #include <assert.h>
1120 /* Override any gcc2 internal prototype to avoid an error. */
1121 char $ac_func();
1122
1123 int main() { return 0; }
1124 int t() {
1125
1126 /* The GNU C library defines this for functions which it implements
1127 to always fail with ENOSYS. Some functions are actually named
1128 something starting with __ and the normal name is an alias. */
1129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1130 choke me
1131 #else
1132 $ac_func();
1133 #endif
1134
1135 ; return 0; }
1136 EOF
1137 if eval $ac_link; then
1138 rm -rf conftest*
1139 eval "ac_cv_func_$ac_func=yes"
1140 else
1141 rm -rf conftest*
1142 eval "ac_cv_func_$ac_func=no"
1143 fi
1144 rm -f conftest*
1145
1146 fi
1147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1148 echo "$ac_t""yes" 1>&6
1149 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1150 cat >> confdefs.h <<EOF
1151 #define $ac_tr_func 1
1152 EOF
1153
1154 else
1155 echo "$ac_t""no" 1>&6
1156 fi
1157 done
1158
1159
1160 # Put a plausible default for CC_FOR_BUILD in Makefile.
1161 # If we cannot run a trivial program, we must be cross compiling.
1162 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1163 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166 if test "$cross_compiling" = yes; then
1167 ac_cv_c_cross=yes
1168 else
1169 cat > conftest.$ac_ext <<EOF
1170 #line 1171 "configure"
1171 #include "confdefs.h"
1172 main(){return(0);}
1173 EOF
1174 eval $ac_link
1175 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1176 ac_cv_c_cross=no
1177 else
1178 ac_cv_c_cross=yes
1179 fi
1180 fi
1181 rm -fr conftest*
1182 fi
1183 cross_compiling=$ac_cv_c_cross
1184 echo "$ac_t""$ac_cv_c_cross" 1>&6
1185
1186 if test "x$cross_compiling" = "xno"; then
1187 CC_FOR_BUILD='$(CC)'
1188 else
1189 CC_FOR_BUILD=gcc
1190 fi
1191
1192
1193 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1194 # On Suns, sometimes $CPP names a directory.
1195 if test -n "$CPP" && test -d "$CPP"; then
1196 CPP=
1197 fi
1198 if test -z "$CPP"; then
1199 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1200 echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202 # This must be in double quotes, not single quotes, because CPP may get
1203 # substituted into the Makefile and "${CC-cc}" will confuse make.
1204 CPP="${CC-cc} -E"
1205 # On the NeXT, cc -E runs the code through the compiler's parser,
1206 # not just through cpp.
1207 cat > conftest.$ac_ext <<EOF
1208 #line 1209 "configure"
1209 #include "confdefs.h"
1210 #include <assert.h>
1211 Syntax Error
1212 EOF
1213 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1214 ac_err=`grep -v '^ *+' conftest.out`
1215 if test -z "$ac_err"; then
1216 :
1217 else
1218 echo "$ac_err" >&5
1219 rm -rf conftest*
1220 CPP="${CC-cc} -E -traditional-cpp"
1221 cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224 #include <assert.h>
1225 Syntax Error
1226 EOF
1227 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1228 ac_err=`grep -v '^ *+' conftest.out`
1229 if test -z "$ac_err"; then
1230 :
1231 else
1232 echo "$ac_err" >&5
1233 rm -rf conftest*
1234 CPP=/lib/cpp
1235 fi
1236 rm -f conftest*
1237 fi
1238 rm -f conftest*
1239 ac_cv_prog_CPP="$CPP"
1240 fi
1241 CPP="$ac_cv_prog_CPP"
1242 else
1243 ac_cv_prog_CPP="$CPP"
1244 fi
1245 echo "$ac_t""$CPP" 1>&6
1246
1247 for ac_hdr in string.h strings.h stdlib.h time.h sys/times.h unistd.h sys/resource.h
1248 do
1249 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1251 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1253 else
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1257 #include <$ac_hdr>
1258 EOF
1259 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1260 ac_err=`grep -v '^ *+' conftest.out`
1261 if test -z "$ac_err"; then
1262 rm -rf conftest*
1263 eval "ac_cv_header_$ac_safe=yes"
1264 else
1265 echo "$ac_err" >&5
1266 rm -rf conftest*
1267 eval "ac_cv_header_$ac_safe=no"
1268 fi
1269 rm -f conftest*
1270 fi
1271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1272 echo "$ac_t""yes" 1>&6
1273 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1274 cat >> confdefs.h <<EOF
1275 #define $ac_tr_hdr 1
1276 EOF
1277
1278 else
1279 echo "$ac_t""no" 1>&6
1280 fi
1281 done
1282
1283
1284 trap '' 1 2 15
1285 cat > confcache <<\EOF
1286 # This file is a shell script that caches the results of configure
1287 # tests run on this system so they can be shared between configure
1288 # scripts and configure runs. It is not useful on other systems.
1289 # If it contains results you don't want to keep, you may remove or edit it.
1290 #
1291 # By default, configure uses ./config.cache as the cache file,
1292 # creating it if it does not exist already. You can give configure
1293 # the --cache-file=FILE option to use a different cache file; that is
1294 # what configure does when it calls configure scripts in
1295 # subdirectories, so they share the cache.
1296 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1297 # config.status only pays attention to the cache file if you give it the
1298 # --recheck option to rerun configure.
1299 #
1300 EOF
1301 # Ultrix sh set writes to stderr and can't be redirected directly,
1302 # and sets the high bit in the cache file unless we assign to the vars.
1303 (set) 2>&1 |
1304 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1305 >> confcache
1306 if cmp -s $cache_file confcache; then
1307 :
1308 else
1309 if test -w $cache_file; then
1310 echo "updating cache $cache_file"
1311 cat confcache > $cache_file
1312 else
1313 echo "not updating unwritable cache $cache_file"
1314 fi
1315 fi
1316 rm -f confcache
1317
1318 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1319
1320 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1321 # Let make expand exec_prefix.
1322 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1323
1324 # Any assignment to VPATH causes Sun make to only execute
1325 # the first set of double-colon rules, so remove it if not needed.
1326 # If there is a colon in the path, we need to keep it.
1327 if test "x$srcdir" = x.; then
1328 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1329 fi
1330
1331 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1332
1333 DEFS=-DHAVE_CONFIG_H
1334
1335 # Without the "./", some shells look in PATH for config.status.
1336 : ${CONFIG_STATUS=./config.status}
1337
1338 echo creating $CONFIG_STATUS
1339 rm -f $CONFIG_STATUS
1340 cat > $CONFIG_STATUS <<EOF
1341 #! /bin/sh
1342 # Generated automatically by configure.
1343 # Run this file to recreate the current configuration.
1344 # This directory was configured as follows,
1345 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1346 #
1347 # $0 $ac_configure_args
1348 #
1349 # Compiler output produced by configure, useful for debugging
1350 # configure, is in ./config.log if it exists.
1351
1352 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1353 for ac_option
1354 do
1355 case "\$ac_option" in
1356 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1357 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1358 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1359 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1360 echo "$CONFIG_STATUS generated by autoconf version 2.4"
1361 exit 0 ;;
1362 -help | --help | --hel | --he | --h)
1363 echo "\$ac_cs_usage"; exit 0 ;;
1364 *) echo "\$ac_cs_usage"; exit 1 ;;
1365 esac
1366 done
1367
1368 ac_given_srcdir=$srcdir
1369
1370 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1371
1372 # Protect against being on the right side of a sed subst in config.status.
1373 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
1374 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1375 $ac_vpsub
1376 $extrasub
1377 s%@CFLAGS@%$CFLAGS%g
1378 s%@CPPFLAGS@%$CPPFLAGS%g
1379 s%@CXXFLAGS@%$CXXFLAGS%g
1380 s%@DEFS@%$DEFS%g
1381 s%@LDFLAGS@%$LDFLAGS%g
1382 s%@LIBS@%$LIBS%g
1383 s%@exec_prefix@%$exec_prefix%g
1384 s%@prefix@%$prefix%g
1385 s%@program_transform_name@%$program_transform_name%g
1386 s%@host@%$host%g
1387 s%@host_alias@%$host_alias%g
1388 s%@host_cpu@%$host_cpu%g
1389 s%@host_vendor@%$host_vendor%g
1390 s%@host_os@%$host_os%g
1391 s%@target@%$target%g
1392 s%@target_alias@%$target_alias%g
1393 s%@target_cpu@%$target_cpu%g
1394 s%@target_vendor@%$target_vendor%g
1395 s%@target_os@%$target_os%g
1396 s%@build@%$build%g
1397 s%@build_alias@%$build_alias%g
1398 s%@build_cpu@%$build_cpu%g
1399 s%@build_vendor@%$build_vendor%g
1400 s%@build_os@%$build_os%g
1401 s%@CC@%$CC%g
1402 s%@HDEFINES@%$HDEFINES%g
1403 s%@AR@%$AR%g
1404 s%@RANLIB@%$RANLIB%g
1405 s%@sim_cflags@%$sim_cflags%g
1406 s%@sim_warnings@%$sim_warnings%g
1407 s%@sim_config@%$sim_config%g
1408 s%@sim_opcode@%$sim_opcode%g
1409 s%@sim_switch@%$sim_switch%g
1410 s%@sim_dup@%$sim_dup%g
1411 s%@sim_filter@%$sim_filter%g
1412 s%@sim_icache@%$sim_icache%g
1413 s%@sim_inline@%$sim_inline%g
1414 s%@sim_bswap@%$sim_bswap%g
1415 s%@sim_endian@%$sim_endian%g
1416 s%@sim_hostendian@%$sim_hostendian%g
1417 s%@sim_smp@%$sim_smp%g
1418 s%@sim_bitsize@%$sim_bitsize%g
1419 s%@sim_hostbitsize@%$sim_hostbitsize%g
1420 s%@sim_env@%$sim_env%g
1421 s%@sim_timebase@%$sim_timebase%g
1422 s%@sim_alignment@%$sim_alignment%g
1423 s%@sim_float@%$sim_float%g
1424 s%@sim_trace@%$sim_trace%g
1425 s%@sim_assert@%$sim_assert%g
1426 s%@sim_monitor@%$sim_monitor%g
1427 s%@sim_func@%$sim_func%g
1428 s%@sim_model@%$sim_model%g
1429 s%@sim_default_model@%$sim_default_model%g
1430 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
1431 s%@CPP@%$CPP%g
1432
1433 CEOF
1434 EOF
1435 cat >> $CONFIG_STATUS <<EOF
1436
1437 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1438 EOF
1439 cat >> $CONFIG_STATUS <<\EOF
1440 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1441 # Support "outfile[:infile]", defaulting infile="outfile.in".
1442 case "$ac_file" in
1443 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1444 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1445 *) ac_file_in="${ac_file}.in" ;;
1446 esac
1447
1448 # Adjust relative srcdir, etc. for subdirectories.
1449
1450 # Remove last slash and all that follows it. Not all systems have dirname.
1451 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1452 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1453 # The file is in a subdirectory.
1454 test ! -d "$ac_dir" && mkdir "$ac_dir"
1455 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1456 # A "../" for each directory in $ac_dir_suffix.
1457 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1458 else
1459 ac_dir_suffix= ac_dots=
1460 fi
1461
1462 case "$ac_given_srcdir" in
1463 .) srcdir=.
1464 if test -z "$ac_dots"; then top_srcdir=.
1465 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1466 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1467 *) # Relative path.
1468 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1469 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1470 esac
1471
1472 echo creating "$ac_file"
1473 rm -f "$ac_file"
1474 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1475 case "$ac_file" in
1476 *Makefile*) ac_comsub="1i\\
1477 # $configure_input" ;;
1478 *) ac_comsub= ;;
1479 esac
1480 sed -e "$ac_comsub
1481 s%@configure_input@%$configure_input%g
1482 s%@srcdir@%$srcdir%g
1483 s%@top_srcdir@%$top_srcdir%g
1484 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1485 fi; done
1486 rm -f conftest.subs
1487
1488 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1489 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1490 #
1491 # ac_d sets the value in "#define NAME VALUE" lines.
1492 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1493 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1494 ac_dC='\3'
1495 ac_dD='%g'
1496 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1497 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1498 ac_uB='\([ ]\)%\1#\2define\3'
1499 ac_uC=' '
1500 ac_uD='\4%g'
1501 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1502 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1503 ac_eB='$%\1#\2define\3'
1504 ac_eC=' '
1505 ac_eD='%g'
1506
1507 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
1508 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1509 # Support "outfile[:infile]", defaulting infile="outfile.in".
1510 case "$ac_file" in
1511 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1512 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1513 *) ac_file_in="${ac_file}.in" ;;
1514 esac
1515
1516 echo creating $ac_file
1517
1518 rm -f conftest.frag conftest.in conftest.out
1519 cp $ac_given_srcdir/$ac_file_in conftest.in
1520
1521 EOF
1522
1523 # Transform confdefs.h into a sed script conftest.vals that substitutes
1524 # the proper values into config.h.in to produce config.h. And first:
1525 # Protect against being on the right side of a sed subst in config.status.
1526 # Protect against being in an unquoted here document in config.status.
1527 rm -f conftest.vals
1528 cat > conftest.hdr <<\EOF
1529 s/[\\&%]/\\&/g
1530 s%[\\$`]%\\&%g
1531 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1532 s%ac_d%ac_u%gp
1533 s%ac_u%ac_e%gp
1534 EOF
1535 sed -n -f conftest.hdr confdefs.h > conftest.vals
1536 rm -f conftest.hdr
1537
1538 # This sed command replaces #undef with comments. This is necessary, for
1539 # example, in the case of _POSIX_SOURCE, which is predefined and required
1540 # on some systems where configure will not decide to define it.
1541 cat >> conftest.vals <<\EOF
1542 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1543 EOF
1544
1545 # Break up conftest.vals because some shells have a limit on
1546 # the size of here documents, and old seds have small limits too.
1547 # Maximum number of lines to put in a single here document.
1548 ac_max_here_lines=12
1549
1550 rm -f conftest.tail
1551 while :
1552 do
1553 ac_lines=`grep -c . conftest.vals`
1554 # grep -c gives empty output for an empty file on some AIX systems.
1555 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1556 # Write a limited-size here document to conftest.frag.
1557 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1558 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1559 echo 'CEOF
1560 sed -f conftest.frag conftest.in > conftest.out
1561 rm -f conftest.in
1562 mv conftest.out conftest.in
1563 ' >> $CONFIG_STATUS
1564 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1565 rm -f conftest.vals
1566 mv conftest.tail conftest.vals
1567 done
1568 rm -f conftest.vals
1569
1570 cat >> $CONFIG_STATUS <<\EOF
1571 rm -f conftest.frag conftest.h
1572 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1573 cat conftest.in >> conftest.h
1574 rm -f conftest.in
1575 if cmp -s $ac_file conftest.h 2>/dev/null; then
1576 echo "$ac_file is unchanged"
1577 rm -f conftest.h
1578 else
1579 rm -f $ac_file
1580 mv conftest.h $ac_file
1581 fi
1582 fi; done
1583
1584
1585 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
1586 exit 0
1587 EOF
1588 chmod +x $CONFIG_STATUS
1589 rm -fr confdefs* $ac_clean_files
1590 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1591