3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --with-local-prefix=DIR specifies directory to put local include"
17 --with-gxx-include-dir=DIR
18 specifies directory to put g++ header files"
20 --with-cpp-install-dir=DIR
21 install the user visible C preprocessor in DIR
22 (relative to PREFIX) as well as PREFIX/bin"
24 --with-gnu-ld arrange to work with GNU ld."
26 --with-ld arrange to use the specified ld (full pathname)"
28 --with-gnu-as arrange to work with GNU as"
30 --with-as arrange to use the specified as (full pathname)"
32 --enable-werror enable -Werror in bootstrap stage2 and later"
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,rtlflag,gc,gcac;
38 default is misc,tree,gc,rtlflag"
40 --enable-coverage[=LEVEL]
41 enable compiler\'s code coverage collection.
42 Use to measure compiler performance and locate
43 unused parts of the compiler. With LEVEL, specify
44 optimization. Values are opt, noopt,
47 --with-stabs arrange to use stabs instead of host debug format"
49 --with-elf arrange to use ELF instead of host debug format"
51 --enable-multilib enable library support for multiple ABIs"
53 --enable-__cxa_atexit enable __cxa_atexit for C++"
55 --enable-c-mbchar enable multibyte characters for C and C++"
57 --enable-threads enable thread usage for target GCC
58 --enable-threads=LIB use LIB thread package for target GCC"
60 --enable-objc-gc enable the use of Boehm's garbage collector with
61 the GNU Objective-C runtime"
63 --with-dwarf2 force the default debug format to be DWARF 2"
65 --disable-shared don't provide a shared libgcc"
67 --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
69 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
71 --enable-initfini-array use .init_array/.fini_array sections"
73 --enable-sjlj-exceptions
74 arrange to use setjmp/longjmp exception handling"
76 --enable-libunwind-exceptions force use libunwind for exceptions"
78 --enable-nls use Native Language Support (default)"
80 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
82 --disable-nls do not use Native Language Support"
84 --with-included-gettext use the GNU gettext library included here"
86 --disable-win32-registry
87 disable lookup of installation paths in the
88 Registry on Windows hosts
89 --enable-win32-registry enable registry lookup (default)
90 --enable-win32-registry=KEY
91 use KEY instead of GCC version as the last portion
94 --with-gc={simple,page} choose the garbage collection mechanism to use
97 --with-system-zlib use installed libz"
99 --enable-maintainer-mode
100 enable make rules and dependencies not useful
101 (and sometimes confusing) to the casual installer"
103 --enable-version-specific-runtime-libs
104 specify that runtime libraries should be
105 installed in a compiler-specific directory"
107 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
109 # Initialize some variables set by options.
110 # The variables have the same names as the options, with
111 # dashes changed to underlines.
113 cache_file=./config.cache
122 program_transform_name=s,x,x,
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
143 # Initialize some other variables.
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
154 # If the previous option needs an argument, assign it.
155 if test -n "$ac_prev"; then
156 eval "$ac_prev=\$ac_option"
162 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
166 # Accept the important Cygnus configure options, so we can diagnose typos.
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173 bindir="$ac_optarg" ;;
175 -build | --build | --buil | --bui | --bu)
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build="$ac_optarg" ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file="$ac_optarg" ;;
187 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
189 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
191 datadir="$ac_optarg" ;;
193 -disable-* | --disable-*)
194 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195 # Reject names that are not valid shell variable names.
196 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200 eval "enable_${ac_feature}=no" ;;
202 -enable-* | --enable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
213 eval "enable_${ac_feature}='$ac_optarg'" ;;
215 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217 | --exec | --exe | --ex)
218 ac_prev=exec_prefix ;;
219 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221 | --exec=* | --exe=* | --ex=*)
222 exec_prefix="$ac_optarg" ;;
224 -gas | --gas | --ga | --g)
225 # Obsolete; use --with-gas.
228 -help | --help | --hel | --he)
229 # Omit some internal or obsolete options to make the list less imposing.
230 # This message is too long to be a string in the A/UX 3.1 sh.
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
235 --cache-file=FILE cache test results in FILE
236 --help print this message
237 --no-create do not create output files
238 --quiet, --silent do not print \`checking...' messages
239 --version print the version of autoconf that created configure
240 Directory and file names:
241 --prefix=PREFIX install architecture-independent files in PREFIX
243 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
245 --bindir=DIR user executables in DIR [EPREFIX/bin]
246 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
247 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
248 --datadir=DIR read-only architecture-independent data in DIR
250 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
251 --sharedstatedir=DIR modifiable architecture-independent data in DIR
253 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
254 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
255 --includedir=DIR C header files in DIR [PREFIX/include]
256 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
257 --infodir=DIR info documentation in DIR [PREFIX/info]
258 --mandir=DIR man documentation in DIR [PREFIX/man]
259 --srcdir=DIR find the sources in DIR [configure dir or ..]
260 --program-prefix=PREFIX prepend PREFIX to installed program names
261 --program-suffix=SUFFIX append SUFFIX to installed program names
262 --program-transform-name=PROGRAM
263 run sed PROGRAM on installed program names
267 --build=BUILD configure for building on BUILD [BUILD=HOST]
268 --host=HOST configure for HOST [guessed]
269 --target=TARGET configure for TARGET [TARGET=HOST]
270 Features and packages:
271 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
272 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
273 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
274 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
275 --x-includes=DIR X include files are in DIR
276 --x-libraries=DIR X library files are in DIR
278 if test -n "$ac_help"; then
279 echo "--enable and --with options recognized:$ac_help"
283 -host | --host | --hos | --ho)
285 -host=* | --host=* | --hos=* | --ho=*)
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir="$ac_optarg" ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir="$ac_optarg" ;;
300 -libdir | --libdir | --libdi | --libd)
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir="$ac_optarg" ;;
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir="$ac_optarg" ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir="$ac_optarg" ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir="$ac_optarg" ;;
327 # Obsolete; use --without-fp.
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir="$ac_optarg" ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix="$ac_optarg" ;;
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix="$ac_optarg" ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix="$ac_optarg" ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name="$ac_optarg" ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391 sbindir="$ac_optarg" ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402 sharedstatedir="$ac_optarg" ;;
404 -site | --site | --sit)
406 -site=* | --site=* | --sit=*)
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir="$ac_optarg" ;;
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir="$ac_optarg" ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target="$ac_optarg" ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
429 -version | --version | --versio | --versi | --vers)
430 echo "configure generated by autoconf version 2.13"
434 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
435 # Reject names that are not valid shell variable names.
436 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
437 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439 ac_package=`echo $ac_package| sed 's/-/_/g'`
444 eval "with_${ac_package}='$ac_optarg'" ;;
446 -without-* | --without-*)
447 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
448 # Reject names that are not valid shell variable names.
449 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
450 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452 ac_package=`echo $ac_package| sed 's/-/_/g'`
453 eval "with_${ac_package}=no" ;;
456 # Obsolete; use --with-x.
459 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
460 | --x-incl | --x-inc | --x-in | --x-i)
461 ac_prev=x_includes ;;
462 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
463 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
464 x_includes="$ac_optarg" ;;
466 -x-libraries | --x-libraries | --x-librarie | --x-librari \
467 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
468 ac_prev=x_libraries ;;
469 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
470 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
471 x_libraries="$ac_optarg" ;;
473 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
477 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
478 echo "configure: warning: $ac_option: invalid host type" 1>&2
480 if test "x$nonopt" != xNONE; then
481 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
489 if test -n "$ac_prev"; then
490 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
493 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495 # File descriptor usage:
498 # 2 errors and warnings
499 # 3 some systems may open it to /dev/tty
500 # 4 used on the Kubota Titan
501 # 6 checking for... messages and results
502 # 5 compiler messages saved in config.log
503 if test "$silent" = yes; then
511 This file contains any messages produced by compilers while
512 running configure, to aid debugging if configure makes a mistake.
515 # Strip out --no-create and --no-recursion so they do not pile up.
516 # Also quote any args containing shell metacharacters.
521 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
522 | --no-cr | --no-c) ;;
523 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
524 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
525 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
526 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
527 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
532 # Only set these to C if already set. These must not be set unconditionally
533 # because not all systems understand e.g. LANG=C (notably SCO).
534 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
535 # Non-C LC_CTYPE values break the ctype check.
536 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
537 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
538 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
539 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
541 # confdefs.h avoids OS command line length limits that DEFS can exceed.
542 rm -rf conftest* confdefs.h
543 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
546 # A filename unique to this package, relative to the directory that
547 # configure is in, which we can look for to find out if srcdir is correct.
548 ac_unique_file=tree.c
550 # Find the source files, if location was not specified.
551 if test -z "$srcdir"; then
552 ac_srcdir_defaulted=yes
553 # Try the directory containing this script, then its parent.
555 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
556 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
558 if test ! -r $srcdir/$ac_unique_file; then
562 ac_srcdir_defaulted=no
564 if test ! -r $srcdir/$ac_unique_file; then
565 if test "$ac_srcdir_defaulted" = yes; then
566 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
568 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
571 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573 # Prefer explicitly selected file to automatically selected ones.
574 if test -z "$CONFIG_SITE"; then
575 if test "x$prefix" != xNONE; then
576 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
578 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
581 for ac_site_file in $CONFIG_SITE; do
582 if test -r "$ac_site_file"; then
583 echo "loading site script $ac_site_file"
588 if test -r "$cache_file"; then
589 echo "loading cache $cache_file"
592 echo "creating cache $cache_file"
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614 ac_n= ac_c='\c' ac_t=
620 # Determine the host, build, and target systems
622 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
623 if test -f $ac_dir/install-sh; then
625 ac_install_sh="$ac_aux_dir/install-sh -c"
627 elif test -f $ac_dir/install.sh; then
629 ac_install_sh="$ac_aux_dir/install.sh -c"
633 if test -z "$ac_aux_dir"; then
634 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
636 ac_config_guess=$ac_aux_dir/config.guess
637 ac_config_sub=$ac_aux_dir/config.sub
638 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641 # Do some error checking and defaulting for the host and target type.
643 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
646 # 1. You are not allowed to specify --host, --target, and nonopt at the
648 # 2. Host defaults to nonopt.
649 # 3. If nonopt is not specified, then host defaults to the current host,
650 # as determined by config.guess.
651 # 4. Target and build default to nonopt.
652 # 5. If nonopt is not specified, then target and build default to host.
654 # The aliases save the names the user supplied, while $host etc.
655 # will get canonicalized.
656 case $host---$target---$nonopt in
657 NONE---*---* | *---NONE---* | *---*---NONE) ;;
658 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
662 # Make sure we can run config.sub.
663 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
664 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
667 echo $ac_n "checking host system type""... $ac_c" 1>&6
668 echo "configure:669: checking host system type" >&5
671 case "$host_alias" in
675 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
676 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
678 *) host_alias=$nonopt ;;
682 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
683 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686 echo "$ac_t""$host" 1>&6
688 echo $ac_n "checking target system type""... $ac_c" 1>&6
689 echo "configure:690: checking target system type" >&5
692 case "$target_alias" in
695 NONE) target_alias=$host_alias ;;
696 *) target_alias=$nonopt ;;
700 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
701 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704 echo "$ac_t""$target" 1>&6
706 echo $ac_n "checking build system type""... $ac_c" 1>&6
707 echo "configure:708: checking build system type" >&5
710 case "$build_alias" in
713 NONE) build_alias=$host_alias ;;
714 *) build_alias=$nonopt ;;
718 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
719 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 echo "$ac_t""$build" 1>&6
724 test "$host_alias" != "$target_alias" &&
725 test "$program_prefix$program_suffix$program_transform_name" = \
727 program_prefix=${target_alias}-
730 # Define variables host_canonical and build_canonical
731 build_canonical=${build}
732 host_canonical=${host}
737 if test "${host}" != "${target}" ; then
738 target_subdir=${target_alias}/
742 # Set program_transform_name
743 if test "$program_transform_name" = s,x,x,; then
744 program_transform_name=
746 # Double any \ or $. echo might interpret backslashes.
747 cat <<\EOF_SED > conftestsed
748 s,\\,\\\\,g; s,\$,$$,g
750 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
753 test "$program_prefix" != NONE &&
754 program_transform_name="s,^,${program_prefix},; $program_transform_name"
755 # Use a double $ so make ignores it.
756 test "$program_suffix" != NONE &&
757 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
759 # sed with no file args requires a program.
760 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
763 # Check for bogus environment variables.
764 # Test if LIBRARY_PATH contains the notation for the current directory
765 # since this would lead to problems installing/building glibc.
766 # LIBRARY_PATH contains the current directory if one of the following
768 # - one of the terminals (":" and ";") is the first or last sign
769 # - two terminals occur directly after each other
770 # - the path contains an element with a dot in it
771 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
772 echo "configure:773: checking LIBRARY_PATH variable" >&5
773 case ${LIBRARY_PATH} in
774 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
775 library_path_setting="contains current directory"
778 library_path_setting="ok"
781 echo "$ac_t""$library_path_setting" 1>&6
782 if test "$library_path_setting" != "ok"; then
783 { echo "configure: error:
784 *** LIBRARY_PATH shouldn't contain the current directory when
785 *** building gcc. Please change the environment variable
786 *** and run configure again." 1>&2; exit 1; }
789 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
790 # since this would lead to problems installing/building glibc.
791 # GCC_EXEC_PREFIX contains the current directory if one of the following
793 # - one of the terminals (":" and ";") is the first or last sign
794 # - two terminals occur directly after each other
795 # - the path contains an element with a dot in it
796 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
797 echo "configure:798: checking GCC_EXEC_PREFIX variable" >&5
798 case ${GCC_EXEC_PREFIX} in
799 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
800 gcc_exec_prefix_setting="contains current directory"
803 gcc_exec_prefix_setting="ok"
806 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
807 if test "$gcc_exec_prefix_setting" != "ok"; then
808 { echo "configure: error:
809 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
810 *** building gcc. Please change the environment variable
811 *** and run configure again." 1>&2; exit 1; }
818 # Specify the local prefix
820 # Check whether --with-local-prefix or --without-local-prefix was given.
821 if test "${with_local_prefix+set}" = set; then
822 withval="$with_local_prefix"
824 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
826 *) local_prefix=$with_local_prefix ;;
831 # Default local prefix if it is empty
832 if test x$local_prefix = x; then
833 local_prefix=/usr/local
836 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
837 # passed in by the toplevel make and thus we'd get different behavior
838 # depending on where we built the sources.
840 # Specify the g++ header file directory
841 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
842 if test "${with_gxx_include_dir+set}" = set; then
843 withval="$with_gxx_include_dir"
845 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
847 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
852 if test x${gcc_gxx_include_dir} = x; then
853 if test x${enable_version_specific_runtime_libs} = xyes; then
854 gcc_gxx_include_dir='${libsubdir}/include/c++'
856 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
857 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
861 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
862 if test "${with_cpp_install_dir+set}" = set; then
863 withval="$with_cpp_install_dir"
864 if test x$withval = xyes; then
865 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
866 elif test x$withval != xno; then
867 cpp_install_dir=$withval
872 # -------------------
873 # Find default linker
874 # -------------------
877 # Check whether --with-gnu-ld or --without-gnu-ld was given.
878 if test "${with_gnu_ld+set}" = set; then
879 withval="$with_gnu_ld"
880 gnu_ld_flag="$with_gnu_ld"
886 # With pre-defined ld
887 # Check whether --with-ld or --without-ld was given.
888 if test "${with_ld+set}" = set; then
890 DEFAULT_LINKER="$with_ld"
893 if test x"${DEFAULT_LINKER+set}" = x"set"; then
894 if test ! -x "$DEFAULT_LINKER"; then
895 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
896 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
899 cat >> confdefs.h <<EOF
900 #define DEFAULT_LINKER "$DEFAULT_LINKER"
905 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
906 echo "configure:907: checking whether a default linker was specified" >&5
907 if test x"${DEFAULT_LINKER+set}" = x"set"; then
908 if test x"$gnu_ld_flag" = x"no"; then
909 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
911 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
914 echo "$ac_t""no" 1>&6
917 # ----------------------
918 # Find default assembler
919 # ----------------------
922 # Check whether --with-gnu-as or --without-gnu-as was given.
923 if test "${with_gnu_as+set}" = set; then
924 withval="$with_gnu_as"
925 gas_flag="$with_gnu_as"
931 # Check whether --with-as or --without-as was given.
932 if test "${with_as+set}" = set; then
934 DEFAULT_ASSEMBLER="$with_as"
937 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
938 if test ! -x "$DEFAULT_ASSEMBLER"; then
939 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
940 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
943 cat >> confdefs.h <<EOF
944 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
949 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
950 echo "configure:951: checking whether a default assembler was specified" >&5
951 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
952 if test x"$gas_flag" = x"no"; then
953 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
955 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
958 echo "$ac_t""no" 1>&6
965 # Find the native compiler
966 # Extract the first word of "gcc", so it can be a program name with args.
967 set dummy gcc; ac_word=$2
968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
969 echo "configure:970: checking for $ac_word" >&5
970 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
971 echo $ac_n "(cached) $ac_c" 1>&6
973 if test -n "$CC"; then
974 ac_cv_prog_CC="$CC" # Let the user override the test.
976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
978 for ac_dir in $ac_dummy; do
979 test -z "$ac_dir" && ac_dir=.
980 if test -f $ac_dir/$ac_word; then
989 if test -n "$CC"; then
990 echo "$ac_t""$CC" 1>&6
992 echo "$ac_t""no" 1>&6
995 if test -z "$CC"; then
996 # Extract the first word of "cc", so it can be a program name with args.
997 set dummy cc; ac_word=$2
998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
999 echo "configure:1000: checking for $ac_word" >&5
1000 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1001 echo $ac_n "(cached) $ac_c" 1>&6
1003 if test -n "$CC"; then
1004 ac_cv_prog_CC="$CC" # Let the user override the test.
1006 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1009 for ac_dir in $ac_dummy; do
1010 test -z "$ac_dir" && ac_dir=.
1011 if test -f $ac_dir/$ac_word; then
1012 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1013 ac_prog_rejected=yes
1021 if test $ac_prog_rejected = yes; then
1022 # We found a bogon in the path, so make sure we never use it.
1023 set dummy $ac_cv_prog_CC
1025 if test $# -gt 0; then
1026 # We chose a different compiler from the bogus one.
1027 # However, it has the same basename, so the bogon will be chosen
1028 # first if we set CC to just the basename; use the full file name.
1030 set dummy "$ac_dir/$ac_word" "$@"
1038 if test -n "$CC"; then
1039 echo "$ac_t""$CC" 1>&6
1041 echo "$ac_t""no" 1>&6
1044 if test -z "$CC"; then
1045 case "`uname -s`" in
1047 # Extract the first word of "cl", so it can be a program name with args.
1048 set dummy cl; ac_word=$2
1049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1050 echo "configure:1051: checking for $ac_word" >&5
1051 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1052 echo $ac_n "(cached) $ac_c" 1>&6
1054 if test -n "$CC"; then
1055 ac_cv_prog_CC="$CC" # Let the user override the test.
1057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1059 for ac_dir in $ac_dummy; do
1060 test -z "$ac_dir" && ac_dir=.
1061 if test -f $ac_dir/$ac_word; then
1070 if test -n "$CC"; then
1071 echo "$ac_t""$CC" 1>&6
1073 echo "$ac_t""no" 1>&6
1078 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1081 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1082 echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1085 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1088 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1089 cross_compiling=$ac_cv_prog_cc_cross
1091 cat > conftest.$ac_ext << EOF
1093 #line 1094 "configure"
1094 #include "confdefs.h"
1098 if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1099 ac_cv_prog_cc_works=yes
1100 # If we can't run a trivial program, we are probably using a cross compiler.
1101 if (./conftest; exit) 2>/dev/null; then
1102 ac_cv_prog_cc_cross=no
1104 ac_cv_prog_cc_cross=yes
1107 echo "configure: failed program was:" >&5
1108 cat conftest.$ac_ext >&5
1109 ac_cv_prog_cc_works=no
1113 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1114 ac_cpp='$CPP $CPPFLAGS'
1115 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1116 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1117 cross_compiling=$ac_cv_prog_cc_cross
1119 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1120 if test $ac_cv_prog_cc_works = no; then
1121 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1123 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1124 echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1125 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1126 cross_compiling=$ac_cv_prog_cc_cross
1128 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1129 echo "configure:1130: checking whether we are using GNU C" >&5
1130 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1131 echo $ac_n "(cached) $ac_c" 1>&6
1133 cat > conftest.c <<EOF
1138 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1145 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1147 if test $ac_cv_prog_gcc = yes; then
1153 ac_test_CFLAGS="${CFLAGS+set}"
1154 ac_save_CFLAGS="$CFLAGS"
1156 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1157 echo "configure:1158: checking whether ${CC-cc} accepts -g" >&5
1158 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1159 echo $ac_n "(cached) $ac_c" 1>&6
1161 echo 'void f(){}' > conftest.c
1162 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1171 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1172 if test "$ac_test_CFLAGS" = set; then
1173 CFLAGS="$ac_save_CFLAGS"
1174 elif test $ac_cv_prog_cc_g = yes; then
1175 if test "$GCC" = yes; then
1181 if test "$GCC" = yes; then
1188 if test "x$CC" != xcc; then
1189 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether $CC and cc understand -c and -o together" >&5
1192 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether cc understands -c and -o together" >&5
1195 set dummy $CC; ac_cc="`echo $2 |
1196 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1197 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1200 echo 'foo(){}' > conftest.c
1201 # Make sure it works both with $CC and with simple cc.
1202 # We do the test twice because some compilers refuse to overwrite an
1203 # existing .o file with -o, though they will create one.
1204 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1205 if { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1206 test -f conftest.o && { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1208 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1209 if test "x$CC" != xcc; then
1210 # Test first that cc exists at all.
1211 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1212 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1213 if { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1214 test -f conftest.o && { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1219 # cc exists but doesn't like -o.
1220 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1225 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1230 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1231 echo "$ac_t""yes" 1>&6
1233 echo "$ac_t""no" 1>&6
1234 cat >> confdefs.h <<\EOF
1235 #define NO_MINUS_C_MINUS_O 1
1240 # autoconf is lame and doesn't give us any substitution variable for this.
1241 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1242 NO_MINUS_C_MINUS_O=yes
1244 OUTPUT_OPTION='-o $@'
1249 # -------------------------
1250 # Check C compiler features
1251 # -------------------------
1253 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1254 echo "configure:1255: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1258 save_CFLAGS="$CFLAGS"
1259 CFLAGS="-Wno-long-long"
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1268 if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1270 ac_cv_prog_cc_no_long_long=yes
1272 echo "configure: failed program was:" >&5
1273 cat conftest.$ac_ext >&5
1275 ac_cv_prog_cc_no_long_long=no
1278 CFLAGS="$save_CFLAGS"
1281 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1283 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1284 echo "configure:1285: checking how to run the C preprocessor" >&5
1285 # On Suns, sometimes $CPP names a directory.
1286 if test -n "$CPP" && test -d "$CPP"; then
1289 if test -z "$CPP"; then
1290 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1291 echo $ac_n "(cached) $ac_c" 1>&6
1293 # This must be in double quotes, not single quotes, because CPP may get
1294 # substituted into the Makefile and "${CC-cc}" will confuse make.
1296 # On the NeXT, cc -E runs the code through the compiler's parser,
1297 # not just through cpp.
1298 cat > conftest.$ac_ext <<EOF
1299 #line 1300 "configure"
1300 #include "confdefs.h"
1304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1305 { (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1307 if test -z "$ac_err"; then
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1314 CPP="${CC-cc} -E -traditional-cpp"
1315 cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1322 { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1324 if test -z "$ac_err"; then
1328 echo "configure: failed program was:" >&5
1329 cat conftest.$ac_ext >&5
1331 CPP="${CC-cc} -nologo -E"
1332 cat > conftest.$ac_ext <<EOF
1333 #line 1334 "configure"
1334 #include "confdefs.h"
1338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1339 { (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1341 if test -z "$ac_err"; then
1345 echo "configure: failed program was:" >&5
1346 cat conftest.$ac_ext >&5
1355 ac_cv_prog_CPP="$CPP"
1357 CPP="$ac_cv_prog_CPP"
1359 ac_cv_prog_CPP="$CPP"
1361 echo "$ac_t""$CPP" 1>&6
1363 echo $ac_n "checking for inline""... $ac_c" 1>&6
1364 echo "configure:1365: checking for inline" >&5
1365 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1369 for ac_kw in inline __inline__ __inline; do
1370 cat > conftest.$ac_ext <<EOF
1371 #line 1372 "configure"
1372 #include "confdefs.h"
1378 if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1380 ac_cv_c_inline=$ac_kw; break
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1390 echo "$ac_t""$ac_cv_c_inline" 1>&6
1391 case "$ac_cv_c_inline" in
1393 no) cat >> confdefs.h <<\EOF
1397 *) cat >> confdefs.h <<EOF
1398 #define inline $ac_cv_c_inline
1403 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1404 echo "configure:1405: checking for volatile" >&5
1405 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1408 cat > conftest.$ac_ext <<EOF
1409 #line 1410 "configure"
1410 #include "confdefs.h"
1416 if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1418 gcc_cv_c_volatile=yes
1420 echo "configure: failed program was:" >&5
1421 cat conftest.$ac_ext >&5
1423 gcc_cv_c_volatile=no
1428 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1429 if test $gcc_cv_c_volatile = yes ; then
1430 cat >> confdefs.h <<\EOF
1431 #define HAVE_VOLATILE 1
1437 echo $ac_n "checking for long double""... $ac_c" 1>&6
1438 echo "configure:1439: checking for long double" >&5
1439 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
1442 if test "$GCC" = yes; then
1443 gcc_cv_c_long_double=yes
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1450 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1451 long double foo = 0.0;
1452 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1453 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1456 if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1458 gcc_cv_c_long_double=yes
1460 echo "configure: failed program was:" >&5
1461 cat conftest.$ac_ext >&5
1463 gcc_cv_c_long_double=no
1469 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1470 if test $gcc_cv_c_long_double = yes; then
1471 cat >> confdefs.h <<\EOF
1472 #define HAVE_LONG_DOUBLE 1
1477 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1478 echo "configure:1479: checking for long long int" >&5
1479 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1482 cat > conftest.$ac_ext <<EOF
1483 #line 1484 "configure"
1484 #include "confdefs.h"
1490 if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1492 ac_cv_c_long_long=yes
1494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
1497 ac_cv_c_long_long=no
1502 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1503 if test $ac_cv_c_long_long = yes; then
1504 cat >> confdefs.h <<\EOF
1505 #define HAVE_LONG_LONG 1
1509 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1510 echo "configure:1511: checking for __int64" >&5
1511 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1512 echo $ac_n "(cached) $ac_c" 1>&6
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1526 echo "configure: failed program was:" >&5
1527 cat conftest.$ac_ext >&5
1534 echo "$ac_t""$ac_cv_c___int64" 1>&6
1535 if test $ac_cv_c___int64 = yes; then
1536 cat >> confdefs.h <<\EOF
1537 #define HAVE___INT64 1
1542 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1543 echo "configure:1544: checking for built-in _Bool" >&5
1544 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1555 if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1559 echo "configure: failed program was:" >&5
1560 cat conftest.$ac_ext >&5
1568 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1569 if test $gcc_cv_c__bool = yes; then
1570 cat >> confdefs.h <<\EOF
1571 #define HAVE__BOOL 1
1577 # sizeof(char) is 1 by definition.
1578 echo $ac_n "checking size of short""... $ac_c" 1>&6
1579 echo "configure:1580: checking size of short" >&5
1580 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1581 echo $ac_n "(cached) $ac_c" 1>&6
1583 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1584 cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587 #include "confdefs.h"
1588 #include <sys/types.h>
1592 switch (0) case 0: case (sizeof (short) == $ac_size):;
1595 if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597 ac_cv_sizeof_short=$ac_size
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1603 if test x$ac_cv_sizeof_short != x ; then break; fi
1608 if test x$ac_cv_sizeof_short = x ; then
1609 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1611 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1612 cat >> confdefs.h <<EOF
1613 #define SIZEOF_SHORT $ac_cv_sizeof_short
1617 echo $ac_n "checking size of int""... $ac_c" 1>&6
1618 echo "configure:1619: checking size of int" >&5
1619 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1620 echo $ac_n "(cached) $ac_c" 1>&6
1622 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1625 "configure"
1625 #include "confdefs.h"
1626 #include "confdefs.h"
1627 #include <sys/types.h>
1631 switch (0) case 0: case (sizeof (int) == $ac_size):;
1634 if { (eval echo configure:1635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1636 ac_cv_sizeof_int=$ac_size
1638 echo "configure: failed program was:" >&5
1639 cat conftest.$ac_ext >&5
1642 if test x$ac_cv_sizeof_int != x ; then break; fi
1647 if test x$ac_cv_sizeof_int = x ; then
1648 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1650 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1651 cat >> confdefs.h <<EOF
1652 #define SIZEOF_INT $ac_cv_sizeof_int
1656 echo $ac_n "checking size of long""... $ac_c" 1>&6
1657 echo "configure:1658: checking size of long" >&5
1658 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
1661 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 #include "confdefs.h"
1666 #include <sys/types.h>
1670 switch (0) case 0: case (sizeof (long) == $ac_size):;
1673 if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1675 ac_cv_sizeof_long=$ac_size
1677 echo "configure: failed program was:" >&5
1678 cat conftest.$ac_ext >&5
1681 if test x$ac_cv_sizeof_long != x ; then break; fi
1686 if test x$ac_cv_sizeof_long = x ; then
1687 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1689 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1690 cat >> confdefs.h <<EOF
1691 #define SIZEOF_LONG $ac_cv_sizeof_long
1695 if test $ac_cv_c_long_long = yes; then
1696 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1697 echo "configure:1698: checking size of long long" >&5
1698 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1701 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1702 cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include "confdefs.h"
1706 #include <sys/types.h>
1710 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1713 if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1715 ac_cv_sizeof_long_long=$ac_size
1717 echo "configure: failed program was:" >&5
1718 cat conftest.$ac_ext >&5
1721 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1726 if test x$ac_cv_sizeof_long_long = x ; then
1727 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1729 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1730 cat >> confdefs.h <<EOF
1731 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1736 if test $ac_cv_c___int64 = yes; then
1737 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1738 echo "configure:1739: checking size of __int64" >&5
1739 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1740 echo $ac_n "(cached) $ac_c" 1>&6
1742 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1743 cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 #include "confdefs.h"
1747 #include <sys/types.h>
1751 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1754 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1756 ac_cv_sizeof___int64=$ac_size
1758 echo "configure: failed program was:" >&5
1759 cat conftest.$ac_ext >&5
1762 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1767 if test x$ac_cv_sizeof___int64 = x ; then
1768 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1770 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1771 cat >> confdefs.h <<EOF
1772 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1778 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1779 echo "configure:1780: checking execution character set" >&5
1780 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1781 echo $ac_n "(cached) $ac_c" 1>&6
1783 cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1787 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1792 egrep "ASCII" >/dev/null 2>&1; then
1794 ac_cv_c_charset=ASCII
1798 if test x${ac_cv_c_charset+set} != xset; then
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1803 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1808 egrep "EBCDIC" >/dev/null 2>&1; then
1810 ac_cv_c_charset=EBCDIC
1815 if test x${ac_cv_c_charset+set} != xset; then
1816 ac_cv_c_charset=unknown
1820 echo "$ac_t""$ac_cv_c_charset" 1>&6
1821 if test $ac_cv_c_charset = unknown; then
1822 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1823 elif test $ac_cv_c_charset = EBCDIC; then
1824 cat >> confdefs.h <<\EOF
1825 #define HOST_EBCDIC 1
1834 # See if GNAT has been installed
1835 if test $host != $build; then
1836 ac_tool_prefix=${host_alias}-
1842 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1843 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1845 echo "configure:1846: checking for $ac_word" >&5
1846 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1847 echo $ac_n "(cached) $ac_c" 1>&6
1849 if test -n "$GNATBIND"; then
1850 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1852 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1854 for ac_dir in $ac_dummy; do
1855 test -z "$ac_dir" && ac_dir=.
1856 if test -f $ac_dir/$ac_word; then
1857 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1864 GNATBIND="$ac_cv_prog_GNATBIND"
1865 if test -n "$GNATBIND"; then
1866 echo "$ac_t""$GNATBIND" 1>&6
1868 echo "$ac_t""no" 1>&6
1872 if test -z "$ac_cv_prog_GNATBIND"; then
1873 if test -n "$ac_tool_prefix"; then
1874 # Extract the first word of "gnatbind", so it can be a program name with args.
1875 set dummy gnatbind; ac_word=$2
1876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1877 echo "configure:1878: checking for $ac_word" >&5
1878 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1881 if test -n "$GNATBIND"; then
1882 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1886 for ac_dir in $ac_dummy; do
1887 test -z "$ac_dir" && ac_dir=.
1888 if test -f $ac_dir/$ac_word; then
1889 ac_cv_prog_GNATBIND="gnatbind"
1894 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1897 GNATBIND="$ac_cv_prog_GNATBIND"
1898 if test -n "$GNATBIND"; then
1899 echo "$ac_t""$GNATBIND" 1>&6
1901 echo "$ac_t""no" 1>&6
1909 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1910 echo "configure:1911: checking for compiler driver that understands Ada" >&5
1911 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1912 echo $ac_n "(cached) $ac_c" 1>&6
1914 cat >conftest.adb <<EOF
1915 procedure conftest is begin null; end conftest;
1918 # Have to do ac_tool_prefix and user overrides by hand.
1919 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1920 ${ac_tool_prefix}gcc gcc \
1921 ${ac_tool_prefix}cc cc \
1922 ${ac_tool_prefix}gnatgcc gnatgcc \
1923 ${ac_tool_prefix}gnatcc gnatcc \
1924 ${ac_tool_prefix}adagcc adagcc \
1925 ${ac_tool_prefix}adacc adacc ; do
1926 # There is a bug in all released versions of GCC which causes the
1927 # driver to exit successfully when the appropriate language module
1928 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1929 # Therefore we must check for the error message as well as an
1930 # unsuccessful exit.
1931 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1932 if test x"$errors" = x; then
1933 gcc_cv_prog_adac=$cand
1940 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1941 ADAC=$gcc_cv_prog_adac
1944 if test x$GNATBIND != xno && test x$ADAC != xno; then
1951 if test x$have_gnat != xno ; then
1952 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1953 echo "configure:1954: checking whether ${ADAC} accepts -Wno-long-long" >&5
1954 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1955 echo $ac_n "(cached) $ac_c" 1>&6
1957 cat >conftest.adb <<EOF
1958 procedure conftest is begin null; end conftest;
1960 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1961 ac_cv_prog_adac_no_long_long=yes
1963 ac_cv_prog_adac_no_long_long=no
1968 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1970 ac_cv_prog_adac_no_long_long=yes
1973 # ---------------------
1974 # Warnings and checking
1975 # ---------------------
1978 if test $ac_cv_prog_cc_no_long_long = yes && \
1979 test $ac_cv_prog_adac_no_long_long = yes ; then
1980 strict1_warn="-pedantic -Wno-long-long"
1984 # If the native compiler is GCC, we can enable warnings even in stage1.
1985 # That's useful for people building cross-compilers, or just running a
1988 if test "x$GCC" = "xyes"; then
1989 warn_cflags='$(GCC_WARN_CFLAGS)'
1993 # Enable -Werror in bootstrap stage2 and later.
1994 # Change the default to "no" on release branches.
1995 # Check whether --enable-werror or --disable-werror was given.
1996 if test "${enable_werror+set}" = set; then
1997 enableval="$enable_werror"
2003 if test x$enable_werror = xyes ; then
2008 # Enable expensive internal checks
2009 # Check whether --enable-checking or --disable-checking was given.
2010 if test "${enable_checking+set}" = set; then
2011 enableval="$enable_checking"
2015 ac_rtlflag_checking=
2017 ac_gc_always_collect=
2018 case "${enableval}" in
2019 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
2020 ac_rtlflag_checking=1 ;;
2022 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2023 set fnord $enableval; shift
2028 misc) ac_checking=1 ;;
2029 tree) ac_tree_checking=1 ;;
2030 rtlflag) ac_rtlflag_checking=1 ;;
2031 rtl) ac_rtl_checking=1 ;;
2032 gc) ac_gc_checking=1 ;;
2033 gcac) ac_gc_always_collect=1 ;;
2034 valgrind) ac_checking_valgrind=1 ;;
2035 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
2042 # Enable some checks by default for development versions of GCC
2043 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
2047 if test x$ac_checking != x ; then
2048 cat >> confdefs.h <<\EOF
2049 #define ENABLE_CHECKING 1
2052 nocommon_flag=-fno-common
2055 if test x$ac_tree_checking != x ; then
2056 cat >> confdefs.h <<\EOF
2057 #define ENABLE_TREE_CHECKING 1
2061 if test x$ac_rtl_checking != x ; then
2062 cat >> confdefs.h <<\EOF
2063 #define ENABLE_RTL_CHECKING 1
2067 if test x$ac_rtlflag_checking != x ; then
2068 cat >> confdefs.h <<\EOF
2069 #define ENABLE_RTL_FLAG_CHECKING 1
2073 if test x$ac_gc_checking != x ; then
2074 cat >> confdefs.h <<\EOF
2075 #define ENABLE_GC_CHECKING 1
2079 if test x$ac_gc_always_collect != x ; then
2080 cat >> confdefs.h <<\EOF
2081 #define ENABLE_GC_ALWAYS_COLLECT 1
2085 valgrind_path_defines=
2087 if test x$ac_checking_valgrind != x ; then
2088 # It is certainly possible that there's valgrind but no valgrind.h.
2089 # GCC relies on making annotations so we must have both.
2090 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2091 echo "configure:2092: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <memcheck.h>
2096 #ifndef VALGRIND_DISCARD
2097 #error VALGRIND_DISCARD not defined
2100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2101 { (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2103 if test -z "$ac_err"; then
2105 gcc_cv_header_memcheck_h=yes
2108 echo "configure: failed program was:" >&5
2109 cat conftest.$ac_ext >&5
2111 gcc_cv_header_memcheck_h=no
2114 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2115 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2116 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2117 echo "configure:2118: checking for valgrind.h" >&5
2118 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
2121 cat > conftest.$ac_ext <<EOF
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124 #include <valgrind.h>
2126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2127 { (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2129 if test -z "$ac_err"; then
2131 eval "ac_cv_header_$ac_safe=yes"
2134 echo "configure: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2137 eval "ac_cv_header_$ac_safe=no"
2141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2142 echo "$ac_t""yes" 1>&6
2145 echo "$ac_t""no" 1>&6
2149 # Extract the first word of "valgrind", so it can be a program name with args.
2150 set dummy valgrind; ac_word=$2
2151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2152 echo "configure:2153: checking for $ac_word" >&5
2153 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2156 case "$valgrind_path" in
2158 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2161 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2162 for ac_dir in $PATH; do
2163 test -z "$ac_dir" && ac_dir=.
2164 if test -f $ac_dir/$ac_word; then
2165 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2166 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2175 valgrind_path="$ac_cv_path_valgrind_path"
2176 if test -n "$valgrind_path"; then
2177 echo "$ac_t""$valgrind_path" 1>&6
2179 echo "$ac_t""no" 1>&6
2182 if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2183 { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2185 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2186 valgrind_command="$valgrind_path -q"
2187 cat >> confdefs.h <<\EOF
2188 #define ENABLE_VALGRIND_CHECKING 1
2191 if test $gcc_cv_header_memcheck_h = yes; then
2192 cat >> confdefs.h <<\EOF
2193 #define HAVE_MEMCHECK_H 1
2201 # Enable code coverage collection
2202 # Check whether --enable-coverage or --disable-coverage was given.
2203 if test "${enable_coverage+set}" = set; then
2204 enableval="$enable_coverage"
2205 case "${enableval}" in
2207 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2210 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2213 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2222 # -------------------------------
2223 # Miscenalleous configure options
2224 # -------------------------------
2227 # Check whether --with-stabs or --without-stabs was given.
2228 if test "${with_stabs+set}" = set; then
2229 withval="$with_stabs"
2237 # Check whether --with-elf or --without-elf was given.
2238 if test "${with_elf+set}" = set; then
2246 # Determine whether or not multilibs are enabled.
2247 # Check whether --enable-multilib or --disable-multilib was given.
2248 if test "${enable_multilib+set}" = set; then
2249 enableval="$enable_multilib"
2257 # Enable __cxa_atexit for C++.
2258 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2259 if test "${enable___cxa_atexit+set}" = set; then
2260 enableval="$enable___cxa_atexit"
2265 # Enable Multibyte Characters for C/C++
2266 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2267 if test "${enable_c_mbchar+set}" = set; then
2268 enableval="$enable_c_mbchar"
2269 if test x$enable_c_mbchar != xno; then
2270 cat >> confdefs.h <<\EOF
2271 #define MULTIBYTE_CHARS 1
2279 # Pass with no value to take the default
2280 # Pass with a value to specify a thread package
2281 # Check whether --enable-threads or --disable-threads was given.
2282 if test "${enable_threads+set}" = set; then
2283 enableval="$enable_threads"
2290 enable_threads_flag=$enable_threads
2291 # Check if a valid thread package
2292 case x${enable_threads_flag} in
2295 target_thread_file='single'
2299 target_thread_file=''
2301 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2302 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2303 target_thread_file=$enable_threads_flag
2306 echo "$enable_threads is an unknown thread package" 1>&2
2311 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2312 if test "${enable_objc_gc+set}" = set; then
2313 enableval="$enable_objc_gc"
2314 if test x$enable_objc_gc = xno; then
2324 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2325 if test "${with_dwarf2+set}" = set; then
2326 withval="$with_dwarf2"
2327 dwarf2="$with_dwarf2"
2333 # Check whether --enable-shared or --disable-shared was given.
2334 if test "${enable_shared+set}" = set; then
2335 enableval="$enable_shared"
2337 case $enable_shared in
2341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2342 for pkg in $enableval; do
2343 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2357 # Check whether --with-sysroot or --without-sysroot was given.
2358 if test "${with_sysroot+set}" = set; then
2359 withval="$with_sysroot"
2361 case ${with_sysroot} in
2362 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2363 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2366 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2367 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2369 if test "x$exec_prefix" = xNONE; then
2370 if test "x$prefix" = xNONE; then
2371 test_prefix=/usr/local
2376 test_prefix=$exec_prefix
2378 case ${TARGET_SYSTEM_ROOT} in
2379 "${test_prefix}"|"${test_prefix}/"*|\
2380 '${exec_prefix}'|'${exec_prefix}/'*)
2381 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2382 TARGET_SYSTEM_ROOT_DEFINE="$t"
2389 TARGET_SYSTEM_ROOT_DEFINE=
2390 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2398 # -------------------------
2399 # Checks for other programs
2400 # -------------------------
2402 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2403 echo "configure:2404: checking whether ${MAKE-make} sets \${MAKE}" >&5
2404 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2405 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2408 cat > conftestmake <<\EOF
2410 @echo 'ac_maketemp="${MAKE}"'
2412 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2413 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2414 if test -n "$ac_maketemp"; then
2415 eval ac_cv_prog_make_${ac_make}_set=yes
2417 eval ac_cv_prog_make_${ac_make}_set=no
2421 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2422 echo "$ac_t""yes" 1>&6
2425 echo "$ac_t""no" 1>&6
2426 SET_MAKE="MAKE=${MAKE-make}"
2430 # Find some useful tools
2431 for ac_prog in mawk gawk nawk awk
2433 # Extract the first word of "$ac_prog", so it can be a program name with args.
2434 set dummy $ac_prog; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2438 echo $ac_n "(cached) $ac_c" 1>&6
2440 if test -n "$AWK"; then
2441 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2445 for ac_dir in $ac_dummy; do
2446 test -z "$ac_dir" && ac_dir=.
2447 if test -f $ac_dir/$ac_word; then
2448 ac_cv_prog_AWK="$ac_prog"
2455 AWK="$ac_cv_prog_AWK"
2456 if test -n "$AWK"; then
2457 echo "$ac_t""$AWK" 1>&6
2459 echo "$ac_t""no" 1>&6
2462 test -n "$AWK" && break
2465 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2466 echo "configure:2467: checking whether ln works" >&5
2467 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2468 echo $ac_n "(cached) $ac_c" 1>&6
2470 rm -f conftestdata_t
2471 echo >conftestdata_f
2472 if ln conftestdata_f conftestdata_t 2>/dev/null
2476 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2478 gcc_cv_prog_LN="ln -s"
2483 rm -f conftestdata_f conftestdata_t
2486 LN="$gcc_cv_prog_LN"
2487 if test "$gcc_cv_prog_LN" = "ln"; then
2488 echo "$ac_t""yes" 1>&6
2490 if test "$gcc_cv_prog_LN" = "ln -s"; then
2491 echo "$ac_t""no, using ln -s" 1>&6
2493 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2497 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2498 echo "configure:2499: checking whether ln -s works" >&5
2499 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2500 echo $ac_n "(cached) $ac_c" 1>&6
2502 rm -f conftestdata_t
2503 echo >conftestdata_f
2504 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2506 gcc_cv_prog_LN_S="ln -s"
2508 if ln conftestdata_f conftestdata_t 2>/dev/null
2515 rm -f conftestdata_f conftestdata_t
2518 LN_S="$gcc_cv_prog_LN_S"
2519 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2520 echo "$ac_t""yes" 1>&6
2522 if test "$gcc_cv_prog_LN_S" = "ln"; then
2523 echo "$ac_t""no, using ln" 1>&6
2525 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2529 # Extract the first word of "ranlib", so it can be a program name with args.
2530 set dummy ranlib; ac_word=$2
2531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2532 echo "configure:2533: checking for $ac_word" >&5
2533 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2534 echo $ac_n "(cached) $ac_c" 1>&6
2536 if test -n "$RANLIB"; then
2537 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2541 for ac_dir in $ac_dummy; do
2542 test -z "$ac_dir" && ac_dir=.
2543 if test -f $ac_dir/$ac_word; then
2544 ac_cv_prog_RANLIB="ranlib"
2549 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2552 RANLIB="$ac_cv_prog_RANLIB"
2553 if test -n "$RANLIB"; then
2554 echo "$ac_t""$RANLIB" 1>&6
2556 echo "$ac_t""no" 1>&6
2559 # Find a good install program. We prefer a C program (faster),
2560 # so one script is as good as another. But avoid the broken or
2561 # incompatible versions:
2562 # SysV /etc/install, /usr/sbin/install
2563 # SunOS /usr/etc/install
2564 # IRIX /sbin/install
2566 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2567 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2568 # ./install, which can be erroneously created by make from ./install.sh.
2569 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2570 echo "configure:2571: checking for a BSD compatible install" >&5
2571 if test -z "$INSTALL"; then
2572 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2575 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2576 for ac_dir in $PATH; do
2577 # Account for people who put trailing slashes in PATH elements.
2579 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2581 # OSF1 and SCO ODT 3.0 have their own names for install.
2582 for ac_prog in ginstall scoinst install; do
2583 if test -f $ac_dir/$ac_prog; then
2584 if test $ac_prog = install &&
2585 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2586 # AIX install. It has an incompatible calling convention.
2587 # OSF/1 installbsd also uses dspmsg, but is usable.
2590 ac_cv_path_install="$ac_dir/$ac_prog -c"
2601 if test "${ac_cv_path_install+set}" = set; then
2602 INSTALL="$ac_cv_path_install"
2604 # As a last resort, use the slow shell script. We don't cache a
2605 # path for INSTALL within a source directory, because that will
2606 # break other packages using the cache if that directory is
2607 # removed, or if the path is relative.
2608 INSTALL="$ac_install_sh"
2611 echo "$ac_t""$INSTALL" 1>&6
2613 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2614 # It thinks the first close brace ends the variable substitution.
2615 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2617 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2620 # See if we have the mktemp command.
2621 # Extract the first word of "mktemp", so it can be a program name with args.
2622 set dummy mktemp; ac_word=$2
2623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2624 echo "configure:2625: checking for $ac_word" >&5
2625 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2626 echo $ac_n "(cached) $ac_c" 1>&6
2628 if test -n "$have_mktemp_command"; then
2629 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2633 for ac_dir in $ac_dummy; do
2634 test -z "$ac_dir" && ac_dir=.
2635 if test -f $ac_dir/$ac_word; then
2636 ac_cv_prog_have_mktemp_command="yes"
2641 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2644 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2645 if test -n "$have_mktemp_command"; then
2646 echo "$ac_t""$have_mktemp_command" 1>&6
2648 echo "$ac_t""no" 1>&6
2652 # Do we have a single-tree copy of texinfo?
2653 if test -f $srcdir/../texinfo/Makefile.in; then
2654 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2655 gcc_cv_prog_makeinfo_modern=yes
2656 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2658 # See if makeinfo has been installed and is modern enough
2659 # that we can use it.
2660 # Extract the first word of "makeinfo", so it can be a program name with args.
2661 set dummy makeinfo; ac_word=$2
2662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2663 echo "configure:2664: checking for $ac_word" >&5
2664 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2665 echo $ac_n "(cached) $ac_c" 1>&6
2667 if test -n "$MAKEINFO"; then
2668 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2670 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2672 for ac_dir in $ac_dummy; do
2673 test -z "$ac_dir" && ac_dir=.
2674 if test -f $ac_dir/$ac_word; then
2675 ac_cv_prog_MAKEINFO="makeinfo"
2682 MAKEINFO="$ac_cv_prog_MAKEINFO"
2683 if test -n "$MAKEINFO"; then
2684 echo "$ac_t""$MAKEINFO" 1>&6
2686 echo "$ac_t""no" 1>&6
2689 if test -n "$MAKEINFO"; then
2690 # Found it, now check the version.
2691 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2692 echo "configure:2693: checking for modern makeinfo" >&5
2693 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2696 ac_prog_version=`$MAKEINFO --version 2>&1 |
2697 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2698 echo "configure:2699: version of makeinfo is $ac_prog_version" >&5
2699 case $ac_prog_version in
2700 '') gcc_cv_prog_makeinfo_modern=no;;
2702 gcc_cv_prog_makeinfo_modern=yes;;
2703 *) gcc_cv_prog_makeinfo_modern=no;;
2708 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2710 gcc_cv_prog_makeinfo_modern=no
2715 if test $gcc_cv_prog_makeinfo_modern = no; then
2716 echo "configure: warning:
2717 *** Makeinfo is missing or too old.
2718 *** Info documentation will not be built." 1>&2
2724 # Is pod2man recent enough to regenerate manpages?
2725 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2726 echo "configure:2727: checking for recent Pod::Man" >&5
2727 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2728 echo "$ac_t""yes" 1>&6
2729 GENERATED_MANPAGES=generated-manpages
2731 echo "$ac_t""no" 1>&6
2735 # 'make compare' can be significantly faster, if cmp itself can
2736 # skip bytes instead of using tail. The test being performed is
2737 # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
2738 # but we need to sink errors and handle broken shells.
2739 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2740 echo "configure:2741: checking for cmp's capabilities" >&5
2743 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2744 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2745 make_compare_target=slowcompare
2747 make_compare_target=gnucompare
2750 make_compare_target=slowcompare
2754 echo "$ac_t""$make_compare_target" 1>&6
2757 if test -f $srcdir/../flex/skel.c; then
2758 FLEX='$(objdir)/../flex/flex'
2760 # Extract the first word of "flex", so it can be a program name with args.
2761 set dummy flex; ac_word=$2
2762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2763 echo "configure:2764: checking for $ac_word" >&5
2764 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2767 if test -n "$FLEX"; then
2768 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2772 for ac_dir in $ac_dummy; do
2773 test -z "$ac_dir" && ac_dir=.
2774 if test -f $ac_dir/$ac_word; then
2775 ac_cv_prog_FLEX="flex"
2780 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2783 FLEX="$ac_cv_prog_FLEX"
2784 if test -n "$FLEX"; then
2785 echo "$ac_t""$FLEX" 1>&6
2787 echo "$ac_t""no" 1>&6
2793 # The -L switch is so bison can find its skeleton file.
2794 if test -f $srcdir/../bison/bison.simple; then
2795 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2797 # Extract the first word of "bison", so it can be a program name with args.
2798 set dummy bison; ac_word=$2
2799 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2800 echo "configure:2801: checking for $ac_word" >&5
2801 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2804 if test -n "$BISON"; then
2805 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2809 for ac_dir in $ac_dummy; do
2810 test -z "$ac_dir" && ac_dir=.
2811 if test -f $ac_dir/$ac_word; then
2812 ac_cv_prog_BISON="bison"
2817 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2820 BISON="$ac_cv_prog_BISON"
2821 if test -n "$BISON"; then
2822 echo "$ac_t""$BISON" 1>&6
2824 echo "$ac_t""no" 1>&6
2829 # --------------------
2830 # Checks for C headers
2831 # --------------------
2833 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2834 echo "configure:2835: checking for GNU C library" >&5
2835 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2836 echo $ac_n "(cached) $ac_c" 1>&6
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <features.h>
2844 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2845 #error Not a GNU C library system
2849 if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2861 echo "$ac_t""$gcc_cv_glibc" 1>&6
2862 if test $gcc_cv_glibc = yes; then
2863 cat >> confdefs.h <<\EOF
2864 #define _GNU_SOURCE 1
2869 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2870 echo "configure:2871: checking for ANSI C header files" >&5
2871 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2872 echo $ac_n "(cached) $ac_c" 1>&6
2874 cat > conftest.$ac_ext <<EOF
2875 #line 2876 "configure"
2876 #include "confdefs.h"
2882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2883 { (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2885 if test -z "$ac_err"; then
2887 ac_cv_header_stdc=yes
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2893 ac_cv_header_stdc=no
2897 if test $ac_cv_header_stdc = yes; then
2898 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2899 cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2905 egrep "memchr" >/dev/null 2>&1; then
2909 ac_cv_header_stdc=no
2915 if test $ac_cv_header_stdc = yes; then
2916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2923 egrep "free" >/dev/null 2>&1; then
2927 ac_cv_header_stdc=no
2933 if test $ac_cv_header_stdc = yes; then
2934 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2935 if test "$cross_compiling" = yes; then
2938 cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2942 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2943 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2944 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2945 int main () { int i; for (i = 0; i < 256; i++)
2946 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2950 if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2954 echo "configure: failed program was:" >&5
2955 cat conftest.$ac_ext >&5
2957 ac_cv_header_stdc=no
2965 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2966 if test $ac_cv_header_stdc = yes; then
2967 cat >> confdefs.h <<\EOF
2968 #define STDC_HEADERS 1
2973 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2974 echo "configure:2975: checking whether time.h and sys/time.h may both be included" >&5
2975 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
2978 cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2981 #include <sys/types.h>
2982 #include <sys/time.h>
2988 if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2990 ac_cv_header_time=yes
2992 echo "configure: failed program was:" >&5
2993 cat conftest.$ac_ext >&5
2995 ac_cv_header_time=no
3000 echo "$ac_t""$ac_cv_header_time" 1>&6
3001 if test $ac_cv_header_time = yes; then
3002 cat >> confdefs.h <<\EOF
3003 #define TIME_WITH_SYS_TIME 1
3008 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
3009 echo "configure:3010: checking for working stdbool.h" >&5
3010 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
3011 echo $ac_n "(cached) $ac_c" 1>&6
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 #include <stdbool.h>
3021 if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3023 ac_cv_header_stdbool_h=yes
3025 echo "configure: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
3028 ac_cv_header_stdbool_h=no
3033 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
3034 if test $ac_cv_header_stdbool_h = yes; then
3035 cat >> confdefs.h <<\EOF
3036 #define HAVE_STDBOOL_H 1
3041 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
3042 echo "configure:3043: checking whether string.h and strings.h may both be included" >&5
3043 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
3044 echo $ac_n "(cached) $ac_c" 1>&6
3046 cat > conftest.$ac_ext <<EOF
3047 #line 3048 "configure"
3048 #include "confdefs.h"
3050 #include <strings.h>
3055 if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3057 gcc_cv_header_string=yes
3059 echo "configure: failed program was:" >&5
3060 cat conftest.$ac_ext >&5
3062 gcc_cv_header_string=no
3067 echo "$ac_t""$gcc_cv_header_string" 1>&6
3068 if test $gcc_cv_header_string = yes; then
3069 cat >> confdefs.h <<\EOF
3070 #define STRING_WITH_STRINGS 1
3075 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3076 echo "configure:3077: checking for sys/wait.h that is POSIX.1 compatible" >&5
3077 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3078 echo $ac_n "(cached) $ac_c" 1>&6
3080 cat > conftest.$ac_ext <<EOF
3081 #line 3082 "configure"
3082 #include "confdefs.h"
3083 #include <sys/types.h>
3084 #include <sys/wait.h>
3086 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3089 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3094 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3097 if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3099 ac_cv_header_sys_wait_h=yes
3101 echo "configure: failed program was:" >&5
3102 cat conftest.$ac_ext >&5
3104 ac_cv_header_sys_wait_h=no
3109 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3110 if test $ac_cv_header_sys_wait_h = yes; then
3111 cat >> confdefs.h <<\EOF
3112 #define HAVE_SYS_WAIT_H 1
3117 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3118 fcntl.h unistd.h sys/file.h sys/time.h \
3119 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3120 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3124 echo "configure:3125: checking for $ac_hdr" >&5
3125 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3126 echo $ac_n "(cached) $ac_c" 1>&6
3128 cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3134 { (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3136 if test -z "$ac_err"; then
3138 eval "ac_cv_header_$ac_safe=yes"
3141 echo "configure: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3144 eval "ac_cv_header_$ac_safe=no"
3148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3149 echo "$ac_t""yes" 1>&6
3150 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3151 cat >> confdefs.h <<EOF
3152 #define $ac_tr_hdr 1
3156 echo "$ac_t""no" 1>&6
3161 # Check for thread headers.
3162 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3163 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3164 echo "configure:3165: checking for thread.h" >&5
3165 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3166 echo $ac_n "(cached) $ac_c" 1>&6
3168 cat > conftest.$ac_ext <<EOF
3169 #line 3170 "configure"
3170 #include "confdefs.h"
3173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3174 { (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3176 if test -z "$ac_err"; then
3178 eval "ac_cv_header_$ac_safe=yes"
3181 echo "configure: failed program was:" >&5
3182 cat conftest.$ac_ext >&5
3184 eval "ac_cv_header_$ac_safe=no"
3188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3189 echo "$ac_t""yes" 1>&6
3192 echo "$ac_t""no" 1>&6
3196 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3197 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3198 echo "configure:3199: checking for pthread.h" >&5
3199 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3200 echo $ac_n "(cached) $ac_c" 1>&6
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #include <pthread.h>
3207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3208 { (eval echo configure:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3210 if test -z "$ac_err"; then
3212 eval "ac_cv_header_$ac_safe=yes"
3215 echo "configure: failed program was:" >&5
3216 cat conftest.$ac_ext >&5
3218 eval "ac_cv_header_$ac_safe=no"
3222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3223 echo "$ac_t""yes" 1>&6
3226 echo "$ac_t""no" 1>&6
3231 # These tests can't be done till we know if we have limits.h.
3232 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3233 echo "configure:3234: checking for CHAR_BIT" >&5
3234 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3235 echo $ac_n "(cached) $ac_c" 1>&6
3237 cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240 #ifdef HAVE_LIMITS_H
3247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3248 egrep "found" >/dev/null 2>&1; then
3250 gcc_cv_decl_char_bit=yes
3253 gcc_cv_decl_char_bit=no
3260 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3261 if test $gcc_cv_decl_char_bit = no; then
3262 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3263 echo "configure:3264: checking number of bits in a byte" >&5
3264 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3265 echo $ac_n "(cached) $ac_c" 1>&6
3269 while test $i -lt 65; do
3270 cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3276 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3277 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3281 if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3283 gcc_cv_c_nbby=$i; break
3285 echo "configure: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3291 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3295 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3296 if test $gcc_cv_c_nbby = failed; then
3297 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3299 cat >> confdefs.h <<EOF
3300 #define CHAR_BIT $gcc_cv_c_nbby
3305 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3306 echo "configure:3307: checking whether byte ordering is bigendian" >&5
3307 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3308 echo $ac_n "(cached) $ac_c" 1>&6
3310 ac_cv_c_bigendian=unknown
3311 # See if sys/param.h defines the BYTE_ORDER macro.
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #include <sys/types.h>
3316 #include <sys/param.h>
3319 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3324 if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3326 # It does; now see whether it defined to BIG_ENDIAN or not.
3327 cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330 #include <sys/types.h>
3331 #include <sys/param.h>
3334 #if BYTE_ORDER != BIG_ENDIAN
3339 if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3341 ac_cv_c_bigendian=yes
3343 echo "configure: failed program was:" >&5
3344 cat conftest.$ac_ext >&5
3346 ac_cv_c_bigendian=no
3350 echo "configure: failed program was:" >&5
3351 cat conftest.$ac_ext >&5
3354 if test $ac_cv_c_bigendian = unknown; then
3355 if test "$cross_compiling" = yes; then
3356 echo $ac_n "cross-compiling... " 2>&6
3358 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3362 /* Are we little or big endian? From Harbison&Steele. */
3366 char c[sizeof (long)];
3369 exit (u.c[sizeof (long) - 1] == 1);
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3374 ac_cv_c_bigendian=no
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3379 ac_cv_c_bigendian=yes
3387 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3388 if test $ac_cv_c_bigendian = unknown; then
3389 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3390 echo "configure:3391: checking to probe for byte ordering" >&5
3392 cat >conftest.c <<EOF
3393 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3394 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3395 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3396 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3397 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3398 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3399 int main() { _ascii (); _ebcdic (); return 0; }
3401 if test -f conftest.c ; then
3402 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3403 if test `grep -l BIGenDianSyS conftest.o` ; then
3404 echo $ac_n ' big endian probe OK, ' 1>&6
3405 ac_cv_c_bigendian=yes
3407 if test `grep -l LiTTleEnDian conftest.o` ; then
3408 echo $ac_n ' little endian probe OK, ' 1>&6
3409 if test $ac_cv_c_bigendian = yes ; then
3410 ac_cv_c_bigendian=unknown;
3412 ac_cv_c_bigendian=no
3415 echo $ac_n 'guessing bigendian ... ' >&6
3418 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3420 if test $ac_cv_c_bigendian = yes; then
3421 cat >> confdefs.h <<\EOF
3422 #define WORDS_BIGENDIAN 1
3425 cat >> confdefs.h <<\EOF
3426 #define HOST_WORDS_BIG_ENDIAN 1
3433 cat >> confdefs.h <<EOF
3434 #define BYTEORDER $BYTEORDER
3437 if test $ac_cv_c_bigendian = unknown; then
3438 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3446 # Stage specific cflags for build.
3450 if test x$GCC = xyes
3452 stage1_cflags="-Wa,-J"
3458 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3459 # sources; use -no-cpp-precomp to get to GNU cpp.
3460 # Apple's GCC has bugs in designated initializer handling, so disable
3462 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3467 # These libraries may be used by collect2.
3468 # We may need a special search path to get them linked.
3469 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3470 echo "configure:3471: checking for collect2 libraries" >&5
3471 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3475 for libs in '' -lld -lmld \
3476 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3477 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 /* Override any gcc2 internal prototype to avoid an error. */
3484 /* We use char because int might match the return type of a gcc2
3485 builtin and then its argument prototype would still apply. */
3492 if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3494 gcc_cv_collect2_libs="$libs"; break
3496 echo "configure: failed program was:" >&5
3497 cat conftest.$ac_ext >&5
3502 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3505 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3506 case $gcc_cv_collect2_libs in
3508 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3512 # When building Ada code on Alpha, we need exc_resume which is usually in
3513 # -lexc. So test for it.
3517 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3518 echo "configure:3519: checking for library containing exc_resume" >&5
3519 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3520 echo $ac_n "(cached) $ac_c" 1>&6
3522 ac_func_search_save_LIBS="$LIBS"
3523 ac_cv_search_exc_resume="no"
3524 cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 /* Override any gcc2 internal prototype to avoid an error. */
3528 /* We use char because int might match the return type of a gcc2
3529 builtin and then its argument prototype would still apply. */
3536 if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3538 ac_cv_search_exc_resume="none required"
3540 echo "configure: failed program was:" >&5
3541 cat conftest.$ac_ext >&5
3544 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3545 LIBS="-l$i $ac_func_search_save_LIBS"
3546 cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 /* Override any gcc2 internal prototype to avoid an error. */
3550 /* We use char because int might match the return type of a gcc2
3551 builtin and then its argument prototype would still apply. */
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3560 ac_cv_search_exc_resume="-l$i"
3563 echo "configure: failed program was:" >&5
3564 cat conftest.$ac_ext >&5
3568 LIBS="$ac_func_search_save_LIBS"
3571 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3572 if test "$ac_cv_search_exc_resume" != "no"; then
3573 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3582 # Some systems put ldexp and frexp in libm instead of libc; assume
3583 # they're both in the same place. jcf-dump needs them.
3587 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3588 echo "configure:3589: checking for library containing ldexp" >&5
3589 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3590 echo $ac_n "(cached) $ac_c" 1>&6
3592 ac_func_search_save_LIBS="$LIBS"
3593 ac_cv_search_ldexp="no"
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 /* Override any gcc2 internal prototype to avoid an error. */
3598 /* We use char because int might match the return type of a gcc2
3599 builtin and then its argument prototype would still apply. */
3606 if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3608 ac_cv_search_ldexp="none required"
3610 echo "configure: failed program was:" >&5
3611 cat conftest.$ac_ext >&5
3614 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3615 LIBS="-l$i $ac_func_search_save_LIBS"
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 /* Override any gcc2 internal prototype to avoid an error. */
3620 /* We use char because int might match the return type of a gcc2
3621 builtin and then its argument prototype would still apply. */
3628 if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630 ac_cv_search_ldexp="-l$i"
3633 echo "configure: failed program was:" >&5
3634 cat conftest.$ac_ext >&5
3638 LIBS="$ac_func_search_save_LIBS"
3641 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3642 if test "$ac_cv_search_ldexp" != "no"; then
3643 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3652 # See if the stage1 system preprocessor understands the ANSI C
3653 # preprocessor stringification operator. (Used by symcat.h.)
3656 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3657 echo "configure:3658: checking for preprocessor stringizing operator" >&5
3658 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3659 echo $ac_n "(cached) $ac_c" 1>&6
3661 cat > conftest.$ac_ext <<EOF
3662 #line 3663 "configure"
3663 #include "confdefs.h"
3667 char *s = x(teststring);
3670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3671 egrep "#teststring" >/dev/null 2>&1; then
3673 ac_cv_c_stringize=no
3676 ac_cv_c_stringize=yes
3682 if test "${ac_cv_c_stringize}" = yes
3684 cat >> confdefs.h <<\EOF
3685 #define HAVE_STRINGIZE 1
3689 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3692 # Use <inttypes.h> only if it exists,
3693 # doesn't clash with <sys/types.h>, and declares intmax_t.
3694 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3695 echo "configure:3696: checking for inttypes.h" >&5
3696 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3697 echo $ac_n "(cached) $ac_c" 1>&6
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #include <sys/types.h>
3703 #include <inttypes.h>
3708 if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3710 gcc_cv_header_inttypes_h=yes
3712 echo "configure: failed program was:" >&5
3713 cat conftest.$ac_ext >&5
3715 gcc_cv_header_inttypes_h=no
3720 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3721 if test $gcc_cv_header_inttypes_h = yes; then
3722 cat >> confdefs.h <<\EOF
3723 #define HAVE_INTTYPES_H 1
3729 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3730 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3731 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3732 scandir alphasort gettimeofday mbstowcs wcswidth
3734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3735 echo "configure:3736: checking for $ac_func" >&5
3736 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3737 echo $ac_n "(cached) $ac_c" 1>&6
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 /* System header to define __stub macros and hopefully few prototypes,
3743 which can conflict with char $ac_func(); below. */
3745 /* Override any gcc2 internal prototype to avoid an error. */
3746 /* We use char because int might match the return type of a gcc2
3747 builtin and then its argument prototype would still apply. */
3752 /* The GNU C library defines this for functions which it implements
3753 to always fail with ENOSYS. Some functions are actually named
3754 something starting with __ and the normal name is an alias. */
3755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3763 if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3765 eval "ac_cv_func_$ac_func=yes"
3767 echo "configure: failed program was:" >&5
3768 cat conftest.$ac_ext >&5
3770 eval "ac_cv_func_$ac_func=no"
3775 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3776 echo "$ac_t""yes" 1>&6
3777 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3778 cat >> confdefs.h <<EOF
3779 #define $ac_tr_func 1
3783 echo "$ac_t""no" 1>&6
3788 if test x$ac_cv_func_mbstowcs = xyes; then
3789 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3790 echo "configure:3791: checking whether mbstowcs works" >&5
3791 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3792 echo $ac_n "(cached) $ac_c" 1>&6
3794 if test "$cross_compiling" = yes; then
3795 gcc_cv_func_mbstowcs_works=yes
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3807 if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3809 gcc_cv_func_mbstowcs_works=yes
3811 echo "configure: failed program was:" >&5
3812 cat conftest.$ac_ext >&5
3814 gcc_cv_func_mbstowcs_works=no
3821 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3822 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3823 cat >> confdefs.h <<\EOF
3824 #define HAVE_WORKING_MBSTOWCS 1
3830 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3831 echo "configure:3832: checking for ssize_t" >&5
3832 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3833 echo $ac_n "(cached) $ac_c" 1>&6
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <sys/types.h>
3844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3845 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3847 ac_cv_type_ssize_t=yes
3850 ac_cv_type_ssize_t=no
3855 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3856 if test $ac_cv_type_ssize_t = no; then
3857 cat >> confdefs.h <<\EOF
3864 # Try to determine the array type of the second argument of getgroups
3865 # for the target system (int or gid_t).
3866 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3867 echo "configure:3868: checking for uid_t in sys/types.h" >&5
3868 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3869 echo $ac_n "(cached) $ac_c" 1>&6
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <sys/types.h>
3876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3877 egrep "uid_t" >/dev/null 2>&1; then
3879 ac_cv_type_uid_t=yes
3888 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3889 if test $ac_cv_type_uid_t = no; then
3890 cat >> confdefs.h <<\EOF
3894 cat >> confdefs.h <<\EOF
3900 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3901 echo "configure:3902: checking type of array argument to getgroups" >&5
3902 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3903 echo $ac_n "(cached) $ac_c" 1>&6
3905 if test "$cross_compiling" = yes; then
3906 ac_cv_type_getgroups=cross
3908 cat > conftest.$ac_ext <<EOF
3909 #line 3910 "configure"
3910 #include "confdefs.h"
3912 /* Thanks to Mike Rendell for this test. */
3913 #include <sys/types.h>
3916 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3921 union { gid_t gval; long lval; } val;
3924 for (i = 0; i < NGID; i++)
3925 gidset[i] = val.gval;
3926 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3928 /* Exit non-zero if getgroups seems to require an array of ints. This
3929 happens when gid_t is short but getgroups modifies an array of ints. */
3930 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3936 ac_cv_type_getgroups=gid_t
3938 echo "configure: failed program was:" >&5
3939 cat conftest.$ac_ext >&5
3941 ac_cv_type_getgroups=int
3946 if test $ac_cv_type_getgroups = cross; then
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3953 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3955 ac_cv_type_getgroups=gid_t
3958 ac_cv_type_getgroups=int
3965 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3966 cat >> confdefs.h <<EOF
3967 #define GETGROUPS_T $ac_cv_type_getgroups
3971 if test "${target}" = "${build}"; then
3972 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3975 # This condition may need some tweaking. It should include all
3976 # targets where the array type of the second argument of getgroups
3977 # is int and the type of gid_t is not equivalent to int.
3978 *-*-sunos* | *-*-ultrix*)
3979 TARGET_GETGROUPS_T=int
3982 TARGET_GETGROUPS_T=gid_t
3988 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3989 echo "configure:3990: checking whether the printf functions support %p" >&5
3990 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3991 echo $ac_n "(cached) $ac_c" 1>&6
3993 if test "$cross_compiling" = yes; then
3994 gcc_cv_func_printf_ptr=no
3996 cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
4004 char *p = buf, *q = NULL;
4005 sprintf(buf, "%p", p);
4006 sscanf(buf, "%p", &q);
4010 if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4012 gcc_cv_func_printf_ptr=yes
4014 echo "configure: failed program was:" >&5
4015 cat conftest.$ac_ext >&5
4017 gcc_cv_func_printf_ptr=no
4022 rm -f core core.* *.core
4025 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
4026 if test $gcc_cv_func_printf_ptr = yes ; then
4027 cat >> confdefs.h <<\EOF
4028 #define HAVE_PRINTF_PTR 1
4036 { echo "configure: error:
4037 *** UWIN may not be used as a host platform because
4038 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4041 # Under VMS, vfork works very different than on Unix. The standard test
4042 # won't work, and it isn't easily adaptable. It makes more sense to
4044 ac_cv_func_vfork_works=yes
4047 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4048 echo "configure:4049: checking for pid_t" >&5
4049 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4050 echo $ac_n "(cached) $ac_c" 1>&6
4052 cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 #include <sys/types.h>
4061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4062 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4064 ac_cv_type_pid_t=yes
4072 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4073 if test $ac_cv_type_pid_t = no; then
4074 cat >> confdefs.h <<\EOF
4080 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4081 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4082 echo "configure:4083: checking for vfork.h" >&5
4083 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4084 echo $ac_n "(cached) $ac_c" 1>&6
4086 cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4092 { (eval echo configure:4093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4094 if test -z "$ac_err"; then
4096 eval "ac_cv_header_$ac_safe=yes"
4099 echo "configure: failed program was:" >&5
4100 cat conftest.$ac_ext >&5
4102 eval "ac_cv_header_$ac_safe=no"
4106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4107 echo "$ac_t""yes" 1>&6
4108 cat >> confdefs.h <<\EOF
4109 #define HAVE_VFORK_H 1
4113 echo "$ac_t""no" 1>&6
4116 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4117 echo "configure:4118: checking for working vfork" >&5
4118 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4119 echo $ac_n "(cached) $ac_c" 1>&6
4121 if test "$cross_compiling" = yes; then
4122 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4123 echo "configure:4124: checking for vfork" >&5
4124 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4125 echo $ac_n "(cached) $ac_c" 1>&6
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130 /* System header to define __stub macros and hopefully few prototypes,
4131 which can conflict with char vfork(); below. */
4133 /* Override any gcc2 internal prototype to avoid an error. */
4134 /* We use char because int might match the return type of a gcc2
4135 builtin and then its argument prototype would still apply. */
4140 /* The GNU C library defines this for functions which it implements
4141 to always fail with ENOSYS. Some functions are actually named
4142 something starting with __ and the normal name is an alias. */
4143 #if defined (__stub_vfork) || defined (__stub___vfork)
4151 if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4153 eval "ac_cv_func_vfork=yes"
4155 echo "configure: failed program was:" >&5
4156 cat conftest.$ac_ext >&5
4158 eval "ac_cv_func_vfork=no"
4163 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4164 echo "$ac_t""yes" 1>&6
4167 echo "$ac_t""no" 1>&6
4170 ac_cv_func_vfork_works=$ac_cv_func_vfork
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 /* Thanks to Paul Eggert for this test. */
4177 #include <sys/types.h>
4178 #include <sys/stat.h>
4179 #ifdef HAVE_UNISTD_H
4185 /* On some sparc systems, changes by the child to local and incoming
4186 argument registers are propagated back to the parent.
4187 The compiler is told about this with #include <vfork.h>,
4188 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4189 Test for this by using a static variable whose address
4190 is put into a register that is clobbered by the vfork. */
4193 sparc_address_test (int arg)
4195 sparc_address_test (arg) int arg;
4213 pid_t parent = getpid ();
4216 sparc_address_test ();
4221 /* Here is another test for sparc vfork register problems.
4222 This test uses lots of local variables, at least
4223 as many local variables as main has allocated so far
4224 including compiler temporaries. 4 locals are enough for
4225 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4226 A buggy compiler should reuse the register of parent
4227 for one of the local variables, since it will think that
4228 parent can't possibly be used any more in this routine.
4229 Assigning to the local variable will thus munge parent
4230 in the parent process. */
4232 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4233 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4234 /* Convince the compiler that p..p7 are live; otherwise, it might
4235 use the same hardware register for all 8 local variables. */
4236 if (p != p1 || p != p2 || p != p3 || p != p4
4237 || p != p5 || p != p6 || p != p7)
4240 /* On some systems (e.g. IRIX 3.3),
4241 vfork doesn't separate parent from child file descriptors.
4242 If the child closes a descriptor before it execs or exits,
4243 this munges the parent's descriptor as well.
4244 Test for this by closing stdout in the child. */
4245 _exit(close(fileno(stdout)) != 0);
4250 while (wait(&status) != child)
4253 /* Was there some problem with vforking? */
4256 /* Did the child fail? (This shouldn't happen.) */
4259 /* Did the vfork/compiler bug occur? */
4260 || parent != getpid()
4262 /* Did the file descriptor bug occur? */
4263 || fstat(fileno(stdout), &st) != 0
4268 if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4270 ac_cv_func_vfork_works=yes
4272 echo "configure: failed program was:" >&5
4273 cat conftest.$ac_ext >&5
4275 ac_cv_func_vfork_works=no
4282 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4283 if test $ac_cv_func_vfork_works = no; then
4284 cat >> confdefs.h <<\EOF
4290 for ac_func in getpagesize
4292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4293 echo "configure:4294: checking for $ac_func" >&5
4294 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4295 echo $ac_n "(cached) $ac_c" 1>&6
4297 cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 /* System header to define __stub macros and hopefully few prototypes,
4301 which can conflict with char $ac_func(); below. */
4303 /* Override any gcc2 internal prototype to avoid an error. */
4304 /* We use char because int might match the return type of a gcc2
4305 builtin and then its argument prototype would still apply. */
4310 /* The GNU C library defines this for functions which it implements
4311 to always fail with ENOSYS. Some functions are actually named
4312 something starting with __ and the normal name is an alias. */
4313 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4321 if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4323 eval "ac_cv_func_$ac_func=yes"
4325 echo "configure: failed program was:" >&5
4326 cat conftest.$ac_ext >&5
4328 eval "ac_cv_func_$ac_func=no"
4333 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4334 echo "$ac_t""yes" 1>&6
4335 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4336 cat >> confdefs.h <<EOF
4337 #define $ac_tr_func 1
4341 echo "$ac_t""no" 1>&6
4345 # The test program for the next two tests is the same except for one
4347 cat >ct-mmap.inc <<'EOF'
4348 #include <sys/types.h>
4349 #include <sys/mman.h>
4355 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4356 # define MAP_ANONYMOUS MAP_ANON
4359 /* This mess was copied from the GNU getpagesize.h. */
4360 #ifndef HAVE_GETPAGESIZE
4361 # ifdef HAVE_UNISTD_H
4362 # include <unistd.h>
4365 /* Assume that all systems that can run configure have sys/param.h. */
4366 # ifndef HAVE_SYS_PARAM_H
4367 # define HAVE_SYS_PARAM_H 1
4370 # ifdef _SC_PAGESIZE
4371 # define getpagesize() sysconf(_SC_PAGESIZE)
4372 # else /* no _SC_PAGESIZE */
4373 # ifdef HAVE_SYS_PARAM_H
4374 # include <sys/param.h>
4375 # ifdef EXEC_PAGESIZE
4376 # define getpagesize() EXEC_PAGESIZE
4377 # else /* no EXEC_PAGESIZE */
4379 # define getpagesize() NBPG * CLSIZE
4382 # endif /* no CLSIZE */
4383 # else /* no NBPG */
4385 # define getpagesize() NBPC
4386 # else /* no NBPC */
4388 # define getpagesize() PAGESIZE
4389 # endif /* PAGESIZE */
4390 # endif /* no NBPC */
4391 # endif /* no NBPG */
4392 # endif /* no EXEC_PAGESIZE */
4393 # else /* no HAVE_SYS_PARAM_H */
4394 # define getpagesize() 8192 /* punt totally */
4395 # endif /* no HAVE_SYS_PARAM_H */
4396 # endif /* no _SC_PAGESIZE */
4398 #endif /* no HAVE_GETPAGESIZE */
4401 # define MAP_FAILED -1
4405 #define perror_exit(str, val) \
4406 do { perror(str); exit(val); } while (0)
4408 /* Some versions of cygwin mmap require that munmap is called with the
4409 same parameters as mmap. GCC expects that this is not the case.
4410 Test for various forms of this problem. Warning - icky signal games. */
4412 static sigset_t unblock_sigsegv;
4422 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4423 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4425 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4426 MAP_PRIVATE, devzero, 0);
4434 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4438 /* Basic functionality test. */
4442 char *x = anonmap (pg);
4443 if (x == (char *) MAP_FAILED)
4444 perror_exit("test 0 mmap", 2);
4448 if (munmap(x, pg) < 0)
4449 perror_exit("test 0 munmap", 3);
4452 /* 1. If we map a 2-page region and unmap its second page, the first page
4457 char *x = anonmap (pg * 2);
4458 if (x == (char *)MAP_FAILED)
4459 perror_exit ("test 1 mmap", 4);
4461 signal (SIGSEGV, sigsegv);
4463 perror_exit ("test 1 fault", 5);
4468 if (munmap (x + pg, pg) < 0)
4469 perror_exit ("test 1 munmap 1", 6);
4472 if (setjmp (r) == 0)
4475 perror_exit ("test 1 no fault", 7);
4477 if (munmap (x, pg) < 0)
4478 perror_exit ("test 1 munmap 2", 8);
4481 /* 2. If we map a 2-page region and unmap its first page, the second
4482 page must remain. */
4486 char *x = anonmap (pg * 2);
4487 if (x == (char *)MAP_FAILED)
4488 perror_exit ("test 2 mmap", 9);
4490 signal (SIGSEGV, sigsegv);
4492 perror_exit ("test 2 fault", 10);
4497 if (munmap (x, pg) < 0)
4498 perror_exit ("test 2 munmap 1", 11);
4502 if (setjmp (r) == 0)
4505 perror_exit ("test 2 no fault", 12);
4508 if (munmap (x+pg, pg) < 0)
4509 perror_exit ("test 2 munmap 2", 13);
4512 /* 3. If we map two adjacent 1-page regions and unmap them both with
4513 one munmap, both must go away.
4515 Getting two adjacent 1-page regions with two mmap calls is slightly
4516 tricky. All OS's tested skip over already-allocated blocks; therefore
4517 we have been careful to unmap all allocated regions in previous tests.
4518 HP/UX allocates pages backward in memory. No OS has yet been observed
4519 to be so perverse as to leave unmapped space between consecutive calls
4528 if (x == (char *)MAP_FAILED)
4529 perror_exit ("test 3 mmap 1", 14);
4531 if (y == (char *)MAP_FAILED)
4532 perror_exit ("test 3 mmap 2", 15);
4537 z = y, y = x, x = z;
4540 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4541 (unsigned long)x, (unsigned long)y);
4546 signal (SIGSEGV, sigsegv);
4548 perror_exit ("test 3 fault", 17);
4553 if (munmap (x, pg*2) < 0)
4554 perror_exit ("test 3 munmap", 18);
4556 if (setjmp (r) == 0)
4559 perror_exit ("test 3 no fault 1", 19);
4562 signal (SIGSEGV, sigsegv);
4563 if (setjmp (r) == 0)
4566 perror_exit ("test 3 no fault 2", 20);
4573 sigemptyset (&unblock_sigsegv);
4574 sigaddset (&unblock_sigsegv, SIGSEGV);
4575 pg = getpagesize ();
4576 #ifndef USE_MAP_ANON
4577 devzero = open ("/dev/zero", O_RDWR);
4579 perror_exit ("open /dev/zero", 1);
4591 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4592 echo "configure:4593: checking for working mmap from /dev/zero" >&5
4593 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4594 echo $ac_n "(cached) $ac_c" 1>&6
4596 if test "$cross_compiling" = yes; then
4597 # When cross-building, assume that this works, unless we know it
4598 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4599 # on the host, let alone whether mmap will work on it.
4601 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4602 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4603 * ) ac_cv_func_mmap_dev_zero=yes ;;
4606 cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 #include "ct-mmap.inc"
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4613 ac_cv_func_mmap_dev_zero=yes
4615 echo "configure: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4619 then ac_cv_func_mmap_dev_zero=no
4620 else ac_cv_func_mmap_dev_zero=buggy
4629 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4630 if test $ac_cv_func_mmap_dev_zero = yes; then
4631 cat >> confdefs.h <<\EOF
4632 #define HAVE_MMAP_DEV_ZERO 1
4637 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4638 echo "configure:4639: checking for working mmap with MAP_ANON(YMOUS)" >&5
4639 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4640 echo $ac_n "(cached) $ac_c" 1>&6
4642 if test "$cross_compiling" = yes; then
4643 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4644 # just because it's there. Some SCO Un*xen define it but don't implement it.
4646 darwin* ) ac_cv_func_mmap_anon=yes ;;
4647 * ) ac_cv_func_mmap_anon=no ;;
4650 cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4653 #define USE_MAP_ANON
4654 #include "ct-mmap.inc"
4656 if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4658 ac_cv_func_mmap_anon=yes
4660 echo "configure: failed program was:" >&5
4661 cat conftest.$ac_ext >&5
4664 then ac_cv_func_mmap_anon=no
4665 else ac_cv_func_mmap_anon=buggy
4674 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4675 if test $ac_cv_func_mmap_anon = yes; then
4676 cat >> confdefs.h <<\EOF
4677 #define HAVE_MMAP_ANON 1
4683 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4684 echo "configure:4685: checking for working mmap of a file" >&5
4685 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4686 echo $ac_n "(cached) $ac_c" 1>&6
4688 # Create a file one thousand bytes long.
4689 for i in 1 2 3 4 5 6 7 8 9 0
4690 do for j in 1 2 3 4 5 6 7 8 9 0
4693 done > conftestdata$$
4695 if test "$cross_compiling" = yes; then
4697 darwin* ) ac_cv_func_mmap_file=yes ;;
4698 * ) ac_cv_func_mmap_file=no ;;
4701 cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4705 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4706 Richard Henderson and Alexandre Oliva.
4707 Check whether read-only mmap of a plain file works. */
4708 #include <sys/types.h>
4709 #include <sys/stat.h>
4711 #include <sys/mman.h>
4719 fd = open("conftestdata$$", O_RDONLY);
4723 if (fstat (fd, &st))
4726 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4727 if (x == (char *) -1)
4730 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4733 if (munmap(x, st.st_size) < 0)
4739 if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4741 ac_cv_func_mmap_file=yes
4743 echo "configure: failed program was:" >&5
4744 cat conftest.$ac_ext >&5
4746 ac_cv_func_mmap_file=no
4753 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4754 if test $ac_cv_func_mmap_file = yes; then
4755 cat >> confdefs.h <<\EOF
4756 #define HAVE_MMAP_FILE 1
4764 am_cv_lib_iconv_ldpath=
4765 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4766 if test "${with_libiconv_prefix+set}" = set; then
4767 withval="$with_libiconv_prefix"
4769 for dir in `echo "$withval" | tr : ' '`; do
4770 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4771 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4777 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4778 echo "configure:4779: checking for iconv" >&5
4779 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4780 echo $ac_n "(cached) $ac_c" 1>&6
4783 am_cv_func_iconv="no, consider installing GNU libiconv"
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4791 iconv_t cd = iconv_open("","");
4792 iconv(cd,NULL,NULL,NULL,NULL);
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4798 am_cv_func_iconv=yes
4800 echo "configure: failed program was:" >&5
4801 cat conftest.$ac_ext >&5
4804 if test "$am_cv_func_iconv" != yes; then
4805 am_save_LIBS="$LIBS"
4806 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4807 cat > conftest.$ac_ext <<EOF
4808 #line 4809 "configure"
4809 #include "confdefs.h"
4813 iconv_t cd = iconv_open("","");
4814 iconv(cd,NULL,NULL,NULL,NULL);
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4821 am_cv_func_iconv=yes
4823 echo "configure: failed program was:" >&5
4824 cat conftest.$ac_ext >&5
4827 LIBS="$am_save_LIBS"
4832 echo "$ac_t""$am_cv_func_iconv" 1>&6
4833 if test "$am_cv_func_iconv" = yes; then
4834 cat >> confdefs.h <<\EOF
4835 #define HAVE_ICONV 1
4838 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4839 echo "configure:4840: checking for iconv declaration" >&5
4840 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4841 echo $ac_n "(cached) $ac_c" 1>&6
4844 cat > conftest.$ac_ext <<EOF
4845 #line 4846 "configure"
4846 #include "confdefs.h"
4854 #if defined(__STDC__) || defined(__cplusplus)
4855 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4864 if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4866 am_cv_proto_iconv_arg1=""
4868 echo "configure: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4871 am_cv_proto_iconv_arg1="const"
4874 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
4877 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4878 echo "$ac_t""${ac_t:-
4879 }$am_cv_proto_iconv" 1>&6
4880 cat >> confdefs.h <<EOF
4881 #define ICONV_CONST $am_cv_proto_iconv_arg1
4886 if test "$am_cv_lib_iconv" = yes; then
4887 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4892 # We will need to find libiberty.h and ansidecl.h
4893 saved_CFLAGS="$CFLAGS"
4894 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4895 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4896 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4897 fprintf_unlocked strstr errno vasprintf \
4898 malloc realloc calloc free basename getopt clock
4900 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4901 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4902 echo "configure:4903: checking whether $ac_func is declared" >&5
4903 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4904 echo $ac_n "(cached) $ac_c" 1>&6
4906 cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4910 #define $ac_tr_decl 1
4912 #include "ansidecl.h"
4917 char *(*pfn) = (char *(*)) $ac_func ;
4921 if { (eval echo configure:4922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4923 eval "gcc_cv_have_decl_$ac_func=yes"
4925 echo "configure: failed program was:" >&5
4926 cat conftest.$ac_ext >&5
4928 eval "gcc_cv_have_decl_$ac_func=no"
4933 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4934 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4935 #define $ac_tr_decl 1
4939 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4940 #define $ac_tr_decl 0
4946 if test x = y ; then
4947 cat >> confdefs.h <<\EOF
4948 #define HAVE_DECL_GETENV 1
4950 cat >> confdefs.h <<\EOF
4951 #define HAVE_DECL_ATOL 1
4953 cat >> confdefs.h <<\EOF
4954 #define HAVE_DECL_SBRK 1
4956 cat >> confdefs.h <<\EOF
4957 #define HAVE_DECL_ABORT 1
4959 cat >> confdefs.h <<\EOF
4960 #define HAVE_DECL_ATOF 1
4962 cat >> confdefs.h <<\EOF
4963 #define HAVE_DECL_GETCWD 1
4965 cat >> confdefs.h <<\EOF
4966 #define HAVE_DECL_GETWD 1
4969 cat >> confdefs.h <<\EOF
4970 #define HAVE_DECL_STRSIGNAL 1
4972 cat >> confdefs.h <<\EOF
4973 #define HAVE_DECL_PUTC_UNLOCKED 1
4975 cat >> confdefs.h <<\EOF
4976 #define HAVE_DECL_FPUTS_UNLOCKED 1
4978 cat >> confdefs.h <<\EOF
4979 #define HAVE_DECL_FWRITE_UNLOCKED 1
4982 cat >> confdefs.h <<\EOF
4983 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4985 cat >> confdefs.h <<\EOF
4986 #define HAVE_DECL_STRSTR 1
4988 cat >> confdefs.h <<\EOF
4989 #define HAVE_DECL_ERRNO 1
4991 cat >> confdefs.h <<\EOF
4992 #define HAVE_DECL_VASPRINTF 1
4995 cat >> confdefs.h <<\EOF
4996 #define HAVE_DECL_MALLOC 1
4998 cat >> confdefs.h <<\EOF
4999 #define HAVE_DECL_REALLOC 1
5001 cat >> confdefs.h <<\EOF
5002 #define HAVE_DECL_CALLOC 1
5004 cat >> confdefs.h <<\EOF
5005 #define HAVE_DECL_FREE 1
5007 cat >> confdefs.h <<\EOF
5008 #define HAVE_DECL_BASENAME 1
5010 cat >> confdefs.h <<\EOF
5011 #define HAVE_DECL_GETOPT 1
5013 cat >> confdefs.h <<\EOF
5014 #define HAVE_DECL_CLOCK 1
5019 for ac_func in getrlimit setrlimit getrusage
5021 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5022 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5023 echo "configure:5024: checking whether $ac_func is declared" >&5
5024 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5025 echo $ac_n "(cached) $ac_c" 1>&6
5027 cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5031 #define $ac_tr_decl 1
5033 #include "ansidecl.h"
5035 #ifdef HAVE_SYS_RESOURCE_H
5036 #include <sys/resource.h>
5042 char *(*pfn) = (char *(*)) $ac_func ;
5046 if { (eval echo configure:5047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5048 eval "gcc_cv_have_decl_$ac_func=yes"
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5053 eval "gcc_cv_have_decl_$ac_func=no"
5058 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5059 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5060 #define $ac_tr_decl 1
5064 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5065 #define $ac_tr_decl 0
5071 if test x = y ; then
5072 cat >> confdefs.h <<\EOF
5073 #define HAVE_DECL_GETRLIMIT 1
5075 cat >> confdefs.h <<\EOF
5076 #define HAVE_DECL_SETRLIMIT 1
5078 cat >> confdefs.h <<\EOF
5079 #define HAVE_DECL_GETRUSAGE 1
5084 cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5088 #include "ansidecl.h"
5090 #ifdef HAVE_SYS_RESOURCE_H
5091 #include <sys/resource.h>
5098 if { (eval echo configure:5099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5101 echo "configure: failed program was:" >&5
5102 cat conftest.$ac_ext >&5
5104 cat >> confdefs.h <<\EOF
5111 for ac_func in ldgetname
5113 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5114 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5115 echo "configure:5116: checking whether $ac_func is declared" >&5
5116 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5117 echo $ac_n "(cached) $ac_c" 1>&6
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5123 #define $ac_tr_decl 1
5125 #include "ansidecl.h"
5134 char *(*pfn) = (char *(*)) $ac_func ;
5138 if { (eval echo configure:5139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5140 eval "gcc_cv_have_decl_$ac_func=yes"
5142 echo "configure: failed program was:" >&5
5143 cat conftest.$ac_ext >&5
5145 eval "gcc_cv_have_decl_$ac_func=no"
5150 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5151 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5152 #define $ac_tr_decl 1
5156 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5157 #define $ac_tr_decl 0
5163 if test x = y ; then
5164 cat >> confdefs.h <<\EOF
5165 #define HAVE_DECL_LDGETNAME 1
5170 for ac_func in times
5172 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5173 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5174 echo "configure:5175: checking whether $ac_func is declared" >&5
5175 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5176 echo $ac_n "(cached) $ac_c" 1>&6
5178 cat > conftest.$ac_ext <<EOF
5179 #line 5180 "configure"
5180 #include "confdefs.h"
5182 #define $ac_tr_decl 1
5184 #include "ansidecl.h"
5186 #ifdef HAVE_SYS_TIMES_H
5187 #include <sys/times.h>
5193 char *(*pfn) = (char *(*)) $ac_func ;
5197 if { (eval echo configure:5198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199 eval "gcc_cv_have_decl_$ac_func=yes"
5201 echo "configure: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5204 eval "gcc_cv_have_decl_$ac_func=no"
5209 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5210 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5211 #define $ac_tr_decl 1
5215 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5216 #define $ac_tr_decl 0
5222 if test x = y ; then
5223 cat >> confdefs.h <<\EOF
5224 #define HAVE_DECL_TIMES 1
5229 # More time-related stuff.
5230 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5231 echo "configure:5232: checking for struct tms" >&5
5232 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5233 echo $ac_n "(cached) $ac_c" 1>&6
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5238 "configure"
5238 #include "confdefs.h"
5240 #include "ansidecl.h"
5242 #ifdef HAVE_SYS_TIMES_H
5243 #include <sys/times.h>
5250 if { (eval echo configure:5251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5252 ac_cv_struct_tms=yes
5254 echo "configure: failed program was:" >&5
5255 cat conftest.$ac_ext >&5
5262 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5263 if test $ac_cv_struct_tms = yes; then
5264 cat >> confdefs.h <<\EOF
5265 #define HAVE_STRUCT_TMS 1
5270 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5271 # revisit after autoconf 2.50.
5272 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5273 echo "configure:5274: checking for clock_t" >&5
5274 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5275 echo $ac_n "(cached) $ac_c" 1>&6
5278 cat > conftest.$ac_ext <<EOF
5279 #line 5280 "configure"
5280 #include "confdefs.h"
5282 #include "ansidecl.h"
5289 if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5291 gcc_cv_type_clock_t=yes
5293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5296 gcc_cv_type_clock_t=no
5301 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5302 if test $gcc_cv_type_clock_t = yes; then
5303 cat >> confdefs.h <<\EOF
5304 #define HAVE_CLOCK_T 1
5309 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5310 echo "configure:5311: checking for uchar" >&5
5311 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5312 echo $ac_n "(cached) $ac_c" 1>&6
5314 cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5318 #include "ansidecl.h"
5322 if ((uchar *)0) return 0;
5323 if (sizeof(uchar)) return 0;
5326 if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5328 ac_cv_type_uchar=yes
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5338 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5339 if test $ac_cv_type_uchar = yes; then
5340 cat >> confdefs.h <<\EOF
5341 #define HAVE_UCHAR 1
5346 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5347 CFLAGS="$saved_CFLAGS"
5349 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5350 if test "${enable_initfini_array+set}" = set; then
5351 enableval="$enable_initfini_array"
5355 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5356 echo "configure:5357: checking for .preinit_array/.init_array/.fini_array support" >&5
5357 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5358 echo $ac_n "(cached) $ac_c" 1>&6
5360 if test "$cross_compiling" = yes; then
5361 gcc_cv_initfini_array=no
5363 cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5368 int main (void) { return x; }
5369 int foo (void) { x = 0; }
5370 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5374 gcc_cv_initfini_array=yes
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5379 gcc_cv_initfini_array=no
5386 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5387 enable_initfini_array=$gcc_cv_initfini_array
5391 if test $enable_initfini_array = yes; then
5392 cat >> confdefs.h <<\EOF
5393 #define HAVE_INITFINI_ARRAY 1
5398 # mkdir takes a single argument on some systems.
5399 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5400 echo "configure:5401: checking if mkdir takes one argument" >&5
5401 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5402 echo $ac_n "(cached) $ac_c" 1>&6
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5408 #include <sys/types.h>
5409 #ifdef HAVE_SYS_STAT_H
5410 # include <sys/stat.h>
5412 #ifdef HAVE_UNISTD_H
5413 # include <unistd.h>
5415 #ifdef HAVE_DIRECT_H
5416 # include <direct.h>
5422 if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5424 gcc_cv_mkdir_takes_one_arg=no
5426 echo "configure: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
5429 gcc_cv_mkdir_takes_one_arg=yes
5434 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5435 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5436 cat >> confdefs.h <<\EOF
5437 #define MKDIR_TAKES_ONE_ARG 1
5449 # With Setjmp/Longjmp based exception handling.
5450 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5451 if test "${enable_sjlj_exceptions+set}" = set; then
5452 enableval="$enable_sjlj_exceptions"
5453 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5454 cat >> confdefs.h <<EOF
5455 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5461 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5462 echo "configure:5463: checking for main in -lunwind" >&5
5463 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5464 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5465 echo $ac_n "(cached) $ac_c" 1>&6
5467 ac_save_LIBS="$LIBS"
5468 LIBS="-lunwind $LIBS"
5469 cat > conftest.$ac_ext <<EOF
5470 #line 5471 "configure"
5471 #include "confdefs.h"
5477 if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5479 eval "ac_cv_lib_$ac_lib_var=yes"
5481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5484 eval "ac_cv_lib_$ac_lib_var=no"
5487 LIBS="$ac_save_LIBS"
5490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5491 echo "$ac_t""yes" 1>&6
5492 use_libunwind_default=yes
5494 echo "$ac_t""no" 1>&6
5495 use_libunwind_default=no
5498 # Use libunwind based exception handling.
5499 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5500 if test "${enable_libunwind_exceptions+set}" = set; then
5501 enableval="$enable_libunwind_exceptions"
5502 use_libunwind_exceptions=$enableval
5504 use_libunwind_exceptions=$use_libunwind_default
5507 if test x"$use_libunwind_exceptions" = xyes; then
5508 cat >> confdefs.h <<\EOF
5509 #define USE_LIBUNWIND_EXCEPTIONS 1
5514 # --------------------------------------------------------
5515 # Build, host, and target specific configuration fragments
5516 # --------------------------------------------------------
5521 build_install_headers_dir=install-headers-tar
5526 host_truncate_target=
5529 # Decode the host machine, then the target machine.
5530 # For the host machine, we save the xm_file variable as host_xm_file;
5531 # then we decode the target machine and forget everything else
5532 # that came from the host machine.
5533 for machine in $build $host $target; do
5534 . ${srcdir}/config.gcc
5537 extra_objs="${host_extra_objs} ${extra_objs}"
5539 # Default the target-machine variables that were not explicitly set.
5540 if test x"$tm_file" = x
5541 then tm_file=$cpu_type/$cpu_type.h; fi
5543 if test x"$extra_headers" = x
5544 then extra_headers=; fi
5546 if test x$md_file = x
5547 then md_file=$cpu_type/$cpu_type.md; fi
5549 if test x$out_file = x
5550 then out_file=$cpu_type/$cpu_type.c; fi
5552 if test x"$tmake_file" = x
5553 then tmake_file=$cpu_type/t-$cpu_type
5556 if test x"$dwarf2" = xyes
5557 then tm_file="$tm_file tm-dwarf2.h"
5560 # Say what files are being used for the output code and MD file.
5561 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5562 echo "Using \`$srcdir/config/$md_file' as machine description file."
5564 # If any of the xm_file variables contain nonexistent files, warn
5565 # about them and drop them.
5568 for x in $build_xm_file; do
5569 if test -f $srcdir/config/$x
5571 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5577 for x in $host_xm_file; do
5578 if test -f $srcdir/config/$x
5580 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5586 for x in $xm_file; do
5587 if test -f $srcdir/config/$x
5589 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5595 for f in $tm_file; do
5598 if test $count = ax; then
5599 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5601 echo "Using the following target machine macro files:"
5602 for f in $tm_file; do
5603 echo " $srcdir/config/$f"
5607 if test x$need_64bit_hwint = xyes; then
5608 cat >> confdefs.h <<\EOF
5609 #define NEED_64BIT_HOST_WIDE_INT 1
5615 for f in $host_xm_file; do
5618 if test $count = a; then
5620 elif test $count = ax; then
5621 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5623 echo "Using the following host machine macro files:"
5624 for f in $host_xm_file; do
5625 echo " $srcdir/config/$f"
5628 echo "Using ${out_host_hook_obj} for host machine hooks."
5630 if test "$host_xm_file" != "$build_xm_file"; then
5632 for f in $build_xm_file; do
5635 if test $count = a; then
5637 elif test $count = ax; then
5638 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5640 echo "Using the following build machine macro files:"
5641 for f in $build_xm_file; do
5642 echo " $srcdir/config/$f"
5647 if test x$thread_file = x; then
5648 if test x$target_thread_file != x; then
5649 thread_file=$target_thread_file
5651 thread_file='single'
5655 if test x$enable___cxa_atexit = xyes || \
5656 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5657 cat >> confdefs.h <<\EOF
5658 #define DEFAULT_USE_CXA_ATEXIT 1
5663 # Look for a file containing extra machine modes.
5664 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5665 extra_modes_file='$(srcdir)'/config/${extra_modes}
5667 cat >> confdefs.h <<EOF
5668 #define EXTRA_MODES_FILE "$extra_modes"
5671 cat >> confdefs.h <<\EOF
5672 #define EXTRA_CC_MODES 1
5677 # auto-host.h is the file containing items generated by autoconf and is
5678 # the first file included by config.h.
5679 # If host=build, it is correct to have bconfig include auto-host.h
5680 # as well. If host!=build, we are in error and need to do more
5681 # work to find out the build config parameters.
5682 if test x$host = x$build
5684 build_auto=auto-host.h
5687 # We create a subdir, then run autoconf in the subdir.
5688 # To prevent recursion we set host and build for the new
5689 # invocation of configure to the build for this invocation
5696 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5697 *) realsrcdir=../${srcdir};;
5699 saved_CFLAGS="${CFLAGS}"
5700 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5701 ${realsrcdir}/configure \
5702 --target=$target_alias --host=$build_alias --build=$build_alias
5703 CFLAGS="${saved_CFLAGS}"
5705 # We just finished tests for the build machine, so rename
5706 # the file auto-build.h in the gcc directory.
5707 mv auto-host.h ../auto-build.h
5710 build_auto=auto-build.h
5711 FORBUILD=../build-$build_alias
5715 tm_file="${tm_file} defaults.h"
5716 tm_p_file="${tm_p_file} tm-preds.h"
5717 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5718 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5719 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5720 # put this back in temporarily.
5721 xm_file="ansidecl.h ${xm_file}"
5727 # Truncate the target if necessary
5728 if test x$host_truncate_target != x; then
5729 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5732 # Get the version trigger filename from the toplevel
5733 if test "${with_gcc_version_trigger+set}" = set; then
5734 gcc_version_trigger=$with_gcc_version_trigger
5736 gcc_version_trigger=${srcdir}/version.c
5738 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5739 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5741 # Compile in configure arguments.
5742 if test -f configargs.h ; then
5743 # Being re-configured.
5744 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5745 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5747 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5749 cat > configargs.h <<EOF
5750 /* Generated automatically. */
5751 static const char configuration_arguments[] = "$gcc_config_arguments";
5752 static const char thread_model[] = "$thread_file";
5755 # Internationalization
5757 VERSION="$gcc_version"
5761 # Enable NLS support by default
5762 # Check whether --enable-nls or --disable-nls was given.
5763 if test "${enable_nls+set}" = set; then
5764 enableval="$enable_nls"
5771 # if cross compiling, disable NLS support.
5772 # It's not worth the trouble, at least for now.
5774 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5775 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5781 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5782 echo "configure:5783: checking for library containing strerror" >&5
5783 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5784 echo $ac_n "(cached) $ac_c" 1>&6
5786 ac_func_search_save_LIBS="$LIBS"
5787 ac_cv_search_strerror="no"
5788 cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* Override any gcc2 internal prototype to avoid an error. */
5792 /* We use char because int might match the return type of a gcc2
5793 builtin and then its argument prototype would still apply. */
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802 ac_cv_search_strerror="none required"
5804 echo "configure: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5808 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5809 LIBS="-l$i $ac_func_search_save_LIBS"
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 /* Override any gcc2 internal prototype to avoid an error. */
5814 /* We use char because int might match the return type of a gcc2
5815 builtin and then its argument prototype would still apply. */
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5824 ac_cv_search_strerror="-l$i"
5827 echo "configure: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
5832 LIBS="$ac_func_search_save_LIBS"
5835 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5836 if test "$ac_cv_search_strerror" != "no"; then
5837 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5844 echo $ac_n "checking for working const""... $ac_c" 1>&6
5845 echo "configure:5846: checking for working const" >&5
5846 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5847 echo $ac_n "(cached) $ac_c" 1>&6
5849 cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5855 /* Ultrix mips cc rejects this. */
5856 typedef int charset[2]; const charset x;
5857 /* SunOS 4.1.1 cc rejects this. */
5858 char const *const *ccp;
5860 /* NEC SVR4.0.2 mips cc rejects this. */
5861 struct point {int x, y;};
5862 static struct point const zero = {0,0};
5863 /* AIX XL C 1.02.0.0 rejects this.
5864 It does not let you subtract one const X* pointer from another in an arm
5865 of an if-expression whose if-part is not a constant expression */
5866 const char *g = "string";
5867 ccp = &g + (g ? g-g : 0);
5868 /* HPUX 7.0 cc rejects these. */
5871 ccp = (char const *const *) p;
5872 { /* SCO 3.2v4 cc rejects this. */
5874 char const *s = 0 ? (char *) 0 : (char const *) 0;
5878 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5880 const int *foo = &x[0];
5883 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5884 typedef const int *iptr;
5888 { /* AIX XL C 1.02.0.0 rejects this saying
5889 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5890 struct s { int j; const int *ap[3]; };
5891 struct s *b; b->j = 5;
5893 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5899 if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5903 echo "configure: failed program was:" >&5
5904 cat conftest.$ac_ext >&5
5911 echo "$ac_t""$ac_cv_c_const" 1>&6
5912 if test $ac_cv_c_const = no; then
5913 cat >> confdefs.h <<\EOF
5919 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5920 echo "configure:5921: checking for off_t" >&5
5921 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5922 echo $ac_n "(cached) $ac_c" 1>&6
5924 cat > conftest.$ac_ext <<EOF
5925 #line 5926 "configure"
5926 #include "confdefs.h"
5927 #include <sys/types.h>
5933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5934 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5936 ac_cv_type_off_t=yes
5944 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5945 if test $ac_cv_type_off_t = no; then
5946 cat >> confdefs.h <<\EOF
5952 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5953 echo "configure:5954: checking for size_t" >&5
5954 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5955 echo $ac_n "(cached) $ac_c" 1>&6
5957 cat > conftest.$ac_ext <<EOF
5958 #line 5959 "configure"
5959 #include "confdefs.h"
5960 #include <sys/types.h>
5966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5967 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5969 ac_cv_type_size_t=yes
5972 ac_cv_type_size_t=no
5977 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5978 if test $ac_cv_type_size_t = no; then
5979 cat >> confdefs.h <<\EOF
5980 #define size_t unsigned
5985 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5986 # for constant arguments. Useless!
5987 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5988 echo "configure:5989: checking for working alloca.h" >&5
5989 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5990 echo $ac_n "(cached) $ac_c" 1>&6
5992 cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5997 char *p = alloca(2 * sizeof(int));
6000 if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6002 ac_cv_header_alloca_h=yes
6004 echo "configure: failed program was:" >&5
6005 cat conftest.$ac_ext >&5
6007 ac_cv_header_alloca_h=no
6012 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6013 if test $ac_cv_header_alloca_h = yes; then
6014 cat >> confdefs.h <<\EOF
6015 #define HAVE_ALLOCA_H 1
6020 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6021 echo "configure:6022: checking for alloca" >&5
6022 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6023 echo $ac_n "(cached) $ac_c" 1>&6
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6030 # define alloca __builtin_alloca
6033 # include <malloc.h>
6034 # define alloca _alloca
6037 # include <alloca.h>
6042 # ifndef alloca /* predefined by HP cc +Olibcalls */
6051 char *p = (char *) alloca(1);
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6056 ac_cv_func_alloca_works=yes
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6061 ac_cv_func_alloca_works=no
6066 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6067 if test $ac_cv_func_alloca_works = yes; then
6068 cat >> confdefs.h <<\EOF
6069 #define HAVE_ALLOCA 1
6074 if test $ac_cv_func_alloca_works = no; then
6075 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6076 # that cause trouble. Some versions do not even contain alloca or
6077 # contain a buggy version. If you still want to use their alloca,
6078 # use ar to extract alloca.o from them instead of compiling alloca.c.
6079 ALLOCA=alloca.${ac_objext}
6080 cat >> confdefs.h <<\EOF
6085 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6086 echo "configure:6087: checking whether alloca needs Cray hooks" >&5
6087 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6088 echo $ac_n "(cached) $ac_c" 1>&6
6090 cat > conftest.$ac_ext <<EOF
6091 #line 6092 "configure"
6092 #include "confdefs.h"
6093 #if defined(CRAY) && ! defined(CRAY2)
6100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6101 egrep "webecray" >/dev/null 2>&1; then
6112 echo "$ac_t""$ac_cv_os_cray" 1>&6
6113 if test $ac_cv_os_cray = yes; then
6114 for ac_func in _getb67 GETB67 getb67; do
6115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6116 echo "configure:6117: checking for $ac_func" >&5
6117 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6118 echo $ac_n "(cached) $ac_c" 1>&6
6120 cat > conftest.$ac_ext <<EOF
6121 #line 6122 "configure"
6122 #include "confdefs.h"
6123 /* System header to define __stub macros and hopefully few prototypes,
6124 which can conflict with char $ac_func(); below. */
6126 /* Override any gcc2 internal prototype to avoid an error. */
6127 /* We use char because int might match the return type of a gcc2
6128 builtin and then its argument prototype would still apply. */
6133 /* The GNU C library defines this for functions which it implements
6134 to always fail with ENOSYS. Some functions are actually named
6135 something starting with __ and the normal name is an alias. */
6136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6144 if { (eval echo configure:6145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6146 eval "ac_cv_func_$ac_func=yes"
6148 echo "configure: failed program was:" >&5
6149 cat conftest.$ac_ext >&5
6151 eval "ac_cv_func_$ac_func=no"
6156 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6157 echo "$ac_t""yes" 1>&6
6158 cat >> confdefs.h <<EOF
6159 #define CRAY_STACKSEG_END $ac_func
6164 echo "$ac_t""no" 1>&6
6170 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6171 echo "configure:6172: checking stack direction for C alloca" >&5
6172 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6173 echo $ac_n "(cached) $ac_c" 1>&6
6175 if test "$cross_compiling" = yes; then
6176 ac_cv_c_stack_direction=0
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181 find_stack_direction ()
6183 static char *addr = 0;
6188 return find_stack_direction ();
6191 return (&dummy > addr) ? 1 : -1;
6195 exit (find_stack_direction() < 0);
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6200 ac_cv_c_stack_direction=1
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6205 ac_cv_c_stack_direction=-1
6212 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6213 cat >> confdefs.h <<EOF
6214 #define STACK_DIRECTION $ac_cv_c_stack_direction
6220 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6221 echo "configure:6222: checking whether we are using the GNU C Library 2.1 or newer" >&5
6222 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6223 echo $ac_n "(cached) $ac_c" 1>&6
6225 cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6229 #include <features.h>
6230 #ifdef __GNU_LIBRARY__
6231 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6238 egrep "Lucky GNU user" >/dev/null 2>&1; then
6240 ac_cv_gnu_library_2_1=yes
6243 ac_cv_gnu_library_2_1=no
6251 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6253 GLIBC21="$ac_cv_gnu_library_2_1"
6257 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6258 stdlib.h string.h unistd.h sys/param.h
6260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6262 echo "configure:6263: checking for $ac_hdr" >&5
6263 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6264 echo $ac_n "(cached) $ac_c" 1>&6
6266 cat > conftest.$ac_ext <<EOF
6267 #line 6268 "configure"
6268 #include "confdefs.h"
6271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6272 { (eval echo configure:6273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6274 if test -z "$ac_err"; then
6276 eval "ac_cv_header_$ac_safe=yes"
6279 echo "configure: failed program was:" >&5
6280 cat conftest.$ac_ext >&5
6282 eval "ac_cv_header_$ac_safe=no"
6286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6287 echo "$ac_t""yes" 1>&6
6288 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6289 cat >> confdefs.h <<EOF
6290 #define $ac_tr_hdr 1
6294 echo "$ac_t""no" 1>&6
6298 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6299 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6300 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6303 echo "configure:6304: checking for $ac_func" >&5
6304 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6305 echo $ac_n "(cached) $ac_c" 1>&6
6307 cat > conftest.$ac_ext <<EOF
6308 #line 6309 "configure"
6309 #include "confdefs.h"
6310 /* System header to define __stub macros and hopefully few prototypes,
6311 which can conflict with char $ac_func(); below. */
6313 /* Override any gcc2 internal prototype to avoid an error. */
6314 /* We use char because int might match the return type of a gcc2
6315 builtin and then its argument prototype would still apply. */
6320 /* The GNU C library defines this for functions which it implements
6321 to always fail with ENOSYS. Some functions are actually named
6322 something starting with __ and the normal name is an alias. */
6323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333 eval "ac_cv_func_$ac_func=yes"
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6338 eval "ac_cv_func_$ac_func=no"
6343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6344 echo "$ac_t""yes" 1>&6
6345 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6346 cat >> confdefs.h <<EOF
6347 #define $ac_tr_func 1
6351 echo "$ac_t""no" 1>&6
6358 am_cv_lib_iconv_ldpath=
6359 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6360 if test "${with_libiconv_prefix+set}" = set; then
6361 withval="$with_libiconv_prefix"
6363 for dir in `echo "$withval" | tr : ' '`; do
6364 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6365 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6371 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6372 echo "configure:6373: checking for iconv" >&5
6373 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6374 echo $ac_n "(cached) $ac_c" 1>&6
6377 am_cv_func_iconv="no, consider installing GNU libiconv"
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6385 iconv_t cd = iconv_open("","");
6386 iconv(cd,NULL,NULL,NULL,NULL);
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6392 am_cv_func_iconv=yes
6394 echo "configure: failed program was:" >&5
6395 cat conftest.$ac_ext >&5
6398 if test "$am_cv_func_iconv" != yes; then
6399 am_save_LIBS="$LIBS"
6400 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6401 cat > conftest.$ac_ext <<EOF
6402 #line 6403 "configure"
6403 #include "confdefs.h"
6407 iconv_t cd = iconv_open("","");
6408 iconv(cd,NULL,NULL,NULL,NULL);
6412 if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6415 am_cv_func_iconv=yes
6417 echo "configure: failed program was:" >&5
6418 cat conftest.$ac_ext >&5
6421 LIBS="$am_save_LIBS"
6426 echo "$ac_t""$am_cv_func_iconv" 1>&6
6427 if test "$am_cv_func_iconv" = yes; then
6428 cat >> confdefs.h <<\EOF
6429 #define HAVE_ICONV 1
6432 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6433 echo "configure:6434: checking for iconv declaration" >&5
6434 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6435 echo $ac_n "(cached) $ac_c" 1>&6
6438 cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6448 #if defined(__STDC__) || defined(__cplusplus)
6449 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6458 if { (eval echo configure:6459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6460 am_cv_proto_iconv_arg1=""
6462 echo "configure: failed program was:" >&5
6463 cat conftest.$ac_ext >&5
6465 am_cv_proto_iconv_arg1="const"
6468 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
6471 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6472 echo "$ac_t""${ac_t:-
6473 }$am_cv_proto_iconv" 1>&6
6474 cat >> confdefs.h <<EOF
6475 #define ICONV_CONST $am_cv_proto_iconv_arg1
6480 if test "$am_cv_lib_iconv" = yes; then
6481 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6486 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6487 echo "configure:6488: checking for nl_langinfo and CODESET" >&5
6488 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6489 echo $ac_n "(cached) $ac_c" 1>&6
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 #include <langinfo.h>
6496 char* cs = nl_langinfo(CODESET);
6499 if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6501 am_cv_langinfo_codeset=yes
6503 echo "configure: failed program was:" >&5
6504 cat conftest.$ac_ext >&5
6506 am_cv_langinfo_codeset=no
6512 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6513 if test $am_cv_langinfo_codeset = yes; then
6514 cat >> confdefs.h <<\EOF
6515 #define HAVE_LANGINFO_CODESET 1
6520 if test $ac_cv_header_locale_h = yes; then
6521 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6522 echo "configure:6523: checking for LC_MESSAGES" >&5
6523 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6524 echo $ac_n "(cached) $ac_c" 1>&6
6526 cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6534 if { (eval echo configure:6535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6536 am_cv_val_LC_MESSAGES=yes
6538 echo "configure: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6541 am_cv_val_LC_MESSAGES=no
6546 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6547 if test $am_cv_val_LC_MESSAGES = yes; then
6548 cat >> confdefs.h <<\EOF
6549 #define HAVE_LC_MESSAGES 1
6554 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6555 echo "configure:6556: checking whether NLS is requested" >&5
6556 # Check whether --enable-nls or --disable-nls was given.
6557 if test "${enable_nls+set}" = set; then
6558 enableval="$enable_nls"
6564 echo "$ac_t""$USE_NLS" 1>&6
6567 BUILD_INCLUDED_LIBINTL=no
6568 USE_INCLUDED_LIBINTL=no
6572 if test "$USE_NLS" = "yes"; then
6573 cat >> confdefs.h <<\EOF
6574 #define ENABLE_NLS 1
6577 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6578 echo "configure:6579: checking whether included gettext is requested" >&5
6579 # Check whether --with-included-gettext or --without-included-gettext was given.
6580 if test "${with_included_gettext+set}" = set; then
6581 withval="$with_included_gettext"
6582 nls_cv_force_use_gnu_gettext=$withval
6584 nls_cv_force_use_gnu_gettext=no
6587 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6589 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6590 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6596 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6597 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6598 echo "configure:6599: checking for libintl.h" >&5
6599 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6600 echo $ac_n "(cached) $ac_c" 1>&6
6602 cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 #include <libintl.h>
6607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6608 { (eval echo configure:6609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6610 if test -z "$ac_err"; then
6612 eval "ac_cv_header_$ac_safe=yes"
6615 echo "configure: failed program was:" >&5
6616 cat conftest.$ac_ext >&5
6618 eval "ac_cv_header_$ac_safe=no"
6622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6623 echo "$ac_t""yes" 1>&6
6624 cat >> confdefs.h <<\EOF
6625 #define HAVE_LIBINTL_H 1
6628 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6629 echo "configure:6630: checking for GNU gettext in libc" >&5
6630 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6631 echo $ac_n "(cached) $ac_c" 1>&6
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6636 #include <libintl.h>
6637 extern int _nl_msg_cat_cntr;
6639 bindtextdomain ("", "");
6640 return (int) gettext ("") + _nl_msg_cat_cntr
6643 if { (eval echo configure:6644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645 gt_cv_func_gnugettext1_libc=yes
6647 echo "configure: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
6650 gt_cv_func_gnugettext1_libc=no
6655 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6657 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6658 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6659 echo "configure:6660: checking for GNU gettext in libintl" >&5
6660 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6661 echo $ac_n "(cached) $ac_c" 1>&6
6663 gt_save_LIBS="$LIBS"
6664 LIBS="$LIBS -lintl $LIBICONV"
6665 cat > conftest.$ac_ext <<EOF
6666 #line 6667 "configure"
6667 #include "confdefs.h"
6668 #include <libintl.h>
6669 extern int _nl_msg_cat_cntr;
6671 bindtextdomain ("", "");
6672 return (int) gettext ("") + _nl_msg_cat_cntr
6675 if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6677 gt_cv_func_gnugettext1_libintl=yes
6679 echo "configure: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6682 gt_cv_func_gnugettext1_libintl=no
6685 LIBS="$gt_save_LIBS"
6688 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6691 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6692 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6693 && test "$PACKAGE" != gettext; }; then
6694 cat >> confdefs.h <<\EOF
6695 #define HAVE_GETTEXT 1
6699 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6700 INTLLIBS="-lintl $LIBICONV"
6703 gt_save_LIBS="$LIBS"
6704 LIBS="$LIBS $INTLLIBS"
6705 for ac_func in dcgettext
6707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6708 echo "configure:6709: checking for $ac_func" >&5
6709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6710 echo $ac_n "(cached) $ac_c" 1>&6
6712 cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 /* System header to define __stub macros and hopefully few prototypes,
6716 which can conflict with char $ac_func(); below. */
6718 /* Override any gcc2 internal prototype to avoid an error. */
6719 /* We use char because int might match the return type of a gcc2
6720 builtin and then its argument prototype would still apply. */
6725 /* The GNU C library defines this for functions which it implements
6726 to always fail with ENOSYS. Some functions are actually named
6727 something starting with __ and the normal name is an alias. */
6728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6738 eval "ac_cv_func_$ac_func=yes"
6740 echo "configure: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6743 eval "ac_cv_func_$ac_func=no"
6748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6749 echo "$ac_t""yes" 1>&6
6750 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6751 cat >> confdefs.h <<EOF
6752 #define $ac_tr_func 1
6756 echo "$ac_t""no" 1>&6
6760 LIBS="$gt_save_LIBS"
6762 # Extract the first word of "msgfmt", so it can be a program name with args.
6763 set dummy msgfmt; ac_word=$2
6764 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6765 echo "configure:6766: checking for $ac_word" >&5
6766 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6767 echo $ac_n "(cached) $ac_c" 1>&6
6771 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6775 for ac_dir in $PATH; do
6776 test -z "$ac_dir" && ac_dir=.
6777 if test -f $ac_dir/$ac_word; then
6778 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6779 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6785 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6789 MSGFMT="$ac_cv_path_MSGFMT"
6790 if test "$MSGFMT" != ":"; then
6791 echo "$ac_t""$MSGFMT" 1>&6
6793 echo "$ac_t""no" 1>&6
6796 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6797 set dummy gmsgfmt; ac_word=$2
6798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6799 echo "configure:6800: checking for $ac_word" >&5
6800 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6801 echo $ac_n "(cached) $ac_c" 1>&6
6805 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6808 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6811 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6813 for ac_dir in $ac_dummy; do
6814 test -z "$ac_dir" && ac_dir=.
6815 if test -f $ac_dir/$ac_word; then
6816 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6821 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6825 GMSGFMT="$ac_cv_path_GMSGFMT"
6826 if test -n "$GMSGFMT"; then
6827 echo "$ac_t""$GMSGFMT" 1>&6
6829 echo "$ac_t""no" 1>&6
6833 # Extract the first word of "xgettext", so it can be a program name with args.
6834 set dummy xgettext; ac_word=$2
6835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6836 echo "configure:6837: checking for $ac_word" >&5
6837 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6838 echo $ac_n "(cached) $ac_c" 1>&6
6842 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6845 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6846 for ac_dir in $PATH; do
6847 test -z "$ac_dir" && ac_dir=.
6848 if test -f $ac_dir/$ac_word; then
6849 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6850 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6856 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6860 XGETTEXT="$ac_cv_path_XGETTEXT"
6861 if test "$XGETTEXT" != ":"; then
6862 echo "$ac_t""$XGETTEXT" 1>&6
6864 echo "$ac_t""no" 1>&6
6872 echo "$ac_t""no" 1>&6
6876 if test "$CATOBJEXT" = "NONE"; then
6877 nls_cv_use_gnu_gettext=yes
6881 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6882 INTLOBJS="\$(GETTOBJS)"
6883 # Extract the first word of "msgfmt", so it can be a program name with args.
6884 set dummy msgfmt; ac_word=$2
6885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6886 echo "configure:6887: checking for $ac_word" >&5
6887 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6888 echo $ac_n "(cached) $ac_c" 1>&6
6892 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6895 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6896 for ac_dir in $PATH; do
6897 test -z "$ac_dir" && ac_dir=.
6898 if test -f $ac_dir/$ac_word; then
6899 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6900 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6906 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6910 MSGFMT="$ac_cv_path_MSGFMT"
6911 if test "$MSGFMT" != ":"; then
6912 echo "$ac_t""$MSGFMT" 1>&6
6914 echo "$ac_t""no" 1>&6
6917 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6918 set dummy gmsgfmt; ac_word=$2
6919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6920 echo "configure:6921: checking for $ac_word" >&5
6921 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6922 echo $ac_n "(cached) $ac_c" 1>&6
6926 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6929 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6934 for ac_dir in $ac_dummy; do
6935 test -z "$ac_dir" && ac_dir=.
6936 if test -f $ac_dir/$ac_word; then
6937 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6942 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6946 GMSGFMT="$ac_cv_path_GMSGFMT"
6947 if test -n "$GMSGFMT"; then
6948 echo "$ac_t""$GMSGFMT" 1>&6
6950 echo "$ac_t""no" 1>&6
6953 # Extract the first word of "xgettext", so it can be a program name with args.
6954 set dummy xgettext; ac_word=$2
6955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6956 echo "configure:6957: checking for $ac_word" >&5
6957 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6958 echo $ac_n "(cached) $ac_c" 1>&6
6962 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6966 for ac_dir in $PATH; do
6967 test -z "$ac_dir" && ac_dir=.
6968 if test -f $ac_dir/$ac_word; then
6969 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6970 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6976 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6980 XGETTEXT="$ac_cv_path_XGETTEXT"
6981 if test "$XGETTEXT" != ":"; then
6982 echo "$ac_t""$XGETTEXT" 1>&6
6984 echo "$ac_t""no" 1>&6
6988 BUILD_INCLUDED_LIBINTL=yes
6989 USE_INCLUDED_LIBINTL=yes
6991 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6992 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6993 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6996 if test "$GMSGFMT" != ":"; then
6997 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7000 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
7005 if test "$XGETTEXT" != ":"; then
7006 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7009 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
7019 if test "$PACKAGE" = gettext; then
7020 BUILD_INCLUDED_LIBINTL=yes
7023 for ac_prog in bison
7025 # Extract the first word of "$ac_prog", so it can be a program name with args.
7026 set dummy $ac_prog; ac_word=$2
7027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7028 echo "configure:7029: checking for $ac_word" >&5
7029 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
7030 echo $ac_n "(cached) $ac_c" 1>&6
7032 if test -n "$INTLBISON"; then
7033 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7035 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7037 for ac_dir in $ac_dummy; do
7038 test -z "$ac_dir" && ac_dir=.
7039 if test -f $ac_dir/$ac_word; then
7040 ac_cv_prog_INTLBISON="$ac_prog"
7047 INTLBISON="$ac_cv_prog_INTLBISON"
7048 if test -n "$INTLBISON"; then
7049 echo "$ac_t""$INTLBISON" 1>&6
7051 echo "$ac_t""no" 1>&6
7054 test -n "$INTLBISON" && break
7057 if test -z "$INTLBISON"; then
7060 echo $ac_n "checking version of bison""... $ac_c" 1>&6
7061 echo "configure:7062: checking version of bison" >&5
7062 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7063 case $ac_prog_version in
7064 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7065 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7066 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7067 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7069 echo "$ac_t""$ac_prog_version" 1>&6
7071 if test $ac_verc_fail = yes; then
7084 if test $USE_INCLUDED_LIBINTL = yes; then
7085 cat >> confdefs.h <<\EOF
7086 #define USE_INCLUDED_LIBINTL 1
7092 nls_cv_header_libgt=
7104 if test "x$CATOBJEXT" != x; then
7105 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
7106 echo "configure:7107: checking for catalogs to be installed" >&5
7107 # Look for .po and .gmo files in the source directory.
7110 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
7111 # If there aren't any .gmo files the shell will give us the
7112 # literal string "../path/to/srcdir/po/*.gmo" which has to be
7114 case "$cat" in *\**)
7117 # The quadruple backslash is collapsed to a double backslash
7118 # by the backticks, then collapsed again by the double quotes,
7119 # leaving us with one backslash in the sed expression (right
7120 # before the dot that mustn't act as a wildcard). The dot to
7121 # be escaped in the second expression is hiding inside CATOBJEXT.
7122 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
7123 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
7124 # The user is allowed to set LINGUAS to a list of languages to
7125 # install catalogs for. If it's empty that means "all of them."
7126 if test "x$LINGUAS" = x; then
7127 CATALOGS="$CATALOGS $cat"
7128 XLINGUAS="$XLINGUAS $lang"
7130 case "$LINGUAS" in *$lang*)
7131 CATALOGS="$CATALOGS $cat"
7132 XLINGUAS="$XLINGUAS $lang"
7138 echo "$ac_t""$LINGUAS" 1>&6
7142 if test -n "$ac_aux_dir"; then
7143 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7145 if test -z "$MKINSTALLDIRS"; then
7146 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7150 INTL_LIBTOOL_SUFFIX_PREFIX=
7154 # Windows32 Registry support for specifying GCC installation paths.
7155 # Check whether --enable-win32-registry or --disable-win32-registry was given.
7156 if test "${enable_win32_registry+set}" = set; then
7157 enableval="$enable_win32_registry"
7162 win32 | pe | cygwin* | mingw32* | uwin*)
7163 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
7164 echo "configure:7165: checking whether windows registry support is requested" >&5
7165 if test "x$enable_win32_registry" != xno; then
7166 cat >> confdefs.h <<\EOF
7167 #define ENABLE_WIN32_REGISTRY 1
7170 echo "$ac_t""yes" 1>&6
7172 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7173 echo "configure:7174: checking for library containing RegOpenKeyExA" >&5
7174 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7175 echo $ac_n "(cached) $ac_c" 1>&6
7177 ac_func_search_save_LIBS="$LIBS"
7178 ac_cv_search_RegOpenKeyExA="no"
7179 cat > conftest.$ac_ext <<EOF
7180 #line 7181 "configure"
7181 #include "confdefs.h"
7182 /* Override any gcc2 internal prototype to avoid an error. */
7183 /* We use char because int might match the return type of a gcc2
7184 builtin and then its argument prototype would still apply. */
7185 char RegOpenKeyExA();
7191 if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193 ac_cv_search_RegOpenKeyExA="none required"
7195 echo "configure: failed program was:" >&5
7196 cat conftest.$ac_ext >&5
7199 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7200 LIBS="-l$i $ac_func_search_save_LIBS"
7201 cat > conftest.$ac_ext <<EOF
7202 #line 7203 "configure"
7203 #include "confdefs.h"
7204 /* Override any gcc2 internal prototype to avoid an error. */
7205 /* We use char because int might match the return type of a gcc2
7206 builtin and then its argument prototype would still apply. */
7207 char RegOpenKeyExA();
7213 if { (eval echo configure:7214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7215 ac_cv_search_RegOpenKeyExA="-l$i"
7218 echo "configure: failed program was:" >&5
7219 cat conftest.$ac_ext >&5
7223 LIBS="$ac_func_search_save_LIBS"
7226 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7227 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7228 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7234 echo "$ac_t""no" 1>&6
7237 # Check if user specified a different registry key.
7238 case "x${enable_win32_registry}" in
7241 gcc_cv_win32_registry_key="$VERSION"
7244 # no registry lookup.
7245 gcc_cv_win32_registry_key=''
7248 # user-specified key.
7249 gcc_cv_win32_registry_key="$enable_win32_registry"
7253 if test "x$enable_win32_registry" != xno; then
7254 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7255 echo "configure:7256: checking registry key on windows hosts" >&5
7256 cat >> confdefs.h <<EOF
7257 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7260 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7265 # Get an absolute path to the GCC top-level source directory
7266 holddir=`${PWDCMD-pwd}`
7268 topdir=`${PWDCMD-pwd}`
7271 # Conditionalize the makefile for this host machine.
7272 # Make-host contains the concatenation of all host makefile fragments
7273 # [there can be more than one]. This file is built by configure.frag.
7274 host_overrides=Make-host
7275 dep_host_xmake_file=
7276 for f in .. ${host_xmake_file}
7278 if test -f ${srcdir}/config/$f
7280 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7284 # Conditionalize the makefile for this target machine.
7285 # Make-target contains the concatenation of all host makefile fragments
7286 # [there can be more than one]. This file is built by configure.frag.
7287 target_overrides=Make-target
7289 for f in .. ${tmake_file}
7291 if test -f ${srcdir}/config/$f
7293 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7297 symbolic_link='ln -s'
7299 # If the host doesn't support symlinks, modify CC in
7300 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7301 # Otherwise, we can use "CC=$(CC)".
7303 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7305 cc_set_by_configure="\$(CC)"
7306 quoted_cc_set_by_configure="\$(CC)"
7307 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7308 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7311 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7313 symbolic_link="cp -p"
7317 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7318 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7319 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7320 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7324 out_object_file=`basename $out_file .c`.o
7327 for f in $tm_file; do
7330 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7332 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7333 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7338 for f in $tm_p_file; do
7341 tm_p_file_list="${tm_p_file_list} $f" ;;
7342 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7347 for f in $host_xm_file; do
7350 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7352 host_xm_file_list="${host_xm_file_list} $f" ;;
7354 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7355 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7360 for f in $build_xm_file; do
7363 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7364 auto-build.h | auto-host.h )
7365 build_xm_file_list="${build_xm_file_list} $f" ;;
7367 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7368 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7372 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7373 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7376 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7377 if test x$host != x$target
7379 CROSS="-DCROSS_COMPILE"
7381 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7382 case "$host","$target" in
7383 i?86-*-*,x86_64-*-* \
7384 | powerpc*-*-*,powerpc64*-*-*)
7385 CROSS="$CROSS -DNATIVE_CROSS" ;;
7387 elif test "x$TARGET_SYSTEM_ROOT" != x; then
7388 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
7389 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7392 # If this is a cross-compiler that does not
7393 # have its own set of headers then define
7396 # If this is using newlib, without having the headers available now,
7397 # then define inhibit_libc in LIBGCC2_CFLAGS.
7398 # This prevents libgcc2 from containing any code which requires libc
7401 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
7402 test x$with_newlib = xyes ; } &&
7403 test "x$with_headers" = x ; then
7404 inhibit_libc=-Dinhibit_libc
7408 # When building gcc with a cross-compiler, we need to adjust things so
7409 # that the generator programs are still built with the native compiler.
7410 # Also, we cannot run fixincludes or fix-header.
7412 # These are the normal (build=host) settings:
7414 BUILD_PREFIX_1=ignore-
7416 BUILD_CFLAGS='$(ALL_CFLAGS)'
7418 STMP_FIXINC=stmp-fixinc
7419 STMP_FIXPROTO=stmp-fixproto
7421 # And these apply if build != host.
7422 if test x$build != x$host
7425 BUILD_PREFIX_1=build-
7426 BUILD_CC='$(CC_FOR_BUILD)'
7427 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7429 if test "x$TARGET_SYSTEM_ROOT" = x; then
7435 # Expand extra_headers to include complete path.
7436 # This substitutes for lots of t-* files.
7438 if test "x$extra_headers" = x
7441 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7442 for file in $extra_headers;
7444 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7448 # Add a definition of USE_COLLECT2 if system wants one.
7449 case $use_collect2 in
7450 no) use_collect2= ;;
7453 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7454 xm_defines="${xm_defines} USE_COLLECT2"
7458 # Identify the assembler which will work hand-in-glove with the newly
7459 # built GCC, so that we can examine its features. This is the assembler
7460 # which will be driven by the driver program.
7462 # If build != host, and we aren't building gas in-tree, we identify a
7463 # build->target assembler and hope that it will have the same features
7464 # as the host->target assembler we'll be using.
7465 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7466 echo "configure:7467: checking what assembler to use" >&5
7469 gcc_cv_gas_major_version=
7470 gcc_cv_gas_minor_version=
7471 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7472 if test -x "$DEFAULT_ASSEMBLER"; then
7473 gcc_cv_as="$DEFAULT_ASSEMBLER"
7474 elif test -x "$AS"; then
7476 elif test -x as$host_exeext; then
7477 # Build using assembler in the current directory.
7478 gcc_cv_as=./as$host_exeext
7479 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7480 && test -f ../gas/Makefile; then
7481 # Single tree build which includes gas.
7483 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7484 for f in $gcc_cv_as_bfd_srcdir/configure \
7485 $gcc_cv_as_gas_srcdir/configure \
7486 $gcc_cv_as_gas_srcdir/configure.in \
7487 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7488 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7489 if test x$gcc_cv_gas_version != x; then
7493 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7494 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7495 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7497 rm -f as$host_exeext
7498 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7501 if test "x$gcc_cv_as" = x; then
7502 # Search the same directories that the installed compiler will
7503 # search. Else we may find the wrong assembler and lose. If we
7504 # do not find a suitable assembler binary, then try the user's
7507 # Also note we have to check MD_EXEC_PREFIX before checking the
7508 # user's path. Unfortunately, there is no good way to get at the
7509 # value of MD_EXEC_PREFIX here. So we do a brute force search
7510 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7511 # to be fixed as part of the make/configure rewrite too.
7513 if test "x$exec_prefix" = xNONE; then
7514 if test "x$prefix" = xNONE; then
7515 test_prefix=/usr/local
7520 test_prefix=$exec_prefix
7523 # If the loop below does not find an assembler, then use whatever
7524 # one we can find in the users's path.
7526 if test "x$program_prefix" != xNONE; then
7527 gcc_cv_as=${program_prefix}as$host_exeext
7529 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7532 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7533 $test_prefix/lib/gcc-lib/$target_alias \
7534 /usr/lib/gcc/$target_alias/$gcc_version \
7535 /usr/lib/gcc/$target_alias \
7536 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7537 $test_prefix/$target_alias/bin"
7539 if test x$host = x$target; then
7540 test_dirs="$test_dirs \
7545 /bsd43/usr/lib/cmplrs/cc \
7546 /usr/cross64/usr/bin \
7547 /usr/lib/cmplrs/cc \
7548 /sysv/usr/lib/cmplrs/cc \
7549 /svr4/usr/lib/cmplrs/cc \
7553 for dir in $test_dirs; do
7554 if test -x $dir/as$host_exeext; then
7555 gcc_cv_as=$dir/as$host_exeext
7560 case $in_tree_gas in
7562 echo "$ac_t"""newly built gas"" 1>&6
7565 echo "$ac_t""$gcc_cv_as" 1>&6
7569 # Identify the linker which will work hand-in-glove with the newly
7570 # built GCC, so that we can examine its features. This is the linker
7571 # which will be driven by the driver program.
7573 # If build != host, and we aren't building gas in-tree, we identify a
7574 # build->target linker and hope that it will have the same features
7575 # as the host->target linker we'll be using.
7576 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7577 echo "configure:7578: checking what linker to use" >&5
7580 gcc_cv_gld_major_version=
7581 gcc_cv_gld_minor_version=
7582 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7583 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7584 if test -x "$DEFAULT_LINKER"; then
7585 gcc_cv_ld="$DEFAULT_LINKER"
7586 elif test -x "$LD"; then
7588 elif test -x collect-ld$host_exeext; then
7589 # Build using linker in the current directory.
7590 gcc_cv_ld=./collect-ld$host_exeext
7591 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7592 && test -f ../ld/Makefile; then
7593 # Single tree build which includes ld.
7595 for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
7597 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7598 if test x$gcc_cv_gld_version != x; then
7602 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7603 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7604 rm -f collect-ld$host_exeext
7605 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7609 if test "x$gcc_cv_ld" = x; then
7610 # Search the same directories that the installed compiler will
7611 # search. Else we may find the wrong linker and lose. If we
7612 # do not find a suitable linker binary, then try the user's
7615 # Also note we have to check MD_EXEC_PREFIX before checking the
7616 # user's path. Unfortunately, there is no good way to get at the
7617 # value of MD_EXEC_PREFIX here. So we do a brute force search
7618 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7619 # to be fixed as part of the make/configure rewrite too.
7621 if test "x$exec_prefix" = xNONE; then
7622 if test "x$prefix" = xNONE; then
7623 test_prefix=/usr/local
7628 test_prefix=$exec_prefix
7631 # If the loop below does not find an linker, then use whatever
7632 # one we can find in the users's path.
7634 if test "x$program_prefix" != xNONE; then
7635 gcc_cv_ld=${program_prefix}ld$host_exeext
7637 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7640 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7641 $test_prefix/lib/gcc-lib/$target_alias \
7642 /usr/lib/gcc/$target_alias/$gcc_version \
7643 /usr/lib/gcc/$target_alias \
7644 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7645 $test_prefix/$target_alias/bin"
7647 if test x$host = x$target; then
7648 test_dirs="$test_dirs \
7653 /bsd43/usr/lib/cmplrs/cc \
7654 /usr/cross64/usr/bin \
7655 /usr/lib/cmplrs/cc \
7656 /sysv/usr/lib/cmplrs/cc \
7657 /svr4/usr/lib/cmplrs/cc \
7661 for dir in $test_dirs; do
7662 if test -x $dir/ld$host_exeext; then
7663 gcc_cv_ld=$dir/ld$host_exeext
7670 echo "$ac_t"""newly built ld"" 1>&6
7673 echo "$ac_t""$gcc_cv_ld" 1>&6
7677 # Figure out what nm we will be using.
7678 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7679 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7680 echo "configure:7681: checking what nm to use" >&5
7682 if test -x nm$host_exeext; then
7683 gcc_cv_nm=./nm$host_exeext
7684 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7685 && test -f ../binutils/Makefile; then
7686 # Single tree build which includes binutils.
7688 gcc_cv_nm=./nm$host_exeext
7689 rm -f nm$host_exeext
7690 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7691 elif test "x$program_prefix" != xNONE; then
7692 gcc_cv_nm=${program_prefix}nm$host_exeext
7694 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7697 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7698 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7701 # Figure out what objdump we will be using.
7702 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7703 echo "configure:7704: checking what objdump to use" >&5
7705 if test -x objdump$host_exeext; then
7706 gcc_cv_objdump=./objdump$host_exeext
7707 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7708 && test -f ../binutils/Makefile; then
7709 # Single tree build which includes binutils.
7711 gcc_cv_objdump=./objdump$host_exeext
7712 rm -f objdump$host_exeext
7713 $symbolic_link ../binutils/objdump$host_exeext \
7714 objdump$host_exeext 2>/dev/null
7715 elif test "x$program_prefix" != xNONE; then
7716 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7718 gcc_cv_objdump=`echo objdump | \
7719 sed ${program_transform_name}`$host_exeext
7721 case $in_tree_objdump in
7722 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7723 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7726 # Figure out what assembler alignment features are present.
7727 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7728 echo "configure:7729: checking assembler alignment features" >&5
7729 gcc_cv_as_alignment_features=none
7730 if test $in_tree_gas = yes; then
7731 # Gas version 2.6 and later support for .balign and .p2align.
7732 if test $gcc_cv_gas_major_version -eq 2 \
7733 && test $gcc_cv_gas_minor_version -ge 6 \
7734 || test $gcc_cv_gas_major_version -gt 2 ; then
7737 gcc_cv_as_alignment_features=".balign and .p2align"
7738 cat >> confdefs.h <<\EOF
7739 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7746 # Gas version 2.8 and later support specifying the maximum
7747 # bytes to skip when using .p2align.
7748 if test $gcc_cv_gas_major_version -eq 2 \
7749 && test $gcc_cv_gas_minor_version -ge 8 \
7750 || test $gcc_cv_gas_major_version -gt 2 ; then
7753 gcc_cv_as_alignment_features=".p2align including maximum skip"
7754 cat >> confdefs.h <<\EOF
7755 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7762 elif test x$gcc_cv_as != x; then
7763 # Check if we have .balign and .p2align
7764 echo ".balign 4" > conftest.s
7765 echo ".p2align 2" >> conftest.s
7766 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7767 gcc_cv_as_alignment_features=".balign and .p2align"
7768 cat >> confdefs.h <<\EOF
7769 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7773 rm -f conftest.s conftest.o
7774 # Check if specifying the maximum bytes to skip when
7775 # using .p2align is supported.
7776 echo ".p2align 4,,7" > conftest.s
7777 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7778 gcc_cv_as_alignment_features=".p2align including maximum skip"
7779 cat >> confdefs.h <<\EOF
7780 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7784 rm -f conftest.s conftest.o
7786 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7788 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7789 echo "configure:7790: checking assembler subsection support" >&5
7790 gcc_cv_as_subsections=no
7791 if test $in_tree_gas = yes ; then
7792 if test $gcc_cv_gas_major_version -eq 2 \
7793 && test $gcc_cv_gas_minor_version -ge 9 \
7794 || test $gcc_cv_gas_major_version -gt 2 ; then
7797 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7798 gcc_cv_as_subsections="working .subsection -1"
7804 elif test x$gcc_cv_as != x; then
7805 # Check if we have .subsection
7806 echo ".subsection 1" > conftest.s
7807 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7808 gcc_cv_as_subsections=".subsection"
7809 if test x$gcc_cv_nm != x; then
7810 cat > conftest.s <<EOF
7811 conftest_label1: .word 0
7813 conftest_label2: .word 0
7816 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7817 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7818 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7819 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7822 gcc_cv_as_subsections="working .subsection -1"
7827 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7829 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7830 cat >> confdefs.h <<\EOF
7831 #define HAVE_GAS_SUBSECTION_ORDERING 1
7835 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7837 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7838 echo "configure:7839: checking assembler weak support" >&5
7840 if test $in_tree_gas = yes ; then
7841 if test $gcc_cv_gas_major_version -eq 2 \
7842 && test $gcc_cv_gas_minor_version -ge 2 \
7843 || test $gcc_cv_gas_major_version -gt 2 ; then
7846 gcc_cv_as_weak="yes"
7851 elif test x$gcc_cv_as != x; then
7852 # Check if we have .weak
7853 echo " .weak foobar" > conftest.s
7854 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7855 gcc_cv_as_weak="yes"
7857 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7859 if test x"$gcc_cv_as_weak" = xyes; then
7860 cat >> confdefs.h <<\EOF
7861 #define HAVE_GAS_WEAK 1
7865 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7867 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7868 echo "configure:7869: checking assembler hidden support" >&5
7870 if test $in_tree_gas = yes ; then
7871 if test $gcc_cv_gas_major_version -eq 2 \
7872 && (test $gcc_cv_gas_minor_version -gt 12 \
7873 || (test $gcc_cv_gas_minor_version -eq 12 \
7874 && test $gcc_cv_gas_patch_version -ge 1 )) \
7875 || test $gcc_cv_gas_major_version -gt 2 ; then
7878 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7879 gcc_cv_as_hidden="yes"
7885 elif test x$gcc_cv_as != x; then
7886 # Check if we have .hidden
7887 echo " .hidden foobar" > conftest.s
7888 echo "foobar:" >> conftest.s
7889 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7890 gcc_cv_as_hidden="yes"
7892 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7894 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7895 # This is irritatingly difficult to feature test for. Look for
7896 # the date string after the version number.
7897 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7898 if echo "$ld_ver" | grep GNU > /dev/null; then
7899 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
7900 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
7901 if test 0"$ld_date" -lt 20020404; then
7902 if test -n "$ld_date"; then
7903 # If there was date string, but was earlier than 2002-04-04, fail
7904 gcc_cv_as_hidden="no"
7905 elif test -z "$ld_vers"; then
7906 # If there was no date string nor ld version number, something is wrong
7907 gcc_cv_as_hidden="no"
7909 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7910 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7911 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7912 test -z "$ld_vers_patch" && ld_vers_patch=0
7913 if test "$ld_vers_major" -lt 2; then
7914 gcc_cv_as_hidden="no"
7915 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7916 gcc_cv_as_hidden="no"
7917 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7918 -a "$ld_vers_patch" -eq 0; then
7919 gcc_cv_as_hidden="no"
7927 if test x"$gnu_ld_flag" = x"no"; then
7928 # Even if using gas with .hidden support, the resulting object files
7929 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7930 # N64 linkers, the problem is that the linker refuses to accept
7931 # -call_shared (passed by default to the linker) and -r (used to
7932 # link the object file generated without .hidden directives with
7933 # one that hides symbols), so we also lose.
7938 if test x"$gcc_cv_as_hidden" = xyes; then
7939 cat >> confdefs.h <<\EOF
7940 #define HAVE_GAS_HIDDEN 1
7944 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7945 libgcc_visibility=$gcc_cv_as_hidden
7948 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7949 echo "configure:7950: checking assembler leb128 support" >&5
7951 if test $in_tree_gas = yes ; then
7952 if test $gcc_cv_gas_major_version -eq 2 \
7953 && test $gcc_cv_gas_minor_version -ge 11 \
7954 || test $gcc_cv_gas_major_version -gt 2 ; then
7957 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7958 gcc_cv_as_leb128="yes"
7964 elif test x$gcc_cv_as != x; then
7965 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7966 cat > conftest.s <<EOF
7974 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7975 gcc_cv_as_leb128="yes"
7977 # GAS versions before 2.11 do not support uleb128,
7978 # despite appearing to.
7979 # ??? There exists an elf-specific test that will crash
7980 # the assembler. Perhaps it's better to figure out whether
7981 # arbitrary sections are supported and try the test.
7982 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7983 if echo "$as_ver" | grep GNU > /dev/null; then
7984 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7985 as_major=`echo $as_ver | sed 's/\..*//'`
7986 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7987 if test $as_major -eq 2 -a $as_minor -lt 11; then
7988 gcc_cv_as_leb128="no"
7992 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7994 if test x"$gcc_cv_as_leb128" = xyes; then
7995 cat >> confdefs.h <<\EOF
7996 #define HAVE_AS_LEB128 1
8000 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
8002 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
8003 echo "configure:8004: checking assembler eh_frame optimization" >&5
8004 gcc_cv_as_eh_frame=no
8005 if test $in_tree_gas = yes ; then
8006 if test $gcc_cv_gas_major_version -eq 2 \
8007 && test $gcc_cv_gas_minor_version -ge 12 \
8008 || test $gcc_cv_gas_major_version -gt 2 ; then
8011 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8012 gcc_cv_as_eh_frame="yes"
8018 elif test x$gcc_cv_as != x; then
8019 # Check if this is GAS.
8020 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
8021 rm -f a.out 2> /dev/null
8022 if echo "$as_ver" | grep GNU > /dev/null; then
8023 # Versions up to and including 2.11.0 may mis-optimize
8024 # .eh_frame data. Try something.
8025 cat > conftest.s <<EOF
8032 .section .eh_frame,"aw",@progbits
8034 .4byte .LECIE1-.LSCIE1
8048 .4byte .LEFDE1-.LASFDE1
8050 .4byte .LASFDE1-__FRAME_BEGIN__
8059 cat > conftest.lit <<EOF
8060 0000 10000000 00000000 017a0001 781a0004 .........z..x...
8061 0010 01000000 12000000 18000000 00000000 ................
8062 0020 08000000 04080000 0044 .........D
8064 cat > conftest.big <<EOF
8065 0000 00000010 00000000 017a0001 781a0004 .........z..x...
8066 0010 00000001 00000012 00000018 00000000 ................
8067 0020 00000008 04000000 0844 .........D
8069 # If the assembler didn't choke, and we can objdump,
8070 # and we got the correct data, then succeed.
8071 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8072 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
8073 | tail -3 > conftest.got \
8074 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
8075 || cmp conftest.big conftest.got > /dev/null 2>&1; }
8077 gcc_cv_as_eh_frame="yes"
8079 gcc_cv_as_eh_frame="bad"
8080 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
8081 cat >> confdefs.h <<\EOF
8082 #define USE_AS_TRADITIONAL_FORMAT 1
8090 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
8092 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
8093 echo "configure:8094: checking assembler section merging support" >&5
8094 gcc_cv_as_shf_merge=no
8095 if test $in_tree_gas = yes ; then
8096 if test $gcc_cv_gas_major_version -eq 2 \
8097 && test $gcc_cv_gas_minor_version -ge 12 \
8098 || test $gcc_cv_gas_major_version -gt 2 ; then
8101 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8102 gcc_cv_as_shf_merge=yes
8108 elif test x$gcc_cv_as != x; then
8109 # Check if we support SHF_MERGE sections
8110 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
8111 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
8112 gcc_cv_as_shf_merge=yes
8114 rm -f conftest.s conftest.o
8116 if test x"$gcc_cv_as_shf_merge" = xyes; then
8117 cat >> confdefs.h <<\EOF
8118 #define HAVE_GAS_SHF_MERGE 1
8122 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
8124 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
8125 echo "configure:8126: checking assembler thread-local storage support" >&5
8133 .section ".tdata","awT",@progbits
8136 ldq $27,__tls_get_addr($29) !literal!1
8137 lda $16,foo($29) !tlsgd!1
8138 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
8139 ldq $27,__tls_get_addr($29) !literal!2
8140 lda $16,foo($29) !tlsldm!2
8141 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
8142 ldq $1,foo($29) !gotdtprel
8143 ldah $2,foo($29) !dtprelhi
8144 lda $3,foo($2) !dtprello
8145 lda $4,foo($29) !dtprel
8146 ldq $1,foo($29) !gottprel
8147 ldah $2,foo($29) !tprelhi
8148 lda $3,foo($2) !tprello
8149 lda $4,foo($29) !tprel'
8155 .section ".tdata","awT",@progbits
8159 leal foo@TLSGD(,%ebx,1), %eax
8160 leal foo@TLSLDM(%ebx), %eax
8161 leal foo@DTPOFF(%eax), %edx
8162 movl foo@GOTTPOFF(%ebx), %eax
8163 subl foo@GOTTPOFF(%ebx), %eax
8164 addl foo@GOTNTPOFF(%ebx), %eax
8165 movl foo@INDNTPOFF, %eax
8166 movl $foo@TPOFF, %eax
8167 subl $foo@TPOFF, %eax
8168 leal foo@NTPOFF(%ecx), %eax'
8174 .section ".tdata","awT",@progbits
8178 leaq foo@TLSGD(%rip), %rdi
8179 leaq foo@TLSLD(%rip), %rdi
8180 leaq foo@DTPOFF(%rax), %rdx
8181 movq foo@GOTTPOFF(%rip), %rax
8182 movq $foo@TPOFF, %rax'
8188 .section ".tdata","awT",@progbits
8191 addl r16 = @ltoff(@dtpmod(foo#)), gp
8192 addl r17 = @ltoff(@dtprel(foo#)), gp
8193 addl r18 = @ltoff(@tprel(foo#)), gp
8194 addl r19 = @dtprel(foo#), gp
8195 adds r21 = @dtprel(foo#), r13
8196 movl r23 = @dtprel(foo#)
8197 addl r20 = @tprel(foo#), gp
8198 adds r22 = @tprel(foo#), r13
8199 movl r24 = @tprel(foo#)'
8205 .section ".tdata","awT",@progbits
8213 addi 3,31,ld0@got@tlsgd
8215 addi 3,31,x1@got@tlsld
8218 addis 9,3,x2@dtprel@ha
8219 addi 9,9,x2@dtprel@l
8220 lwz 9,x3@got@tprel(31)
8223 addis 9,2,x2@tprel@ha
8224 addi 9,9,x2@tprel@l'
8230 .section ".tdata","awT",@progbits
8238 addi 3,2,ld0@got@tlsgd
8244 addi 3,2,x1@got@tlsld
8250 addis 9,3,x2@dtprel@ha
8251 addi 9,9,x2@dtprel@l
8254 ld 9,x3@got@dtprel(2)
8263 .section ".tdata","awT",@progbits
8272 l %r1,foo@GOTNTPOFF(%r12)
8273 l %r1,0(%r1):tls_load:foo
8274 bas %r14,0(%r1,%r13):tls_gdcall:foo
8275 bas %r14,0(%r1,%r13):tls_ldcall:foo'
8281 .section ".tdata","awT",@progbits
8289 lg %r1,foo@GOTNTPOFF(%r12)
8290 larl %r1,foo@INDNTPOFF
8291 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
8292 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
8297 if test -z "$tls_first_major"; then
8299 elif test $in_tree_gas = yes ; then
8300 if test $gcc_cv_gas_major_version -eq $tls_first_major \
8301 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
8302 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
8310 elif test x$gcc_cv_as != x; then
8311 echo "$conftest_s" > conftest.s
8312 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
8316 rm -f conftest.s conftest.o
8318 if test "$gcc_cv_as_tls" = yes; then
8319 cat >> confdefs.h <<\EOF
8320 #define HAVE_AS_TLS 1
8324 echo "$ac_t""$gcc_cv_as_tls" 1>&6
8327 # All TARGET_ABI_OSF targets.
8328 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8329 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8330 echo "configure:8331: checking assembler supports explicit relocations" >&5
8331 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8332 echo $ac_n "(cached) $ac_c" 1>&6
8335 gcc_cv_as_explicit_relocs=unknown
8336 if test $in_tree_gas = yes ; then
8337 if test $gcc_cv_gas_major_version -eq 2 \
8338 && test $gcc_cv_gas_minor_version -ge 12 \
8339 || test $gcc_cv_gas_major_version -gt 2 ; then
8342 gcc_cv_as_explicit_relocs=yes
8347 elif test x$gcc_cv_as != x; then
8348 cat > conftest.s << 'EOF'
8351 extbl $3, $2, $3 !lituse_bytoff!1
8352 ldq $2, a($29) !literal!1
8353 ldq $4, b($29) !literal!2
8354 ldq_u $3, 0($2) !lituse_base!1
8355 ldq $27, f($29) !literal!5
8356 jsr $26, ($27), f !lituse_jsr!5
8357 ldah $29, 0($26) !gpdisp!3
8358 lda $0, c($29) !gprel
8359 ldah $1, d($29) !gprelhigh
8360 lda $1, d($1) !gprellow
8361 lda $29, 0($29) !gpdisp!3
8363 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8364 gcc_cv_as_explicit_relocs=yes
8366 gcc_cv_as_explicit_relocs=no
8368 rm -f conftest.s conftest.o
8373 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8374 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8375 cat >> confdefs.h <<\EOF
8376 #define HAVE_AS_EXPLICIT_RELOCS 1
8382 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8383 echo "configure:8384: checking assembler .register pseudo-op support" >&5
8384 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8385 echo $ac_n "(cached) $ac_c" 1>&6
8388 gcc_cv_as_register_pseudo_op=unknown
8389 if test x$gcc_cv_as != x; then
8390 # Check if we have .register
8391 echo ".register %g2, #scratch" > conftest.s
8392 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8393 gcc_cv_as_register_pseudo_op=yes
8395 gcc_cv_as_register_pseudo_op=no
8397 rm -f conftest.s conftest.o
8402 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8403 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8404 cat >> confdefs.h <<\EOF
8405 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8410 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8411 echo "configure:8412: checking assembler supports -relax" >&5
8412 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8413 echo $ac_n "(cached) $ac_c" 1>&6
8416 gcc_cv_as_relax_opt=unknown
8417 if test x$gcc_cv_as != x; then
8418 # Check if gas supports -relax
8419 echo ".text" > conftest.s
8420 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8421 gcc_cv_as_relax_opt=yes
8423 gcc_cv_as_relax_opt=no
8425 rm -f conftest.s conftest.o
8430 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8431 if test "x$gcc_cv_as_relax_opt" = xyes; then
8432 cat >> confdefs.h <<\EOF
8433 #define HAVE_AS_RELAX_OPTION 1
8438 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8439 echo "configure:8440: checking assembler and linker support unaligned pc related relocs" >&5
8440 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8441 echo $ac_n "(cached) $ac_c" 1>&6
8444 gcc_cv_as_sparc_ua_pcrel=unknown
8445 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8446 gcc_cv_as_sparc_ua_pcrel=no
8447 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8448 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8449 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8450 gcc_cv_as_sparc_ua_pcrel=yes
8452 rm -f conftest.s conftest.o conftest
8457 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8458 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8459 cat >> confdefs.h <<\EOF
8460 #define HAVE_AS_SPARC_UA_PCREL 1
8465 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8466 echo "configure:8467: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8467 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8468 echo $ac_n "(cached) $ac_c" 1>&6
8471 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8472 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8473 if test x$gcc_cv_objdump != x; then
8474 gcc_cv_as_sparc_ua_pcrel_hidden=no
8475 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8476 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8477 echo "foo: .skip 4" >> conftest.s
8478 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8479 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8480 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8481 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8482 if $gcc_cv_objdump -R conftest 2> /dev/null \
8483 | grep 'DISP32' > /dev/null 2>&1; then
8486 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8490 rm -f conftest.s conftest.o conftest
8492 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8497 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8498 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8499 cat >> confdefs.h <<\EOF
8500 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8505 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8506 echo "configure:8507: checking for assembler offsetable %lo() support" >&5
8507 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8508 echo $ac_n "(cached) $ac_c" 1>&6
8511 gcc_cv_as_offsetable_lo10=unknown
8512 if test "x$gcc_cv_as" != x; then
8513 # Check if assembler has offsetable %lo()
8514 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8515 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8516 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8518 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8519 > /dev/null 2>&1; then
8520 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8521 gcc_cv_as_offsetable_lo10=no
8523 gcc_cv_as_offsetable_lo10=yes
8526 gcc_cv_as_offsetable_lo10=no
8528 rm -f conftest.s conftest.o conftest1.s conftest1.o
8533 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8534 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8535 cat >> confdefs.h <<\EOF
8536 #define HAVE_AS_OFFSETABLE_LO10 1
8543 i[34567]86-*-* | x86_64-*-*)
8544 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8545 echo "configure:8546: checking assembler instructions" >&5
8546 gcc_cv_as_instructions=
8547 if test $in_tree_gas = yes ; then
8548 if test $gcc_cv_gas_major_version -eq 2 \
8549 && test $gcc_cv_gas_minor_version -ge 9 \
8550 || test $gcc_cv_gas_major_version -gt 2 ; then
8553 gcc_cv_as_instructions="filds fists"
8558 elif test x$gcc_cv_as != x; then
8559 set "filds fists" "filds mem; fists mem"
8562 echo "$2" > conftest.s
8563 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8564 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8568 rm -f conftest.s conftest.o
8570 if test x"$gcc_cv_as_instructions" != x; then
8571 cat >> confdefs.h <<EOF
8572 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8576 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8578 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8579 echo "configure:8580: checking assembler GOTOFF in data directives" >&5
8580 gcc_cv_as_gotoff_in_data=no
8581 if test $in_tree_gas = yes ; then
8582 if test $gcc_cv_gas_major_version -eq 2 \
8583 && test $gcc_cv_gas_minor_version -ge 11 \
8584 || test $gcc_cv_gas_major_version -gt 2 ; then
8587 gcc_cv_as_gotoff_in_data=yes
8592 elif test x$gcc_cv_as != x; then
8593 cat > conftest.s <<EOF
8600 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8601 gcc_cv_as_gotoff_in_data=yes
8604 cat >> confdefs.h <<EOF
8605 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8608 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8612 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8613 echo "configure:8614: checking assembler supports ltoffx and ldxmov" >&5
8614 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8615 echo $ac_n "(cached) $ac_c" 1>&6
8618 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8619 if test $in_tree_gas = yes ; then
8620 if test $gcc_cv_gas_major_version -eq 2 \
8621 && test $gcc_cv_gas_minor_version -ge 14 \
8622 || test $gcc_cv_gas_major_version -gt 2 ; then
8625 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8630 elif test x$gcc_cv_as != x; then
8631 cat > conftest.s << 'EOF'
8633 addl r15 = @ltoffx(x#), gp
8635 ld8.mov r16 = [r15], x#
8637 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8638 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8640 gcc_cv_as_ltoffx_ldxmov_relocs=no
8642 rm -f conftest.s conftest.o
8647 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8648 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8649 cat >> confdefs.h <<\EOF
8650 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8657 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8658 echo "configure:8659: checking assembler dwarf2 debug_line support" >&5
8659 gcc_cv_as_dwarf2_debug_line=no
8660 # ??? Not all targets support dwarf2 debug_line, even within a version
8661 # of gas. Moreover, we need to emit a valid instruction to trigger any
8662 # info to the output file. So, as supported targets are added to gas 2.11,
8663 # add some instruction here to (also) show we expect this might work.
8664 # ??? Once 2.11 is released, probably need to add first known working
8665 # version to the per-target configury.
8667 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8668 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* | xstormy16*-*-*)
8675 if test $in_tree_gas = yes ; then
8676 if test $gcc_cv_gas_major_version -eq 2 \
8677 && test $gcc_cv_gas_minor_version -ge 11 \
8678 || test $gcc_cv_gas_major_version -gt 2 ; then
8681 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8682 && test x"$insn" != x ; then
8683 gcc_cv_as_dwarf2_debug_line="yes"
8689 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8690 echo ' .file 1 "conftest.s"' > conftest.s
8691 echo ' .loc 1 3 0' >> conftest.s
8692 echo " $insn" >> conftest.s
8693 # ??? This fails with non-gnu grep.
8694 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8695 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8696 # The .debug_line file table must be in the exact order that
8697 # we specified the files, since these indices are also used
8698 # by DW_AT_decl_file. Approximate this test by testing if
8699 # the assembler bitches if the same index is assigned twice.
8700 echo ' .file 1 "foo.s"' > conftest.s
8701 echo ' .file 1 "bar.s"' >> conftest.s
8702 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8704 gcc_cv_as_dwarf2_debug_line="no"
8706 gcc_cv_as_dwarf2_debug_line="yes"
8709 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8711 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8712 cat >> confdefs.h <<\EOF
8713 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8717 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8719 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8720 echo "configure:8721: checking assembler --gdwarf2 support" >&5
8721 gcc_cv_as_gdwarf2_flag=no
8722 if test $in_tree_gas = yes ; then
8723 if test $gcc_cv_gas_major_version -eq 2 \
8724 && test $gcc_cv_gas_minor_version -ge 11 \
8725 || test $gcc_cv_gas_major_version -gt 2 ; then
8728 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8729 && test x"$insn" != x ; then
8730 gcc_cv_as_gdwarf2_flag="yes"
8736 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8737 echo '' > conftest.s
8738 # ??? This fails with non-gnu grep.
8739 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8741 gcc_cv_as_gdwarf2_flag="yes"
8743 rm -f conftest.s conftest.o
8745 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8746 cat >> confdefs.h <<\EOF
8747 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8751 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8753 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8754 echo "configure:8755: checking assembler --gstabs support" >&5
8755 gcc_cv_as_gstabs_flag=no
8756 if test $in_tree_gas = yes ; then
8757 if test $gcc_cv_gas_major_version -eq 2 \
8758 && test $gcc_cv_gas_minor_version -ge 11 \
8759 || test $gcc_cv_gas_major_version -gt 2 ; then
8762 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8763 && test x"$insn" != x ; then
8764 gcc_cv_as_gstabs_flag="yes"
8770 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8771 echo '' > conftest.s
8772 # ??? This fails with non-gnu grep.
8773 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8774 gcc_cv_as_gstabs_flag="yes"
8776 rm -f conftest.s conftest.o
8778 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8779 cat >> confdefs.h <<\EOF
8780 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8784 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8786 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8787 echo "configure:8788: checking linker read-only and read-write section mixing" >&5
8788 gcc_cv_ld_ro_rw_mix=unknown
8789 if test $in_tree_ld = yes ; then
8790 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8791 gcc_cv_ld_ro_rw_mix=read-write
8793 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8794 echo '.section "myfoosect", "a"' > conftest1.s
8795 echo '.section "myfoosect", "aw"' > conftest2.s
8796 echo '.byte 1' >> conftest2.s
8797 echo '.section "myfoosect", "a"' > conftest3.s
8798 echo '.byte 0' >> conftest3.s
8799 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8800 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8801 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8802 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8803 conftest2.o conftest3.o; then
8804 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8805 | grep -A1 myfoosect`
8806 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8807 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8808 gcc_cv_ld_ro_rw_mix=read-only
8810 gcc_cv_ld_ro_rw_mix=read-write
8814 rm -f conftest.* conftest[123].*
8816 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8817 cat >> confdefs.h <<\EOF
8818 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8822 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8824 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8825 echo "configure:8826: checking linker PT_GNU_EH_FRAME support" >&5
8826 gcc_cv_ld_eh_frame_hdr=no
8827 if test $in_tree_ld = yes ; then
8828 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8829 gcc_cv_ld_eh_frame_hdr=yes
8831 elif test x$gcc_cv_ld != x; then
8832 # Check if linker supports --eh-frame-hdr option
8833 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8834 gcc_cv_ld_eh_frame_hdr=yes
8837 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8838 cat >> confdefs.h <<\EOF
8839 #define HAVE_LD_EH_FRAME_HDR 1
8843 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8845 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
8846 echo "configure:8847: checking linker position independent executable support" >&5
8848 if test $in_tree_ld = yes ; then
8849 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8852 elif test x$gcc_cv_ld != x; then
8853 # Check if linker supports -pie option
8854 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
8858 if test x"$gcc_cv_ld_pie" = xyes; then
8859 cat >> confdefs.h <<\EOF
8860 #define HAVE_LD_PIE 1
8864 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
8866 # Miscellaneous target-specific checks.
8869 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8870 echo "configure:8871: checking whether libgloss uses STARTUP directives consistently" >&5
8871 gcc_cv_mips_libgloss_startup=no
8872 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8873 if test "x$exec_prefix" = xNONE; then
8874 if test "x$prefix" = xNONE; then
8875 test_prefix=/usr/local
8880 test_prefix=$exec_prefix
8882 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8884 if grep '^STARTUP' $f > /dev/null 2>&1; then
8885 gcc_cv_mips_libgloss_startup=yes
8889 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8890 cat >> confdefs.h <<\EOF
8891 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8895 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8897 echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
8898 echo "configure:8899: checking whether the assembler has explicit relocation support" >&5
8899 if test x$gcc_cv_mips_explicit_relocs = x; then
8900 gcc_cv_mips_explicit_relocs=no
8901 if test x$gcc_cv_as != x; then
8902 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
8903 if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
8904 gcc_cv_mips_explicit_relocs=yes
8906 rm -f conftest.s conftest.o
8909 if test $gcc_cv_mips_explicit_relocs = yes; then
8910 test x$target_cpu_default != x || target_cpu_default=0
8911 target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
8913 echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
8917 if test x$with_sysroot = x && test x$host = x$target \
8918 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8919 cat >> confdefs.h <<EOF
8920 #define PREFIX_INCLUDE_DIR "$prefix/include"
8925 # Figure out what language subdirectories are present.
8926 # Look if the user specified --enable-languages="..."; if not, use
8927 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8929 # NB: embedded tabs in this IF block -- do not untabify
8930 if test x"${enable_languages+set}" != xset; then
8931 if test x"${LANGUAGES+set}" = xset; then
8932 enable_languages="${LANGUAGES}"
8933 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8936 enable_languages=all
8939 if test x"${enable_languages}" = x \
8940 || test x"${enable_languages}" = xyes;
8942 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8945 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8947 # First scan to see if an enabled language requires some other language.
8948 # We assume that a given config-lang.in will list all the language
8949 # front ends it requires, even if some are required indirectly.
8950 for lang in ${srcdir}/*/config-lang.in ..
8955 # The odd quoting in the next line works around
8956 # an apparent bug in bash 1.12 on linux.
8957 ${srcdir}/[*]/config-lang.in)
8960 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8961 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8962 for other in $this_lang_requires
8964 case ,${enable_languages}, in
8970 enable_languages="$enable_languages,$other"
8978 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8981 for lang in ${srcdir}/*/config-lang.in ..
8985 # The odd quoting in the next line works around
8986 # an apparent bug in bash 1.12 on linux.
8987 ${srcdir}/[*]/config-lang.in) ;;
8989 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8990 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8991 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8992 if test "x$lang_alias" = x
8994 echo "$lang doesn't set \$language." 1>&2
8997 case ${build_by_default},${enable_languages}, in
8998 *,$lang_alias,*) add_this_lang=yes ;;
8999 no,*) add_this_lang=no ;;
9000 *,all,*) add_this_lang=yes ;;
9001 *) add_this_lang=no ;;
9003 found_languages="${found_languages} ${lang_alias}"
9004 if test x"${add_this_lang}" = xyes; then
9006 ${srcdir}/ada/config-lang.in)
9007 if test x$have_gnat = xyes ; then
9008 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
9012 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
9021 for expected_language in ${expected_languages} ..
9023 if test "${expected_language}" != ..; then
9024 missing_language="${expected_language}"
9025 if test "${expected_language}" = "c" \
9026 || test "${expected_language}" = "all"; then
9029 for found_language in ${found_languages} ..
9031 if test "${found_language}" != ..; then
9032 if test "${expected_language}" = "${found_language}"; then
9037 if test "x${missing_language}" != x; then
9038 missing_languages="${missing_languages} ${missing_language}"
9043 if test "x$missing_languages" != x; then
9044 { echo "configure: error:
9045 The following requested languages were not found:${missing_languages}
9046 The following languages were available: c${found_languages}" 1>&2; exit 1; }
9049 # Make gthr-default.h if we have a thread file.
9051 if test $thread_file != single; then
9052 rm -f gthr-default.h
9053 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
9054 gthread_flags=-DHAVE_GTHR_DEFAULT
9058 # Find out what GC implementation we want, or may, use.
9059 # Check whether --with-gc or --without-gc was given.
9060 if test "${with_gc+set}" = set; then
9067 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
9075 echo "Using $GGC for garbage collection."
9077 # Use the system's zlib library.
9079 zlibinc="-I\$(srcdir)/../zlib"
9080 # Check whether --with-system-zlib or --without-system-zlib was given.
9081 if test "${with_system_zlib+set}" = set; then
9082 withval="$with_system_zlib"
9092 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
9093 echo "configure:9094: checking whether to enable maintainer-specific portions of Makefiles" >&5
9094 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
9095 if test "${enable_maintainer_mode+set}" = set; then
9096 enableval="$enable_maintainer_mode"
9097 maintainer_mode=$enableval
9103 echo "$ac_t""$maintainer_mode" 1>&6
9105 if test "$maintainer_mode" = "yes"; then
9111 # Make empty files to contain the specs and options for each language.
9112 # Then add #include lines to for a compiler that has specs and/or options.
9117 for subdir in . $subdirs
9119 if test -f $srcdir/$subdir/lang-specs.h; then
9120 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
9122 if test -f $srcdir/$subdir/lang-options.h; then
9123 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
9125 if test -f $srcdir/$subdir/$subdir-tree.def; then
9126 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
9130 # These (without "all_") are set in each config-lang.in.
9131 # `language' must be a single word so is spelled singularly.
9136 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
9137 # List of language makefile fragments.
9139 # Files for gengtype
9140 all_gtfiles="$target_gtfiles"
9141 # Files for gengtype with language
9142 all_gtfiles_files_langs=
9143 all_gtfiles_files_files=
9145 # Add the language fragments.
9146 # Languages are added via two mechanisms. Some information must be
9147 # recorded in makefile variables, these are defined in config-lang.in.
9148 # We accumulate them and plug them into the main Makefile.
9149 # The other mechanism is a set of hooks for each of the main targets
9150 # like `clean', `install', etc.
9152 language_fragments="Make-lang"
9153 language_hooks="Make-hooks"
9155 for s in .. $subdirs
9165 . ${srcdir}/$s/config-lang.in
9166 if test "x$language" = x
9168 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
9171 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
9172 if test -f ${srcdir}/$s/Makefile.in
9173 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
9175 all_languages="$all_languages $language"
9176 if test "x$boot_language" = xyes
9178 all_boot_languages="$all_boot_languages $language"
9180 all_compilers="$all_compilers $compilers"
9181 all_stagestuff="$all_stagestuff $stagestuff"
9182 all_outputs="$all_outputs $outputs"
9183 all_gtfiles="$all_gtfiles $gtfiles"
9184 for f in .. $gtfiles
9188 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9189 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9195 # Pick up gtfiles for c
9198 . ${srcdir}/c-config-lang.in
9199 all_gtfiles="$all_gtfiles $gtfiles"
9200 for f in .. $gtfiles
9204 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9205 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9210 for language in .. $all_languages
9212 if test $language != ".."
9214 check_languages="$check_languages check-$language"
9218 # Since we can't use `::' targets, we link each language in
9219 # with a set of hooks, reached indirectly via lang.${target}.
9223 target_list="all.build all.cross start.encap rest.encap tags \
9224 info dvi generated-manpages \
9225 install-normal install-common install-info install-man \
9227 mostlyclean clean distclean extraclean maintainer-clean \
9228 stage1 stage2 stage3 stage4"
9229 for t in $target_list
9232 for lang in .. $all_languages
9234 if test $lang != ".."; then
9238 echo "lang.$t: $x" >> Make-hooks
9243 echo "dir ." > .gdbinit
9244 echo "dir ${srcdir}" >> .gdbinit
9245 if test x$gdb_needs_out_file_path = xyes
9247 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
9249 if test "x$subdirs" != x; then
9252 echo "dir ${srcdir}/$s" >> .gdbinit
9255 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
9257 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
9258 # absolute path for gcc_tooldir based on inserting the number of up-directory
9259 # movements required to get from $(exec_prefix) to $(prefix) into the basic
9260 # $(libsubdir)/@(unlibsubdir) based path.
9261 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
9262 # make and thus we'd get different behavior depending on where we built the
9264 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
9265 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
9267 # An explanation of the sed strings:
9268 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
9269 # -e 's|/$||' match a trailing forward slash and eliminates it
9270 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
9271 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
9273 # (*) Note this pattern overwrites the first character of the string
9274 # with a forward slash if one is not already present. This is not a
9275 # problem because the exact names of the sub-directories concerned is
9276 # unimportant, just the number of them matters.
9278 # The practical upshot of these patterns is like this:
9280 # prefix exec_prefix result
9281 # ------ ----------- ------
9283 # /foo/ /foo/bar ../
9284 # /foo /foo/bar/ ../
9285 # /foo/ /foo/bar/ ../
9286 # /foo /foo/bar/ugg ../../
9289 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
9294 # Find a directory in which to install a shared libgcc.
9296 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
9297 if test "${enable_version_specific_runtime_libs+set}" = set; then
9298 enableval="$enable_version_specific_runtime_libs"
9303 # Check whether --with-slibdir or --without-slibdir was given.
9304 if test "${with_slibdir+set}" = set; then
9305 withval="$with_slibdir"
9306 slibdir="$with_slibdir"
9308 if test "${enable_version_specific_runtime_libs+set}" = set; then
9309 slibdir='$(libsubdir)'
9310 elif test "$host" != "$target"; then
9311 slibdir='$(build_tooldir)/lib'
9319 objdir=`${PWDCMD-pwd}`
9322 # Process the language and host/target makefile fragments.
9323 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9325 # Substitute configuration variables
9395 # Echo that links are built
9396 if test x$host = x$target
9404 if test x$host != x$build
9406 str3=" on a $build system"
9409 if test "x$str2" != x || test "x$str3" != x
9414 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9416 if test "x$str2" != x || test "x$str3" != x
9418 echo " ${str2}${str3}." 1>&2
9421 # Truncate the target if necessary
9422 if test x$host_truncate_target != x; then
9423 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9426 # Configure the subdirectories
9427 # AC_CONFIG_SUBDIRS($subdirs)
9429 # Create the Makefile
9430 # and configure language subdirectories
9432 cat > confcache <<\EOF
9433 # This file is a shell script that caches the results of configure
9434 # tests run on this system so they can be shared between configure
9435 # scripts and configure runs. It is not useful on other systems.
9436 # If it contains results you don't want to keep, you may remove or edit it.
9438 # By default, configure uses ./config.cache as the cache file,
9439 # creating it if it does not exist already. You can give configure
9440 # the --cache-file=FILE option to use a different cache file; that is
9441 # what configure does when it calls configure scripts in
9442 # subdirectories, so they share the cache.
9443 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9444 # config.status only pays attention to the cache file if you give it the
9445 # --recheck option to rerun configure.
9448 # The following way of writing the cache mishandles newlines in values,
9449 # but we know of no workaround that is simple, portable, and efficient.
9450 # So, don't put newlines in cache variables' values.
9451 # Ultrix sh set writes to stderr and can't be redirected directly,
9452 # and sets the high bit in the cache file unless we assign to the vars.
9454 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9456 # `set' does not quote correctly, so add quotes (double-quote substitution
9457 # turns \\\\ into \\, and sed turns \\ into \).
9459 -e "s/'/'\\\\''/g" \
9460 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9463 # `set' quotes correctly as required by POSIX, so do not add quotes.
9464 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9467 if cmp -s $cache_file confcache; then
9470 if test -w $cache_file; then
9471 echo "updating cache $cache_file"
9472 cat confcache > $cache_file
9474 echo "not updating unwritable cache $cache_file"
9479 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9481 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9482 # Let make expand exec_prefix.
9483 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9485 # Any assignment to VPATH causes Sun make to only execute
9486 # the first set of double-colon rules, so remove it if not needed.
9487 # If there is a colon in the path, we need to keep it.
9488 if test "x$srcdir" = x.; then
9489 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9492 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9494 DEFS=-DHAVE_CONFIG_H
9496 # Without the "./", some shells look in PATH for config.status.
9497 : ${CONFIG_STATUS=./config.status}
9499 echo creating $CONFIG_STATUS
9500 rm -f $CONFIG_STATUS
9501 cat > $CONFIG_STATUS <<EOF
9503 # Generated automatically by configure.
9504 # Run this file to recreate the current configuration.
9505 # This directory was configured as follows,
9506 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9508 # $0 $ac_configure_args
9510 # Compiler output produced by configure, useful for debugging
9511 # configure, is in ./config.log if it exists.
9513 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9516 case "\$ac_option" in
9517 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9518 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9519 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9520 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9521 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9523 -help | --help | --hel | --he | --h)
9524 echo "\$ac_cs_usage"; exit 0 ;;
9525 *) echo "\$ac_cs_usage"; exit 1 ;;
9529 ac_given_srcdir=$srcdir
9531 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9533 cat >> $CONFIG_STATUS <<EOF
9535 # Protect against being on the right side of a sed subst in config.status.
9536 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9537 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9541 s%@CFLAGS@%$CFLAGS%g
9542 s%@CPPFLAGS@%$CPPFLAGS%g
9543 s%@CXXFLAGS@%$CXXFLAGS%g
9544 s%@FFLAGS@%$FFLAGS%g
9546 s%@LDFLAGS@%$LDFLAGS%g
9548 s%@exec_prefix@%$exec_prefix%g
9549 s%@prefix@%$prefix%g
9550 s%@program_transform_name@%$program_transform_name%g
9551 s%@bindir@%$bindir%g
9552 s%@sbindir@%$sbindir%g
9553 s%@libexecdir@%$libexecdir%g
9554 s%@datadir@%$datadir%g
9555 s%@sysconfdir@%$sysconfdir%g
9556 s%@sharedstatedir@%$sharedstatedir%g
9557 s%@localstatedir@%$localstatedir%g
9558 s%@libdir@%$libdir%g
9559 s%@includedir@%$includedir%g
9560 s%@oldincludedir@%$oldincludedir%g
9561 s%@infodir@%$infodir%g
9562 s%@mandir@%$mandir%g
9564 s%@host_alias@%$host_alias%g
9565 s%@host_cpu@%$host_cpu%g
9566 s%@host_vendor@%$host_vendor%g
9567 s%@host_os@%$host_os%g
9568 s%@target@%$target%g
9569 s%@target_alias@%$target_alias%g
9570 s%@target_cpu@%$target_cpu%g
9571 s%@target_vendor@%$target_vendor%g
9572 s%@target_os@%$target_os%g
9574 s%@build_alias@%$build_alias%g
9575 s%@build_cpu@%$build_cpu%g
9576 s%@build_vendor@%$build_vendor%g
9577 s%@build_os@%$build_os%g
9578 s%@build_canonical@%$build_canonical%g
9579 s%@host_canonical@%$host_canonical%g
9580 s%@target_subdir@%$target_subdir%g
9582 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9583 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9585 s%@GNATBIND@%$GNATBIND%g
9587 s%@strict1_warn@%$strict1_warn%g
9588 s%@warn_cflags@%$warn_cflags%g
9589 s%@WERROR@%$WERROR%g
9590 s%@nocommon_flag@%$nocommon_flag%g
9591 s%@valgrind_path@%$valgrind_path%g
9592 s%@valgrind_path_defines@%$valgrind_path_defines%g
9593 s%@valgrind_command@%$valgrind_command%g
9594 s%@coverage_flags@%$coverage_flags%g
9595 s%@enable_multilib@%$enable_multilib%g
9596 s%@enable_shared@%$enable_shared%g
9597 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9598 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9599 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9600 s%@SET_MAKE@%$SET_MAKE%g
9604 s%@RANLIB@%$RANLIB%g
9605 s%@INSTALL@%$INSTALL%g
9606 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9607 s%@INSTALL_DATA@%$INSTALL_DATA%g
9608 s%@have_mktemp_command@%$have_mktemp_command%g
9609 s%@MAKEINFO@%$MAKEINFO%g
9610 s%@BUILD_INFO@%$BUILD_INFO%g
9611 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9612 s%@make_compare_target@%$make_compare_target%g
9615 s%@stage1_cflags@%$stage1_cflags%g
9616 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9617 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9618 s%@LDEXP_LIB@%$LDEXP_LIB%g
9619 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9620 s%@LIBICONV@%$LIBICONV%g
9621 s%@manext@%$manext%g
9622 s%@objext@%$objext%g
9623 s%@extra_modes_file@%$extra_modes_file%g
9624 s%@FORBUILD@%$FORBUILD%g
9625 s%@PACKAGE@%$PACKAGE%g
9626 s%@VERSION@%$VERSION%g
9627 s%@ALLOCA@%$ALLOCA%g
9628 s%@GLIBC21@%$GLIBC21%g
9629 s%@USE_NLS@%$USE_NLS%g
9630 s%@MSGFMT@%$MSGFMT%g
9631 s%@GMSGFMT@%$GMSGFMT%g
9632 s%@XGETTEXT@%$XGETTEXT%g
9633 s%@INTLBISON@%$INTLBISON%g
9634 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9635 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9636 s%@CATALOGS@%$CATALOGS%g
9637 s%@CATOBJEXT@%$CATOBJEXT%g
9638 s%@INTLLIBS@%$INTLLIBS%g
9639 s%@INTLDEPS@%$INTLDEPS%g
9640 s%@INTLOBJS@%$INTLOBJS%g
9642 s%@DATADIRNAME@%$DATADIRNAME%g
9643 s%@INSTOBJEXT@%$INSTOBJEXT%g
9644 s%@GENCAT@%$GENCAT%g
9645 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9646 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9649 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9650 s%@inhibit_libc@%$inhibit_libc%g
9651 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9652 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9653 s%@BUILD_CC@%$BUILD_CC%g
9654 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9655 s%@STMP_FIXINC@%$STMP_FIXINC%g
9656 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9657 s%@libgcc_visibility@%$libgcc_visibility%g
9658 s%@gthread_flags@%$gthread_flags%g
9660 s%@zlibdir@%$zlibdir%g
9661 s%@zlibinc@%$zlibinc%g
9663 s%@gcc_tooldir@%$gcc_tooldir%g
9664 s%@dollar@%$dollar%g
9665 s%@slibdir@%$slibdir%g
9666 s%@objdir@%$objdir%g
9667 s%@subdirs@%$subdirs%g
9668 s%@srcdir@%$srcdir%g
9669 s%@all_boot_languages@%$all_boot_languages%g
9670 s%@all_compilers@%$all_compilers%g
9671 s%@all_gtfiles@%$all_gtfiles%g
9672 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9673 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9674 s%@all_lang_makefiles@%$all_lang_makefiles%g
9675 s%@all_languages@%$all_languages%g
9676 s%@all_stagestuff@%$all_stagestuff%g
9677 s%@build_exeext@%$build_exeext%g
9678 s%@build_install_headers_dir@%$build_install_headers_dir%g
9679 s%@build_xm_file_list@%$build_xm_file_list%g
9680 s%@build_xm_file@%$build_xm_file%g
9681 s%@build_xm_defines@%$build_xm_defines%g
9682 s%@check_languages@%$check_languages%g
9683 s%@cc_set_by_configure@%$cc_set_by_configure%g
9684 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9685 s%@cpp_install_dir@%$cpp_install_dir%g
9686 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9687 s%@dep_tmake_file@%$dep_tmake_file%g
9688 s%@extra_headers_list@%$extra_headers_list%g
9689 s%@extra_objs@%$extra_objs%g
9690 s%@extra_parts@%$extra_parts%g
9691 s%@extra_passes@%$extra_passes%g
9692 s%@extra_programs@%$extra_programs%g
9693 s%@float_h_file@%$float_h_file%g
9694 s%@gcc_config_arguments@%$gcc_config_arguments%g
9695 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9696 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9697 s%@gcc_version@%$gcc_version%g
9698 s%@gcc_version_full@%$gcc_version_full%g
9699 s%@gcc_version_trigger@%$gcc_version_trigger%g
9700 s%@host_exeext@%$host_exeext%g
9701 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9702 s%@host_xm_file_list@%$host_xm_file_list%g
9703 s%@host_xm_file@%$host_xm_file%g
9704 s%@host_xm_defines@%$host_xm_defines%g
9705 s%@out_host_hook_obj@%$out_host_hook_obj%g
9706 s%@install@%$install%g
9707 s%@lang_options_files@%$lang_options_files%g
9708 s%@lang_specs_files@%$lang_specs_files%g
9709 s%@lang_tree_files@%$lang_tree_files%g
9710 s%@local_prefix@%$local_prefix%g
9711 s%@md_file@%$md_file%g
9712 s%@objc_boehm_gc@%$objc_boehm_gc%g
9713 s%@out_file@%$out_file%g
9714 s%@out_object_file@%$out_object_file%g
9715 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9716 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9717 s%@symbolic_link@%$symbolic_link%g
9718 s%@thread_file@%$thread_file%g
9719 s%@tm_file_list@%$tm_file_list%g
9720 s%@tm_file@%$tm_file%g
9721 s%@tm_defines@%$tm_defines%g
9722 s%@tm_p_file_list@%$tm_p_file_list%g
9723 s%@tm_p_file@%$tm_p_file%g
9724 s%@xm_file@%$xm_file%g
9725 s%@xm_defines@%$xm_defines%g
9726 s%@c_target_objs@%$c_target_objs%g
9727 s%@cxx_target_objs@%$cxx_target_objs%g
9728 s%@target_cpu_default@%$target_cpu_default%g
9729 /@target_overrides@/r $target_overrides
9730 s%@target_overrides@%%g
9731 /@host_overrides@/r $host_overrides
9732 s%@host_overrides@%%g
9733 /@language_fragments@/r $language_fragments
9734 s%@language_fragments@%%g
9735 /@language_hooks@/r $language_hooks
9736 s%@language_hooks@%%g
9741 cat >> $CONFIG_STATUS <<\EOF
9743 # Split the substitutions into bite-sized pieces for seds with
9744 # small command number limits, like on Digital OSF/1 and HP-UX.
9745 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9746 ac_file=1 # Number of current file.
9747 ac_beg=1 # First line for current file.
9748 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9751 while $ac_more_lines; do
9752 if test $ac_beg -gt 1; then
9753 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9755 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9757 if test ! -s conftest.s$ac_file; then
9759 rm -f conftest.s$ac_file
9761 if test -z "$ac_sed_cmds"; then
9762 ac_sed_cmds="sed -f conftest.s$ac_file"
9764 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9766 ac_file=`expr $ac_file + 1`
9768 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9771 if test -z "$ac_sed_cmds"; then
9776 cat >> $CONFIG_STATUS <<EOF
9778 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9780 cat >> $CONFIG_STATUS <<\EOF
9781 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9782 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9784 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9785 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9786 *) ac_file_in="${ac_file}.in" ;;
9789 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9791 # Remove last slash and all that follows it. Not all systems have dirname.
9792 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9793 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9794 # The file is in a subdirectory.
9795 test ! -d "$ac_dir" && mkdir "$ac_dir"
9796 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9797 # A "../" for each directory in $ac_dir_suffix.
9798 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9800 ac_dir_suffix= ac_dots=
9803 case "$ac_given_srcdir" in
9805 if test -z "$ac_dots"; then top_srcdir=.
9806 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9807 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9809 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9810 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9814 echo creating "$ac_file"
9816 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9818 *Makefile*) ac_comsub="1i\\
9819 # $configure_input" ;;
9823 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9825 s%@configure_input@%$configure_input%g
9826 s%@srcdir@%$srcdir%g
9827 s%@top_srcdir@%$top_srcdir%g
9828 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9832 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9833 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9835 # ac_d sets the value in "#define NAME VALUE" lines.
9836 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9837 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9840 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9841 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9842 ac_uB='\([ ]\)%\1#\2define\3'
9845 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9846 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9847 ac_eB='$%\1#\2define\3'
9851 if test "${CONFIG_HEADERS+set}" != set; then
9853 cat >> $CONFIG_STATUS <<EOF
9854 CONFIG_HEADERS="auto-host.h:config.in"
9856 cat >> $CONFIG_STATUS <<\EOF
9858 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9859 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9861 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9862 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9863 *) ac_file_in="${ac_file}.in" ;;
9866 echo creating $ac_file
9868 rm -f conftest.frag conftest.in conftest.out
9869 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9870 cat $ac_file_inputs > conftest.in
9874 # Transform confdefs.h into a sed script conftest.vals that substitutes
9875 # the proper values into config.h.in to produce config.h. And first:
9876 # Protect against being on the right side of a sed subst in config.status.
9877 # Protect against being in an unquoted here document in config.status.
9879 cat > conftest.hdr <<\EOF
9882 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9886 sed -n -f conftest.hdr confdefs.h > conftest.vals
9889 # This sed command replaces #undef with comments. This is necessary, for
9890 # example, in the case of _POSIX_SOURCE, which is predefined and required
9891 # on some systems where configure will not decide to define it.
9892 cat >> conftest.vals <<\EOF
9893 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9896 # Break up conftest.vals because some shells have a limit on
9897 # the size of here documents, and old seds have small limits too.
9902 ac_lines=`grep -c . conftest.vals`
9903 # grep -c gives empty output for an empty file on some AIX systems.
9904 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9905 # Write a limited-size here document to conftest.frag.
9906 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9907 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9909 sed -f conftest.frag conftest.in > conftest.out
9911 mv conftest.out conftest.in
9913 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9915 mv conftest.tail conftest.vals
9919 cat >> $CONFIG_STATUS <<\EOF
9920 rm -f conftest.frag conftest.h
9921 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9922 cat conftest.in >> conftest.h
9924 if cmp -s $ac_file conftest.h 2>/dev/null; then
9925 echo "$ac_file is unchanged"
9928 # Remove last slash and all that follows it. Not all systems have dirname.
9929 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9930 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9931 # The file is in a subdirectory.
9932 test ! -d "$ac_dir" && mkdir "$ac_dir"
9935 mv conftest.h $ac_file
9940 cat >> $CONFIG_STATUS <<EOF
9943 symbolic_link='$symbolic_link'
9946 cat >> $CONFIG_STATUS <<\EOF
9947 for ac_file in $CONFIG_FILES; do
9948 # Support "outfile[:infile[:infile...]]"
9950 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9952 # PO directories have a Makefile.in generated from Makefile.in.in.
9953 case "$ac_file" in */Makefile.in)
9954 # Adjust a relative srcdir.
9955 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9956 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9957 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9958 # In autoconf-2.13 it is called $ac_given_srcdir.
9959 # In autoconf-2.50 it is called $srcdir.
9960 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9961 case "$ac_given_srcdir" in
9962 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9963 /*) top_srcdir="$ac_given_srcdir" ;;
9964 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9966 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9967 rm -f "$ac_dir/POTFILES"
9968 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9969 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9970 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9971 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9977 case x$CONFIG_HEADERS in
9978 xauto-host.h:config.in)
9981 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9982 # bootstrapping and the installation procedure can still use
9983 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9984 # FLAGS_TO_PASS has been modified to solve the problem there.
9985 # This is virtually a duplicate of what happens in configure.lang; we do
9986 # an extra check to make sure this only happens if ln -s can be used.
9987 if test "$symbolic_link" = "ln -s"; then
9988 for d in .. ${subdirs} fixinc ; do
9989 if test $d != ..; then
9990 STARTDIR=`${PWDCMD-pwd}`
9992 for t in stage1 stage2 stage3 stage4 include
9995 $symbolic_link ../$t $t 2>/dev/null
10001 # Avoid having to add intl to our include paths.
10002 if test -f intl/libintl.h; then
10003 echo creating libintl.h
10004 echo '#include "intl/libintl.h"' >libintl.h
10009 chmod +x $CONFIG_STATUS
10010 rm -fr confdefs* $ac_clean_files
10011 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1