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-gnu-ld arrange to work with GNU ld."
17 --with-ld arrange to use the specified ld (full pathname)"
19 --with-gnu-as arrange to work with GNU as"
21 --with-as arrange to use the specified as (full pathname)"
23 --with-stabs arrange to use stabs instead of host debug format"
25 --with-elf arrange to use ELF instead of host debug format"
27 --with-local-prefix=DIR specifies directory to put local include"
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files"
32 --enable-multilib enable library support for multiple ABIs"
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-cpp-install-dir=DIR
48 install the user visible C preprocessor in DIR
49 (relative to PREFIX) as well as PREFIX/bin"
51 --enable-__cxa_atexit enable __cxa_atexit for C++"
53 --enable-c-mbchar enable multibyte characters for C and C++"
55 --enable-threads enable thread usage for target GCC
56 --enable-threads=LIB use LIB thread package for target GCC"
58 --enable-objc-gc enable the use of Boehm's garbage collector with
59 the GNU Objective-C runtime"
61 --with-dwarf2 force the default debug format to be DWARF 2"
63 --disable-shared don't provide a shared libgcc"
65 --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
67 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
69 --enable-initfini-array use .init_array/.fini_array sections"
71 --enable-sjlj-exceptions
72 arrange to use setjmp/longjmp exception handling"
74 --enable-libunwind-exceptions force use libunwind for exceptions"
76 --enable-nls use Native Language Support (default)"
78 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
80 --disable-nls do not use Native Language Support"
82 --with-included-gettext use the GNU gettext library included here"
84 --disable-win32-registry
85 disable lookup of installation paths in the
86 Registry on Windows hosts
87 --enable-win32-registry enable registry lookup (default)
88 --enable-win32-registry=KEY
89 use KEY instead of GCC version as the last portion
92 --with-gc={simple,page} choose the garbage collection mechanism to use
95 --with-system-zlib use installed libz"
97 --enable-maintainer-mode
98 enable make rules and dependencies not useful
99 (and sometimes confusing) to the casual installer"
101 --enable-version-specific-runtime-libs
102 specify that runtime libraries should be
103 installed in a compiler-specific directory"
105 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
107 # Initialize some variables set by options.
108 # The variables have the same names as the options, with
109 # dashes changed to underlines.
111 cache_file=./config.cache
120 program_transform_name=s,x,x,
128 bindir='${exec_prefix}/bin'
129 sbindir='${exec_prefix}/sbin'
130 libexecdir='${exec_prefix}/libexec'
131 datadir='${prefix}/share'
132 sysconfdir='${prefix}/etc'
133 sharedstatedir='${prefix}/com'
134 localstatedir='${prefix}/var'
135 libdir='${exec_prefix}/lib'
136 includedir='${prefix}/include'
137 oldincludedir='/usr/include'
138 infodir='${prefix}/info'
139 mandir='${prefix}/man'
141 # Initialize some other variables.
144 SHELL=${CONFIG_SHELL-/bin/sh}
145 # Maximum number of lines to put in a shell here document.
152 # If the previous option needs an argument, assign it.
153 if test -n "$ac_prev"; then
154 eval "$ac_prev=\$ac_option"
160 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
164 # Accept the important Cygnus configure options, so we can diagnose typos.
168 -bindir | --bindir | --bindi | --bind | --bin | --bi)
170 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
171 bindir="$ac_optarg" ;;
173 -build | --build | --buil | --bui | --bu)
175 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
176 build="$ac_optarg" ;;
178 -cache-file | --cache-file | --cache-fil | --cache-fi \
179 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
180 ac_prev=cache_file ;;
181 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
182 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
183 cache_file="$ac_optarg" ;;
185 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
187 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
189 datadir="$ac_optarg" ;;
191 -disable-* | --disable-*)
192 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
193 # Reject names that are not valid shell variable names.
194 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
195 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198 eval "enable_${ac_feature}=no" ;;
200 -enable-* | --enable-*)
201 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
202 # Reject names that are not valid shell variable names.
203 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
204 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
211 eval "enable_${ac_feature}='$ac_optarg'" ;;
213 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
214 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
215 | --exec | --exe | --ex)
216 ac_prev=exec_prefix ;;
217 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
218 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
219 | --exec=* | --exe=* | --ex=*)
220 exec_prefix="$ac_optarg" ;;
222 -gas | --gas | --ga | --g)
223 # Obsolete; use --with-gas.
226 -help | --help | --hel | --he)
227 # Omit some internal or obsolete options to make the list less imposing.
228 # This message is too long to be a string in the A/UX 3.1 sh.
230 Usage: configure [options] [host]
231 Options: [defaults in brackets after descriptions]
233 --cache-file=FILE cache test results in FILE
234 --help print this message
235 --no-create do not create output files
236 --quiet, --silent do not print \`checking...' messages
237 --version print the version of autoconf that created configure
238 Directory and file names:
239 --prefix=PREFIX install architecture-independent files in PREFIX
241 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
243 --bindir=DIR user executables in DIR [EPREFIX/bin]
244 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
245 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
246 --datadir=DIR read-only architecture-independent data in DIR
248 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
249 --sharedstatedir=DIR modifiable architecture-independent data in DIR
251 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
252 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
253 --includedir=DIR C header files in DIR [PREFIX/include]
254 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
255 --infodir=DIR info documentation in DIR [PREFIX/info]
256 --mandir=DIR man documentation in DIR [PREFIX/man]
257 --srcdir=DIR find the sources in DIR [configure dir or ..]
258 --program-prefix=PREFIX prepend PREFIX to installed program names
259 --program-suffix=SUFFIX append SUFFIX to installed program names
260 --program-transform-name=PROGRAM
261 run sed PROGRAM on installed program names
265 --build=BUILD configure for building on BUILD [BUILD=HOST]
266 --host=HOST configure for HOST [guessed]
267 --target=TARGET configure for TARGET [TARGET=HOST]
268 Features and packages:
269 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
270 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
271 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
272 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
273 --x-includes=DIR X include files are in DIR
274 --x-libraries=DIR X library files are in DIR
276 if test -n "$ac_help"; then
277 echo "--enable and --with options recognized:$ac_help"
281 -host | --host | --hos | --ho)
283 -host=* | --host=* | --hos=* | --ho=*)
286 -includedir | --includedir | --includedi | --included | --include \
287 | --includ | --inclu | --incl | --inc)
288 ac_prev=includedir ;;
289 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
290 | --includ=* | --inclu=* | --incl=* | --inc=*)
291 includedir="$ac_optarg" ;;
293 -infodir | --infodir | --infodi | --infod | --info | --inf)
295 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
296 infodir="$ac_optarg" ;;
298 -libdir | --libdir | --libdi | --libd)
300 -libdir=* | --libdir=* | --libdi=* | --libd=*)
301 libdir="$ac_optarg" ;;
303 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
304 | --libexe | --libex | --libe)
305 ac_prev=libexecdir ;;
306 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
307 | --libexe=* | --libex=* | --libe=*)
308 libexecdir="$ac_optarg" ;;
310 -localstatedir | --localstatedir | --localstatedi | --localstated \
311 | --localstate | --localstat | --localsta | --localst \
312 | --locals | --local | --loca | --loc | --lo)
313 ac_prev=localstatedir ;;
314 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
315 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
316 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
317 localstatedir="$ac_optarg" ;;
319 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
322 mandir="$ac_optarg" ;;
325 # Obsolete; use --without-fp.
328 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
332 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
333 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
337 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
338 | --oldin | --oldi | --old | --ol | --o)
339 ac_prev=oldincludedir ;;
340 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
341 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
342 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
343 oldincludedir="$ac_optarg" ;;
345 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
348 prefix="$ac_optarg" ;;
350 -program-prefix | --program-prefix | --program-prefi | --program-pref \
351 | --program-pre | --program-pr | --program-p)
352 ac_prev=program_prefix ;;
353 -program-prefix=* | --program-prefix=* | --program-prefi=* \
354 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
355 program_prefix="$ac_optarg" ;;
357 -program-suffix | --program-suffix | --program-suffi | --program-suff \
358 | --program-suf | --program-su | --program-s)
359 ac_prev=program_suffix ;;
360 -program-suffix=* | --program-suffix=* | --program-suffi=* \
361 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
362 program_suffix="$ac_optarg" ;;
364 -program-transform-name | --program-transform-name \
365 | --program-transform-nam | --program-transform-na \
366 | --program-transform-n | --program-transform- \
367 | --program-transform | --program-transfor \
368 | --program-transfo | --program-transf \
369 | --program-trans | --program-tran \
370 | --progr-tra | --program-tr | --program-t)
371 ac_prev=program_transform_name ;;
372 -program-transform-name=* | --program-transform-name=* \
373 | --program-transform-nam=* | --program-transform-na=* \
374 | --program-transform-n=* | --program-transform-=* \
375 | --program-transform=* | --program-transfor=* \
376 | --program-transfo=* | --program-transf=* \
377 | --program-trans=* | --program-tran=* \
378 | --progr-tra=* | --program-tr=* | --program-t=*)
379 program_transform_name="$ac_optarg" ;;
381 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
382 | -silent | --silent | --silen | --sile | --sil)
385 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389 sbindir="$ac_optarg" ;;
391 -sharedstatedir | --sharedstatedir | --sharedstatedi \
392 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
393 | --sharedst | --shareds | --shared | --share | --shar \
395 ac_prev=sharedstatedir ;;
396 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
397 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
398 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400 sharedstatedir="$ac_optarg" ;;
402 -site | --site | --sit)
404 -site=* | --site=* | --sit=*)
407 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
410 srcdir="$ac_optarg" ;;
412 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
413 | --syscon | --sysco | --sysc | --sys | --sy)
414 ac_prev=sysconfdir ;;
415 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
416 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
417 sysconfdir="$ac_optarg" ;;
419 -target | --target | --targe | --targ | --tar | --ta | --t)
421 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
422 target="$ac_optarg" ;;
424 -v | -verbose | --verbose | --verbos | --verbo | --verb)
427 -version | --version | --versio | --versi | --vers)
428 echo "configure generated by autoconf version 2.13"
432 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
442 eval "with_${ac_package}='$ac_optarg'" ;;
444 -without-* | --without-*)
445 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
446 # Reject names that are not valid shell variable names.
447 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
448 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450 ac_package=`echo $ac_package| sed 's/-/_/g'`
451 eval "with_${ac_package}=no" ;;
454 # Obsolete; use --with-x.
457 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458 | --x-incl | --x-inc | --x-in | --x-i)
459 ac_prev=x_includes ;;
460 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462 x_includes="$ac_optarg" ;;
464 -x-libraries | --x-libraries | --x-librarie | --x-librari \
465 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466 ac_prev=x_libraries ;;
467 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469 x_libraries="$ac_optarg" ;;
471 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
475 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
476 echo "configure: warning: $ac_option: invalid host type" 1>&2
478 if test "x$nonopt" != xNONE; then
479 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
487 if test -n "$ac_prev"; then
488 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
491 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493 # File descriptor usage:
496 # 2 errors and warnings
497 # 3 some systems may open it to /dev/tty
498 # 4 used on the Kubota Titan
499 # 6 checking for... messages and results
500 # 5 compiler messages saved in config.log
501 if test "$silent" = yes; then
509 This file contains any messages produced by compilers while
510 running configure, to aid debugging if configure makes a mistake.
513 # Strip out --no-create and --no-recursion so they do not pile up.
514 # Also quote any args containing shell metacharacters.
519 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
520 | --no-cr | --no-c) ;;
521 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
522 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
523 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
524 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
525 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
530 # Only set these to C if already set. These must not be set unconditionally
531 # because not all systems understand e.g. LANG=C (notably SCO).
532 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
533 # Non-C LC_CTYPE values break the ctype check.
534 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
535 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
536 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
537 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
539 # confdefs.h avoids OS command line length limits that DEFS can exceed.
540 rm -rf conftest* confdefs.h
541 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
544 # A filename unique to this package, relative to the directory that
545 # configure is in, which we can look for to find out if srcdir is correct.
546 ac_unique_file=tree.c
548 # Find the source files, if location was not specified.
549 if test -z "$srcdir"; then
550 ac_srcdir_defaulted=yes
551 # Try the directory containing this script, then its parent.
553 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
554 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556 if test ! -r $srcdir/$ac_unique_file; then
560 ac_srcdir_defaulted=no
562 if test ! -r $srcdir/$ac_unique_file; then
563 if test "$ac_srcdir_defaulted" = yes; then
564 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
566 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
569 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571 # Prefer explicitly selected file to automatically selected ones.
572 if test -z "$CONFIG_SITE"; then
573 if test "x$prefix" != xNONE; then
574 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
576 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
579 for ac_site_file in $CONFIG_SITE; do
580 if test -r "$ac_site_file"; then
581 echo "loading site script $ac_site_file"
586 if test -r "$cache_file"; then
587 echo "loading cache $cache_file"
590 echo "creating cache $cache_file"
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
599 cross_compiling=$ac_cv_prog_cc_cross
603 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
604 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
605 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
612 ac_n= ac_c='\c' ac_t=
620 symbolic_link='ln -s'
623 # Check for bogus environment variables.
624 # Test if LIBRARY_PATH contains the notation for the current directory
625 # since this would lead to problems installing/building glibc.
626 # LIBRARY_PATH contains the current directory if one of the following
628 # - one of the terminals (":" and ";") is the first or last sign
629 # - two terminals occur directly after each other
630 # - the path contains an element with a dot in it
631 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
632 echo "configure:633: checking LIBRARY_PATH variable" >&5
633 case ${LIBRARY_PATH} in
634 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
635 library_path_setting="contains current directory"
638 library_path_setting="ok"
641 echo "$ac_t""$library_path_setting" 1>&6
642 if test "$library_path_setting" != "ok"; then
643 { echo "configure: error:
644 *** LIBRARY_PATH shouldn't contain the current directory when
645 *** building gcc. Please change the environment variable
646 *** and run configure again." 1>&2; exit 1; }
649 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
650 # since this would lead to problems installing/building glibc.
651 # GCC_EXEC_PREFIX contains the current directory if one of the following
653 # - one of the terminals (":" and ";") is the first or last sign
654 # - two terminals occur directly after each other
655 # - the path contains an element with a dot in it
656 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
657 echo "configure:658: checking GCC_EXEC_PREFIX variable" >&5
658 case ${GCC_EXEC_PREFIX} in
659 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
660 gcc_exec_prefix_setting="contains current directory"
663 gcc_exec_prefix_setting="ok"
666 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
667 if test "$gcc_exec_prefix_setting" != "ok"; then
668 { echo "configure: error:
669 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
670 *** building gcc. Please change the environment variable
671 *** and run configure again." 1>&2; exit 1; }
674 # Check for additional parameters
677 # Check whether --with-gnu-ld or --without-gnu-ld was given.
678 if test "${with_gnu_ld+set}" = set; then
679 withval="$with_gnu_ld"
680 gnu_ld_flag="$with_gnu_ld"
686 # With pre-defined ld
687 # Check whether --with-ld or --without-ld was given.
688 if test "${with_ld+set}" = set; then
690 DEFAULT_LINKER="$with_ld"
693 if test x"${DEFAULT_LINKER+set}" = x"set"; then
694 if test ! -x "$DEFAULT_LINKER"; then
695 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
696 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
699 cat >> confdefs.h <<EOF
700 #define DEFAULT_LINKER "$DEFAULT_LINKER"
706 # Check whether --with-gnu-as or --without-gnu-as was given.
707 if test "${with_gnu_as+set}" = set; then
708 withval="$with_gnu_as"
709 gas_flag="$with_gnu_as"
715 # Check whether --with-as or --without-as was given.
716 if test "${with_as+set}" = set; then
718 DEFAULT_ASSEMBLER="$with_as"
721 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
722 if test ! -x "$DEFAULT_ASSEMBLER"; then
723 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
724 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
727 cat >> confdefs.h <<EOF
728 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
734 # Check whether --with-stabs or --without-stabs was given.
735 if test "${with_stabs+set}" = set; then
736 withval="$with_stabs"
744 # Check whether --with-elf or --without-elf was given.
745 if test "${with_elf+set}" = set; then
753 # Specify the local prefix
755 # Check whether --with-local-prefix or --without-local-prefix was given.
756 if test "${with_local_prefix+set}" = set; then
757 withval="$with_local_prefix"
759 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
761 *) local_prefix=$with_local_prefix ;;
766 # Default local prefix if it is empty
767 if test x$local_prefix = x; then
768 local_prefix=/usr/local
771 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
772 # passed in by the toplevel make and thus we'd get different behavior
773 # depending on where we built the sources.
775 # Specify the g++ header file directory
776 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
777 if test "${with_gxx_include_dir+set}" = set; then
778 withval="$with_gxx_include_dir"
780 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
782 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
787 if test x${gcc_gxx_include_dir} = x; then
788 if test x${enable_version_specific_runtime_libs} = xyes; then
789 gcc_gxx_include_dir='${libsubdir}/include/c++'
791 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
792 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
796 # Determine the host, build, and target systems
798 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
799 if test -f $ac_dir/install-sh; then
801 ac_install_sh="$ac_aux_dir/install-sh -c"
803 elif test -f $ac_dir/install.sh; then
805 ac_install_sh="$ac_aux_dir/install.sh -c"
809 if test -z "$ac_aux_dir"; then
810 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
812 ac_config_guess=$ac_aux_dir/config.guess
813 ac_config_sub=$ac_aux_dir/config.sub
814 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
817 # Do some error checking and defaulting for the host and target type.
819 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
822 # 1. You are not allowed to specify --host, --target, and nonopt at the
824 # 2. Host defaults to nonopt.
825 # 3. If nonopt is not specified, then host defaults to the current host,
826 # as determined by config.guess.
827 # 4. Target and build default to nonopt.
828 # 5. If nonopt is not specified, then target and build default to host.
830 # The aliases save the names the user supplied, while $host etc.
831 # will get canonicalized.
832 case $host---$target---$nonopt in
833 NONE---*---* | *---NONE---* | *---*---NONE) ;;
834 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
838 # Make sure we can run config.sub.
839 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
840 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
843 echo $ac_n "checking host system type""... $ac_c" 1>&6
844 echo "configure:845: checking host system type" >&5
847 case "$host_alias" in
851 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
852 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
854 *) host_alias=$nonopt ;;
858 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
859 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
860 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
861 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
862 echo "$ac_t""$host" 1>&6
864 echo $ac_n "checking target system type""... $ac_c" 1>&6
865 echo "configure:866: checking target system type" >&5
868 case "$target_alias" in
871 NONE) target_alias=$host_alias ;;
872 *) target_alias=$nonopt ;;
876 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
877 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
878 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
879 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
880 echo "$ac_t""$target" 1>&6
882 echo $ac_n "checking build system type""... $ac_c" 1>&6
883 echo "configure:884: checking build system type" >&5
886 case "$build_alias" in
889 NONE) build_alias=$host_alias ;;
890 *) build_alias=$nonopt ;;
894 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
895 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
896 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
897 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
898 echo "$ac_t""$build" 1>&6
900 test "$host_alias" != "$target_alias" &&
901 test "$program_prefix$program_suffix$program_transform_name" = \
903 program_prefix=${target_alias}-
906 # Set program_transform_name
907 if test "$program_transform_name" = s,x,x,; then
908 program_transform_name=
910 # Double any \ or $. echo might interpret backslashes.
911 cat <<\EOF_SED > conftestsed
912 s,\\,\\\\,g; s,\$,$$,g
914 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
917 test "$program_prefix" != NONE &&
918 program_transform_name="s,^,${program_prefix},; $program_transform_name"
919 # Use a double $ so make ignores it.
920 test "$program_suffix" != NONE &&
921 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
923 # sed with no file args requires a program.
924 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
927 # Find the native compiler
928 # Extract the first word of "gcc", so it can be a program name with args.
929 set dummy gcc; ac_word=$2
930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931 echo "configure:932: checking for $ac_word" >&5
932 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
933 echo $ac_n "(cached) $ac_c" 1>&6
935 if test -n "$CC"; then
936 ac_cv_prog_CC="$CC" # Let the user override the test.
938 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
940 for ac_dir in $ac_dummy; do
941 test -z "$ac_dir" && ac_dir=.
942 if test -f $ac_dir/$ac_word; then
951 if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
954 echo "$ac_t""no" 1>&6
957 if test -z "$CC"; then
958 # Extract the first word of "cc", so it can be a program name with args.
959 set dummy cc; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
965 if test -n "$CC"; then
966 ac_cv_prog_CC="$CC" # Let the user override the test.
968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
971 for ac_dir in $ac_dummy; do
972 test -z "$ac_dir" && ac_dir=.
973 if test -f $ac_dir/$ac_word; then
974 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
983 if test $ac_prog_rejected = yes; then
984 # We found a bogon in the path, so make sure we never use it.
985 set dummy $ac_cv_prog_CC
987 if test $# -gt 0; then
988 # We chose a different compiler from the bogus one.
989 # However, it has the same basename, so the bogon will be chosen
990 # first if we set CC to just the basename; use the full file name.
992 set dummy "$ac_dir/$ac_word" "$@"
1000 if test -n "$CC"; then
1001 echo "$ac_t""$CC" 1>&6
1003 echo "$ac_t""no" 1>&6
1006 if test -z "$CC"; then
1007 case "`uname -s`" in
1009 # Extract the first word of "cl", so it can be a program name with args.
1010 set dummy cl; ac_word=$2
1011 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1012 echo "configure:1013: checking for $ac_word" >&5
1013 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
1016 if test -n "$CC"; then
1017 ac_cv_prog_CC="$CC" # Let the user override the test.
1019 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1021 for ac_dir in $ac_dummy; do
1022 test -z "$ac_dir" && ac_dir=.
1023 if test -f $ac_dir/$ac_word; then
1032 if test -n "$CC"; then
1033 echo "$ac_t""$CC" 1>&6
1035 echo "$ac_t""no" 1>&6
1040 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1043 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1047 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1048 ac_cpp='$CPP $CPPFLAGS'
1049 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1050 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1051 cross_compiling=$ac_cv_prog_cc_cross
1053 cat > conftest.$ac_ext << EOF
1055 #line 1056 "configure"
1056 #include "confdefs.h"
1060 if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1061 ac_cv_prog_cc_works=yes
1062 # If we can't run a trivial program, we are probably using a cross compiler.
1063 if (./conftest; exit) 2>/dev/null; then
1064 ac_cv_prog_cc_cross=no
1066 ac_cv_prog_cc_cross=yes
1069 echo "configure: failed program was:" >&5
1070 cat conftest.$ac_ext >&5
1071 ac_cv_prog_cc_works=no
1075 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1076 ac_cpp='$CPP $CPPFLAGS'
1077 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1078 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1079 cross_compiling=$ac_cv_prog_cc_cross
1081 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1082 if test $ac_cv_prog_cc_works = no; then
1083 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1085 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1086 echo "configure:1087: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1087 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1088 cross_compiling=$ac_cv_prog_cc_cross
1090 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether we are using GNU C" >&5
1092 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1093 echo $ac_n "(cached) $ac_c" 1>&6
1095 cat > conftest.c <<EOF
1100 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1107 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1109 if test $ac_cv_prog_gcc = yes; then
1115 ac_test_CFLAGS="${CFLAGS+set}"
1116 ac_save_CFLAGS="$CFLAGS"
1118 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1119 echo "configure:1120: checking whether ${CC-cc} accepts -g" >&5
1120 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1121 echo $ac_n "(cached) $ac_c" 1>&6
1123 echo 'void f(){}' > conftest.c
1124 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1133 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1134 if test "$ac_test_CFLAGS" = set; then
1135 CFLAGS="$ac_save_CFLAGS"
1136 elif test $ac_cv_prog_cc_g = yes; then
1137 if test "$GCC" = yes; then
1143 if test "$GCC" = yes; then
1150 if test "x$CC" != xcc; then
1151 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1152 echo "configure:1153: checking whether $CC and cc understand -c and -o together" >&5
1154 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1155 echo "configure:1156: checking whether cc understands -c and -o together" >&5
1157 set dummy $CC; ac_cc="`echo $2 |
1158 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1159 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1162 echo 'foo(){}' > conftest.c
1163 # Make sure it works both with $CC and with simple cc.
1164 # We do the test twice because some compilers refuse to overwrite an
1165 # existing .o file with -o, though they will create one.
1166 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1167 if { (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1168 test -f conftest.o && { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1170 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1171 if test "x$CC" != xcc; then
1172 # Test first that cc exists at all.
1173 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1174 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1175 if { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1176 test -f conftest.o && { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1181 # cc exists but doesn't like -o.
1182 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1187 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1192 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1193 echo "$ac_t""yes" 1>&6
1195 echo "$ac_t""no" 1>&6
1196 cat >> confdefs.h <<\EOF
1197 #define NO_MINUS_C_MINUS_O 1
1202 # autoconf is lame and doesn't give us any substitution variable for this.
1203 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1204 NO_MINUS_C_MINUS_O=yes
1206 OUTPUT_OPTION='-o $@'
1211 # See if GNAT has been installed
1212 if test $host != $build; then
1213 ac_tool_prefix=${host_alias}-
1219 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1220 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1221 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1222 echo "configure:1223: checking for $ac_word" >&5
1223 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1226 if test -n "$GNATBIND"; then
1227 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1229 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1231 for ac_dir in $ac_dummy; do
1232 test -z "$ac_dir" && ac_dir=.
1233 if test -f $ac_dir/$ac_word; then
1234 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1241 GNATBIND="$ac_cv_prog_GNATBIND"
1242 if test -n "$GNATBIND"; then
1243 echo "$ac_t""$GNATBIND" 1>&6
1245 echo "$ac_t""no" 1>&6
1249 if test -z "$ac_cv_prog_GNATBIND"; then
1250 if test -n "$ac_tool_prefix"; then
1251 # Extract the first word of "gnatbind", so it can be a program name with args.
1252 set dummy gnatbind; ac_word=$2
1253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1254 echo "configure:1255: checking for $ac_word" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1258 if test -n "$GNATBIND"; then
1259 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_GNATBIND="gnatbind"
1271 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1274 GNATBIND="$ac_cv_prog_GNATBIND"
1275 if test -n "$GNATBIND"; then
1276 echo "$ac_t""$GNATBIND" 1>&6
1278 echo "$ac_t""no" 1>&6
1286 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1287 echo "configure:1288: checking for compiler driver that understands Ada" >&5
1288 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1291 cat >conftest.adb <<EOF
1292 procedure conftest is begin null; end conftest;
1295 # Have to do ac_tool_prefix and user overrides by hand.
1296 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1297 ${ac_tool_prefix}gcc gcc \
1298 ${ac_tool_prefix}cc cc \
1299 ${ac_tool_prefix}gnatgcc gnatgcc \
1300 ${ac_tool_prefix}gnatcc gnatcc \
1301 ${ac_tool_prefix}adagcc adagcc \
1302 ${ac_tool_prefix}adacc adacc ; do
1303 # There is a bug in all released versions of GCC which causes the
1304 # driver to exit successfully when the appropriate language module
1305 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1306 # Therefore we must check for the error message as well as an
1307 # unsuccessful exit.
1308 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1309 if test x"$errors" = x; then
1310 gcc_cv_prog_adac=$cand
1317 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1318 ADAC=$gcc_cv_prog_adac
1321 if test x$GNATBIND != xno && test x$ADAC != xno; then
1328 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1329 echo "configure:1330: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1330 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1331 echo $ac_n "(cached) $ac_c" 1>&6
1333 save_CFLAGS="$CFLAGS"
1334 CFLAGS="-Wno-long-long"
1335 cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1343 if { (eval echo configure:1344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1345 ac_cv_prog_cc_no_long_long=yes
1347 echo "configure: failed program was:" >&5
1348 cat conftest.$ac_ext >&5
1350 ac_cv_prog_cc_no_long_long=no
1353 CFLAGS="$save_CFLAGS"
1356 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1358 if test x$have_gnat != xno ; then
1359 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1360 echo "configure:1361: checking whether ${ADAC} accepts -Wno-long-long" >&5
1361 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1362 echo $ac_n "(cached) $ac_c" 1>&6
1364 cat >conftest.adb <<EOF
1365 procedure conftest is begin null; end conftest;
1367 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1368 ac_cv_prog_adac_no_long_long=yes
1370 ac_cv_prog_adac_no_long_long=no
1375 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1377 ac_cv_prog_adac_no_long_long=yes
1381 if test $ac_cv_prog_cc_no_long_long = yes && \
1382 test $ac_cv_prog_adac_no_long_long = yes ; then
1383 strict1_warn="-pedantic -Wno-long-long"
1387 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1388 echo "configure:1389: checking how to run the C preprocessor" >&5
1389 # On Suns, sometimes $CPP names a directory.
1390 if test -n "$CPP" && test -d "$CPP"; then
1393 if test -z "$CPP"; then
1394 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1397 # This must be in double quotes, not single quotes, because CPP may get
1398 # substituted into the Makefile and "${CC-cc}" will confuse make.
1400 # On the NeXT, cc -E runs the code through the compiler's parser,
1401 # not just through cpp.
1402 cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1409 { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1411 if test -z "$ac_err"; then
1415 echo "configure: failed program was:" >&5
1416 cat conftest.$ac_ext >&5
1418 CPP="${CC-cc} -E -traditional-cpp"
1419 cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1426 { (eval echo configure:1427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1428 if test -z "$ac_err"; then
1432 echo "configure: failed program was:" >&5
1433 cat conftest.$ac_ext >&5
1435 CPP="${CC-cc} -nologo -E"
1436 cat > conftest.$ac_ext <<EOF
1437 #line 1438 "configure"
1438 #include "confdefs.h"
1442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1443 { (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1445 if test -z "$ac_err"; then
1449 echo "configure: failed program was:" >&5
1450 cat conftest.$ac_ext >&5
1459 ac_cv_prog_CPP="$CPP"
1461 CPP="$ac_cv_prog_CPP"
1463 ac_cv_prog_CPP="$CPP"
1465 echo "$ac_t""$CPP" 1>&6
1467 echo $ac_n "checking for inline""... $ac_c" 1>&6
1468 echo "configure:1469: checking for inline" >&5
1469 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1473 for ac_kw in inline __inline__ __inline; do
1474 cat > conftest.$ac_ext <<EOF
1475 #line 1476 "configure"
1476 #include "confdefs.h"
1482 if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484 ac_cv_c_inline=$ac_kw; break
1486 echo "configure: failed program was:" >&5
1487 cat conftest.$ac_ext >&5
1494 echo "$ac_t""$ac_cv_c_inline" 1>&6
1495 case "$ac_cv_c_inline" in
1497 no) cat >> confdefs.h <<\EOF
1501 *) cat >> confdefs.h <<EOF
1502 #define inline $ac_cv_c_inline
1507 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1508 echo "configure:1509: checking for volatile" >&5
1509 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1510 echo $ac_n "(cached) $ac_c" 1>&6
1512 cat > conftest.$ac_ext <<EOF
1513 #line 1514 "configure"
1514 #include "confdefs.h"
1520 if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1522 gcc_cv_c_volatile=yes
1524 echo "configure: failed program was:" >&5
1525 cat conftest.$ac_ext >&5
1527 gcc_cv_c_volatile=no
1532 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1533 if test $gcc_cv_c_volatile = yes ; then
1534 cat >> confdefs.h <<\EOF
1535 #define HAVE_VOLATILE 1
1541 echo $ac_n "checking for long double""... $ac_c" 1>&6
1542 echo "configure:1543: checking for long double" >&5
1543 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1546 if test "$GCC" = yes; then
1547 gcc_cv_c_long_double=yes
1549 cat > conftest.$ac_ext <<EOF
1550 #line 1551 "configure"
1551 #include "confdefs.h"
1554 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1555 long double foo = 0.0;
1556 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1557 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1560 if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1562 gcc_cv_c_long_double=yes
1564 echo "configure: failed program was:" >&5
1565 cat conftest.$ac_ext >&5
1567 gcc_cv_c_long_double=no
1573 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1574 if test $gcc_cv_c_long_double = yes; then
1575 cat >> confdefs.h <<\EOF
1576 #define HAVE_LONG_DOUBLE 1
1581 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1582 echo "configure:1583: checking for long long int" >&5
1583 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1586 cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1594 if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1596 ac_cv_c_long_long=yes
1598 echo "configure: failed program was:" >&5
1599 cat conftest.$ac_ext >&5
1601 ac_cv_c_long_long=no
1606 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1607 if test $ac_cv_c_long_long = yes; then
1608 cat >> confdefs.h <<\EOF
1609 #define HAVE_LONG_LONG 1
1613 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1614 echo "configure:1615: checking for __int64" >&5
1615 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1616 echo $ac_n "(cached) $ac_c" 1>&6
1618 cat > conftest.$ac_ext <<EOF
1619 #line 1620 "configure"
1620 #include "confdefs.h"
1626 if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1630 echo "configure: failed program was:" >&5
1631 cat conftest.$ac_ext >&5
1638 echo "$ac_t""$ac_cv_c___int64" 1>&6
1639 if test $ac_cv_c___int64 = yes; then
1640 cat >> confdefs.h <<\EOF
1641 #define HAVE___INT64 1
1646 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1647 echo "configure:1648: checking for built-in _Bool" >&5
1648 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1649 echo $ac_n "(cached) $ac_c" 1>&6
1651 cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1659 if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1663 echo "configure: failed program was:" >&5
1664 cat conftest.$ac_ext >&5
1672 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1673 if test $gcc_cv_c__bool = yes; then
1674 cat >> confdefs.h <<\EOF
1675 #define HAVE__BOOL 1
1681 # sizeof(char) is 1 by definition.
1682 echo $ac_n "checking size of short""... $ac_c" 1>&6
1683 echo "configure:1684: checking size of short" >&5
1684 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1685 echo $ac_n "(cached) $ac_c" 1>&6
1687 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1688 cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691 #include "confdefs.h"
1692 #include <sys/types.h>
1696 switch (0) case 0: case (sizeof (short) == $ac_size):;
1699 if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701 ac_cv_sizeof_short=$ac_size
1703 echo "configure: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1707 if test x$ac_cv_sizeof_short != x ; then break; fi
1712 if test x$ac_cv_sizeof_short = x ; then
1713 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1715 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1716 cat >> confdefs.h <<EOF
1717 #define SIZEOF_SHORT $ac_cv_sizeof_short
1721 echo $ac_n "checking size of int""... $ac_c" 1>&6
1722 echo "configure:1723: checking size of int" >&5
1723 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1726 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 #include "confdefs.h"
1731 #include <sys/types.h>
1735 switch (0) case 0: case (sizeof (int) == $ac_size):;
1738 if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1740 ac_cv_sizeof_int=$ac_size
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1746 if test x$ac_cv_sizeof_int != x ; then break; fi
1751 if test x$ac_cv_sizeof_int = x ; then
1752 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1754 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1755 cat >> confdefs.h <<EOF
1756 #define SIZEOF_INT $ac_cv_sizeof_int
1760 echo $ac_n "checking size of long""... $ac_c" 1>&6
1761 echo "configure:1762: checking size of long" >&5
1762 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1765 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 #include "confdefs.h"
1770 #include <sys/types.h>
1774 switch (0) case 0: case (sizeof (long) == $ac_size):;
1777 if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1779 ac_cv_sizeof_long=$ac_size
1781 echo "configure: failed program was:" >&5
1782 cat conftest.$ac_ext >&5
1785 if test x$ac_cv_sizeof_long != x ; then break; fi
1790 if test x$ac_cv_sizeof_long = x ; then
1791 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1793 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1794 cat >> confdefs.h <<EOF
1795 #define SIZEOF_LONG $ac_cv_sizeof_long
1799 if test $ac_cv_c_long_long = yes; then
1800 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1801 echo "configure:1802: checking size of long long" >&5
1802 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
1805 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include "confdefs.h"
1810 #include <sys/types.h>
1814 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1817 if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1819 ac_cv_sizeof_long_long=$ac_size
1821 echo "configure: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1825 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1830 if test x$ac_cv_sizeof_long_long = x ; then
1831 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1833 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1834 cat >> confdefs.h <<EOF
1835 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1840 if test $ac_cv_c___int64 = yes; then
1841 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1842 echo "configure:1843: checking size of __int64" >&5
1843 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1846 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1847 cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850 #include "confdefs.h"
1851 #include <sys/types.h>
1855 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1858 if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860 ac_cv_sizeof___int64=$ac_size
1862 echo "configure: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1866 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1871 if test x$ac_cv_sizeof___int64 = x ; then
1872 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1874 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1875 cat >> confdefs.h <<EOF
1876 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1882 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1883 echo "configure:1884: checking execution character set" >&5
1884 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1887 cat > conftest.$ac_ext <<EOF
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1891 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1896 egrep "ASCII" >/dev/null 2>&1; then
1898 ac_cv_c_charset=ASCII
1902 if test x${ac_cv_c_charset+set} != xset; then
1903 cat > conftest.$ac_ext <<EOF
1904 #line 1905 "configure"
1905 #include "confdefs.h"
1906 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1907 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1912 egrep "EBCDIC" >/dev/null 2>&1; then
1914 ac_cv_c_charset=EBCDIC
1919 if test x${ac_cv_c_charset+set} != xset; then
1920 ac_cv_c_charset=unknown
1924 echo "$ac_t""$ac_cv_c_charset" 1>&6
1925 if test $ac_cv_c_charset = unknown; then
1926 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1927 elif test $ac_cv_c_charset = EBCDIC; then
1928 cat >> confdefs.h <<\EOF
1929 #define HOST_EBCDIC 1
1934 # If the native compiler is GCC, we can enable warnings even in stage1.
1935 # That's useful for people building cross-compilers, or just running a
1938 if test "x$GCC" = "xyes"; then
1939 warn_cflags='$(GCC_WARN_CFLAGS)'
1943 # Determine whether or not multilibs are enabled.
1944 # Check whether --enable-multilib or --disable-multilib was given.
1945 if test "${enable_multilib+set}" = set; then
1946 enableval="$enable_multilib"
1954 # Enable expensive internal checks
1955 # Check whether --enable-checking or --disable-checking was given.
1956 if test "${enable_checking+set}" = set; then
1957 enableval="$enable_checking"
1961 ac_rtlflag_checking=
1963 ac_gc_always_collect=
1964 case "${enableval}" in
1965 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1966 ac_rtlflag_checking=1 ;;
1968 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1969 set fnord $enableval; shift
1974 misc) ac_checking=1 ;;
1975 tree) ac_tree_checking=1 ;;
1976 rtlflag) ac_rtlflag_checking=1 ;;
1977 rtl) ac_rtl_checking=1 ;;
1978 gc) ac_gc_checking=1 ;;
1979 gcac) ac_gc_always_collect=1 ;;
1980 valgrind) ac_checking_valgrind=1 ;;
1981 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1988 # Enable some checks by default for development versions of GCC
1989 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1993 if test x$ac_checking != x ; then
1994 cat >> confdefs.h <<\EOF
1995 #define ENABLE_CHECKING 1
1998 nocommon_flag=-fno-common
2001 if test x$ac_tree_checking != x ; then
2002 cat >> confdefs.h <<\EOF
2003 #define ENABLE_TREE_CHECKING 1
2007 if test x$ac_rtl_checking != x ; then
2008 cat >> confdefs.h <<\EOF
2009 #define ENABLE_RTL_CHECKING 1
2013 if test x$ac_rtlflag_checking != x ; then
2014 cat >> confdefs.h <<\EOF
2015 #define ENABLE_RTL_FLAG_CHECKING 1
2019 if test x$ac_gc_checking != x ; then
2020 cat >> confdefs.h <<\EOF
2021 #define ENABLE_GC_CHECKING 1
2025 if test x$ac_gc_always_collect != x ; then
2026 cat >> confdefs.h <<\EOF
2027 #define ENABLE_GC_ALWAYS_COLLECT 1
2031 valgrind_path_defines=
2033 if test x$ac_checking_valgrind != x ; then
2034 # It is certainly possible that there's valgrind but no valgrind.h.
2035 # GCC relies on making annotations so we must have both.
2036 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2037 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2038 echo "configure:2039: checking for valgrind.h" >&5
2039 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2042 cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2045 #include <valgrind.h>
2047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2048 { (eval echo configure:2049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2050 if test -z "$ac_err"; then
2052 eval "ac_cv_header_$ac_safe=yes"
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2058 eval "ac_cv_header_$ac_safe=no"
2062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2063 echo "$ac_t""yes" 1>&6
2066 echo "$ac_t""no" 1>&6
2070 # Extract the first word of "valgrind", so it can be a program name with args.
2071 set dummy valgrind; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2077 case "$valgrind_path" in
2079 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2083 for ac_dir in $PATH; do
2084 test -z "$ac_dir" && ac_dir=.
2085 if test -f $ac_dir/$ac_word; then
2086 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2087 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2096 valgrind_path="$ac_cv_path_valgrind_path"
2097 if test -n "$valgrind_path"; then
2098 echo "$ac_t""$valgrind_path" 1>&6
2100 echo "$ac_t""no" 1>&6
2103 if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
2104 { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
2106 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2107 valgrind_command="$valgrind_path -q"
2108 cat >> confdefs.h <<\EOF
2109 #define ENABLE_VALGRIND_CHECKING 1
2116 # Enable code coverage collection
2117 # Check whether --enable-coverage or --disable-coverage was given.
2118 if test "${enable_coverage+set}" = set; then
2119 enableval="$enable_coverage"
2120 case "${enableval}" in
2122 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2125 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2128 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2137 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
2138 if test "${with_cpp_install_dir+set}" = set; then
2139 withval="$with_cpp_install_dir"
2140 if test x$withval = xyes; then
2141 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
2142 elif test x$withval != xno; then
2143 cpp_install_dir=$withval
2148 # Enable __cxa_atexit for C++.
2149 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2150 if test "${enable___cxa_atexit+set}" = set; then
2151 enableval="$enable___cxa_atexit"
2155 if test x$enable___cxa_atexit = xyes; then
2156 cat >> confdefs.h <<\EOF
2157 #define DEFAULT_USE_CXA_ATEXIT 1
2162 # Enable Multibyte Characters for C/C++
2163 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2164 if test "${enable_c_mbchar+set}" = set; then
2165 enableval="$enable_c_mbchar"
2166 if test x$enable_c_mbchar != xno; then
2167 cat >> confdefs.h <<\EOF
2168 #define MULTIBYTE_CHARS 1
2176 # Pass with no value to take the default
2177 # Pass with a value to specify a thread package
2178 # Check whether --enable-threads or --disable-threads was given.
2179 if test "${enable_threads+set}" = set; then
2180 enableval="$enable_threads"
2187 enable_threads_flag=$enable_threads
2188 # Check if a valid thread package
2189 case x${enable_threads_flag} in
2192 target_thread_file='single'
2196 target_thread_file=''
2198 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2199 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
2200 target_thread_file=$enable_threads_flag
2203 echo "$enable_threads is an unknown thread package" 1>&2
2208 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2209 if test "${enable_objc_gc+set}" = set; then
2210 enableval="$enable_objc_gc"
2211 if test x$enable_objc_gc = xno; then
2221 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2222 if test "${with_dwarf2+set}" = set; then
2223 withval="$with_dwarf2"
2224 dwarf2="$with_dwarf2"
2230 # Check whether --enable-shared or --disable-shared was given.
2231 if test "${enable_shared+set}" = set; then
2232 enableval="$enable_shared"
2234 case $enable_shared in
2238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2239 for pkg in $enableval; do
2240 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2254 # Check whether --with-sysroot or --without-sysroot was given.
2255 if test "${with_sysroot+set}" = set; then
2256 withval="$with_sysroot"
2258 case ${with_sysroot} in
2259 yes) TARGET_SYSTEM_ROOT='${gcc_tooldir}/sys-root' ;;
2260 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2263 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2264 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2269 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
2270 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2278 # Stage specific cflags for build.
2282 if test x$GCC = xyes
2284 stage1_cflags="-Wa,-J"
2290 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2291 # sources; use -no-cpp-precomp to get to GNU cpp.
2292 # Apple's GCC has bugs in designated initializer handling, so disable
2294 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2299 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2300 echo "configure:2301: checking whether ${MAKE-make} sets \${MAKE}" >&5
2301 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2302 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2303 echo $ac_n "(cached) $ac_c" 1>&6
2305 cat > conftestmake <<\EOF
2307 @echo 'ac_maketemp="${MAKE}"'
2309 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2310 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2311 if test -n "$ac_maketemp"; then
2312 eval ac_cv_prog_make_${ac_make}_set=yes
2314 eval ac_cv_prog_make_${ac_make}_set=no
2318 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2319 echo "$ac_t""yes" 1>&6
2322 echo "$ac_t""no" 1>&6
2323 SET_MAKE="MAKE=${MAKE-make}"
2327 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2328 echo "configure:2329: checking whether a default assembler was specified" >&5
2329 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2330 if test x"$gas_flag" = x"no"; then
2331 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2333 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2336 echo "$ac_t""no" 1>&6
2339 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2340 echo "configure:2341: checking whether a default linker was specified" >&5
2341 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2342 if test x"$gnu_ld_flag" = x"no"; then
2343 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2345 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2348 echo "$ac_t""no" 1>&6
2351 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2352 echo "configure:2353: checking for GNU C library" >&5
2353 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #include <features.h>
2362 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2363 #error Not a GNU C library system
2367 if { (eval echo configure:2368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2371 echo "configure: failed program was:" >&5
2372 cat conftest.$ac_ext >&5
2379 echo "$ac_t""$gcc_cv_glibc" 1>&6
2380 if test $gcc_cv_glibc = yes; then
2381 cat >> confdefs.h <<\EOF
2382 #define _GNU_SOURCE 1
2387 # Find some useful tools
2388 for ac_prog in mawk gawk nawk awk
2390 # Extract the first word of "$ac_prog", so it can be a program name with args.
2391 set dummy $ac_prog; ac_word=$2
2392 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2393 echo "configure:2394: checking for $ac_word" >&5
2394 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2397 if test -n "$AWK"; then
2398 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2402 for ac_dir in $ac_dummy; do
2403 test -z "$ac_dir" && ac_dir=.
2404 if test -f $ac_dir/$ac_word; then
2405 ac_cv_prog_AWK="$ac_prog"
2412 AWK="$ac_cv_prog_AWK"
2413 if test -n "$AWK"; then
2414 echo "$ac_t""$AWK" 1>&6
2416 echo "$ac_t""no" 1>&6
2419 test -n "$AWK" && break
2422 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2423 echo "configure:2424: checking whether ln works" >&5
2424 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2425 echo $ac_n "(cached) $ac_c" 1>&6
2427 rm -f conftestdata_t
2428 echo >conftestdata_f
2429 if ln conftestdata_f conftestdata_t 2>/dev/null
2433 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2435 gcc_cv_prog_LN="ln -s"
2440 rm -f conftestdata_f conftestdata_t
2443 LN="$gcc_cv_prog_LN"
2444 if test "$gcc_cv_prog_LN" = "ln"; then
2445 echo "$ac_t""yes" 1>&6
2447 if test "$gcc_cv_prog_LN" = "ln -s"; then
2448 echo "$ac_t""no, using ln -s" 1>&6
2450 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2454 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2455 echo "configure:2456: checking whether ln -s works" >&5
2456 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2459 rm -f conftestdata_t
2460 echo >conftestdata_f
2461 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2463 gcc_cv_prog_LN_S="ln -s"
2465 if ln conftestdata_f conftestdata_t 2>/dev/null
2472 rm -f conftestdata_f conftestdata_t
2475 LN_S="$gcc_cv_prog_LN_S"
2476 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2477 echo "$ac_t""yes" 1>&6
2479 if test "$gcc_cv_prog_LN_S" = "ln"; then
2480 echo "$ac_t""no, using ln" 1>&6
2482 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2486 # Extract the first word of "ranlib", so it can be a program name with args.
2487 set dummy ranlib; ac_word=$2
2488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2489 echo "configure:2490: checking for $ac_word" >&5
2490 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2493 if test -n "$RANLIB"; then
2494 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2498 for ac_dir in $ac_dummy; do
2499 test -z "$ac_dir" && ac_dir=.
2500 if test -f $ac_dir/$ac_word; then
2501 ac_cv_prog_RANLIB="ranlib"
2506 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2509 RANLIB="$ac_cv_prog_RANLIB"
2510 if test -n "$RANLIB"; then
2511 echo "$ac_t""$RANLIB" 1>&6
2513 echo "$ac_t""no" 1>&6
2516 # Find a good install program. We prefer a C program (faster),
2517 # so one script is as good as another. But avoid the broken or
2518 # incompatible versions:
2519 # SysV /etc/install, /usr/sbin/install
2520 # SunOS /usr/etc/install
2521 # IRIX /sbin/install
2523 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2524 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2525 # ./install, which can be erroneously created by make from ./install.sh.
2526 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2527 echo "configure:2528: checking for a BSD compatible install" >&5
2528 if test -z "$INSTALL"; then
2529 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2530 echo $ac_n "(cached) $ac_c" 1>&6
2532 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2533 for ac_dir in $PATH; do
2534 # Account for people who put trailing slashes in PATH elements.
2536 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2538 # OSF1 and SCO ODT 3.0 have their own names for install.
2539 for ac_prog in ginstall scoinst install; do
2540 if test -f $ac_dir/$ac_prog; then
2541 if test $ac_prog = install &&
2542 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2543 # AIX install. It has an incompatible calling convention.
2544 # OSF/1 installbsd also uses dspmsg, but is usable.
2547 ac_cv_path_install="$ac_dir/$ac_prog -c"
2558 if test "${ac_cv_path_install+set}" = set; then
2559 INSTALL="$ac_cv_path_install"
2561 # As a last resort, use the slow shell script. We don't cache a
2562 # path for INSTALL within a source directory, because that will
2563 # break other packages using the cache if that directory is
2564 # removed, or if the path is relative.
2565 INSTALL="$ac_install_sh"
2568 echo "$ac_t""$INSTALL" 1>&6
2570 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2571 # It thinks the first close brace ends the variable substitution.
2572 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2574 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2577 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2578 echo "configure:2579: checking for ANSI C header files" >&5
2579 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2580 echo $ac_n "(cached) $ac_c" 1>&6
2582 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2591 { (eval echo configure:2592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2593 if test -z "$ac_err"; then
2595 ac_cv_header_stdc=yes
2598 echo "configure: failed program was:" >&5
2599 cat conftest.$ac_ext >&5
2601 ac_cv_header_stdc=no
2605 if test $ac_cv_header_stdc = yes; then
2606 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2613 egrep "memchr" >/dev/null 2>&1; then
2617 ac_cv_header_stdc=no
2623 if test $ac_cv_header_stdc = yes; then
2624 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2631 egrep "free" >/dev/null 2>&1; then
2635 ac_cv_header_stdc=no
2641 if test $ac_cv_header_stdc = yes; then
2642 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2643 if test "$cross_compiling" = yes; then
2646 cat > conftest.$ac_ext <<EOF
2647 #line 2648 "configure"
2648 #include "confdefs.h"
2650 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2651 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2652 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2653 int main () { int i; for (i = 0; i < 256; i++)
2654 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2658 if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2662 echo "configure: failed program was:" >&5
2663 cat conftest.$ac_ext >&5
2665 ac_cv_header_stdc=no
2673 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2674 if test $ac_cv_header_stdc = yes; then
2675 cat >> confdefs.h <<\EOF
2676 #define STDC_HEADERS 1
2681 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2682 echo "configure:2683: checking whether time.h and sys/time.h may both be included" >&5
2683 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2684 echo $ac_n "(cached) $ac_c" 1>&6
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 #include <sys/types.h>
2690 #include <sys/time.h>
2696 if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2698 ac_cv_header_time=yes
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2703 ac_cv_header_time=no
2708 echo "$ac_t""$ac_cv_header_time" 1>&6
2709 if test $ac_cv_header_time = yes; then
2710 cat >> confdefs.h <<\EOF
2711 #define TIME_WITH_SYS_TIME 1
2716 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2717 echo "configure:2718: checking for working stdbool.h" >&5
2718 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2719 echo $ac_n "(cached) $ac_c" 1>&6
2721 cat > conftest.$ac_ext <<EOF
2722 #line 2723 "configure"
2723 #include "confdefs.h"
2724 #include <stdbool.h>
2729 if { (eval echo configure:2730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731 ac_cv_header_stdbool_h=yes
2733 echo "configure: failed program was:" >&5
2734 cat conftest.$ac_ext >&5
2736 ac_cv_header_stdbool_h=no
2741 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2742 if test $ac_cv_header_stdbool_h = yes; then
2743 cat >> confdefs.h <<\EOF
2744 #define HAVE_STDBOOL_H 1
2749 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2750 echo "configure:2751: checking whether string.h and strings.h may both be included" >&5
2751 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2752 echo $ac_n "(cached) $ac_c" 1>&6
2754 cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2758 #include <strings.h>
2763 if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2765 gcc_cv_header_string=yes
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2770 gcc_cv_header_string=no
2775 echo "$ac_t""$gcc_cv_header_string" 1>&6
2776 if test $gcc_cv_header_string = yes; then
2777 cat >> confdefs.h <<\EOF
2778 #define STRING_WITH_STRINGS 1
2783 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2784 echo "configure:2785: checking for sys/wait.h that is POSIX.1 compatible" >&5
2785 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2786 echo $ac_n "(cached) $ac_c" 1>&6
2788 cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 #include <sys/types.h>
2792 #include <sys/wait.h>
2794 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2797 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2802 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2805 if { (eval echo configure:2806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2807 ac_cv_header_sys_wait_h=yes
2809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
2812 ac_cv_header_sys_wait_h=no
2817 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2818 if test $ac_cv_header_sys_wait_h = yes; then
2819 cat >> confdefs.h <<\EOF
2820 #define HAVE_SYS_WAIT_H 1
2825 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2826 fcntl.h unistd.h sys/file.h sys/time.h \
2827 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2828 direct.h malloc.h langinfo.h ldfcn.h
2830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2832 echo "configure:2833: checking for $ac_hdr" >&5
2833 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2834 echo $ac_n "(cached) $ac_c" 1>&6
2836 cat > conftest.$ac_ext <<EOF
2837 #line 2838 "configure"
2838 #include "confdefs.h"
2841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2842 { (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2844 if test -z "$ac_err"; then
2846 eval "ac_cv_header_$ac_safe=yes"
2849 echo "configure: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2852 eval "ac_cv_header_$ac_safe=no"
2856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2857 echo "$ac_t""yes" 1>&6
2858 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2859 cat >> confdefs.h <<EOF
2860 #define $ac_tr_hdr 1
2864 echo "$ac_t""no" 1>&6
2869 # Check for thread headers.
2870 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2871 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2872 echo "configure:2873: checking for thread.h" >&5
2873 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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"
2881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2882 { (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2884 if test -z "$ac_err"; then
2886 eval "ac_cv_header_$ac_safe=yes"
2889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
2892 eval "ac_cv_header_$ac_safe=no"
2896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2897 echo "$ac_t""yes" 1>&6
2900 echo "$ac_t""no" 1>&6
2904 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2905 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2906 echo "configure:2907: checking for pthread.h" >&5
2907 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2908 echo $ac_n "(cached) $ac_c" 1>&6
2910 cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2913 #include <pthread.h>
2915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2916 { (eval echo configure:2917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2918 if test -z "$ac_err"; then
2920 eval "ac_cv_header_$ac_safe=yes"
2923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
2926 eval "ac_cv_header_$ac_safe=no"
2930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2931 echo "$ac_t""yes" 1>&6
2934 echo "$ac_t""no" 1>&6
2939 # These tests can't be done till we know if we have limits.h.
2940 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2941 echo "configure:2942: checking for CHAR_BIT" >&5
2942 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2943 echo $ac_n "(cached) $ac_c" 1>&6
2945 cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #ifdef HAVE_LIMITS_H
2955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2956 egrep "found" >/dev/null 2>&1; then
2958 gcc_cv_decl_char_bit=yes
2961 gcc_cv_decl_char_bit=no
2968 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2969 if test $gcc_cv_decl_char_bit = no; then
2970 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2971 echo "configure:2972: checking number of bits in a byte" >&5
2972 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2973 echo $ac_n "(cached) $ac_c" 1>&6
2977 while test $i -lt 65; do
2978 cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2984 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2985 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2989 if { (eval echo configure:2990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2991 gcc_cv_c_nbby=$i; break
2993 echo "configure: failed program was:" >&5
2994 cat conftest.$ac_ext >&5
2999 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3003 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3004 if test $gcc_cv_c_nbby = failed; then
3005 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3007 cat >> confdefs.h <<EOF
3008 #define CHAR_BIT $gcc_cv_c_nbby
3013 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3014 echo "configure:3015: checking whether byte ordering is bigendian" >&5
3015 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3016 echo $ac_n "(cached) $ac_c" 1>&6
3018 ac_cv_c_bigendian=unknown
3019 # See if sys/param.h defines the BYTE_ORDER macro.
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3023 #include <sys/types.h>
3024 #include <sys/param.h>
3027 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3032 if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3034 # It does; now see whether it defined to BIG_ENDIAN or not.
3035 cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038 #include <sys/types.h>
3039 #include <sys/param.h>
3042 #if BYTE_ORDER != BIG_ENDIAN
3047 if { (eval echo configure:3048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3049 ac_cv_c_bigendian=yes
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3054 ac_cv_c_bigendian=no
3058 echo "configure: failed program was:" >&5
3059 cat conftest.$ac_ext >&5
3062 if test $ac_cv_c_bigendian = unknown; then
3063 if test "$cross_compiling" = yes; then
3064 echo $ac_n "cross-compiling... " 2>&6
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3070 /* Are we little or big endian? From Harbison&Steele. */
3074 char c[sizeof (long)];
3077 exit (u.c[sizeof (long) - 1] == 1);
3080 if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3082 ac_cv_c_bigendian=no
3084 echo "configure: failed program was:" >&5
3085 cat conftest.$ac_ext >&5
3087 ac_cv_c_bigendian=yes
3095 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3096 if test $ac_cv_c_bigendian = unknown; then
3097 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3098 echo "configure:3099: checking to probe for byte ordering" >&5
3100 cat >conftest.c <<EOF
3101 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3102 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3103 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3104 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3105 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3106 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3107 int main() { _ascii (); _ebcdic (); return 0; }
3109 if test -f conftest.c ; then
3110 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3111 if test `grep -l BIGenDianSyS conftest.o` ; then
3112 echo $ac_n ' big endian probe OK, ' 1>&6
3113 ac_cv_c_bigendian=yes
3115 if test `grep -l LiTTleEnDian conftest.o` ; then
3116 echo $ac_n ' little endian probe OK, ' 1>&6
3117 if test $ac_cv_c_bigendian = yes ; then
3118 ac_cv_c_bigendian=unknown;
3120 ac_cv_c_bigendian=no
3123 echo $ac_n 'guessing bigendian ... ' >&6
3126 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3128 if test $ac_cv_c_bigendian = yes; then
3129 cat >> confdefs.h <<\EOF
3130 #define WORDS_BIGENDIAN 1
3133 cat >> confdefs.h <<\EOF
3134 #define HOST_WORDS_BIG_ENDIAN 1
3141 cat >> confdefs.h <<EOF
3142 #define BYTEORDER $BYTEORDER
3145 if test $ac_cv_c_bigendian = unknown; then
3146 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3149 echo $ac_n "checking floating point format""... $ac_c" 1>&6
3150 echo "configure:3151: checking floating point format" >&5
3151 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
3152 echo $ac_n "(cached) $ac_c" 1>&6
3156 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3157 ac_cpp='$CPP $CPPFLAGS'
3158 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3159 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3160 cross_compiling=$ac_cv_prog_cc_cross
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 /* This will not work unless sizeof(double) == 8. */
3166 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
3168 /* This structure must have no internal padding. */
3169 struct possibility {
3175 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3176 struct possibility table [] =
3178 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3179 C( 3.53802595280598432000e+18), /* D__float - VAX */
3180 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3181 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3182 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3185 if { (eval echo configure:3186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3187 sed 's/^[0-7]*[ ]*/ /
3190 s/ [0-9][0-9][0-9]/./g
3196 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3197 ac_cv_c_float_format='IEEE (big-endian)'
3198 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3199 ac_cv_c_float_format='IEEE (big-endian)'
3200 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3201 ac_cv_c_float_format='IEEE (little-endian)'
3202 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3203 ac_cv_c_float_format='IEEE (little-endian)'
3204 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3205 ac_cv_c_float_format='VAX D-float'
3206 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3207 ac_cv_c_float_format='PDP-10'
3208 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3209 ac_cv_c_float_format='IBM 370 hex'
3211 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3214 { echo "configure: error: compile failed" 1>&2; exit 1; }
3218 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3219 ac_cpp='$CPP $CPPFLAGS'
3220 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3221 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3222 cross_compiling=$ac_cv_prog_cc_cross
3227 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3228 # IEEE is the default format. If the float endianness isn't the same
3229 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3230 # (which is a tristate: yes, no, default). This is only an issue with
3231 # IEEE; the other formats are only supported by a few machines each,
3232 # all with the same endianness.
3235 case $ac_cv_c_float_format in
3236 'IEEE (big-endian)' )
3237 if test $ac_cv_c_bigendian = no; then
3241 'IEEE (little-endian)' )
3242 if test $ac_cv_c_bigendian = yes; then
3247 format=VAX_FLOAT_FORMAT
3250 format=PDP10_FLOAT_FORMAT
3253 format=IBM_FLOAT_FORMAT
3256 if test -n "$format"; then
3257 cat >> confdefs.h <<EOF
3258 #define HOST_FLOAT_FORMAT $format
3262 if test -n "$fbigend"; then
3263 cat >> confdefs.h <<EOF
3264 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3270 # See if we have the mktemp command.
3271 # Extract the first word of "mktemp", so it can be a program name with args.
3272 set dummy mktemp; ac_word=$2
3273 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3274 echo "configure:3275: checking for $ac_word" >&5
3275 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3276 echo $ac_n "(cached) $ac_c" 1>&6
3278 if test -n "$have_mktemp_command"; then
3279 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3283 for ac_dir in $ac_dummy; do
3284 test -z "$ac_dir" && ac_dir=.
3285 if test -f $ac_dir/$ac_word; then
3286 ac_cv_prog_have_mktemp_command="yes"
3291 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3294 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3295 if test -n "$have_mktemp_command"; then
3296 echo "$ac_t""$have_mktemp_command" 1>&6
3298 echo "$ac_t""no" 1>&6
3302 # Do we have a single-tree copy of texinfo?
3303 if test -f $srcdir/../texinfo/Makefile.in; then
3304 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3305 gcc_cv_prog_makeinfo_modern=yes
3306 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3308 # See if makeinfo has been installed and is modern enough
3309 # that we can use it.
3310 # Extract the first word of "makeinfo", so it can be a program name with args.
3311 set dummy makeinfo; ac_word=$2
3312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_word" >&5
3314 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3315 echo $ac_n "(cached) $ac_c" 1>&6
3317 if test -n "$MAKEINFO"; then
3318 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3322 for ac_dir in $ac_dummy; do
3323 test -z "$ac_dir" && ac_dir=.
3324 if test -f $ac_dir/$ac_word; then
3325 ac_cv_prog_MAKEINFO="makeinfo"
3332 MAKEINFO="$ac_cv_prog_MAKEINFO"
3333 if test -n "$MAKEINFO"; then
3334 echo "$ac_t""$MAKEINFO" 1>&6
3336 echo "$ac_t""no" 1>&6
3339 if test -n "$MAKEINFO"; then
3340 # Found it, now check the version.
3341 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3342 echo "configure:3343: checking for modern makeinfo" >&5
3343 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3344 echo $ac_n "(cached) $ac_c" 1>&6
3346 ac_prog_version=`$MAKEINFO --version 2>&1 |
3347 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3348 echo "configure:3349: version of makeinfo is $ac_prog_version" >&5
3349 case $ac_prog_version in
3350 '') gcc_cv_prog_makeinfo_modern=no;;
3352 gcc_cv_prog_makeinfo_modern=yes;;
3353 *) gcc_cv_prog_makeinfo_modern=no;;
3358 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3360 gcc_cv_prog_makeinfo_modern=no
3365 if test $gcc_cv_prog_makeinfo_modern = no; then
3366 echo "configure: warning:
3367 *** Makeinfo is missing or too old.
3368 *** Info documentation will not be built." 1>&2
3374 # Is pod2man recent enough to regenerate manpages?
3375 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3376 echo "configure:3377: checking for recent Pod::Man" >&5
3377 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3378 echo "$ac_t""yes" 1>&6
3379 GENERATED_MANPAGES=generated-manpages
3381 echo "$ac_t""no" 1>&6
3386 if test -f $srcdir/../flex/skel.c; then
3387 FLEX='$(objdir)/../flex/flex'
3389 # Extract the first word of "flex", so it can be a program name with args.
3390 set dummy flex; ac_word=$2
3391 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3392 echo "configure:3393: checking for $ac_word" >&5
3393 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3394 echo $ac_n "(cached) $ac_c" 1>&6
3396 if test -n "$FLEX"; then
3397 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3399 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3401 for ac_dir in $ac_dummy; do
3402 test -z "$ac_dir" && ac_dir=.
3403 if test -f $ac_dir/$ac_word; then
3404 ac_cv_prog_FLEX="flex"
3409 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
3412 FLEX="$ac_cv_prog_FLEX"
3413 if test -n "$FLEX"; then
3414 echo "$ac_t""$FLEX" 1>&6
3416 echo "$ac_t""no" 1>&6
3422 # The -L switch is so bison can find its skeleton file.
3423 if test -f $srcdir/../bison/bison.simple; then
3424 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3426 # Extract the first word of "bison", so it can be a program name with args.
3427 set dummy bison; ac_word=$2
3428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3429 echo "configure:3430: checking for $ac_word" >&5
3430 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3431 echo $ac_n "(cached) $ac_c" 1>&6
3433 if test -n "$BISON"; then
3434 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3436 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3438 for ac_dir in $ac_dummy; do
3439 test -z "$ac_dir" && ac_dir=.
3440 if test -f $ac_dir/$ac_word; then
3441 ac_cv_prog_BISON="bison"
3446 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
3449 BISON="$ac_cv_prog_BISON"
3450 if test -n "$BISON"; then
3451 echo "$ac_t""$BISON" 1>&6
3453 echo "$ac_t""no" 1>&6
3458 # These libraries may be used by collect2.
3459 # We may need a special search path to get them linked.
3460 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3461 echo "configure:3462: checking for collect2 libraries" >&5
3462 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3466 for libs in '' -lld -lmld \
3467 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3468 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3471 cat > conftest.$ac_ext <<EOF
3472 #line 3473 "configure"
3473 #include "confdefs.h"
3474 /* Override any gcc2 internal prototype to avoid an error. */
3475 /* We use char because int might match the return type of a gcc2
3476 builtin and then its argument prototype would still apply. */
3483 if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3485 gcc_cv_collect2_libs="$libs"; break
3487 echo "configure: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
3493 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3496 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3497 case $gcc_cv_collect2_libs in
3499 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3503 # When building Ada code on Alpha, we need exc_resume which is usually in
3504 # -lexc. So test for it.
3508 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3509 echo "configure:3510: checking for library containing exc_resume" >&5
3510 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3511 echo $ac_n "(cached) $ac_c" 1>&6
3513 ac_func_search_save_LIBS="$LIBS"
3514 ac_cv_search_exc_resume="no"
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3518 /* Override any gcc2 internal prototype to avoid an error. */
3519 /* We use char because int might match the return type of a gcc2
3520 builtin and then its argument prototype would still apply. */
3527 if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3529 ac_cv_search_exc_resume="none required"
3531 echo "configure: failed program was:" >&5
3532 cat conftest.$ac_ext >&5
3535 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3536 LIBS="-l$i $ac_func_search_save_LIBS"
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 /* Override any gcc2 internal prototype to avoid an error. */
3541 /* We use char because int might match the return type of a gcc2
3542 builtin and then its argument prototype would still apply. */
3549 if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3551 ac_cv_search_exc_resume="-l$i"
3554 echo "configure: failed program was:" >&5
3555 cat conftest.$ac_ext >&5
3559 LIBS="$ac_func_search_save_LIBS"
3562 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3563 if test "$ac_cv_search_exc_resume" != "no"; then
3564 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3573 # See if the stage1 system preprocessor understands the ANSI C
3574 # preprocessor stringification operator. (Used by symcat.h.)
3577 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3578 echo "configure:3579: checking for preprocessor stringizing operator" >&5
3579 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3580 echo $ac_n "(cached) $ac_c" 1>&6
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3588 char *s = x(teststring);
3591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3592 egrep "#teststring" >/dev/null 2>&1; then
3594 ac_cv_c_stringize=no
3597 ac_cv_c_stringize=yes
3603 if test "${ac_cv_c_stringize}" = yes
3605 cat >> confdefs.h <<\EOF
3606 #define HAVE_STRINGIZE 1
3610 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3613 # Use <inttypes.h> only if it exists,
3614 # doesn't clash with <sys/types.h>, and declares intmax_t.
3615 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3616 echo "configure:3617: checking for inttypes.h" >&5
3617 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3618 echo $ac_n "(cached) $ac_c" 1>&6
3620 cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623 #include <sys/types.h>
3624 #include <inttypes.h>
3629 if { (eval echo configure:3630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3631 gcc_cv_header_inttypes_h=yes
3633 echo "configure: failed program was:" >&5
3634 cat conftest.$ac_ext >&5
3636 gcc_cv_header_inttypes_h=no
3641 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3642 if test $gcc_cv_header_inttypes_h = yes; then
3643 cat >> confdefs.h <<\EOF
3644 #define HAVE_INTTYPES_H 1
3650 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3651 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3652 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3656 echo "configure:3657: checking for $ac_func" >&5
3657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3658 echo $ac_n "(cached) $ac_c" 1>&6
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 /* System header to define __stub macros and hopefully few prototypes,
3664 which can conflict with char $ac_func(); below. */
3666 /* Override any gcc2 internal prototype to avoid an error. */
3667 /* We use char because int might match the return type of a gcc2
3668 builtin and then its argument prototype would still apply. */
3673 /* The GNU C library defines this for functions which it implements
3674 to always fail with ENOSYS. Some functions are actually named
3675 something starting with __ and the normal name is an alias. */
3676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3686 eval "ac_cv_func_$ac_func=yes"
3688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3691 eval "ac_cv_func_$ac_func=no"
3696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3697 echo "$ac_t""yes" 1>&6
3698 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3699 cat >> confdefs.h <<EOF
3700 #define $ac_tr_func 1
3704 echo "$ac_t""no" 1>&6
3709 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3710 echo "configure:3711: checking for ssize_t" >&5
3711 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <sys/types.h>
3723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3724 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3726 ac_cv_type_ssize_t=yes
3729 ac_cv_type_ssize_t=no
3734 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3735 if test $ac_cv_type_ssize_t = no; then
3736 cat >> confdefs.h <<\EOF
3743 # Try to determine the array type of the second argument of getgroups
3744 # for the target system (int or gid_t).
3745 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3746 echo "configure:3747: checking for uid_t in sys/types.h" >&5
3747 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3748 echo $ac_n "(cached) $ac_c" 1>&6
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 #include <sys/types.h>
3755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3756 egrep "uid_t" >/dev/null 2>&1; then
3758 ac_cv_type_uid_t=yes
3767 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3768 if test $ac_cv_type_uid_t = no; then
3769 cat >> confdefs.h <<\EOF
3773 cat >> confdefs.h <<\EOF
3779 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3780 echo "configure:3781: checking type of array argument to getgroups" >&5
3781 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3782 echo $ac_n "(cached) $ac_c" 1>&6
3784 if test "$cross_compiling" = yes; then
3785 ac_cv_type_getgroups=cross
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3791 /* Thanks to Mike Rendell for this test. */
3792 #include <sys/types.h>
3795 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3800 union { gid_t gval; long lval; } val;
3803 for (i = 0; i < NGID; i++)
3804 gidset[i] = val.gval;
3805 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3807 /* Exit non-zero if getgroups seems to require an array of ints. This
3808 happens when gid_t is short but getgroups modifies an array of ints. */
3809 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3813 if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3815 ac_cv_type_getgroups=gid_t
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3820 ac_cv_type_getgroups=int
3825 if test $ac_cv_type_getgroups = cross; then
3826 cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3832 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3834 ac_cv_type_getgroups=gid_t
3837 ac_cv_type_getgroups=int
3844 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3845 cat >> confdefs.h <<EOF
3846 #define GETGROUPS_T $ac_cv_type_getgroups
3850 if test "${target}" = "${build}"; then
3851 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3854 # This condition may need some tweaking. It should include all
3855 # targets where the array type of the second argument of getgroups
3856 # is int and the type of gid_t is not equivalent to int.
3857 *-*-sunos* | *-*-ultrix*)
3858 TARGET_GETGROUPS_T=int
3861 TARGET_GETGROUPS_T=gid_t
3867 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3868 echo "configure:3869: checking whether the printf functions support %p" >&5
3869 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3870 echo $ac_n "(cached) $ac_c" 1>&6
3872 if test "$cross_compiling" = yes; then
3873 gcc_cv_func_printf_ptr=no
3875 cat > conftest.$ac_ext <<EOF
3876 #line 3877 "configure"
3877 #include "confdefs.h"
3883 char *p = buf, *q = NULL;
3884 sprintf(buf, "%p", p);
3885 sscanf(buf, "%p", &q);
3889 if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3891 gcc_cv_func_printf_ptr=yes
3893 echo "configure: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3896 gcc_cv_func_printf_ptr=no
3901 rm -f core core.* *.core
3904 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3905 if test $gcc_cv_func_printf_ptr = yes ; then
3906 cat >> confdefs.h <<\EOF
3907 #define HAVE_PRINTF_PTR 1
3915 { echo "configure: error:
3916 *** UWIN may not be used as a host platform because
3917 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3920 # Under VMS, vfork works very different than on Unix. The standard test
3921 # won't work, and it isn't easily adaptable. It makes more sense to
3923 ac_cv_func_vfork_works=yes
3926 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3927 echo "configure:3928: checking for pid_t" >&5
3928 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3929 echo $ac_n "(cached) $ac_c" 1>&6
3931 cat > conftest.$ac_ext <<EOF
3932 #line 3933 "configure"
3933 #include "confdefs.h"
3934 #include <sys/types.h>
3940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3941 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3943 ac_cv_type_pid_t=yes
3951 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3952 if test $ac_cv_type_pid_t = no; then
3953 cat >> confdefs.h <<\EOF
3959 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3960 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3961 echo "configure:3962: checking for vfork.h" >&5
3962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3963 echo $ac_n "(cached) $ac_c" 1>&6
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3971 { (eval echo configure:3972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3973 if test -z "$ac_err"; then
3975 eval "ac_cv_header_$ac_safe=yes"
3978 echo "configure: failed program was:" >&5
3979 cat conftest.$ac_ext >&5
3981 eval "ac_cv_header_$ac_safe=no"
3985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3986 echo "$ac_t""yes" 1>&6
3987 cat >> confdefs.h <<\EOF
3988 #define HAVE_VFORK_H 1
3992 echo "$ac_t""no" 1>&6
3995 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3996 echo "configure:3997: checking for working vfork" >&5
3997 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3998 echo $ac_n "(cached) $ac_c" 1>&6
4000 if test "$cross_compiling" = yes; then
4001 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4002 echo "configure:4003: checking for vfork" >&5
4003 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4004 echo $ac_n "(cached) $ac_c" 1>&6
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009 /* System header to define __stub macros and hopefully few prototypes,
4010 which can conflict with char vfork(); below. */
4012 /* Override any gcc2 internal prototype to avoid an error. */
4013 /* We use char because int might match the return type of a gcc2
4014 builtin and then its argument prototype would still apply. */
4019 /* The GNU C library defines this for functions which it implements
4020 to always fail with ENOSYS. Some functions are actually named
4021 something starting with __ and the normal name is an alias. */
4022 #if defined (__stub_vfork) || defined (__stub___vfork)
4030 if { (eval echo configure:4031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4032 eval "ac_cv_func_vfork=yes"
4034 echo "configure: failed program was:" >&5
4035 cat conftest.$ac_ext >&5
4037 eval "ac_cv_func_vfork=no"
4042 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4043 echo "$ac_t""yes" 1>&6
4046 echo "$ac_t""no" 1>&6
4049 ac_cv_func_vfork_works=$ac_cv_func_vfork
4051 cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* Thanks to Paul Eggert for this test. */
4056 #include <sys/types.h>
4057 #include <sys/stat.h>
4058 #ifdef HAVE_UNISTD_H
4064 /* On some sparc systems, changes by the child to local and incoming
4065 argument registers are propagated back to the parent.
4066 The compiler is told about this with #include <vfork.h>,
4067 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4068 Test for this by using a static variable whose address
4069 is put into a register that is clobbered by the vfork. */
4072 sparc_address_test (int arg)
4074 sparc_address_test (arg) int arg;
4092 pid_t parent = getpid ();
4095 sparc_address_test ();
4100 /* Here is another test for sparc vfork register problems.
4101 This test uses lots of local variables, at least
4102 as many local variables as main has allocated so far
4103 including compiler temporaries. 4 locals are enough for
4104 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4105 A buggy compiler should reuse the register of parent
4106 for one of the local variables, since it will think that
4107 parent can't possibly be used any more in this routine.
4108 Assigning to the local variable will thus munge parent
4109 in the parent process. */
4111 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4112 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4113 /* Convince the compiler that p..p7 are live; otherwise, it might
4114 use the same hardware register for all 8 local variables. */
4115 if (p != p1 || p != p2 || p != p3 || p != p4
4116 || p != p5 || p != p6 || p != p7)
4119 /* On some systems (e.g. IRIX 3.3),
4120 vfork doesn't separate parent from child file descriptors.
4121 If the child closes a descriptor before it execs or exits,
4122 this munges the parent's descriptor as well.
4123 Test for this by closing stdout in the child. */
4124 _exit(close(fileno(stdout)) != 0);
4129 while (wait(&status) != child)
4132 /* Was there some problem with vforking? */
4135 /* Did the child fail? (This shouldn't happen.) */
4138 /* Did the vfork/compiler bug occur? */
4139 || parent != getpid()
4141 /* Did the file descriptor bug occur? */
4142 || fstat(fileno(stdout), &st) != 0
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4149 ac_cv_func_vfork_works=yes
4151 echo "configure: failed program was:" >&5
4152 cat conftest.$ac_ext >&5
4154 ac_cv_func_vfork_works=no
4161 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4162 if test $ac_cv_func_vfork_works = no; then
4163 cat >> confdefs.h <<\EOF
4169 for ac_func in getpagesize
4171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4172 echo "configure:4173: checking for $ac_func" >&5
4173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4174 echo $ac_n "(cached) $ac_c" 1>&6
4176 cat > conftest.$ac_ext <<EOF
4177 #line 4178 "configure"
4178 #include "confdefs.h"
4179 /* System header to define __stub macros and hopefully few prototypes,
4180 which can conflict with char $ac_func(); below. */
4182 /* Override any gcc2 internal prototype to avoid an error. */
4183 /* We use char because int might match the return type of a gcc2
4184 builtin and then its argument prototype would still apply. */
4189 /* The GNU C library defines this for functions which it implements
4190 to always fail with ENOSYS. Some functions are actually named
4191 something starting with __ and the normal name is an alias. */
4192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4200 if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4202 eval "ac_cv_func_$ac_func=yes"
4204 echo "configure: failed program was:" >&5
4205 cat conftest.$ac_ext >&5
4207 eval "ac_cv_func_$ac_func=no"
4212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4213 echo "$ac_t""yes" 1>&6
4214 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4215 cat >> confdefs.h <<EOF
4216 #define $ac_tr_func 1
4220 echo "$ac_t""no" 1>&6
4224 # The test program for the next two tests is the same except for one
4226 cat >ct-mmap.inc <<'EOF'
4227 #include <sys/types.h>
4228 #include <sys/mman.h>
4234 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4235 # define MAP_ANONYMOUS MAP_ANON
4238 /* This mess was copied from the GNU getpagesize.h. */
4239 #ifndef HAVE_GETPAGESIZE
4240 # ifdef HAVE_UNISTD_H
4241 # include <unistd.h>
4244 /* Assume that all systems that can run configure have sys/param.h. */
4245 # ifndef HAVE_SYS_PARAM_H
4246 # define HAVE_SYS_PARAM_H 1
4249 # ifdef _SC_PAGESIZE
4250 # define getpagesize() sysconf(_SC_PAGESIZE)
4251 # else /* no _SC_PAGESIZE */
4252 # ifdef HAVE_SYS_PARAM_H
4253 # include <sys/param.h>
4254 # ifdef EXEC_PAGESIZE
4255 # define getpagesize() EXEC_PAGESIZE
4256 # else /* no EXEC_PAGESIZE */
4258 # define getpagesize() NBPG * CLSIZE
4261 # endif /* no CLSIZE */
4262 # else /* no NBPG */
4264 # define getpagesize() NBPC
4265 # else /* no NBPC */
4267 # define getpagesize() PAGESIZE
4268 # endif /* PAGESIZE */
4269 # endif /* no NBPC */
4270 # endif /* no NBPG */
4271 # endif /* no EXEC_PAGESIZE */
4272 # else /* no HAVE_SYS_PARAM_H */
4273 # define getpagesize() 8192 /* punt totally */
4274 # endif /* no HAVE_SYS_PARAM_H */
4275 # endif /* no _SC_PAGESIZE */
4277 #endif /* no HAVE_GETPAGESIZE */
4280 # define MAP_FAILED -1
4284 #define perror_exit(str, val) \
4285 do { perror(str); exit(val); } while (0)
4287 /* Some versions of cygwin mmap require that munmap is called with the
4288 same parameters as mmap. GCC expects that this is not the case.
4289 Test for various forms of this problem. Warning - icky signal games. */
4291 static sigset_t unblock_sigsegv;
4301 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4302 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4304 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4305 MAP_PRIVATE, devzero, 0);
4313 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4317 /* Basic functionality test. */
4321 char *x = anonmap (pg);
4322 if (x == (char *) MAP_FAILED)
4323 perror_exit("test 0 mmap", 2);
4327 if (munmap(x, pg) < 0)
4328 perror_exit("test 0 munmap", 3);
4331 /* 1. If we map a 2-page region and unmap its second page, the first page
4336 char *x = anonmap (pg * 2);
4337 if (x == (char *)MAP_FAILED)
4338 perror_exit ("test 1 mmap", 4);
4340 signal (SIGSEGV, sigsegv);
4342 perror_exit ("test 1 fault", 5);
4347 if (munmap (x + pg, pg) < 0)
4348 perror_exit ("test 1 munmap 1", 6);
4351 if (setjmp (r) == 0)
4354 perror_exit ("test 1 no fault", 7);
4356 if (munmap (x, pg) < 0)
4357 perror_exit ("test 1 munmap 2", 8);
4360 /* 2. If we map a 2-page region and unmap its first page, the second
4361 page must remain. */
4365 char *x = anonmap (pg * 2);
4366 if (x == (char *)MAP_FAILED)
4367 perror_exit ("test 2 mmap", 9);
4369 signal (SIGSEGV, sigsegv);
4371 perror_exit ("test 2 fault", 10);
4376 if (munmap (x, pg) < 0)
4377 perror_exit ("test 2 munmap 1", 11);
4381 if (setjmp (r) == 0)
4384 perror_exit ("test 2 no fault", 12);
4387 if (munmap (x+pg, pg) < 0)
4388 perror_exit ("test 2 munmap 2", 13);
4391 /* 3. If we map two adjacent 1-page regions and unmap them both with
4392 one munmap, both must go away.
4394 Getting two adjacent 1-page regions with two mmap calls is slightly
4395 tricky. All OS's tested skip over already-allocated blocks; therefore
4396 we have been careful to unmap all allocated regions in previous tests.
4397 HP/UX allocates pages backward in memory. No OS has yet been observed
4398 to be so perverse as to leave unmapped space between consecutive calls
4407 if (x == (char *)MAP_FAILED)
4408 perror_exit ("test 3 mmap 1", 14);
4410 if (y == (char *)MAP_FAILED)
4411 perror_exit ("test 3 mmap 2", 15);
4416 z = y, y = x, x = z;
4419 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4420 (unsigned long)x, (unsigned long)y);
4425 signal (SIGSEGV, sigsegv);
4427 perror_exit ("test 3 fault", 17);
4432 if (munmap (x, pg*2) < 0)
4433 perror_exit ("test 3 munmap", 18);
4435 if (setjmp (r) == 0)
4438 perror_exit ("test 3 no fault 1", 19);
4441 signal (SIGSEGV, sigsegv);
4442 if (setjmp (r) == 0)
4445 perror_exit ("test 3 no fault 2", 20);
4452 sigemptyset (&unblock_sigsegv);
4453 sigaddset (&unblock_sigsegv, SIGSEGV);
4454 pg = getpagesize ();
4455 #ifndef USE_MAP_ANON
4456 devzero = open ("/dev/zero", O_RDWR);
4458 perror_exit ("open /dev/zero", 1);
4470 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4471 echo "configure:4472: checking for working mmap from /dev/zero" >&5
4472 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
4475 if test "$cross_compiling" = yes; then
4476 # When cross-building, assume that this works, unless we know it
4477 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4478 # on the host, let alone whether mmap will work on it.
4480 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4481 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4482 * ) ac_cv_func_mmap_dev_zero=yes ;;
4485 cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include "ct-mmap.inc"
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4492 ac_cv_func_mmap_dev_zero=yes
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4498 then ac_cv_func_mmap_dev_zero=no
4499 else ac_cv_func_mmap_dev_zero=buggy
4508 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4509 if test $ac_cv_func_mmap_dev_zero = yes; then
4510 cat >> confdefs.h <<\EOF
4511 #define HAVE_MMAP_DEV_ZERO 1
4516 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4517 echo "configure:4518: checking for working mmap with MAP_ANON(YMOUS)" >&5
4518 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4519 echo $ac_n "(cached) $ac_c" 1>&6
4521 if test "$cross_compiling" = yes; then
4522 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4523 # just because it's there. Some SCO Un*xen define it but don't implement it.
4525 darwin* ) ac_cv_func_mmap_anon=yes ;;
4526 * ) ac_cv_func_mmap_anon=no ;;
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #define USE_MAP_ANON
4533 #include "ct-mmap.inc"
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4537 ac_cv_func_mmap_anon=yes
4539 echo "configure: failed program was:" >&5
4540 cat conftest.$ac_ext >&5
4543 then ac_cv_func_mmap_anon=no
4544 else ac_cv_func_mmap_anon=buggy
4553 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4554 if test $ac_cv_func_mmap_anon = yes; then
4555 cat >> confdefs.h <<\EOF
4556 #define HAVE_MMAP_ANON 1
4562 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4563 echo "configure:4564: checking for working mmap of a file" >&5
4564 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4565 echo $ac_n "(cached) $ac_c" 1>&6
4567 # Create a file one thousand bytes long.
4568 for i in 1 2 3 4 5 6 7 8 9 0
4569 do for j in 1 2 3 4 5 6 7 8 9 0
4572 done > conftestdata$$
4574 if test "$cross_compiling" = yes; then
4576 darwin* ) ac_cv_func_mmap_file=yes ;;
4577 * ) ac_cv_func_mmap_file=no ;;
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4584 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4585 Richard Henderson and Alexandre Oliva.
4586 Check whether read-only mmap of a plain file works. */
4587 #include <sys/types.h>
4588 #include <sys/stat.h>
4590 #include <sys/mman.h>
4598 fd = open("conftestdata$$", O_RDONLY);
4602 if (fstat (fd, &st))
4605 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4606 if (x == (char *) -1)
4609 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4612 if (munmap(x, st.st_size) < 0)
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4620 ac_cv_func_mmap_file=yes
4622 echo "configure: failed program was:" >&5
4623 cat conftest.$ac_ext >&5
4625 ac_cv_func_mmap_file=no
4632 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4633 if test $ac_cv_func_mmap_file = yes; then
4634 cat >> confdefs.h <<\EOF
4635 #define HAVE_MMAP_FILE 1
4643 am_cv_lib_iconv_ldpath=
4644 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4645 if test "${with_libiconv_prefix+set}" = set; then
4646 withval="$with_libiconv_prefix"
4648 for dir in `echo "$withval" | tr : ' '`; do
4649 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4650 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4656 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4657 echo "configure:4658: checking for iconv" >&5
4658 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4659 echo $ac_n "(cached) $ac_c" 1>&6
4662 am_cv_func_iconv="no, consider installing GNU libiconv"
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4670 iconv_t cd = iconv_open("","");
4671 iconv(cd,NULL,NULL,NULL,NULL);
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4677 am_cv_func_iconv=yes
4679 echo "configure: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4683 if test "$am_cv_func_iconv" != yes; then
4684 am_save_LIBS="$LIBS"
4685 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4686 cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4692 iconv_t cd = iconv_open("","");
4693 iconv(cd,NULL,NULL,NULL,NULL);
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4700 am_cv_func_iconv=yes
4702 echo "configure: failed program was:" >&5
4703 cat conftest.$ac_ext >&5
4706 LIBS="$am_save_LIBS"
4711 echo "$ac_t""$am_cv_func_iconv" 1>&6
4712 if test "$am_cv_func_iconv" = yes; then
4713 cat >> confdefs.h <<\EOF
4714 #define HAVE_ICONV 1
4717 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4718 echo "configure:4719: checking for iconv declaration" >&5
4719 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4733 #if defined(__STDC__) || defined(__cplusplus)
4734 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4743 if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4745 am_cv_proto_iconv_arg1=""
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4750 am_cv_proto_iconv_arg1="const"
4753 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);"
4756 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4757 echo "$ac_t""${ac_t:-
4758 }$am_cv_proto_iconv" 1>&6
4759 cat >> confdefs.h <<EOF
4760 #define ICONV_CONST $am_cv_proto_iconv_arg1
4765 if test "$am_cv_lib_iconv" = yes; then
4766 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4771 # We will need to find libiberty.h and ansidecl.h
4772 saved_CFLAGS="$CFLAGS"
4773 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4774 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4775 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4776 fprintf_unlocked strstr errno vasprintf \
4777 malloc realloc calloc free basename getopt clock
4779 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4780 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4781 echo "configure:4782: checking whether $ac_func is declared" >&5
4782 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4783 echo $ac_n "(cached) $ac_c" 1>&6
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4789 #define $ac_tr_decl 1
4791 #include "ansidecl.h"
4796 char *(*pfn) = (char *(*)) $ac_func ;
4800 if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4802 eval "gcc_cv_have_decl_$ac_func=yes"
4804 echo "configure: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
4807 eval "gcc_cv_have_decl_$ac_func=no"
4812 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4813 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4814 #define $ac_tr_decl 1
4818 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4819 #define $ac_tr_decl 0
4825 if test x = y ; then
4826 cat >> confdefs.h <<\EOF
4827 #define HAVE_DECL_GETENV 1
4829 cat >> confdefs.h <<\EOF
4830 #define HAVE_DECL_ATOL 1
4832 cat >> confdefs.h <<\EOF
4833 #define HAVE_DECL_SBRK 1
4835 cat >> confdefs.h <<\EOF
4836 #define HAVE_DECL_ABORT 1
4838 cat >> confdefs.h <<\EOF
4839 #define HAVE_DECL_ATOF 1
4841 cat >> confdefs.h <<\EOF
4842 #define HAVE_DECL_GETCWD 1
4844 cat >> confdefs.h <<\EOF
4845 #define HAVE_DECL_GETWD 1
4848 cat >> confdefs.h <<\EOF
4849 #define HAVE_DECL_STRSIGNAL 1
4851 cat >> confdefs.h <<\EOF
4852 #define HAVE_DECL_PUTC_UNLOCKED 1
4854 cat >> confdefs.h <<\EOF
4855 #define HAVE_DECL_FPUTS_UNLOCKED 1
4857 cat >> confdefs.h <<\EOF
4858 #define HAVE_DECL_FWRITE_UNLOCKED 1
4861 cat >> confdefs.h <<\EOF
4862 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4864 cat >> confdefs.h <<\EOF
4865 #define HAVE_DECL_STRSTR 1
4867 cat >> confdefs.h <<\EOF
4868 #define HAVE_DECL_ERRNO 1
4870 cat >> confdefs.h <<\EOF
4871 #define HAVE_DECL_VASPRINTF 1
4874 cat >> confdefs.h <<\EOF
4875 #define HAVE_DECL_MALLOC 1
4877 cat >> confdefs.h <<\EOF
4878 #define HAVE_DECL_REALLOC 1
4880 cat >> confdefs.h <<\EOF
4881 #define HAVE_DECL_CALLOC 1
4883 cat >> confdefs.h <<\EOF
4884 #define HAVE_DECL_FREE 1
4886 cat >> confdefs.h <<\EOF
4887 #define HAVE_DECL_BASENAME 1
4889 cat >> confdefs.h <<\EOF
4890 #define HAVE_DECL_GETOPT 1
4892 cat >> confdefs.h <<\EOF
4893 #define HAVE_DECL_CLOCK 1
4898 for ac_func in getrlimit setrlimit getrusage
4900 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4901 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4902 echo "configure:4903: checking whether $ac_func is declared" >&5
4903 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4904 echo $ac_n "(cached) $ac_c" 1>&6
4906 cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4910 #define $ac_tr_decl 1
4912 #include "ansidecl.h"
4914 #ifdef HAVE_SYS_RESOURCE_H
4915 #include <sys/resource.h>
4921 char *(*pfn) = (char *(*)) $ac_func ;
4925 if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4927 eval "gcc_cv_have_decl_$ac_func=yes"
4929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4932 eval "gcc_cv_have_decl_$ac_func=no"
4937 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4939 #define $ac_tr_decl 1
4943 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4944 #define $ac_tr_decl 0
4950 if test x = y ; then
4951 cat >> confdefs.h <<\EOF
4952 #define HAVE_DECL_GETRLIMIT 1
4954 cat >> confdefs.h <<\EOF
4955 #define HAVE_DECL_SETRLIMIT 1
4957 cat >> confdefs.h <<\EOF
4958 #define HAVE_DECL_GETRUSAGE 1
4963 for ac_func in ldgetname
4965 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4966 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4967 echo "configure:4968: checking whether $ac_func is declared" >&5
4968 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4969 echo $ac_n "(cached) $ac_c" 1>&6
4971 cat > conftest.$ac_ext <<EOF
4972 #line 4973 "configure"
4973 #include "confdefs.h"
4975 #define $ac_tr_decl 1
4977 #include "ansidecl.h"
4986 char *(*pfn) = (char *(*)) $ac_func ;
4990 if { (eval echo configure:4991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4992 eval "gcc_cv_have_decl_$ac_func=yes"
4994 echo "configure: failed program was:" >&5
4995 cat conftest.$ac_ext >&5
4997 eval "gcc_cv_have_decl_$ac_func=no"
5002 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5003 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5004 #define $ac_tr_decl 1
5008 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5009 #define $ac_tr_decl 0
5015 if test x = y ; then
5016 cat >> confdefs.h <<\EOF
5017 #define HAVE_DECL_LDGETNAME 1
5022 for ac_func in times
5024 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5025 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5026 echo "configure:5027: checking whether $ac_func is declared" >&5
5027 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5028 echo $ac_n "(cached) $ac_c" 1>&6
5030 cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5034 #define $ac_tr_decl 1
5036 #include "ansidecl.h"
5038 #ifdef HAVE_SYS_TIMES_H
5039 #include <sys/times.h>
5045 char *(*pfn) = (char *(*)) $ac_func ;
5049 if { (eval echo configure:5050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5051 eval "gcc_cv_have_decl_$ac_func=yes"
5053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5056 eval "gcc_cv_have_decl_$ac_func=no"
5061 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5062 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5063 #define $ac_tr_decl 1
5067 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5068 #define $ac_tr_decl 0
5074 if test x = y ; then
5075 cat >> confdefs.h <<\EOF
5076 #define HAVE_DECL_TIMES 1
5081 # More time-related stuff.
5082 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5083 echo "configure:5084: checking for struct tms" >&5
5084 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5085 echo $ac_n "(cached) $ac_c" 1>&6
5088 cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5092 #include "ansidecl.h"
5094 #ifdef HAVE_SYS_TIMES_H
5095 #include <sys/times.h>
5102 if { (eval echo configure:5103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5104 ac_cv_struct_tms=yes
5106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5114 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5115 if test $ac_cv_struct_tms = yes; then
5116 cat >> confdefs.h <<\EOF
5117 #define HAVE_STRUCT_TMS 1
5122 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5123 # revisit after autoconf 2.50.
5124 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5125 echo "configure:5126: checking for clock_t" >&5
5126 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5127 echo $ac_n "(cached) $ac_c" 1>&6
5130 cat > conftest.$ac_ext <<EOF
5131 #line 5132 "configure"
5132 #include "confdefs.h"
5134 #include "ansidecl.h"
5141 if { (eval echo configure:5142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5143 gcc_cv_type_clock_t=yes
5145 echo "configure: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5148 gcc_cv_type_clock_t=no
5153 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5154 if test $gcc_cv_type_clock_t = yes; then
5155 cat >> confdefs.h <<\EOF
5156 #define HAVE_CLOCK_T 1
5161 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5162 echo "configure:5163: checking for uchar" >&5
5163 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5164 echo $ac_n "(cached) $ac_c" 1>&6
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5170 #include "ansidecl.h"
5174 if ((uchar *)0) return 0;
5175 if (sizeof(uchar)) return 0;
5178 if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5180 ac_cv_type_uchar=yes
5182 echo "configure: failed program was:" >&5
5183 cat conftest.$ac_ext >&5
5190 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5191 if test $ac_cv_type_uchar = yes; then
5192 cat >> confdefs.h <<\EOF
5193 #define HAVE_UCHAR 1
5198 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5199 CFLAGS="$saved_CFLAGS"
5201 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5202 if test "${enable_initfini_array+set}" = set; then
5203 enableval="$enable_initfini_array"
5207 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5208 echo "configure:5209: checking for .preinit_array/.init_array/.fini_array support" >&5
5209 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5210 echo $ac_n "(cached) $ac_c" 1>&6
5212 if test "$cross_compiling" = yes; then
5213 gcc_cv_initfini_array=no
5215 cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5220 int main (void) { return x; }
5221 int foo (void) { x = 0; }
5222 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5224 if { (eval echo configure:5225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5226 gcc_cv_initfini_array=yes
5228 echo "configure: failed program was:" >&5
5229 cat conftest.$ac_ext >&5
5231 gcc_cv_initfini_array=no
5238 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5239 enable_initfini_array=$gcc_cv_initfini_array
5243 if test $enable_initfini_array = yes; then
5244 cat >> confdefs.h <<\EOF
5245 #define HAVE_INITFINI_ARRAY 1
5250 # mkdir takes a single argument on some systems.
5251 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5252 echo "configure:5253: checking if mkdir takes one argument" >&5
5253 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5254 echo $ac_n "(cached) $ac_c" 1>&6
5256 cat > conftest.$ac_ext <<EOF
5257 #line 5258 "configure"
5258 #include "confdefs.h"
5260 #include <sys/types.h>
5261 #ifdef HAVE_SYS_STAT_H
5262 # include <sys/stat.h>
5264 #ifdef HAVE_UNISTD_H
5265 # include <unistd.h>
5267 #ifdef HAVE_DIRECT_H
5268 # include <direct.h>
5274 if { (eval echo configure:5275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5276 gcc_cv_mkdir_takes_one_arg=no
5278 echo "configure: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5281 gcc_cv_mkdir_takes_one_arg=yes
5286 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5287 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5288 cat >> confdefs.h <<\EOF
5289 #define MKDIR_TAKES_ONE_ARG 1
5301 # With Setjmp/Longjmp based exception handling.
5302 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5303 if test "${enable_sjlj_exceptions+set}" = set; then
5304 enableval="$enable_sjlj_exceptions"
5305 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5306 cat >> confdefs.h <<EOF
5307 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5313 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5314 echo "configure:5315: checking for main in -lunwind" >&5
5315 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5316 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5317 echo $ac_n "(cached) $ac_c" 1>&6
5319 ac_save_LIBS="$LIBS"
5320 LIBS="-lunwind $LIBS"
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331 eval "ac_cv_lib_$ac_lib_var=yes"
5333 echo "configure: failed program was:" >&5
5334 cat conftest.$ac_ext >&5
5336 eval "ac_cv_lib_$ac_lib_var=no"
5339 LIBS="$ac_save_LIBS"
5342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5343 echo "$ac_t""yes" 1>&6
5344 use_libunwind_default=yes
5346 echo "$ac_t""no" 1>&6
5347 use_libunwind_default=no
5350 # Use libunwind based exception handling.
5351 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5352 if test "${enable_libunwind_exceptions+set}" = set; then
5353 enableval="$enable_libunwind_exceptions"
5354 use_libunwind_exceptions=$enableval
5356 use_libunwind_exceptions=$use_libunwind_default
5359 if test x"$use_libunwind_exceptions" = xyes; then
5360 cat >> confdefs.h <<\EOF
5361 #define USE_LIBUNWIND_EXCEPTIONS 1
5369 build_install_headers_dir=install-headers-tar
5374 host_truncate_target=
5377 # Decode the host machine, then the target machine.
5378 # For the host machine, we save the xm_file variable as host_xm_file;
5379 # then we decode the target machine and forget everything else
5380 # that came from the host machine.
5381 for machine in $build $host $target; do
5382 . ${srcdir}/config.gcc
5385 extra_objs="${host_extra_objs} ${extra_objs}"
5387 # Default the target-machine variables that were not explicitly set.
5388 if test x"$tm_file" = x
5389 then tm_file=$cpu_type/$cpu_type.h; fi
5391 if test x"$extra_headers" = x
5392 then extra_headers=; fi
5394 if test x$md_file = x
5395 then md_file=$cpu_type/$cpu_type.md; fi
5397 if test x$out_file = x
5398 then out_file=$cpu_type/$cpu_type.c; fi
5400 if test x"$tmake_file" = x
5401 then tmake_file=$cpu_type/t-$cpu_type
5404 if test x"$dwarf2" = xyes
5405 then tm_file="$tm_file tm-dwarf2.h"
5408 # Say what files are being used for the output code and MD file.
5409 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5410 echo "Using \`$srcdir/config/$md_file' as machine description file."
5412 # If any of the xm_file variables contain nonexistent files, warn
5413 # about them and drop them.
5416 for x in $build_xm_file; do
5417 if test -f $srcdir/config/$x
5419 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5425 for x in $host_xm_file; do
5426 if test -f $srcdir/config/$x
5428 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5434 for x in $xm_file; do
5435 if test -f $srcdir/config/$x
5437 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5443 for f in $tm_file; do
5446 if test $count = ax; then
5447 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5449 echo "Using the following target machine macro files:"
5450 for f in $tm_file; do
5451 echo " $srcdir/config/$f"
5455 if test x$need_64bit_hwint = xyes; then
5456 cat >> confdefs.h <<\EOF
5457 #define NEED_64BIT_HOST_WIDE_INT 1
5463 for f in $host_xm_file; do
5466 if test $count = a; then
5468 elif test $count = ax; then
5469 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5471 echo "Using the following host machine macro files:"
5472 for f in $host_xm_file; do
5473 echo " $srcdir/config/$f"
5477 if test "$host_xm_file" != "$build_xm_file"; then
5479 for f in $build_xm_file; do
5482 if test $count = a; then
5484 elif test $count = ax; then
5485 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5487 echo "Using the following build machine macro files:"
5488 for f in $build_xm_file; do
5489 echo " $srcdir/config/$f"
5494 if test x$thread_file = x; then
5495 if test x$target_thread_file != x; then
5496 thread_file=$target_thread_file
5498 thread_file='single'
5502 # Look for a file containing extra machine modes.
5503 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5504 extra_modes_file='$(srcdir)'/config/${extra_modes}
5506 cat >> confdefs.h <<EOF
5507 #define EXTRA_MODES_FILE "$extra_modes"
5510 cat >> confdefs.h <<\EOF
5511 #define EXTRA_CC_MODES 1
5516 # auto-host.h is the file containing items generated by autoconf and is
5517 # the first file included by config.h.
5518 # If host=build, it is correct to have bconfig include auto-host.h
5519 # as well. If host!=build, we are in error and need to do more
5520 # work to find out the build config parameters.
5521 if test x$host = x$build
5523 build_auto=auto-host.h
5526 # We create a subdir, then run autoconf in the subdir.
5527 # To prevent recursion we set host and build for the new
5528 # invocation of configure to the build for this invocation
5535 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5536 *) realsrcdir=../${srcdir};;
5538 saved_CFLAGS="${CFLAGS}"
5539 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5540 ${realsrcdir}/configure \
5541 --target=$target_alias --host=$build_alias --build=$build_alias
5542 CFLAGS="${saved_CFLAGS}"
5544 # We just finished tests for the build machine, so rename
5545 # the file auto-build.h in the gcc directory.
5546 mv auto-host.h ../auto-build.h
5549 build_auto=auto-build.h
5550 FORBUILD=../build-$build_alias
5554 tm_file="${tm_file} defaults.h"
5555 tm_p_file="${tm_p_file} tm-preds.h"
5556 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5557 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5558 xm_file="ansidecl.h ${xm_file}"
5560 # Truncate the target if necessary
5561 if test x$host_truncate_target != x; then
5562 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5565 # Get the version trigger filename from the toplevel
5566 if test "${with_gcc_version_trigger+set}" = set; then
5567 gcc_version_trigger=$with_gcc_version_trigger
5569 gcc_version_trigger=${srcdir}/version.c
5571 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5572 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5574 # Compile in configure arguments.
5575 if test -f configargs.h ; then
5576 # Being re-configured.
5577 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5578 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5580 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5582 cat > configargs.h <<EOF
5583 /* Generated automatically. */
5584 static const char configuration_arguments[] = "$gcc_config_arguments";
5585 static const char thread_model[] = "$thread_file";
5588 # Internationalization
5590 VERSION="$gcc_version"
5594 # Enable NLS support by default
5595 # Check whether --enable-nls or --disable-nls was given.
5596 if test "${enable_nls+set}" = set; then
5597 enableval="$enable_nls"
5604 # if cross compiling, disable NLS support.
5605 # It's not worth the trouble, at least for now.
5607 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5608 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5614 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5615 echo "configure:5616: checking for library containing strerror" >&5
5616 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5617 echo $ac_n "(cached) $ac_c" 1>&6
5619 ac_func_search_save_LIBS="$LIBS"
5620 ac_cv_search_strerror="no"
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* Override any gcc2 internal prototype to avoid an error. */
5625 /* We use char because int might match the return type of a gcc2
5626 builtin and then its argument prototype would still apply. */
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5635 ac_cv_search_strerror="none required"
5637 echo "configure: failed program was:" >&5
5638 cat conftest.$ac_ext >&5
5641 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5642 LIBS="-l$i $ac_func_search_save_LIBS"
5643 cat > conftest.$ac_ext <<EOF
5644 #line 5645 "configure"
5645 #include "confdefs.h"
5646 /* Override any gcc2 internal prototype to avoid an error. */
5647 /* We use char because int might match the return type of a gcc2
5648 builtin and then its argument prototype would still apply. */
5655 if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5657 ac_cv_search_strerror="-l$i"
5660 echo "configure: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5665 LIBS="$ac_func_search_save_LIBS"
5668 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5669 if test "$ac_cv_search_strerror" != "no"; then
5670 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5677 echo $ac_n "checking for working const""... $ac_c" 1>&6
5678 echo "configure:5679: checking for working const" >&5
5679 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5680 echo $ac_n "(cached) $ac_c" 1>&6
5682 cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5688 /* Ultrix mips cc rejects this. */
5689 typedef int charset[2]; const charset x;
5690 /* SunOS 4.1.1 cc rejects this. */
5691 char const *const *ccp;
5693 /* NEC SVR4.0.2 mips cc rejects this. */
5694 struct point {int x, y;};
5695 static struct point const zero = {0,0};
5696 /* AIX XL C 1.02.0.0 rejects this.
5697 It does not let you subtract one const X* pointer from another in an arm
5698 of an if-expression whose if-part is not a constant expression */
5699 const char *g = "string";
5700 ccp = &g + (g ? g-g : 0);
5701 /* HPUX 7.0 cc rejects these. */
5704 ccp = (char const *const *) p;
5705 { /* SCO 3.2v4 cc rejects this. */
5707 char const *s = 0 ? (char *) 0 : (char const *) 0;
5711 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5713 const int *foo = &x[0];
5716 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5717 typedef const int *iptr;
5721 { /* AIX XL C 1.02.0.0 rejects this saying
5722 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5723 struct s { int j; const int *ap[3]; };
5724 struct s *b; b->j = 5;
5726 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5732 if { (eval echo configure:5733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5744 echo "$ac_t""$ac_cv_c_const" 1>&6
5745 if test $ac_cv_c_const = no; then
5746 cat >> confdefs.h <<\EOF
5752 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5753 echo "configure:5754: checking for off_t" >&5
5754 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5755 echo $ac_n "(cached) $ac_c" 1>&6
5757 cat > conftest.$ac_ext <<EOF
5758 #line 5759 "configure"
5759 #include "confdefs.h"
5760 #include <sys/types.h>
5766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5767 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5769 ac_cv_type_off_t=yes
5777 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5778 if test $ac_cv_type_off_t = no; then
5779 cat >> confdefs.h <<\EOF
5785 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5786 echo "configure:5787: checking for size_t" >&5
5787 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5788 echo $ac_n "(cached) $ac_c" 1>&6
5790 cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793 #include <sys/types.h>
5799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5800 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5802 ac_cv_type_size_t=yes
5805 ac_cv_type_size_t=no
5810 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5811 if test $ac_cv_type_size_t = no; then
5812 cat >> confdefs.h <<\EOF
5813 #define size_t unsigned
5818 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5819 # for constant arguments. Useless!
5820 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5821 echo "configure:5822: checking for working alloca.h" >&5
5822 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5823 echo $ac_n "(cached) $ac_c" 1>&6
5825 cat > conftest.$ac_ext <<EOF
5826 #line 5827 "configure"
5827 #include "confdefs.h"
5830 char *p = alloca(2 * sizeof(int));
5833 if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5835 ac_cv_header_alloca_h=yes
5837 echo "configure: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5840 ac_cv_header_alloca_h=no
5845 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5846 if test $ac_cv_header_alloca_h = yes; then
5847 cat >> confdefs.h <<\EOF
5848 #define HAVE_ALLOCA_H 1
5853 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5854 echo "configure:5855: checking for alloca" >&5
5855 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5856 echo $ac_n "(cached) $ac_c" 1>&6
5858 cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5863 # define alloca __builtin_alloca
5866 # include <malloc.h>
5867 # define alloca _alloca
5870 # include <alloca.h>
5875 # ifndef alloca /* predefined by HP cc +Olibcalls */
5884 char *p = (char *) alloca(1);
5887 if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5889 ac_cv_func_alloca_works=yes
5891 echo "configure: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5894 ac_cv_func_alloca_works=no
5899 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5900 if test $ac_cv_func_alloca_works = yes; then
5901 cat >> confdefs.h <<\EOF
5902 #define HAVE_ALLOCA 1
5907 if test $ac_cv_func_alloca_works = no; then
5908 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5909 # that cause trouble. Some versions do not even contain alloca or
5910 # contain a buggy version. If you still want to use their alloca,
5911 # use ar to extract alloca.o from them instead of compiling alloca.c.
5912 ALLOCA=alloca.${ac_objext}
5913 cat >> confdefs.h <<\EOF
5918 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5919 echo "configure:5920: checking whether alloca needs Cray hooks" >&5
5920 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5921 echo $ac_n "(cached) $ac_c" 1>&6
5923 cat > conftest.$ac_ext <<EOF
5924 #line 5925 "configure"
5925 #include "confdefs.h"
5926 #if defined(CRAY) && ! defined(CRAY2)
5933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5934 egrep "webecray" >/dev/null 2>&1; then
5945 echo "$ac_t""$ac_cv_os_cray" 1>&6
5946 if test $ac_cv_os_cray = yes; then
5947 for ac_func in _getb67 GETB67 getb67; do
5948 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5949 echo "configure:5950: checking for $ac_func" >&5
5950 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5951 echo $ac_n "(cached) $ac_c" 1>&6
5953 cat > conftest.$ac_ext <<EOF
5954 #line 5955 "configure"
5955 #include "confdefs.h"
5956 /* System header to define __stub macros and hopefully few prototypes,
5957 which can conflict with char $ac_func(); below. */
5959 /* Override any gcc2 internal prototype to avoid an error. */
5960 /* We use char because int might match the return type of a gcc2
5961 builtin and then its argument prototype would still apply. */
5966 /* The GNU C library defines this for functions which it implements
5967 to always fail with ENOSYS. Some functions are actually named
5968 something starting with __ and the normal name is an alias. */
5969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5977 if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979 eval "ac_cv_func_$ac_func=yes"
5981 echo "configure: failed program was:" >&5
5982 cat conftest.$ac_ext >&5
5984 eval "ac_cv_func_$ac_func=no"
5989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5990 echo "$ac_t""yes" 1>&6
5991 cat >> confdefs.h <<EOF
5992 #define CRAY_STACKSEG_END $ac_func
5997 echo "$ac_t""no" 1>&6
6003 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6004 echo "configure:6005: checking stack direction for C alloca" >&5
6005 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6006 echo $ac_n "(cached) $ac_c" 1>&6
6008 if test "$cross_compiling" = yes; then
6009 ac_cv_c_stack_direction=0
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014 find_stack_direction ()
6016 static char *addr = 0;
6021 return find_stack_direction ();
6024 return (&dummy > addr) ? 1 : -1;
6028 exit (find_stack_direction() < 0);
6031 if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6033 ac_cv_c_stack_direction=1
6035 echo "configure: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6038 ac_cv_c_stack_direction=-1
6045 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6046 cat >> confdefs.h <<EOF
6047 #define STACK_DIRECTION $ac_cv_c_stack_direction
6053 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6054 echo "configure:6055: checking whether we are using the GNU C Library 2.1 or newer" >&5
6055 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6056 echo $ac_n "(cached) $ac_c" 1>&6
6058 cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6062 #include <features.h>
6063 #ifdef __GNU_LIBRARY__
6064 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6071 egrep "Lucky GNU user" >/dev/null 2>&1; then
6073 ac_cv_gnu_library_2_1=yes
6076 ac_cv_gnu_library_2_1=no
6084 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6086 GLIBC21="$ac_cv_gnu_library_2_1"
6090 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6091 stdlib.h string.h unistd.h sys/param.h
6093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6095 echo "configure:6096: checking for $ac_hdr" >&5
6096 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6097 echo $ac_n "(cached) $ac_c" 1>&6
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6105 { (eval echo configure:6106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6107 if test -z "$ac_err"; then
6109 eval "ac_cv_header_$ac_safe=yes"
6112 echo "configure: failed program was:" >&5
6113 cat conftest.$ac_ext >&5
6115 eval "ac_cv_header_$ac_safe=no"
6119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6120 echo "$ac_t""yes" 1>&6
6121 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6122 cat >> confdefs.h <<EOF
6123 #define $ac_tr_hdr 1
6127 echo "$ac_t""no" 1>&6
6131 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6132 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6133 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6136 echo "configure:6137: checking for $ac_func" >&5
6137 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6138 echo $ac_n "(cached) $ac_c" 1>&6
6140 cat > conftest.$ac_ext <<EOF
6141 #line 6142 "configure"
6142 #include "confdefs.h"
6143 /* System header to define __stub macros and hopefully few prototypes,
6144 which can conflict with char $ac_func(); below. */
6146 /* Override any gcc2 internal prototype to avoid an error. */
6147 /* We use char because int might match the return type of a gcc2
6148 builtin and then its argument prototype would still apply. */
6153 /* The GNU C library defines this for functions which it implements
6154 to always fail with ENOSYS. Some functions are actually named
6155 something starting with __ and the normal name is an alias. */
6156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6164 if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6166 eval "ac_cv_func_$ac_func=yes"
6168 echo "configure: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
6171 eval "ac_cv_func_$ac_func=no"
6176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6177 echo "$ac_t""yes" 1>&6
6178 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6179 cat >> confdefs.h <<EOF
6180 #define $ac_tr_func 1
6184 echo "$ac_t""no" 1>&6
6191 am_cv_lib_iconv_ldpath=
6192 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6193 if test "${with_libiconv_prefix+set}" = set; then
6194 withval="$with_libiconv_prefix"
6196 for dir in `echo "$withval" | tr : ' '`; do
6197 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6198 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6204 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6205 echo "configure:6206: checking for iconv" >&5
6206 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6207 echo $ac_n "(cached) $ac_c" 1>&6
6210 am_cv_func_iconv="no, consider installing GNU libiconv"
6212 cat > conftest.$ac_ext <<EOF
6213 #line 6214 "configure"
6214 #include "confdefs.h"
6218 iconv_t cd = iconv_open("","");
6219 iconv(cd,NULL,NULL,NULL,NULL);
6223 if { (eval echo configure:6224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6225 am_cv_func_iconv=yes
6227 echo "configure: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6231 if test "$am_cv_func_iconv" != yes; then
6232 am_save_LIBS="$LIBS"
6233 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6234 cat > conftest.$ac_ext <<EOF
6235 #line 6236 "configure"
6236 #include "confdefs.h"
6240 iconv_t cd = iconv_open("","");
6241 iconv(cd,NULL,NULL,NULL,NULL);
6245 if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6248 am_cv_func_iconv=yes
6250 echo "configure: failed program was:" >&5
6251 cat conftest.$ac_ext >&5
6254 LIBS="$am_save_LIBS"
6259 echo "$ac_t""$am_cv_func_iconv" 1>&6
6260 if test "$am_cv_func_iconv" = yes; then
6261 cat >> confdefs.h <<\EOF
6262 #define HAVE_ICONV 1
6265 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6266 echo "configure:6267: checking for iconv declaration" >&5
6267 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6268 echo $ac_n "(cached) $ac_c" 1>&6
6271 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6281 #if defined(__STDC__) || defined(__cplusplus)
6282 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6291 if { (eval echo configure:6292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6293 am_cv_proto_iconv_arg1=""
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6298 am_cv_proto_iconv_arg1="const"
6301 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);"
6304 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6305 echo "$ac_t""${ac_t:-
6306 }$am_cv_proto_iconv" 1>&6
6307 cat >> confdefs.h <<EOF
6308 #define ICONV_CONST $am_cv_proto_iconv_arg1
6313 if test "$am_cv_lib_iconv" = yes; then
6314 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6319 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6320 echo "configure:6321: checking for nl_langinfo and CODESET" >&5
6321 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6322 echo $ac_n "(cached) $ac_c" 1>&6
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327 #include <langinfo.h>
6329 char* cs = nl_langinfo(CODESET);
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6334 am_cv_langinfo_codeset=yes
6336 echo "configure: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6339 am_cv_langinfo_codeset=no
6345 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6346 if test $am_cv_langinfo_codeset = yes; then
6347 cat >> confdefs.h <<\EOF
6348 #define HAVE_LANGINFO_CODESET 1
6353 if test $ac_cv_header_locale_h = yes; then
6354 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6355 echo "configure:6356: checking for LC_MESSAGES" >&5
6356 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6357 echo $ac_n "(cached) $ac_c" 1>&6
6359 cat > conftest.$ac_ext <<EOF
6360 #line 6361 "configure"
6361 #include "confdefs.h"
6367 if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6369 am_cv_val_LC_MESSAGES=yes
6371 echo "configure: failed program was:" >&5
6372 cat conftest.$ac_ext >&5
6374 am_cv_val_LC_MESSAGES=no
6379 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6380 if test $am_cv_val_LC_MESSAGES = yes; then
6381 cat >> confdefs.h <<\EOF
6382 #define HAVE_LC_MESSAGES 1
6387 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6388 echo "configure:6389: checking whether NLS is requested" >&5
6389 # Check whether --enable-nls or --disable-nls was given.
6390 if test "${enable_nls+set}" = set; then
6391 enableval="$enable_nls"
6397 echo "$ac_t""$USE_NLS" 1>&6
6400 BUILD_INCLUDED_LIBINTL=no
6401 USE_INCLUDED_LIBINTL=no
6405 if test "$USE_NLS" = "yes"; then
6406 cat >> confdefs.h <<\EOF
6407 #define ENABLE_NLS 1
6410 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6411 echo "configure:6412: checking whether included gettext is requested" >&5
6412 # Check whether --with-included-gettext or --without-included-gettext was given.
6413 if test "${with_included_gettext+set}" = set; then
6414 withval="$with_included_gettext"
6415 nls_cv_force_use_gnu_gettext=$withval
6417 nls_cv_force_use_gnu_gettext=no
6420 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6422 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6423 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6429 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6430 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6431 echo "configure:6432: checking for libintl.h" >&5
6432 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6433 echo $ac_n "(cached) $ac_c" 1>&6
6435 cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438 #include <libintl.h>
6440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6441 { (eval echo configure:6442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6443 if test -z "$ac_err"; then
6445 eval "ac_cv_header_$ac_safe=yes"
6448 echo "configure: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6451 eval "ac_cv_header_$ac_safe=no"
6455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6456 echo "$ac_t""yes" 1>&6
6457 cat >> confdefs.h <<\EOF
6458 #define HAVE_LIBINTL_H 1
6461 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6462 echo "configure:6463: checking for GNU gettext in libc" >&5
6463 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6464 echo $ac_n "(cached) $ac_c" 1>&6
6466 cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6469 #include <libintl.h>
6470 extern int _nl_msg_cat_cntr;
6472 bindtextdomain ("", "");
6473 return (int) gettext ("") + _nl_msg_cat_cntr
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6478 gt_cv_func_gnugettext1_libc=yes
6480 echo "configure: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6483 gt_cv_func_gnugettext1_libc=no
6488 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6490 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6491 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6492 echo "configure:6493: checking for GNU gettext in libintl" >&5
6493 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6494 echo $ac_n "(cached) $ac_c" 1>&6
6496 gt_save_LIBS="$LIBS"
6497 LIBS="$LIBS -lintl $LIBICONV"
6498 cat > conftest.$ac_ext <<EOF
6499 #line 6500 "configure"
6500 #include "confdefs.h"
6501 #include <libintl.h>
6502 extern int _nl_msg_cat_cntr;
6504 bindtextdomain ("", "");
6505 return (int) gettext ("") + _nl_msg_cat_cntr
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6510 gt_cv_func_gnugettext1_libintl=yes
6512 echo "configure: failed program was:" >&5
6513 cat conftest.$ac_ext >&5
6515 gt_cv_func_gnugettext1_libintl=no
6518 LIBS="$gt_save_LIBS"
6521 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6524 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6525 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6526 && test "$PACKAGE" != gettext; }; then
6527 cat >> confdefs.h <<\EOF
6528 #define HAVE_GETTEXT 1
6532 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6533 INTLLIBS="-lintl $LIBICONV"
6536 gt_save_LIBS="$LIBS"
6537 LIBS="$LIBS $INTLLIBS"
6538 for ac_func in dcgettext
6540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6541 echo "configure:6542: checking for $ac_func" >&5
6542 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6543 echo $ac_n "(cached) $ac_c" 1>&6
6545 cat > conftest.$ac_ext <<EOF
6546 #line 6547 "configure"
6547 #include "confdefs.h"
6548 /* System header to define __stub macros and hopefully few prototypes,
6549 which can conflict with char $ac_func(); below. */
6551 /* Override any gcc2 internal prototype to avoid an error. */
6552 /* We use char because int might match the return type of a gcc2
6553 builtin and then its argument prototype would still apply. */
6558 /* The GNU C library defines this for functions which it implements
6559 to always fail with ENOSYS. Some functions are actually named
6560 something starting with __ and the normal name is an alias. */
6561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6569 if { (eval echo configure:6570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571 eval "ac_cv_func_$ac_func=yes"
6573 echo "configure: failed program was:" >&5
6574 cat conftest.$ac_ext >&5
6576 eval "ac_cv_func_$ac_func=no"
6581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6582 echo "$ac_t""yes" 1>&6
6583 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6584 cat >> confdefs.h <<EOF
6585 #define $ac_tr_func 1
6589 echo "$ac_t""no" 1>&6
6593 LIBS="$gt_save_LIBS"
6595 # Extract the first word of "msgfmt", so it can be a program name with args.
6596 set dummy msgfmt; ac_word=$2
6597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6598 echo "configure:6599: checking for $ac_word" >&5
6599 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6600 echo $ac_n "(cached) $ac_c" 1>&6
6604 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6607 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6608 for ac_dir in $PATH; do
6609 test -z "$ac_dir" && ac_dir=.
6610 if test -f $ac_dir/$ac_word; then
6611 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6612 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6618 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6622 MSGFMT="$ac_cv_path_MSGFMT"
6623 if test "$MSGFMT" != ":"; then
6624 echo "$ac_t""$MSGFMT" 1>&6
6626 echo "$ac_t""no" 1>&6
6629 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6630 set dummy gmsgfmt; ac_word=$2
6631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6632 echo "configure:6633: checking for $ac_word" >&5
6633 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6634 echo $ac_n "(cached) $ac_c" 1>&6
6638 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6641 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6644 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6646 for ac_dir in $ac_dummy; do
6647 test -z "$ac_dir" && ac_dir=.
6648 if test -f $ac_dir/$ac_word; then
6649 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6654 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6658 GMSGFMT="$ac_cv_path_GMSGFMT"
6659 if test -n "$GMSGFMT"; then
6660 echo "$ac_t""$GMSGFMT" 1>&6
6662 echo "$ac_t""no" 1>&6
6666 # Extract the first word of "xgettext", so it can be a program name with args.
6667 set dummy xgettext; ac_word=$2
6668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6669 echo "configure:6670: checking for $ac_word" >&5
6670 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6671 echo $ac_n "(cached) $ac_c" 1>&6
6675 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6678 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6679 for ac_dir in $PATH; do
6680 test -z "$ac_dir" && ac_dir=.
6681 if test -f $ac_dir/$ac_word; then
6682 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6683 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6689 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6693 XGETTEXT="$ac_cv_path_XGETTEXT"
6694 if test "$XGETTEXT" != ":"; then
6695 echo "$ac_t""$XGETTEXT" 1>&6
6697 echo "$ac_t""no" 1>&6
6705 echo "$ac_t""no" 1>&6
6709 if test "$CATOBJEXT" = "NONE"; then
6710 nls_cv_use_gnu_gettext=yes
6714 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6715 INTLOBJS="\$(GETTOBJS)"
6716 # Extract the first word of "msgfmt", so it can be a program name with args.
6717 set dummy msgfmt; ac_word=$2
6718 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6719 echo "configure:6720: checking for $ac_word" >&5
6720 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6721 echo $ac_n "(cached) $ac_c" 1>&6
6725 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6729 for ac_dir in $PATH; do
6730 test -z "$ac_dir" && ac_dir=.
6731 if test -f $ac_dir/$ac_word; then
6732 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6733 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6739 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6743 MSGFMT="$ac_cv_path_MSGFMT"
6744 if test "$MSGFMT" != ":"; then
6745 echo "$ac_t""$MSGFMT" 1>&6
6747 echo "$ac_t""no" 1>&6
6750 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6751 set dummy gmsgfmt; ac_word=$2
6752 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6753 echo "configure:6754: checking for $ac_word" >&5
6754 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6755 echo $ac_n "(cached) $ac_c" 1>&6
6759 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6762 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6767 for ac_dir in $ac_dummy; do
6768 test -z "$ac_dir" && ac_dir=.
6769 if test -f $ac_dir/$ac_word; then
6770 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6775 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6779 GMSGFMT="$ac_cv_path_GMSGFMT"
6780 if test -n "$GMSGFMT"; then
6781 echo "$ac_t""$GMSGFMT" 1>&6
6783 echo "$ac_t""no" 1>&6
6786 # Extract the first word of "xgettext", so it can be a program name with args.
6787 set dummy xgettext; ac_word=$2
6788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6789 echo "configure:6790: checking for $ac_word" >&5
6790 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6791 echo $ac_n "(cached) $ac_c" 1>&6
6795 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6799 for ac_dir in $PATH; do
6800 test -z "$ac_dir" && ac_dir=.
6801 if test -f $ac_dir/$ac_word; then
6802 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6803 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6809 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6813 XGETTEXT="$ac_cv_path_XGETTEXT"
6814 if test "$XGETTEXT" != ":"; then
6815 echo "$ac_t""$XGETTEXT" 1>&6
6817 echo "$ac_t""no" 1>&6
6821 BUILD_INCLUDED_LIBINTL=yes
6822 USE_INCLUDED_LIBINTL=yes
6824 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6825 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6826 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6829 if test "$GMSGFMT" != ":"; then
6830 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6833 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6838 if test "$XGETTEXT" != ":"; then
6839 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6842 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6852 if test "$PACKAGE" = gettext; then
6853 BUILD_INCLUDED_LIBINTL=yes
6856 for ac_prog in bison
6858 # Extract the first word of "$ac_prog", so it can be a program name with args.
6859 set dummy $ac_prog; ac_word=$2
6860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6861 echo "configure:6862: checking for $ac_word" >&5
6862 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6863 echo $ac_n "(cached) $ac_c" 1>&6
6865 if test -n "$INTLBISON"; then
6866 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6868 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6870 for ac_dir in $ac_dummy; do
6871 test -z "$ac_dir" && ac_dir=.
6872 if test -f $ac_dir/$ac_word; then
6873 ac_cv_prog_INTLBISON="$ac_prog"
6880 INTLBISON="$ac_cv_prog_INTLBISON"
6881 if test -n "$INTLBISON"; then
6882 echo "$ac_t""$INTLBISON" 1>&6
6884 echo "$ac_t""no" 1>&6
6887 test -n "$INTLBISON" && break
6890 if test -z "$INTLBISON"; then
6893 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6894 echo "configure:6895: checking version of bison" >&5
6895 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6896 case $ac_prog_version in
6897 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6898 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6899 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6900 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6902 echo "$ac_t""$ac_prog_version" 1>&6
6904 if test $ac_verc_fail = yes; then
6917 if test $USE_INCLUDED_LIBINTL = yes; then
6918 cat >> confdefs.h <<\EOF
6919 #define USE_INCLUDED_LIBINTL 1
6925 nls_cv_header_libgt=
6937 if test "x$CATOBJEXT" != x; then
6938 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6939 echo "configure:6940: checking for catalogs to be installed" >&5
6940 # Look for .po and .gmo files in the source directory.
6943 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6944 # If there aren't any .gmo files the shell will give us the
6945 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6947 case "$cat" in *\**)
6950 # The quadruple backslash is collapsed to a double backslash
6951 # by the backticks, then collapsed again by the double quotes,
6952 # leaving us with one backslash in the sed expression (right
6953 # before the dot that mustn't act as a wildcard). The dot to
6954 # be escaped in the second expression is hiding inside CATOBJEXT.
6955 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6956 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6957 # The user is allowed to set LINGUAS to a list of languages to
6958 # install catalogs for. If it's empty that means "all of them."
6959 if test "x$LINGUAS" = x; then
6960 CATALOGS="$CATALOGS $cat"
6961 XLINGUAS="$XLINGUAS $lang"
6963 case "$LINGUAS" in *$lang*)
6964 CATALOGS="$CATALOGS $cat"
6965 XLINGUAS="$XLINGUAS $lang"
6971 echo "$ac_t""$LINGUAS" 1>&6
6975 if test -n "$ac_aux_dir"; then
6976 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6978 if test -z "$MKINSTALLDIRS"; then
6979 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6983 INTL_LIBTOOL_SUFFIX_PREFIX=
6987 # Windows32 Registry support for specifying GCC installation paths.
6988 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6989 if test "${enable_win32_registry+set}" = set; then
6990 enableval="$enable_win32_registry"
6995 win32 | pe | cygwin* | mingw32* | uwin*)
6996 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6997 echo "configure:6998: checking whether windows registry support is requested" >&5
6998 if test "x$enable_win32_registry" != xno; then
6999 cat >> confdefs.h <<\EOF
7000 #define ENABLE_WIN32_REGISTRY 1
7003 echo "$ac_t""yes" 1>&6
7005 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7006 echo "configure:7007: checking for library containing RegOpenKeyExA" >&5
7007 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7008 echo $ac_n "(cached) $ac_c" 1>&6
7010 ac_func_search_save_LIBS="$LIBS"
7011 ac_cv_search_RegOpenKeyExA="no"
7012 cat > conftest.$ac_ext <<EOF
7013 #line 7014 "configure"
7014 #include "confdefs.h"
7015 /* Override any gcc2 internal prototype to avoid an error. */
7016 /* We use char because int might match the return type of a gcc2
7017 builtin and then its argument prototype would still apply. */
7018 char RegOpenKeyExA();
7024 if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7026 ac_cv_search_RegOpenKeyExA="none required"
7028 echo "configure: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7032 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7033 LIBS="-l$i $ac_func_search_save_LIBS"
7034 cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037 /* Override any gcc2 internal prototype to avoid an error. */
7038 /* We use char because int might match the return type of a gcc2
7039 builtin and then its argument prototype would still apply. */
7040 char RegOpenKeyExA();
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7048 ac_cv_search_RegOpenKeyExA="-l$i"
7051 echo "configure: failed program was:" >&5
7052 cat conftest.$ac_ext >&5
7056 LIBS="$ac_func_search_save_LIBS"
7059 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7060 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7061 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7067 echo "$ac_t""no" 1>&6
7070 # Check if user specified a different registry key.
7071 case "x${enable_win32_registry}" in
7074 gcc_cv_win32_registry_key="$VERSION"
7077 # no registry lookup.
7078 gcc_cv_win32_registry_key=''
7081 # user-specified key.
7082 gcc_cv_win32_registry_key="$enable_win32_registry"
7086 if test "x$enable_win32_registry" != xno; then
7087 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7088 echo "configure:7089: checking registry key on windows hosts" >&5
7089 cat >> confdefs.h <<EOF
7090 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7093 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7098 # Get an absolute path to the GCC top-level source directory
7099 holddir=`${PWDCMD-pwd}`
7101 topdir=`${PWDCMD-pwd}`
7104 # Conditionalize the makefile for this host machine.
7105 # Make-host contains the concatenation of all host makefile fragments
7106 # [there can be more than one]. This file is built by configure.frag.
7107 host_overrides=Make-host
7108 dep_host_xmake_file=
7109 for f in .. ${host_xmake_file}
7111 if test -f ${srcdir}/config/$f
7113 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7117 # Conditionalize the makefile for this target machine.
7118 # Make-target contains the concatenation of all host makefile fragments
7119 # [there can be more than one]. This file is built by configure.frag.
7120 target_overrides=Make-target
7122 for f in .. ${tmake_file}
7124 if test -f ${srcdir}/config/$f
7126 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7130 # If the host doesn't support symlinks, modify CC in
7131 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7132 # Otherwise, we can use "CC=$(CC)".
7134 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7136 cc_set_by_configure="\$(CC)"
7137 quoted_cc_set_by_configure="\$(CC)"
7138 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7139 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7142 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7144 symbolic_link="cp -p"
7148 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7149 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7150 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7151 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7155 out_object_file=`basename $out_file .c`.o
7158 for f in $tm_file; do
7161 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7163 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7164 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7169 for f in $tm_p_file; do
7172 tm_p_file_list="${tm_p_file_list} $f" ;;
7173 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7178 for f in $host_xm_file; do
7181 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7183 host_xm_file_list="${host_xm_file_list} $f" ;;
7185 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7186 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7191 for f in $build_xm_file; do
7194 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7195 auto-build.h | auto-host.h )
7196 build_xm_file_list="${build_xm_file_list} $f" ;;
7198 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7199 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7203 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7204 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7207 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7208 if test x$host != x$target
7210 CROSS="-DCROSS_COMPILE"
7212 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7213 case "$host","$target" in
7214 i?86-*-*,x86_64-*-* \
7215 | powerpc*-*-*,powerpc64*-*-*)
7216 CROSS="$CROSS -DNATIVE_CROSS" ;;
7220 # If this is a cross-compiler that does not
7221 # have its own set of headers then define
7224 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7225 # This prevents libgcc2 from containing any code which requires libc
7228 if { test x$host != x$target && test "x$with_headers" = x &&
7229 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7230 inhibit_libc=-Dinhibit_libc
7234 # When building gcc with a cross-compiler, we need to adjust things so
7235 # that the generator programs are still built with the native compiler.
7236 # Also, we cannot run fixincludes or fix-header.
7238 # These are the normal (build=host) settings:
7240 BUILD_PREFIX_1=ignore-
7242 BUILD_CFLAGS='$(ALL_CFLAGS)'
7244 STMP_FIXINC=stmp-fixinc
7245 STMP_FIXPROTO=stmp-fixproto
7247 # And these apply if build != host.
7248 if test x$build != x$host
7251 BUILD_PREFIX_1=build-
7252 BUILD_CC='$(CC_FOR_BUILD)'
7253 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7259 # Expand extra_headers to include complete path.
7260 # This substitutes for lots of t-* files.
7262 if test "x$extra_headers" = x
7265 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7266 for file in $extra_headers;
7268 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7272 if test x$use_collect2 = xno; then
7276 # Add a definition of USE_COLLECT2 if system wants one.
7277 if test x$use_collect2 != x
7279 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7280 xm_defines="${xm_defines} USE_COLLECT2"
7283 # If we have gas in the build tree, make a link to it.
7284 if test -f ../gas/Makefile; then
7285 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7288 # If we have nm and objdump in the build tree, make a link to them.
7289 if test -f ../binutils/Makefile; then
7290 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7291 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
7294 # If we have ld in the build tree, make a link to it.
7295 if test -f ../ld/Makefile; then
7296 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7299 # Figure out what assembler we will be using.
7300 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7301 echo "configure:7302: checking what assembler to use" >&5
7303 gcc_cv_gas_major_version=
7304 gcc_cv_gas_minor_version=
7305 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7306 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7307 if test -x "$DEFAULT_ASSEMBLER"; then
7308 gcc_cv_as="$DEFAULT_ASSEMBLER"
7309 elif test -x "$AS"; then
7311 elif test -x as$host_exeext; then
7312 # Build using assembler in the current directory.
7313 gcc_cv_as=./as$host_exeext
7314 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
7315 # Single tree build which includes gas.
7316 for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
7318 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7319 if test x$gcc_cv_gas_version != x; then
7323 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7324 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7325 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7328 if test "x$gcc_cv_as" = x; then
7329 # Search the same directories that the installed compiler will
7330 # search. Else we may find the wrong assembler and lose. If we
7331 # do not find a suitable assembler binary, then try the user's
7334 # Also note we have to check MD_EXEC_PREFIX before checking the
7335 # user's path. Unfortunately, there is no good way to get at the
7336 # value of MD_EXEC_PREFIX here. So we do a brute force search
7337 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7338 # to be fixed as part of the make/configure rewrite too.
7340 if test "x$exec_prefix" = xNONE; then
7341 if test "x$prefix" = xNONE; then
7342 test_prefix=/usr/local
7347 test_prefix=$exec_prefix
7350 # If the loop below does not find an assembler, then use whatever
7351 # one we can find in the users's path.
7353 if test "x$program_prefix" != xNONE; then
7354 gcc_cv_as=${program_prefix}as$host_exeext
7356 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7359 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7360 $test_prefix/lib/gcc-lib/$target_alias \
7361 /usr/lib/gcc/$target_alias/$gcc_version \
7362 /usr/lib/gcc/$target_alias \
7363 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7364 $test_prefix/$target_alias/bin"
7366 if test x$host = x$target; then
7367 test_dirs="$test_dirs \
7372 /bsd43/usr/lib/cmplrs/cc \
7373 /usr/cross64/usr/bin \
7374 /usr/lib/cmplrs/cc \
7375 /sysv/usr/lib/cmplrs/cc \
7376 /svr4/usr/lib/cmplrs/cc \
7380 for dir in $test_dirs; do
7381 if test -x $dir/as$host_exeext; then
7382 gcc_cv_as=$dir/as$host_exeext
7387 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7388 echo "$ac_t"""newly built gas"" 1>&6
7390 echo "$ac_t""$gcc_cv_as" 1>&6
7393 # Figure out what linker we will be using.
7394 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7395 echo "configure:7396: checking what linker to use" >&5
7397 gcc_cv_gld_major_version=
7398 gcc_cv_gld_minor_version=
7399 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7400 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7401 if test -x "$DEFAULT_LINKER"; then
7402 gcc_cv_ld="$DEFAULT_LINKER"
7403 elif test -x "$LD"; then
7405 elif test -x ld$host_exeext; then
7406 # Build using linker in the current directory.
7407 gcc_cv_ld=./ld$host_exeext
7408 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
7409 # Single tree build which includes ld.
7410 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
7412 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7413 if test x$gcc_cv_gld_version != x; then
7417 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7418 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7421 if test "x$gcc_cv_ld" = x; then
7422 # Search the same directories that the installed compiler will
7423 # search. Else we may find the wrong linker and lose. If we
7424 # do not find a suitable linker binary, then try the user's
7427 # Also note we have to check MD_EXEC_PREFIX before checking the
7428 # user's path. Unfortunately, there is no good way to get at the
7429 # value of MD_EXEC_PREFIX here. So we do a brute force search
7430 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7431 # to be fixed as part of the make/configure rewrite too.
7433 if test "x$exec_prefix" = xNONE; then
7434 if test "x$prefix" = xNONE; then
7435 test_prefix=/usr/local
7440 test_prefix=$exec_prefix
7443 # If the loop below does not find an linker, then use whatever
7444 # one we can find in the users's path.
7446 if test "x$program_prefix" != xNONE; then
7447 gcc_cv_ld=${program_prefix}ld$host_exeext
7449 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7452 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7453 $test_prefix/lib/gcc-lib/$target_alias \
7454 /usr/lib/gcc/$target_alias/$gcc_version \
7455 /usr/lib/gcc/$target_alias \
7456 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7457 $test_prefix/$target_alias/bin"
7459 if test x$host = x$target; then
7460 test_dirs="$test_dirs \
7465 /bsd43/usr/lib/cmplrs/cc \
7466 /usr/cross64/usr/bin \
7467 /usr/lib/cmplrs/cc \
7468 /sysv/usr/lib/cmplrs/cc \
7469 /svr4/usr/lib/cmplrs/cc \
7473 for dir in $test_dirs; do
7474 if test -x $dir/ld$host_exeext; then
7475 gcc_cv_ld=$dir/ld$host_exeext
7480 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7481 echo "$ac_t"""newly built ld"" 1>&6
7483 echo "$ac_t""$gcc_cv_ld" 1>&6
7486 # Figure out what nm we will be using.
7487 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7488 echo "configure:7489: checking what nm to use" >&5
7489 if test -x nm$host_exeext; then
7490 gcc_cv_nm=./nm$host_exeext
7491 elif test "x$program_prefix" != xNONE; then
7492 gcc_cv_nm=${program_prefix}nm$host_exeext
7494 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7496 echo "$ac_t""$gcc_cv_nm" 1>&6
7498 # Figure out what objdump we will be using.
7499 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7500 echo "configure:7501: checking what objdump to use" >&5
7501 if test -x objdump$host_exeext; then
7502 gcc_cv_objdump=./objdump$host_exeext
7503 elif test "x$program_prefix" != xNONE; then
7504 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7506 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7508 echo "$ac_t""$gcc_cv_objdump" 1>&6
7510 # Figure out what assembler alignment features are present.
7511 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7512 echo "configure:7513: checking assembler alignment features" >&5
7513 gcc_cv_as_alignment_features=none
7514 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7515 # Gas version 2.6 and later support for .balign and .p2align.
7516 # bytes to skip when using .p2align.
7517 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
7518 gcc_cv_as_alignment_features=".balign and .p2align"
7519 cat >> confdefs.h <<\EOF
7520 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7524 # Gas version 2.8 and later support specifying the maximum
7525 # bytes to skip when using .p2align.
7526 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
7527 gcc_cv_as_alignment_features=".p2align including maximum skip"
7528 cat >> confdefs.h <<\EOF
7529 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7533 elif test x$gcc_cv_as != x; then
7534 # Check if we have .balign and .p2align
7535 echo ".balign 4" > conftest.s
7536 echo ".p2align 2" >> conftest.s
7537 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7538 gcc_cv_as_alignment_features=".balign and .p2align"
7539 cat >> confdefs.h <<\EOF
7540 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7544 rm -f conftest.s conftest.o
7545 # Check if specifying the maximum bytes to skip when
7546 # using .p2align is supported.
7547 echo ".p2align 4,,7" > conftest.s
7548 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7549 gcc_cv_as_alignment_features=".p2align including maximum skip"
7550 cat >> confdefs.h <<\EOF
7551 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7555 rm -f conftest.s conftest.o
7557 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7559 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7560 echo "configure:7561: checking assembler subsection support" >&5
7561 gcc_cv_as_subsections=no
7562 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7563 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7564 gcc_cv_as_subsections="working .subsection -1"
7566 elif test x$gcc_cv_as != x; then
7567 # Check if we have .subsection
7568 echo ".subsection 1" > conftest.s
7569 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7570 gcc_cv_as_subsections=".subsection"
7571 if test x$gcc_cv_nm != x; then
7572 cat > conftest.s <<EOF
7573 conftest_label1: .word 0
7575 conftest_label2: .word 0
7578 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7579 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7580 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7581 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7584 gcc_cv_as_subsections="working .subsection -1"
7589 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7591 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7592 cat >> confdefs.h <<\EOF
7593 #define HAVE_GAS_SUBSECTION_ORDERING 1
7597 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7599 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7600 echo "configure:7601: checking assembler weak support" >&5
7602 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7603 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
7604 gcc_cv_as_weak="yes"
7606 elif test x$gcc_cv_as != x; then
7607 # Check if we have .weak
7608 echo " .weak foobar" > conftest.s
7609 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7610 gcc_cv_as_weak="yes"
7612 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7614 if test x"$gcc_cv_as_weak" = xyes; then
7615 cat >> confdefs.h <<\EOF
7616 #define HAVE_GAS_WEAK 1
7620 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7622 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7623 echo "configure:7624: checking assembler hidden support" >&5
7625 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7626 if test "$gcc_cv_gas_major_version" -eq 2 \
7627 -a "$gcc_cv_gas_minor_version" -eq 12 \
7628 -a "$gcc_cv_gas_patch_version" -ge 1 \
7629 -o "$gcc_cv_gas_major_version" -eq 2 \
7630 -a "$gcc_cv_gas_minor_version" -gt 12 \
7631 -o "$gcc_cv_gas_major_version" -gt 2 \
7632 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7633 gcc_cv_as_hidden="yes"
7635 elif test x$gcc_cv_as != x; then
7636 # Check if we have .hidden
7637 echo " .hidden foobar" > conftest.s
7638 echo "foobar:" >> conftest.s
7639 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7640 gcc_cv_as_hidden="yes"
7642 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7644 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7645 # This is irritatingly difficult to feature test for. Look for
7646 # the date string after the version number.
7647 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7648 if echo "$ld_ver" | grep GNU > /dev/null; then
7649 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7650 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'`
7651 if test 0"$ld_date" -lt 20020404; then
7652 if test -n "$ld_date"; then
7653 # If there was date string, but was earlier than 2002-04-04, fail
7654 gcc_cv_as_hidden="no"
7655 elif test -z "$ld_vers"; then
7656 # If there was no date string nor ld version number, something is wrong
7657 gcc_cv_as_hidden="no"
7659 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7660 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7661 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7662 test -z "$ld_vers_patch" && ld_vers_patch=0
7663 if test "$ld_vers_major" -lt 2; then
7664 gcc_cv_as_hidden="no"
7665 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7666 gcc_cv_as_hidden="no"
7667 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7668 -a "$ld_vers_patch" -eq 0; then
7669 gcc_cv_as_hidden="no"
7675 if test x"$gcc_cv_as_hidden" = xyes; then
7676 cat >> confdefs.h <<\EOF
7677 #define HAVE_GAS_HIDDEN 1
7681 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7682 libgcc_visibility=$gcc_cv_as_hidden
7685 if test x"$gnu_ld_flag" = x"no"; then
7686 # Even if using gas with .hidden support, the resulting object files
7687 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7688 # N64 linkers, the problem is that the linker refuses to accept
7689 # -call_shared (passed by default to the linker) and -r (used to
7690 # link the object file generated without .hidden directives with
7691 # one that hides symbols), so we also lose.
7692 libgcc_visibility=no
7698 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7699 echo "configure:7700: checking assembler leb128 support" >&5
7701 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7702 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7703 gcc_cv_as_leb128="yes"
7705 elif test x$gcc_cv_as != x; then
7706 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7707 cat > conftest.s <<EOF
7715 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7716 gcc_cv_as_leb128="yes"
7718 # GAS versions before 2.11 do not support uleb128,
7719 # despite appearing to.
7720 # ??? There exists an elf-specific test that will crash
7721 # the assembler. Perhaps it's better to figure out whether
7722 # arbitrary sections are supported and try the test.
7723 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7724 if echo "$as_ver" | grep GNU > /dev/null; then
7725 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7726 as_major=`echo $as_ver | sed 's/\..*//'`
7727 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7728 if test $as_major -eq 2 -a $as_minor -lt 11; then
7729 gcc_cv_as_leb128="no"
7733 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7735 if test x"$gcc_cv_as_leb128" = xyes; then
7736 cat >> confdefs.h <<\EOF
7737 #define HAVE_AS_LEB128 1
7741 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7743 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7744 echo "configure:7745: checking assembler eh_frame optimization" >&5
7745 gcc_cv_as_eh_frame=no
7746 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7747 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7748 gcc_cv_as_eh_frame="yes"
7750 elif test x$gcc_cv_as != x; then
7751 # Check if this is GAS.
7752 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7753 rm -f a.out 2> /dev/null
7754 if echo "$as_ver" | grep GNU > /dev/null; then
7755 # Versions up to and including 2.11.0 may mis-optimize
7756 # .eh_frame data. Try something.
7757 cat > conftest.s <<EOF
7764 .section .eh_frame,"aw",@progbits
7766 .4byte .LECIE1-.LSCIE1
7780 .4byte .LEFDE1-.LASFDE1
7782 .4byte .LASFDE1-__FRAME_BEGIN__
7791 cat > conftest.lit <<EOF
7792 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7793 0010 01000000 12000000 18000000 00000000 ................
7794 0020 08000000 04080000 0044 .........D
7796 cat > conftest.big <<EOF
7797 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7798 0010 00000001 00000012 00000018 00000000 ................
7799 0020 00000008 04000000 0844 .........D
7801 # If the assembler didn't choke, and we can objdump,
7802 # and we got the correct data, then succeed.
7803 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7804 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7805 | tail -3 > conftest.got \
7806 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7807 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7809 gcc_cv_as_eh_frame="yes"
7811 gcc_cv_as_eh_frame="bad"
7812 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7813 cat >> confdefs.h <<\EOF
7814 #define USE_AS_TRADITIONAL_FORMAT 1
7822 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7824 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7825 echo "configure:7826: checking assembler section merging support" >&5
7826 gcc_cv_as_shf_merge=no
7827 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7828 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7829 gcc_cv_as_shf_merge=yes
7831 elif test x$gcc_cv_as != x; then
7832 # Check if we support SHF_MERGE sections
7833 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7834 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7835 gcc_cv_as_shf_merge=yes
7837 rm -f conftest.s conftest.o
7839 if test x"$gcc_cv_as_shf_merge" = xyes; then
7840 cat >> confdefs.h <<\EOF
7841 #define HAVE_GAS_SHF_MERGE 1
7845 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7847 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7848 echo "configure:7849: checking assembler thread-local storage support" >&5
7856 .section ".tdata","awT",@progbits
7859 ldq $27,__tls_get_addr($29) !literal!1
7860 lda $16,foo($29) !tlsgd!1
7861 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7862 ldq $27,__tls_get_addr($29) !literal!2
7863 lda $16,foo($29) !tlsldm!2
7864 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7865 ldq $1,foo($29) !gotdtprel
7866 ldah $2,foo($29) !dtprelhi
7867 lda $3,foo($2) !dtprello
7868 lda $4,foo($29) !dtprel
7869 ldq $1,foo($29) !gottprel
7870 ldah $2,foo($29) !tprelhi
7871 lda $3,foo($2) !tprello
7872 lda $4,foo($29) !tprel'
7878 .section ".tdata","awT",@progbits
7882 leal foo@TLSGD(,%ebx,1), %eax
7883 leal foo@TLSLDM(%ebx), %eax
7884 leal foo@DTPOFF(%eax), %edx
7885 movl foo@GOTTPOFF(%ebx), %eax
7886 subl foo@GOTTPOFF(%ebx), %eax
7887 addl foo@GOTNTPOFF(%ebx), %eax
7888 movl foo@INDNTPOFF, %eax
7889 movl $foo@TPOFF, %eax
7890 subl $foo@TPOFF, %eax
7891 leal foo@NTPOFF(%ecx), %eax'
7897 .section ".tdata","awT",@progbits
7901 leaq foo@TLSGD(%rip), %rdi
7902 leaq foo@TLSLD(%rip), %rdi
7903 leaq foo@DTPOFF(%rax), %rdx
7904 movq foo@GOTTPOFF(%rip), %rax
7905 movq $foo@TPOFF, %rax'
7911 .section ".tdata","awT",@progbits
7914 addl r16 = @ltoff(@dtpmod(foo#)), gp
7915 addl r17 = @ltoff(@dtprel(foo#)), gp
7916 addl r18 = @ltoff(@tprel(foo#)), gp
7917 addl r19 = @dtprel(foo#), gp
7918 adds r21 = @dtprel(foo#), r13
7919 movl r23 = @dtprel(foo#)
7920 addl r20 = @tprel(foo#), gp
7921 adds r22 = @tprel(foo#), r13
7922 movl r24 = @tprel(foo#)'
7927 if test -z "$tls_first_major"; then
7929 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7931 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7932 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7933 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7936 elif test x$gcc_cv_as != x; then
7937 echo "$conftest_s" > conftest.s
7938 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7942 rm -f conftest.s conftest.o
7944 if test "$gcc_cv_as_tls" = yes; then
7945 cat >> confdefs.h <<\EOF
7946 #define HAVE_AS_TLS 1
7950 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7953 # All TARGET_ABI_OSF targets.
7954 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7955 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7956 echo "configure:7957: checking assembler supports explicit relocations" >&5
7957 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7958 echo $ac_n "(cached) $ac_c" 1>&6
7961 gcc_cv_as_explicit_relocs=unknown
7962 if test x$gcc_cv_gas_major_version != x \
7963 -a x$gcc_cv_gas_minor_version != x
7965 if test "$gcc_cv_gas_major_version" -eq 2 \
7966 -a "$gcc_cv_gas_minor_version" -ge 12 \
7967 -o "$gcc_cv_gas_major_version" -gt 2; then
7968 gcc_cv_as_explicit_relocs=yes
7970 elif test x$gcc_cv_as != x; then
7971 cat > conftest.s << 'EOF'
7974 extbl $3, $2, $3 !lituse_bytoff!1
7975 ldq $2, a($29) !literal!1
7976 ldq $4, b($29) !literal!2
7977 ldq_u $3, 0($2) !lituse_base!1
7978 ldq $27, f($29) !literal!5
7979 jsr $26, ($27), f !lituse_jsr!5
7980 ldah $29, 0($26) !gpdisp!3
7981 lda $0, c($29) !gprel
7982 ldah $1, d($29) !gprelhigh
7983 lda $1, d($1) !gprellow
7984 lda $29, 0($29) !gpdisp!3
7986 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7987 gcc_cv_as_explicit_relocs=yes
7989 gcc_cv_as_explicit_relocs=no
7991 rm -f conftest.s conftest.o
7996 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7997 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7998 cat >> confdefs.h <<\EOF
7999 #define HAVE_AS_EXPLICIT_RELOCS 1
8005 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8006 echo "configure:8007: checking assembler .register pseudo-op support" >&5
8007 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8008 echo $ac_n "(cached) $ac_c" 1>&6
8011 gcc_cv_as_register_pseudo_op=unknown
8012 if test x$gcc_cv_as != x; then
8013 # Check if we have .register
8014 echo ".register %g2, #scratch" > conftest.s
8015 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8016 gcc_cv_as_register_pseudo_op=yes
8018 gcc_cv_as_register_pseudo_op=no
8020 rm -f conftest.s conftest.o
8025 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8026 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8027 cat >> confdefs.h <<\EOF
8028 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8033 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8034 echo "configure:8035: checking assembler supports -relax" >&5
8035 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8036 echo $ac_n "(cached) $ac_c" 1>&6
8039 gcc_cv_as_relax_opt=unknown
8040 if test x$gcc_cv_as != x; then
8041 # Check if gas supports -relax
8042 echo ".text" > conftest.s
8043 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8044 gcc_cv_as_relax_opt=yes
8046 gcc_cv_as_relax_opt=no
8048 rm -f conftest.s conftest.o
8053 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8054 if test "x$gcc_cv_as_relax_opt" = xyes; then
8055 cat >> confdefs.h <<\EOF
8056 #define HAVE_AS_RELAX_OPTION 1
8061 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8062 echo "configure:8063: checking assembler and linker support unaligned pc related relocs" >&5
8063 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8064 echo $ac_n "(cached) $ac_c" 1>&6
8067 gcc_cv_as_sparc_ua_pcrel=unknown
8068 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8069 gcc_cv_as_sparc_ua_pcrel=no
8070 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8071 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8072 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8073 gcc_cv_as_sparc_ua_pcrel=yes
8075 rm -f conftest.s conftest.o conftest
8080 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8081 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8082 cat >> confdefs.h <<\EOF
8083 #define HAVE_AS_SPARC_UA_PCREL 1
8088 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8089 echo "configure:8090: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8090 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8091 echo $ac_n "(cached) $ac_c" 1>&6
8094 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8095 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8096 if test x$gcc_cv_objdump != x; then
8097 gcc_cv_as_sparc_ua_pcrel_hidden=no
8098 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8099 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8100 echo "foo: .skip 4" >> conftest.s
8101 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8102 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8103 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8104 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8105 if $gcc_cv_objdump -R conftest 2> /dev/null \
8106 | grep 'DISP32' > /dev/null 2>&1; then
8109 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8113 rm -f conftest.s conftest.o conftest
8115 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8120 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8121 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8122 cat >> confdefs.h <<\EOF
8123 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8128 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8129 echo "configure:8130: checking for assembler offsetable %lo() support" >&5
8130 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8131 echo $ac_n "(cached) $ac_c" 1>&6
8134 gcc_cv_as_offsetable_lo10=unknown
8135 if test "x$gcc_cv_as" != x; then
8136 # Check if assembler has offsetable %lo()
8137 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8138 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8139 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8141 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8142 > /dev/null 2>&1; then
8143 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8144 gcc_cv_as_offsetable_lo10=no
8146 gcc_cv_as_offsetable_lo10=yes
8149 gcc_cv_as_offsetable_lo10=no
8151 rm -f conftest.s conftest.o conftest1.s conftest1.o
8156 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8157 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8158 cat >> confdefs.h <<\EOF
8159 #define HAVE_AS_OFFSETABLE_LO10 1
8166 i[34567]86-*-* | x86_64-*-*)
8167 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8168 echo "configure:8169: checking assembler instructions" >&5
8169 gcc_cv_as_instructions=
8170 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
8171 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
8172 gcc_cv_as_instructions="filds fists"
8174 elif test x$gcc_cv_as != x; then
8175 set "filds fists" "filds mem; fists mem"
8178 echo "$2" > conftest.s
8179 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8180 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8184 rm -f conftest.s conftest.o
8186 if test x"$gcc_cv_as_instructions" != x; then
8187 cat >> confdefs.h <<EOF
8188 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8192 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8194 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8195 echo "configure:8196: checking assembler GOTOFF in data directives" >&5
8196 gcc_cv_as_gotoff_in_data=no
8197 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
8199 if test "$gcc_cv_gas_major_version" -eq 2 \
8200 -a "$gcc_cv_gas_minor_version" -ge 11 \
8201 -o "$gcc_cv_gas_major_version" -gt 2; then
8202 gcc_cv_as_gotoff_in_data=yes
8204 elif test x$gcc_cv_as != x; then
8205 cat > conftest.s <<EOF
8212 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8213 gcc_cv_as_gotoff_in_data=yes
8216 cat >> confdefs.h <<EOF
8217 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8220 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8224 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8225 echo "configure:8226: checking assembler dwarf2 debug_line support" >&5
8226 gcc_cv_as_dwarf2_debug_line=no
8227 # ??? Not all targets support dwarf2 debug_line, even within a version
8228 # of gas. Moreover, we need to emit a valid instruction to trigger any
8229 # info to the output file. So, as supported targets are added to gas 2.11,
8230 # add some instruction here to (also) show we expect this might work.
8231 # ??? Once 2.11 is released, probably need to add first known working
8232 # version to the per-target configury.
8234 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8235 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
8242 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8244 if test "$gcc_cv_gas_major_version" -eq 2 \
8245 -a "$gcc_cv_gas_minor_version" -ge 11 \
8246 -o "$gcc_cv_gas_major_version" -gt 2 \
8247 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8248 && test x"$insn" != x ; then
8249 gcc_cv_as_dwarf2_debug_line="yes"
8251 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8252 echo ' .file 1 "conftest.s"' > conftest.s
8253 echo ' .loc 1 3 0' >> conftest.s
8254 echo " $insn" >> conftest.s
8255 # ??? This fails with non-gnu grep.
8256 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8257 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8258 # The .debug_line file table must be in the exact order that
8259 # we specified the files, since these indices are also used
8260 # by DW_AT_decl_file. Approximate this test by testing if
8261 # the assembler bitches if the same index is assigned twice.
8262 echo ' .file 1 "foo.s"' > conftest.s
8263 echo ' .file 1 "bar.s"' >> conftest.s
8264 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8266 gcc_cv_as_dwarf2_debug_line="no"
8268 gcc_cv_as_dwarf2_debug_line="yes"
8271 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8273 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8274 cat >> confdefs.h <<\EOF
8275 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8279 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8281 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8282 echo "configure:8283: checking assembler --gdwarf2 support" >&5
8283 gcc_cv_as_gdwarf2_flag=no
8284 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8286 if test "$gcc_cv_gas_major_version" -eq 2 \
8287 -a "$gcc_cv_gas_minor_version" -ge 11 \
8288 -o "$gcc_cv_gas_major_version" -gt 2 \
8289 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8290 && test x"$insn" != x ; then
8291 gcc_cv_as_gdwarf2_flag="yes"
8293 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8294 echo '' > conftest.s
8295 # ??? This fails with non-gnu grep.
8296 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8298 gcc_cv_as_gdwarf2_flag="yes"
8300 rm -f conftest.s conftest.o
8302 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8303 cat >> confdefs.h <<\EOF
8304 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8308 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8310 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8311 echo "configure:8312: checking assembler --gstabs support" >&5
8312 gcc_cv_as_gstabs_flag=no
8313 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8315 if test "$gcc_cv_gas_major_version" -eq 2 \
8316 -a "$gcc_cv_gas_minor_version" -ge 11 \
8317 -o "$gcc_cv_gas_major_version" -gt 2 \
8318 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8319 && test x"$insn" != x ; then
8320 gcc_cv_as_gstabs_flag="yes"
8322 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8323 echo '' > conftest.s
8324 # ??? This fails with non-gnu grep.
8325 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8326 gcc_cv_as_gstabs_flag="yes"
8328 rm -f conftest.s conftest.o
8330 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8331 cat >> confdefs.h <<\EOF
8332 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8336 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8338 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8339 echo "configure:8340: checking linker read-only and read-write section mixing" >&5
8340 gcc_cv_ld_ro_rw_mix=unknown
8341 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8342 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8343 gcc_cv_ld_ro_rw_mix=read-write
8345 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8346 echo '.section "myfoosect", "a"' > conftest1.s
8347 echo '.section "myfoosect", "aw"' > conftest2.s
8348 echo '.byte 1' >> conftest2.s
8349 echo '.section "myfoosect", "a"' > conftest3.s
8350 echo '.byte 0' >> conftest3.s
8351 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8352 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8353 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8354 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8355 conftest2.o conftest3.o; then
8356 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8357 | grep -A1 myfoosect`
8358 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8359 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8360 gcc_cv_ld_ro_rw_mix=read-only
8362 gcc_cv_ld_ro_rw_mix=read-write
8366 rm -f conftest.* conftest[123].*
8368 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8369 cat >> confdefs.h <<\EOF
8370 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8374 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8376 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8377 echo "configure:8378: checking linker PT_GNU_EH_FRAME support" >&5
8378 gcc_cv_ld_eh_frame_hdr=no
8379 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8380 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8381 gcc_cv_ld_eh_frame_hdr=yes
8383 elif test x$gcc_cv_ld != x; then
8384 # Check if linker supports --eh-frame-hdr option
8385 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8386 gcc_cv_ld_eh_frame_hdr=yes
8389 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8390 cat >> confdefs.h <<\EOF
8391 #define HAVE_LD_EH_FRAME_HDR 1
8395 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8397 # Miscellaneous target-specific checks.
8400 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8401 echo "configure:8402: checking whether libgloss uses STARTUP directives consistently" >&5
8402 gcc_cv_mips_libgloss_startup=no
8403 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8404 if test "x$exec_prefix" = xNONE; then
8405 if test "x$prefix" = xNONE; then
8406 test_prefix=/usr/local
8411 test_prefix=$exec_prefix
8413 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8415 if grep '^STARTUP' $f > /dev/null 2>&1; then
8416 gcc_cv_mips_libgloss_startup=yes
8420 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8421 cat >> confdefs.h <<\EOF
8422 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8426 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8430 if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8431 cat >> confdefs.h <<EOF
8432 #define PREFIX_INCLUDE_DIR "$prefix/include"
8437 # Figure out what language subdirectories are present.
8438 # Look if the user specified --enable-languages="..."; if not, use
8439 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8441 # NB: embedded tabs in this IF block -- do not untabify
8442 if test x"${enable_languages+set}" != xset; then
8443 if test x"${LANGUAGES+set}" = xset; then
8444 enable_languages="${LANGUAGES}"
8445 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8448 enable_languages=all
8451 if test x"${enable_languages}" = x \
8452 || test x"${enable_languages}" = xyes;
8454 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8457 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8459 # First scan to see if an enabled language requires some other language.
8460 # We assume that a given config-lang.in will list all the language
8461 # front ends it requires, even if some are required indirectly.
8462 for lang in ${srcdir}/*/config-lang.in ..
8467 # The odd quoting in the next line works around
8468 # an apparent bug in bash 1.12 on linux.
8469 ${srcdir}/[*]/config-lang.in)
8472 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8473 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8474 for other in $this_lang_requires
8476 case ,${enable_languages}, in
8482 enable_languages="$enable_languages,$other"
8490 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8493 for lang in ${srcdir}/*/config-lang.in ..
8497 # The odd quoting in the next line works around
8498 # an apparent bug in bash 1.12 on linux.
8499 ${srcdir}/[*]/config-lang.in) ;;
8501 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8502 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8503 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8504 if test "x$lang_alias" = x
8506 echo "$lang doesn't set \$language." 1>&2
8509 case ${build_by_default},${enable_languages}, in
8510 *,$lang_alias,*) add_this_lang=yes ;;
8511 no,*) add_this_lang=no ;;
8512 *,all,*) add_this_lang=yes ;;
8513 *) add_this_lang=no ;;
8515 found_languages="${found_languages} ${lang_alias}"
8516 if test x"${add_this_lang}" = xyes; then
8518 ${srcdir}/ada/config-lang.in)
8519 if test x$have_gnat = xyes ; then
8520 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8524 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8533 for expected_language in ${expected_languages} ..
8535 if test "${expected_language}" != ..; then
8536 missing_language="${expected_language}"
8537 if test "${expected_language}" = "c" \
8538 || test "${expected_language}" = "all"; then
8541 for found_language in ${found_languages} ..
8543 if test "${found_language}" != ..; then
8544 if test "${expected_language}" = "${found_language}"; then
8549 if test "x${missing_language}" != x; then
8550 missing_languages="${missing_languages} ${missing_language}"
8555 if test "x$missing_languages" != x; then
8556 { echo "configure: error:
8557 The following requested languages were not found:${missing_languages}
8558 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8561 # Make gthr-default.h if we have a thread file.
8563 if test $thread_file != single; then
8564 rm -f gthr-default.h
8565 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8566 gthread_flags=-DHAVE_GTHR_DEFAULT
8570 # Find out what GC implementation we want, or may, use.
8571 # Check whether --with-gc or --without-gc was given.
8572 if test "${with_gc+set}" = set; then
8579 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8587 echo "Using $GGC for garbage collection."
8589 # Use the system's zlib library.
8591 zlibinc="-I\$(srcdir)/../zlib"
8592 # Check whether --with-system-zlib or --without-system-zlib was given.
8593 if test "${with_system_zlib+set}" = set; then
8594 withval="$with_system_zlib"
8604 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8605 echo "configure:8606: checking whether to enable maintainer-specific portions of Makefiles" >&5
8606 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8607 if test "${enable_maintainer_mode+set}" = set; then
8608 enableval="$enable_maintainer_mode"
8609 maintainer_mode=$enableval
8615 echo "$ac_t""$maintainer_mode" 1>&6
8617 if test "$maintainer_mode" = "yes"; then
8623 # Make empty files to contain the specs and options for each language.
8624 # Then add #include lines to for a compiler that has specs and/or options.
8629 for subdir in . $subdirs
8631 if test -f $srcdir/$subdir/lang-specs.h; then
8632 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8634 if test -f $srcdir/$subdir/lang-options.h; then
8635 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8637 if test -f $srcdir/$subdir/$subdir-tree.def; then
8638 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8642 # These (without "all_") are set in each config-lang.in.
8643 # `language' must be a single word so is spelled singularly.
8648 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8649 # List of language makefile fragments.
8651 # Files for gengtype
8652 all_gtfiles="$target_gtfiles"
8653 # Files for gengtype with language
8654 all_gtfiles_files_langs=
8655 all_gtfiles_files_files=
8657 # Add the language fragments.
8658 # Languages are added via two mechanisms. Some information must be
8659 # recorded in makefile variables, these are defined in config-lang.in.
8660 # We accumulate them and plug them into the main Makefile.
8661 # The other mechanism is a set of hooks for each of the main targets
8662 # like `clean', `install', etc.
8664 language_fragments="Make-lang"
8665 language_hooks="Make-hooks"
8667 for s in .. $subdirs
8677 . ${srcdir}/$s/config-lang.in
8678 if test "x$language" = x
8680 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8683 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8684 if test -f ${srcdir}/$s/Makefile.in
8685 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8687 all_languages="$all_languages $language"
8688 if test "x$boot_language" = xyes
8690 all_boot_languages="$all_boot_languages $language"
8692 all_compilers="$all_compilers $compilers"
8693 all_stagestuff="$all_stagestuff $stagestuff"
8694 all_outputs="$all_outputs $outputs"
8695 all_gtfiles="$all_gtfiles $gtfiles"
8696 for f in .. $gtfiles
8700 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8701 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8707 # Pick up gtfiles for c
8710 . ${srcdir}/c-config-lang.in
8711 all_gtfiles="$all_gtfiles $gtfiles"
8712 for f in .. $gtfiles
8716 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8717 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8722 for language in .. $all_languages
8724 if test $language != ".."
8726 check_languages="$check_languages check-$language"
8730 # Since we can't use `::' targets, we link each language in
8731 # with a set of hooks, reached indirectly via lang.${target}.
8735 target_list="all.build all.cross start.encap rest.encap \
8736 info dvi generated-manpages \
8737 install-normal install-common install-info install-man \
8739 mostlyclean clean distclean extraclean maintainer-clean \
8740 stage1 stage2 stage3 stage4"
8741 for t in $target_list
8744 for lang in .. $all_languages
8746 if test $lang != ".."; then
8750 echo "lang.$t: $x" >> Make-hooks
8755 echo "dir ." > .gdbinit
8756 echo "dir ${srcdir}" >> .gdbinit
8757 if test x$gdb_needs_out_file_path = xyes
8759 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8761 if test "x$subdirs" != x; then
8764 echo "dir ${srcdir}/$s" >> .gdbinit
8767 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8769 # Define variables host_canonical and build_canonical
8770 # because some Cygnus local changes in the Makefile depend on them.
8771 build_canonical=${build}
8772 host_canonical=${host}
8774 if test "${host}" != "${target}" ; then
8775 target_subdir=${target_alias}/
8781 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8782 # absolute path for gcc_tooldir based on inserting the number of up-directory
8783 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8784 # $(libsubdir)/@(unlibsubdir) based path.
8785 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8786 # make and thus we'd get different behavior depending on where we built the
8788 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8789 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8791 # An explanation of the sed strings:
8792 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8793 # -e 's|/$||' match a trailing forward slash and eliminates it
8794 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8795 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8797 # (*) Note this pattern overwrites the first character of the string
8798 # with a forward slash if one is not already present. This is not a
8799 # problem because the exact names of the sub-directories concerned is
8800 # unimportant, just the number of them matters.
8802 # The practical upshot of these patterns is like this:
8804 # prefix exec_prefix result
8805 # ------ ----------- ------
8807 # /foo/ /foo/bar ../
8808 # /foo /foo/bar/ ../
8809 # /foo/ /foo/bar/ ../
8810 # /foo /foo/bar/ugg ../../
8813 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8818 # Find a directory in which to install a shared libgcc.
8820 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8821 if test "${enable_version_specific_runtime_libs+set}" = set; then
8822 enableval="$enable_version_specific_runtime_libs"
8827 # Check whether --with-slibdir or --without-slibdir was given.
8828 if test "${with_slibdir+set}" = set; then
8829 withval="$with_slibdir"
8830 slibdir="$with_slibdir"
8832 if test "${enable_version_specific_runtime_libs+set}" = set; then
8833 slibdir='$(libsubdir)'
8834 elif test "$host" != "$target"; then
8835 slibdir='$(build_tooldir)/lib'
8843 objdir=`${PWDCMD-pwd}`
8846 # Process the language and host/target makefile fragments.
8847 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8849 # Substitute configuration variables
8918 # Echo that links are built
8919 if test x$host = x$target
8927 if test x$host != x$build
8929 str3=" on a $build system"
8932 if test "x$str2" != x || test "x$str3" != x
8937 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8939 if test "x$str2" != x || test "x$str3" != x
8941 echo " ${str2}${str3}." 1>&2
8944 # Truncate the target if necessary
8945 if test x$host_truncate_target != x; then
8946 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8949 # Configure the subdirectories
8950 # AC_CONFIG_SUBDIRS($subdirs)
8952 # Create the Makefile
8953 # and configure language subdirectories
8955 cat > confcache <<\EOF
8956 # This file is a shell script that caches the results of configure
8957 # tests run on this system so they can be shared between configure
8958 # scripts and configure runs. It is not useful on other systems.
8959 # If it contains results you don't want to keep, you may remove or edit it.
8961 # By default, configure uses ./config.cache as the cache file,
8962 # creating it if it does not exist already. You can give configure
8963 # the --cache-file=FILE option to use a different cache file; that is
8964 # what configure does when it calls configure scripts in
8965 # subdirectories, so they share the cache.
8966 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8967 # config.status only pays attention to the cache file if you give it the
8968 # --recheck option to rerun configure.
8971 # The following way of writing the cache mishandles newlines in values,
8972 # but we know of no workaround that is simple, portable, and efficient.
8973 # So, don't put newlines in cache variables' values.
8974 # Ultrix sh set writes to stderr and can't be redirected directly,
8975 # and sets the high bit in the cache file unless we assign to the vars.
8977 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8979 # `set' does not quote correctly, so add quotes (double-quote substitution
8980 # turns \\\\ into \\, and sed turns \\ into \).
8982 -e "s/'/'\\\\''/g" \
8983 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8986 # `set' quotes correctly as required by POSIX, so do not add quotes.
8987 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8990 if cmp -s $cache_file confcache; then
8993 if test -w $cache_file; then
8994 echo "updating cache $cache_file"
8995 cat confcache > $cache_file
8997 echo "not updating unwritable cache $cache_file"
9002 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9004 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9005 # Let make expand exec_prefix.
9006 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9008 # Any assignment to VPATH causes Sun make to only execute
9009 # the first set of double-colon rules, so remove it if not needed.
9010 # If there is a colon in the path, we need to keep it.
9011 if test "x$srcdir" = x.; then
9012 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9015 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9017 DEFS=-DHAVE_CONFIG_H
9019 # Without the "./", some shells look in PATH for config.status.
9020 : ${CONFIG_STATUS=./config.status}
9022 echo creating $CONFIG_STATUS
9023 rm -f $CONFIG_STATUS
9024 cat > $CONFIG_STATUS <<EOF
9026 # Generated automatically by configure.
9027 # Run this file to recreate the current configuration.
9028 # This directory was configured as follows,
9029 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9031 # $0 $ac_configure_args
9033 # Compiler output produced by configure, useful for debugging
9034 # configure, is in ./config.log if it exists.
9036 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9039 case "\$ac_option" in
9040 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9041 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9042 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9043 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9044 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9046 -help | --help | --hel | --he | --h)
9047 echo "\$ac_cs_usage"; exit 0 ;;
9048 *) echo "\$ac_cs_usage"; exit 1 ;;
9052 ac_given_srcdir=$srcdir
9054 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9056 cat >> $CONFIG_STATUS <<EOF
9058 # Protect against being on the right side of a sed subst in config.status.
9059 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9060 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9064 s%@CFLAGS@%$CFLAGS%g
9065 s%@CPPFLAGS@%$CPPFLAGS%g
9066 s%@CXXFLAGS@%$CXXFLAGS%g
9067 s%@FFLAGS@%$FFLAGS%g
9069 s%@LDFLAGS@%$LDFLAGS%g
9071 s%@exec_prefix@%$exec_prefix%g
9072 s%@prefix@%$prefix%g
9073 s%@program_transform_name@%$program_transform_name%g
9074 s%@bindir@%$bindir%g
9075 s%@sbindir@%$sbindir%g
9076 s%@libexecdir@%$libexecdir%g
9077 s%@datadir@%$datadir%g
9078 s%@sysconfdir@%$sysconfdir%g
9079 s%@sharedstatedir@%$sharedstatedir%g
9080 s%@localstatedir@%$localstatedir%g
9081 s%@libdir@%$libdir%g
9082 s%@includedir@%$includedir%g
9083 s%@oldincludedir@%$oldincludedir%g
9084 s%@infodir@%$infodir%g
9085 s%@mandir@%$mandir%g
9087 s%@host_alias@%$host_alias%g
9088 s%@host_cpu@%$host_cpu%g
9089 s%@host_vendor@%$host_vendor%g
9090 s%@host_os@%$host_os%g
9091 s%@target@%$target%g
9092 s%@target_alias@%$target_alias%g
9093 s%@target_cpu@%$target_cpu%g
9094 s%@target_vendor@%$target_vendor%g
9095 s%@target_os@%$target_os%g
9097 s%@build_alias@%$build_alias%g
9098 s%@build_cpu@%$build_cpu%g
9099 s%@build_vendor@%$build_vendor%g
9100 s%@build_os@%$build_os%g
9102 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9103 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9104 s%@GNATBIND@%$GNATBIND%g
9106 s%@strict1_warn@%$strict1_warn%g
9108 s%@warn_cflags@%$warn_cflags%g
9109 s%@enable_multilib@%$enable_multilib%g
9110 s%@nocommon_flag@%$nocommon_flag%g
9111 s%@valgrind_path@%$valgrind_path%g
9112 s%@valgrind_path_defines@%$valgrind_path_defines%g
9113 s%@valgrind_command@%$valgrind_command%g
9114 s%@coverage_flags@%$coverage_flags%g
9115 s%@enable_shared@%$enable_shared%g
9116 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9117 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9118 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9119 s%@stage1_cflags@%$stage1_cflags%g
9120 s%@SET_MAKE@%$SET_MAKE%g
9124 s%@RANLIB@%$RANLIB%g
9125 s%@INSTALL@%$INSTALL%g
9126 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9127 s%@INSTALL_DATA@%$INSTALL_DATA%g
9128 s%@have_mktemp_command@%$have_mktemp_command%g
9129 s%@MAKEINFO@%$MAKEINFO%g
9130 s%@BUILD_INFO@%$BUILD_INFO%g
9131 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9134 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9135 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9136 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9137 s%@LIBICONV@%$LIBICONV%g
9138 s%@manext@%$manext%g
9139 s%@objext@%$objext%g
9140 s%@extra_modes_file@%$extra_modes_file%g
9141 s%@FORBUILD@%$FORBUILD%g
9142 s%@PACKAGE@%$PACKAGE%g
9143 s%@VERSION@%$VERSION%g
9144 s%@ALLOCA@%$ALLOCA%g
9145 s%@GLIBC21@%$GLIBC21%g
9146 s%@USE_NLS@%$USE_NLS%g
9147 s%@MSGFMT@%$MSGFMT%g
9148 s%@GMSGFMT@%$GMSGFMT%g
9149 s%@XGETTEXT@%$XGETTEXT%g
9150 s%@INTLBISON@%$INTLBISON%g
9151 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9152 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9153 s%@CATALOGS@%$CATALOGS%g
9154 s%@CATOBJEXT@%$CATOBJEXT%g
9155 s%@INTLLIBS@%$INTLLIBS%g
9156 s%@INTLDEPS@%$INTLDEPS%g
9157 s%@INTLOBJS@%$INTLOBJS%g
9159 s%@DATADIRNAME@%$DATADIRNAME%g
9160 s%@INSTOBJEXT@%$INSTOBJEXT%g
9161 s%@GENCAT@%$GENCAT%g
9162 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9163 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9166 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9167 s%@inhibit_libc@%$inhibit_libc%g
9168 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9169 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9170 s%@BUILD_CC@%$BUILD_CC%g
9171 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9172 s%@STMP_FIXINC@%$STMP_FIXINC%g
9173 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9174 s%@libgcc_visibility@%$libgcc_visibility%g
9175 s%@gthread_flags@%$gthread_flags%g
9177 s%@zlibdir@%$zlibdir%g
9178 s%@zlibinc@%$zlibinc%g
9180 s%@build_canonical@%$build_canonical%g
9181 s%@host_canonical@%$host_canonical%g
9182 s%@target_subdir@%$target_subdir%g
9183 s%@gcc_tooldir@%$gcc_tooldir%g
9184 s%@dollar@%$dollar%g
9185 s%@slibdir@%$slibdir%g
9186 s%@objdir@%$objdir%g
9187 s%@subdirs@%$subdirs%g
9188 s%@srcdir@%$srcdir%g
9189 s%@all_boot_languages@%$all_boot_languages%g
9190 s%@all_compilers@%$all_compilers%g
9191 s%@all_gtfiles@%$all_gtfiles%g
9192 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9193 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9194 s%@all_lang_makefiles@%$all_lang_makefiles%g
9195 s%@all_languages@%$all_languages%g
9196 s%@all_stagestuff@%$all_stagestuff%g
9197 s%@build_exeext@%$build_exeext%g
9198 s%@build_install_headers_dir@%$build_install_headers_dir%g
9199 s%@build_xm_file_list@%$build_xm_file_list%g
9200 s%@build_xm_file@%$build_xm_file%g
9201 s%@build_xm_defines@%$build_xm_defines%g
9202 s%@check_languages@%$check_languages%g
9203 s%@cc_set_by_configure@%$cc_set_by_configure%g
9204 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9205 s%@cpp_install_dir@%$cpp_install_dir%g
9206 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9207 s%@dep_tmake_file@%$dep_tmake_file%g
9208 s%@extra_headers_list@%$extra_headers_list%g
9209 s%@extra_objs@%$extra_objs%g
9210 s%@extra_parts@%$extra_parts%g
9211 s%@extra_passes@%$extra_passes%g
9212 s%@extra_programs@%$extra_programs%g
9213 s%@float_h_file@%$float_h_file%g
9214 s%@gcc_config_arguments@%$gcc_config_arguments%g
9215 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9216 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9217 s%@gcc_version@%$gcc_version%g
9218 s%@gcc_version_full@%$gcc_version_full%g
9219 s%@gcc_version_trigger@%$gcc_version_trigger%g
9220 s%@host_exeext@%$host_exeext%g
9221 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9222 s%@host_xm_file_list@%$host_xm_file_list%g
9223 s%@host_xm_file@%$host_xm_file%g
9224 s%@host_xm_defines@%$host_xm_defines%g
9225 s%@install@%$install%g
9226 s%@lang_options_files@%$lang_options_files%g
9227 s%@lang_specs_files@%$lang_specs_files%g
9228 s%@lang_tree_files@%$lang_tree_files%g
9229 s%@local_prefix@%$local_prefix%g
9230 s%@md_file@%$md_file%g
9231 s%@objc_boehm_gc@%$objc_boehm_gc%g
9232 s%@out_file@%$out_file%g
9233 s%@out_object_file@%$out_object_file%g
9234 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9235 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9236 s%@symbolic_link@%$symbolic_link%g
9237 s%@thread_file@%$thread_file%g
9238 s%@tm_file_list@%$tm_file_list%g
9239 s%@tm_file@%$tm_file%g
9240 s%@tm_defines@%$tm_defines%g
9241 s%@tm_p_file_list@%$tm_p_file_list%g
9242 s%@tm_p_file@%$tm_p_file%g
9243 s%@xm_file@%$xm_file%g
9244 s%@xm_defines@%$xm_defines%g
9245 s%@c_target_objs@%$c_target_objs%g
9246 s%@cxx_target_objs@%$cxx_target_objs%g
9247 s%@target_cpu_default@%$target_cpu_default%g
9248 /@target_overrides@/r $target_overrides
9249 s%@target_overrides@%%g
9250 /@host_overrides@/r $host_overrides
9251 s%@host_overrides@%%g
9252 /@language_fragments@/r $language_fragments
9253 s%@language_fragments@%%g
9254 /@language_hooks@/r $language_hooks
9255 s%@language_hooks@%%g
9260 cat >> $CONFIG_STATUS <<\EOF
9262 # Split the substitutions into bite-sized pieces for seds with
9263 # small command number limits, like on Digital OSF/1 and HP-UX.
9264 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9265 ac_file=1 # Number of current file.
9266 ac_beg=1 # First line for current file.
9267 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9270 while $ac_more_lines; do
9271 if test $ac_beg -gt 1; then
9272 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9274 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9276 if test ! -s conftest.s$ac_file; then
9278 rm -f conftest.s$ac_file
9280 if test -z "$ac_sed_cmds"; then
9281 ac_sed_cmds="sed -f conftest.s$ac_file"
9283 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9285 ac_file=`expr $ac_file + 1`
9287 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9290 if test -z "$ac_sed_cmds"; then
9295 cat >> $CONFIG_STATUS <<EOF
9297 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9299 cat >> $CONFIG_STATUS <<\EOF
9300 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9301 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9303 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9304 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9305 *) ac_file_in="${ac_file}.in" ;;
9308 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9310 # Remove last slash and all that follows it. Not all systems have dirname.
9311 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9312 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9313 # The file is in a subdirectory.
9314 test ! -d "$ac_dir" && mkdir "$ac_dir"
9315 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9316 # A "../" for each directory in $ac_dir_suffix.
9317 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9319 ac_dir_suffix= ac_dots=
9322 case "$ac_given_srcdir" in
9324 if test -z "$ac_dots"; then top_srcdir=.
9325 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9326 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9328 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9329 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9333 echo creating "$ac_file"
9335 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9337 *Makefile*) ac_comsub="1i\\
9338 # $configure_input" ;;
9342 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9344 s%@configure_input@%$configure_input%g
9345 s%@srcdir@%$srcdir%g
9346 s%@top_srcdir@%$top_srcdir%g
9347 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9351 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9352 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9354 # ac_d sets the value in "#define NAME VALUE" lines.
9355 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9356 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9359 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9360 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9361 ac_uB='\([ ]\)%\1#\2define\3'
9364 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9365 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9366 ac_eB='$%\1#\2define\3'
9370 if test "${CONFIG_HEADERS+set}" != set; then
9372 cat >> $CONFIG_STATUS <<EOF
9373 CONFIG_HEADERS="auto-host.h:config.in"
9375 cat >> $CONFIG_STATUS <<\EOF
9377 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9378 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9380 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9381 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9382 *) ac_file_in="${ac_file}.in" ;;
9385 echo creating $ac_file
9387 rm -f conftest.frag conftest.in conftest.out
9388 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9389 cat $ac_file_inputs > conftest.in
9393 # Transform confdefs.h into a sed script conftest.vals that substitutes
9394 # the proper values into config.h.in to produce config.h. And first:
9395 # Protect against being on the right side of a sed subst in config.status.
9396 # Protect against being in an unquoted here document in config.status.
9398 cat > conftest.hdr <<\EOF
9401 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9405 sed -n -f conftest.hdr confdefs.h > conftest.vals
9408 # This sed command replaces #undef with comments. This is necessary, for
9409 # example, in the case of _POSIX_SOURCE, which is predefined and required
9410 # on some systems where configure will not decide to define it.
9411 cat >> conftest.vals <<\EOF
9412 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9415 # Break up conftest.vals because some shells have a limit on
9416 # the size of here documents, and old seds have small limits too.
9421 ac_lines=`grep -c . conftest.vals`
9422 # grep -c gives empty output for an empty file on some AIX systems.
9423 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9424 # Write a limited-size here document to conftest.frag.
9425 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9426 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9428 sed -f conftest.frag conftest.in > conftest.out
9430 mv conftest.out conftest.in
9432 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9434 mv conftest.tail conftest.vals
9438 cat >> $CONFIG_STATUS <<\EOF
9439 rm -f conftest.frag conftest.h
9440 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9441 cat conftest.in >> conftest.h
9443 if cmp -s $ac_file conftest.h 2>/dev/null; then
9444 echo "$ac_file is unchanged"
9447 # Remove last slash and all that follows it. Not all systems have dirname.
9448 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9449 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9450 # The file is in a subdirectory.
9451 test ! -d "$ac_dir" && mkdir "$ac_dir"
9454 mv conftest.h $ac_file
9459 cat >> $CONFIG_STATUS <<EOF
9462 symbolic_link='$symbolic_link'
9465 cat >> $CONFIG_STATUS <<\EOF
9466 for ac_file in $CONFIG_FILES; do
9467 # Support "outfile[:infile[:infile...]]"
9469 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9471 # PO directories have a Makefile.in generated from Makefile.in.in.
9472 case "$ac_file" in */Makefile.in)
9473 # Adjust a relative srcdir.
9474 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9475 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9476 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9477 # In autoconf-2.13 it is called $ac_given_srcdir.
9478 # In autoconf-2.50 it is called $srcdir.
9479 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9480 case "$ac_given_srcdir" in
9481 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9482 /*) top_srcdir="$ac_given_srcdir" ;;
9483 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9485 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9486 rm -f "$ac_dir/POTFILES"
9487 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9488 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9489 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9490 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9496 case x$CONFIG_HEADERS in
9497 xauto-host.h:config.in)
9500 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9501 # bootstrapping and the installation procedure can still use
9502 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9503 # FLAGS_TO_PASS has been modified to solve the problem there.
9504 # This is virtually a duplicate of what happens in configure.lang; we do
9505 # an extra check to make sure this only happens if ln -s can be used.
9506 if test "$symbolic_link" = "ln -s"; then
9507 for d in .. ${subdirs} fixinc ; do
9508 if test $d != ..; then
9509 STARTDIR=`${PWDCMD-pwd}`
9511 for t in stage1 stage2 stage3 stage4 include
9514 $symbolic_link ../$t $t 2>/dev/null
9520 # Avoid having to add intl to our include paths.
9521 if test -f intl/libintl.h; then
9522 echo creating libintl.h
9523 echo '#include "intl/libintl.h"' >libintl.h
9528 chmod +x $CONFIG_STATUS
9529 rm -fr confdefs* $ac_clean_files
9530 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1