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,
131 bindir='${exec_prefix}/bin'
132 sbindir='${exec_prefix}/sbin'
133 libexecdir='${exec_prefix}/libexec'
134 datadir='${prefix}/share'
135 sysconfdir='${prefix}/etc'
136 sharedstatedir='${prefix}/com'
137 localstatedir='${prefix}/var'
138 libdir='${exec_prefix}/lib'
139 includedir='${prefix}/include'
140 oldincludedir='/usr/include'
141 infodir='${prefix}/info'
142 mandir='${prefix}/man'
144 # Initialize some other variables.
147 SHELL=${CONFIG_SHELL-/bin/sh}
148 # Maximum number of lines to put in a shell here document.
155 # If the previous option needs an argument, assign it.
156 if test -n "$ac_prev"; then
157 eval "$ac_prev=\$ac_option"
163 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174 bindir="$ac_optarg" ;;
176 -build | --build | --buil | --bui | --bu)
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build="$ac_optarg" ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file="$ac_optarg" ;;
188 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
190 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
192 datadir="$ac_optarg" ;;
194 -disable-* | --disable-*)
195 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
196 # Reject names that are not valid shell variable names.
197 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
198 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
200 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
201 eval "enable_${ac_feature}=no" ;;
203 -enable-* | --enable-*)
204 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
205 # Reject names that are not valid shell variable names.
206 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
207 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
209 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214 eval "enable_${ac_feature}='$ac_optarg'" ;;
216 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
217 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
218 | --exec | --exe | --ex)
219 ac_prev=exec_prefix ;;
220 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
221 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
222 | --exec=* | --exe=* | --ex=*)
223 exec_prefix="$ac_optarg" ;;
225 -gas | --gas | --ga | --g)
226 # Obsolete; use --with-gas.
229 -help | --help | --hel | --he)
230 # Omit some internal or obsolete options to make the list less imposing.
231 # This message is too long to be a string in the A/UX 3.1 sh.
233 Usage: configure [options] [host]
234 Options: [defaults in brackets after descriptions]
236 --cache-file=FILE cache test results in FILE
237 --help print this message
238 --no-create do not create output files
239 --quiet, --silent do not print \`checking...' messages
240 --site-file=FILE use FILE as the site file
241 --version print the version of autoconf that created configure
242 Directory and file names:
243 --prefix=PREFIX install architecture-independent files in PREFIX
245 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
247 --bindir=DIR user executables in DIR [EPREFIX/bin]
248 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
249 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
250 --datadir=DIR read-only architecture-independent data in DIR
252 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
253 --sharedstatedir=DIR modifiable architecture-independent data in DIR
255 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
256 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
257 --includedir=DIR C header files in DIR [PREFIX/include]
258 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
259 --infodir=DIR info documentation in DIR [PREFIX/info]
260 --mandir=DIR man documentation in DIR [PREFIX/man]
261 --srcdir=DIR find the sources in DIR [configure dir or ..]
262 --program-prefix=PREFIX prepend PREFIX to installed program names
263 --program-suffix=SUFFIX append SUFFIX to installed program names
264 --program-transform-name=PROGRAM
265 run sed PROGRAM on installed program names
269 --build=BUILD configure for building on BUILD [BUILD=HOST]
270 --host=HOST configure for HOST [guessed]
271 --target=TARGET configure for TARGET [TARGET=HOST]
272 Features and packages:
273 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
274 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
275 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
276 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
277 --x-includes=DIR X include files are in DIR
278 --x-libraries=DIR X library files are in DIR
280 if test -n "$ac_help"; then
281 echo "--enable and --with options recognized:$ac_help"
285 -host | --host | --hos | --ho)
287 -host=* | --host=* | --hos=* | --ho=*)
290 -includedir | --includedir | --includedi | --included | --include \
291 | --includ | --inclu | --incl | --inc)
292 ac_prev=includedir ;;
293 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294 | --includ=* | --inclu=* | --incl=* | --inc=*)
295 includedir="$ac_optarg" ;;
297 -infodir | --infodir | --infodi | --infod | --info | --inf)
299 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300 infodir="$ac_optarg" ;;
302 -libdir | --libdir | --libdi | --libd)
304 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 libdir="$ac_optarg" ;;
307 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308 | --libexe | --libex | --libe)
309 ac_prev=libexecdir ;;
310 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311 | --libexe=* | --libex=* | --libe=*)
312 libexecdir="$ac_optarg" ;;
314 -localstatedir | --localstatedir | --localstatedi | --localstated \
315 | --localstate | --localstat | --localsta | --localst \
316 | --locals | --local | --loca | --loc | --lo)
317 ac_prev=localstatedir ;;
318 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321 localstatedir="$ac_optarg" ;;
323 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
325 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
326 mandir="$ac_optarg" ;;
329 # Obsolete; use --without-fp.
332 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
336 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
337 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
340 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
341 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
342 | --oldin | --oldi | --old | --ol | --o)
343 ac_prev=oldincludedir ;;
344 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
345 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
346 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
347 oldincludedir="$ac_optarg" ;;
349 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
351 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
352 prefix="$ac_optarg" ;;
354 -program-prefix | --program-prefix | --program-prefi | --program-pref \
355 | --program-pre | --program-pr | --program-p)
356 ac_prev=program_prefix ;;
357 -program-prefix=* | --program-prefix=* | --program-prefi=* \
358 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
359 program_prefix="$ac_optarg" ;;
361 -program-suffix | --program-suffix | --program-suffi | --program-suff \
362 | --program-suf | --program-su | --program-s)
363 ac_prev=program_suffix ;;
364 -program-suffix=* | --program-suffix=* | --program-suffi=* \
365 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
366 program_suffix="$ac_optarg" ;;
368 -program-transform-name | --program-transform-name \
369 | --program-transform-nam | --program-transform-na \
370 | --program-transform-n | --program-transform- \
371 | --program-transform | --program-transfor \
372 | --program-transfo | --program-transf \
373 | --program-trans | --program-tran \
374 | --progr-tra | --program-tr | --program-t)
375 ac_prev=program_transform_name ;;
376 -program-transform-name=* | --program-transform-name=* \
377 | --program-transform-nam=* | --program-transform-na=* \
378 | --program-transform-n=* | --program-transform-=* \
379 | --program-transform=* | --program-transfor=* \
380 | --program-transfo=* | --program-transf=* \
381 | --program-trans=* | --program-tran=* \
382 | --progr-tra=* | --program-tr=* | --program-t=*)
383 program_transform_name="$ac_optarg" ;;
385 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
386 | -silent | --silent | --silen | --sile | --sil)
389 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
391 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
393 sbindir="$ac_optarg" ;;
395 -sharedstatedir | --sharedstatedir | --sharedstatedi \
396 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
397 | --sharedst | --shareds | --shared | --share | --shar \
399 ac_prev=sharedstatedir ;;
400 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
401 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
402 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
404 sharedstatedir="$ac_optarg" ;;
406 -site | --site | --sit)
408 -site=* | --site=* | --sit=*)
411 -site-file | --site-file | --site-fil | --site-fi | --site-f)
413 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
414 sitefile="$ac_optarg" ;;
416 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
418 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
419 srcdir="$ac_optarg" ;;
421 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
422 | --syscon | --sysco | --sysc | --sys | --sy)
423 ac_prev=sysconfdir ;;
424 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
425 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
426 sysconfdir="$ac_optarg" ;;
428 -target | --target | --targe | --targ | --tar | --ta | --t)
430 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
431 target="$ac_optarg" ;;
433 -v | -verbose | --verbose | --verbos | --verbo | --verb)
436 -version | --version | --versio | --versi | --vers)
437 echo "configure generated by autoconf version 2.13"
441 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
442 # Reject names that are not valid shell variable names.
443 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
444 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
446 ac_package=`echo $ac_package| sed 's/-/_/g'`
451 eval "with_${ac_package}='$ac_optarg'" ;;
453 -without-* | --without-*)
454 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
455 # Reject names that are not valid shell variable names.
456 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
457 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
459 ac_package=`echo $ac_package| sed 's/-/_/g'`
460 eval "with_${ac_package}=no" ;;
463 # Obsolete; use --with-x.
466 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
467 | --x-incl | --x-inc | --x-in | --x-i)
468 ac_prev=x_includes ;;
469 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
470 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
471 x_includes="$ac_optarg" ;;
473 -x-libraries | --x-libraries | --x-librarie | --x-librari \
474 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
475 ac_prev=x_libraries ;;
476 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
477 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
478 x_libraries="$ac_optarg" ;;
480 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
484 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
485 echo "configure: warning: $ac_option: invalid host type" 1>&2
487 if test "x$nonopt" != xNONE; then
488 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
496 if test -n "$ac_prev"; then
497 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
500 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
502 # File descriptor usage:
505 # 2 errors and warnings
506 # 3 some systems may open it to /dev/tty
507 # 4 used on the Kubota Titan
508 # 6 checking for... messages and results
509 # 5 compiler messages saved in config.log
510 if test "$silent" = yes; then
518 This file contains any messages produced by compilers while
519 running configure, to aid debugging if configure makes a mistake.
522 # Strip out --no-create and --no-recursion so they do not pile up.
523 # Also quote any args containing shell metacharacters.
528 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
529 | --no-cr | --no-c) ;;
530 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
532 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
533 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
534 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
539 # Only set these to C if already set. These must not be set unconditionally
540 # because not all systems understand e.g. LANG=C (notably SCO).
541 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
542 # Non-C LC_CTYPE values break the ctype check.
543 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
544 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
545 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
546 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
548 # confdefs.h avoids OS command line length limits that DEFS can exceed.
549 rm -rf conftest* confdefs.h
550 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
553 # A filename unique to this package, relative to the directory that
554 # configure is in, which we can look for to find out if srcdir is correct.
555 ac_unique_file=tree.c
557 # Find the source files, if location was not specified.
558 if test -z "$srcdir"; then
559 ac_srcdir_defaulted=yes
560 # Try the directory containing this script, then its parent.
562 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
563 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
565 if test ! -r $srcdir/$ac_unique_file; then
569 ac_srcdir_defaulted=no
571 if test ! -r $srcdir/$ac_unique_file; then
572 if test "$ac_srcdir_defaulted" = yes; then
573 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
575 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
578 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
580 # Prefer explicitly selected file to automatically selected ones.
581 if test -z "$sitefile"; then
582 if test -z "$CONFIG_SITE"; then
583 if test "x$prefix" != xNONE; then
584 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
586 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
590 CONFIG_SITE="$sitefile"
592 for ac_site_file in $CONFIG_SITE; do
593 if test -r "$ac_site_file"; then
594 echo "loading site script $ac_site_file"
599 if test -r "$cache_file"; then
600 echo "loading cache $cache_file"
603 echo "creating cache $cache_file"
608 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
609 ac_cpp='$CPP $CPPFLAGS'
610 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
611 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
612 cross_compiling=$ac_cv_prog_cc_cross
616 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
617 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
618 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
625 ac_n= ac_c='\c' ac_t=
631 # Determine the host, build, and target systems
633 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
634 if test -f $ac_dir/install-sh; then
636 ac_install_sh="$ac_aux_dir/install-sh -c"
638 elif test -f $ac_dir/install.sh; then
640 ac_install_sh="$ac_aux_dir/install.sh -c"
644 if test -z "$ac_aux_dir"; then
645 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
647 ac_config_guess=$ac_aux_dir/config.guess
648 ac_config_sub=$ac_aux_dir/config.sub
649 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
652 # Do some error checking and defaulting for the host and target type.
654 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
657 # 1. You are not allowed to specify --host, --target, and nonopt at the
659 # 2. Host defaults to nonopt.
660 # 3. If nonopt is not specified, then host defaults to the current host,
661 # as determined by config.guess.
662 # 4. Target and build default to nonopt.
663 # 5. If nonopt is not specified, then target and build default to host.
665 # The aliases save the names the user supplied, while $host etc.
666 # will get canonicalized.
667 case $host---$target---$nonopt in
668 NONE---*---* | *---NONE---* | *---*---NONE) ;;
669 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
673 # Make sure we can run config.sub.
674 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
675 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
678 echo $ac_n "checking host system type""... $ac_c" 1>&6
679 echo "configure:680: checking host system type" >&5
682 case "$host_alias" in
686 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
687 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
689 *) host_alias=$nonopt ;;
693 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
694 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
695 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
696 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
697 echo "$ac_t""$host" 1>&6
699 echo $ac_n "checking target system type""... $ac_c" 1>&6
700 echo "configure:701: checking target system type" >&5
703 case "$target_alias" in
706 NONE) target_alias=$host_alias ;;
707 *) target_alias=$nonopt ;;
711 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
712 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
713 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
714 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
715 echo "$ac_t""$target" 1>&6
717 echo $ac_n "checking build system type""... $ac_c" 1>&6
718 echo "configure:719: checking build system type" >&5
721 case "$build_alias" in
724 NONE) build_alias=$host_alias ;;
725 *) build_alias=$nonopt ;;
729 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
730 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
731 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
732 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
733 echo "$ac_t""$build" 1>&6
735 test "$host_alias" != "$target_alias" &&
736 test "$program_prefix$program_suffix$program_transform_name" = \
738 program_prefix=${target_alias}-
741 # Determine the target- and build-specific subdirectories
742 case ${build_alias} in
743 "") build_noncanonical=${build} ;;
744 *) build_noncanonical=${build_alias} ;;
747 case ${host_alias} in
748 "") host_noncanonical=${build_noncanonical} ;;
749 *) host_noncanonical=${host_alias} ;;
752 case ${target_alias} in
753 "") target_noncanonical=${host_noncanonical} ;;
754 *) target_noncanonical=${target_alias} ;;
757 # Prefix 'build-' so this never conflicts with target_subdir.
758 build_subdir="build-${build_noncanonical}"
759 # Not really a subdirectory, but here for completeness.
762 target_subdir=${target_noncanonical}
765 # Set program_transform_name
766 if test "$program_transform_name" = s,x,x,; then
767 program_transform_name=
769 # Double any \ or $. echo might interpret backslashes.
770 cat <<\EOF_SED > conftestsed
771 s,\\,\\\\,g; s,\$,$$,g
773 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
776 test "$program_prefix" != NONE &&
777 program_transform_name="s,^,${program_prefix},; $program_transform_name"
778 # Use a double $ so make ignores it.
779 test "$program_suffix" != NONE &&
780 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
782 # sed with no file args requires a program.
783 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
786 # Check for bogus environment variables.
787 # Test if LIBRARY_PATH contains the notation for the current directory
788 # since this would lead to problems installing/building glibc.
789 # LIBRARY_PATH contains the current directory if one of the following
791 # - one of the terminals (":" and ";") is the first or last sign
792 # - two terminals occur directly after each other
793 # - the path contains an element with a dot in it
794 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
795 echo "configure:796: checking LIBRARY_PATH variable" >&5
796 case ${LIBRARY_PATH} in
797 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
798 library_path_setting="contains current directory"
801 library_path_setting="ok"
804 echo "$ac_t""$library_path_setting" 1>&6
805 if test "$library_path_setting" != "ok"; then
806 { echo "configure: error:
807 *** LIBRARY_PATH shouldn't contain the current directory when
808 *** building gcc. Please change the environment variable
809 *** and run configure again." 1>&2; exit 1; }
812 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
813 # since this would lead to problems installing/building glibc.
814 # GCC_EXEC_PREFIX contains the current directory if one of the following
816 # - one of the terminals (":" and ";") is the first or last sign
817 # - two terminals occur directly after each other
818 # - the path contains an element with a dot in it
819 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
820 echo "configure:821: checking GCC_EXEC_PREFIX variable" >&5
821 case ${GCC_EXEC_PREFIX} in
822 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
823 gcc_exec_prefix_setting="contains current directory"
826 gcc_exec_prefix_setting="ok"
829 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
830 if test "$gcc_exec_prefix_setting" != "ok"; then
831 { echo "configure: error:
832 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
833 *** building gcc. Please change the environment variable
834 *** and run configure again." 1>&2; exit 1; }
841 # Specify the local prefix
843 # Check whether --with-local-prefix or --without-local-prefix was given.
844 if test "${with_local_prefix+set}" = set; then
845 withval="$with_local_prefix"
847 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
849 *) local_prefix=$with_local_prefix ;;
854 # Default local prefix if it is empty
855 if test x$local_prefix = x; then
856 local_prefix=/usr/local
859 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
860 # passed in by the toplevel make and thus we'd get different behavior
861 # depending on where we built the sources.
863 # Specify the g++ header file directory
864 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
865 if test "${with_gxx_include_dir+set}" = set; then
866 withval="$with_gxx_include_dir"
868 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
870 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
875 if test x${gcc_gxx_include_dir} = x; then
876 if test x${enable_version_specific_runtime_libs} = xyes; then
877 gcc_gxx_include_dir='${libsubdir}/include/c++'
879 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
880 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
884 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
885 if test "${with_cpp_install_dir+set}" = set; then
886 withval="$with_cpp_install_dir"
887 if test x$withval = xyes; then
888 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
889 elif test x$withval != xno; then
890 cpp_install_dir=$withval
895 # -------------------
896 # Find default linker
897 # -------------------
900 # Check whether --with-gnu-ld or --without-gnu-ld was given.
901 if test "${with_gnu_ld+set}" = set; then
902 withval="$with_gnu_ld"
903 gnu_ld_flag="$with_gnu_ld"
909 # With pre-defined ld
910 # Check whether --with-ld or --without-ld was given.
911 if test "${with_ld+set}" = set; then
913 DEFAULT_LINKER="$with_ld"
916 if test x"${DEFAULT_LINKER+set}" = x"set"; then
917 if test ! -x "$DEFAULT_LINKER"; then
918 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
919 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
922 cat >> confdefs.h <<EOF
923 #define DEFAULT_LINKER "$DEFAULT_LINKER"
928 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
929 echo "configure:930: checking whether a default linker was specified" >&5
930 if test x"${DEFAULT_LINKER+set}" = x"set"; then
931 if test x"$gnu_ld_flag" = x"no"; then
932 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
934 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
937 echo "$ac_t""no" 1>&6
940 # ----------------------
941 # Find default assembler
942 # ----------------------
945 # Check whether --with-gnu-as or --without-gnu-as was given.
946 if test "${with_gnu_as+set}" = set; then
947 withval="$with_gnu_as"
948 gas_flag="$with_gnu_as"
954 # Check whether --with-as or --without-as was given.
955 if test "${with_as+set}" = set; then
957 DEFAULT_ASSEMBLER="$with_as"
960 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
961 if test ! -x "$DEFAULT_ASSEMBLER"; then
962 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
963 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
966 cat >> confdefs.h <<EOF
967 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
972 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
973 echo "configure:974: checking whether a default assembler was specified" >&5
974 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
975 if test x"$gas_flag" = x"no"; then
976 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
978 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
981 echo "$ac_t""no" 1>&6
988 # Find the native compiler
989 # Extract the first word of "gcc", so it can be a program name with args.
990 set dummy gcc; ac_word=$2
991 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
992 echo "configure:993: checking for $ac_word" >&5
993 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
996 if test -n "$CC"; then
997 ac_cv_prog_CC="$CC" # Let the user override the test.
999 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1001 for ac_dir in $ac_dummy; do
1002 test -z "$ac_dir" && ac_dir=.
1003 if test -f $ac_dir/$ac_word; then
1012 if test -n "$CC"; then
1013 echo "$ac_t""$CC" 1>&6
1015 echo "$ac_t""no" 1>&6
1018 if test -z "$CC"; then
1019 # Extract the first word of "cc", so it can be a program name with args.
1020 set dummy cc; ac_word=$2
1021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1022 echo "configure:1023: checking for $ac_word" >&5
1023 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1024 echo $ac_n "(cached) $ac_c" 1>&6
1026 if test -n "$CC"; then
1027 ac_cv_prog_CC="$CC" # Let the user override the test.
1029 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1032 for ac_dir in $ac_dummy; do
1033 test -z "$ac_dir" && ac_dir=.
1034 if test -f $ac_dir/$ac_word; then
1035 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1036 ac_prog_rejected=yes
1044 if test $ac_prog_rejected = yes; then
1045 # We found a bogon in the path, so make sure we never use it.
1046 set dummy $ac_cv_prog_CC
1048 if test $# -gt 0; then
1049 # We chose a different compiler from the bogus one.
1050 # However, it has the same basename, so the bogon will be chosen
1051 # first if we set CC to just the basename; use the full file name.
1053 set dummy "$ac_dir/$ac_word" "$@"
1061 if test -n "$CC"; then
1062 echo "$ac_t""$CC" 1>&6
1064 echo "$ac_t""no" 1>&6
1067 if test -z "$CC"; then
1068 case "`uname -s`" in
1070 # Extract the first word of "cl", so it can be a program name with args.
1071 set dummy cl; ac_word=$2
1072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1073 echo "configure:1074: checking for $ac_word" >&5
1074 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1075 echo $ac_n "(cached) $ac_c" 1>&6
1077 if test -n "$CC"; then
1078 ac_cv_prog_CC="$CC" # Let the user override the test.
1080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1082 for ac_dir in $ac_dummy; do
1083 test -z "$ac_dir" && ac_dir=.
1084 if test -f $ac_dir/$ac_word; then
1093 if test -n "$CC"; then
1094 echo "$ac_t""$CC" 1>&6
1096 echo "$ac_t""no" 1>&6
1101 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1104 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1105 echo "configure:1106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1108 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1109 ac_cpp='$CPP $CPPFLAGS'
1110 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1111 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1112 cross_compiling=$ac_cv_prog_cc_cross
1114 cat > conftest.$ac_ext << EOF
1116 #line 1117 "configure"
1117 #include "confdefs.h"
1121 if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1122 ac_cv_prog_cc_works=yes
1123 # If we can't run a trivial program, we are probably using a cross compiler.
1124 if (./conftest; exit) 2>/dev/null; then
1125 ac_cv_prog_cc_cross=no
1127 ac_cv_prog_cc_cross=yes
1130 echo "configure: failed program was:" >&5
1131 cat conftest.$ac_ext >&5
1132 ac_cv_prog_cc_works=no
1136 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1137 ac_cpp='$CPP $CPPFLAGS'
1138 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1139 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1140 cross_compiling=$ac_cv_prog_cc_cross
1142 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1143 if test $ac_cv_prog_cc_works = no; then
1144 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1146 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1147 echo "configure:1148: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1148 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1149 cross_compiling=$ac_cv_prog_cc_cross
1151 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1152 echo "configure:1153: checking whether we are using GNU C" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1156 cat > conftest.c <<EOF
1161 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1168 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1170 if test $ac_cv_prog_gcc = yes; then
1176 ac_test_CFLAGS="${CFLAGS+set}"
1177 ac_save_CFLAGS="$CFLAGS"
1179 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1180 echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5
1181 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1184 echo 'void f(){}' > conftest.c
1185 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1194 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1195 if test "$ac_test_CFLAGS" = set; then
1196 CFLAGS="$ac_save_CFLAGS"
1197 elif test $ac_cv_prog_cc_g = yes; then
1198 if test "$GCC" = yes; then
1204 if test "$GCC" = yes; then
1211 if test "x$CC" != xcc; then
1212 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1213 echo "configure:1214: checking whether $CC and cc understand -c and -o together" >&5
1215 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1216 echo "configure:1217: checking whether cc understands -c and -o together" >&5
1218 set dummy $CC; ac_cc="`echo $2 |
1219 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1220 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
1223 echo 'foo(){}' > conftest.c
1224 # Make sure it works both with $CC and with simple cc.
1225 # We do the test twice because some compilers refuse to overwrite an
1226 # existing .o file with -o, though they will create one.
1227 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1228 if { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1229 test -f conftest.o && { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1231 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1232 if test "x$CC" != xcc; then
1233 # Test first that cc exists at all.
1234 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1235 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1236 if { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1237 test -f conftest.o && { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1242 # cc exists but doesn't like -o.
1243 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1248 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1253 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1254 echo "$ac_t""yes" 1>&6
1256 echo "$ac_t""no" 1>&6
1257 cat >> confdefs.h <<\EOF
1258 #define NO_MINUS_C_MINUS_O 1
1263 # autoconf is lame and doesn't give us any substitution variable for this.
1264 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1265 NO_MINUS_C_MINUS_O=yes
1267 OUTPUT_OPTION='-o $@'
1272 # -------------------------
1273 # Check C compiler features
1274 # -------------------------
1276 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1277 echo "configure:1278: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1278 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1279 echo $ac_n "(cached) $ac_c" 1>&6
1281 save_CFLAGS="$CFLAGS"
1282 CFLAGS="-Wno-long-long"
1283 cat > conftest.$ac_ext <<EOF
1284 #line 1285 "configure"
1285 #include "confdefs.h"
1291 if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1293 ac_cv_prog_cc_no_long_long=yes
1295 echo "configure: failed program was:" >&5
1296 cat conftest.$ac_ext >&5
1298 ac_cv_prog_cc_no_long_long=no
1301 CFLAGS="$save_CFLAGS"
1304 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1306 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1307 echo "configure:1308: checking how to run the C preprocessor" >&5
1308 # On Suns, sometimes $CPP names a directory.
1309 if test -n "$CPP" && test -d "$CPP"; then
1312 if test -z "$CPP"; then
1313 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1316 # This must be in double quotes, not single quotes, because CPP may get
1317 # substituted into the Makefile and "${CC-cc}" will confuse make.
1319 # On the NeXT, cc -E runs the code through the compiler's parser,
1320 # not just through cpp.
1321 cat > conftest.$ac_ext <<EOF
1322 #line 1323 "configure"
1323 #include "confdefs.h"
1327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1328 { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1330 if test -z "$ac_err"; then
1334 echo "configure: failed program was:" >&5
1335 cat conftest.$ac_ext >&5
1337 CPP="${CC-cc} -E -traditional-cpp"
1338 cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1345 { (eval echo configure:1346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1347 if test -z "$ac_err"; then
1351 echo "configure: failed program was:" >&5
1352 cat conftest.$ac_ext >&5
1354 CPP="${CC-cc} -nologo -E"
1355 cat > conftest.$ac_ext <<EOF
1356 #line 1357 "configure"
1357 #include "confdefs.h"
1361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1362 { (eval echo configure:1363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1364 if test -z "$ac_err"; then
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1378 ac_cv_prog_CPP="$CPP"
1380 CPP="$ac_cv_prog_CPP"
1382 ac_cv_prog_CPP="$CPP"
1384 echo "$ac_t""$CPP" 1>&6
1386 echo $ac_n "checking for inline""... $ac_c" 1>&6
1387 echo "configure:1388: checking for inline" >&5
1388 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1389 echo $ac_n "(cached) $ac_c" 1>&6
1392 for ac_kw in inline __inline__ __inline; do
1393 cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1401 if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1403 ac_cv_c_inline=$ac_kw; break
1405 echo "configure: failed program was:" >&5
1406 cat conftest.$ac_ext >&5
1413 echo "$ac_t""$ac_cv_c_inline" 1>&6
1414 case "$ac_cv_c_inline" in
1416 no) cat >> confdefs.h <<\EOF
1420 *) cat >> confdefs.h <<EOF
1421 #define inline $ac_cv_c_inline
1427 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1428 echo "configure:1429: checking for long long int" >&5
1429 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1430 echo $ac_n "(cached) $ac_c" 1>&6
1432 cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1440 if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1442 ac_cv_c_long_long=yes
1444 echo "configure: failed program was:" >&5
1445 cat conftest.$ac_ext >&5
1447 ac_cv_c_long_long=no
1452 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1453 if test $ac_cv_c_long_long = yes; then
1454 cat >> confdefs.h <<\EOF
1455 #define HAVE_LONG_LONG 1
1459 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1460 echo "configure:1461: checking for __int64" >&5
1461 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1464 cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1472 if { (eval echo configure:1473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1476 echo "configure: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1484 echo "$ac_t""$ac_cv_c___int64" 1>&6
1485 if test $ac_cv_c___int64 = yes; then
1486 cat >> confdefs.h <<\EOF
1487 #define HAVE___INT64 1
1492 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1493 echo "configure:1494: checking for built-in _Bool" >&5
1494 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1495 echo $ac_n "(cached) $ac_c" 1>&6
1497 cat > conftest.$ac_ext <<EOF
1498 #line 1499 "configure"
1499 #include "confdefs.h"
1505 if { (eval echo configure:1506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1509 echo "configure: failed program was:" >&5
1510 cat conftest.$ac_ext >&5
1518 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1519 if test $gcc_cv_c__bool = yes; then
1520 cat >> confdefs.h <<\EOF
1521 #define HAVE__BOOL 1
1527 # sizeof(char) is 1 by definition.
1528 echo $ac_n "checking size of short""... $ac_c" 1>&6
1529 echo "configure:1530: checking size of short" >&5
1530 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1531 echo $ac_n "(cached) $ac_c" 1>&6
1533 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1534 cat > conftest.$ac_ext <<EOF
1535 #line 1536 "configure"
1536 #include "confdefs.h"
1537 #include "confdefs.h"
1538 #include <sys/types.h>
1542 switch (0) case 0: case (sizeof (short) == $ac_size):;
1545 if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1547 ac_cv_sizeof_short=$ac_size
1549 echo "configure: failed program was:" >&5
1550 cat conftest.$ac_ext >&5
1553 if test x$ac_cv_sizeof_short != x ; then break; fi
1558 if test x$ac_cv_sizeof_short = x ; then
1559 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1561 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1562 cat >> confdefs.h <<EOF
1563 #define SIZEOF_SHORT $ac_cv_sizeof_short
1567 echo $ac_n "checking size of int""... $ac_c" 1>&6
1568 echo "configure:1569: checking size of int" >&5
1569 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1570 echo $ac_n "(cached) $ac_c" 1>&6
1572 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1573 cat > conftest.$ac_ext <<EOF
1574 #line 1575 "configure"
1575 #include "confdefs.h"
1576 #include "confdefs.h"
1577 #include <sys/types.h>
1581 switch (0) case 0: case (sizeof (int) == $ac_size):;
1584 if { (eval echo configure:1585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1586 ac_cv_sizeof_int=$ac_size
1588 echo "configure: failed program was:" >&5
1589 cat conftest.$ac_ext >&5
1592 if test x$ac_cv_sizeof_int != x ; then break; fi
1597 if test x$ac_cv_sizeof_int = x ; then
1598 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1600 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1601 cat >> confdefs.h <<EOF
1602 #define SIZEOF_INT $ac_cv_sizeof_int
1606 echo $ac_n "checking size of long""... $ac_c" 1>&6
1607 echo "configure:1608: checking size of long" >&5
1608 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1609 echo $ac_n "(cached) $ac_c" 1>&6
1611 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1612 cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615 #include "confdefs.h"
1616 #include <sys/types.h>
1620 switch (0) case 0: case (sizeof (long) == $ac_size):;
1623 if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1625 ac_cv_sizeof_long=$ac_size
1627 echo "configure: failed program was:" >&5
1628 cat conftest.$ac_ext >&5
1631 if test x$ac_cv_sizeof_long != x ; then break; fi
1636 if test x$ac_cv_sizeof_long = x ; then
1637 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1639 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1640 cat >> confdefs.h <<EOF
1641 #define SIZEOF_LONG $ac_cv_sizeof_long
1645 if test $ac_cv_c_long_long = yes; then
1646 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1647 echo "configure:1648: checking size of long long" >&5
1648 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1649 echo $ac_n "(cached) $ac_c" 1>&6
1651 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1652 cat > conftest.$ac_ext <<EOF
1653 #line 1654 "configure"
1654 #include "confdefs.h"
1655 #include "confdefs.h"
1656 #include <sys/types.h>
1660 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1663 if { (eval echo configure:1664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1665 ac_cv_sizeof_long_long=$ac_size
1667 echo "configure: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1671 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1676 if test x$ac_cv_sizeof_long_long = x ; then
1677 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1679 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1680 cat >> confdefs.h <<EOF
1681 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1686 if test $ac_cv_c___int64 = yes; then
1687 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1688 echo "configure:1689: checking size of __int64" >&5
1689 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1690 echo $ac_n "(cached) $ac_c" 1>&6
1692 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1693 cat > conftest.$ac_ext <<EOF
1694 #line 1695 "configure"
1695 #include "confdefs.h"
1696 #include "confdefs.h"
1697 #include <sys/types.h>
1701 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1704 if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1706 ac_cv_sizeof___int64=$ac_size
1708 echo "configure: failed program was:" >&5
1709 cat conftest.$ac_ext >&5
1712 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1717 if test x$ac_cv_sizeof___int64 = x ; then
1718 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1720 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1721 cat >> confdefs.h <<EOF
1722 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1732 # See if GNAT has been installed
1733 if test $host != $build; then
1734 ac_tool_prefix=${host_alias}-
1740 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1741 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1743 echo "configure:1744: checking for $ac_word" >&5
1744 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1745 echo $ac_n "(cached) $ac_c" 1>&6
1747 if test -n "$GNATBIND"; then
1748 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1752 for ac_dir in $ac_dummy; do
1753 test -z "$ac_dir" && ac_dir=.
1754 if test -f $ac_dir/$ac_word; then
1755 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1762 GNATBIND="$ac_cv_prog_GNATBIND"
1763 if test -n "$GNATBIND"; then
1764 echo "$ac_t""$GNATBIND" 1>&6
1766 echo "$ac_t""no" 1>&6
1770 if test -z "$ac_cv_prog_GNATBIND"; then
1771 if test -n "$ac_tool_prefix"; then
1772 # Extract the first word of "gnatbind", so it can be a program name with args.
1773 set dummy gnatbind; ac_word=$2
1774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1775 echo "configure:1776: checking for $ac_word" >&5
1776 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1777 echo $ac_n "(cached) $ac_c" 1>&6
1779 if test -n "$GNATBIND"; then
1780 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1782 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1784 for ac_dir in $ac_dummy; do
1785 test -z "$ac_dir" && ac_dir=.
1786 if test -f $ac_dir/$ac_word; then
1787 ac_cv_prog_GNATBIND="gnatbind"
1792 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1795 GNATBIND="$ac_cv_prog_GNATBIND"
1796 if test -n "$GNATBIND"; then
1797 echo "$ac_t""$GNATBIND" 1>&6
1799 echo "$ac_t""no" 1>&6
1807 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1808 echo "configure:1809: checking for compiler driver that understands Ada" >&5
1809 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1812 cat >conftest.adb <<EOF
1813 procedure conftest is begin null; end conftest;
1816 # Have to do ac_tool_prefix and user overrides by hand.
1817 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1818 ${ac_tool_prefix}gcc gcc \
1819 ${ac_tool_prefix}cc cc \
1820 ${ac_tool_prefix}gnatgcc gnatgcc \
1821 ${ac_tool_prefix}gnatcc gnatcc \
1822 ${ac_tool_prefix}adagcc adagcc \
1823 ${ac_tool_prefix}adacc adacc ; do
1824 # There is a bug in all released versions of GCC which causes the
1825 # driver to exit successfully when the appropriate language module
1826 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1827 # Therefore we must check for the error message as well as an
1828 # unsuccessful exit.
1829 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1830 if test x"$errors" = x; then
1831 gcc_cv_prog_adac=$cand
1838 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1839 ADAC=$gcc_cv_prog_adac
1842 if test x$GNATBIND != xno && test x$ADAC != xno; then
1849 if test x$have_gnat != xno ; then
1850 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1851 echo "configure:1852: checking whether ${ADAC} accepts -Wno-long-long" >&5
1852 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
1855 cat >conftest.adb <<EOF
1856 procedure conftest is begin null; end conftest;
1858 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1859 ac_cv_prog_adac_no_long_long=yes
1861 ac_cv_prog_adac_no_long_long=no
1866 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1868 ac_cv_prog_adac_no_long_long=yes
1871 # ---------------------
1872 # Warnings and checking
1873 # ---------------------
1876 if test $ac_cv_prog_cc_no_long_long = yes && \
1877 test $ac_cv_prog_adac_no_long_long = yes ; then
1878 strict1_warn="-pedantic -Wno-long-long"
1882 # If the native compiler is GCC, we can enable warnings even in stage1.
1883 # That's useful for people building cross-compilers, or just running a
1886 if test "x$GCC" = "xyes"; then
1887 warn_cflags='$(GCC_WARN_CFLAGS)'
1891 # Enable -Werror in bootstrap stage2 and later.
1892 # Change the default to "no" on release branches.
1893 # Check whether --enable-werror or --disable-werror was given.
1894 if test "${enable_werror+set}" = set; then
1895 enableval="$enable_werror"
1901 if test x$enable_werror = xyes ; then
1906 # Enable expensive internal checks
1907 # Check whether --enable-checking or --disable-checking was given.
1908 if test "${enable_checking+set}" = set; then
1909 enableval="$enable_checking"
1913 ac_rtlflag_checking=
1915 ac_gc_always_collect=
1916 case "${enableval}" in
1917 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1918 ac_rtlflag_checking=1 ;;
1920 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1921 set fnord $enableval; shift
1926 misc) ac_checking=1 ;;
1927 tree) ac_tree_checking=1 ;;
1928 rtlflag) ac_rtlflag_checking=1 ;;
1929 rtl) ac_rtl_checking=1 ;;
1930 gc) ac_gc_checking=1 ;;
1931 gcac) ac_gc_always_collect=1 ;;
1932 valgrind) ac_checking_valgrind=1 ;;
1933 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1940 # Enable some checks by default for development versions of GCC
1941 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1945 if test x$ac_checking != x ; then
1946 cat >> confdefs.h <<\EOF
1947 #define ENABLE_CHECKING 1
1950 nocommon_flag=-fno-common
1953 if test x$ac_tree_checking != x ; then
1954 cat >> confdefs.h <<\EOF
1955 #define ENABLE_TREE_CHECKING 1
1959 if test x$ac_rtl_checking != x ; then
1960 cat >> confdefs.h <<\EOF
1961 #define ENABLE_RTL_CHECKING 1
1965 if test x$ac_rtlflag_checking != x ; then
1966 cat >> confdefs.h <<\EOF
1967 #define ENABLE_RTL_FLAG_CHECKING 1
1971 if test x$ac_gc_checking != x ; then
1972 cat >> confdefs.h <<\EOF
1973 #define ENABLE_GC_CHECKING 1
1977 if test x$ac_gc_always_collect != x ; then
1978 cat >> confdefs.h <<\EOF
1979 #define ENABLE_GC_ALWAYS_COLLECT 1
1983 valgrind_path_defines=
1985 if test x$ac_checking_valgrind != x ; then
1986 # It is certainly possible that there's valgrind but no valgrind.h.
1987 # GCC relies on making annotations so we must have both.
1988 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
1989 echo "configure:1990: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
1990 cat > conftest.$ac_ext <<EOF
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993 #include <memcheck.h>
1994 #ifndef VALGRIND_DISCARD
1995 #error VALGRIND_DISCARD not defined
1998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1999 { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2001 if test -z "$ac_err"; then
2003 gcc_cv_header_memcheck_h=yes
2006 echo "configure: failed program was:" >&5
2007 cat conftest.$ac_ext >&5
2009 gcc_cv_header_memcheck_h=no
2012 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2013 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2014 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2015 echo "configure:2016: checking for valgrind.h" >&5
2016 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2017 echo $ac_n "(cached) $ac_c" 1>&6
2019 cat > conftest.$ac_ext <<EOF
2020 #line 2021 "configure"
2021 #include "confdefs.h"
2022 #include <valgrind.h>
2024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2025 { (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2027 if test -z "$ac_err"; then
2029 eval "ac_cv_header_$ac_safe=yes"
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2035 eval "ac_cv_header_$ac_safe=no"
2039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2040 echo "$ac_t""yes" 1>&6
2043 echo "$ac_t""no" 1>&6
2047 # Extract the first word of "valgrind", so it can be a program name with args.
2048 set dummy valgrind; ac_word=$2
2049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2050 echo "configure:2051: checking for $ac_word" >&5
2051 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2052 echo $ac_n "(cached) $ac_c" 1>&6
2054 case "$valgrind_path" in
2056 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2059 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2060 for ac_dir in $PATH; do
2061 test -z "$ac_dir" && ac_dir=.
2062 if test -f $ac_dir/$ac_word; then
2063 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2064 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2073 valgrind_path="$ac_cv_path_valgrind_path"
2074 if test -n "$valgrind_path"; then
2075 echo "$ac_t""$valgrind_path" 1>&6
2077 echo "$ac_t""no" 1>&6
2080 if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2081 { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2083 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2084 valgrind_command="$valgrind_path -q"
2085 cat >> confdefs.h <<\EOF
2086 #define ENABLE_VALGRIND_CHECKING 1
2089 if test $gcc_cv_header_memcheck_h = yes; then
2090 cat >> confdefs.h <<\EOF
2091 #define HAVE_MEMCHECK_H 1
2099 # Enable code coverage collection
2100 # Check whether --enable-coverage or --disable-coverage was given.
2101 if test "${enable_coverage+set}" = set; then
2102 enableval="$enable_coverage"
2103 case "${enableval}" in
2105 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2108 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2111 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2120 # -------------------------------
2121 # Miscenalleous configure options
2122 # -------------------------------
2125 # Check whether --with-stabs or --without-stabs was given.
2126 if test "${with_stabs+set}" = set; then
2127 withval="$with_stabs"
2135 # Check whether --with-elf or --without-elf was given.
2136 if test "${with_elf+set}" = set; then
2144 # Determine whether or not multilibs are enabled.
2145 # Check whether --enable-multilib or --disable-multilib was given.
2146 if test "${enable_multilib+set}" = set; then
2147 enableval="$enable_multilib"
2155 # Enable __cxa_atexit for C++.
2156 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2157 if test "${enable___cxa_atexit+set}" = set; then
2158 enableval="$enable___cxa_atexit"
2163 # Enable Multibyte Characters for C/C++
2164 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2165 if test "${enable_c_mbchar+set}" = set; then
2166 enableval="$enable_c_mbchar"
2167 if test x$enable_c_mbchar != xno; then
2168 cat >> confdefs.h <<\EOF
2169 #define MULTIBYTE_CHARS 1
2177 # Pass with no value to take the default
2178 # Pass with a value to specify a thread package
2179 # Check whether --enable-threads or --disable-threads was given.
2180 if test "${enable_threads+set}" = set; then
2181 enableval="$enable_threads"
2188 enable_threads_flag=$enable_threads
2189 # Check if a valid thread package
2190 case x${enable_threads_flag} in
2193 target_thread_file='single'
2197 target_thread_file=''
2199 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2200 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2201 target_thread_file=$enable_threads_flag
2204 echo "$enable_threads is an unknown thread package" 1>&2
2209 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2210 if test "${enable_objc_gc+set}" = set; then
2211 enableval="$enable_objc_gc"
2212 if test x$enable_objc_gc = xno; then
2222 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2223 if test "${with_dwarf2+set}" = set; then
2224 withval="$with_dwarf2"
2225 dwarf2="$with_dwarf2"
2231 # Check whether --enable-shared or --disable-shared was given.
2232 if test "${enable_shared+set}" = set; then
2233 enableval="$enable_shared"
2235 case $enable_shared in
2239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2240 for pkg in $enableval; do
2241 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2255 # Check whether --with-sysroot or --without-sysroot was given.
2256 if test "${with_sysroot+set}" = set; then
2257 withval="$with_sysroot"
2259 case ${with_sysroot} in
2260 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2261 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2264 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2265 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2267 if test "x$exec_prefix" = xNONE; then
2268 if test "x$prefix" = xNONE; then
2269 test_prefix=/usr/local
2274 test_prefix=$exec_prefix
2276 case ${TARGET_SYSTEM_ROOT} in
2277 "${test_prefix}"|"${test_prefix}/"*|\
2278 '${exec_prefix}'|'${exec_prefix}/'*)
2279 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2280 TARGET_SYSTEM_ROOT_DEFINE="$t"
2287 TARGET_SYSTEM_ROOT_DEFINE=
2288 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2296 # -------------------------
2297 # Checks for other programs
2298 # -------------------------
2300 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2301 echo "configure:2302: checking whether ${MAKE-make} sets \${MAKE}" >&5
2302 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2303 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2304 echo $ac_n "(cached) $ac_c" 1>&6
2306 cat > conftestmake <<\EOF
2308 @echo 'ac_maketemp="${MAKE}"'
2310 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2311 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2312 if test -n "$ac_maketemp"; then
2313 eval ac_cv_prog_make_${ac_make}_set=yes
2315 eval ac_cv_prog_make_${ac_make}_set=no
2319 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2320 echo "$ac_t""yes" 1>&6
2323 echo "$ac_t""no" 1>&6
2324 SET_MAKE="MAKE=${MAKE-make}"
2328 # Find some useful tools
2329 for ac_prog in mawk gawk nawk awk
2331 # Extract the first word of "$ac_prog", so it can be a program name with args.
2332 set dummy $ac_prog; ac_word=$2
2333 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2334 echo "configure:2335: checking for $ac_word" >&5
2335 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2336 echo $ac_n "(cached) $ac_c" 1>&6
2338 if test -n "$AWK"; then
2339 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2343 for ac_dir in $ac_dummy; do
2344 test -z "$ac_dir" && ac_dir=.
2345 if test -f $ac_dir/$ac_word; then
2346 ac_cv_prog_AWK="$ac_prog"
2353 AWK="$ac_cv_prog_AWK"
2354 if test -n "$AWK"; then
2355 echo "$ac_t""$AWK" 1>&6
2357 echo "$ac_t""no" 1>&6
2360 test -n "$AWK" && break
2363 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2364 echo "configure:2365: checking whether ln works" >&5
2365 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
2368 rm -f conftestdata_t
2369 echo >conftestdata_f
2370 if ln conftestdata_f conftestdata_t 2>/dev/null
2374 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2376 gcc_cv_prog_LN="ln -s"
2381 rm -f conftestdata_f conftestdata_t
2384 LN="$gcc_cv_prog_LN"
2385 if test "$gcc_cv_prog_LN" = "ln"; then
2386 echo "$ac_t""yes" 1>&6
2388 if test "$gcc_cv_prog_LN" = "ln -s"; then
2389 echo "$ac_t""no, using ln -s" 1>&6
2391 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2395 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2396 echo "configure:2397: checking whether ln -s works" >&5
2397 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2398 echo $ac_n "(cached) $ac_c" 1>&6
2400 rm -f conftestdata_t
2401 echo >conftestdata_f
2402 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2404 gcc_cv_prog_LN_S="ln -s"
2406 if ln conftestdata_f conftestdata_t 2>/dev/null
2413 rm -f conftestdata_f conftestdata_t
2416 LN_S="$gcc_cv_prog_LN_S"
2417 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2418 echo "$ac_t""yes" 1>&6
2420 if test "$gcc_cv_prog_LN_S" = "ln"; then
2421 echo "$ac_t""no, using ln" 1>&6
2423 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2427 # Extract the first word of "ranlib", so it can be a program name with args.
2428 set dummy ranlib; ac_word=$2
2429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2430 echo "configure:2431: checking for $ac_word" >&5
2431 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2432 echo $ac_n "(cached) $ac_c" 1>&6
2434 if test -n "$RANLIB"; then
2435 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2439 for ac_dir in $ac_dummy; do
2440 test -z "$ac_dir" && ac_dir=.
2441 if test -f $ac_dir/$ac_word; then
2442 ac_cv_prog_RANLIB="ranlib"
2447 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2450 RANLIB="$ac_cv_prog_RANLIB"
2451 if test -n "$RANLIB"; then
2452 echo "$ac_t""$RANLIB" 1>&6
2454 echo "$ac_t""no" 1>&6
2457 # Find a good install program. We prefer a C program (faster),
2458 # so one script is as good as another. But avoid the broken or
2459 # incompatible versions:
2460 # SysV /etc/install, /usr/sbin/install
2461 # SunOS /usr/etc/install
2462 # IRIX /sbin/install
2464 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2465 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2466 # ./install, which can be erroneously created by make from ./install.sh.
2467 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2468 echo "configure:2469: checking for a BSD compatible install" >&5
2469 if test -z "$INSTALL"; then
2470 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2473 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2474 for ac_dir in $PATH; do
2475 # Account for people who put trailing slashes in PATH elements.
2477 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2479 # OSF1 and SCO ODT 3.0 have their own names for install.
2480 for ac_prog in ginstall scoinst install; do
2481 if test -f $ac_dir/$ac_prog; then
2482 if test $ac_prog = install &&
2483 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2484 # AIX install. It has an incompatible calling convention.
2485 # OSF/1 installbsd also uses dspmsg, but is usable.
2488 ac_cv_path_install="$ac_dir/$ac_prog -c"
2499 if test "${ac_cv_path_install+set}" = set; then
2500 INSTALL="$ac_cv_path_install"
2502 # As a last resort, use the slow shell script. We don't cache a
2503 # path for INSTALL within a source directory, because that will
2504 # break other packages using the cache if that directory is
2505 # removed, or if the path is relative.
2506 INSTALL="$ac_install_sh"
2509 echo "$ac_t""$INSTALL" 1>&6
2511 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2512 # It thinks the first close brace ends the variable substitution.
2513 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2515 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2518 # See if we have the mktemp command.
2519 # Extract the first word of "mktemp", so it can be a program name with args.
2520 set dummy mktemp; ac_word=$2
2521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2522 echo "configure:2523: checking for $ac_word" >&5
2523 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2524 echo $ac_n "(cached) $ac_c" 1>&6
2526 if test -n "$have_mktemp_command"; then
2527 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2531 for ac_dir in $ac_dummy; do
2532 test -z "$ac_dir" && ac_dir=.
2533 if test -f $ac_dir/$ac_word; then
2534 ac_cv_prog_have_mktemp_command="yes"
2539 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2542 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2543 if test -n "$have_mktemp_command"; then
2544 echo "$ac_t""$have_mktemp_command" 1>&6
2546 echo "$ac_t""no" 1>&6
2550 # Do we have a single-tree copy of texinfo?
2551 if test -f $srcdir/../texinfo/Makefile.in; then
2552 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2553 gcc_cv_prog_makeinfo_modern=yes
2554 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2556 # See if makeinfo has been installed and is modern enough
2557 # that we can use it.
2558 # Extract the first word of "makeinfo", so it can be a program name with args.
2559 set dummy makeinfo; ac_word=$2
2560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2561 echo "configure:2562: checking for $ac_word" >&5
2562 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2563 echo $ac_n "(cached) $ac_c" 1>&6
2565 if test -n "$MAKEINFO"; then
2566 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2568 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2570 for ac_dir in $ac_dummy; do
2571 test -z "$ac_dir" && ac_dir=.
2572 if test -f $ac_dir/$ac_word; then
2573 ac_cv_prog_MAKEINFO="makeinfo"
2580 MAKEINFO="$ac_cv_prog_MAKEINFO"
2581 if test -n "$MAKEINFO"; then
2582 echo "$ac_t""$MAKEINFO" 1>&6
2584 echo "$ac_t""no" 1>&6
2587 if test -n "$MAKEINFO"; then
2588 # Found it, now check the version.
2589 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2590 echo "configure:2591: checking for modern makeinfo" >&5
2591 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
2594 ac_prog_version=`$MAKEINFO --version 2>&1 |
2595 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2596 echo "configure:2597: version of makeinfo is $ac_prog_version" >&5
2597 case $ac_prog_version in
2598 '') gcc_cv_prog_makeinfo_modern=no;;
2600 gcc_cv_prog_makeinfo_modern=yes;;
2601 *) gcc_cv_prog_makeinfo_modern=no;;
2606 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2608 gcc_cv_prog_makeinfo_modern=no
2613 if test $gcc_cv_prog_makeinfo_modern = no; then
2614 echo "configure: warning:
2615 *** Makeinfo is missing or too old.
2616 *** Info documentation will not be built." 1>&2
2622 # Is pod2man recent enough to regenerate manpages?
2623 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2624 echo "configure:2625: checking for recent Pod::Man" >&5
2625 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2626 echo "$ac_t""yes" 1>&6
2627 GENERATED_MANPAGES=generated-manpages
2629 echo "$ac_t""no" 1>&6
2633 # 'make compare' can be significantly faster, if cmp itself can
2634 # skip bytes instead of using tail. The test being performed is
2635 # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
2636 # but we need to sink errors and handle broken shells.
2637 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2638 echo "configure:2639: checking for cmp's capabilities" >&5
2641 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2642 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2643 make_compare_target=slowcompare
2645 make_compare_target=gnucompare
2648 make_compare_target=slowcompare
2652 echo "$ac_t""$make_compare_target" 1>&6
2655 if test -f $srcdir/../flex/skel.c; then
2656 FLEX='$(objdir)/../flex/flex'
2658 # Extract the first word of "flex", so it can be a program name with args.
2659 set dummy flex; ac_word=$2
2660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2661 echo "configure:2662: checking for $ac_word" >&5
2662 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2663 echo $ac_n "(cached) $ac_c" 1>&6
2665 if test -n "$FLEX"; then
2666 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2668 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2670 for ac_dir in $ac_dummy; do
2671 test -z "$ac_dir" && ac_dir=.
2672 if test -f $ac_dir/$ac_word; then
2673 ac_cv_prog_FLEX="flex"
2678 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2681 FLEX="$ac_cv_prog_FLEX"
2682 if test -n "$FLEX"; then
2683 echo "$ac_t""$FLEX" 1>&6
2685 echo "$ac_t""no" 1>&6
2691 # The -L switch is so bison can find its skeleton file.
2692 if test -f $srcdir/../bison/bison.simple; then
2693 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2695 # Extract the first word of "bison", so it can be a program name with args.
2696 set dummy bison; ac_word=$2
2697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2698 echo "configure:2699: checking for $ac_word" >&5
2699 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2700 echo $ac_n "(cached) $ac_c" 1>&6
2702 if test -n "$BISON"; then
2703 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2705 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2707 for ac_dir in $ac_dummy; do
2708 test -z "$ac_dir" && ac_dir=.
2709 if test -f $ac_dir/$ac_word; then
2710 ac_cv_prog_BISON="bison"
2715 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2718 BISON="$ac_cv_prog_BISON"
2719 if test -n "$BISON"; then
2720 echo "$ac_t""$BISON" 1>&6
2722 echo "$ac_t""no" 1>&6
2727 # --------------------
2728 # Checks for C headers
2729 # --------------------
2731 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2732 echo "configure:2733: checking for GNU C library" >&5
2733 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2734 echo $ac_n "(cached) $ac_c" 1>&6
2736 cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739 #include <features.h>
2742 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2743 #error Not a GNU C library system
2747 if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2751 echo "configure: failed program was:" >&5
2752 cat conftest.$ac_ext >&5
2759 echo "$ac_t""$gcc_cv_glibc" 1>&6
2760 if test $gcc_cv_glibc = yes; then
2761 cat >> confdefs.h <<\EOF
2762 #define _GNU_SOURCE 1
2767 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2768 echo "configure:2769: checking for ANSI C header files" >&5
2769 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
2772 cat > conftest.$ac_ext <<EOF
2773 #line 2774 "configure"
2774 #include "confdefs.h"
2780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2781 { (eval echo configure:2782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2783 if test -z "$ac_err"; then
2785 ac_cv_header_stdc=yes
2788 echo "configure: failed program was:" >&5
2789 cat conftest.$ac_ext >&5
2791 ac_cv_header_stdc=no
2795 if test $ac_cv_header_stdc = yes; then
2796 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2803 egrep "memchr" >/dev/null 2>&1; then
2807 ac_cv_header_stdc=no
2813 if test $ac_cv_header_stdc = yes; then
2814 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2815 cat > conftest.$ac_ext <<EOF
2816 #line 2817 "configure"
2817 #include "confdefs.h"
2820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2821 egrep "free" >/dev/null 2>&1; then
2825 ac_cv_header_stdc=no
2831 if test $ac_cv_header_stdc = yes; then
2832 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2833 if test "$cross_compiling" = yes; then
2836 cat > conftest.$ac_ext <<EOF
2837 #line 2838 "configure"
2838 #include "confdefs.h"
2840 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2841 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2842 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2843 int main () { int i; for (i = 0; i < 256; i++)
2844 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2848 if { (eval echo configure:2849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2852 echo "configure: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2855 ac_cv_header_stdc=no
2863 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2864 if test $ac_cv_header_stdc = yes; then
2865 cat >> confdefs.h <<\EOF
2866 #define STDC_HEADERS 1
2871 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2872 echo "configure:2873: checking whether time.h and sys/time.h may both be included" >&5
2873 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2874 echo $ac_n "(cached) $ac_c" 1>&6
2876 cat > conftest.$ac_ext <<EOF
2877 #line 2878 "configure"
2878 #include "confdefs.h"
2879 #include <sys/types.h>
2880 #include <sys/time.h>
2886 if { (eval echo configure:2887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2888 ac_cv_header_time=yes
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2893 ac_cv_header_time=no
2898 echo "$ac_t""$ac_cv_header_time" 1>&6
2899 if test $ac_cv_header_time = yes; then
2900 cat >> confdefs.h <<\EOF
2901 #define TIME_WITH_SYS_TIME 1
2906 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2907 echo "configure:2908: checking for working stdbool.h" >&5
2908 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2909 echo $ac_n "(cached) $ac_c" 1>&6
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <stdbool.h>
2919 if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2921 ac_cv_header_stdbool_h=yes
2923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
2926 ac_cv_header_stdbool_h=no
2931 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2932 if test $ac_cv_header_stdbool_h = yes; then
2933 cat >> confdefs.h <<\EOF
2934 #define HAVE_STDBOOL_H 1
2939 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2940 echo "configure:2941: checking whether string.h and strings.h may both be included" >&5
2941 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2948 #include <strings.h>
2953 if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2955 gcc_cv_header_string=yes
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2960 gcc_cv_header_string=no
2965 echo "$ac_t""$gcc_cv_header_string" 1>&6
2966 if test $gcc_cv_header_string = yes; then
2967 cat >> confdefs.h <<\EOF
2968 #define STRING_WITH_STRINGS 1
2973 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2974 echo "configure:2975: checking for sys/wait.h that is POSIX.1 compatible" >&5
2975 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+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/wait.h>
2984 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2987 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2992 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2995 if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2997 ac_cv_header_sys_wait_h=yes
2999 echo "configure: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3002 ac_cv_header_sys_wait_h=no
3007 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3008 if test $ac_cv_header_sys_wait_h = yes; then
3009 cat >> confdefs.h <<\EOF
3010 #define HAVE_SYS_WAIT_H 1
3015 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3016 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
3017 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3018 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_hdr" >&5
3023 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3024 echo $ac_n "(cached) $ac_c" 1>&6
3026 cat > conftest.$ac_ext <<EOF
3027 #line 3028 "configure"
3028 #include "confdefs.h"
3031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3032 { (eval echo configure:3033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3034 if test -z "$ac_err"; then
3036 eval "ac_cv_header_$ac_safe=yes"
3039 echo "configure: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3042 eval "ac_cv_header_$ac_safe=no"
3046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3047 echo "$ac_t""yes" 1>&6
3048 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3049 cat >> confdefs.h <<EOF
3050 #define $ac_tr_hdr 1
3054 echo "$ac_t""no" 1>&6
3059 # Check for thread headers.
3060 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3061 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3062 echo "configure:3063: checking for thread.h" >&5
3063 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3064 echo $ac_n "(cached) $ac_c" 1>&6
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3072 { (eval echo configure:3073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3074 if test -z "$ac_err"; then
3076 eval "ac_cv_header_$ac_safe=yes"
3079 echo "configure: failed program was:" >&5
3080 cat conftest.$ac_ext >&5
3082 eval "ac_cv_header_$ac_safe=no"
3086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3087 echo "$ac_t""yes" 1>&6
3090 echo "$ac_t""no" 1>&6
3094 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3095 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3096 echo "configure:3097: checking for pthread.h" >&5
3097 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3100 cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 #include <pthread.h>
3105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3106 { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3108 if test -z "$ac_err"; then
3110 eval "ac_cv_header_$ac_safe=yes"
3113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3116 eval "ac_cv_header_$ac_safe=no"
3120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3121 echo "$ac_t""yes" 1>&6
3124 echo "$ac_t""no" 1>&6
3129 # These tests can't be done till we know if we have limits.h.
3130 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3131 echo "configure:3132: checking for CHAR_BIT" >&5
3132 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3133 echo $ac_n "(cached) $ac_c" 1>&6
3135 cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #ifdef HAVE_LIMITS_H
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146 egrep "found" >/dev/null 2>&1; then
3148 gcc_cv_decl_char_bit=yes
3151 gcc_cv_decl_char_bit=no
3158 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3159 if test $gcc_cv_decl_char_bit = no; then
3160 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3161 echo "configure:3162: checking number of bits in a byte" >&5
3162 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3163 echo $ac_n "(cached) $ac_c" 1>&6
3167 while test $i -lt 65; do
3168 cat > conftest.$ac_ext <<EOF
3169 #line 3170 "configure"
3170 #include "confdefs.h"
3174 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3175 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3179 if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3181 gcc_cv_c_nbby=$i; break
3183 echo "configure: failed program was:" >&5
3184 cat conftest.$ac_ext >&5
3189 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3193 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3194 if test $gcc_cv_c_nbby = failed; then
3195 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3197 cat >> confdefs.h <<EOF
3198 #define CHAR_BIT $gcc_cv_c_nbby
3203 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3204 echo "configure:3205: checking whether byte ordering is bigendian" >&5
3205 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3206 echo $ac_n "(cached) $ac_c" 1>&6
3208 ac_cv_c_bigendian=unknown
3209 # See if sys/param.h defines the BYTE_ORDER macro.
3210 cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 #include <sys/types.h>
3214 #include <sys/param.h>
3217 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3222 if { (eval echo configure:3223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3224 # It does; now see whether it defined to BIG_ENDIAN or not.
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
3227 #include "confdefs.h"
3228 #include <sys/types.h>
3229 #include <sys/param.h>
3232 #if BYTE_ORDER != BIG_ENDIAN
3237 if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3239 ac_cv_c_bigendian=yes
3241 echo "configure: failed program was:" >&5
3242 cat conftest.$ac_ext >&5
3244 ac_cv_c_bigendian=no
3248 echo "configure: failed program was:" >&5
3249 cat conftest.$ac_ext >&5
3252 if test $ac_cv_c_bigendian = unknown; then
3253 if test "$cross_compiling" = yes; then
3254 echo $ac_n "cross-compiling... " 2>&6
3256 cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3260 /* Are we little or big endian? From Harbison&Steele. */
3264 char c[sizeof (long)];
3267 exit (u.c[sizeof (long) - 1] == 1);
3270 if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3272 ac_cv_c_bigendian=no
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3277 ac_cv_c_bigendian=yes
3285 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3286 if test $ac_cv_c_bigendian = unknown; then
3287 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3288 echo "configure:3289: checking to probe for byte ordering" >&5
3290 cat >conftest.c <<EOF
3291 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3292 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3293 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3294 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3295 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3296 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3297 int main() { _ascii (); _ebcdic (); return 0; }
3299 if test -f conftest.c ; then
3300 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3301 if test `grep -l BIGenDianSyS conftest.o` ; then
3302 echo $ac_n ' big endian probe OK, ' 1>&6
3303 ac_cv_c_bigendian=yes
3305 if test `grep -l LiTTleEnDian conftest.o` ; then
3306 echo $ac_n ' little endian probe OK, ' 1>&6
3307 if test $ac_cv_c_bigendian = yes ; then
3308 ac_cv_c_bigendian=unknown;
3310 ac_cv_c_bigendian=no
3313 echo $ac_n 'guessing bigendian ... ' >&6
3316 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3318 if test $ac_cv_c_bigendian = yes; then
3319 cat >> confdefs.h <<\EOF
3320 #define WORDS_BIGENDIAN 1
3323 cat >> confdefs.h <<\EOF
3324 #define HOST_WORDS_BIG_ENDIAN 1
3331 cat >> confdefs.h <<EOF
3332 #define BYTEORDER $BYTEORDER
3335 if test $ac_cv_c_bigendian = unknown; then
3336 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3344 # Stage specific cflags for build.
3348 if test x$GCC = xyes
3350 stage1_cflags="-Wa,-J"
3356 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3357 # sources; use -no-cpp-precomp to get to GNU cpp.
3358 # Apple's GCC has bugs in designated initializer handling, so disable
3360 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3365 # These libraries may be used by collect2.
3366 # We may need a special search path to get them linked.
3367 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3368 echo "configure:3369: checking for collect2 libraries" >&5
3369 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3373 for libs in '' -lld -lmld \
3374 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3375 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 /* Override any gcc2 internal prototype to avoid an error. */
3382 /* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392 gcc_cv_collect2_libs="$libs"; break
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3400 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3403 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3404 case $gcc_cv_collect2_libs in
3406 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3410 # When building Ada code on Alpha, we need exc_resume which is usually in
3411 # -lexc. So test for it.
3415 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3416 echo "configure:3417: checking for library containing exc_resume" >&5
3417 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3418 echo $ac_n "(cached) $ac_c" 1>&6
3420 ac_func_search_save_LIBS="$LIBS"
3421 ac_cv_search_exc_resume="no"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 /* Override any gcc2 internal prototype to avoid an error. */
3426 /* We use char because int might match the return type of a gcc2
3427 builtin and then its argument prototype would still apply. */
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3436 ac_cv_search_exc_resume="none required"
3438 echo "configure: failed program was:" >&5
3439 cat conftest.$ac_ext >&5
3442 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3443 LIBS="-l$i $ac_func_search_save_LIBS"
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* Override any gcc2 internal prototype to avoid an error. */
3448 /* We use char because int might match the return type of a gcc2
3449 builtin and then its argument prototype would still apply. */
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3458 ac_cv_search_exc_resume="-l$i"
3461 echo "configure: failed program was:" >&5
3462 cat conftest.$ac_ext >&5
3466 LIBS="$ac_func_search_save_LIBS"
3469 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3470 if test "$ac_cv_search_exc_resume" != "no"; then
3471 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3480 # Some systems put ldexp and frexp in libm instead of libc; assume
3481 # they're both in the same place. jcf-dump needs them.
3485 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3486 echo "configure:3487: checking for library containing ldexp" >&5
3487 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3488 echo $ac_n "(cached) $ac_c" 1>&6
3490 ac_func_search_save_LIBS="$LIBS"
3491 ac_cv_search_ldexp="no"
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 /* Override any gcc2 internal prototype to avoid an error. */
3496 /* We use char because int might match the return type of a gcc2
3497 builtin and then its argument prototype would still apply. */
3504 if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3506 ac_cv_search_ldexp="none required"
3508 echo "configure: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3512 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3513 LIBS="-l$i $ac_func_search_save_LIBS"
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 /* Override any gcc2 internal prototype to avoid an error. */
3518 /* We use char because int might match the return type of a gcc2
3519 builtin and then its argument prototype would still apply. */
3526 if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3528 ac_cv_search_ldexp="-l$i"
3531 echo "configure: failed program was:" >&5
3532 cat conftest.$ac_ext >&5
3536 LIBS="$ac_func_search_save_LIBS"
3539 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3540 if test "$ac_cv_search_ldexp" != "no"; then
3541 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3550 # Use <inttypes.h> only if it exists,
3551 # doesn't clash with <sys/types.h>, and declares intmax_t.
3552 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3553 echo "configure:3554: checking for inttypes.h" >&5
3554 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3555 echo $ac_n "(cached) $ac_c" 1>&6
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 #include <sys/types.h>
3561 #include <inttypes.h>
3566 if { (eval echo configure:3567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3568 gcc_cv_header_inttypes_h=yes
3570 echo "configure: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
3573 gcc_cv_header_inttypes_h=no
3578 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3579 if test $gcc_cv_header_inttypes_h = yes; then
3580 cat >> confdefs.h <<\EOF
3581 #define HAVE_INTTYPES_H 1
3587 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3588 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3589 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3590 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore
3592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3593 echo "configure:3594: checking for $ac_func" >&5
3594 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
3597 cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600 /* System header to define __stub macros and hopefully few prototypes,
3601 which can conflict with char $ac_func(); below. */
3603 /* Override any gcc2 internal prototype to avoid an error. */
3604 /* We use char because int might match the return type of a gcc2
3605 builtin and then its argument prototype would still apply. */
3610 /* The GNU C library defines this for functions which it implements
3611 to always fail with ENOSYS. Some functions are actually named
3612 something starting with __ and the normal name is an alias. */
3613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623 eval "ac_cv_func_$ac_func=yes"
3625 echo "configure: failed program was:" >&5
3626 cat conftest.$ac_ext >&5
3628 eval "ac_cv_func_$ac_func=no"
3633 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3634 echo "$ac_t""yes" 1>&6
3635 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3636 cat >> confdefs.h <<EOF
3637 #define $ac_tr_func 1
3641 echo "$ac_t""no" 1>&6
3646 if test x$ac_cv_func_mbstowcs = xyes; then
3647 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3648 echo "configure:3649: checking whether mbstowcs works" >&5
3649 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3650 echo $ac_n "(cached) $ac_c" 1>&6
3652 if test "$cross_compiling" = yes; then
3653 gcc_cv_func_mbstowcs_works=yes
3655 cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3665 if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3667 gcc_cv_func_mbstowcs_works=yes
3669 echo "configure: failed program was:" >&5
3670 cat conftest.$ac_ext >&5
3672 gcc_cv_func_mbstowcs_works=no
3679 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3680 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3681 cat >> confdefs.h <<\EOF
3682 #define HAVE_WORKING_MBSTOWCS 1
3688 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3689 echo "configure:3690: checking for ssize_t" >&5
3690 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3691 echo $ac_n "(cached) $ac_c" 1>&6
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <sys/types.h>
3702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3703 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3705 ac_cv_type_ssize_t=yes
3708 ac_cv_type_ssize_t=no
3713 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3714 if test $ac_cv_type_ssize_t = no; then
3715 cat >> confdefs.h <<\EOF
3722 # Try to determine the array type of the second argument of getgroups
3723 # for the target system (int or gid_t).
3724 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3725 echo "configure:3726: checking for uid_t in sys/types.h" >&5
3726 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3727 echo $ac_n "(cached) $ac_c" 1>&6
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3735 egrep "uid_t" >/dev/null 2>&1; then
3737 ac_cv_type_uid_t=yes
3746 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3747 if test $ac_cv_type_uid_t = no; then
3748 cat >> confdefs.h <<\EOF
3752 cat >> confdefs.h <<\EOF
3758 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3759 echo "configure:3760: checking type of array argument to getgroups" >&5
3760 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3761 echo $ac_n "(cached) $ac_c" 1>&6
3763 if test "$cross_compiling" = yes; then
3764 ac_cv_type_getgroups=cross
3766 cat > conftest.$ac_ext <<EOF
3767 #line 3768 "configure"
3768 #include "confdefs.h"
3770 /* Thanks to Mike Rendell for this test. */
3771 #include <sys/types.h>
3774 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3779 union { gid_t gval; long lval; } val;
3782 for (i = 0; i < NGID; i++)
3783 gidset[i] = val.gval;
3784 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3786 /* Exit non-zero if getgroups seems to require an array of ints. This
3787 happens when gid_t is short but getgroups modifies an array of ints. */
3788 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3792 if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3794 ac_cv_type_getgroups=gid_t
3796 echo "configure: failed program was:" >&5
3797 cat conftest.$ac_ext >&5
3799 ac_cv_type_getgroups=int
3804 if test $ac_cv_type_getgroups = cross; then
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3811 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3813 ac_cv_type_getgroups=gid_t
3816 ac_cv_type_getgroups=int
3823 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3824 cat >> confdefs.h <<EOF
3825 #define GETGROUPS_T $ac_cv_type_getgroups
3829 if test "${target}" = "${build}"; then
3830 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3833 # This condition may need some tweaking. It should include all
3834 # targets where the array type of the second argument of getgroups
3835 # is int and the type of gid_t is not equivalent to int.
3836 *-*-sunos* | *-*-ultrix*)
3837 TARGET_GETGROUPS_T=int
3840 TARGET_GETGROUPS_T=gid_t
3846 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3847 echo "configure:3848: checking whether the printf functions support %p" >&5
3848 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3849 echo $ac_n "(cached) $ac_c" 1>&6
3851 if test "$cross_compiling" = yes; then
3852 gcc_cv_func_printf_ptr=no
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3862 char *p = buf, *q = NULL;
3863 sprintf(buf, "%p", p);
3864 sscanf(buf, "%p", &q);
3868 if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3870 gcc_cv_func_printf_ptr=yes
3872 echo "configure: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3875 gcc_cv_func_printf_ptr=no
3880 rm -f core core.* *.core
3883 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3884 if test $gcc_cv_func_printf_ptr = yes ; then
3885 cat >> confdefs.h <<\EOF
3886 #define HAVE_PRINTF_PTR 1
3891 if test $ac_cv_header_sys_mman_h != yes \
3892 || test $ac_cv_func_mmap != yes; then
3893 gcc_cv_func_mmap_file=no
3894 gcc_cv_func_mmap_dev_zero=no
3895 gcc_cv_func_mmap_anon=no
3897 echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
3898 echo "configure:3899: checking whether read-only mmap of a plain file works" >&5
3899 if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
3900 echo $ac_n "(cached) $ac_c" 1>&6
3902 # Add a system to this blacklist if
3903 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
3904 # memory area containing the same data that you'd get if you applied
3905 # read() to the same fd. The only system known to have a problem here
3906 # is VMS, where text files have record structure.
3909 gcc_cv_func_mmap_file=no ;;
3911 gcc_cv_func_mmap_file=yes;;
3915 echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
3916 echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
3917 echo "configure:3918: checking whether mmap from /dev/zero works" >&5
3918 if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3919 echo $ac_n "(cached) $ac_c" 1>&6
3921 # Add a system to this blacklist if it has mmap() but /dev/zero
3922 # does not exist, or if mmapping /dev/zero does not give anonymous
3923 # zeroed pages with both the following properties:
3924 # 1. If you map N consecutive pages in with one call, and then
3925 # unmap any subset of those pages, the pages that were not
3926 # explicitly unmapped remain accessible.
3927 # 2. If you map two adjacent blocks of memory and then unmap them
3928 # both at once, they must both go away.
3929 # Systems known to be in this category are Windows (all variants),
3932 vms* | cygwin* | pe | mingw* | darwin*)
3933 gcc_cv_func_mmap_dev_zero=no ;;
3935 gcc_cv_func_mmap_dev_zero=yes;;
3939 echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
3941 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
3942 echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
3943 echo "configure:3944: checking for MAP_ANON(YMOUS)" >&5
3944 if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
3945 echo $ac_n "(cached) $ac_c" 1>&6
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <sys/types.h>
3951 #include <sys/mman.h>
3954 #ifndef MAP_ANONYMOUS
3955 #define MAP_ANONYMOUS MAP_ANON
3959 int n = MAP_ANONYMOUS;
3962 if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3964 gcc_cv_decl_map_anon=yes
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3969 gcc_cv_decl_map_anon=no
3974 echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
3976 if test $gcc_cv_decl_map_anon = no; then
3977 gcc_cv_func_mmap_anon=no
3979 echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
3980 echo "configure:3981: checking whether mmap with MAP_ANON(YMOUS) works" >&5
3981 if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
3982 echo $ac_n "(cached) $ac_c" 1>&6
3984 # Add a system to this blacklist if it has mmap() and MAP_ANON or
3985 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
3986 # doesn't give anonymous zeroed pages with the same properties listed
3987 # above for use of /dev/zero.
3988 # Systems known to be in this category are Windows, VMS, and SCO Unix.
3990 vms* | cygwin* | pe | mingw* | sco* | udk* )
3991 gcc_cv_func_mmap_anon=no ;;
3993 gcc_cv_func_mmap_anon=yes;;
3997 echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6
4001 if test $gcc_cv_func_mmap_file = yes; then
4002 cat >> confdefs.h <<\EOF
4003 #define HAVE_MMAP_FILE 1
4007 if test $gcc_cv_func_mmap_dev_zero = yes; then
4008 cat >> confdefs.h <<\EOF
4009 #define HAVE_MMAP_DEV_ZERO 1
4013 if test $gcc_cv_func_mmap_anon = yes; then
4014 cat >> confdefs.h <<\EOF
4015 #define HAVE_MMAP_ANON 1
4023 { echo "configure: error:
4024 *** UWIN may not be used as a host platform because
4025 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4028 # Under VMS, vfork works very different than on Unix. The standard test
4029 # won't work, and it isn't easily adaptable. It makes more sense to
4031 ac_cv_func_vfork_works=yes
4034 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4035 echo "configure:4036: checking for pid_t" >&5
4036 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4037 echo $ac_n "(cached) $ac_c" 1>&6
4039 cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042 #include <sys/types.h>
4048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4049 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4051 ac_cv_type_pid_t=yes
4059 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4060 if test $ac_cv_type_pid_t = no; then
4061 cat >> confdefs.h <<\EOF
4067 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4068 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4069 echo "configure:4070: checking for vfork.h" >&5
4070 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4071 echo $ac_n "(cached) $ac_c" 1>&6
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4079 { (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4081 if test -z "$ac_err"; then
4083 eval "ac_cv_header_$ac_safe=yes"
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4089 eval "ac_cv_header_$ac_safe=no"
4093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4094 echo "$ac_t""yes" 1>&6
4095 cat >> confdefs.h <<\EOF
4096 #define HAVE_VFORK_H 1
4100 echo "$ac_t""no" 1>&6
4103 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4104 echo "configure:4105: checking for working vfork" >&5
4105 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4106 echo $ac_n "(cached) $ac_c" 1>&6
4108 if test "$cross_compiling" = yes; then
4109 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4110 echo "configure:4111: checking for vfork" >&5
4111 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4112 echo $ac_n "(cached) $ac_c" 1>&6
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 /* System header to define __stub macros and hopefully few prototypes,
4118 which can conflict with char vfork(); below. */
4120 /* Override any gcc2 internal prototype to avoid an error. */
4121 /* We use char because int might match the return type of a gcc2
4122 builtin and then its argument prototype would still apply. */
4127 /* The GNU C library defines this for functions which it implements
4128 to always fail with ENOSYS. Some functions are actually named
4129 something starting with __ and the normal name is an alias. */
4130 #if defined (__stub_vfork) || defined (__stub___vfork)
4138 if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4140 eval "ac_cv_func_vfork=yes"
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4145 eval "ac_cv_func_vfork=no"
4150 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4151 echo "$ac_t""yes" 1>&6
4154 echo "$ac_t""no" 1>&6
4157 ac_cv_func_vfork_works=$ac_cv_func_vfork
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 /* Thanks to Paul Eggert for this test. */
4164 #include <sys/types.h>
4165 #include <sys/stat.h>
4166 #ifdef HAVE_UNISTD_H
4172 /* On some sparc systems, changes by the child to local and incoming
4173 argument registers are propagated back to the parent.
4174 The compiler is told about this with #include <vfork.h>,
4175 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4176 Test for this by using a static variable whose address
4177 is put into a register that is clobbered by the vfork. */
4180 sparc_address_test (int arg)
4182 sparc_address_test (arg) int arg;
4200 pid_t parent = getpid ();
4203 sparc_address_test ();
4208 /* Here is another test for sparc vfork register problems.
4209 This test uses lots of local variables, at least
4210 as many local variables as main has allocated so far
4211 including compiler temporaries. 4 locals are enough for
4212 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4213 A buggy compiler should reuse the register of parent
4214 for one of the local variables, since it will think that
4215 parent can't possibly be used any more in this routine.
4216 Assigning to the local variable will thus munge parent
4217 in the parent process. */
4219 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4220 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4221 /* Convince the compiler that p..p7 are live; otherwise, it might
4222 use the same hardware register for all 8 local variables. */
4223 if (p != p1 || p != p2 || p != p3 || p != p4
4224 || p != p5 || p != p6 || p != p7)
4227 /* On some systems (e.g. IRIX 3.3),
4228 vfork doesn't separate parent from child file descriptors.
4229 If the child closes a descriptor before it execs or exits,
4230 this munges the parent's descriptor as well.
4231 Test for this by closing stdout in the child. */
4232 _exit(close(fileno(stdout)) != 0);
4237 while (wait(&status) != child)
4240 /* Was there some problem with vforking? */
4243 /* Did the child fail? (This shouldn't happen.) */
4246 /* Did the vfork/compiler bug occur? */
4247 || parent != getpid()
4249 /* Did the file descriptor bug occur? */
4250 || fstat(fileno(stdout), &st) != 0
4255 if { (eval echo configure:4256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4257 ac_cv_func_vfork_works=yes
4259 echo "configure: failed program was:" >&5
4260 cat conftest.$ac_ext >&5
4262 ac_cv_func_vfork_works=no
4269 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4270 if test $ac_cv_func_vfork_works = no; then
4271 cat >> confdefs.h <<\EOF
4280 am_cv_lib_iconv_ldpath=
4281 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4282 if test "${with_libiconv_prefix+set}" = set; then
4283 withval="$with_libiconv_prefix"
4285 for dir in `echo "$withval" | tr : ' '`; do
4286 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4287 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4293 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4294 echo "configure:4295: checking for iconv" >&5
4295 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4296 echo $ac_n "(cached) $ac_c" 1>&6
4299 am_cv_func_iconv="no, consider installing GNU libiconv"
4301 cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4307 iconv_t cd = iconv_open("","");
4308 iconv(cd,NULL,NULL,NULL,NULL);
4312 if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314 am_cv_func_iconv=yes
4316 echo "configure: failed program was:" >&5
4317 cat conftest.$ac_ext >&5
4320 if test "$am_cv_func_iconv" != yes; then
4321 am_save_LIBS="$LIBS"
4322 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4329 iconv_t cd = iconv_open("","");
4330 iconv(cd,NULL,NULL,NULL,NULL);
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4337 am_cv_func_iconv=yes
4339 echo "configure: failed program was:" >&5
4340 cat conftest.$ac_ext >&5
4343 LIBS="$am_save_LIBS"
4348 echo "$ac_t""$am_cv_func_iconv" 1>&6
4349 if test "$am_cv_func_iconv" = yes; then
4350 cat >> confdefs.h <<\EOF
4351 #define HAVE_ICONV 1
4354 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4355 echo "configure:4356: checking for iconv declaration" >&5
4356 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4357 echo $ac_n "(cached) $ac_c" 1>&6
4360 cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4370 #if defined(__STDC__) || defined(__cplusplus)
4371 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4380 if { (eval echo configure:4381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4382 am_cv_proto_iconv_arg1=""
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4387 am_cv_proto_iconv_arg1="const"
4390 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);"
4393 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4394 echo "$ac_t""${ac_t:-
4395 }$am_cv_proto_iconv" 1>&6
4396 cat >> confdefs.h <<EOF
4397 #define ICONV_CONST $am_cv_proto_iconv_arg1
4402 if test "$am_cv_lib_iconv" = yes; then
4403 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4408 # We will need to find libiberty.h and ansidecl.h
4409 saved_CFLAGS="$CFLAGS"
4410 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4411 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4412 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4413 fprintf_unlocked strstr errno vasprintf \
4414 malloc realloc calloc free basename getopt clock
4416 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4417 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4418 echo "configure:4419: checking whether $ac_func is declared" >&5
4419 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4420 echo $ac_n "(cached) $ac_c" 1>&6
4422 cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4426 #define $ac_tr_decl 1
4428 #include "ansidecl.h"
4433 char *(*pfn) = (char *(*)) $ac_func ;
4437 if { (eval echo configure:4438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4439 eval "gcc_cv_have_decl_$ac_func=yes"
4441 echo "configure: failed program was:" >&5
4442 cat conftest.$ac_ext >&5
4444 eval "gcc_cv_have_decl_$ac_func=no"
4449 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4450 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4451 #define $ac_tr_decl 1
4455 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4456 #define $ac_tr_decl 0
4462 if test x = y ; then
4463 cat >> confdefs.h <<\EOF
4464 #define HAVE_DECL_GETENV 1
4466 cat >> confdefs.h <<\EOF
4467 #define HAVE_DECL_ATOL 1
4469 cat >> confdefs.h <<\EOF
4470 #define HAVE_DECL_SBRK 1
4472 cat >> confdefs.h <<\EOF
4473 #define HAVE_DECL_ABORT 1
4475 cat >> confdefs.h <<\EOF
4476 #define HAVE_DECL_ATOF 1
4478 cat >> confdefs.h <<\EOF
4479 #define HAVE_DECL_GETCWD 1
4481 cat >> confdefs.h <<\EOF
4482 #define HAVE_DECL_GETWD 1
4485 cat >> confdefs.h <<\EOF
4486 #define HAVE_DECL_STRSIGNAL 1
4488 cat >> confdefs.h <<\EOF
4489 #define HAVE_DECL_PUTC_UNLOCKED 1
4491 cat >> confdefs.h <<\EOF
4492 #define HAVE_DECL_FPUTS_UNLOCKED 1
4494 cat >> confdefs.h <<\EOF
4495 #define HAVE_DECL_FWRITE_UNLOCKED 1
4498 cat >> confdefs.h <<\EOF
4499 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4501 cat >> confdefs.h <<\EOF
4502 #define HAVE_DECL_STRSTR 1
4504 cat >> confdefs.h <<\EOF
4505 #define HAVE_DECL_ERRNO 1
4507 cat >> confdefs.h <<\EOF
4508 #define HAVE_DECL_VASPRINTF 1
4511 cat >> confdefs.h <<\EOF
4512 #define HAVE_DECL_MALLOC 1
4514 cat >> confdefs.h <<\EOF
4515 #define HAVE_DECL_REALLOC 1
4517 cat >> confdefs.h <<\EOF
4518 #define HAVE_DECL_CALLOC 1
4520 cat >> confdefs.h <<\EOF
4521 #define HAVE_DECL_FREE 1
4523 cat >> confdefs.h <<\EOF
4524 #define HAVE_DECL_BASENAME 1
4526 cat >> confdefs.h <<\EOF
4527 #define HAVE_DECL_GETOPT 1
4529 cat >> confdefs.h <<\EOF
4530 #define HAVE_DECL_CLOCK 1
4535 for ac_func in getrlimit setrlimit getrusage
4537 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4538 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4539 echo "configure:4540: checking whether $ac_func is declared" >&5
4540 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4541 echo $ac_n "(cached) $ac_c" 1>&6
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4547 #define $ac_tr_decl 1
4549 #include "ansidecl.h"
4551 #ifdef HAVE_SYS_RESOURCE_H
4552 #include <sys/resource.h>
4558 char *(*pfn) = (char *(*)) $ac_func ;
4562 if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4564 eval "gcc_cv_have_decl_$ac_func=yes"
4566 echo "configure: failed program was:" >&5
4567 cat conftest.$ac_ext >&5
4569 eval "gcc_cv_have_decl_$ac_func=no"
4574 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4575 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4576 #define $ac_tr_decl 1
4580 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4581 #define $ac_tr_decl 0
4587 if test x = y ; then
4588 cat >> confdefs.h <<\EOF
4589 #define HAVE_DECL_GETRLIMIT 1
4591 cat >> confdefs.h <<\EOF
4592 #define HAVE_DECL_SETRLIMIT 1
4594 cat >> confdefs.h <<\EOF
4595 #define HAVE_DECL_GETRUSAGE 1
4600 cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4604 #include "ansidecl.h"
4606 #ifdef HAVE_SYS_RESOURCE_H
4607 #include <sys/resource.h>
4614 if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4620 cat >> confdefs.h <<\EOF
4627 for ac_func in ldgetname
4629 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4630 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4631 echo "configure:4632: checking whether $ac_func is declared" >&5
4632 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4633 echo $ac_n "(cached) $ac_c" 1>&6
4635 cat > conftest.$ac_ext <<EOF
4636 #line 4637 "configure"
4637 #include "confdefs.h"
4639 #define $ac_tr_decl 1
4641 #include "ansidecl.h"
4650 char *(*pfn) = (char *(*)) $ac_func ;
4654 if { (eval echo configure:4655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656 eval "gcc_cv_have_decl_$ac_func=yes"
4658 echo "configure: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4661 eval "gcc_cv_have_decl_$ac_func=no"
4666 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4667 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4668 #define $ac_tr_decl 1
4672 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4673 #define $ac_tr_decl 0
4679 if test x = y ; then
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_DECL_LDGETNAME 1
4686 for ac_func in times
4688 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4689 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4690 echo "configure:4691: checking whether $ac_func is declared" >&5
4691 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4692 echo $ac_n "(cached) $ac_c" 1>&6
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4698 #define $ac_tr_decl 1
4700 #include "ansidecl.h"
4702 #ifdef HAVE_SYS_TIMES_H
4703 #include <sys/times.h>
4709 char *(*pfn) = (char *(*)) $ac_func ;
4713 if { (eval echo configure:4714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4715 eval "gcc_cv_have_decl_$ac_func=yes"
4717 echo "configure: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4720 eval "gcc_cv_have_decl_$ac_func=no"
4725 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4726 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4727 #define $ac_tr_decl 1
4731 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4732 #define $ac_tr_decl 0
4738 if test x = y ; then
4739 cat >> confdefs.h <<\EOF
4740 #define HAVE_DECL_TIMES 1
4745 # More time-related stuff.
4746 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4747 echo "configure:4748: checking for struct tms" >&5
4748 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4749 echo $ac_n "(cached) $ac_c" 1>&6
4752 cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4756 #include "ansidecl.h"
4758 #ifdef HAVE_SYS_TIMES_H
4759 #include <sys/times.h>
4766 if { (eval echo configure:4767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4768 ac_cv_struct_tms=yes
4770 echo "configure: failed program was:" >&5
4771 cat conftest.$ac_ext >&5
4778 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4779 if test $ac_cv_struct_tms = yes; then
4780 cat >> confdefs.h <<\EOF
4781 #define HAVE_STRUCT_TMS 1
4786 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4787 # revisit after autoconf 2.50.
4788 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4789 echo "configure:4790: checking for clock_t" >&5
4790 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4791 echo $ac_n "(cached) $ac_c" 1>&6
4794 cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4798 #include "ansidecl.h"
4805 if { (eval echo configure:4806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4807 gcc_cv_type_clock_t=yes
4809 echo "configure: failed program was:" >&5
4810 cat conftest.$ac_ext >&5
4812 gcc_cv_type_clock_t=no
4817 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4818 if test $gcc_cv_type_clock_t = yes; then
4819 cat >> confdefs.h <<\EOF
4820 #define HAVE_CLOCK_T 1
4825 echo $ac_n "checking for uchar""... $ac_c" 1>&6
4826 echo "configure:4827: checking for uchar" >&5
4827 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
4828 echo $ac_n "(cached) $ac_c" 1>&6
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4834 #include "ansidecl.h"
4838 if ((uchar *)0) return 0;
4839 if (sizeof(uchar)) return 0;
4842 if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4844 ac_cv_type_uchar=yes
4846 echo "configure: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4854 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
4855 if test $ac_cv_type_uchar = yes; then
4856 cat >> confdefs.h <<\EOF
4857 #define HAVE_UCHAR 1
4862 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4863 CFLAGS="$saved_CFLAGS"
4865 # Check whether --enable-initfini-array or --disable-initfini-array was given.
4866 if test "${enable_initfini_array+set}" = set; then
4867 enableval="$enable_initfini_array"
4871 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
4872 echo "configure:4873: checking for .preinit_array/.init_array/.fini_array support" >&5
4873 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
4874 echo $ac_n "(cached) $ac_c" 1>&6
4876 if test "$cross_compiling" = yes; then
4877 gcc_cv_initfini_array=no
4879 cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4884 int main (void) { return x; }
4885 int foo (void) { x = 0; }
4886 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
4888 if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4890 gcc_cv_initfini_array=yes
4892 echo "configure: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4895 gcc_cv_initfini_array=no
4902 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
4903 enable_initfini_array=$gcc_cv_initfini_array
4907 if test $enable_initfini_array = yes; then
4908 cat >> confdefs.h <<\EOF
4909 #define HAVE_INITFINI_ARRAY 1
4914 # mkdir takes a single argument on some systems.
4915 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4916 echo "configure:4917: checking if mkdir takes one argument" >&5
4917 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4918 echo $ac_n "(cached) $ac_c" 1>&6
4920 cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4924 #include <sys/types.h>
4925 #ifdef HAVE_SYS_STAT_H
4926 # include <sys/stat.h>
4928 #ifdef HAVE_UNISTD_H
4929 # include <unistd.h>
4931 #ifdef HAVE_DIRECT_H
4932 # include <direct.h>
4938 if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4940 gcc_cv_mkdir_takes_one_arg=no
4942 echo "configure: failed program was:" >&5
4943 cat conftest.$ac_ext >&5
4945 gcc_cv_mkdir_takes_one_arg=yes
4950 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4951 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4952 cat >> confdefs.h <<\EOF
4953 #define MKDIR_TAKES_ONE_ARG 1
4965 # With Setjmp/Longjmp based exception handling.
4966 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
4967 if test "${enable_sjlj_exceptions+set}" = set; then
4968 enableval="$enable_sjlj_exceptions"
4969 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
4970 cat >> confdefs.h <<EOF
4971 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
4977 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
4978 echo "configure:4979: checking for main in -lunwind" >&5
4979 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
4980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4981 echo $ac_n "(cached) $ac_c" 1>&6
4983 ac_save_LIBS="$LIBS"
4984 LIBS="-lunwind $LIBS"
4985 cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4993 if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4995 eval "ac_cv_lib_$ac_lib_var=yes"
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
5000 eval "ac_cv_lib_$ac_lib_var=no"
5003 LIBS="$ac_save_LIBS"
5006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5007 echo "$ac_t""yes" 1>&6
5008 use_libunwind_default=yes
5010 echo "$ac_t""no" 1>&6
5011 use_libunwind_default=no
5014 # Use libunwind based exception handling.
5015 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5016 if test "${enable_libunwind_exceptions+set}" = set; then
5017 enableval="$enable_libunwind_exceptions"
5018 use_libunwind_exceptions=$enableval
5020 use_libunwind_exceptions=$use_libunwind_default
5023 if test x"$use_libunwind_exceptions" = xyes; then
5024 cat >> confdefs.h <<\EOF
5025 #define USE_LIBUNWIND_EXCEPTIONS 1
5030 # --------------------------------------------------------
5031 # Build, host, and target specific configuration fragments
5032 # --------------------------------------------------------
5037 build_install_headers_dir=install-headers-tar
5044 # Decode the host machine, then the target machine.
5045 # For the host machine, we save the xm_file variable as host_xm_file;
5046 # then we decode the target machine and forget everything else
5047 # that came from the host machine.
5048 for machine in $build $host $target; do
5049 . ${srcdir}/config.gcc
5052 extra_objs="${host_extra_objs} ${extra_objs}"
5054 # Default the target-machine variables that were not explicitly set.
5055 if test x"$tm_file" = x
5056 then tm_file=$cpu_type/$cpu_type.h; fi
5058 if test x"$extra_headers" = x
5059 then extra_headers=; fi
5061 if test x$md_file = x
5062 then md_file=$cpu_type/$cpu_type.md; fi
5064 if test x$out_file = x
5065 then out_file=$cpu_type/$cpu_type.c; fi
5067 if test x"$tmake_file" = x
5068 then tmake_file=$cpu_type/t-$cpu_type
5071 if test x"$dwarf2" = xyes
5072 then tm_file="$tm_file tm-dwarf2.h"
5075 # Say what files are being used for the output code and MD file.
5076 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5077 echo "Using \`$srcdir/config/$md_file' as machine description file."
5079 # If any of the xm_file variables contain nonexistent files, warn
5080 # about them and drop them.
5083 for x in $build_xm_file; do
5084 if test -f $srcdir/config/$x
5086 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5092 for x in $host_xm_file; do
5093 if test -f $srcdir/config/$x
5095 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5101 for x in $xm_file; do
5102 if test -f $srcdir/config/$x
5104 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5110 for f in $tm_file; do
5113 if test $count = ax; then
5114 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5116 echo "Using the following target machine macro files:"
5117 for f in $tm_file; do
5118 echo " $srcdir/config/$f"
5122 if test x$need_64bit_hwint = xyes; then
5123 cat >> confdefs.h <<\EOF
5124 #define NEED_64BIT_HOST_WIDE_INT 1
5130 for f in $host_xm_file; do
5133 if test $count = a; then
5135 elif test $count = ax; then
5136 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5138 echo "Using the following host machine macro files:"
5139 for f in $host_xm_file; do
5140 echo " $srcdir/config/$f"
5143 echo "Using ${out_host_hook_obj} for host machine hooks."
5145 if test "$host_xm_file" != "$build_xm_file"; then
5147 for f in $build_xm_file; do
5150 if test $count = a; then
5152 elif test $count = ax; then
5153 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5155 echo "Using the following build machine macro files:"
5156 for f in $build_xm_file; do
5157 echo " $srcdir/config/$f"
5162 if test x$thread_file = x; then
5163 if test x$target_thread_file != x; then
5164 thread_file=$target_thread_file
5166 thread_file='single'
5170 if test x$enable___cxa_atexit = xyes || \
5171 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5172 cat >> confdefs.h <<\EOF
5173 #define DEFAULT_USE_CXA_ATEXIT 1
5178 # Look for a file containing extra machine modes.
5179 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5180 extra_modes_file='$(srcdir)'/config/${extra_modes}
5182 cat >> confdefs.h <<EOF
5183 #define EXTRA_MODES_FILE "$extra_modes"
5186 cat >> confdefs.h <<\EOF
5187 #define EXTRA_CC_MODES 1
5192 # auto-host.h is the file containing items generated by autoconf and is
5193 # the first file included by config.h.
5194 # If host=build, it is correct to have bconfig include auto-host.h
5195 # as well. If host!=build, we are in error and need to do more
5196 # work to find out the build config parameters.
5197 if test x$host = x$build
5199 build_auto=auto-host.h
5202 # We create a subdir, then run autoconf in the subdir.
5203 # To prevent recursion we set host and build for the new
5204 # invocation of configure to the build for this invocation
5211 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5212 *) realsrcdir=../${srcdir};;
5214 saved_CFLAGS="${CFLAGS}"
5215 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5216 ${realsrcdir}/configure \
5217 --target=$target_alias --host=$build_alias --build=$build_alias
5218 CFLAGS="${saved_CFLAGS}"
5220 # We just finished tests for the build machine, so rename
5221 # the file auto-build.h in the gcc directory.
5222 mv auto-host.h ../auto-build.h
5225 build_auto=auto-build.h
5226 FORBUILD=../${build_subdir}
5230 tm_file="${tm_file} defaults.h"
5231 tm_p_file="${tm_p_file} tm-preds.h"
5232 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5233 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5234 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5235 # put this back in temporarily.
5236 xm_file="ansidecl.h ${xm_file}"
5242 # Get the version trigger filename from the toplevel
5243 if test "${with_gcc_version_trigger+set}" = set; then
5244 gcc_version_trigger=$with_gcc_version_trigger
5246 gcc_version_trigger=${srcdir}/version.c
5248 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5249 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5251 # Compile in configure arguments.
5252 if test -f configargs.h ; then
5253 # Being re-configured.
5254 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5255 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5257 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5259 cat > configargs.h <<EOF
5260 /* Generated automatically. */
5261 static const char configuration_arguments[] = "$gcc_config_arguments";
5262 static const char thread_model[] = "$thread_file";
5264 static const struct {
5265 const char *name, *value;
5266 } configure_default_options[] = $configure_default_options;
5269 # Internationalization
5271 VERSION="$gcc_version"
5275 # Enable NLS support by default
5276 # Check whether --enable-nls or --disable-nls was given.
5277 if test "${enable_nls+set}" = set; then
5278 enableval="$enable_nls"
5285 # if cross compiling, disable NLS support.
5286 # It's not worth the trouble, at least for now.
5288 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5289 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5295 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5296 echo "configure:5297: checking for library containing strerror" >&5
5297 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5298 echo $ac_n "(cached) $ac_c" 1>&6
5300 ac_func_search_save_LIBS="$LIBS"
5301 ac_cv_search_strerror="no"
5302 cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 /* Override any gcc2 internal prototype to avoid an error. */
5306 /* We use char because int might match the return type of a gcc2
5307 builtin and then its argument prototype would still apply. */
5314 if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5316 ac_cv_search_strerror="none required"
5318 echo "configure: failed program was:" >&5
5319 cat conftest.$ac_ext >&5
5322 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5323 LIBS="-l$i $ac_func_search_save_LIBS"
5324 cat > conftest.$ac_ext <<EOF
5325 #line 5326 "configure"
5326 #include "confdefs.h"
5327 /* Override any gcc2 internal prototype to avoid an error. */
5328 /* We use char because int might match the return type of a gcc2
5329 builtin and then its argument prototype would still apply. */
5336 if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5338 ac_cv_search_strerror="-l$i"
5341 echo "configure: failed program was:" >&5
5342 cat conftest.$ac_ext >&5
5346 LIBS="$ac_func_search_save_LIBS"
5349 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5350 if test "$ac_cv_search_strerror" != "no"; then
5351 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5358 echo $ac_n "checking for working const""... $ac_c" 1>&6
5359 echo "configure:5360: checking for working const" >&5
5360 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5361 echo $ac_n "(cached) $ac_c" 1>&6
5363 cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5369 /* Ultrix mips cc rejects this. */
5370 typedef int charset[2]; const charset x;
5371 /* SunOS 4.1.1 cc rejects this. */
5372 char const *const *ccp;
5374 /* NEC SVR4.0.2 mips cc rejects this. */
5375 struct point {int x, y;};
5376 static struct point const zero = {0,0};
5377 /* AIX XL C 1.02.0.0 rejects this.
5378 It does not let you subtract one const X* pointer from another in an arm
5379 of an if-expression whose if-part is not a constant expression */
5380 const char *g = "string";
5381 ccp = &g + (g ? g-g : 0);
5382 /* HPUX 7.0 cc rejects these. */
5385 ccp = (char const *const *) p;
5386 { /* SCO 3.2v4 cc rejects this. */
5388 char const *s = 0 ? (char *) 0 : (char const *) 0;
5392 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5394 const int *foo = &x[0];
5397 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5398 typedef const int *iptr;
5402 { /* AIX XL C 1.02.0.0 rejects this saying
5403 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5404 struct s { int j; const int *ap[3]; };
5405 struct s *b; b->j = 5;
5407 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5413 if { (eval echo configure:5414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5417 echo "configure: failed program was:" >&5
5418 cat conftest.$ac_ext >&5
5425 echo "$ac_t""$ac_cv_c_const" 1>&6
5426 if test $ac_cv_c_const = no; then
5427 cat >> confdefs.h <<\EOF
5433 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5434 echo "configure:5435: checking for off_t" >&5
5435 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5436 echo $ac_n "(cached) $ac_c" 1>&6
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 #include <sys/types.h>
5447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5448 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5450 ac_cv_type_off_t=yes
5458 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5459 if test $ac_cv_type_off_t = no; then
5460 cat >> confdefs.h <<\EOF
5466 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5467 echo "configure:5468: checking for size_t" >&5
5468 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5469 echo $ac_n "(cached) $ac_c" 1>&6
5471 cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474 #include <sys/types.h>
5480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5483 ac_cv_type_size_t=yes
5486 ac_cv_type_size_t=no
5491 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5492 if test $ac_cv_type_size_t = no; then
5493 cat >> confdefs.h <<\EOF
5494 #define size_t unsigned
5499 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5500 # for constant arguments. Useless!
5501 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5502 echo "configure:5503: checking for working alloca.h" >&5
5503 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5504 echo $ac_n "(cached) $ac_c" 1>&6
5506 cat > conftest.$ac_ext <<EOF
5507 #line 5508 "configure"
5508 #include "confdefs.h"
5511 char *p = alloca(2 * sizeof(int));
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5516 ac_cv_header_alloca_h=yes
5518 echo "configure: failed program was:" >&5
5519 cat conftest.$ac_ext >&5
5521 ac_cv_header_alloca_h=no
5526 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5527 if test $ac_cv_header_alloca_h = yes; then
5528 cat >> confdefs.h <<\EOF
5529 #define HAVE_ALLOCA_H 1
5534 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5535 echo "configure:5536: checking for alloca" >&5
5536 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5537 echo $ac_n "(cached) $ac_c" 1>&6
5539 cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5544 # define alloca __builtin_alloca
5547 # include <malloc.h>
5548 # define alloca _alloca
5551 # include <alloca.h>
5556 # ifndef alloca /* predefined by HP cc +Olibcalls */
5565 char *p = (char *) alloca(1);
5568 if { (eval echo configure:5569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570 ac_cv_func_alloca_works=yes
5572 echo "configure: failed program was:" >&5
5573 cat conftest.$ac_ext >&5
5575 ac_cv_func_alloca_works=no
5580 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5581 if test $ac_cv_func_alloca_works = yes; then
5582 cat >> confdefs.h <<\EOF
5583 #define HAVE_ALLOCA 1
5588 if test $ac_cv_func_alloca_works = no; then
5589 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5590 # that cause trouble. Some versions do not even contain alloca or
5591 # contain a buggy version. If you still want to use their alloca,
5592 # use ar to extract alloca.o from them instead of compiling alloca.c.
5593 ALLOCA=alloca.${ac_objext}
5594 cat >> confdefs.h <<\EOF
5599 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5600 echo "configure:5601: checking whether alloca needs Cray hooks" >&5
5601 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5602 echo $ac_n "(cached) $ac_c" 1>&6
5604 cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 #if defined(CRAY) && ! defined(CRAY2)
5614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5615 egrep "webecray" >/dev/null 2>&1; then
5626 echo "$ac_t""$ac_cv_os_cray" 1>&6
5627 if test $ac_cv_os_cray = yes; then
5628 for ac_func in _getb67 GETB67 getb67; do
5629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5630 echo "configure:5631: checking for $ac_func" >&5
5631 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5632 echo $ac_n "(cached) $ac_c" 1>&6
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* System header to define __stub macros and hopefully few prototypes,
5638 which can conflict with char $ac_func(); below. */
5640 /* Override any gcc2 internal prototype to avoid an error. */
5641 /* We use char because int might match the return type of a gcc2
5642 builtin and then its argument prototype would still apply. */
5647 /* The GNU C library defines this for functions which it implements
5648 to always fail with ENOSYS. Some functions are actually named
5649 something starting with __ and the normal name is an alias. */
5650 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5660 eval "ac_cv_func_$ac_func=yes"
5662 echo "configure: failed program was:" >&5
5663 cat conftest.$ac_ext >&5
5665 eval "ac_cv_func_$ac_func=no"
5670 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5671 echo "$ac_t""yes" 1>&6
5672 cat >> confdefs.h <<EOF
5673 #define CRAY_STACKSEG_END $ac_func
5678 echo "$ac_t""no" 1>&6
5684 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5685 echo "configure:5686: checking stack direction for C alloca" >&5
5686 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5687 echo $ac_n "(cached) $ac_c" 1>&6
5689 if test "$cross_compiling" = yes; then
5690 ac_cv_c_stack_direction=0
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5695 find_stack_direction ()
5697 static char *addr = 0;
5702 return find_stack_direction ();
5705 return (&dummy > addr) ? 1 : -1;
5709 exit (find_stack_direction() < 0);
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5714 ac_cv_c_stack_direction=1
5716 echo "configure: failed program was:" >&5
5717 cat conftest.$ac_ext >&5
5719 ac_cv_c_stack_direction=-1
5726 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5727 cat >> confdefs.h <<EOF
5728 #define STACK_DIRECTION $ac_cv_c_stack_direction
5734 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5735 echo "configure:5736: checking whether we are using the GNU C Library 2.1 or newer" >&5
5736 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5737 echo $ac_n "(cached) $ac_c" 1>&6
5739 cat > conftest.$ac_ext <<EOF
5740 #line 5741 "configure"
5741 #include "confdefs.h"
5743 #include <features.h>
5744 #ifdef __GNU_LIBRARY__
5745 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5752 egrep "Lucky GNU user" >/dev/null 2>&1; then
5754 ac_cv_gnu_library_2_1=yes
5757 ac_cv_gnu_library_2_1=no
5765 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5767 GLIBC21="$ac_cv_gnu_library_2_1"
5771 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5772 stdlib.h string.h unistd.h sys/param.h
5774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5776 echo "configure:5777: checking for $ac_hdr" >&5
5777 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5786 { (eval echo configure:5787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5788 if test -z "$ac_err"; then
5790 eval "ac_cv_header_$ac_safe=yes"
5793 echo "configure: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5796 eval "ac_cv_header_$ac_safe=no"
5800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5801 echo "$ac_t""yes" 1>&6
5802 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5803 cat >> confdefs.h <<EOF
5804 #define $ac_tr_hdr 1
5808 echo "$ac_t""no" 1>&6
5812 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5813 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5814 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5817 echo "configure:5818: checking for $ac_func" >&5
5818 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5819 echo $ac_n "(cached) $ac_c" 1>&6
5821 cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 /* System header to define __stub macros and hopefully few prototypes,
5825 which can conflict with char $ac_func(); below. */
5827 /* Override any gcc2 internal prototype to avoid an error. */
5828 /* We use char because int might match the return type of a gcc2
5829 builtin and then its argument prototype would still apply. */
5834 /* The GNU C library defines this for functions which it implements
5835 to always fail with ENOSYS. Some functions are actually named
5836 something starting with __ and the normal name is an alias. */
5837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5845 if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5847 eval "ac_cv_func_$ac_func=yes"
5849 echo "configure: failed program was:" >&5
5850 cat conftest.$ac_ext >&5
5852 eval "ac_cv_func_$ac_func=no"
5857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5858 echo "$ac_t""yes" 1>&6
5859 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5860 cat >> confdefs.h <<EOF
5861 #define $ac_tr_func 1
5865 echo "$ac_t""no" 1>&6
5872 am_cv_lib_iconv_ldpath=
5873 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5874 if test "${with_libiconv_prefix+set}" = set; then
5875 withval="$with_libiconv_prefix"
5877 for dir in `echo "$withval" | tr : ' '`; do
5878 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5879 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5885 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5886 echo "configure:5887: checking for iconv" >&5
5887 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5888 echo $ac_n "(cached) $ac_c" 1>&6
5891 am_cv_func_iconv="no, consider installing GNU libiconv"
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5899 iconv_t cd = iconv_open("","");
5900 iconv(cd,NULL,NULL,NULL,NULL);
5904 if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5906 am_cv_func_iconv=yes
5908 echo "configure: failed program was:" >&5
5909 cat conftest.$ac_ext >&5
5912 if test "$am_cv_func_iconv" != yes; then
5913 am_save_LIBS="$LIBS"
5914 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5915 cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5921 iconv_t cd = iconv_open("","");
5922 iconv(cd,NULL,NULL,NULL,NULL);
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929 am_cv_func_iconv=yes
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5935 LIBS="$am_save_LIBS"
5940 echo "$ac_t""$am_cv_func_iconv" 1>&6
5941 if test "$am_cv_func_iconv" = yes; then
5942 cat >> confdefs.h <<\EOF
5943 #define HAVE_ICONV 1
5946 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5947 echo "configure:5948: checking for iconv declaration" >&5
5948 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5949 echo $ac_n "(cached) $ac_c" 1>&6
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5962 #if defined(__STDC__) || defined(__cplusplus)
5963 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5972 if { (eval echo configure:5973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5974 am_cv_proto_iconv_arg1=""
5976 echo "configure: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5979 am_cv_proto_iconv_arg1="const"
5982 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);"
5985 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5986 echo "$ac_t""${ac_t:-
5987 }$am_cv_proto_iconv" 1>&6
5988 cat >> confdefs.h <<EOF
5989 #define ICONV_CONST $am_cv_proto_iconv_arg1
5994 if test "$am_cv_lib_iconv" = yes; then
5995 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6000 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6001 echo "configure:6002: checking for nl_langinfo and CODESET" >&5
6002 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6003 echo $ac_n "(cached) $ac_c" 1>&6
6005 cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 #include <langinfo.h>
6010 char* cs = nl_langinfo(CODESET);
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015 am_cv_langinfo_codeset=yes
6017 echo "configure: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
6020 am_cv_langinfo_codeset=no
6026 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6027 if test $am_cv_langinfo_codeset = yes; then
6028 cat >> confdefs.h <<\EOF
6029 #define HAVE_LANGINFO_CODESET 1
6034 if test $ac_cv_header_locale_h = yes; then
6035 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6036 echo "configure:6037: checking for LC_MESSAGES" >&5
6037 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6038 echo $ac_n "(cached) $ac_c" 1>&6
6040 cat > conftest.$ac_ext <<EOF
6041 #line 6042 "configure"
6042 #include "confdefs.h"
6048 if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6050 am_cv_val_LC_MESSAGES=yes
6052 echo "configure: failed program was:" >&5
6053 cat conftest.$ac_ext >&5
6055 am_cv_val_LC_MESSAGES=no
6060 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6061 if test $am_cv_val_LC_MESSAGES = yes; then
6062 cat >> confdefs.h <<\EOF
6063 #define HAVE_LC_MESSAGES 1
6068 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6069 echo "configure:6070: checking whether NLS is requested" >&5
6070 # Check whether --enable-nls or --disable-nls was given.
6071 if test "${enable_nls+set}" = set; then
6072 enableval="$enable_nls"
6078 echo "$ac_t""$USE_NLS" 1>&6
6081 BUILD_INCLUDED_LIBINTL=no
6082 USE_INCLUDED_LIBINTL=no
6086 if test "$USE_NLS" = "yes"; then
6087 cat >> confdefs.h <<\EOF
6088 #define ENABLE_NLS 1
6091 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6092 echo "configure:6093: checking whether included gettext is requested" >&5
6093 # Check whether --with-included-gettext or --without-included-gettext was given.
6094 if test "${with_included_gettext+set}" = set; then
6095 withval="$with_included_gettext"
6096 nls_cv_force_use_gnu_gettext=$withval
6098 nls_cv_force_use_gnu_gettext=no
6101 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6103 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6104 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6110 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6111 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6112 echo "configure:6113: checking for libintl.h" >&5
6113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6114 echo $ac_n "(cached) $ac_c" 1>&6
6116 cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 #include <libintl.h>
6121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6122 { (eval echo configure:6123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6124 if test -z "$ac_err"; then
6126 eval "ac_cv_header_$ac_safe=yes"
6129 echo "configure: failed program was:" >&5
6130 cat conftest.$ac_ext >&5
6132 eval "ac_cv_header_$ac_safe=no"
6136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6137 echo "$ac_t""yes" 1>&6
6138 cat >> confdefs.h <<\EOF
6139 #define HAVE_LIBINTL_H 1
6142 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6143 echo "configure:6144: checking for GNU gettext in libc" >&5
6144 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6145 echo $ac_n "(cached) $ac_c" 1>&6
6147 cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150 #include <libintl.h>
6151 extern int _nl_msg_cat_cntr;
6153 bindtextdomain ("", "");
6154 return (int) gettext ("") + _nl_msg_cat_cntr
6157 if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6159 gt_cv_func_gnugettext1_libc=yes
6161 echo "configure: failed program was:" >&5
6162 cat conftest.$ac_ext >&5
6164 gt_cv_func_gnugettext1_libc=no
6169 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6171 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6172 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6173 echo "configure:6174: checking for GNU gettext in libintl" >&5
6174 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6175 echo $ac_n "(cached) $ac_c" 1>&6
6177 gt_save_LIBS="$LIBS"
6178 LIBS="$LIBS -lintl $LIBICONV"
6179 cat > conftest.$ac_ext <<EOF
6180 #line 6181 "configure"
6181 #include "confdefs.h"
6182 #include <libintl.h>
6183 extern int _nl_msg_cat_cntr;
6185 bindtextdomain ("", "");
6186 return (int) gettext ("") + _nl_msg_cat_cntr
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6191 gt_cv_func_gnugettext1_libintl=yes
6193 echo "configure: failed program was:" >&5
6194 cat conftest.$ac_ext >&5
6196 gt_cv_func_gnugettext1_libintl=no
6199 LIBS="$gt_save_LIBS"
6202 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6205 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6206 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6207 && test "$PACKAGE" != gettext; }; then
6208 cat >> confdefs.h <<\EOF
6209 #define HAVE_GETTEXT 1
6213 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6214 INTLLIBS="-lintl $LIBICONV"
6217 gt_save_LIBS="$LIBS"
6218 LIBS="$LIBS $INTLLIBS"
6219 for ac_func in dcgettext
6221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6222 echo "configure:6223: checking for $ac_func" >&5
6223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6224 echo $ac_n "(cached) $ac_c" 1>&6
6226 cat > conftest.$ac_ext <<EOF
6227 #line 6228 "configure"
6228 #include "confdefs.h"
6229 /* System header to define __stub macros and hopefully few prototypes,
6230 which can conflict with char $ac_func(); below. */
6232 /* Override any gcc2 internal prototype to avoid an error. */
6233 /* We use char because int might match the return type of a gcc2
6234 builtin and then its argument prototype would still apply. */
6239 /* The GNU C library defines this for functions which it implements
6240 to always fail with ENOSYS. Some functions are actually named
6241 something starting with __ and the normal name is an alias. */
6242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6250 if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6252 eval "ac_cv_func_$ac_func=yes"
6254 echo "configure: failed program was:" >&5
6255 cat conftest.$ac_ext >&5
6257 eval "ac_cv_func_$ac_func=no"
6262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6263 echo "$ac_t""yes" 1>&6
6264 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6265 cat >> confdefs.h <<EOF
6266 #define $ac_tr_func 1
6270 echo "$ac_t""no" 1>&6
6274 LIBS="$gt_save_LIBS"
6276 # Extract the first word of "msgfmt", so it can be a program name with args.
6277 set dummy msgfmt; ac_word=$2
6278 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6279 echo "configure:6280: checking for $ac_word" >&5
6280 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6281 echo $ac_n "(cached) $ac_c" 1>&6
6285 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6288 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6289 for ac_dir in $PATH; do
6290 test -z "$ac_dir" && ac_dir=.
6291 if test -f $ac_dir/$ac_word; then
6292 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6293 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6299 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6303 MSGFMT="$ac_cv_path_MSGFMT"
6304 if test "$MSGFMT" != ":"; then
6305 echo "$ac_t""$MSGFMT" 1>&6
6307 echo "$ac_t""no" 1>&6
6310 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6311 set dummy gmsgfmt; ac_word=$2
6312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6313 echo "configure:6314: checking for $ac_word" >&5
6314 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6315 echo $ac_n "(cached) $ac_c" 1>&6
6319 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6322 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6327 for ac_dir in $ac_dummy; do
6328 test -z "$ac_dir" && ac_dir=.
6329 if test -f $ac_dir/$ac_word; then
6330 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6335 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6339 GMSGFMT="$ac_cv_path_GMSGFMT"
6340 if test -n "$GMSGFMT"; then
6341 echo "$ac_t""$GMSGFMT" 1>&6
6343 echo "$ac_t""no" 1>&6
6347 # Extract the first word of "xgettext", so it can be a program name with args.
6348 set dummy xgettext; ac_word=$2
6349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6350 echo "configure:6351: checking for $ac_word" >&5
6351 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6352 echo $ac_n "(cached) $ac_c" 1>&6
6356 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6359 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6360 for ac_dir in $PATH; do
6361 test -z "$ac_dir" && ac_dir=.
6362 if test -f $ac_dir/$ac_word; then
6363 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6364 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6370 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6374 XGETTEXT="$ac_cv_path_XGETTEXT"
6375 if test "$XGETTEXT" != ":"; then
6376 echo "$ac_t""$XGETTEXT" 1>&6
6378 echo "$ac_t""no" 1>&6
6386 echo "$ac_t""no" 1>&6
6390 if test "$CATOBJEXT" = "NONE"; then
6391 nls_cv_use_gnu_gettext=yes
6395 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6396 INTLOBJS="\$(GETTOBJS)"
6397 # Extract the first word of "msgfmt", so it can be a program name with args.
6398 set dummy msgfmt; ac_word=$2
6399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6400 echo "configure:6401: checking for $ac_word" >&5
6401 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6402 echo $ac_n "(cached) $ac_c" 1>&6
6406 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6410 for ac_dir in $PATH; do
6411 test -z "$ac_dir" && ac_dir=.
6412 if test -f $ac_dir/$ac_word; then
6413 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6414 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6420 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6424 MSGFMT="$ac_cv_path_MSGFMT"
6425 if test "$MSGFMT" != ":"; then
6426 echo "$ac_t""$MSGFMT" 1>&6
6428 echo "$ac_t""no" 1>&6
6431 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6432 set dummy gmsgfmt; ac_word=$2
6433 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6434 echo "configure:6435: checking for $ac_word" >&5
6435 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6436 echo $ac_n "(cached) $ac_c" 1>&6
6440 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6443 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6446 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6448 for ac_dir in $ac_dummy; do
6449 test -z "$ac_dir" && ac_dir=.
6450 if test -f $ac_dir/$ac_word; then
6451 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6456 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6460 GMSGFMT="$ac_cv_path_GMSGFMT"
6461 if test -n "$GMSGFMT"; then
6462 echo "$ac_t""$GMSGFMT" 1>&6
6464 echo "$ac_t""no" 1>&6
6467 # Extract the first word of "xgettext", so it can be a program name with args.
6468 set dummy xgettext; ac_word=$2
6469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6470 echo "configure:6471: checking for $ac_word" >&5
6471 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6472 echo $ac_n "(cached) $ac_c" 1>&6
6476 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6480 for ac_dir in $PATH; do
6481 test -z "$ac_dir" && ac_dir=.
6482 if test -f $ac_dir/$ac_word; then
6483 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6484 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6490 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6494 XGETTEXT="$ac_cv_path_XGETTEXT"
6495 if test "$XGETTEXT" != ":"; then
6496 echo "$ac_t""$XGETTEXT" 1>&6
6498 echo "$ac_t""no" 1>&6
6502 BUILD_INCLUDED_LIBINTL=yes
6503 USE_INCLUDED_LIBINTL=yes
6505 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6506 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6507 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6510 if test "$GMSGFMT" != ":"; then
6511 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6514 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6519 if test "$XGETTEXT" != ":"; then
6520 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6523 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6533 if test "$PACKAGE" = gettext; then
6534 BUILD_INCLUDED_LIBINTL=yes
6537 for ac_prog in bison
6539 # Extract the first word of "$ac_prog", so it can be a program name with args.
6540 set dummy $ac_prog; ac_word=$2
6541 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_word" >&5
6543 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6544 echo $ac_n "(cached) $ac_c" 1>&6
6546 if test -n "$INTLBISON"; then
6547 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6549 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6551 for ac_dir in $ac_dummy; do
6552 test -z "$ac_dir" && ac_dir=.
6553 if test -f $ac_dir/$ac_word; then
6554 ac_cv_prog_INTLBISON="$ac_prog"
6561 INTLBISON="$ac_cv_prog_INTLBISON"
6562 if test -n "$INTLBISON"; then
6563 echo "$ac_t""$INTLBISON" 1>&6
6565 echo "$ac_t""no" 1>&6
6568 test -n "$INTLBISON" && break
6571 if test -z "$INTLBISON"; then
6574 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6575 echo "configure:6576: checking version of bison" >&5
6576 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6577 case $ac_prog_version in
6578 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6579 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6580 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6581 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6583 echo "$ac_t""$ac_prog_version" 1>&6
6585 if test $ac_verc_fail = yes; then
6598 if test $USE_INCLUDED_LIBINTL = yes; then
6599 cat >> confdefs.h <<\EOF
6600 #define USE_INCLUDED_LIBINTL 1
6606 nls_cv_header_libgt=
6618 if test "x$CATOBJEXT" != x; then
6619 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6620 echo "configure:6621: checking for catalogs to be installed" >&5
6621 # Look for .po and .gmo files in the source directory.
6624 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6625 # If there aren't any .gmo files the shell will give us the
6626 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6628 case "$cat" in *\**)
6631 # The quadruple backslash is collapsed to a double backslash
6632 # by the backticks, then collapsed again by the double quotes,
6633 # leaving us with one backslash in the sed expression (right
6634 # before the dot that mustn't act as a wildcard). The dot to
6635 # be escaped in the second expression is hiding inside CATOBJEXT.
6636 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6637 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6638 # The user is allowed to set LINGUAS to a list of languages to
6639 # install catalogs for. If it's empty that means "all of them."
6640 if test "x$LINGUAS" = x; then
6641 CATALOGS="$CATALOGS $cat"
6642 XLINGUAS="$XLINGUAS $lang"
6644 case "$LINGUAS" in *$lang*)
6645 CATALOGS="$CATALOGS $cat"
6646 XLINGUAS="$XLINGUAS $lang"
6652 echo "$ac_t""$LINGUAS" 1>&6
6656 if test -n "$ac_aux_dir"; then
6657 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6659 if test -z "$MKINSTALLDIRS"; then
6660 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6664 INTL_LIBTOOL_SUFFIX_PREFIX=
6668 # Windows32 Registry support for specifying GCC installation paths.
6669 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6670 if test "${enable_win32_registry+set}" = set; then
6671 enableval="$enable_win32_registry"
6676 win32 | pe | cygwin* | mingw32* | uwin*)
6677 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6678 echo "configure:6679: checking whether windows registry support is requested" >&5
6679 if test "x$enable_win32_registry" != xno; then
6680 cat >> confdefs.h <<\EOF
6681 #define ENABLE_WIN32_REGISTRY 1
6684 echo "$ac_t""yes" 1>&6
6686 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6687 echo "configure:6688: checking for library containing RegOpenKeyExA" >&5
6688 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6689 echo $ac_n "(cached) $ac_c" 1>&6
6691 ac_func_search_save_LIBS="$LIBS"
6692 ac_cv_search_RegOpenKeyExA="no"
6693 cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 /* Override any gcc2 internal prototype to avoid an error. */
6697 /* We use char because int might match the return type of a gcc2
6698 builtin and then its argument prototype would still apply. */
6699 char RegOpenKeyExA();
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6707 ac_cv_search_RegOpenKeyExA="none required"
6709 echo "configure: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6713 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6714 LIBS="-l$i $ac_func_search_save_LIBS"
6715 cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
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. */
6721 char RegOpenKeyExA();
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729 ac_cv_search_RegOpenKeyExA="-l$i"
6732 echo "configure: failed program was:" >&5
6733 cat conftest.$ac_ext >&5
6737 LIBS="$ac_func_search_save_LIBS"
6740 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6741 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6742 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6748 echo "$ac_t""no" 1>&6
6751 # Check if user specified a different registry key.
6752 case "x${enable_win32_registry}" in
6755 gcc_cv_win32_registry_key="$VERSION"
6758 # no registry lookup.
6759 gcc_cv_win32_registry_key=''
6762 # user-specified key.
6763 gcc_cv_win32_registry_key="$enable_win32_registry"
6767 if test "x$enable_win32_registry" != xno; then
6768 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6769 echo "configure:6770: checking registry key on windows hosts" >&5
6770 cat >> confdefs.h <<EOF
6771 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6774 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6779 # Get an absolute path to the GCC top-level source directory
6780 holddir=`${PWDCMD-pwd}`
6782 topdir=`${PWDCMD-pwd}`
6785 # Conditionalize the makefile for this host machine.
6786 # Make-host contains the concatenation of all host makefile fragments
6787 # [there can be more than one]. This file is built by configure.frag.
6788 host_overrides=Make-host
6789 dep_host_xmake_file=
6790 for f in .. ${host_xmake_file}
6792 if test -f ${srcdir}/config/$f
6794 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6798 # Conditionalize the makefile for this target machine.
6799 # Make-target contains the concatenation of all host makefile fragments
6800 # [there can be more than one]. This file is built by configure.frag.
6801 target_overrides=Make-target
6803 for f in .. ${tmake_file}
6805 if test -f ${srcdir}/config/$f
6807 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6811 symbolic_link='ln -s'
6813 # If the host doesn't support symlinks, modify CC in
6814 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6815 # Otherwise, we can use "CC=$(CC)".
6817 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6819 cc_set_by_configure="\$(CC)"
6820 quoted_cc_set_by_configure="\$(CC)"
6821 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6822 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6825 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6827 symbolic_link="cp -p"
6831 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6832 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6833 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6834 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6838 out_object_file=`basename $out_file .c`.o
6841 for f in $tm_file; do
6844 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6846 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6847 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6852 for f in $tm_p_file; do
6855 tm_p_file_list="${tm_p_file_list} $f" ;;
6856 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
6861 for f in $host_xm_file; do
6864 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6866 host_xm_file_list="${host_xm_file_list} $f" ;;
6868 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6869 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6874 for f in $build_xm_file; do
6877 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6878 auto-build.h | auto-host.h )
6879 build_xm_file_list="${build_xm_file_list} $f" ;;
6881 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6882 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6886 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6887 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6890 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6891 if test x$host != x$target
6893 CROSS="-DCROSS_COMPILE"
6895 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6896 case "$host","$target" in
6897 i?86-*-*,x86_64-*-* \
6898 | powerpc*-*-*,powerpc64*-*-*)
6899 CROSS="$CROSS -DNATIVE_CROSS" ;;
6901 elif test "x$TARGET_SYSTEM_ROOT" != x; then
6902 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
6903 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6906 # If this is a cross-compiler that does not
6907 # have its own set of headers then define
6910 # If this is using newlib, without having the headers available now,
6911 # then define inhibit_libc in LIBGCC2_CFLAGS.
6912 # This prevents libgcc2 from containing any code which requires libc
6915 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
6916 test x$with_newlib = xyes ; } &&
6917 test "x$with_headers" = x ; then
6918 inhibit_libc=-Dinhibit_libc
6922 # When building gcc with a cross-compiler, we need to adjust things so
6923 # that the generator programs are still built with the native compiler.
6924 # Also, we cannot run fixincludes or fix-header.
6926 # These are the normal (build=host) settings:
6928 BUILD_PREFIX_1=ignore-
6929 CC_FOR_BUILD='$(CC)'
6930 BUILD_CFLAGS='$(ALL_CFLAGS)'
6932 STMP_FIXINC=stmp-fixinc
6933 STMP_FIXPROTO=stmp-fixproto
6935 # And these apply if build != host.
6936 if test x$build != x$host
6939 BUILD_PREFIX_1=build-
6940 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6942 if test "x$TARGET_SYSTEM_ROOT" = x; then
6948 # Expand extra_headers to include complete path.
6949 # This substitutes for lots of t-* files.
6951 if test "x$extra_headers" = x
6954 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6955 for file in $extra_headers;
6957 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6961 # Add a definition of USE_COLLECT2 if system wants one.
6962 case $use_collect2 in
6963 no) use_collect2= ;;
6966 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6967 xm_defines="${xm_defines} USE_COLLECT2"
6971 # Identify the assembler which will work hand-in-glove with the newly
6972 # built GCC, so that we can examine its features. This is the assembler
6973 # which will be driven by the driver program.
6975 # If build != host, and we aren't building gas in-tree, we identify a
6976 # build->target assembler and hope that it will have the same features
6977 # as the host->target assembler we'll be using.
6978 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6979 echo "configure:6980: checking what assembler to use" >&5
6982 gcc_cv_gas_major_version=
6983 gcc_cv_gas_minor_version=
6984 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6985 if test -x "$DEFAULT_ASSEMBLER"; then
6986 gcc_cv_as="$DEFAULT_ASSEMBLER"
6987 elif test -x "$AS"; then
6989 elif test -x as$host_exeext; then
6990 # Build using assembler in the current directory.
6991 gcc_cv_as=./as$host_exeext
6992 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
6993 && test -f ../gas/Makefile; then
6994 # Single tree build which includes gas.
6996 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6997 for f in $gcc_cv_as_bfd_srcdir/configure \
6998 $gcc_cv_as_gas_srcdir/configure \
6999 $gcc_cv_as_gas_srcdir/configure.in \
7000 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7001 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7002 if test x$gcc_cv_gas_version != x; then
7006 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7007 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7008 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7010 rm -f as$host_exeext
7011 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7012 in_tree_gas_is_elf=no
7013 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7014 || (grep 'obj_format = multi' ../gas/Makefile \
7015 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
7017 in_tree_gas_is_elf=yes
7021 if test "x$gcc_cv_as" = x; then
7022 # Search the same directories that the installed compiler will
7023 # search. Else we may find the wrong assembler and lose. If we
7024 # do not find a suitable assembler binary, then try the user's
7027 # Also note we have to check MD_EXEC_PREFIX before checking the
7028 # user's path. Unfortunately, there is no good way to get at the
7029 # value of MD_EXEC_PREFIX here. So we do a brute force search
7030 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7031 # to be fixed as part of the make/configure rewrite too.
7033 if test "x$exec_prefix" = xNONE; then
7034 if test "x$prefix" = xNONE; then
7035 test_prefix=/usr/local
7040 test_prefix=$exec_prefix
7043 # If the loop below does not find an assembler, then use whatever
7044 # one we can find in the users's path.
7046 if test "x$program_prefix" != xNONE; then
7047 gcc_cv_as=${program_prefix}as$host_exeext
7049 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7052 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7053 $test_prefix/lib/gcc-lib/$target_alias \
7054 /usr/lib/gcc/$target_alias/$gcc_version \
7055 /usr/lib/gcc/$target_alias \
7056 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7057 $test_prefix/$target_alias/bin"
7059 if test x$host = x$target; then
7060 test_dirs="$test_dirs \
7065 /bsd43/usr/lib/cmplrs/cc \
7066 /usr/cross64/usr/bin \
7067 /usr/lib/cmplrs/cc \
7068 /sysv/usr/lib/cmplrs/cc \
7069 /svr4/usr/lib/cmplrs/cc \
7073 for dir in $test_dirs; do
7074 if test -x $dir/as$host_exeext; then
7075 gcc_cv_as=$dir/as$host_exeext
7080 case $in_tree_gas in
7082 echo "$ac_t"""newly built gas"" 1>&6
7085 echo "$ac_t""$gcc_cv_as" 1>&6
7089 # Identify the linker which will work hand-in-glove with the newly
7090 # built GCC, so that we can examine its features. This is the linker
7091 # which will be driven by the driver program.
7093 # If build != host, and we aren't building gas in-tree, we identify a
7094 # build->target linker and hope that it will have the same features
7095 # as the host->target linker we'll be using.
7096 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7097 echo "configure:7098: checking what linker to use" >&5
7100 gcc_cv_gld_major_version=
7101 gcc_cv_gld_minor_version=
7102 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7103 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7104 if test -x "$DEFAULT_LINKER"; then
7105 gcc_cv_ld="$DEFAULT_LINKER"
7106 elif test -x "$LD"; then
7108 elif test -x collect-ld$host_exeext; then
7109 # Build using linker in the current directory.
7110 gcc_cv_ld=./collect-ld$host_exeext
7111 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7112 && test -f ../ld/Makefile; then
7113 # Single tree build which includes ld.
7115 in_tree_ld_is_elf=no
7116 if (grep 'EMUL = .*elf' ../ld/Makefile \
7117 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
7118 in_tree_ld_is_elf=yes
7120 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
7122 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7123 if test x$gcc_cv_gld_version != x; then
7127 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7128 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7129 rm -f collect-ld$host_exeext
7130 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7134 if test "x$gcc_cv_ld" = x; then
7135 # Search the same directories that the installed compiler will
7136 # search. Else we may find the wrong linker and lose. If we
7137 # do not find a suitable linker binary, then try the user's
7140 # Also note we have to check MD_EXEC_PREFIX before checking the
7141 # user's path. Unfortunately, there is no good way to get at the
7142 # value of MD_EXEC_PREFIX here. So we do a brute force search
7143 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7144 # to be fixed as part of the make/configure rewrite too.
7146 if test "x$exec_prefix" = xNONE; then
7147 if test "x$prefix" = xNONE; then
7148 test_prefix=/usr/local
7153 test_prefix=$exec_prefix
7156 # If the loop below does not find an linker, then use whatever
7157 # one we can find in the users's path.
7159 if test "x$program_prefix" != xNONE; then
7160 gcc_cv_ld=${program_prefix}ld$host_exeext
7162 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7165 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7166 $test_prefix/lib/gcc-lib/$target_alias \
7167 /usr/lib/gcc/$target_alias/$gcc_version \
7168 /usr/lib/gcc/$target_alias \
7169 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7170 $test_prefix/$target_alias/bin"
7172 if test x$host = x$target; then
7173 test_dirs="$test_dirs \
7178 /bsd43/usr/lib/cmplrs/cc \
7179 /usr/cross64/usr/bin \
7180 /usr/lib/cmplrs/cc \
7181 /sysv/usr/lib/cmplrs/cc \
7182 /svr4/usr/lib/cmplrs/cc \
7186 for dir in $test_dirs; do
7187 if test -x $dir/ld$host_exeext; then
7188 gcc_cv_ld=$dir/ld$host_exeext
7195 echo "$ac_t"""newly built ld"" 1>&6
7198 echo "$ac_t""$gcc_cv_ld" 1>&6
7202 # Figure out what nm we will be using.
7203 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7204 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7205 echo "configure:7206: checking what nm to use" >&5
7207 if test -x nm$host_exeext; then
7208 gcc_cv_nm=./nm$host_exeext
7209 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7210 && test -f ../binutils/Makefile; then
7211 # Single tree build which includes binutils.
7213 gcc_cv_nm=./nm$host_exeext
7214 rm -f nm$host_exeext
7215 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7216 elif test "x$program_prefix" != xNONE; then
7217 gcc_cv_nm=${program_prefix}nm$host_exeext
7219 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7222 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7223 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7226 # Figure out what objdump we will be using.
7227 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7228 echo "configure:7229: checking what objdump to use" >&5
7230 if test -x objdump$host_exeext; then
7231 gcc_cv_objdump=./objdump$host_exeext
7232 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7233 && test -f ../binutils/Makefile; then
7234 # Single tree build which includes binutils.
7236 gcc_cv_objdump=./objdump$host_exeext
7237 rm -f objdump$host_exeext
7238 $symbolic_link ../binutils/objdump$host_exeext \
7239 objdump$host_exeext 2>/dev/null
7240 elif test "x$program_prefix" != xNONE; then
7241 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7243 gcc_cv_objdump=`echo objdump | \
7244 sed ${program_transform_name}`$host_exeext
7246 case $in_tree_objdump in
7247 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7248 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7251 # Figure out what assembler alignment features are present.
7252 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7253 echo "configure:7254: checking assembler alignment features" >&5
7254 gcc_cv_as_alignment_features=none
7255 if test $in_tree_gas = yes; then
7256 # Gas version 2.6 and later support for .balign and .p2align.
7257 if test $gcc_cv_gas_major_version -eq 2 \
7258 && test $gcc_cv_gas_minor_version -ge 6 \
7259 || test $gcc_cv_gas_major_version -gt 2 ; then
7262 gcc_cv_as_alignment_features=".balign and .p2align"
7263 cat >> confdefs.h <<\EOF
7264 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7271 # Gas version 2.8 and later support specifying the maximum
7272 # bytes to skip when using .p2align.
7273 if test $gcc_cv_gas_major_version -eq 2 \
7274 && test $gcc_cv_gas_minor_version -ge 8 \
7275 || test $gcc_cv_gas_major_version -gt 2 ; then
7278 gcc_cv_as_alignment_features=".p2align including maximum skip"
7279 cat >> confdefs.h <<\EOF
7280 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7287 elif test x$gcc_cv_as != x; then
7288 # Check if we have .balign and .p2align
7289 echo ".balign 4" > conftest.s
7290 echo ".p2align 2" >> conftest.s
7291 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7292 gcc_cv_as_alignment_features=".balign and .p2align"
7293 cat >> confdefs.h <<\EOF
7294 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7298 rm -f conftest.s conftest.o
7299 # Check if specifying the maximum bytes to skip when
7300 # using .p2align is supported.
7301 echo ".p2align 4,,7" > conftest.s
7302 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7303 gcc_cv_as_alignment_features=".p2align including maximum skip"
7304 cat >> confdefs.h <<\EOF
7305 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7309 rm -f conftest.s conftest.o
7311 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7313 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7314 echo "configure:7315: checking assembler subsection support" >&5
7315 gcc_cv_as_subsections=no
7316 if test $in_tree_gas = yes ; then
7317 if test $gcc_cv_gas_major_version -eq 2 \
7318 && test $gcc_cv_gas_minor_version -ge 9 \
7319 || test $gcc_cv_gas_major_version -gt 2 ; then
7322 test $in_tree_gas_is_elf = yes \
7323 && gcc_cv_as_subsections="working .subsection -1"
7328 elif test x$gcc_cv_as != x; then
7329 # Check if we have .subsection
7330 echo ".subsection 1" > conftest.s
7331 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7332 gcc_cv_as_subsections=".subsection"
7333 if test x$gcc_cv_nm != x; then
7334 cat > conftest.s <<EOF
7335 conftest_label1: .word 0
7337 conftest_label2: .word 0
7340 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7341 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7342 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7343 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7346 gcc_cv_as_subsections="working .subsection -1"
7351 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7353 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7354 cat >> confdefs.h <<\EOF
7355 #define HAVE_GAS_SUBSECTION_ORDERING 1
7359 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7361 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7362 echo "configure:7363: checking assembler weak support" >&5
7364 if test $in_tree_gas = yes ; then
7365 if test $gcc_cv_gas_major_version -eq 2 \
7366 && test $gcc_cv_gas_minor_version -ge 2 \
7367 || test $gcc_cv_gas_major_version -gt 2 ; then
7370 gcc_cv_as_weak="yes"
7375 elif test x$gcc_cv_as != x; then
7376 # Check if we have .weak
7377 echo " .weak foobar" > conftest.s
7378 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7379 gcc_cv_as_weak="yes"
7381 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7383 if test x"$gcc_cv_as_weak" = xyes; then
7384 cat >> confdefs.h <<\EOF
7385 #define HAVE_GAS_WEAK 1
7389 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7391 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7392 echo "configure:7393: checking assembler hidden support" >&5
7394 if test $in_tree_gas = yes ; then
7395 if test $gcc_cv_gas_major_version -eq 2 \
7396 && (test $gcc_cv_gas_minor_version -gt 12 \
7397 || (test $gcc_cv_gas_minor_version -eq 12 \
7398 && test $gcc_cv_gas_patch_version -ge 1 )) \
7399 || test $gcc_cv_gas_major_version -gt 2 ; then
7402 test $in_tree_gas_is_elf = yes && gcc_cv_as_hidden="yes"
7407 elif test x$gcc_cv_as != x; then
7408 # Check if we have .hidden
7409 echo " .hidden foobar" > conftest.s
7410 echo "foobar:" >> conftest.s
7411 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7412 gcc_cv_as_hidden="yes"
7414 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7416 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7417 # This is irritatingly difficult to feature test for. Look for
7418 # the date string after the version number.
7419 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7420 if echo "$ld_ver" | grep GNU > /dev/null; then
7421 ld_vers=`echo $ld_ver | sed -n \
7422 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
7423 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
7424 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
7425 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
7426 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
7427 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
7428 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'`
7429 if test 0"$ld_date" -lt 20020404; then
7430 if test -n "$ld_date"; then
7431 # If there was date string, but was earlier than 2002-04-04, fail
7432 gcc_cv_as_hidden="no"
7433 elif test -z "$ld_vers"; then
7434 # If there was no date string nor ld version number, something is wrong
7435 gcc_cv_as_hidden="no"
7437 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7438 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7439 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7440 test -z "$ld_vers_patch" && ld_vers_patch=0
7441 if test "$ld_vers_major" -lt 2; then
7442 gcc_cv_as_hidden="no"
7443 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7444 gcc_cv_as_hidden="no"
7445 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7446 -a "$ld_vers_patch" -eq 0; then
7447 gcc_cv_as_hidden="no"
7455 if test x"$gnu_ld_flag" = x"no"; then
7456 # Even if using gas with .hidden support, the resulting object files
7457 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7458 # N64 linkers, the problem is that the linker refuses to accept
7459 # -call_shared (passed by default to the linker) and -r (used to
7460 # link the object file generated without .hidden directives with
7461 # one that hides symbols), so we also lose.
7466 if test x"$gcc_cv_as_hidden" = xyes; then
7467 cat >> confdefs.h <<\EOF
7468 #define HAVE_GAS_HIDDEN 1
7472 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7473 libgcc_visibility=$gcc_cv_as_hidden
7476 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7477 echo "configure:7478: checking assembler leb128 support" >&5
7479 if test $in_tree_gas = yes ; then
7480 if test $gcc_cv_gas_major_version -eq 2 \
7481 && test $gcc_cv_gas_minor_version -ge 11 \
7482 || test $gcc_cv_gas_major_version -gt 2 ; then
7485 test $in_tree_gas_is_elf = yes && gcc_cv_as_leb128="yes"
7490 elif test x$gcc_cv_as != x; then
7491 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7492 cat > conftest.s <<EOF
7500 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7501 gcc_cv_as_leb128="yes"
7503 # GAS versions before 2.11 do not support uleb128,
7504 # despite appearing to.
7505 # ??? There exists an elf-specific test that will crash
7506 # the assembler. Perhaps it's better to figure out whether
7507 # arbitrary sections are supported and try the test.
7508 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7509 if echo "$as_ver" | grep GNU > /dev/null; then
7510 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7511 as_major=`echo $as_ver | sed 's/\..*//'`
7512 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7513 if test $as_major -eq 2 -a $as_minor -lt 11; then
7514 gcc_cv_as_leb128="no"
7518 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7520 if test x"$gcc_cv_as_leb128" = xyes; then
7521 cat >> confdefs.h <<\EOF
7522 #define HAVE_AS_LEB128 1
7526 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7528 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7529 echo "configure:7530: checking assembler eh_frame optimization" >&5
7530 gcc_cv_as_eh_frame=no
7531 if test $in_tree_gas = yes ; then
7532 if test $gcc_cv_gas_major_version -eq 2 \
7533 && test $gcc_cv_gas_minor_version -ge 12 \
7534 || test $gcc_cv_gas_major_version -gt 2 ; then
7537 test $in_tree_gas_is_elf = yes && gcc_cv_as_eh_frame="yes"
7542 elif test x$gcc_cv_as != x; then
7543 # Check if this is GAS.
7544 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7545 rm -f a.out 2> /dev/null
7546 if echo "$as_ver" | grep GNU > /dev/null; then
7547 # Versions up to and including 2.11.0 may mis-optimize
7548 # .eh_frame data. Try something.
7549 cat > conftest.s <<EOF
7556 .section .eh_frame,"aw",@progbits
7558 .4byte .LECIE1-.LSCIE1
7572 .4byte .LEFDE1-.LASFDE1
7574 .4byte .LASFDE1-__FRAME_BEGIN__
7583 cat > conftest.lit <<EOF
7584 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7585 0010 01000000 12000000 18000000 00000000 ................
7586 0020 08000000 04080000 0044 .........D
7588 cat > conftest.big <<EOF
7589 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7590 0010 00000001 00000012 00000018 00000000 ................
7591 0020 00000008 04000000 0844 .........D
7593 # If the assembler didn't choke, and we can objdump,
7594 # and we got the correct data, then succeed.
7595 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7596 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7597 | tail -3 > conftest.got \
7598 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7599 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7601 gcc_cv_as_eh_frame="yes"
7603 gcc_cv_as_eh_frame="bad"
7604 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7605 cat >> confdefs.h <<\EOF
7606 #define USE_AS_TRADITIONAL_FORMAT 1
7614 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7616 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7617 echo "configure:7618: checking assembler section merging support" >&5
7618 gcc_cv_as_shf_merge=no
7619 if test $in_tree_gas = yes ; then
7620 if test $gcc_cv_gas_major_version -eq 2 \
7621 && test $gcc_cv_gas_minor_version -ge 12 \
7622 || test $gcc_cv_gas_major_version -gt 2 ; then
7625 test $in_tree_gas_is_elf = yes && gcc_cv_as_shf_merge="yes"
7630 elif test x$gcc_cv_as != x; then
7631 # Check if we support SHF_MERGE sections
7632 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7633 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7634 gcc_cv_as_shf_merge=yes
7636 rm -f conftest.s conftest.o
7638 if test x"$gcc_cv_as_shf_merge" = xyes; then
7639 cat >> confdefs.h <<\EOF
7640 #define HAVE_GAS_SHF_MERGE 1
7644 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7646 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7647 echo "configure:7648: checking assembler thread-local storage support" >&5
7656 .section ".tdata","awT",@progbits
7659 ldq $27,__tls_get_addr($29) !literal!1
7660 lda $16,foo($29) !tlsgd!1
7661 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7662 ldq $27,__tls_get_addr($29) !literal!2
7663 lda $16,foo($29) !tlsldm!2
7664 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7665 ldq $1,foo($29) !gotdtprel
7666 ldah $2,foo($29) !dtprelhi
7667 lda $3,foo($2) !dtprello
7668 lda $4,foo($29) !dtprel
7669 ldq $1,foo($29) !gottprel
7670 ldah $2,foo($29) !tprelhi
7671 lda $3,foo($2) !tprello
7672 lda $4,foo($29) !tprel'
7678 .section ".tdata","awT",@progbits
7682 leal foo@TLSGD(,%ebx,1), %eax
7683 leal foo@TLSLDM(%ebx), %eax
7684 leal foo@DTPOFF(%eax), %edx
7685 movl foo@GOTTPOFF(%ebx), %eax
7686 subl foo@GOTTPOFF(%ebx), %eax
7687 addl foo@GOTNTPOFF(%ebx), %eax
7688 movl foo@INDNTPOFF, %eax
7689 movl $foo@TPOFF, %eax
7690 subl $foo@TPOFF, %eax
7691 leal foo@NTPOFF(%ecx), %eax'
7697 .section ".tdata","awT",@progbits
7701 leaq foo@TLSGD(%rip), %rdi
7702 leaq foo@TLSLD(%rip), %rdi
7703 leaq foo@DTPOFF(%rax), %rdx
7704 movq foo@GOTTPOFF(%rip), %rax
7705 movq $foo@TPOFF, %rax'
7711 .section ".tdata","awT",@progbits
7714 addl r16 = @ltoff(@dtpmod(foo#)), gp
7715 addl r17 = @ltoff(@dtprel(foo#)), gp
7716 addl r18 = @ltoff(@tprel(foo#)), gp
7717 addl r19 = @dtprel(foo#), gp
7718 adds r21 = @dtprel(foo#), r13
7719 movl r23 = @dtprel(foo#)
7720 addl r20 = @tprel(foo#), gp
7721 adds r22 = @tprel(foo#), r13
7722 movl r24 = @tprel(foo#)'
7728 .section ".tdata","awT",@progbits
7736 addi 3,31,ld0@got@tlsgd
7738 addi 3,31,x1@got@tlsld
7741 addis 9,3,x2@dtprel@ha
7742 addi 9,9,x2@dtprel@l
7743 lwz 9,x3@got@tprel(31)
7746 addis 9,2,x2@tprel@ha
7747 addi 9,9,x2@tprel@l'
7754 .section ".tdata","awT",@progbits
7762 addi 3,2,ld0@got@tlsgd
7768 addi 3,2,x1@got@tlsld
7774 addis 9,3,x2@dtprel@ha
7775 addi 9,9,x2@dtprel@l
7778 ld 9,x3@got@dtprel(2)
7788 .section ".tdata","awT",@progbits
7797 l %r1,foo@GOTNTPOFF(%r12)
7798 l %r1,0(%r1):tls_load:foo
7799 bas %r14,0(%r1,%r13):tls_gdcall:foo
7800 bas %r14,0(%r1,%r13):tls_ldcall:foo'
7807 .section ".tdata","awT",@progbits
7815 lg %r1,foo@GOTNTPOFF(%r12)
7816 larl %r1,foo@INDNTPOFF
7817 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
7818 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
7821 tls_as_opt="-m64 -Aesame"
7824 if test -z "$tls_first_major"; then
7826 elif test $in_tree_gas = yes ; then
7827 if test $gcc_cv_gas_major_version -eq $tls_first_major \
7828 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
7829 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
7837 elif test x$gcc_cv_as != x; then
7838 echo "$conftest_s" > conftest.s
7839 if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7843 rm -f conftest.s conftest.o
7845 if test "$gcc_cv_as_tls" = yes; then
7846 cat >> confdefs.h <<\EOF
7847 #define HAVE_AS_TLS 1
7851 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7854 # All TARGET_ABI_OSF targets.
7855 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7856 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7857 echo "configure:7858: checking assembler supports explicit relocations" >&5
7858 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7859 echo $ac_n "(cached) $ac_c" 1>&6
7862 gcc_cv_as_explicit_relocs=unknown
7863 if test $in_tree_gas = yes ; then
7864 if test $gcc_cv_gas_major_version -eq 2 \
7865 && test $gcc_cv_gas_minor_version -ge 12 \
7866 || test $gcc_cv_gas_major_version -gt 2 ; then
7869 gcc_cv_as_explicit_relocs=yes
7874 elif test x$gcc_cv_as != x; then
7875 cat > conftest.s << 'EOF'
7878 extbl $3, $2, $3 !lituse_bytoff!1
7879 ldq $2, a($29) !literal!1
7880 ldq $4, b($29) !literal!2
7881 ldq_u $3, 0($2) !lituse_base!1
7882 ldq $27, f($29) !literal!5
7883 jsr $26, ($27), f !lituse_jsr!5
7884 ldah $29, 0($26) !gpdisp!3
7885 lda $0, c($29) !gprel
7886 ldah $1, d($29) !gprelhigh
7887 lda $1, d($1) !gprellow
7888 lda $29, 0($29) !gpdisp!3
7890 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7891 gcc_cv_as_explicit_relocs=yes
7893 gcc_cv_as_explicit_relocs=no
7895 rm -f conftest.s conftest.o
7900 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7901 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7902 cat >> confdefs.h <<\EOF
7903 #define HAVE_AS_EXPLICIT_RELOCS 1
7909 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7910 echo "configure:7911: checking assembler .register pseudo-op support" >&5
7911 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7912 echo $ac_n "(cached) $ac_c" 1>&6
7915 gcc_cv_as_register_pseudo_op=unknown
7916 if test x$gcc_cv_as != x; then
7917 # Check if we have .register
7918 echo ".register %g2, #scratch" > conftest.s
7919 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7920 gcc_cv_as_register_pseudo_op=yes
7922 gcc_cv_as_register_pseudo_op=no
7924 rm -f conftest.s conftest.o
7929 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7930 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7931 cat >> confdefs.h <<\EOF
7932 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7937 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7938 echo "configure:7939: checking assembler supports -relax" >&5
7939 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7940 echo $ac_n "(cached) $ac_c" 1>&6
7943 gcc_cv_as_relax_opt=unknown
7944 if test x$gcc_cv_as != x; then
7945 # Check if gas supports -relax
7946 echo ".text" > conftest.s
7947 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7948 gcc_cv_as_relax_opt=yes
7950 gcc_cv_as_relax_opt=no
7952 rm -f conftest.s conftest.o
7957 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7958 if test "x$gcc_cv_as_relax_opt" = xyes; then
7959 cat >> confdefs.h <<\EOF
7960 #define HAVE_AS_RELAX_OPTION 1
7965 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7966 echo "configure:7967: checking assembler and linker support unaligned pc related relocs" >&5
7967 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7968 echo $ac_n "(cached) $ac_c" 1>&6
7971 gcc_cv_as_sparc_ua_pcrel=unknown
7972 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7973 gcc_cv_as_sparc_ua_pcrel=no
7974 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7975 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7976 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7977 gcc_cv_as_sparc_ua_pcrel=yes
7979 rm -f conftest.s conftest.o conftest
7984 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7985 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7986 cat >> confdefs.h <<\EOF
7987 #define HAVE_AS_SPARC_UA_PCREL 1
7992 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7993 echo "configure:7994: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7994 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7995 echo $ac_n "(cached) $ac_c" 1>&6
7998 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7999 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8000 if test x$gcc_cv_objdump != x; then
8001 gcc_cv_as_sparc_ua_pcrel_hidden=no
8002 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8003 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8004 echo "foo: .skip 4" >> conftest.s
8005 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8006 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8007 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8008 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8009 if $gcc_cv_objdump -R conftest 2> /dev/null \
8010 | grep 'DISP32' > /dev/null 2>&1; then
8013 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8017 rm -f conftest.s conftest.o conftest
8019 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8024 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8025 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8026 cat >> confdefs.h <<\EOF
8027 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8032 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8033 echo "configure:8034: checking for assembler offsetable %lo() support" >&5
8034 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8035 echo $ac_n "(cached) $ac_c" 1>&6
8038 gcc_cv_as_offsetable_lo10=unknown
8039 if test "x$gcc_cv_as" != x; then
8040 # Check if assembler has offsetable %lo()
8041 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8042 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8043 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8045 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8046 > /dev/null 2>&1; then
8047 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8048 gcc_cv_as_offsetable_lo10=no
8050 gcc_cv_as_offsetable_lo10=yes
8053 gcc_cv_as_offsetable_lo10=no
8055 rm -f conftest.s conftest.o conftest1.s conftest1.o
8060 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8061 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8062 cat >> confdefs.h <<\EOF
8063 #define HAVE_AS_OFFSETABLE_LO10 1
8070 i[34567]86-*-* | x86_64-*-*)
8071 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8072 echo "configure:8073: checking assembler instructions" >&5
8073 gcc_cv_as_instructions=
8074 if test $in_tree_gas = yes ; then
8075 if test $gcc_cv_gas_major_version -eq 2 \
8076 && test $gcc_cv_gas_minor_version -ge 9 \
8077 || test $gcc_cv_gas_major_version -gt 2 ; then
8080 gcc_cv_as_instructions="filds fists"
8085 elif test x$gcc_cv_as != x; then
8086 set "filds fists" "filds mem; fists mem"
8089 echo "$2" > conftest.s
8090 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8091 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8095 rm -f conftest.s conftest.o
8097 if test x"$gcc_cv_as_instructions" != x; then
8098 cat >> confdefs.h <<EOF
8099 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8103 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8105 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8106 echo "configure:8107: checking assembler GOTOFF in data directives" >&5
8107 gcc_cv_as_gotoff_in_data=no
8108 if test $in_tree_gas = yes ; then
8109 if test $gcc_cv_gas_major_version -eq 2 \
8110 && test $gcc_cv_gas_minor_version -ge 11 \
8111 || test $gcc_cv_gas_major_version -gt 2 ; then
8114 gcc_cv_as_gotoff_in_data=yes
8119 elif test x$gcc_cv_as != x; then
8120 cat > conftest.s <<EOF
8127 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8128 gcc_cv_as_gotoff_in_data=yes
8131 cat >> confdefs.h <<EOF
8132 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8135 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8139 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8140 echo "configure:8141: checking assembler supports ltoffx and ldxmov" >&5
8141 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8142 echo $ac_n "(cached) $ac_c" 1>&6
8145 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8146 if test $in_tree_gas = yes ; then
8147 if test $gcc_cv_gas_major_version -eq 2 \
8148 && test $gcc_cv_gas_minor_version -ge 14 \
8149 || test $gcc_cv_gas_major_version -gt 2 ; then
8152 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8157 elif test x$gcc_cv_as != x; then
8158 cat > conftest.s << 'EOF'
8160 addl r15 = @ltoffx(x#), gp
8162 ld8.mov r16 = [r15], x#
8164 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8165 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8167 gcc_cv_as_ltoffx_ldxmov_relocs=no
8169 rm -f conftest.s conftest.o
8174 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8175 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8176 cat >> confdefs.h <<\EOF
8177 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8184 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8185 echo "configure:8186: checking assembler dwarf2 debug_line support" >&5
8186 gcc_cv_as_dwarf2_debug_line=no
8187 # ??? Not all targets support dwarf2 debug_line, even within a version
8188 # of gas. Moreover, we need to emit a valid instruction to trigger any
8189 # info to the output file. So, as supported targets are added to gas 2.11,
8190 # add some instruction here to (also) show we expect this might work.
8191 # ??? Once 2.11 is released, probably need to add first known working
8192 # version to the per-target configury.
8194 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8195 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
8196 | xstormy16*-*-* | cris-*-*)
8206 if test $in_tree_gas = yes ; then
8207 if test $gcc_cv_gas_major_version -eq 2 \
8208 && test $gcc_cv_gas_minor_version -ge 11 \
8209 || test $gcc_cv_gas_major_version -gt 2 ; then
8212 test $in_tree_gas_is_elf = yes && test x"$insn" != x \
8213 && gcc_cv_as_dwarf2_debug_line="yes"
8218 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8219 echo ' .file 1 "conftest.s"' > conftest.s
8220 echo ' .loc 1 3 0' >> conftest.s
8221 echo " $insn" >> conftest.s
8222 # ??? This fails with non-gnu grep.
8223 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8224 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8225 # The .debug_line file table must be in the exact order that
8226 # we specified the files, since these indices are also used
8227 # by DW_AT_decl_file. Approximate this test by testing if
8228 # the assembler bitches if the same index is assigned twice.
8229 echo ' .file 1 "foo.s"' > conftest.s
8230 echo ' .file 1 "bar.s"' >> conftest.s
8231 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8233 gcc_cv_as_dwarf2_debug_line="no"
8235 gcc_cv_as_dwarf2_debug_line="yes"
8238 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8240 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8241 cat >> confdefs.h <<\EOF
8242 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8246 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8248 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8249 echo "configure:8250: checking assembler --gdwarf2 support" >&5
8250 gcc_cv_as_gdwarf2_flag=no
8251 if test $in_tree_gas = yes ; then
8252 if test $gcc_cv_gas_major_version -eq 2 \
8253 && test $gcc_cv_gas_minor_version -ge 11 \
8254 || test $gcc_cv_gas_major_version -gt 2 ; then
8257 test $in_tree_gas_is_elf = yes && test x"$insn" != x \
8258 && gcc_cv_as_gdwarf2_flag="yes"
8263 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8264 echo '' > conftest.s
8265 # ??? This fails with non-gnu grep.
8266 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8268 gcc_cv_as_gdwarf2_flag="yes"
8270 rm -f conftest.s conftest.o
8272 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8273 cat >> confdefs.h <<\EOF
8274 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8278 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8280 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8281 echo "configure:8282: checking assembler --gstabs support" >&5
8282 gcc_cv_as_gstabs_flag=no
8283 if test $in_tree_gas = yes ; then
8284 if test $gcc_cv_gas_major_version -eq 2 \
8285 && test $gcc_cv_gas_minor_version -ge 11 \
8286 || test $gcc_cv_gas_major_version -gt 2 ; then
8289 test $in_tree_gas_is_elf = yes && test x"$insn" != x \
8290 && gcc_cv_as_gstabs_flag="yes"
8295 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8296 echo '' > conftest.s
8297 # ??? This fails with non-gnu grep.
8298 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8299 gcc_cv_as_gstabs_flag="yes"
8300 # The native Solaris 9/Intel assembler doesn't understand --gstabs
8301 # and warns about it, but still exits successfully. So check for
8303 if $gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | \
8304 grep -i warning > /dev/null ; then
8305 gcc_cv_as_gstabs_flag="no"
8308 rm -f conftest.s conftest.o
8310 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8311 cat >> confdefs.h <<\EOF
8312 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8316 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8318 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8319 echo "configure:8320: checking linker read-only and read-write section mixing" >&5
8320 gcc_cv_ld_ro_rw_mix=unknown
8321 if test $in_tree_ld = yes ; then
8322 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 \
8323 && test $in_tree_ld_is_elf = yes; then
8324 gcc_cv_ld_ro_rw_mix=read-write
8326 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8327 echo '.section myfoosect, "a"' > conftest1.s
8328 echo '.section myfoosect, "aw"' > conftest2.s
8329 echo '.byte 1' >> conftest2.s
8330 echo '.section myfoosect, "a"' > conftest3.s
8331 echo '.byte 0' >> conftest3.s
8332 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8333 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8334 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8335 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8336 conftest2.o conftest3.o > /dev/null 2>&1; then
8337 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8338 | sed -e '/myfoosect/!d' -e N`
8339 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8340 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8341 gcc_cv_ld_ro_rw_mix=read-only
8343 gcc_cv_ld_ro_rw_mix=read-write
8347 rm -f conftest.* conftest[123].*
8349 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8350 cat >> confdefs.h <<\EOF
8351 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8355 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8357 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8358 echo "configure:8359: checking linker PT_GNU_EH_FRAME support" >&5
8359 gcc_cv_ld_eh_frame_hdr=no
8360 if test $in_tree_ld = yes ; then
8361 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 \
8362 && test $in_tree_ld_is_elf = yes; then
8363 gcc_cv_ld_eh_frame_hdr=yes
8365 elif test x$gcc_cv_ld != x; then
8366 # Check if linker supports --eh-frame-hdr option
8367 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8368 gcc_cv_ld_eh_frame_hdr=yes
8371 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8372 cat >> confdefs.h <<\EOF
8373 #define HAVE_LD_EH_FRAME_HDR 1
8377 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8379 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
8380 echo "configure:8381: checking linker position independent executable support" >&5
8382 if test $in_tree_ld = yes ; then
8383 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 \
8384 && test $in_tree_ld_is_elf = yes; then
8387 elif test x$gcc_cv_ld != x; then
8388 # Check if linker supports -pie option
8389 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
8393 if test x"$gcc_cv_ld_pie" = xyes; then
8394 cat >> confdefs.h <<\EOF
8395 #define HAVE_LD_PIE 1
8399 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
8401 # Miscellaneous target-specific checks.
8404 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8405 echo "configure:8406: checking whether libgloss uses STARTUP directives consistently" >&5
8406 gcc_cv_mips_libgloss_startup=no
8407 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8408 if test "x$exec_prefix" = xNONE; then
8409 if test "x$prefix" = xNONE; then
8410 test_prefix=/usr/local
8415 test_prefix=$exec_prefix
8417 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8419 if grep '^STARTUP' $f > /dev/null 2>&1; then
8420 gcc_cv_mips_libgloss_startup=yes
8424 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8425 cat >> confdefs.h <<\EOF
8426 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8430 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8432 echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
8433 echo "configure:8434: checking whether the assembler has explicit relocation support" >&5
8434 if test x$gcc_cv_mips_explicit_relocs = x; then
8435 gcc_cv_mips_explicit_relocs=no
8436 if test $in_tree_gas = yes; then
8437 if test $gcc_cv_gas_major_version -eq 2 \
8438 && test $gcc_cv_gas_minor_version -ge 14 \
8439 || test $gcc_cv_gas_major_version -gt 2 ; then
8442 gcc_cv_mips_explicit_relocs=yes
8447 elif test x$gcc_cv_as != x; then
8448 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
8449 if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
8450 gcc_cv_mips_explicit_relocs=yes
8452 rm -f conftest.s conftest.o
8455 if test $gcc_cv_mips_explicit_relocs = yes; then
8456 test x$target_cpu_default != x || target_cpu_default=0
8457 target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
8459 echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
8463 if test x$with_sysroot = x && test x$host = x$target \
8464 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8465 cat >> confdefs.h <<EOF
8466 #define PREFIX_INCLUDE_DIR "$prefix/include"
8471 # Figure out what language subdirectories are present.
8472 # Look if the user specified --enable-languages="..."; if not, use
8473 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8475 # NB: embedded tabs in this IF block -- do not untabify
8476 if test x"${enable_languages+set}" != xset; then
8477 if test x"${LANGUAGES+set}" = xset; then
8478 enable_languages="${LANGUAGES}"
8479 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8482 enable_languages=all
8485 if test x"${enable_languages}" = x \
8486 || test x"${enable_languages}" = xyes;
8488 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8491 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8493 # First scan to see if an enabled language requires some other language.
8494 # We assume that a given config-lang.in will list all the language
8495 # front ends it requires, even if some are required indirectly.
8496 for lang in ${srcdir}/*/config-lang.in ..
8501 # The odd quoting in the next line works around
8502 # an apparent bug in bash 1.12 on linux.
8503 ${srcdir}/[*]/config-lang.in)
8506 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8507 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8508 for other in $this_lang_requires
8510 case ,${enable_languages}, in
8516 enable_languages="$enable_languages,$other"
8524 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8527 for lang in ${srcdir}/*/config-lang.in ..
8531 # The odd quoting in the next line works around
8532 # an apparent bug in bash 1.12 on linux.
8533 ${srcdir}/[*]/config-lang.in) ;;
8535 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8536 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8537 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8538 if test "x$lang_alias" = x
8540 echo "$lang doesn't set \$language." 1>&2
8543 case ${build_by_default},${enable_languages}, in
8544 *,$lang_alias,*) add_this_lang=yes ;;
8545 no,*) add_this_lang=no ;;
8546 *,all,*) add_this_lang=yes ;;
8547 *) add_this_lang=no ;;
8549 found_languages="${found_languages} ${lang_alias}"
8550 if test x"${add_this_lang}" = xyes; then
8552 ${srcdir}/ada/config-lang.in)
8553 if test x$have_gnat = xyes ; then
8554 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8558 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8567 for expected_language in ${expected_languages} ..
8569 if test "${expected_language}" != ..; then
8570 missing_language="${expected_language}"
8571 if test "${expected_language}" = "c" \
8572 || test "${expected_language}" = "all"; then
8575 for found_language in ${found_languages} ..
8577 if test "${found_language}" != ..; then
8578 if test "${expected_language}" = "${found_language}"; then
8583 if test "x${missing_language}" != x; then
8584 missing_languages="${missing_languages} ${missing_language}"
8589 if test "x$missing_languages" != x; then
8590 { echo "configure: error:
8591 The following requested languages were not found:${missing_languages}
8592 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8595 # Make gthr-default.h if we have a thread file.
8597 if test $thread_file != single; then
8598 rm -f gthr-default.h
8599 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8600 gthread_flags=-DHAVE_GTHR_DEFAULT
8604 # Find out what GC implementation we want, or may, use.
8605 # Check whether --with-gc or --without-gc was given.
8606 if test "${with_gc+set}" = set; then
8613 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8621 echo "Using $GGC for garbage collection."
8623 # Use the system's zlib library.
8625 zlibinc="-I\$(srcdir)/../zlib"
8626 # Check whether --with-system-zlib or --without-system-zlib was given.
8627 if test "${with_system_zlib+set}" = set; then
8628 withval="$with_system_zlib"
8638 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8639 echo "configure:8640: checking whether to enable maintainer-specific portions of Makefiles" >&5
8640 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8641 if test "${enable_maintainer_mode+set}" = set; then
8642 enableval="$enable_maintainer_mode"
8643 maintainer_mode=$enableval
8649 echo "$ac_t""$maintainer_mode" 1>&6
8651 if test "$maintainer_mode" = "yes"; then
8657 # Make empty files to contain the specs and options for each language.
8658 # Then add #include lines to for a compiler that has specs and/or options.
8664 for subdir in . $subdirs
8666 if test -f $srcdir/$subdir/lang.opt; then
8667 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
8669 if test -f $srcdir/$subdir/lang-specs.h; then
8670 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8672 if test -f $srcdir/$subdir/lang-options.h; then
8673 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8675 if test -f $srcdir/$subdir/$subdir-tree.def; then
8676 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8680 # These (without "all_") are set in each config-lang.in.
8681 # `language' must be a single word so is spelled singularly.
8686 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8687 # List of language makefile fragments.
8689 # Files for gengtype
8690 all_gtfiles="$target_gtfiles"
8691 # Files for gengtype with language
8692 all_gtfiles_files_langs=
8693 all_gtfiles_files_files=
8695 # Add the language fragments.
8696 # Languages are added via two mechanisms. Some information must be
8697 # recorded in makefile variables, these are defined in config-lang.in.
8698 # We accumulate them and plug them into the main Makefile.
8699 # The other mechanism is a set of hooks for each of the main targets
8700 # like `clean', `install', etc.
8702 language_fragments="Make-lang"
8703 language_hooks="Make-hooks"
8705 for s in .. $subdirs
8715 . ${srcdir}/$s/config-lang.in
8716 if test "x$language" = x
8718 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8721 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8722 if test -f ${srcdir}/$s/Makefile.in
8723 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8725 all_languages="$all_languages $language"
8726 if test "x$boot_language" = xyes
8728 all_boot_languages="$all_boot_languages $language"
8730 all_compilers="$all_compilers $compilers"
8731 all_stagestuff="$all_stagestuff $stagestuff"
8732 all_outputs="$all_outputs $outputs"
8733 all_gtfiles="$all_gtfiles $gtfiles"
8734 for f in .. $gtfiles
8738 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8739 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8745 # Pick up gtfiles for c
8748 . ${srcdir}/c-config-lang.in
8749 all_gtfiles="$all_gtfiles $gtfiles"
8750 for f in .. $gtfiles
8754 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8755 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8760 for language in .. $all_languages
8762 if test $language != ".."
8764 check_languages="$check_languages check-$language"
8768 # Since we can't use `::' targets, we link each language in
8769 # with a set of hooks, reached indirectly via lang.${target}.
8773 target_list="all.build all.cross start.encap rest.encap tags \
8774 info dvi generated-manpages \
8775 install-normal install-common install-info install-man \
8777 mostlyclean clean distclean extraclean maintainer-clean \
8778 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
8779 for t in $target_list
8782 for lang in .. $all_languages
8784 if test $lang != ".."; then
8788 echo "lang.$t: $x" >> Make-hooks
8793 echo "dir ." > .gdbinit
8794 echo "dir ${srcdir}" >> .gdbinit
8795 if test x$gdb_needs_out_file_path = xyes
8797 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8799 if test "x$subdirs" != x; then
8802 echo "dir ${srcdir}/$s" >> .gdbinit
8805 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8807 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8808 # absolute path for gcc_tooldir based on inserting the number of up-directory
8809 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8810 # $(libsubdir)/@(unlibsubdir) based path.
8811 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8812 # make and thus we'd get different behavior depending on where we built the
8814 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8815 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8817 # An explanation of the sed strings:
8818 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8819 # -e 's|/$||' match a trailing forward slash and eliminates it
8820 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8821 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8823 # (*) Note this pattern overwrites the first character of the string
8824 # with a forward slash if one is not already present. This is not a
8825 # problem because the exact names of the sub-directories concerned is
8826 # unimportant, just the number of them matters.
8828 # The practical upshot of these patterns is like this:
8830 # prefix exec_prefix result
8831 # ------ ----------- ------
8833 # /foo/ /foo/bar ../
8834 # /foo /foo/bar/ ../
8835 # /foo/ /foo/bar/ ../
8836 # /foo /foo/bar/ugg ../../
8839 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8844 # Find a directory in which to install a shared libgcc.
8846 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8847 if test "${enable_version_specific_runtime_libs+set}" = set; then
8848 enableval="$enable_version_specific_runtime_libs"
8853 # Check whether --with-slibdir or --without-slibdir was given.
8854 if test "${with_slibdir+set}" = set; then
8855 withval="$with_slibdir"
8856 slibdir="$with_slibdir"
8858 if test "${enable_version_specific_runtime_libs+set}" = set; then
8859 slibdir='$(libsubdir)'
8860 elif test "$host" != "$target"; then
8861 slibdir='$(build_tooldir)/lib'
8869 objdir=`${PWDCMD-pwd}`
8872 # Process the language and host/target makefile fragments.
8873 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8875 # Substitute configuration variables
8946 # Echo that links are built
8947 if test x$host = x$target
8955 if test x$host != x$build
8957 str3=" on a $build system"
8960 if test "x$str2" != x || test "x$str3" != x
8965 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8967 if test "x$str2" != x || test "x$str3" != x
8969 echo " ${str2}${str3}." 1>&2
8972 # Configure the subdirectories
8973 # AC_CONFIG_SUBDIRS($subdirs)
8975 # Create the Makefile
8976 # and configure language subdirectories
8978 cat > confcache <<\EOF
8979 # This file is a shell script that caches the results of configure
8980 # tests run on this system so they can be shared between configure
8981 # scripts and configure runs. It is not useful on other systems.
8982 # If it contains results you don't want to keep, you may remove or edit it.
8984 # By default, configure uses ./config.cache as the cache file,
8985 # creating it if it does not exist already. You can give configure
8986 # the --cache-file=FILE option to use a different cache file; that is
8987 # what configure does when it calls configure scripts in
8988 # subdirectories, so they share the cache.
8989 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8990 # config.status only pays attention to the cache file if you give it the
8991 # --recheck option to rerun configure.
8994 # The following way of writing the cache mishandles newlines in values,
8995 # but we know of no workaround that is simple, portable, and efficient.
8996 # So, don't put newlines in cache variables' values.
8997 # Ultrix sh set writes to stderr and can't be redirected directly,
8998 # and sets the high bit in the cache file unless we assign to the vars.
9000 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9002 # `set' does not quote correctly, so add quotes (double-quote substitution
9003 # turns \\\\ into \\, and sed turns \\ into \).
9005 -e "s/'/'\\\\''/g" \
9006 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9009 # `set' quotes correctly as required by POSIX, so do not add quotes.
9010 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9013 if cmp -s $cache_file confcache; then
9016 if test -w $cache_file; then
9017 echo "updating cache $cache_file"
9018 cat confcache > $cache_file
9020 echo "not updating unwritable cache $cache_file"
9025 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9027 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9028 # Let make expand exec_prefix.
9029 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9031 # Any assignment to VPATH causes Sun make to only execute
9032 # the first set of double-colon rules, so remove it if not needed.
9033 # If there is a colon in the path, we need to keep it.
9034 if test "x$srcdir" = x.; then
9035 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9038 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9040 DEFS=-DHAVE_CONFIG_H
9042 # Without the "./", some shells look in PATH for config.status.
9043 : ${CONFIG_STATUS=./config.status}
9045 echo creating $CONFIG_STATUS
9046 rm -f $CONFIG_STATUS
9047 cat > $CONFIG_STATUS <<EOF
9049 # Generated automatically by configure.
9050 # Run this file to recreate the current configuration.
9051 # This directory was configured as follows,
9052 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9054 # $0 $ac_configure_args
9056 # Compiler output produced by configure, useful for debugging
9057 # configure, is in ./config.log if it exists.
9059 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9062 case "\$ac_option" in
9063 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9064 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9065 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9066 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9067 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9069 -help | --help | --hel | --he | --h)
9070 echo "\$ac_cs_usage"; exit 0 ;;
9071 *) echo "\$ac_cs_usage"; exit 1 ;;
9075 ac_given_srcdir=$srcdir
9077 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9079 cat >> $CONFIG_STATUS <<EOF
9081 # Protect against being on the right side of a sed subst in config.status.
9082 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9083 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9087 s%@CFLAGS@%$CFLAGS%g
9088 s%@CPPFLAGS@%$CPPFLAGS%g
9089 s%@CXXFLAGS@%$CXXFLAGS%g
9090 s%@FFLAGS@%$FFLAGS%g
9092 s%@LDFLAGS@%$LDFLAGS%g
9094 s%@exec_prefix@%$exec_prefix%g
9095 s%@prefix@%$prefix%g
9096 s%@program_transform_name@%$program_transform_name%g
9097 s%@bindir@%$bindir%g
9098 s%@sbindir@%$sbindir%g
9099 s%@libexecdir@%$libexecdir%g
9100 s%@datadir@%$datadir%g
9101 s%@sysconfdir@%$sysconfdir%g
9102 s%@sharedstatedir@%$sharedstatedir%g
9103 s%@localstatedir@%$localstatedir%g
9104 s%@libdir@%$libdir%g
9105 s%@includedir@%$includedir%g
9106 s%@oldincludedir@%$oldincludedir%g
9107 s%@infodir@%$infodir%g
9108 s%@mandir@%$mandir%g
9110 s%@host_alias@%$host_alias%g
9111 s%@host_cpu@%$host_cpu%g
9112 s%@host_vendor@%$host_vendor%g
9113 s%@host_os@%$host_os%g
9114 s%@target@%$target%g
9115 s%@target_alias@%$target_alias%g
9116 s%@target_cpu@%$target_cpu%g
9117 s%@target_vendor@%$target_vendor%g
9118 s%@target_os@%$target_os%g
9120 s%@build_alias@%$build_alias%g
9121 s%@build_cpu@%$build_cpu%g
9122 s%@build_vendor@%$build_vendor%g
9123 s%@build_os@%$build_os%g
9124 s%@build_subdir@%$build_subdir%g
9125 s%@host_subdir@%$host_subdir%g
9126 s%@target_subdir@%$target_subdir%g
9128 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9129 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9131 s%@GNATBIND@%$GNATBIND%g
9133 s%@strict1_warn@%$strict1_warn%g
9134 s%@warn_cflags@%$warn_cflags%g
9135 s%@WERROR@%$WERROR%g
9136 s%@nocommon_flag@%$nocommon_flag%g
9137 s%@valgrind_path@%$valgrind_path%g
9138 s%@valgrind_path_defines@%$valgrind_path_defines%g
9139 s%@valgrind_command@%$valgrind_command%g
9140 s%@coverage_flags@%$coverage_flags%g
9141 s%@enable_multilib@%$enable_multilib%g
9142 s%@enable_shared@%$enable_shared%g
9143 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9144 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9145 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9146 s%@SET_MAKE@%$SET_MAKE%g
9150 s%@RANLIB@%$RANLIB%g
9151 s%@INSTALL@%$INSTALL%g
9152 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9153 s%@INSTALL_DATA@%$INSTALL_DATA%g
9154 s%@have_mktemp_command@%$have_mktemp_command%g
9155 s%@MAKEINFO@%$MAKEINFO%g
9156 s%@BUILD_INFO@%$BUILD_INFO%g
9157 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9158 s%@make_compare_target@%$make_compare_target%g
9161 s%@stage1_cflags@%$stage1_cflags%g
9162 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9163 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9164 s%@LDEXP_LIB@%$LDEXP_LIB%g
9165 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9166 s%@LIBICONV@%$LIBICONV%g
9167 s%@manext@%$manext%g
9168 s%@objext@%$objext%g
9169 s%@extra_modes_file@%$extra_modes_file%g
9170 s%@FORBUILD@%$FORBUILD%g
9171 s%@PACKAGE@%$PACKAGE%g
9172 s%@VERSION@%$VERSION%g
9173 s%@ALLOCA@%$ALLOCA%g
9174 s%@GLIBC21@%$GLIBC21%g
9175 s%@USE_NLS@%$USE_NLS%g
9176 s%@MSGFMT@%$MSGFMT%g
9177 s%@GMSGFMT@%$GMSGFMT%g
9178 s%@XGETTEXT@%$XGETTEXT%g
9179 s%@INTLBISON@%$INTLBISON%g
9180 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9181 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9182 s%@CATALOGS@%$CATALOGS%g
9183 s%@CATOBJEXT@%$CATOBJEXT%g
9184 s%@INTLLIBS@%$INTLLIBS%g
9185 s%@INTLDEPS@%$INTLDEPS%g
9186 s%@INTLOBJS@%$INTLOBJS%g
9188 s%@DATADIRNAME@%$DATADIRNAME%g
9189 s%@INSTOBJEXT@%$INSTOBJEXT%g
9190 s%@GENCAT@%$GENCAT%g
9191 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9192 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9195 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9196 s%@inhibit_libc@%$inhibit_libc%g
9197 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9198 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9199 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
9200 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9201 s%@STMP_FIXINC@%$STMP_FIXINC%g
9202 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9203 s%@libgcc_visibility@%$libgcc_visibility%g
9204 s%@gthread_flags@%$gthread_flags%g
9206 s%@zlibdir@%$zlibdir%g
9207 s%@zlibinc@%$zlibinc%g
9209 s%@gcc_tooldir@%$gcc_tooldir%g
9210 s%@dollar@%$dollar%g
9211 s%@slibdir@%$slibdir%g
9212 s%@objdir@%$objdir%g
9213 s%@subdirs@%$subdirs%g
9214 s%@srcdir@%$srcdir%g
9215 s%@all_boot_languages@%$all_boot_languages%g
9216 s%@all_compilers@%$all_compilers%g
9217 s%@all_gtfiles@%$all_gtfiles%g
9218 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9219 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9220 s%@all_lang_makefiles@%$all_lang_makefiles%g
9221 s%@all_languages@%$all_languages%g
9222 s%@all_stagestuff@%$all_stagestuff%g
9223 s%@build_exeext@%$build_exeext%g
9224 s%@build_install_headers_dir@%$build_install_headers_dir%g
9225 s%@build_xm_file_list@%$build_xm_file_list%g
9226 s%@build_xm_file@%$build_xm_file%g
9227 s%@build_xm_defines@%$build_xm_defines%g
9228 s%@check_languages@%$check_languages%g
9229 s%@cc_set_by_configure@%$cc_set_by_configure%g
9230 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9231 s%@cpp_install_dir@%$cpp_install_dir%g
9232 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9233 s%@dep_tmake_file@%$dep_tmake_file%g
9234 s%@extra_headers_list@%$extra_headers_list%g
9235 s%@extra_objs@%$extra_objs%g
9236 s%@extra_parts@%$extra_parts%g
9237 s%@extra_passes@%$extra_passes%g
9238 s%@extra_programs@%$extra_programs%g
9239 s%@float_h_file@%$float_h_file%g
9240 s%@gcc_config_arguments@%$gcc_config_arguments%g
9241 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9242 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9243 s%@gcc_version@%$gcc_version%g
9244 s%@gcc_version_full@%$gcc_version_full%g
9245 s%@gcc_version_trigger@%$gcc_version_trigger%g
9246 s%@host_exeext@%$host_exeext%g
9247 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9248 s%@host_xm_file_list@%$host_xm_file_list%g
9249 s%@host_xm_file@%$host_xm_file%g
9250 s%@host_xm_defines@%$host_xm_defines%g
9251 s%@out_host_hook_obj@%$out_host_hook_obj%g
9252 s%@install@%$install%g
9253 s%@lang_opt_files@%$lang_opt_files%g
9254 s%@lang_options_files@%$lang_options_files%g
9255 s%@lang_specs_files@%$lang_specs_files%g
9256 s%@lang_tree_files@%$lang_tree_files%g
9257 s%@local_prefix@%$local_prefix%g
9258 s%@md_file@%$md_file%g
9259 s%@objc_boehm_gc@%$objc_boehm_gc%g
9260 s%@out_file@%$out_file%g
9261 s%@out_object_file@%$out_object_file%g
9262 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9263 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9264 s%@symbolic_link@%$symbolic_link%g
9265 s%@thread_file@%$thread_file%g
9266 s%@tm_file_list@%$tm_file_list%g
9267 s%@tm_file@%$tm_file%g
9268 s%@tm_defines@%$tm_defines%g
9269 s%@tm_p_file_list@%$tm_p_file_list%g
9270 s%@tm_p_file@%$tm_p_file%g
9271 s%@xm_file@%$xm_file%g
9272 s%@xm_defines@%$xm_defines%g
9273 s%@c_target_objs@%$c_target_objs%g
9274 s%@cxx_target_objs@%$cxx_target_objs%g
9275 s%@target_cpu_default@%$target_cpu_default%g
9276 /@target_overrides@/r $target_overrides
9277 s%@target_overrides@%%g
9278 /@host_overrides@/r $host_overrides
9279 s%@host_overrides@%%g
9280 /@language_fragments@/r $language_fragments
9281 s%@language_fragments@%%g
9282 /@language_hooks@/r $language_hooks
9283 s%@language_hooks@%%g
9288 cat >> $CONFIG_STATUS <<\EOF
9290 # Split the substitutions into bite-sized pieces for seds with
9291 # small command number limits, like on Digital OSF/1 and HP-UX.
9292 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9293 ac_file=1 # Number of current file.
9294 ac_beg=1 # First line for current file.
9295 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9298 while $ac_more_lines; do
9299 if test $ac_beg -gt 1; then
9300 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9302 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9304 if test ! -s conftest.s$ac_file; then
9306 rm -f conftest.s$ac_file
9308 if test -z "$ac_sed_cmds"; then
9309 ac_sed_cmds="sed -f conftest.s$ac_file"
9311 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9313 ac_file=`expr $ac_file + 1`
9315 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9318 if test -z "$ac_sed_cmds"; then
9323 cat >> $CONFIG_STATUS <<EOF
9325 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9327 cat >> $CONFIG_STATUS <<\EOF
9328 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9329 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9331 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9332 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9333 *) ac_file_in="${ac_file}.in" ;;
9336 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9338 # Remove last slash and all that follows it. Not all systems have dirname.
9339 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9340 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9341 # The file is in a subdirectory.
9342 test ! -d "$ac_dir" && mkdir "$ac_dir"
9343 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9344 # A "../" for each directory in $ac_dir_suffix.
9345 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9347 ac_dir_suffix= ac_dots=
9350 case "$ac_given_srcdir" in
9352 if test -z "$ac_dots"; then top_srcdir=.
9353 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9354 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9356 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9357 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9361 echo creating "$ac_file"
9363 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9365 *Makefile*) ac_comsub="1i\\
9366 # $configure_input" ;;
9370 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9372 s%@configure_input@%$configure_input%g
9373 s%@srcdir@%$srcdir%g
9374 s%@top_srcdir@%$top_srcdir%g
9375 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9379 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9380 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9382 # ac_d sets the value in "#define NAME VALUE" lines.
9383 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9384 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9387 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9388 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9389 ac_uB='\([ ]\)%\1#\2define\3'
9392 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9393 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9394 ac_eB='$%\1#\2define\3'
9398 if test "${CONFIG_HEADERS+set}" != set; then
9400 cat >> $CONFIG_STATUS <<EOF
9401 CONFIG_HEADERS="auto-host.h:config.in"
9403 cat >> $CONFIG_STATUS <<\EOF
9405 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9406 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9408 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9409 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9410 *) ac_file_in="${ac_file}.in" ;;
9413 echo creating $ac_file
9415 rm -f conftest.frag conftest.in conftest.out
9416 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9417 cat $ac_file_inputs > conftest.in
9421 # Transform confdefs.h into a sed script conftest.vals that substitutes
9422 # the proper values into config.h.in to produce config.h. And first:
9423 # Protect against being on the right side of a sed subst in config.status.
9424 # Protect against being in an unquoted here document in config.status.
9426 cat > conftest.hdr <<\EOF
9429 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9433 sed -n -f conftest.hdr confdefs.h > conftest.vals
9436 # This sed command replaces #undef with comments. This is necessary, for
9437 # example, in the case of _POSIX_SOURCE, which is predefined and required
9438 # on some systems where configure will not decide to define it.
9439 cat >> conftest.vals <<\EOF
9440 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9443 # Break up conftest.vals because some shells have a limit on
9444 # the size of here documents, and old seds have small limits too.
9449 ac_lines=`grep -c . conftest.vals`
9450 # grep -c gives empty output for an empty file on some AIX systems.
9451 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9452 # Write a limited-size here document to conftest.frag.
9453 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9454 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9456 sed -f conftest.frag conftest.in > conftest.out
9458 mv conftest.out conftest.in
9460 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9462 mv conftest.tail conftest.vals
9466 cat >> $CONFIG_STATUS <<\EOF
9467 rm -f conftest.frag conftest.h
9468 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9469 cat conftest.in >> conftest.h
9471 if cmp -s $ac_file conftest.h 2>/dev/null; then
9472 echo "$ac_file is unchanged"
9475 # Remove last slash and all that follows it. Not all systems have dirname.
9476 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9477 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9478 # The file is in a subdirectory.
9479 test ! -d "$ac_dir" && mkdir "$ac_dir"
9482 mv conftest.h $ac_file
9487 cat >> $CONFIG_STATUS <<EOF
9490 symbolic_link='$symbolic_link'
9493 cat >> $CONFIG_STATUS <<\EOF
9494 for ac_file in $CONFIG_FILES; do
9495 # Support "outfile[:infile[:infile...]]"
9497 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9499 # PO directories have a Makefile.in generated from Makefile.in.in.
9500 case "$ac_file" in */Makefile.in)
9501 # Adjust a relative srcdir.
9502 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9503 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9504 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9505 # In autoconf-2.13 it is called $ac_given_srcdir.
9506 # In autoconf-2.50 it is called $srcdir.
9507 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9508 case "$ac_given_srcdir" in
9509 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9510 /*) top_srcdir="$ac_given_srcdir" ;;
9511 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9513 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9514 rm -f "$ac_dir/POTFILES"
9515 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9516 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9517 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9518 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9524 case x$CONFIG_HEADERS in
9525 xauto-host.h:config.in)
9528 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9529 # bootstrapping and the installation procedure can still use
9530 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9531 # FLAGS_TO_PASS has been modified to solve the problem there.
9532 # This is virtually a duplicate of what happens in configure.lang; we do
9533 # an extra check to make sure this only happens if ln -s can be used.
9534 if test "$symbolic_link" = "ln -s"; then
9535 for d in .. ${subdirs} fixinc ; do
9536 if test $d != ..; then
9537 STARTDIR=`${PWDCMD-pwd}`
9539 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
9542 $symbolic_link ../$t $t 2>/dev/null
9548 # Avoid having to add intl to our include paths.
9549 if test -f intl/libintl.h; then
9550 echo creating libintl.h
9551 echo '#include "intl/libintl.h"' >libintl.h
9556 chmod +x $CONFIG_STATUS
9557 rm -fr confdefs* $ac_clean_files
9558 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1