78 # Guess values for system-dependent variables and create Makefiles.
79 # Generated automatically using autoconf version 2.12
80 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
82 # This configure script is free software; the Free Software Foundation
83 # gives unlimited permission to copy, distribute and modify it.
87 ac_default_prefix=/usr/local
88 # Any additions from configure.in:
90 --enable-maintainer-mode Enable developer functionality."
92 --enable-sim-bswap Use Host specific BSWAP instruction."
94 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
96 --enable-sim-debug=opts Enable debugging flags"
98 --enable-sim-stdio Specify whether to use stdio for console input/output."
100 --enable-sim-trace=opts Enable tracing flags"
102 --enable-sim-profile=opts Enable profiling flags"
104 --enable-sim-inline=inlines Specify which functions should be inlined."
106 --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
108 --enable-sim-hostendian=end Specify host byte endian orientation."
110 --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings"
112 --enable-sim-endian=endian Specify target byte endian orientation."
114 --enable-sim-bitsize=n Specify target bitsize (32 or 64)."
116 --enable-sim-float Specify that the target processor has floating point hardware."
118 --enable-sim-igen=opts Enable IGEN simulator"
120 # Initialize some variables set by options.
121 # The variables have the same names as the options, with
122 # dashes changed to underlines.
124 cache_file=./config.cache
133 program_transform_name=s,x,x,
141 bindir='${exec_prefix}/bin'
142 sbindir='${exec_prefix}/sbin'
143 libexecdir='${exec_prefix}/libexec'
144 datadir='${prefix}/share'
145 sysconfdir='${prefix}/etc'
146 sharedstatedir='${prefix}/com'
147 localstatedir='${prefix}/var'
148 libdir='${exec_prefix}/lib'
149 includedir='${prefix}/include'
150 oldincludedir='/usr/include'
151 infodir='${prefix}/info'
152 mandir='${prefix}/man'
154 # Initialize some other variables.
157 # Maximum number of lines to put in a shell here document.
164 # If the previous option needs an argument, assign it.
165 if test -n "$ac_prev"; then
166 eval "$ac_prev=\$ac_option"
172 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
176 # Accept the important Cygnus configure options, so we can diagnose typos.
180 -bindir | --bindir | --bindi | --bind | --bin | --bi)
182 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
183 bindir="$ac_optarg" ;;
185 -build | --build | --buil | --bui | --bu)
187 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
188 build="$ac_optarg" ;;
190 -cache-file | --cache-file | --cache-fil | --cache-fi \
191 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
192 ac_prev=cache_file ;;
193 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
194 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
195 cache_file="$ac_optarg" ;;
197 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
199 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
201 datadir="$ac_optarg" ;;
203 -disable-* | --disable-*)
204 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
205 # Reject names that are not valid shell variable names.
206 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
207 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
209 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
210 eval "enable_${ac_feature}=no" ;;
212 -enable-* | --enable-*)
213 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
214 # Reject names that are not valid shell variable names.
215 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
216 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
218 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
223 eval "enable_${ac_feature}='$ac_optarg'" ;;
225 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
226 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
227 | --exec | --exe | --ex)
228 ac_prev=exec_prefix ;;
229 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
230 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
231 | --exec=* | --exe=* | --ex=*)
232 exec_prefix="$ac_optarg" ;;
234 -gas | --gas | --ga | --g)
235 # Obsolete; use --with-gas.
238 -help | --help | --hel | --he)
239 # Omit some internal or obsolete options to make the list less imposing.
240 # This message is too long to be a string in the A/UX 3.1 sh.
242 Usage: configure [options] [host]
243 Options: [defaults in brackets after descriptions]
245 --cache-file=FILE cache test results in FILE
246 --help print this message
247 --no-create do not create output files
248 --quiet, --silent do not print \`checking...' messages
249 --version print the version of autoconf that created configure
250 Directory and file names:
251 --prefix=PREFIX install architecture-independent files in PREFIX
253 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
255 --bindir=DIR user executables in DIR [EPREFIX/bin]
256 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
257 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
258 --datadir=DIR read-only architecture-independent data in DIR
260 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
261 --sharedstatedir=DIR modifiable architecture-independent data in DIR
263 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
264 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
265 --includedir=DIR C header files in DIR [PREFIX/include]
266 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
267 --infodir=DIR info documentation in DIR [PREFIX/info]
268 --mandir=DIR man documentation in DIR [PREFIX/man]
269 --srcdir=DIR find the sources in DIR [configure dir or ..]
270 --program-prefix=PREFIX prepend PREFIX to installed program names
271 --program-suffix=SUFFIX append SUFFIX to installed program names
272 --program-transform-name=PROGRAM
273 run sed PROGRAM on installed program names
277 --build=BUILD configure for building on BUILD [BUILD=HOST]
278 --host=HOST configure for HOST [guessed]
279 --target=TARGET configure for TARGET [TARGET=HOST]
280 Features and packages:
281 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
282 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
283 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
284 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
285 --x-includes=DIR X include files are in DIR
286 --x-libraries=DIR X library files are in DIR
288 if test -n "$ac_help"; then
289 echo "--enable and --with options recognized:$ac_help"
293 -host | --host | --hos | --ho)
295 -host=* | --host=* | --hos=* | --ho=*)
298 -includedir | --includedir | --includedi | --included | --include \
299 | --includ | --inclu | --incl | --inc)
300 ac_prev=includedir ;;
301 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
302 | --includ=* | --inclu=* | --incl=* | --inc=*)
303 includedir="$ac_optarg" ;;
305 -infodir | --infodir | --infodi | --infod | --info | --inf)
307 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
308 infodir="$ac_optarg" ;;
310 -libdir | --libdir | --libdi | --libd)
312 -libdir=* | --libdir=* | --libdi=* | --libd=*)
313 libdir="$ac_optarg" ;;
315 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
316 | --libexe | --libex | --libe)
317 ac_prev=libexecdir ;;
318 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
319 | --libexe=* | --libex=* | --libe=*)
320 libexecdir="$ac_optarg" ;;
322 -localstatedir | --localstatedir | --localstatedi | --localstated \
323 | --localstate | --localstat | --localsta | --localst \
324 | --locals | --local | --loca | --loc | --lo)
325 ac_prev=localstatedir ;;
326 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
327 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
328 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
329 localstatedir="$ac_optarg" ;;
331 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334 mandir="$ac_optarg" ;;
337 # Obsolete; use --without-fp.
340 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350 | --oldin | --oldi | --old | --ol | --o)
351 ac_prev=oldincludedir ;;
352 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355 oldincludedir="$ac_optarg" ;;
357 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360 prefix="$ac_optarg" ;;
362 -program-prefix | --program-prefix | --program-prefi | --program-pref \
363 | --program-pre | --program-pr | --program-p)
364 ac_prev=program_prefix ;;
365 -program-prefix=* | --program-prefix=* | --program-prefi=* \
366 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367 program_prefix="$ac_optarg" ;;
369 -program-suffix | --program-suffix | --program-suffi | --program-suff \
370 | --program-suf | --program-su | --program-s)
371 ac_prev=program_suffix ;;
372 -program-suffix=* | --program-suffix=* | --program-suffi=* \
373 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374 program_suffix="$ac_optarg" ;;
376 -program-transform-name | --program-transform-name \
377 | --program-transform-nam | --program-transform-na \
378 | --program-transform-n | --program-transform- \
379 | --program-transform | --program-transfor \
380 | --program-transfo | --program-transf \
381 | --program-trans | --program-tran \
382 | --progr-tra | --program-tr | --program-t)
383 ac_prev=program_transform_name ;;
384 -program-transform-name=* | --program-transform-name=* \
385 | --program-transform-nam=* | --program-transform-na=* \
386 | --program-transform-n=* | --program-transform-=* \
387 | --program-transform=* | --program-transfor=* \
388 | --program-transfo=* | --program-transf=* \
389 | --program-trans=* | --program-tran=* \
390 | --progr-tra=* | --program-tr=* | --program-t=*)
391 program_transform_name="$ac_optarg" ;;
393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394 | -silent | --silent | --silen | --sile | --sil)
397 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 sbindir="$ac_optarg" ;;
403 -sharedstatedir | --sharedstatedir | --sharedstatedi \
404 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405 | --sharedst | --shareds | --shared | --share | --shar \
407 ac_prev=sharedstatedir ;;
408 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 sharedstatedir="$ac_optarg" ;;
414 -site | --site | --sit)
416 -site=* | --site=* | --sit=*)
419 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422 srcdir="$ac_optarg" ;;
424 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425 | --syscon | --sysco | --sysc | --sys | --sy)
426 ac_prev=sysconfdir ;;
427 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429 sysconfdir="$ac_optarg" ;;
431 -target | --target | --targe | --targ | --tar | --ta | --t)
433 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434 target="$ac_optarg" ;;
436 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 -version | --version | --versio | --versi | --vers)
440 echo "configure generated by autoconf version 2.12"
444 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
445 # Reject names that are not valid shell variable names.
446 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
447 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
449 ac_package=`echo $ac_package| sed 's/-/_/g'`
454 eval "with_${ac_package}='$ac_optarg'" ;;
456 -without-* | --without-*)
457 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
458 # Reject names that are not valid shell variable names.
459 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
460 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
462 ac_package=`echo $ac_package| sed 's/-/_/g'`
463 eval "with_${ac_package}=no" ;;
466 # Obsolete; use --with-x.
469 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470 | --x-incl | --x-inc | --x-in | --x-i)
471 ac_prev=x_includes ;;
472 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474 x_includes="$ac_optarg" ;;
476 -x-libraries | --x-libraries | --x-librarie | --x-librari \
477 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478 ac_prev=x_libraries ;;
479 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481 x_libraries="$ac_optarg" ;;
483 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
487 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
488 echo "configure: warning: $ac_option: invalid host type" 1>&2
490 if test "x$nonopt" != xNONE; then
491 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
499 if test -n "$ac_prev"; then
500 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
503 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
505 # File descriptor usage:
508 # 2 errors and warnings
509 # 3 some systems may open it to /dev/tty
510 # 4 used on the Kubota Titan
511 # 6 checking for... messages and results
512 # 5 compiler messages saved in config.log
513 if test "$silent" = yes; then
521 This file contains any messages produced by compilers while
522 running configure, to aid debugging if configure makes a mistake.
525 # Strip out --no-create and --no-recursion so they do not pile up.
526 # Also quote any args containing shell metacharacters.
531 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
532 | --no-cr | --no-c) ;;
533 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
534 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
535 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
536 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
537 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
542 # Only set these to C if already set. These must not be set unconditionally
543 # because not all systems understand e.g. LANG=C (notably SCO).
544 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
545 # Non-C LC_CTYPE values break the ctype check.
546 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
547 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
548 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
549 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
551 # confdefs.h avoids OS command line length limits that DEFS can exceed.
552 rm -rf conftest* confdefs.h
553 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
556 # A filename unique to this package, relative to the directory that
557 # configure is in, which we can look for to find out if srcdir is correct.
558 ac_unique_file=Makefile.in
560 # Find the source files, if location was not specified.
561 if test -z "$srcdir"; then
562 ac_srcdir_defaulted=yes
563 # Try the directory containing this script, then its parent.
565 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
566 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568 if test ! -r $srcdir/$ac_unique_file; then
572 ac_srcdir_defaulted=no
574 if test ! -r $srcdir/$ac_unique_file; then
575 if test "$ac_srcdir_defaulted" = yes; then
576 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
578 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
581 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
583 # Prefer explicitly selected file to automatically selected ones.
584 if test -z "$CONFIG_SITE"; then
585 if test "x$prefix" != xNONE; then
586 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
588 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
591 for ac_site_file in $CONFIG_SITE; do
592 if test -r "$ac_site_file"; then
593 echo "loading site script $ac_site_file"
598 if test -r "$cache_file"; then
599 echo "loading cache $cache_file"
602 echo "creating cache $cache_file"
607 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
608 ac_cpp='$CPP $CPPFLAGS'
609 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
610 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
611 cross_compiling=$ac_cv_prog_cc_cross
613 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
614 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
615 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
622 ac_n= ac_c='\c' ac_t=
627 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
628 echo "configure:629: checking how to run the C preprocessor" >&5
629 # On Suns, sometimes $CPP names a directory.
630 if test -n "$CPP" && test -d "$CPP"; then
633 if test -z "$CPP"; then
634 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
637 # This must be in double quotes, not single quotes, because CPP may get
638 # substituted into the Makefile and "${CC-cc}" will confuse make.
640 # On the NeXT, cc -E runs the code through the compiler's parser,
641 # not just through cpp.
642 cat > conftest.$ac_ext <<EOF
643 #line 644 "configure"
644 #include "confdefs.h"
648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
649 { (eval echo configure:650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
650 ac_err=`grep -v '^ *+' conftest.out`
651 if test -z "$ac_err"; then
655 echo "configure: failed program was:" >&5
656 cat conftest.$ac_ext >&5
658 CPP="${CC-cc} -E -traditional-cpp"
659 cat > conftest.$ac_ext <<EOF
660 #line 661 "configure"
661 #include "confdefs.h"
665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
666 { (eval echo configure:667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
667 ac_err=`grep -v '^ *+' conftest.out`
668 if test -z "$ac_err"; then
672 echo "configure: failed program was:" >&5
673 cat conftest.$ac_ext >&5
680 ac_cv_prog_CPP="$CPP"
682 CPP="$ac_cv_prog_CPP"
684 ac_cv_prog_CPP="$CPP"
686 echo "$ac_t""$CPP" 1>&6
689 # autoconf.info says this should be called right after AC_INIT.
693 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
694 if test -f $ac_dir/install-sh; then
696 ac_install_sh="$ac_aux_dir/install-sh -c"
698 elif test -f $ac_dir/install.sh; then
700 ac_install_sh="$ac_aux_dir/install.sh -c"
704 if test -z "$ac_aux_dir"; then
705 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
707 ac_config_guess=$ac_aux_dir/config.guess
708 ac_config_sub=$ac_aux_dir/config.sub
709 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
712 # Do some error checking and defaulting for the host and target type.
714 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
717 # 1. You are not allowed to specify --host, --target, and nonopt at the
719 # 2. Host defaults to nonopt.
720 # 3. If nonopt is not specified, then host defaults to the current host,
721 # as determined by config.guess.
722 # 4. Target and build default to nonopt.
723 # 5. If nonopt is not specified, then target and build default to host.
725 # The aliases save the names the user supplied, while $host etc.
726 # will get canonicalized.
727 case $host---$target---$nonopt in
728 NONE---*---* | *---NONE---* | *---*---NONE) ;;
729 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
733 # Make sure we can run config.sub.
734 if $ac_config_sub sun4 >/dev/null 2>&1; then :
735 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
738 echo $ac_n "checking host system type""... $ac_c" 1>&6
739 echo "configure:740: checking host system type" >&5
742 case "$host_alias" in
746 if host_alias=`$ac_config_guess`; then :
747 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
749 *) host_alias=$nonopt ;;
753 host=`$ac_config_sub $host_alias`
754 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
755 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
756 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
757 echo "$ac_t""$host" 1>&6
759 echo $ac_n "checking target system type""... $ac_c" 1>&6
760 echo "configure:761: checking target system type" >&5
763 case "$target_alias" in
766 NONE) target_alias=$host_alias ;;
767 *) target_alias=$nonopt ;;
771 target=`$ac_config_sub $target_alias`
772 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
773 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
774 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
775 echo "$ac_t""$target" 1>&6
777 echo $ac_n "checking build system type""... $ac_c" 1>&6
778 echo "configure:779: checking build system type" >&5
781 case "$build_alias" in
784 NONE) build_alias=$host_alias ;;
785 *) build_alias=$nonopt ;;
789 build=`$ac_config_sub $build_alias`
790 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
791 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
792 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
793 echo "$ac_t""$build" 1>&6
795 test "$host_alias" != "$target_alias" &&
796 test "$program_prefix$program_suffix$program_transform_name" = \
798 program_prefix=${target_alias}-
800 if test "$program_transform_name" = s,x,x,; then
801 program_transform_name=
803 # Double any \ or $. echo might interpret backslashes.
804 cat <<\EOF_SED > conftestsed
805 s,\\,\\\\,g; s,\$,$$,g
807 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
810 test "$program_prefix" != NONE &&
811 program_transform_name="s,^,${program_prefix},; $program_transform_name"
812 # Use a double $ so make ignores it.
813 test "$program_suffix" != NONE &&
814 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
816 # sed with no file args requires a program.
817 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
819 # Extract the first word of "gcc", so it can be a program name with args.
820 set dummy gcc; ac_word=$2
821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
822 echo "configure:823: checking for $ac_word" >&5
823 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
824 echo $ac_n "(cached) $ac_c" 1>&6
826 if test -n "$CC"; then
827 ac_cv_prog_CC="$CC" # Let the user override the test.
829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
830 for ac_dir in $PATH; do
831 test -z "$ac_dir" && ac_dir=.
832 if test -f $ac_dir/$ac_word; then
841 if test -n "$CC"; then
842 echo "$ac_t""$CC" 1>&6
844 echo "$ac_t""no" 1>&6
847 if test -z "$CC"; then
848 # Extract the first word of "cc", so it can be a program name with args.
849 set dummy cc; ac_word=$2
850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
851 echo "configure:852: checking for $ac_word" >&5
852 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
853 echo $ac_n "(cached) $ac_c" 1>&6
855 if test -n "$CC"; then
856 ac_cv_prog_CC="$CC" # Let the user override the test.
858 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
860 for ac_dir in $PATH; do
861 test -z "$ac_dir" && ac_dir=.
862 if test -f $ac_dir/$ac_word; then
863 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
872 if test $ac_prog_rejected = yes; then
873 # We found a bogon in the path, so make sure we never use it.
874 set dummy $ac_cv_prog_CC
876 if test $# -gt 0; then
877 # We chose a different compiler from the bogus one.
878 # However, it has the same basename, so the bogon will be chosen
879 # first if we set CC to just the basename; use the full file name.
881 set dummy "$ac_dir/$ac_word" "$@"
889 if test -n "$CC"; then
890 echo "$ac_t""$CC" 1>&6
892 echo "$ac_t""no" 1>&6
895 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
898 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
899 echo "configure:900: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
902 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
903 ac_cpp='$CPP $CPPFLAGS'
904 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
905 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
906 cross_compiling=$ac_cv_prog_cc_cross
908 cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
913 if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
914 ac_cv_prog_cc_works=yes
915 # If we can't run a trivial program, we are probably using a cross compiler.
916 if (./conftest; exit) 2>/dev/null; then
917 ac_cv_prog_cc_cross=no
919 ac_cv_prog_cc_cross=yes
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
924 ac_cv_prog_cc_works=no
928 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
929 if test $ac_cv_prog_cc_works = no; then
930 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
932 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
933 echo "configure:934: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
934 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
935 cross_compiling=$ac_cv_prog_cc_cross
937 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
938 echo "configure:939: checking whether we are using GNU C" >&5
939 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
940 echo $ac_n "(cached) $ac_c" 1>&6
942 cat > conftest.c <<EOF
947 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
954 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
956 if test $ac_cv_prog_gcc = yes; then
958 ac_test_CFLAGS="${CFLAGS+set}"
959 ac_save_CFLAGS="$CFLAGS"
961 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
962 echo "configure:963: checking whether ${CC-cc} accepts -g" >&5
963 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
966 echo 'void f(){}' > conftest.c
967 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
976 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
977 if test "$ac_test_CFLAGS" = set; then
978 CFLAGS="$ac_save_CFLAGS"
979 elif test $ac_cv_prog_cc_g = yes; then
986 test "${CFLAGS+set}" = set || CFLAGS="-g"
989 # Find a good install program. We prefer a C program (faster),
990 # so one script is as good as another. But avoid the broken or
991 # incompatible versions:
992 # SysV /etc/install, /usr/sbin/install
993 # SunOS /usr/etc/install
996 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
997 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
998 # ./install, which can be erroneously created by make from ./install.sh.
999 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1000 echo "configure:1001: checking for a BSD compatible install" >&5
1001 if test -z "$INSTALL"; then
1002 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1003 echo $ac_n "(cached) $ac_c" 1>&6
1005 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1006 for ac_dir in $PATH; do
1007 # Account for people who put trailing slashes in PATH elements.
1009 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1011 # OSF1 and SCO ODT 3.0 have their own names for install.
1012 for ac_prog in ginstall installbsd scoinst install; do
1013 if test -f $ac_dir/$ac_prog; then
1014 if test $ac_prog = install &&
1015 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1016 # AIX install. It has an incompatible calling convention.
1017 # OSF/1 installbsd also uses dspmsg, but is usable.
1020 ac_cv_path_install="$ac_dir/$ac_prog -c"
1031 if test "${ac_cv_path_install+set}" = set; then
1032 INSTALL="$ac_cv_path_install"
1034 # As a last resort, use the slow shell script. We don't cache a
1035 # path for INSTALL within a source directory, because that will
1036 # break other packages using the cache if that directory is
1037 # removed, or if the path is relative.
1038 INSTALL="$ac_install_sh"
1041 echo "$ac_t""$INSTALL" 1>&6
1043 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1044 # It thinks the first close brace ends the variable substitution.
1045 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1047 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1050 # Put a plausible default for CC_FOR_BUILD in Makefile.
1051 if test "x$cross_compiling" = "xno"; then
1052 CC_FOR_BUILD='$(CC)'
1062 # Extract the first word of "ranlib", so it can be a program name with args.
1063 set dummy ranlib; ac_word=$2
1064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1065 echo "configure:1066: checking for $ac_word" >&5
1066 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1067 echo $ac_n "(cached) $ac_c" 1>&6
1069 if test -n "$RANLIB"; then
1070 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1072 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1073 for ac_dir in $PATH; do
1074 test -z "$ac_dir" && ac_dir=.
1075 if test -f $ac_dir/$ac_word; then
1076 ac_cv_prog_RANLIB="ranlib"
1081 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1084 RANLIB="$ac_cv_prog_RANLIB"
1085 if test -n "$RANLIB"; then
1086 echo "$ac_t""$RANLIB" 1>&6
1088 echo "$ac_t""no" 1>&6
1092 # Check for common headers.
1093 # FIXME: Seems to me this can cause problems for i386-windows hosts.
1094 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
1095 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h
1097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1099 echo "configure:1100: checking for $ac_hdr" >&5
1100 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1101 echo $ac_n "(cached) $ac_c" 1>&6
1103 cat > conftest.$ac_ext <<EOF
1104 #line 1105 "configure"
1105 #include "confdefs.h"
1108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1109 { (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1110 ac_err=`grep -v '^ *+' conftest.out`
1111 if test -z "$ac_err"; then
1113 eval "ac_cv_header_$ac_safe=yes"
1116 echo "configure: failed program was:" >&5
1117 cat conftest.$ac_ext >&5
1119 eval "ac_cv_header_$ac_safe=no"
1123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1124 echo "$ac_t""yes" 1>&6
1125 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1126 cat >> confdefs.h <<EOF
1127 #define $ac_tr_hdr 1
1131 echo "$ac_t""no" 1>&6
1135 for ac_func in getrusage time sigaction
1137 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1138 echo "configure:1139: checking for $ac_func" >&5
1139 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1140 echo $ac_n "(cached) $ac_c" 1>&6
1142 cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145 /* System header to define __stub macros and hopefully few prototypes,
1146 which can conflict with char $ac_func(); below. */
1148 /* Override any gcc2 internal prototype to avoid an error. */
1149 /* We use char because int might match the return type of a gcc2
1150 builtin and then its argument prototype would still apply. */
1155 /* The GNU C library defines this for functions which it implements
1156 to always fail with ENOSYS. Some functions are actually named
1157 something starting with __ and the normal name is an alias. */
1158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1166 if { (eval echo configure:1167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1168 eval "ac_cv_func_$ac_func=yes"
1170 echo "configure: failed program was:" >&5
1171 cat conftest.$ac_ext >&5
1173 eval "ac_cv_func_$ac_func=no"
1178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1179 echo "$ac_t""yes" 1>&6
1180 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1181 cat >> confdefs.h <<EOF
1182 #define $ac_tr_func 1
1186 echo "$ac_t""no" 1>&6
1191 . ${srcdir}/../../bfd/configure.host
1195 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1196 if test "${enable_maintainer_mode+set}" = set; then
1197 enableval="$enable_maintainer_mode"
1198 case "${enableval}" in
1201 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
1203 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
1204 echo "Setting maintainer mode" 6>&1
1212 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
1213 if test "${enable_sim_bswap+set}" = set; then
1214 enableval="$enable_sim_bswap"
1215 case "${enableval}" in
1216 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
1217 no) sim_bswap="-DWITH_BSWAP=0";;
1218 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
1220 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
1221 echo "Setting bswap flags = $sim_bswap" 6>&1
1229 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
1230 if test "${enable_sim_cflags+set}" = set; then
1231 enableval="$enable_sim_cflags"
1232 case "${enableval}" in
1233 yes) sim_cflags="-O2";;
1234 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
1236 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1238 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
1239 echo "Setting sim cflags = $sim_cflags" 6>&1
1247 # Check whether --enable-sim-debug or --disable-sim-debug was given.
1248 if test "${enable_sim_debug+set}" = set; then
1249 enableval="$enable_sim_debug"
1250 case "${enableval}" in
1251 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
1252 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
1253 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
1255 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
1256 echo "Setting sim debug = $sim_debug" 6>&1
1264 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
1265 if test "${enable_sim_stdio+set}" = set; then
1266 enableval="$enable_sim_stdio"
1267 case "${enableval}" in
1268 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
1269 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
1270 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
1272 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
1273 echo "Setting stdio flags = $sim_stdio" 6>&1
1281 # Check whether --enable-sim-trace or --disable-sim-trace was given.
1282 if test "${enable_sim_trace+set}" = set; then
1283 enableval="$enable_sim_trace"
1284 case "${enableval}" in
1285 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
1286 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
1288 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
1291 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1292 if test x"$sim_trace" = x; then
1293 sim_trace="-DWITH_TRACE='(TRACE_$x"
1295 sim_trace="${sim_trace}|TRACE_$x"
1298 sim_trace="$sim_trace)'" ;;
1300 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
1301 echo "Setting sim trace = $sim_trace" 6>&1
1309 # Check whether --enable-sim-profile or --disable-sim-profile was given.
1310 if test "${enable_sim_profile+set}" = set; then
1311 enableval="$enable_sim_profile"
1312 case "${enableval}" in
1313 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
1314 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
1316 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
1319 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1320 if test x"$sim_profile" = x; then
1321 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
1323 sim_profile="${sim_profile}|PROFILE_$x"
1326 sim_profile="$sim_profile)'" ;;
1328 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
1329 echo "Setting sim profile = $sim_profile" 6>&1
1337 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1338 echo "configure:1339: checking return type of signal handlers" >&5
1339 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1340 echo $ac_n "(cached) $ac_c" 1>&6
1342 cat > conftest.$ac_ext <<EOF
1343 #line 1344 "configure"
1344 #include "confdefs.h"
1345 #include <sys/types.h>
1351 extern "C" void (*signal (int, void (*)(int)))(int);
1353 void (*signal ()) ();
1360 if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1362 ac_cv_type_signal=void
1364 echo "configure: failed program was:" >&5
1365 cat conftest.$ac_ext >&5
1367 ac_cv_type_signal=int
1372 echo "$ac_t""$ac_cv_type_signal" 1>&6
1373 cat >> confdefs.h <<EOF
1374 #define RETSIGTYPE $ac_cv_type_signal
1383 sim_link_links=tconfig.h
1384 if test -f ${srcdir}/tconfig.in
1386 sim_link_files=tconfig.in
1388 sim_link_files=../common/tconfig.in
1391 # targ-vals.def points to the libc macro description file.
1393 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
1395 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
1396 sim_link_links="${sim_link_links} targ-vals.def"
1401 default_sim_inline="-DDEFAULT_INLINE=0"
1402 # Check whether --enable-sim-inline or --disable-sim-inline was given.
1403 if test "${enable_sim_inline+set}" = set; then
1404 enableval="$enable_sim_inline"
1406 case "$enableval" in
1407 no) sim_inline="-DDEFAULT_INLINE=0";;
1408 0) sim_inline="-DDEFAULT_INLINE=0";;
1409 yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
1410 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
1411 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
1414 *_INLINE=*) new_flag="-D$x";;
1415 *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
1416 *_INLINE) new_flag="-D$x=ALL_INLINE";;
1417 *) new_flag="-D$x""_INLINE=ALL_INLINE";;
1419 if test x"$sim_inline" = x""; then
1420 sim_inline="$new_flag"
1422 sim_inline="$sim_inline $new_flag"
1426 if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
1427 echo "Setting inline flags = $sim_inline" 6>&1
1430 if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
1431 sim_inline="${default_sim_inline}"
1432 if test x"$silent" != x"yes"; then
1433 echo "Setting inline flags = $sim_inline" 6>&1
1440 wire_alignment="NONSTRICT_ALIGNMENT"
1441 default_alignment=""
1443 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
1444 if test "${enable_sim_alignment+set}" = set; then
1445 enableval="$enable_sim_alignment"
1446 case "${enableval}" in
1447 strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
1448 nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
1449 forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
1450 yes) if test x"$wire_alignment" != x; then
1451 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
1453 if test x"$default_alignment" != x; then
1454 sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
1456 echo "No hard-wired alignment for target $target" 1>&6
1457 sim_alignment="-DWITH_ALIGNMENT=0"
1460 no) if test x"$default_alignment" != x; then
1461 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
1463 if test x"$wire_alignment" != x; then
1464 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
1466 echo "No default alignment for target $target" 1>&6
1467 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
1470 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
1472 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
1473 echo "Setting alignment flags = $sim_alignment" 6>&1
1476 if test x"$default_alignment" != x; then
1477 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
1479 if test x"$wire_alignment" != x; then
1480 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
1488 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
1489 if test "${enable_sim_hostendian+set}" = set; then
1490 enableval="$enable_sim_hostendian"
1491 case "${enableval}" in
1492 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
1493 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
1494 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
1495 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
1497 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
1498 echo "Setting hostendian flags = $sim_hostendian" 6>&1
1502 if test "x$cross_compiling" = "xno"; then
1503 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1504 echo "configure:1505: checking whether byte ordering is bigendian" >&5
1505 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1506 echo $ac_n "(cached) $ac_c" 1>&6
1508 ac_cv_c_bigendian=unknown
1509 # See if sys/param.h defines the BYTE_ORDER macro.
1510 cat > conftest.$ac_ext <<EOF
1511 #line 1512 "configure"
1512 #include "confdefs.h"
1513 #include <sys/types.h>
1514 #include <sys/param.h>
1517 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1524 # It does; now see whether it defined to BIG_ENDIAN or not.
1525 cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1528 #include <sys/types.h>
1529 #include <sys/param.h>
1532 #if BYTE_ORDER != BIG_ENDIAN
1537 if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1539 ac_cv_c_bigendian=yes
1541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1544 ac_cv_c_bigendian=no
1548 echo "configure: failed program was:" >&5
1549 cat conftest.$ac_ext >&5
1552 if test $ac_cv_c_bigendian = unknown; then
1553 if test "$cross_compiling" = yes; then
1554 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1556 cat > conftest.$ac_ext <<EOF
1557 #line 1558 "configure"
1558 #include "confdefs.h"
1560 /* Are we little or big endian? From Harbison&Steele. */
1564 char c[sizeof (long)];
1567 exit (u.c[sizeof (long) - 1] == 1);
1570 if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1572 ac_cv_c_bigendian=no
1574 echo "configure: failed program was:" >&5
1575 cat conftest.$ac_ext >&5
1577 ac_cv_c_bigendian=yes
1585 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1586 if test $ac_cv_c_bigendian = yes; then
1587 cat >> confdefs.h <<\EOF
1588 #define WORDS_BIGENDIAN 1
1593 if test $ac_cv_c_bigendian = yes; then
1594 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
1596 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
1599 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
1604 # Check whether --enable-sim-warnings or --disable-sim-warnings was given.
1605 if test "${enable_sim_warnings+set}" = set; then
1606 enableval="$enable_sim_warnings"
1607 case "${enableval}" in
1608 yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";;
1609 no) sim_warnings="-w";;
1610 *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1612 if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
1613 echo "Setting warning flags = $sim_warnings" 6>&1
1621 # Ensure a reasonable default simulator is constructed:
1623 # start-sanitize-tx19
1624 mipstx19*-*-*) SIMCONF="-mips1 -mcpu=r1900 -mno-fp --warnings";;
1626 # start-sanitize-tx49
1627 mips64tx49*-*-*) SIMCONF="-mips3 --warnings -mcpu=r4900";;
1629 # start-sanitize-r5900
1630 mips64r59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";;
1631 # end-sanitize-r5900
1632 mips64*-*-*) SIMCONF="-mips0 --warnings";;
1633 mips16*-*-*) SIMCONF="-mips0 --warnings";;
1634 mips*-*-*) SIMCONF="-mips2 --warnings";;
1635 *) SIMCONF="-mips0 --warnings";;
1640 # start-sanitize-tx19
1641 mipstx19*-*-*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
1643 *) SIM_SUBTARGET="";;
1649 # Select the byte order of the target
1654 # start-sanitize-tx19
1655 mipstx19*-*-*) default_endian=BIG_ENDIAN ;;
1657 # start-sanitize-r5900
1658 mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;;
1659 # end-sanitize-r5900
1660 mips64*-*-*) default_endian=BIG_ENDIAN ;;
1661 mips16*-*-*) default_endian=BIG_ENDIAN ;;
1662 mips*-*-*) default_endian=BIG_ENDIAN ;;
1663 *) default_endian=BIG_ENDIAN ;;
1666 wire_endian="$mips_endian"
1667 default_endian="$default_endian"
1668 # Check whether --enable-sim-endian or --disable-sim-endian was given.
1669 if test "${enable_sim_endian+set}" = set; then
1670 enableval="$enable_sim_endian"
1671 case "${enableval}" in
1672 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
1673 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
1674 yes) if test x"$wire_endian" != x; then
1675 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
1677 if test x"$default_endian" != x; then
1678 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
1680 echo "No hard-wired endian for target $target" 1>&6
1681 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
1684 no) if test x"$default_endian" != x; then
1685 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
1687 if test x"$wire_endian" != x; then
1688 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
1690 echo "No default endian for target $target" 1>&6
1691 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
1694 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
1696 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
1697 echo "Setting endian flags = $sim_endian" 6>&1
1700 if test x"$default_endian" != x; then
1701 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
1703 if test x"$wire_endian" != x; then
1704 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
1714 # Select the bitsize of the target
1717 # start-sanitize-tx19
1718 mipstx19*-*-*) mips_bitsize=32 ; mips_msb=31 ;;
1720 # start-sanitize-r5900
1721 mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
1722 # end-sanitize-r5900
1723 mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
1724 mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
1725 mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;;
1726 *) mips_bitsize=64 ; mips_msb=63 ;;
1728 wire_bitsize="$mips_bitsize"
1729 wire_msb="$mips_msb"
1730 # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
1731 if test "${enable_sim_bitsize+set}" = set; then
1732 enableval="$enable_sim_bitsize"
1733 case "${enableval}" in
1734 64,63) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
1735 32,31) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
1736 64,0) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
1737 32,0) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
1738 32) if test x"$wire_msb" != x -a x"$wire_msb" != x0; then
1739 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
1741 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
1743 64) if test x"$wire_msb" != x -a x"$wire_msb" != x0; then
1744 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
1746 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
1748 *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_bitsize="";;
1750 if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
1751 echo "Setting bitsize flags = $sim_bitsize" 6>&1
1755 if test x"$wire_bitsize" != x; then
1756 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_bitsize"
1758 if test x"$wire_msb" != x; then
1759 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_msb"
1766 # Select the floating hardware support of the target
1768 mips_fpu=HARDWARE_FLOATING_POINT
1770 # start-sanitize-tx19
1771 mipstx19*-*-*) mips_fpu=SOFT_FLOATING_POINT ;;
1773 # start-sanitize-r5900
1774 mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
1775 # end-sanitize-r5900
1776 mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
1777 mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
1778 mips*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
1779 *) mips_fpu=HARD_FLOATING_POINT ;;
1782 default_sim_floating_point="$mips_fpu"
1783 # Check whether --enable-sim-float or --disable-sim-float was given.
1784 if test "${enable_sim_float+set}" = set; then
1785 enableval="$enable_sim_float"
1786 case "${enableval}" in
1787 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
1788 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
1789 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";;
1791 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
1792 echo "Setting float flags = $sim_float" 6>&1
1795 sim_float="-DWITH_FLOATING_POINT=${default_sim_floating_point}"
1801 # Select the IGEN architecture
1804 sim_igen_machine="-M mipsIV"
1805 sim_m16_machine="-M mips16"
1806 sim_igen_filter="32,64,f"
1810 # start-sanitize-tx19
1811 mipstx19*-*-*) sim_default_gen=M16
1812 sim_igen_machine="-M tx19"
1813 sim_m16_machine="-M tx19"
1814 sim_igen_filter="32"
1818 # start-sanitize-r5900
1819 mips64r59*-*-*) sim_default_gen=IGEN
1820 sim_igen_machine="-M r5900"
1822 # end-sanitize-r5900
1823 # start-sanitize-vr5400
1824 mips64vr54*-*-*) sim_default_gen=IGEN
1826 sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400"
1828 # end-sanitize-vr5400
1829 mips64vr5*-*-*) sim_default_gen=IGEN
1831 sim_igen_machine="-M vr5000"
1832 # start-sanitize-vr5400
1833 sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000"
1834 # end-sanitize-vr5400
1836 mips16*-*-*) sim_default_gen=M16
1838 mips32*-*-*) sim_default_gen=IGEN
1839 sim_igen_filter="32,f"
1841 *) sim_default_gen=IGEN
1844 sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine}"
1845 sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine}"
1852 # Check whether --enable-sim-igen or --disable-sim-igen was given.
1853 if test "${enable_sim_igen+set}" = set; then
1854 enableval="$enable_sim_igen"
1855 case "${enableval}" in
1856 yes) sim_gen="${sim_default_gen}";;
1859 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_gen="";;
1861 if test x"$silent" != x"yes" && test x"$sim_gen" != x""; then
1862 echo "Setting sim_igen = $sim_gen" 6>&1
1865 sim_gen="${sim_use_gen}"
1871 for ac_hdr in string.h strings.h stdlib.h stdlib.h
1873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1875 echo "configure:1876: checking for $ac_hdr" >&5
1876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1877 echo $ac_n "(cached) $ac_c" 1>&6
1879 cat > conftest.$ac_ext <<EOF
1880 #line 1881 "configure"
1881 #include "confdefs.h"
1884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1885 { (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1886 ac_err=`grep -v '^ *+' conftest.out`
1887 if test -z "$ac_err"; then
1889 eval "ac_cv_header_$ac_safe=yes"
1892 echo "configure: failed program was:" >&5
1893 cat conftest.$ac_ext >&5
1895 eval "ac_cv_header_$ac_safe=no"
1899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1900 echo "$ac_t""yes" 1>&6
1901 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1902 cat >> confdefs.h <<EOF
1903 #define $ac_tr_hdr 1
1907 echo "$ac_t""no" 1>&6
1911 echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
1912 echo "configure:1913: checking for fabs in -lm" >&5
1913 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
1914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1917 ac_save_LIBS="$LIBS"
1919 cat > conftest.$ac_ext <<EOF
1920 #line 1921 "configure"
1921 #include "confdefs.h"
1922 /* Override any gcc2 internal prototype to avoid an error. */
1923 /* We use char because int might match the return type of a gcc2
1924 builtin and then its argument prototype would still apply. */
1931 if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1933 eval "ac_cv_lib_$ac_lib_var=yes"
1935 echo "configure: failed program was:" >&5
1936 cat conftest.$ac_ext >&5
1938 eval "ac_cv_lib_$ac_lib_var=no"
1941 LIBS="$ac_save_LIBS"
1944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1945 echo "$ac_t""yes" 1>&6
1946 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1947 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1948 cat >> confdefs.h <<EOF
1949 #define $ac_tr_lib 1
1955 echo "$ac_t""no" 1>&6
1958 for ac_func in aint anint sqrt
1960 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1961 echo "configure:1962: checking for $ac_func" >&5
1962 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1965 cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968 /* System header to define __stub macros and hopefully few prototypes,
1969 which can conflict with char $ac_func(); below. */
1971 /* Override any gcc2 internal prototype to avoid an error. */
1972 /* We use char because int might match the return type of a gcc2
1973 builtin and then its argument prototype would still apply. */
1978 /* The GNU C library defines this for functions which it implements
1979 to always fail with ENOSYS. Some functions are actually named
1980 something starting with __ and the normal name is an alias. */
1981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1989 if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1991 eval "ac_cv_func_$ac_func=yes"
1993 echo "configure: failed program was:" >&5
1994 cat conftest.$ac_ext >&5
1996 eval "ac_cv_func_$ac_func=no"
2001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2002 echo "$ac_t""yes" 1>&6
2003 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2004 cat >> confdefs.h <<EOF
2005 #define $ac_tr_func 1
2009 echo "$ac_t""no" 1>&6
2017 cat > confcache <<\EOF
2018 # This file is a shell script that caches the results of configure
2019 # tests run on this system so they can be shared between configure
2020 # scripts and configure runs. It is not useful on other systems.
2021 # If it contains results you don't want to keep, you may remove or edit it.
2023 # By default, configure uses ./config.cache as the cache file,
2024 # creating it if it does not exist already. You can give configure
2025 # the --cache-file=FILE option to use a different cache file; that is
2026 # what configure does when it calls configure scripts in
2027 # subdirectories, so they share the cache.
2028 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2029 # config.status only pays attention to the cache file if you give it the
2030 # --recheck option to rerun configure.
2033 # The following way of writing the cache mishandles newlines in values,
2034 # but we know of no workaround that is simple, portable, and efficient.
2035 # So, don't put newlines in cache variables' values.
2036 # Ultrix sh set writes to stderr and can't be redirected directly,
2037 # and sets the high bit in the cache file unless we assign to the vars.
2039 case `(ac_space=' '; set) 2>&1` in
2041 # `set' does not quote correctly, so add quotes (double-quote substitution
2042 # turns \\\\ into \\, and sed turns \\ into \).
2044 -e "s/'/'\\\\''/g" \
2045 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2048 # `set' quotes correctly as required by POSIX, so do not add quotes.
2049 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2052 if cmp -s $cache_file confcache; then
2055 if test -w $cache_file; then
2056 echo "updating cache $cache_file"
2057 cat confcache > $cache_file
2059 echo "not updating unwritable cache $cache_file"
2064 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2066 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2067 # Let make expand exec_prefix.
2068 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2070 # Any assignment to VPATH causes Sun make to only execute
2071 # the first set of double-colon rules, so remove it if not needed.
2072 # If there is a colon in the path, we need to keep it.
2073 if test "x$srcdir" = x.; then
2074 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2077 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2079 DEFS=-DHAVE_CONFIG_H
2081 # Without the "./", some shells look in PATH for config.status.
2082 : ${CONFIG_STATUS=./config.status}
2084 echo creating $CONFIG_STATUS
2085 rm -f $CONFIG_STATUS
2086 cat > $CONFIG_STATUS <<EOF
2088 # Generated automatically by configure.
2089 # Run this file to recreate the current configuration.
2090 # This directory was configured as follows,
2091 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2093 # $0 $ac_configure_args
2095 # Compiler output produced by configure, useful for debugging
2096 # configure, is in ./config.log if it exists.
2098 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2101 case "\$ac_option" in
2102 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2103 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2104 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2105 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2106 echo "$CONFIG_STATUS generated by autoconf version 2.12"
2108 -help | --help | --hel | --he | --h)
2109 echo "\$ac_cs_usage"; exit 0 ;;
2110 *) echo "\$ac_cs_usage"; exit 1 ;;
2114 ac_given_srcdir=$srcdir
2115 ac_given_INSTALL="$INSTALL"
2117 trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2119 cat >> $CONFIG_STATUS <<EOF
2121 # Protect against being on the right side of a sed subst in config.status.
2122 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2123 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2126 s%@sim_environment@%$sim_environment%g
2127 s%@sim_alignment@%$sim_alignment%g
2128 s%@sim_assert@%$sim_assert%g
2129 s%@sim_bitsize@%$sim_bitsize%g
2130 s%@sim_endian@%$sim_endian%g
2131 s%@sim_hostendian@%$sim_hostendian%g
2132 s%@sim_float@%$sim_float%g
2133 s%@sim_scache@%$sim_scache%g
2134 s%@sim_default_model@%$sim_default_model%g
2135 s%@sim_hardware@%$sim_hardware%g
2136 s%@sim_inline@%$sim_inline%g
2137 s%@sim_packages@%$sim_packages%g
2138 s%@sim_regparm@%$sim_regparm%g
2139 s%@sim_reserved_bits@%$sim_reserved_bits%g
2140 s%@sim_smp@%$sim_smp%g
2141 s%@sim_stdcall@%$sim_stdcall%g
2142 s%@sim_xor_endian@%$sim_xor_endian%g
2143 s%@sim_warnings@%$sim_warnings%g
2144 s%@CFLAGS@%$CFLAGS%g
2145 s%@CPPFLAGS@%$CPPFLAGS%g
2146 s%@CXXFLAGS@%$CXXFLAGS%g
2148 s%@LDFLAGS@%$LDFLAGS%g
2150 s%@exec_prefix@%$exec_prefix%g
2151 s%@prefix@%$prefix%g
2152 s%@program_transform_name@%$program_transform_name%g
2153 s%@bindir@%$bindir%g
2154 s%@sbindir@%$sbindir%g
2155 s%@libexecdir@%$libexecdir%g
2156 s%@datadir@%$datadir%g
2157 s%@sysconfdir@%$sysconfdir%g
2158 s%@sharedstatedir@%$sharedstatedir%g
2159 s%@localstatedir@%$localstatedir%g
2160 s%@libdir@%$libdir%g
2161 s%@includedir@%$includedir%g
2162 s%@oldincludedir@%$oldincludedir%g
2163 s%@infodir@%$infodir%g
2164 s%@mandir@%$mandir%g
2166 s%@host_alias@%$host_alias%g
2167 s%@host_cpu@%$host_cpu%g
2168 s%@host_vendor@%$host_vendor%g
2169 s%@host_os@%$host_os%g
2170 s%@target@%$target%g
2171 s%@target_alias@%$target_alias%g
2172 s%@target_cpu@%$target_cpu%g
2173 s%@target_vendor@%$target_vendor%g
2174 s%@target_os@%$target_os%g
2176 s%@build_alias@%$build_alias%g
2177 s%@build_cpu@%$build_cpu%g
2178 s%@build_vendor@%$build_vendor%g
2179 s%@build_os@%$build_os%g
2181 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2182 s%@INSTALL_DATA@%$INSTALL_DATA%g
2183 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2184 s%@HDEFINES@%$HDEFINES%g
2186 s%@RANLIB@%$RANLIB%g
2189 s%@sim_bswap@%$sim_bswap%g
2190 s%@sim_cflags@%$sim_cflags%g
2191 s%@sim_debug@%$sim_debug%g
2192 s%@sim_stdio@%$sim_stdio%g
2193 s%@sim_trace@%$sim_trace%g
2194 s%@sim_profile@%$sim_profile%g
2195 s%@SIMCONF@%$SIMCONF%g
2196 s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g
2197 s%@sim_igen_flags@%$sim_igen_flags%g
2198 s%@sim_m16_flags@%$sim_m16_flags%g
2199 s%@sim_gen@%$sim_gen%g
2204 cat >> $CONFIG_STATUS <<\EOF
2206 # Split the substitutions into bite-sized pieces for seds with
2207 # small command number limits, like on Digital OSF/1 and HP-UX.
2208 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2209 ac_file=1 # Number of current file.
2210 ac_beg=1 # First line for current file.
2211 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2214 while $ac_more_lines; do
2215 if test $ac_beg -gt 1; then
2216 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2218 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2220 if test ! -s conftest.s$ac_file; then
2222 rm -f conftest.s$ac_file
2224 if test -z "$ac_sed_cmds"; then
2225 ac_sed_cmds="sed -f conftest.s$ac_file"
2227 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2229 ac_file=`expr $ac_file + 1`
2231 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2234 if test -z "$ac_sed_cmds"; then
2239 cat >> $CONFIG_STATUS <<EOF
2241 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
2243 cat >> $CONFIG_STATUS <<\EOF
2244 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2245 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2247 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2248 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2249 *) ac_file_in="${ac_file}.in" ;;
2252 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2254 # Remove last slash and all that follows it. Not all systems have dirname.
2255 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2256 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2257 # The file is in a subdirectory.
2258 test ! -d "$ac_dir" && mkdir "$ac_dir"
2259 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2260 # A "../" for each directory in $ac_dir_suffix.
2261 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2263 ac_dir_suffix= ac_dots=
2266 case "$ac_given_srcdir" in
2268 if test -z "$ac_dots"; then top_srcdir=.
2269 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2270 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2272 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2273 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2276 case "$ac_given_INSTALL" in
2277 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2278 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2281 echo creating "$ac_file"
2283 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2285 *Makefile*) ac_comsub="1i\\
2286 # $configure_input" ;;
2290 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2292 s%@configure_input@%$configure_input%g
2293 s%@srcdir@%$srcdir%g
2294 s%@top_srcdir@%$top_srcdir%g
2295 s%@INSTALL@%$INSTALL%g
2296 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2300 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2301 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2303 # ac_d sets the value in "#define NAME VALUE" lines.
2304 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2305 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2308 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2309 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2310 ac_uB='\([ ]\)%\1#\2define\3'
2313 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2314 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2315 ac_eB='$%\1#\2define\3'
2319 if test "${CONFIG_HEADERS+set}" != set; then
2321 cat >> $CONFIG_STATUS <<EOF
2322 CONFIG_HEADERS="config.h:config.in"
2324 cat >> $CONFIG_STATUS <<\EOF
2326 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2327 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2329 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2330 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2331 *) ac_file_in="${ac_file}.in" ;;
2334 echo creating $ac_file
2336 rm -f conftest.frag conftest.in conftest.out
2337 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2338 cat $ac_file_inputs > conftest.in
2342 # Transform confdefs.h into a sed script conftest.vals that substitutes
2343 # the proper values into config.h.in to produce config.h. And first:
2344 # Protect against being on the right side of a sed subst in config.status.
2345 # Protect against being in an unquoted here document in config.status.
2347 cat > conftest.hdr <<\EOF
2350 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2354 sed -n -f conftest.hdr confdefs.h > conftest.vals
2357 # This sed command replaces #undef with comments. This is necessary, for
2358 # example, in the case of _POSIX_SOURCE, which is predefined and required
2359 # on some systems where configure will not decide to define it.
2360 cat >> conftest.vals <<\EOF
2361 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2364 # Break up conftest.vals because some shells have a limit on
2365 # the size of here documents, and old seds have small limits too.
2370 ac_lines=`grep -c . conftest.vals`
2371 # grep -c gives empty output for an empty file on some AIX systems.
2372 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2373 # Write a limited-size here document to conftest.frag.
2374 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2375 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2377 sed -f conftest.frag conftest.in > conftest.out
2379 mv conftest.out conftest.in
2381 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2383 mv conftest.tail conftest.vals
2387 cat >> $CONFIG_STATUS <<\EOF
2388 rm -f conftest.frag conftest.h
2389 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2390 cat conftest.in >> conftest.h
2392 if cmp -s $ac_file conftest.h 2>/dev/null; then
2393 echo "$ac_file is unchanged"
2396 # Remove last slash and all that follows it. Not all systems have dirname.
2397 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2398 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2399 # The file is in a subdirectory.
2400 test ! -d "$ac_dir" && mkdir "$ac_dir"
2403 mv conftest.h $ac_file
2409 cat >> $CONFIG_STATUS <<EOF
2410 ac_sources="$sim_link_files"
2411 ac_dests="$sim_link_links"
2414 cat >> $CONFIG_STATUS <<\EOF
2415 srcdir=$ac_given_srcdir
2416 while test -n "$ac_sources"; do
2417 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2418 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2420 echo "linking $srcdir/$ac_source to $ac_dest"
2422 if test ! -r $srcdir/$ac_source; then
2423 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2427 # Make relative symlinks.
2428 # Remove last slash and all that follows it. Not all systems have dirname.
2429 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2430 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2431 # The dest file is in a subdirectory.
2432 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2433 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2434 # A "../" for each directory in $ac_dest_dir_suffix.
2435 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2437 ac_dest_dir_suffix= ac_dots=
2441 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2442 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2445 # Make a symlink if possible; otherwise try a hard link.
2446 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2447 ln $srcdir/$ac_source $ac_dest; then :
2449 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2453 cat >> $CONFIG_STATUS <<EOF
2456 cat >> $CONFIG_STATUS <<\EOF
2457 case "x$CONFIG_FILES" in
2459 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
2460 rm -f Makesim1.tmp Makesim2.tmp Makefile
2461 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
2462 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
2463 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
2464 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
2465 <Makefile.sim >Makefile
2466 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
2469 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
2473 chmod +x $CONFIG_STATUS
2474 rm -fr confdefs* $ac_clean_files
2475 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1