PR target/11183
[official-gcc.git] / gcc / configure
blobb4ac3e0b73817f308d9e383873d390f73d1ff79a
1 #! /bin/sh
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.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-local-prefix=DIR specifies directory to put local include"
16 ac_help="$ac_help
17 --with-gxx-include-dir=DIR
18 specifies directory to put g++ header files"
19 ac_help="$ac_help
20 --with-cpp-install-dir=DIR
21 install the user visible C preprocessor in DIR
22 (relative to PREFIX) as well as PREFIX/bin"
23 ac_help="$ac_help
24 --with-gnu-ld arrange to work with GNU ld."
25 ac_help="$ac_help
26 --with-ld arrange to use the specified ld (full pathname)"
27 ac_help="$ac_help
28 --with-gnu-as arrange to work with GNU as"
29 ac_help="$ac_help
30 --with-as arrange to use the specified as (full pathname)"
31 ac_help="$ac_help
32 --enable-werror enable -Werror in bootstrap stage2 and later"
33 ac_help="$ac_help
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"
39 ac_help="$ac_help
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,
45 default is noopt"
46 ac_help="$ac_help
47 --with-stabs arrange to use stabs instead of host debug format"
48 ac_help="$ac_help
49 --with-elf arrange to use ELF instead of host debug format"
50 ac_help="$ac_help
51 --enable-multilib enable library support for multiple ABIs"
52 ac_help="$ac_help
53 --enable-__cxa_atexit enable __cxa_atexit for C++"
54 ac_help="$ac_help
55 --enable-c-mbchar enable multibyte characters for C and C++"
56 ac_help="$ac_help
57 --enable-threads enable thread usage for target GCC
58 --enable-threads=LIB use LIB thread package for target GCC"
59 ac_help="$ac_help
60 --enable-objc-gc enable the use of Boehm's garbage collector with
61 the GNU Objective-C runtime"
62 ac_help="$ac_help
63 --with-dwarf2 force the default debug format to be DWARF 2"
64 ac_help="$ac_help
65 --disable-shared don't provide a shared libgcc"
66 ac_help="$ac_help
67 --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
68 ac_help="$ac_help
69 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
70 ac_help="$ac_help
71 --enable-initfini-array use .init_array/.fini_array sections"
72 ac_help="$ac_help
73 --enable-sjlj-exceptions
74 arrange to use setjmp/longjmp exception handling"
75 ac_help="$ac_help
76 --enable-libunwind-exceptions force use libunwind for exceptions"
77 ac_help="$ac_help
78 --enable-nls use Native Language Support (default)"
79 ac_help="$ac_help
80 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
81 ac_help="$ac_help
82 --disable-nls do not use Native Language Support"
83 ac_help="$ac_help
84 --with-included-gettext use the GNU gettext library included here"
85 ac_help="$ac_help
86 --disable-win32-registry
87 disable lookup of installation paths in the
88 Registry on Windows hosts
89 --enable-win32-registry enable registry lookup (default)
90 --enable-win32-registry=KEY
91 use KEY instead of GCC version as the last portion
92 of the registry key"
93 ac_help="$ac_help
94 --with-gc={simple,page} choose the garbage collection mechanism to use
95 with the compiler"
96 ac_help="$ac_help
97 --with-system-zlib use installed libz"
98 ac_help="$ac_help
99 --enable-maintainer-mode
100 enable make rules and dependencies not useful
101 (and sometimes confusing) to the casual installer"
102 ac_help="$ac_help
103 --enable-version-specific-runtime-libs
104 specify that runtime libraries should be
105 installed in a compiler-specific directory"
106 ac_help="$ac_help
107 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
109 # Initialize some variables set by options.
110 # The variables have the same names as the options, with
111 # dashes changed to underlines.
112 build=NONE
113 cache_file=./config.cache
114 exec_prefix=NONE
115 host=NONE
116 no_create=
117 nonopt=NONE
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 target=NONE
127 verbose=
128 x_includes=NONE
129 x_libraries=NONE
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
143 # Initialize some other variables.
144 subdirs=
145 MFLAGS= MAKEFLAGS=
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
148 ac_max_here_lines=12
150 ac_prev=
151 for ac_option
154 # If the previous option needs an argument, assign it.
155 if test -n "$ac_prev"; then
156 eval "$ac_prev=\$ac_option"
157 ac_prev=
158 continue
161 case "$ac_option" in
162 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163 *) ac_optarg= ;;
164 esac
166 # Accept the important Cygnus configure options, so we can diagnose typos.
168 case "$ac_option" in
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
171 ac_prev=bindir ;;
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173 bindir="$ac_optarg" ;;
175 -build | --build | --buil | --bui | --bu)
176 ac_prev=build ;;
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build="$ac_optarg" ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file="$ac_optarg" ;;
187 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
188 ac_prev=datadir ;;
189 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
190 | --da=*)
191 datadir="$ac_optarg" ;;
193 -disable-* | --disable-*)
194 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195 # Reject names that are not valid shell variable names.
196 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200 eval "enable_${ac_feature}=no" ;;
202 -enable-* | --enable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209 case "$ac_option" in
210 *=*) ;;
211 *) ac_optarg=yes ;;
212 esac
213 eval "enable_${ac_feature}='$ac_optarg'" ;;
215 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217 | --exec | --exe | --ex)
218 ac_prev=exec_prefix ;;
219 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221 | --exec=* | --exe=* | --ex=*)
222 exec_prefix="$ac_optarg" ;;
224 -gas | --gas | --ga | --g)
225 # Obsolete; use --with-gas.
226 with_gas=yes ;;
228 -help | --help | --hel | --he)
229 # Omit some internal or obsolete options to make the list less imposing.
230 # This message is too long to be a string in the A/UX 3.1 sh.
231 cat << EOF
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
234 Configuration:
235 --cache-file=FILE cache test results in FILE
236 --help print this message
237 --no-create do not create output files
238 --quiet, --silent do not print \`checking...' messages
239 --version print the version of autoconf that created configure
240 Directory and file names:
241 --prefix=PREFIX install architecture-independent files in PREFIX
242 [$ac_default_prefix]
243 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
244 [same as prefix]
245 --bindir=DIR user executables in DIR [EPREFIX/bin]
246 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
247 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
248 --datadir=DIR read-only architecture-independent data in DIR
249 [PREFIX/share]
250 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
251 --sharedstatedir=DIR modifiable architecture-independent data in DIR
252 [PREFIX/com]
253 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
254 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
255 --includedir=DIR C header files in DIR [PREFIX/include]
256 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
257 --infodir=DIR info documentation in DIR [PREFIX/info]
258 --mandir=DIR man documentation in DIR [PREFIX/man]
259 --srcdir=DIR find the sources in DIR [configure dir or ..]
260 --program-prefix=PREFIX prepend PREFIX to installed program names
261 --program-suffix=SUFFIX append SUFFIX to installed program names
262 --program-transform-name=PROGRAM
263 run sed PROGRAM on installed program names
265 cat << EOF
266 Host type:
267 --build=BUILD configure for building on BUILD [BUILD=HOST]
268 --host=HOST configure for HOST [guessed]
269 --target=TARGET configure for TARGET [TARGET=HOST]
270 Features and packages:
271 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
272 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
273 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
274 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
275 --x-includes=DIR X include files are in DIR
276 --x-libraries=DIR X library files are in DIR
278 if test -n "$ac_help"; then
279 echo "--enable and --with options recognized:$ac_help"
281 exit 0 ;;
283 -host | --host | --hos | --ho)
284 ac_prev=host ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host="$ac_optarg" ;;
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir="$ac_optarg" ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
296 ac_prev=infodir ;;
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir="$ac_optarg" ;;
300 -libdir | --libdir | --libdi | --libd)
301 ac_prev=libdir ;;
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir="$ac_optarg" ;;
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir="$ac_optarg" ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir="$ac_optarg" ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322 ac_prev=mandir ;;
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir="$ac_optarg" ;;
326 -nfp | --nfp | --nf)
327 # Obsolete; use --without-fp.
328 with_fp=no ;;
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331 | --no-cr | --no-c)
332 no_create=yes ;;
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336 no_recursion=yes ;;
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir="$ac_optarg" ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348 ac_prev=prefix ;;
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix="$ac_optarg" ;;
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix="$ac_optarg" ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix="$ac_optarg" ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name="$ac_optarg" ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
385 silent=yes ;;
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388 ac_prev=sbindir ;;
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390 | --sbi=* | --sb=*)
391 sbindir="$ac_optarg" ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
396 | --sha | --sh)
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401 | --sha=* | --sh=*)
402 sharedstatedir="$ac_optarg" ;;
404 -site | --site | --sit)
405 ac_prev=site ;;
406 -site=* | --site=* | --sit=*)
407 site="$ac_optarg" ;;
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410 ac_prev=srcdir ;;
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir="$ac_optarg" ;;
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir="$ac_optarg" ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
422 ac_prev=target ;;
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target="$ac_optarg" ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
427 verbose=yes ;;
429 -version | --version | --versio | --versi | --vers)
430 echo "configure generated by autoconf version 2.13"
431 exit 0 ;;
433 -with-* | --with-*)
434 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
435 # Reject names that are not valid shell variable names.
436 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
437 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439 ac_package=`echo $ac_package| sed 's/-/_/g'`
440 case "$ac_option" in
441 *=*) ;;
442 *) ac_optarg=yes ;;
443 esac
444 eval "with_${ac_package}='$ac_optarg'" ;;
446 -without-* | --without-*)
447 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
448 # Reject names that are not valid shell variable names.
449 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
450 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452 ac_package=`echo $ac_package| sed 's/-/_/g'`
453 eval "with_${ac_package}=no" ;;
455 --x)
456 # Obsolete; use --with-x.
457 with_x=yes ;;
459 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
460 | --x-incl | --x-inc | --x-in | --x-i)
461 ac_prev=x_includes ;;
462 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
463 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
464 x_includes="$ac_optarg" ;;
466 -x-libraries | --x-libraries | --x-librarie | --x-librari \
467 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
468 ac_prev=x_libraries ;;
469 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
470 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
471 x_libraries="$ac_optarg" ;;
473 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
477 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
478 echo "configure: warning: $ac_option: invalid host type" 1>&2
480 if test "x$nonopt" != xNONE; then
481 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
483 nonopt="$ac_option"
486 esac
487 done
489 if test -n "$ac_prev"; then
490 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
493 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495 # File descriptor usage:
496 # 0 standard input
497 # 1 file creation
498 # 2 errors and warnings
499 # 3 some systems may open it to /dev/tty
500 # 4 used on the Kubota Titan
501 # 6 checking for... messages and results
502 # 5 compiler messages saved in config.log
503 if test "$silent" = yes; then
504 exec 6>/dev/null
505 else
506 exec 6>&1
508 exec 5>./config.log
510 echo "\
511 This file contains any messages produced by compilers while
512 running configure, to aid debugging if configure makes a mistake.
513 " 1>&5
515 # Strip out --no-create and --no-recursion so they do not pile up.
516 # Also quote any args containing shell metacharacters.
517 ac_configure_args=
518 for ac_arg
520 case "$ac_arg" in
521 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
522 | --no-cr | --no-c) ;;
523 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
524 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
525 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
526 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
527 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
528 esac
529 done
531 # NLS nuisances.
532 # Only set these to C if already set. These must not be set unconditionally
533 # because not all systems understand e.g. LANG=C (notably SCO).
534 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
535 # Non-C LC_CTYPE values break the ctype check.
536 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
537 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
538 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
539 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
541 # confdefs.h avoids OS command line length limits that DEFS can exceed.
542 rm -rf conftest* confdefs.h
543 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
544 echo > confdefs.h
546 # A filename unique to this package, relative to the directory that
547 # configure is in, which we can look for to find out if srcdir is correct.
548 ac_unique_file=tree.c
550 # Find the source files, if location was not specified.
551 if test -z "$srcdir"; then
552 ac_srcdir_defaulted=yes
553 # Try the directory containing this script, then its parent.
554 ac_prog=$0
555 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
556 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
557 srcdir=$ac_confdir
558 if test ! -r $srcdir/$ac_unique_file; then
559 srcdir=..
561 else
562 ac_srcdir_defaulted=no
564 if test ! -r $srcdir/$ac_unique_file; then
565 if test "$ac_srcdir_defaulted" = yes; then
566 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
567 else
568 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
571 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573 # Prefer explicitly selected file to automatically selected ones.
574 if test -z "$CONFIG_SITE"; then
575 if test "x$prefix" != xNONE; then
576 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
577 else
578 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
581 for ac_site_file in $CONFIG_SITE; do
582 if test -r "$ac_site_file"; then
583 echo "loading site script $ac_site_file"
584 . "$ac_site_file"
586 done
588 if test -r "$cache_file"; then
589 echo "loading cache $cache_file"
590 . $cache_file
591 else
592 echo "creating cache $cache_file"
593 > $cache_file
596 ac_ext=c
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
603 ac_exeext=
604 ac_objext=o
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
608 ac_n= ac_c='
609 ' ac_t=' '
610 else
611 ac_n=-n ac_c= ac_t=
613 else
614 ac_n= ac_c='\c' ac_t=
620 # Determine the host, build, and target systems
621 ac_aux_dir=
622 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
623 if test -f $ac_dir/install-sh; then
624 ac_aux_dir=$ac_dir
625 ac_install_sh="$ac_aux_dir/install-sh -c"
626 break
627 elif test -f $ac_dir/install.sh; then
628 ac_aux_dir=$ac_dir
629 ac_install_sh="$ac_aux_dir/install.sh -c"
630 break
632 done
633 if test -z "$ac_aux_dir"; then
634 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
636 ac_config_guess=$ac_aux_dir/config.guess
637 ac_config_sub=$ac_aux_dir/config.sub
638 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641 # Do some error checking and defaulting for the host and target type.
642 # The inputs are:
643 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
645 # The rules are:
646 # 1. You are not allowed to specify --host, --target, and nonopt at the
647 # same time.
648 # 2. Host defaults to nonopt.
649 # 3. If nonopt is not specified, then host defaults to the current host,
650 # as determined by config.guess.
651 # 4. Target and build default to nonopt.
652 # 5. If nonopt is not specified, then target and build default to host.
654 # The aliases save the names the user supplied, while $host etc.
655 # will get canonicalized.
656 case $host---$target---$nonopt in
657 NONE---*---* | *---NONE---* | *---*---NONE) ;;
658 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
659 esac
662 # Make sure we can run config.sub.
663 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
664 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
667 echo $ac_n "checking host system type""... $ac_c" 1>&6
668 echo "configure:669: checking host system type" >&5
670 host_alias=$host
671 case "$host_alias" in
672 NONE)
673 case $nonopt in
674 NONE)
675 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
676 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
677 fi ;;
678 *) host_alias=$nonopt ;;
679 esac ;;
680 esac
682 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
683 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686 echo "$ac_t""$host" 1>&6
688 echo $ac_n "checking target system type""... $ac_c" 1>&6
689 echo "configure:690: checking target system type" >&5
691 target_alias=$target
692 case "$target_alias" in
693 NONE)
694 case $nonopt in
695 NONE) target_alias=$host_alias ;;
696 *) target_alias=$nonopt ;;
697 esac ;;
698 esac
700 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
701 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704 echo "$ac_t""$target" 1>&6
706 echo $ac_n "checking build system type""... $ac_c" 1>&6
707 echo "configure:708: checking build system type" >&5
709 build_alias=$build
710 case "$build_alias" in
711 NONE)
712 case $nonopt in
713 NONE) build_alias=$host_alias ;;
714 *) build_alias=$nonopt ;;
715 esac ;;
716 esac
718 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
719 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 echo "$ac_t""$build" 1>&6
724 test "$host_alias" != "$target_alias" &&
725 test "$program_prefix$program_suffix$program_transform_name" = \
726 NONENONEs,x,x, &&
727 program_prefix=${target_alias}-
730 # Determine the target- and build-specific subdirectories
731 case ${build_alias} in
732 "") build_noncanonical=${build} ;;
733 *) build_noncanonical=${build_alias} ;;
734 esac
736 case ${host_alias} in
737 "") host_noncanonical=${build_noncanonical} ;;
738 *) host_noncanonical=${host_alias} ;;
739 esac
741 case ${target_alias} in
742 "") target_noncanonical=${host_noncanonical} ;;
743 *) target_noncanonical=${target_alias} ;;
744 esac
746 # Prefix 'build-' so this never conflicts with target_subdir.
747 build_subdir="build-${build_noncanonical}"
748 # Not really a subdirectory, but here for completeness.
749 host_subdir=.
750 # No prefix.
751 target_subdir=${target_noncanonical}
754 # Set program_transform_name
755 if test "$program_transform_name" = s,x,x,; then
756 program_transform_name=
757 else
758 # Double any \ or $. echo might interpret backslashes.
759 cat <<\EOF_SED > conftestsed
760 s,\\,\\\\,g; s,\$,$$,g
761 EOF_SED
762 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
763 rm -f conftestsed
765 test "$program_prefix" != NONE &&
766 program_transform_name="s,^,${program_prefix},; $program_transform_name"
767 # Use a double $ so make ignores it.
768 test "$program_suffix" != NONE &&
769 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
771 # sed with no file args requires a program.
772 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
775 # Check for bogus environment variables.
776 # Test if LIBRARY_PATH contains the notation for the current directory
777 # since this would lead to problems installing/building glibc.
778 # LIBRARY_PATH contains the current directory if one of the following
779 # is true:
780 # - one of the terminals (":" and ";") is the first or last sign
781 # - two terminals occur directly after each other
782 # - the path contains an element with a dot in it
783 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
784 echo "configure:785: checking LIBRARY_PATH variable" >&5
785 case ${LIBRARY_PATH} in
786 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
787 library_path_setting="contains current directory"
790 library_path_setting="ok"
792 esac
793 echo "$ac_t""$library_path_setting" 1>&6
794 if test "$library_path_setting" != "ok"; then
795 { echo "configure: error:
796 *** LIBRARY_PATH shouldn't contain the current directory when
797 *** building gcc. Please change the environment variable
798 *** and run configure again." 1>&2; exit 1; }
801 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
802 # since this would lead to problems installing/building glibc.
803 # GCC_EXEC_PREFIX contains the current directory if one of the following
804 # is true:
805 # - one of the terminals (":" and ";") is the first or last sign
806 # - two terminals occur directly after each other
807 # - the path contains an element with a dot in it
808 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
809 echo "configure:810: checking GCC_EXEC_PREFIX variable" >&5
810 case ${GCC_EXEC_PREFIX} in
811 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
812 gcc_exec_prefix_setting="contains current directory"
815 gcc_exec_prefix_setting="ok"
817 esac
818 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
819 if test "$gcc_exec_prefix_setting" != "ok"; then
820 { echo "configure: error:
821 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
822 *** building gcc. Please change the environment variable
823 *** and run configure again." 1>&2; exit 1; }
826 # -----------
827 # Directories
828 # -----------
830 # Specify the local prefix
831 local_prefix=
832 # Check whether --with-local-prefix or --without-local-prefix was given.
833 if test "${with_local_prefix+set}" = set; then
834 withval="$with_local_prefix"
835 case "${withval}" in
836 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
837 no) ;;
838 *) local_prefix=$with_local_prefix ;;
839 esac
843 # Default local prefix if it is empty
844 if test x$local_prefix = x; then
845 local_prefix=/usr/local
848 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
849 # passed in by the toplevel make and thus we'd get different behavior
850 # depending on where we built the sources.
851 gcc_gxx_include_dir=
852 # Specify the g++ header file directory
853 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
854 if test "${with_gxx_include_dir+set}" = set; then
855 withval="$with_gxx_include_dir"
856 case "${withval}" in
857 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
858 no) ;;
859 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
860 esac
864 if test x${gcc_gxx_include_dir} = x; then
865 if test x${enable_version_specific_runtime_libs} = xyes; then
866 gcc_gxx_include_dir='${libsubdir}/include/c++'
867 else
868 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
869 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
873 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
874 if test "${with_cpp_install_dir+set}" = set; then
875 withval="$with_cpp_install_dir"
876 if test x$withval = xyes; then
877 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
878 elif test x$withval != xno; then
879 cpp_install_dir=$withval
884 # -------------------
885 # Find default linker
886 # -------------------
888 # With GNU ld
889 # Check whether --with-gnu-ld or --without-gnu-ld was given.
890 if test "${with_gnu_ld+set}" = set; then
891 withval="$with_gnu_ld"
892 gnu_ld_flag="$with_gnu_ld"
893 else
894 gnu_ld_flag=no
898 # With pre-defined ld
899 # Check whether --with-ld or --without-ld was given.
900 if test "${with_ld+set}" = set; then
901 withval="$with_ld"
902 DEFAULT_LINKER="$with_ld"
905 if test x"${DEFAULT_LINKER+set}" = x"set"; then
906 if test ! -x "$DEFAULT_LINKER"; then
907 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
908 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
909 gnu_ld_flag=yes
911 cat >> confdefs.h <<EOF
912 #define DEFAULT_LINKER "$DEFAULT_LINKER"
917 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
918 echo "configure:919: checking whether a default linker was specified" >&5
919 if test x"${DEFAULT_LINKER+set}" = x"set"; then
920 if test x"$gnu_ld_flag" = x"no"; then
921 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
922 else
923 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
925 else
926 echo "$ac_t""no" 1>&6
929 # ----------------------
930 # Find default assembler
931 # ----------------------
933 # With GNU as
934 # Check whether --with-gnu-as or --without-gnu-as was given.
935 if test "${with_gnu_as+set}" = set; then
936 withval="$with_gnu_as"
937 gas_flag="$with_gnu_as"
938 else
939 gas_flag=no
943 # Check whether --with-as or --without-as was given.
944 if test "${with_as+set}" = set; then
945 withval="$with_as"
946 DEFAULT_ASSEMBLER="$with_as"
949 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
950 if test ! -x "$DEFAULT_ASSEMBLER"; then
951 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
952 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
953 gas_flag=yes
955 cat >> confdefs.h <<EOF
956 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
961 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
962 echo "configure:963: checking whether a default assembler was specified" >&5
963 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
964 if test x"$gas_flag" = x"no"; then
965 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
966 else
967 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
969 else
970 echo "$ac_t""no" 1>&6
973 # ---------------
974 # Find C compiler
975 # ---------------
977 # Find the native compiler
978 # Extract the first word of "gcc", so it can be a program name with args.
979 set dummy gcc; ac_word=$2
980 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
981 echo "configure:982: checking for $ac_word" >&5
982 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
983 echo $ac_n "(cached) $ac_c" 1>&6
984 else
985 if test -n "$CC"; then
986 ac_cv_prog_CC="$CC" # Let the user override the test.
987 else
988 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
989 ac_dummy="$PATH"
990 for ac_dir in $ac_dummy; do
991 test -z "$ac_dir" && ac_dir=.
992 if test -f $ac_dir/$ac_word; then
993 ac_cv_prog_CC="gcc"
994 break
996 done
997 IFS="$ac_save_ifs"
1000 CC="$ac_cv_prog_CC"
1001 if test -n "$CC"; then
1002 echo "$ac_t""$CC" 1>&6
1003 else
1004 echo "$ac_t""no" 1>&6
1007 if test -z "$CC"; then
1008 # Extract the first word of "cc", so it can be a program name with args.
1009 set dummy cc; ac_word=$2
1010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1011 echo "configure:1012: checking for $ac_word" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015 if test -n "$CC"; then
1016 ac_cv_prog_CC="$CC" # Let the user override the test.
1017 else
1018 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1019 ac_prog_rejected=no
1020 ac_dummy="$PATH"
1021 for ac_dir in $ac_dummy; do
1022 test -z "$ac_dir" && ac_dir=.
1023 if test -f $ac_dir/$ac_word; then
1024 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1025 ac_prog_rejected=yes
1026 continue
1028 ac_cv_prog_CC="cc"
1029 break
1031 done
1032 IFS="$ac_save_ifs"
1033 if test $ac_prog_rejected = yes; then
1034 # We found a bogon in the path, so make sure we never use it.
1035 set dummy $ac_cv_prog_CC
1036 shift
1037 if test $# -gt 0; then
1038 # We chose a different compiler from the bogus one.
1039 # However, it has the same basename, so the bogon will be chosen
1040 # first if we set CC to just the basename; use the full file name.
1041 shift
1042 set dummy "$ac_dir/$ac_word" "$@"
1043 shift
1044 ac_cv_prog_CC="$@"
1049 CC="$ac_cv_prog_CC"
1050 if test -n "$CC"; then
1051 echo "$ac_t""$CC" 1>&6
1052 else
1053 echo "$ac_t""no" 1>&6
1056 if test -z "$CC"; then
1057 case "`uname -s`" in
1058 *win32* | *WIN32*)
1059 # Extract the first word of "cl", so it can be a program name with args.
1060 set dummy cl; ac_word=$2
1061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1062 echo "configure:1063: checking for $ac_word" >&5
1063 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1064 echo $ac_n "(cached) $ac_c" 1>&6
1065 else
1066 if test -n "$CC"; then
1067 ac_cv_prog_CC="$CC" # Let the user override the test.
1068 else
1069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1070 ac_dummy="$PATH"
1071 for ac_dir in $ac_dummy; do
1072 test -z "$ac_dir" && ac_dir=.
1073 if test -f $ac_dir/$ac_word; then
1074 ac_cv_prog_CC="cl"
1075 break
1077 done
1078 IFS="$ac_save_ifs"
1081 CC="$ac_cv_prog_CC"
1082 if test -n "$CC"; then
1083 echo "$ac_t""$CC" 1>&6
1084 else
1085 echo "$ac_t""no" 1>&6
1088 esac
1090 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1093 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1096 ac_ext=c
1097 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1098 ac_cpp='$CPP $CPPFLAGS'
1099 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1100 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1101 cross_compiling=$ac_cv_prog_cc_cross
1103 cat > conftest.$ac_ext << EOF
1105 #line 1106 "configure"
1106 #include "confdefs.h"
1108 main(){return(0);}
1110 if { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1111 ac_cv_prog_cc_works=yes
1112 # If we can't run a trivial program, we are probably using a cross compiler.
1113 if (./conftest; exit) 2>/dev/null; then
1114 ac_cv_prog_cc_cross=no
1115 else
1116 ac_cv_prog_cc_cross=yes
1118 else
1119 echo "configure: failed program was:" >&5
1120 cat conftest.$ac_ext >&5
1121 ac_cv_prog_cc_works=no
1123 rm -fr conftest*
1124 ac_ext=c
1125 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1126 ac_cpp='$CPP $CPPFLAGS'
1127 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1128 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1129 cross_compiling=$ac_cv_prog_cc_cross
1131 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1132 if test $ac_cv_prog_cc_works = no; then
1133 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1135 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1136 echo "configure:1137: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1137 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1138 cross_compiling=$ac_cv_prog_cc_cross
1140 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1141 echo "configure:1142: checking whether we are using GNU C" >&5
1142 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1144 else
1145 cat > conftest.c <<EOF
1146 #ifdef __GNUC__
1147 yes;
1148 #endif
1150 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1151 ac_cv_prog_gcc=yes
1152 else
1153 ac_cv_prog_gcc=no
1157 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1159 if test $ac_cv_prog_gcc = yes; then
1160 GCC=yes
1161 else
1162 GCC=
1165 ac_test_CFLAGS="${CFLAGS+set}"
1166 ac_save_CFLAGS="$CFLAGS"
1167 CFLAGS=
1168 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1169 echo "configure:1170: checking whether ${CC-cc} accepts -g" >&5
1170 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173 echo 'void f(){}' > conftest.c
1174 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1175 ac_cv_prog_cc_g=yes
1176 else
1177 ac_cv_prog_cc_g=no
1179 rm -f conftest*
1183 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1184 if test "$ac_test_CFLAGS" = set; then
1185 CFLAGS="$ac_save_CFLAGS"
1186 elif test $ac_cv_prog_cc_g = yes; then
1187 if test "$GCC" = yes; then
1188 CFLAGS="-g -O2"
1189 else
1190 CFLAGS="-g"
1192 else
1193 if test "$GCC" = yes; then
1194 CFLAGS="-O2"
1195 else
1196 CFLAGS=
1200 if test "x$CC" != xcc; then
1201 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1202 echo "configure:1203: checking whether $CC and cc understand -c and -o together" >&5
1203 else
1204 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether cc understands -c and -o together" >&5
1207 set dummy $CC; ac_cc="`echo $2 |
1208 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1209 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212 echo 'foo(){}' > conftest.c
1213 # Make sure it works both with $CC and with simple cc.
1214 # We do the test twice because some compilers refuse to overwrite an
1215 # existing .o file with -o, though they will create one.
1216 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1217 if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1218 test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1219 then
1220 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1221 if test "x$CC" != xcc; then
1222 # Test first that cc exists at all.
1223 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1224 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1225 if { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1226 test -f conftest.o && { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1227 then
1228 # cc works too.
1230 else
1231 # cc exists but doesn't like -o.
1232 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1236 else
1237 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1239 rm -f conftest*
1242 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1243 echo "$ac_t""yes" 1>&6
1244 else
1245 echo "$ac_t""no" 1>&6
1246 cat >> confdefs.h <<\EOF
1247 #define NO_MINUS_C_MINUS_O 1
1252 # autoconf is lame and doesn't give us any substitution variable for this.
1253 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1254 NO_MINUS_C_MINUS_O=yes
1255 else
1256 OUTPUT_OPTION='-o $@'
1261 # -------------------------
1262 # Check C compiler features
1263 # -------------------------
1265 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1266 echo "configure:1267: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1267 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1268 echo $ac_n "(cached) $ac_c" 1>&6
1269 else
1270 save_CFLAGS="$CFLAGS"
1271 CFLAGS="-Wno-long-long"
1272 cat > conftest.$ac_ext <<EOF
1273 #line 1274 "configure"
1274 #include "confdefs.h"
1276 int main() {
1278 ; return 0; }
1280 if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1281 rm -rf conftest*
1282 ac_cv_prog_cc_no_long_long=yes
1283 else
1284 echo "configure: failed program was:" >&5
1285 cat conftest.$ac_ext >&5
1286 rm -rf conftest*
1287 ac_cv_prog_cc_no_long_long=no
1289 rm -f conftest*
1290 CFLAGS="$save_CFLAGS"
1293 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1295 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1296 echo "configure:1297: checking how to run the C preprocessor" >&5
1297 # On Suns, sometimes $CPP names a directory.
1298 if test -n "$CPP" && test -d "$CPP"; then
1299 CPP=
1301 if test -z "$CPP"; then
1302 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1303 echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305 # This must be in double quotes, not single quotes, because CPP may get
1306 # substituted into the Makefile and "${CC-cc}" will confuse make.
1307 CPP="${CC-cc} -E"
1308 # On the NeXT, cc -E runs the code through the compiler's parser,
1309 # not just through cpp.
1310 cat > conftest.$ac_ext <<EOF
1311 #line 1312 "configure"
1312 #include "confdefs.h"
1313 #include <assert.h>
1314 Syntax Error
1316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1317 { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319 if test -z "$ac_err"; then
1321 else
1322 echo "$ac_err" >&5
1323 echo "configure: failed program was:" >&5
1324 cat conftest.$ac_ext >&5
1325 rm -rf conftest*
1326 CPP="${CC-cc} -E -traditional-cpp"
1327 cat > conftest.$ac_ext <<EOF
1328 #line 1329 "configure"
1329 #include "confdefs.h"
1330 #include <assert.h>
1331 Syntax Error
1333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1334 { (eval echo configure:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1336 if test -z "$ac_err"; then
1338 else
1339 echo "$ac_err" >&5
1340 echo "configure: failed program was:" >&5
1341 cat conftest.$ac_ext >&5
1342 rm -rf conftest*
1343 CPP="${CC-cc} -nologo -E"
1344 cat > conftest.$ac_ext <<EOF
1345 #line 1346 "configure"
1346 #include "confdefs.h"
1347 #include <assert.h>
1348 Syntax Error
1350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1351 { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1353 if test -z "$ac_err"; then
1355 else
1356 echo "$ac_err" >&5
1357 echo "configure: failed program was:" >&5
1358 cat conftest.$ac_ext >&5
1359 rm -rf conftest*
1360 CPP=/lib/cpp
1362 rm -f conftest*
1364 rm -f conftest*
1366 rm -f conftest*
1367 ac_cv_prog_CPP="$CPP"
1369 CPP="$ac_cv_prog_CPP"
1370 else
1371 ac_cv_prog_CPP="$CPP"
1373 echo "$ac_t""$CPP" 1>&6
1375 echo $ac_n "checking for inline""... $ac_c" 1>&6
1376 echo "configure:1377: checking for inline" >&5
1377 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1378 echo $ac_n "(cached) $ac_c" 1>&6
1379 else
1380 ac_cv_c_inline=no
1381 for ac_kw in inline __inline__ __inline; do
1382 cat > conftest.$ac_ext <<EOF
1383 #line 1384 "configure"
1384 #include "confdefs.h"
1386 int main() {
1387 } $ac_kw foo() {
1388 ; return 0; }
1390 if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1391 rm -rf conftest*
1392 ac_cv_c_inline=$ac_kw; break
1393 else
1394 echo "configure: failed program was:" >&5
1395 cat conftest.$ac_ext >&5
1397 rm -f conftest*
1398 done
1402 echo "$ac_t""$ac_cv_c_inline" 1>&6
1403 case "$ac_cv_c_inline" in
1404 inline | yes) ;;
1405 no) cat >> confdefs.h <<\EOF
1406 #define inline
1409 *) cat >> confdefs.h <<EOF
1410 #define inline $ac_cv_c_inline
1413 esac
1415 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1416 echo "configure:1417: checking for volatile" >&5
1417 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
1419 else
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1424 int main() {
1425 volatile int foo;
1426 ; return 0; }
1428 if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1429 rm -rf conftest*
1430 gcc_cv_c_volatile=yes
1431 else
1432 echo "configure: failed program was:" >&5
1433 cat conftest.$ac_ext >&5
1434 rm -rf conftest*
1435 gcc_cv_c_volatile=no
1437 rm -f conftest*
1440 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1441 if test $gcc_cv_c_volatile = yes ; then
1442 cat >> confdefs.h <<\EOF
1443 #define HAVE_VOLATILE 1
1449 echo $ac_n "checking for long double""... $ac_c" 1>&6
1450 echo "configure:1451: checking for long double" >&5
1451 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1452 echo $ac_n "(cached) $ac_c" 1>&6
1453 else
1454 if test "$GCC" = yes; then
1455 gcc_cv_c_long_double=yes
1456 else
1457 cat > conftest.$ac_ext <<EOF
1458 #line 1459 "configure"
1459 #include "confdefs.h"
1461 int main() {
1462 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1463 long double foo = 0.0;
1464 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1465 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1466 ; return 0; }
1468 if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1469 rm -rf conftest*
1470 gcc_cv_c_long_double=yes
1471 else
1472 echo "configure: failed program was:" >&5
1473 cat conftest.$ac_ext >&5
1474 rm -rf conftest*
1475 gcc_cv_c_long_double=no
1477 rm -f conftest*
1481 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1482 if test $gcc_cv_c_long_double = yes; then
1483 cat >> confdefs.h <<\EOF
1484 #define HAVE_LONG_DOUBLE 1
1489 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1490 echo "configure:1491: checking for long long int" >&5
1491 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494 cat > conftest.$ac_ext <<EOF
1495 #line 1496 "configure"
1496 #include "confdefs.h"
1498 int main() {
1499 long long int i;
1500 ; return 0; }
1502 if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1503 rm -rf conftest*
1504 ac_cv_c_long_long=yes
1505 else
1506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1508 rm -rf conftest*
1509 ac_cv_c_long_long=no
1511 rm -f conftest*
1514 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1515 if test $ac_cv_c_long_long = yes; then
1516 cat >> confdefs.h <<\EOF
1517 #define HAVE_LONG_LONG 1
1521 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1522 echo "configure:1523: checking for __int64" >&5
1523 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1524 echo $ac_n "(cached) $ac_c" 1>&6
1525 else
1526 cat > conftest.$ac_ext <<EOF
1527 #line 1528 "configure"
1528 #include "confdefs.h"
1530 int main() {
1531 __int64 i;
1532 ; return 0; }
1534 if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1535 rm -rf conftest*
1536 ac_cv_c___int64=yes
1537 else
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 rm -rf conftest*
1541 ac_cv_c___int64=no
1543 rm -f conftest*
1546 echo "$ac_t""$ac_cv_c___int64" 1>&6
1547 if test $ac_cv_c___int64 = yes; then
1548 cat >> confdefs.h <<\EOF
1549 #define HAVE___INT64 1
1554 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1555 echo "configure:1556: checking for built-in _Bool" >&5
1556 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1557 echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559 cat > conftest.$ac_ext <<EOF
1560 #line 1561 "configure"
1561 #include "confdefs.h"
1563 int main() {
1564 _Bool foo;
1565 ; return 0; }
1567 if { (eval echo configure:1568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1568 rm -rf conftest*
1569 gcc_cv_c__bool=yes
1570 else
1571 echo "configure: failed program was:" >&5
1572 cat conftest.$ac_ext >&5
1573 rm -rf conftest*
1574 gcc_cv_c__bool=no
1576 rm -f conftest*
1580 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1581 if test $gcc_cv_c__bool = yes; then
1582 cat >> confdefs.h <<\EOF
1583 #define HAVE__BOOL 1
1589 # sizeof(char) is 1 by definition.
1590 echo $ac_n "checking size of short""... $ac_c" 1>&6
1591 echo "configure:1592: checking size of short" >&5
1592 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1596 cat > conftest.$ac_ext <<EOF
1597 #line 1598 "configure"
1598 #include "confdefs.h"
1599 #include "confdefs.h"
1600 #include <sys/types.h>
1603 int main() {
1604 switch (0) case 0: case (sizeof (short) == $ac_size):;
1605 ; return 0; }
1607 if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1608 rm -rf conftest*
1609 ac_cv_sizeof_short=$ac_size
1610 else
1611 echo "configure: failed program was:" >&5
1612 cat conftest.$ac_ext >&5
1614 rm -f conftest*
1615 if test x$ac_cv_sizeof_short != x ; then break; fi
1616 done
1620 if test x$ac_cv_sizeof_short = x ; then
1621 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1623 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1624 cat >> confdefs.h <<EOF
1625 #define SIZEOF_SHORT $ac_cv_sizeof_short
1629 echo $ac_n "checking size of int""... $ac_c" 1>&6
1630 echo "configure:1631: checking size of int" >&5
1631 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1632 echo $ac_n "(cached) $ac_c" 1>&6
1633 else
1634 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1635 cat > conftest.$ac_ext <<EOF
1636 #line 1637 "configure"
1637 #include "confdefs.h"
1638 #include "confdefs.h"
1639 #include <sys/types.h>
1642 int main() {
1643 switch (0) case 0: case (sizeof (int) == $ac_size):;
1644 ; return 0; }
1646 if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1647 rm -rf conftest*
1648 ac_cv_sizeof_int=$ac_size
1649 else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1653 rm -f conftest*
1654 if test x$ac_cv_sizeof_int != x ; then break; fi
1655 done
1659 if test x$ac_cv_sizeof_int = x ; then
1660 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1662 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1663 cat >> confdefs.h <<EOF
1664 #define SIZEOF_INT $ac_cv_sizeof_int
1668 echo $ac_n "checking size of long""... $ac_c" 1>&6
1669 echo "configure:1670: checking size of long" >&5
1670 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1671 echo $ac_n "(cached) $ac_c" 1>&6
1672 else
1673 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1674 cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677 #include "confdefs.h"
1678 #include <sys/types.h>
1681 int main() {
1682 switch (0) case 0: case (sizeof (long) == $ac_size):;
1683 ; return 0; }
1685 if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1686 rm -rf conftest*
1687 ac_cv_sizeof_long=$ac_size
1688 else
1689 echo "configure: failed program was:" >&5
1690 cat conftest.$ac_ext >&5
1692 rm -f conftest*
1693 if test x$ac_cv_sizeof_long != x ; then break; fi
1694 done
1698 if test x$ac_cv_sizeof_long = x ; then
1699 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1701 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1702 cat >> confdefs.h <<EOF
1703 #define SIZEOF_LONG $ac_cv_sizeof_long
1707 if test $ac_cv_c_long_long = yes; then
1708 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1709 echo "configure:1710: checking size of long long" >&5
1710 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1711 echo $ac_n "(cached) $ac_c" 1>&6
1712 else
1713 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1714 cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 #include "confdefs.h"
1718 #include <sys/types.h>
1721 int main() {
1722 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1723 ; return 0; }
1725 if { (eval echo configure:1726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1726 rm -rf conftest*
1727 ac_cv_sizeof_long_long=$ac_size
1728 else
1729 echo "configure: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1732 rm -f conftest*
1733 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1734 done
1738 if test x$ac_cv_sizeof_long_long = x ; then
1739 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1741 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1742 cat >> confdefs.h <<EOF
1743 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1748 if test $ac_cv_c___int64 = yes; then
1749 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1750 echo "configure:1751: checking size of __int64" >&5
1751 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
1753 else
1754 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1762 int main() {
1763 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1764 ; return 0; }
1766 if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1767 rm -rf conftest*
1768 ac_cv_sizeof___int64=$ac_size
1769 else
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1773 rm -f conftest*
1774 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1775 done
1779 if test x$ac_cv_sizeof___int64 = x ; then
1780 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1782 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1783 cat >> confdefs.h <<EOF
1784 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1790 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1791 echo "configure:1792: checking execution character set" >&5
1792 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795 cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1799 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1800 ASCII
1801 #endif
1803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1804 egrep "ASCII" >/dev/null 2>&1; then
1805 rm -rf conftest*
1806 ac_cv_c_charset=ASCII
1808 rm -f conftest*
1810 if test x${ac_cv_c_charset+set} != xset; then
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1815 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1816 EBCDIC
1817 #endif
1819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1820 egrep "EBCDIC" >/dev/null 2>&1; then
1821 rm -rf conftest*
1822 ac_cv_c_charset=EBCDIC
1824 rm -f conftest*
1827 if test x${ac_cv_c_charset+set} != xset; then
1828 ac_cv_c_charset=unknown
1832 echo "$ac_t""$ac_cv_c_charset" 1>&6
1833 if test $ac_cv_c_charset = unknown; then
1834 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1835 elif test $ac_cv_c_charset = EBCDIC; then
1836 cat >> confdefs.h <<\EOF
1837 #define HOST_EBCDIC 1
1842 # -----------------
1843 # Find Ada compiler
1844 # -----------------
1846 # See if GNAT has been installed
1847 if test $host != $build; then
1848 ac_tool_prefix=${host_alias}-
1849 else
1850 ac_tool_prefix=
1854 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1855 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1857 echo "configure:1858: checking for $ac_word" >&5
1858 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1859 echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861 if test -n "$GNATBIND"; then
1862 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1863 else
1864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1865 ac_dummy="$PATH"
1866 for ac_dir in $ac_dummy; do
1867 test -z "$ac_dir" && ac_dir=.
1868 if test -f $ac_dir/$ac_word; then
1869 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1870 break
1872 done
1873 IFS="$ac_save_ifs"
1876 GNATBIND="$ac_cv_prog_GNATBIND"
1877 if test -n "$GNATBIND"; then
1878 echo "$ac_t""$GNATBIND" 1>&6
1879 else
1880 echo "$ac_t""no" 1>&6
1884 if test -z "$ac_cv_prog_GNATBIND"; then
1885 if test -n "$ac_tool_prefix"; then
1886 # Extract the first word of "gnatbind", so it can be a program name with args.
1887 set dummy gnatbind; ac_word=$2
1888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1889 echo "configure:1890: checking for $ac_word" >&5
1890 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1891 echo $ac_n "(cached) $ac_c" 1>&6
1892 else
1893 if test -n "$GNATBIND"; then
1894 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1895 else
1896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1897 ac_dummy="$PATH"
1898 for ac_dir in $ac_dummy; do
1899 test -z "$ac_dir" && ac_dir=.
1900 if test -f $ac_dir/$ac_word; then
1901 ac_cv_prog_GNATBIND="gnatbind"
1902 break
1904 done
1905 IFS="$ac_save_ifs"
1906 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1909 GNATBIND="$ac_cv_prog_GNATBIND"
1910 if test -n "$GNATBIND"; then
1911 echo "$ac_t""$GNATBIND" 1>&6
1912 else
1913 echo "$ac_t""no" 1>&6
1916 else
1917 GNATBIND="no"
1921 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1922 echo "configure:1923: checking for compiler driver that understands Ada" >&5
1923 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1924 echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926 cat >conftest.adb <<EOF
1927 procedure conftest is begin null; end conftest;
1929 gcc_cv_prog_adac=no
1930 # Have to do ac_tool_prefix and user overrides by hand.
1931 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1932 ${ac_tool_prefix}gcc gcc \
1933 ${ac_tool_prefix}cc cc \
1934 ${ac_tool_prefix}gnatgcc gnatgcc \
1935 ${ac_tool_prefix}gnatcc gnatcc \
1936 ${ac_tool_prefix}adagcc adagcc \
1937 ${ac_tool_prefix}adacc adacc ; do
1938 # There is a bug in all released versions of GCC which causes the
1939 # driver to exit successfully when the appropriate language module
1940 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1941 # Therefore we must check for the error message as well as an
1942 # unsuccessful exit.
1943 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1944 if test x"$errors" = x; then
1945 gcc_cv_prog_adac=$cand
1946 break
1948 done
1949 rm -f conftest.*
1952 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1953 ADAC=$gcc_cv_prog_adac
1956 if test x$GNATBIND != xno && test x$ADAC != xno; then
1957 have_gnat=yes
1958 else
1959 have_gnat=no
1963 if test x$have_gnat != xno ; then
1964 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1965 echo "configure:1966: checking whether ${ADAC} accepts -Wno-long-long" >&5
1966 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1967 echo $ac_n "(cached) $ac_c" 1>&6
1968 else
1969 cat >conftest.adb <<EOF
1970 procedure conftest is begin null; end conftest;
1972 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1973 ac_cv_prog_adac_no_long_long=yes
1974 else
1975 ac_cv_prog_adac_no_long_long=no
1977 rm -f conftest*
1980 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1981 else
1982 ac_cv_prog_adac_no_long_long=yes
1985 # ---------------------
1986 # Warnings and checking
1987 # ---------------------
1989 strict1_warn=
1990 if test $ac_cv_prog_cc_no_long_long = yes && \
1991 test $ac_cv_prog_adac_no_long_long = yes ; then
1992 strict1_warn="-pedantic -Wno-long-long"
1996 # If the native compiler is GCC, we can enable warnings even in stage1.
1997 # That's useful for people building cross-compilers, or just running a
1998 # quick `make'.
1999 warn_cflags=
2000 if test "x$GCC" = "xyes"; then
2001 warn_cflags='$(GCC_WARN_CFLAGS)'
2005 # Enable -Werror in bootstrap stage2 and later.
2006 # Change the default to "no" on release branches.
2007 # Check whether --enable-werror or --disable-werror was given.
2008 if test "${enable_werror+set}" = set; then
2009 enableval="$enable_werror"
2011 else
2012 enable_werror=yes
2015 if test x$enable_werror = xyes ; then
2016 WERROR=-Werror
2020 # Enable expensive internal checks
2021 # Check whether --enable-checking or --disable-checking was given.
2022 if test "${enable_checking+set}" = set; then
2023 enableval="$enable_checking"
2024 ac_checking=
2025 ac_tree_checking=
2026 ac_rtl_checking=
2027 ac_rtlflag_checking=
2028 ac_gc_checking=
2029 ac_gc_always_collect=
2030 case "${enableval}" in
2031 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
2032 ac_rtlflag_checking=1 ;;
2033 no) ;;
2034 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2035 set fnord $enableval; shift
2036 IFS="$ac_save_IFS"
2037 for check
2039 case $check in
2040 misc) ac_checking=1 ;;
2041 tree) ac_tree_checking=1 ;;
2042 rtlflag) ac_rtlflag_checking=1 ;;
2043 rtl) ac_rtl_checking=1 ;;
2044 gc) ac_gc_checking=1 ;;
2045 gcac) ac_gc_always_collect=1 ;;
2046 valgrind) ac_checking_valgrind=1 ;;
2047 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
2048 esac
2049 done
2051 esac
2053 else
2054 # Enable some checks by default for development versions of GCC
2055 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
2058 nocommon_flag=""
2059 if test x$ac_checking != x ; then
2060 cat >> confdefs.h <<\EOF
2061 #define ENABLE_CHECKING 1
2064 nocommon_flag=-fno-common
2067 if test x$ac_tree_checking != x ; then
2068 cat >> confdefs.h <<\EOF
2069 #define ENABLE_TREE_CHECKING 1
2073 if test x$ac_rtl_checking != x ; then
2074 cat >> confdefs.h <<\EOF
2075 #define ENABLE_RTL_CHECKING 1
2079 if test x$ac_rtlflag_checking != x ; then
2080 cat >> confdefs.h <<\EOF
2081 #define ENABLE_RTL_FLAG_CHECKING 1
2085 if test x$ac_gc_checking != x ; then
2086 cat >> confdefs.h <<\EOF
2087 #define ENABLE_GC_CHECKING 1
2091 if test x$ac_gc_always_collect != x ; then
2092 cat >> confdefs.h <<\EOF
2093 #define ENABLE_GC_ALWAYS_COLLECT 1
2097 valgrind_path_defines=
2098 valgrind_command=
2099 if test x$ac_checking_valgrind != x ; then
2100 # It is certainly possible that there's valgrind but no valgrind.h.
2101 # GCC relies on making annotations so we must have both.
2102 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2103 echo "configure:2104: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2104 cat > conftest.$ac_ext <<EOF
2105 #line 2106 "configure"
2106 #include "confdefs.h"
2107 #include <memcheck.h>
2108 #ifndef VALGRIND_DISCARD
2109 #error VALGRIND_DISCARD not defined
2110 #endif
2112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2113 { (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2115 if test -z "$ac_err"; then
2116 rm -rf conftest*
2117 gcc_cv_header_memcheck_h=yes
2118 else
2119 echo "$ac_err" >&5
2120 echo "configure: failed program was:" >&5
2121 cat conftest.$ac_ext >&5
2122 rm -rf conftest*
2123 gcc_cv_header_memcheck_h=no
2125 rm -f conftest*
2126 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2127 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2128 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2129 echo "configure:2130: checking for valgrind.h" >&5
2130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2131 echo $ac_n "(cached) $ac_c" 1>&6
2132 else
2133 cat > conftest.$ac_ext <<EOF
2134 #line 2135 "configure"
2135 #include "confdefs.h"
2136 #include <valgrind.h>
2138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2139 { (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2141 if test -z "$ac_err"; then
2142 rm -rf conftest*
2143 eval "ac_cv_header_$ac_safe=yes"
2144 else
2145 echo "$ac_err" >&5
2146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 eval "ac_cv_header_$ac_safe=no"
2151 rm -f conftest*
2153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2154 echo "$ac_t""yes" 1>&6
2155 have_valgrind_h=yes
2156 else
2157 echo "$ac_t""no" 1>&6
2158 have_valgrind_h=no
2161 # Extract the first word of "valgrind", so it can be a program name with args.
2162 set dummy valgrind; ac_word=$2
2163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2164 echo "configure:2165: checking for $ac_word" >&5
2165 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2166 echo $ac_n "(cached) $ac_c" 1>&6
2167 else
2168 case "$valgrind_path" in
2170 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2173 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2174 for ac_dir in $PATH; do
2175 test -z "$ac_dir" && ac_dir=.
2176 if test -f $ac_dir/$ac_word; then
2177 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2178 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2179 break
2182 done
2183 IFS="$ac_save_ifs"
2185 esac
2187 valgrind_path="$ac_cv_path_valgrind_path"
2188 if test -n "$valgrind_path"; then
2189 echo "$ac_t""$valgrind_path" 1>&6
2190 else
2191 echo "$ac_t""no" 1>&6
2194 if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2195 { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2197 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2198 valgrind_command="$valgrind_path -q"
2199 cat >> confdefs.h <<\EOF
2200 #define ENABLE_VALGRIND_CHECKING 1
2203 if test $gcc_cv_header_memcheck_h = yes; then
2204 cat >> confdefs.h <<\EOF
2205 #define HAVE_MEMCHECK_H 1
2213 # Enable code coverage collection
2214 # Check whether --enable-coverage or --disable-coverage was given.
2215 if test "${enable_coverage+set}" = set; then
2216 enableval="$enable_coverage"
2217 case "${enableval}" in
2218 yes|noopt)
2219 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2221 opt)
2222 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2225 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2227 esac
2228 else
2229 coverage_flags=""
2234 # -------------------------------
2235 # Miscenalleous configure options
2236 # -------------------------------
2238 # With stabs
2239 # Check whether --with-stabs or --without-stabs was given.
2240 if test "${with_stabs+set}" = set; then
2241 withval="$with_stabs"
2242 stabs="$with_stabs"
2243 else
2244 stabs=no
2248 # With ELF
2249 # Check whether --with-elf or --without-elf was given.
2250 if test "${with_elf+set}" = set; then
2251 withval="$with_elf"
2252 elf="$with_elf"
2253 else
2254 elf=no
2258 # Determine whether or not multilibs are enabled.
2259 # Check whether --enable-multilib or --disable-multilib was given.
2260 if test "${enable_multilib+set}" = set; then
2261 enableval="$enable_multilib"
2263 else
2264 enable_multilib=yes
2269 # Enable __cxa_atexit for C++.
2270 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2271 if test "${enable___cxa_atexit+set}" = set; then
2272 enableval="$enable___cxa_atexit"
2277 # Enable Multibyte Characters for C/C++
2278 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2279 if test "${enable_c_mbchar+set}" = set; then
2280 enableval="$enable_c_mbchar"
2281 if test x$enable_c_mbchar != xno; then
2282 cat >> confdefs.h <<\EOF
2283 #define MULTIBYTE_CHARS 1
2290 # Enable threads
2291 # Pass with no value to take the default
2292 # Pass with a value to specify a thread package
2293 # Check whether --enable-threads or --disable-threads was given.
2294 if test "${enable_threads+set}" = set; then
2295 enableval="$enable_threads"
2297 else
2298 enable_threads=''
2302 enable_threads_flag=$enable_threads
2303 # Check if a valid thread package
2304 case x${enable_threads_flag} in
2305 x | xno)
2306 # No threads
2307 target_thread_file='single'
2309 xyes)
2310 # default
2311 target_thread_file=''
2313 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2314 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2315 target_thread_file=$enable_threads_flag
2318 echo "$enable_threads is an unknown thread package" 1>&2
2319 exit 1
2321 esac
2323 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2324 if test "${enable_objc_gc+set}" = set; then
2325 enableval="$enable_objc_gc"
2326 if test x$enable_objc_gc = xno; then
2327 objc_boehm_gc=''
2328 else
2329 objc_boehm_gc=1
2331 else
2332 objc_boehm_gc=''
2336 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2337 if test "${with_dwarf2+set}" = set; then
2338 withval="$with_dwarf2"
2339 dwarf2="$with_dwarf2"
2340 else
2341 dwarf2=no
2345 # Check whether --enable-shared or --disable-shared was given.
2346 if test "${enable_shared+set}" = set; then
2347 enableval="$enable_shared"
2349 case $enable_shared in
2350 yes | no) ;;
2352 enable_shared=no
2353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2354 for pkg in $enableval; do
2355 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2356 enable_shared=yes
2358 done
2359 IFS="$ac_save_ifs"
2361 esac
2363 else
2364 enable_shared=yes
2369 # Check whether --with-sysroot or --without-sysroot was given.
2370 if test "${with_sysroot+set}" = set; then
2371 withval="$with_sysroot"
2373 case ${with_sysroot} in
2374 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2375 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2376 esac
2378 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2379 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2381 if test "x$exec_prefix" = xNONE; then
2382 if test "x$prefix" = xNONE; then
2383 test_prefix=/usr/local
2384 else
2385 test_prefix=$prefix
2387 else
2388 test_prefix=$exec_prefix
2390 case ${TARGET_SYSTEM_ROOT} in
2391 "${test_prefix}"|"${test_prefix}/"*|\
2392 '${exec_prefix}'|'${exec_prefix}/'*)
2393 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2394 TARGET_SYSTEM_ROOT_DEFINE="$t"
2396 esac
2398 else
2400 TARGET_SYSTEM_ROOT=
2401 TARGET_SYSTEM_ROOT_DEFINE=
2402 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2410 # -------------------------
2411 # Checks for other programs
2412 # -------------------------
2414 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2415 echo "configure:2416: checking whether ${MAKE-make} sets \${MAKE}" >&5
2416 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2417 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2418 echo $ac_n "(cached) $ac_c" 1>&6
2419 else
2420 cat > conftestmake <<\EOF
2421 all:
2422 @echo 'ac_maketemp="${MAKE}"'
2424 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2425 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2426 if test -n "$ac_maketemp"; then
2427 eval ac_cv_prog_make_${ac_make}_set=yes
2428 else
2429 eval ac_cv_prog_make_${ac_make}_set=no
2431 rm -f conftestmake
2433 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2434 echo "$ac_t""yes" 1>&6
2435 SET_MAKE=
2436 else
2437 echo "$ac_t""no" 1>&6
2438 SET_MAKE="MAKE=${MAKE-make}"
2442 # Find some useful tools
2443 for ac_prog in mawk gawk nawk awk
2445 # Extract the first word of "$ac_prog", so it can be a program name with args.
2446 set dummy $ac_prog; ac_word=$2
2447 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2448 echo "configure:2449: checking for $ac_word" >&5
2449 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451 else
2452 if test -n "$AWK"; then
2453 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2454 else
2455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2456 ac_dummy="$PATH"
2457 for ac_dir in $ac_dummy; do
2458 test -z "$ac_dir" && ac_dir=.
2459 if test -f $ac_dir/$ac_word; then
2460 ac_cv_prog_AWK="$ac_prog"
2461 break
2463 done
2464 IFS="$ac_save_ifs"
2467 AWK="$ac_cv_prog_AWK"
2468 if test -n "$AWK"; then
2469 echo "$ac_t""$AWK" 1>&6
2470 else
2471 echo "$ac_t""no" 1>&6
2474 test -n "$AWK" && break
2475 done
2477 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2478 echo "configure:2479: checking whether ln works" >&5
2479 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482 rm -f conftestdata_t
2483 echo >conftestdata_f
2484 if ln conftestdata_f conftestdata_t 2>/dev/null
2485 then
2486 gcc_cv_prog_LN="ln"
2487 else
2488 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2489 then
2490 gcc_cv_prog_LN="ln -s"
2491 else
2492 gcc_cv_prog_LN=cp
2495 rm -f conftestdata_f conftestdata_t
2498 LN="$gcc_cv_prog_LN"
2499 if test "$gcc_cv_prog_LN" = "ln"; then
2500 echo "$ac_t""yes" 1>&6
2501 else
2502 if test "$gcc_cv_prog_LN" = "ln -s"; then
2503 echo "$ac_t""no, using ln -s" 1>&6
2504 else
2505 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2509 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2510 echo "configure:2511: checking whether ln -s works" >&5
2511 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2512 echo $ac_n "(cached) $ac_c" 1>&6
2513 else
2514 rm -f conftestdata_t
2515 echo >conftestdata_f
2516 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2517 then
2518 gcc_cv_prog_LN_S="ln -s"
2519 else
2520 if ln conftestdata_f conftestdata_t 2>/dev/null
2521 then
2522 gcc_cv_prog_LN_S=ln
2523 else
2524 gcc_cv_prog_LN_S=cp
2527 rm -f conftestdata_f conftestdata_t
2530 LN_S="$gcc_cv_prog_LN_S"
2531 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2532 echo "$ac_t""yes" 1>&6
2533 else
2534 if test "$gcc_cv_prog_LN_S" = "ln"; then
2535 echo "$ac_t""no, using ln" 1>&6
2536 else
2537 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2541 # Extract the first word of "ranlib", so it can be a program name with args.
2542 set dummy ranlib; ac_word=$2
2543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_word" >&5
2545 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548 if test -n "$RANLIB"; then
2549 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2550 else
2551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2552 ac_dummy="$PATH"
2553 for ac_dir in $ac_dummy; do
2554 test -z "$ac_dir" && ac_dir=.
2555 if test -f $ac_dir/$ac_word; then
2556 ac_cv_prog_RANLIB="ranlib"
2557 break
2559 done
2560 IFS="$ac_save_ifs"
2561 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2564 RANLIB="$ac_cv_prog_RANLIB"
2565 if test -n "$RANLIB"; then
2566 echo "$ac_t""$RANLIB" 1>&6
2567 else
2568 echo "$ac_t""no" 1>&6
2571 # Find a good install program. We prefer a C program (faster),
2572 # so one script is as good as another. But avoid the broken or
2573 # incompatible versions:
2574 # SysV /etc/install, /usr/sbin/install
2575 # SunOS /usr/etc/install
2576 # IRIX /sbin/install
2577 # AIX /bin/install
2578 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2579 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2580 # ./install, which can be erroneously created by make from ./install.sh.
2581 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2582 echo "configure:2583: checking for a BSD compatible install" >&5
2583 if test -z "$INSTALL"; then
2584 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2585 echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2588 for ac_dir in $PATH; do
2589 # Account for people who put trailing slashes in PATH elements.
2590 case "$ac_dir/" in
2591 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2593 # OSF1 and SCO ODT 3.0 have their own names for install.
2594 for ac_prog in ginstall scoinst install; do
2595 if test -f $ac_dir/$ac_prog; then
2596 if test $ac_prog = install &&
2597 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2598 # AIX install. It has an incompatible calling convention.
2599 # OSF/1 installbsd also uses dspmsg, but is usable.
2601 else
2602 ac_cv_path_install="$ac_dir/$ac_prog -c"
2603 break 2
2606 done
2608 esac
2609 done
2610 IFS="$ac_save_IFS"
2613 if test "${ac_cv_path_install+set}" = set; then
2614 INSTALL="$ac_cv_path_install"
2615 else
2616 # As a last resort, use the slow shell script. We don't cache a
2617 # path for INSTALL within a source directory, because that will
2618 # break other packages using the cache if that directory is
2619 # removed, or if the path is relative.
2620 INSTALL="$ac_install_sh"
2623 echo "$ac_t""$INSTALL" 1>&6
2625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2626 # It thinks the first close brace ends the variable substitution.
2627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2629 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2632 # See if we have the mktemp command.
2633 # Extract the first word of "mktemp", so it can be a program name with args.
2634 set dummy mktemp; ac_word=$2
2635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2636 echo "configure:2637: checking for $ac_word" >&5
2637 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2638 echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640 if test -n "$have_mktemp_command"; then
2641 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2642 else
2643 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2644 ac_dummy="$PATH"
2645 for ac_dir in $ac_dummy; do
2646 test -z "$ac_dir" && ac_dir=.
2647 if test -f $ac_dir/$ac_word; then
2648 ac_cv_prog_have_mktemp_command="yes"
2649 break
2651 done
2652 IFS="$ac_save_ifs"
2653 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2656 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2657 if test -n "$have_mktemp_command"; then
2658 echo "$ac_t""$have_mktemp_command" 1>&6
2659 else
2660 echo "$ac_t""no" 1>&6
2664 # Do we have a single-tree copy of texinfo?
2665 if test -f $srcdir/../texinfo/Makefile.in; then
2666 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2667 gcc_cv_prog_makeinfo_modern=yes
2668 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2669 else
2670 # See if makeinfo has been installed and is modern enough
2671 # that we can use it.
2672 # Extract the first word of "makeinfo", so it can be a program name with args.
2673 set dummy makeinfo; ac_word=$2
2674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_word" >&5
2676 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679 if test -n "$MAKEINFO"; then
2680 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2681 else
2682 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2683 ac_dummy="$PATH"
2684 for ac_dir in $ac_dummy; do
2685 test -z "$ac_dir" && ac_dir=.
2686 if test -f $ac_dir/$ac_word; then
2687 ac_cv_prog_MAKEINFO="makeinfo"
2688 break
2690 done
2691 IFS="$ac_save_ifs"
2694 MAKEINFO="$ac_cv_prog_MAKEINFO"
2695 if test -n "$MAKEINFO"; then
2696 echo "$ac_t""$MAKEINFO" 1>&6
2697 else
2698 echo "$ac_t""no" 1>&6
2701 if test -n "$MAKEINFO"; then
2702 # Found it, now check the version.
2703 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2704 echo "configure:2705: checking for modern makeinfo" >&5
2705 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2706 echo $ac_n "(cached) $ac_c" 1>&6
2707 else
2708 ac_prog_version=`$MAKEINFO --version 2>&1 |
2709 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2710 echo "configure:2711: version of makeinfo is $ac_prog_version" >&5
2711 case $ac_prog_version in
2712 '') gcc_cv_prog_makeinfo_modern=no;;
2713 4.[2-9]*)
2714 gcc_cv_prog_makeinfo_modern=yes;;
2715 *) gcc_cv_prog_makeinfo_modern=no;;
2716 esac
2720 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2721 else
2722 gcc_cv_prog_makeinfo_modern=no
2727 if test $gcc_cv_prog_makeinfo_modern = no; then
2728 echo "configure: warning:
2729 *** Makeinfo is missing or too old.
2730 *** Info documentation will not be built." 1>&2
2731 BUILD_INFO=
2732 else
2733 BUILD_INFO=info
2736 # Is pod2man recent enough to regenerate manpages?
2737 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2738 echo "configure:2739: checking for recent Pod::Man" >&5
2739 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2740 echo "$ac_t""yes" 1>&6
2741 GENERATED_MANPAGES=generated-manpages
2742 else
2743 echo "$ac_t""no" 1>&6
2744 GENERATED_MANPAGES=
2747 # 'make compare' can be significantly faster, if cmp itself can
2748 # skip bytes instead of using tail. The test being performed is
2749 # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
2750 # but we need to sink errors and handle broken shells.
2751 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2752 echo "configure:2753: checking for cmp's capabilities" >&5
2753 echo abfoo >t1
2754 echo cdfoo >t2
2755 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2756 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2757 make_compare_target=slowcompare
2758 else
2759 make_compare_target=gnucompare
2761 else
2762 make_compare_target=slowcompare
2764 rm t1 t2
2766 echo "$ac_t""$make_compare_target" 1>&6
2768 # How about lex?
2769 if test -f $srcdir/../flex/skel.c; then
2770 FLEX='$(objdir)/../flex/flex'
2771 else
2772 # Extract the first word of "flex", so it can be a program name with args.
2773 set dummy flex; ac_word=$2
2774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2775 echo "configure:2776: checking for $ac_word" >&5
2776 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2777 echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779 if test -n "$FLEX"; then
2780 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2781 else
2782 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2783 ac_dummy="$PATH"
2784 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 if test -f $ac_dir/$ac_word; then
2787 ac_cv_prog_FLEX="flex"
2788 break
2790 done
2791 IFS="$ac_save_ifs"
2792 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2795 FLEX="$ac_cv_prog_FLEX"
2796 if test -n "$FLEX"; then
2797 echo "$ac_t""$FLEX" 1>&6
2798 else
2799 echo "$ac_t""no" 1>&6
2804 # Bison?
2805 # The -L switch is so bison can find its skeleton file.
2806 if test -f $srcdir/../bison/bison.simple; then
2807 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2808 else
2809 # Extract the first word of "bison", so it can be a program name with args.
2810 set dummy bison; ac_word=$2
2811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2812 echo "configure:2813: checking for $ac_word" >&5
2813 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2814 echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816 if test -n "$BISON"; then
2817 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2818 else
2819 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822 test -z "$ac_dir" && ac_dir=.
2823 if test -f $ac_dir/$ac_word; then
2824 ac_cv_prog_BISON="bison"
2825 break
2827 done
2828 IFS="$ac_save_ifs"
2829 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2832 BISON="$ac_cv_prog_BISON"
2833 if test -n "$BISON"; then
2834 echo "$ac_t""$BISON" 1>&6
2835 else
2836 echo "$ac_t""no" 1>&6
2841 # --------------------
2842 # Checks for C headers
2843 # --------------------
2845 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2846 echo "configure:2847: checking for GNU C library" >&5
2847 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2848 echo $ac_n "(cached) $ac_c" 1>&6
2849 else
2850 cat > conftest.$ac_ext <<EOF
2851 #line 2852 "configure"
2852 #include "confdefs.h"
2853 #include <features.h>
2854 int main() {
2856 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2857 #error Not a GNU C library system
2858 #endif
2859 ; return 0; }
2861 if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2862 rm -rf conftest*
2863 gcc_cv_glibc=yes
2864 else
2865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 rm -rf conftest*
2868 gcc_cv_glibc=no
2870 rm -f conftest*
2873 echo "$ac_t""$gcc_cv_glibc" 1>&6
2874 if test $gcc_cv_glibc = yes; then
2875 cat >> confdefs.h <<\EOF
2876 #define _GNU_SOURCE 1
2881 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2882 echo "configure:2883: checking for ANSI C header files" >&5
2883 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2884 echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886 cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 #include <stdlib.h>
2890 #include <stdarg.h>
2891 #include <string.h>
2892 #include <float.h>
2894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2895 { (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2897 if test -z "$ac_err"; then
2898 rm -rf conftest*
2899 ac_cv_header_stdc=yes
2900 else
2901 echo "$ac_err" >&5
2902 echo "configure: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 rm -rf conftest*
2905 ac_cv_header_stdc=no
2907 rm -f conftest*
2909 if test $ac_cv_header_stdc = yes; then
2910 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2913 "configure"
2913 #include "confdefs.h"
2914 #include <string.h>
2916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2917 egrep "memchr" >/dev/null 2>&1; then
2919 else
2920 rm -rf conftest*
2921 ac_cv_header_stdc=no
2923 rm -f conftest*
2927 if test $ac_cv_header_stdc = yes; then
2928 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2929 cat > conftest.$ac_ext <<EOF
2930 #line 2931 "configure"
2931 #include "confdefs.h"
2932 #include <stdlib.h>
2934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2935 egrep "free" >/dev/null 2>&1; then
2937 else
2938 rm -rf conftest*
2939 ac_cv_header_stdc=no
2941 rm -f conftest*
2945 if test $ac_cv_header_stdc = yes; then
2946 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2947 if test "$cross_compiling" = yes; then
2949 else
2950 cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 #include <ctype.h>
2954 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2955 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2956 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2957 int main () { int i; for (i = 0; i < 256; i++)
2958 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2959 exit (0); }
2962 if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2963 then
2965 else
2966 echo "configure: failed program was:" >&5
2967 cat conftest.$ac_ext >&5
2968 rm -fr conftest*
2969 ac_cv_header_stdc=no
2971 rm -fr conftest*
2977 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2978 if test $ac_cv_header_stdc = yes; then
2979 cat >> confdefs.h <<\EOF
2980 #define STDC_HEADERS 1
2985 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2986 echo "configure:2987: checking whether time.h and sys/time.h may both be included" >&5
2987 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2988 echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 #include <sys/time.h>
2995 #include <time.h>
2996 int main() {
2997 struct tm *tp;
2998 ; return 0; }
3000 if { (eval echo configure:3001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3001 rm -rf conftest*
3002 ac_cv_header_time=yes
3003 else
3004 echo "configure: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 rm -rf conftest*
3007 ac_cv_header_time=no
3009 rm -f conftest*
3012 echo "$ac_t""$ac_cv_header_time" 1>&6
3013 if test $ac_cv_header_time = yes; then
3014 cat >> confdefs.h <<\EOF
3015 #define TIME_WITH_SYS_TIME 1
3020 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
3021 echo "configure:3022: checking for working stdbool.h" >&5
3022 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
3023 echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025 cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028 #include <stdbool.h>
3029 int main() {
3030 bool foo = false;
3031 ; return 0; }
3033 if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3034 rm -rf conftest*
3035 ac_cv_header_stdbool_h=yes
3036 else
3037 echo "configure: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 rm -rf conftest*
3040 ac_cv_header_stdbool_h=no
3042 rm -f conftest*
3045 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
3046 if test $ac_cv_header_stdbool_h = yes; then
3047 cat >> confdefs.h <<\EOF
3048 #define HAVE_STDBOOL_H 1
3053 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
3054 echo "configure:3055: checking whether string.h and strings.h may both be included" >&5
3055 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
3056 echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058 cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061 #include <string.h>
3062 #include <strings.h>
3063 int main() {
3065 ; return 0; }
3067 if { (eval echo configure:3068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3068 rm -rf conftest*
3069 gcc_cv_header_string=yes
3070 else
3071 echo "configure: failed program was:" >&5
3072 cat conftest.$ac_ext >&5
3073 rm -rf conftest*
3074 gcc_cv_header_string=no
3076 rm -f conftest*
3079 echo "$ac_t""$gcc_cv_header_string" 1>&6
3080 if test $gcc_cv_header_string = yes; then
3081 cat >> confdefs.h <<\EOF
3082 #define STRING_WITH_STRINGS 1
3087 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3088 echo "configure:3089: checking for sys/wait.h that is POSIX.1 compatible" >&5
3089 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3090 echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 #include <sys/types.h>
3096 #include <sys/wait.h>
3097 #ifndef WEXITSTATUS
3098 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3099 #endif
3100 #ifndef WIFEXITED
3101 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3102 #endif
3103 int main() {
3104 int s;
3105 wait (&s);
3106 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3107 ; return 0; }
3109 if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3110 rm -rf conftest*
3111 ac_cv_header_sys_wait_h=yes
3112 else
3113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 rm -rf conftest*
3116 ac_cv_header_sys_wait_h=no
3118 rm -f conftest*
3121 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3122 if test $ac_cv_header_sys_wait_h = yes; then
3123 cat >> confdefs.h <<\EOF
3124 #define HAVE_SYS_WAIT_H 1
3129 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3130 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
3131 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3132 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3136 echo "configure:3137: checking for $ac_hdr" >&5
3137 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140 cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <$ac_hdr>
3145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3146 { (eval echo configure:3147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3148 if test -z "$ac_err"; then
3149 rm -rf conftest*
3150 eval "ac_cv_header_$ac_safe=yes"
3151 else
3152 echo "$ac_err" >&5
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&5
3155 rm -rf conftest*
3156 eval "ac_cv_header_$ac_safe=no"
3158 rm -f conftest*
3160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3161 echo "$ac_t""yes" 1>&6
3162 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3163 cat >> confdefs.h <<EOF
3164 #define $ac_tr_hdr 1
3167 else
3168 echo "$ac_t""no" 1>&6
3170 done
3173 # Check for thread headers.
3174 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3175 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3176 echo "configure:3177: checking for thread.h" >&5
3177 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3178 echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 #include <thread.h>
3185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3186 { (eval echo configure:3187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3188 if test -z "$ac_err"; then
3189 rm -rf conftest*
3190 eval "ac_cv_header_$ac_safe=yes"
3191 else
3192 echo "$ac_err" >&5
3193 echo "configure: failed program was:" >&5
3194 cat conftest.$ac_ext >&5
3195 rm -rf conftest*
3196 eval "ac_cv_header_$ac_safe=no"
3198 rm -f conftest*
3200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3201 echo "$ac_t""yes" 1>&6
3202 have_thread_h=yes
3203 else
3204 echo "$ac_t""no" 1>&6
3205 have_thread_h=
3208 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3209 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3210 echo "configure:3211: checking for pthread.h" >&5
3211 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3212 echo $ac_n "(cached) $ac_c" 1>&6
3213 else
3214 cat > conftest.$ac_ext <<EOF
3215 #line 3216 "configure"
3216 #include "confdefs.h"
3217 #include <pthread.h>
3219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3220 { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3222 if test -z "$ac_err"; then
3223 rm -rf conftest*
3224 eval "ac_cv_header_$ac_safe=yes"
3225 else
3226 echo "$ac_err" >&5
3227 echo "configure: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
3229 rm -rf conftest*
3230 eval "ac_cv_header_$ac_safe=no"
3232 rm -f conftest*
3234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3235 echo "$ac_t""yes" 1>&6
3236 have_pthread_h=yes
3237 else
3238 echo "$ac_t""no" 1>&6
3239 have_pthread_h=
3243 # These tests can't be done till we know if we have limits.h.
3244 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3245 echo "configure:3246: checking for CHAR_BIT" >&5
3246 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3247 echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #ifdef HAVE_LIMITS_H
3253 #include <limits.h>
3254 #endif
3255 #ifdef CHAR_BIT
3256 found
3257 #endif
3259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3260 egrep "found" >/dev/null 2>&1; then
3261 rm -rf conftest*
3262 gcc_cv_decl_char_bit=yes
3263 else
3264 rm -rf conftest*
3265 gcc_cv_decl_char_bit=no
3267 rm -f conftest*
3272 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3273 if test $gcc_cv_decl_char_bit = no; then
3274 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3275 echo "configure:3276: checking number of bits in a byte" >&5
3276 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3277 echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3280 gcc_cv_c_nbby=
3281 while test $i -lt 65; do
3282 cat > conftest.$ac_ext <<EOF
3283 #line 3284 "configure"
3284 #include "confdefs.h"
3286 int main() {
3287 switch(0) {
3288 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3289 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3291 ; return 0; }
3293 if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3294 rm -rf conftest*
3295 gcc_cv_c_nbby=$i; break
3296 else
3297 echo "configure: failed program was:" >&5
3298 cat conftest.$ac_ext >&5
3300 rm -f conftest*
3301 i=`expr $i + 1`
3302 done
3303 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3307 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3308 if test $gcc_cv_c_nbby = failed; then
3309 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3310 else
3311 cat >> confdefs.h <<EOF
3312 #define CHAR_BIT $gcc_cv_c_nbby
3317 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3318 echo "configure:3319: checking whether byte ordering is bigendian" >&5
3319 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3320 echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322 ac_cv_c_bigendian=unknown
3323 # See if sys/param.h defines the BYTE_ORDER macro.
3324 cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <sys/types.h>
3328 #include <sys/param.h>
3329 int main() {
3331 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3332 bogus endian macros
3333 #endif
3334 ; return 0; }
3336 if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3337 rm -rf conftest*
3338 # It does; now see whether it defined to BIG_ENDIAN or not.
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 #include <sys/types.h>
3343 #include <sys/param.h>
3344 int main() {
3346 #if BYTE_ORDER != BIG_ENDIAN
3347 not big endian
3348 #endif
3349 ; return 0; }
3351 if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3352 rm -rf conftest*
3353 ac_cv_c_bigendian=yes
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 rm -rf conftest*
3358 ac_cv_c_bigendian=no
3360 rm -f conftest*
3361 else
3362 echo "configure: failed program was:" >&5
3363 cat conftest.$ac_ext >&5
3365 rm -f conftest*
3366 if test $ac_cv_c_bigendian = unknown; then
3367 if test "$cross_compiling" = yes; then
3368 echo $ac_n "cross-compiling... " 2>&6
3369 else
3370 cat > conftest.$ac_ext <<EOF
3371 #line 3372 "configure"
3372 #include "confdefs.h"
3373 main () {
3374 /* Are we little or big endian? From Harbison&Steele. */
3375 union
3377 long l;
3378 char c[sizeof (long)];
3379 } u;
3380 u.l = 1;
3381 exit (u.c[sizeof (long) - 1] == 1);
3384 if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3385 then
3386 ac_cv_c_bigendian=no
3387 else
3388 echo "configure: failed program was:" >&5
3389 cat conftest.$ac_ext >&5
3390 rm -fr conftest*
3391 ac_cv_c_bigendian=yes
3393 rm -fr conftest*
3399 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3400 if test $ac_cv_c_bigendian = unknown; then
3401 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3402 echo "configure:3403: checking to probe for byte ordering" >&5
3404 cat >conftest.c <<EOF
3405 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3406 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3407 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3408 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3409 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3410 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3411 int main() { _ascii (); _ebcdic (); return 0; }
3413 if test -f conftest.c ; then
3414 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3415 if test `grep -l BIGenDianSyS conftest.o` ; then
3416 echo $ac_n ' big endian probe OK, ' 1>&6
3417 ac_cv_c_bigendian=yes
3419 if test `grep -l LiTTleEnDian conftest.o` ; then
3420 echo $ac_n ' little endian probe OK, ' 1>&6
3421 if test $ac_cv_c_bigendian = yes ; then
3422 ac_cv_c_bigendian=unknown;
3423 else
3424 ac_cv_c_bigendian=no
3427 echo $ac_n 'guessing bigendian ... ' >&6
3430 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3432 if test $ac_cv_c_bigendian = yes; then
3433 cat >> confdefs.h <<\EOF
3434 #define WORDS_BIGENDIAN 1
3437 cat >> confdefs.h <<\EOF
3438 #define HOST_WORDS_BIG_ENDIAN 1
3441 BYTEORDER=4321
3442 else
3443 BYTEORDER=1234
3445 cat >> confdefs.h <<EOF
3446 #define BYTEORDER $BYTEORDER
3449 if test $ac_cv_c_bigendian = unknown; then
3450 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3454 # --------
3455 # UNSORTED
3456 # --------
3458 # Stage specific cflags for build.
3459 stage1_cflags=
3460 case $build in
3461 vax-*-*)
3462 if test x$GCC = xyes
3463 then
3464 stage1_cflags="-Wa,-J"
3465 else
3466 stage1_cflags="-J"
3469 powerpc-*-darwin*)
3470 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3471 # sources; use -no-cpp-precomp to get to GNU cpp.
3472 # Apple's GCC has bugs in designated initializer handling, so disable
3473 # that too.
3474 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3476 esac
3479 # These libraries may be used by collect2.
3480 # We may need a special search path to get them linked.
3481 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3482 echo "configure:3483: checking for collect2 libraries" >&5
3483 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3484 echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486 save_LIBS="$LIBS"
3487 for libs in '' -lld -lmld \
3488 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3489 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3491 LIBS="$libs"
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 /* Override any gcc2 internal prototype to avoid an error. */
3496 /* We use char because int might match the return type of a gcc2
3497 builtin and then its argument prototype would still apply. */
3498 char ldopen();
3500 int main() {
3501 ldopen()
3502 ; return 0; }
3504 if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3505 rm -rf conftest*
3506 gcc_cv_collect2_libs="$libs"; break
3507 else
3508 echo "configure: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3511 rm -f conftest*
3512 done
3513 LIBS="$save_LIBS"
3514 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3517 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3518 case $gcc_cv_collect2_libs in
3519 "none required") ;;
3520 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3521 esac
3524 # When building Ada code on Alpha, we need exc_resume which is usually in
3525 # -lexc. So test for it.
3526 save_LIBS="$LIBS"
3527 LIBS=
3529 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3530 echo "configure:3531: checking for library containing exc_resume" >&5
3531 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3532 echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534 ac_func_search_save_LIBS="$LIBS"
3535 ac_cv_search_exc_resume="no"
3536 cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 /* Override any gcc2 internal prototype to avoid an error. */
3540 /* We use char because int might match the return type of a gcc2
3541 builtin and then its argument prototype would still apply. */
3542 char exc_resume();
3544 int main() {
3545 exc_resume()
3546 ; return 0; }
3548 if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3549 rm -rf conftest*
3550 ac_cv_search_exc_resume="none required"
3551 else
3552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
3555 rm -f conftest*
3556 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3557 LIBS="-l$i $ac_func_search_save_LIBS"
3558 cat > conftest.$ac_ext <<EOF
3559 #line 3560 "configure"
3560 #include "confdefs.h"
3561 /* Override any gcc2 internal prototype to avoid an error. */
3562 /* We use char because int might match the return type of a gcc2
3563 builtin and then its argument prototype would still apply. */
3564 char exc_resume();
3566 int main() {
3567 exc_resume()
3568 ; return 0; }
3570 if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3571 rm -rf conftest*
3572 ac_cv_search_exc_resume="-l$i"
3573 break
3574 else
3575 echo "configure: failed program was:" >&5
3576 cat conftest.$ac_ext >&5
3578 rm -f conftest*
3579 done
3580 LIBS="$ac_func_search_save_LIBS"
3583 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3584 if test "$ac_cv_search_exc_resume" != "no"; then
3585 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3587 else :
3590 GNAT_LIBEXC="$LIBS"
3591 LIBS="$save_LIBS"
3594 # Some systems put ldexp and frexp in libm instead of libc; assume
3595 # they're both in the same place. jcf-dump needs them.
3596 save_LIBS="$LIBS"
3597 LIBS=
3599 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3600 echo "configure:3601: checking for library containing ldexp" >&5
3601 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3602 echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604 ac_func_search_save_LIBS="$LIBS"
3605 ac_cv_search_ldexp="no"
3606 cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 /* Override any gcc2 internal prototype to avoid an error. */
3610 /* We use char because int might match the return type of a gcc2
3611 builtin and then its argument prototype would still apply. */
3612 char ldexp();
3614 int main() {
3615 ldexp()
3616 ; return 0; }
3618 if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3619 rm -rf conftest*
3620 ac_cv_search_ldexp="none required"
3621 else
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3625 rm -f conftest*
3626 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3627 LIBS="-l$i $ac_func_search_save_LIBS"
3628 cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631 /* Override any gcc2 internal prototype to avoid an error. */
3632 /* We use char because int might match the return type of a gcc2
3633 builtin and then its argument prototype would still apply. */
3634 char ldexp();
3636 int main() {
3637 ldexp()
3638 ; return 0; }
3640 if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3641 rm -rf conftest*
3642 ac_cv_search_ldexp="-l$i"
3643 break
3644 else
3645 echo "configure: failed program was:" >&5
3646 cat conftest.$ac_ext >&5
3648 rm -f conftest*
3649 done
3650 LIBS="$ac_func_search_save_LIBS"
3653 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3654 if test "$ac_cv_search_ldexp" != "no"; then
3655 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3657 else :
3660 LDEXP_LIB="$LIBS"
3661 LIBS="$save_LIBS"
3664 # See if the stage1 system preprocessor understands the ANSI C
3665 # preprocessor stringification operator. (Used by symcat.h.)
3668 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3669 echo "configure:3670: checking for preprocessor stringizing operator" >&5
3670 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3671 echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673 cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3677 #define x(y) #y
3679 char *s = x(teststring);
3682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3683 egrep "#teststring" >/dev/null 2>&1; then
3684 rm -rf conftest*
3685 ac_cv_c_stringize=no
3686 else
3687 rm -rf conftest*
3688 ac_cv_c_stringize=yes
3690 rm -f conftest*
3694 if test "${ac_cv_c_stringize}" = yes
3695 then
3696 cat >> confdefs.h <<\EOF
3697 #define HAVE_STRINGIZE 1
3701 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3704 # Use <inttypes.h> only if it exists,
3705 # doesn't clash with <sys/types.h>, and declares intmax_t.
3706 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3707 echo "configure:3708: checking for inttypes.h" >&5
3708 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711 cat > conftest.$ac_ext <<EOF
3712 #line 3713 "configure"
3713 #include "confdefs.h"
3714 #include <sys/types.h>
3715 #include <inttypes.h>
3716 int main() {
3717 intmax_t i = -1;
3718 ; return 0; }
3720 if { (eval echo configure:3721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3721 rm -rf conftest*
3722 gcc_cv_header_inttypes_h=yes
3723 else
3724 echo "configure: failed program was:" >&5
3725 cat conftest.$ac_ext >&5
3726 rm -rf conftest*
3727 gcc_cv_header_inttypes_h=no
3729 rm -f conftest*
3732 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3733 if test $gcc_cv_header_inttypes_h = yes; then
3734 cat >> confdefs.h <<\EOF
3735 #define HAVE_INTTYPES_H 1
3741 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3742 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3743 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3744 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore
3746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3747 echo "configure:3748: checking for $ac_func" >&5
3748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3749 echo $ac_n "(cached) $ac_c" 1>&6
3750 else
3751 cat > conftest.$ac_ext <<EOF
3752 #line 3753 "configure"
3753 #include "confdefs.h"
3754 /* System header to define __stub macros and hopefully few prototypes,
3755 which can conflict with char $ac_func(); below. */
3756 #include <assert.h>
3757 /* Override any gcc2 internal prototype to avoid an error. */
3758 /* We use char because int might match the return type of a gcc2
3759 builtin and then its argument prototype would still apply. */
3760 char $ac_func();
3762 int main() {
3764 /* The GNU C library defines this for functions which it implements
3765 to always fail with ENOSYS. Some functions are actually named
3766 something starting with __ and the normal name is an alias. */
3767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3768 choke me
3769 #else
3770 $ac_func();
3771 #endif
3773 ; return 0; }
3775 if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3776 rm -rf conftest*
3777 eval "ac_cv_func_$ac_func=yes"
3778 else
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781 rm -rf conftest*
3782 eval "ac_cv_func_$ac_func=no"
3784 rm -f conftest*
3787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3788 echo "$ac_t""yes" 1>&6
3789 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3790 cat >> confdefs.h <<EOF
3791 #define $ac_tr_func 1
3794 else
3795 echo "$ac_t""no" 1>&6
3797 done
3800 if test x$ac_cv_func_mbstowcs = xyes; then
3801 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3802 echo "configure:3803: checking whether mbstowcs works" >&5
3803 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805 else
3806 if test "$cross_compiling" = yes; then
3807 gcc_cv_func_mbstowcs_works=yes
3808 else
3809 cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <stdlib.h>
3813 int main()
3815 mbstowcs(0, "", 0);
3816 return 0;
3819 if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3820 then
3821 gcc_cv_func_mbstowcs_works=yes
3822 else
3823 echo "configure: failed program was:" >&5
3824 cat conftest.$ac_ext >&5
3825 rm -fr conftest*
3826 gcc_cv_func_mbstowcs_works=no
3828 rm -fr conftest*
3833 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3834 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3835 cat >> confdefs.h <<\EOF
3836 #define HAVE_WORKING_MBSTOWCS 1
3842 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3843 echo "configure:3844: checking for ssize_t" >&5
3844 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3845 echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847 cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <sys/types.h>
3851 #if STDC_HEADERS
3852 #include <stdlib.h>
3853 #include <stddef.h>
3854 #endif
3856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3858 rm -rf conftest*
3859 ac_cv_type_ssize_t=yes
3860 else
3861 rm -rf conftest*
3862 ac_cv_type_ssize_t=no
3864 rm -f conftest*
3867 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3868 if test $ac_cv_type_ssize_t = no; then
3869 cat >> confdefs.h <<\EOF
3870 #define ssize_t int
3876 # Try to determine the array type of the second argument of getgroups
3877 # for the target system (int or gid_t).
3878 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3879 echo "configure:3880: checking for uid_t in sys/types.h" >&5
3880 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3881 echo $ac_n "(cached) $ac_c" 1>&6
3882 else
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <sys/types.h>
3888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3889 egrep "uid_t" >/dev/null 2>&1; then
3890 rm -rf conftest*
3891 ac_cv_type_uid_t=yes
3892 else
3893 rm -rf conftest*
3894 ac_cv_type_uid_t=no
3896 rm -f conftest*
3900 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3901 if test $ac_cv_type_uid_t = no; then
3902 cat >> confdefs.h <<\EOF
3903 #define uid_t int
3906 cat >> confdefs.h <<\EOF
3907 #define gid_t int
3912 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3913 echo "configure:3914: checking type of array argument to getgroups" >&5
3914 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
3916 else
3917 if test "$cross_compiling" = yes; then
3918 ac_cv_type_getgroups=cross
3919 else
3920 cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3924 /* Thanks to Mike Rendell for this test. */
3925 #include <sys/types.h>
3926 #define NGID 256
3927 #undef MAX
3928 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3929 main()
3931 gid_t gidset[NGID];
3932 int i, n;
3933 union { gid_t gval; long lval; } val;
3935 val.lval = -1;
3936 for (i = 0; i < NGID; i++)
3937 gidset[i] = val.gval;
3938 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3939 gidset);
3940 /* Exit non-zero if getgroups seems to require an array of ints. This
3941 happens when gid_t is short but getgroups modifies an array of ints. */
3942 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3946 if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3947 then
3948 ac_cv_type_getgroups=gid_t
3949 else
3950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -fr conftest*
3953 ac_cv_type_getgroups=int
3955 rm -fr conftest*
3958 if test $ac_cv_type_getgroups = cross; then
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 #include <unistd.h>
3964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3965 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3966 rm -rf conftest*
3967 ac_cv_type_getgroups=gid_t
3968 else
3969 rm -rf conftest*
3970 ac_cv_type_getgroups=int
3972 rm -f conftest*
3977 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3978 cat >> confdefs.h <<EOF
3979 #define GETGROUPS_T $ac_cv_type_getgroups
3983 if test "${target}" = "${build}"; then
3984 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3985 else
3986 case "${target}" in
3987 # This condition may need some tweaking. It should include all
3988 # targets where the array type of the second argument of getgroups
3989 # is int and the type of gid_t is not equivalent to int.
3990 *-*-sunos* | *-*-ultrix*)
3991 TARGET_GETGROUPS_T=int
3994 TARGET_GETGROUPS_T=gid_t
3996 esac
4000 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
4001 echo "configure:4002: checking whether the printf functions support %p" >&5
4002 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
4003 echo $ac_n "(cached) $ac_c" 1>&6
4004 else
4005 if test "$cross_compiling" = yes; then
4006 gcc_cv_func_printf_ptr=no
4007 else
4008 cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011 #include <stdio.h>
4013 int main()
4015 char buf[64];
4016 char *p = buf, *q = NULL;
4017 sprintf(buf, "%p", p);
4018 sscanf(buf, "%p", &q);
4019 return (p != q);
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4023 then
4024 gcc_cv_func_printf_ptr=yes
4025 else
4026 echo "configure: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 rm -fr conftest*
4029 gcc_cv_func_printf_ptr=no
4031 rm -fr conftest*
4034 rm -f core core.* *.core
4037 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
4038 if test $gcc_cv_func_printf_ptr = yes ; then
4039 cat >> confdefs.h <<\EOF
4040 #define HAVE_PRINTF_PTR 1
4045 if test $ac_cv_header_sys_mman_h != yes \
4046 || test $ac_cv_func_mmap != yes; then
4047 gcc_cv_func_mmap_file=no
4048 gcc_cv_func_mmap_dev_zero=no
4049 gcc_cv_func_mmap_anon=no
4050 else
4051 echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
4052 echo "configure:4053: checking whether read-only mmap of a plain file works" >&5
4053 if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
4054 echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056 # Add a system to this blacklist if
4057 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
4058 # memory area containing the same data that you'd get if you applied
4059 # read() to the same fd. The only system known to have a problem here
4060 # is VMS, where text files have record structure.
4061 case "$host_os" in
4062 vms*)
4063 gcc_cv_func_mmap_file=no ;;
4065 gcc_cv_func_mmap_file=yes;;
4066 esac
4069 echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
4070 echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
4071 echo "configure:4072: checking whether mmap from /dev/zero works" >&5
4072 if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4073 echo $ac_n "(cached) $ac_c" 1>&6
4074 else
4075 # Add a system to this blacklist if it has mmap() but /dev/zero
4076 # does not exist, or if mmapping /dev/zero does not give anonymous
4077 # zeroed pages with both the following properties:
4078 # 1. If you map N consecutive pages in with one call, and then
4079 # unmap any subset of those pages, the pages that were not
4080 # explicitly unmapped remain accessible.
4081 # 2. If you map two adjacent blocks of memory and then unmap them
4082 # both at once, they must both go away.
4083 # Systems known to be in this category are Windows (all variants),
4084 # VMS, and Darwin.
4085 case "$host_os" in
4086 vms* | cygwin* | pe | mingw* | darwin*)
4087 gcc_cv_func_mmap_dev_zero=no ;;
4089 gcc_cv_func_mmap_dev_zero=yes;;
4090 esac
4093 echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
4095 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
4096 echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
4097 echo "configure:4098: checking for MAP_ANON(YMOUS)" >&5
4098 if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
4099 echo $ac_n "(cached) $ac_c" 1>&6
4100 else
4101 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 #include <sys/types.h>
4105 #include <sys/mman.h>
4106 #include <unistd.h>
4108 #ifndef MAP_ANONYMOUS
4109 #define MAP_ANONYMOUS MAP_ANON
4110 #endif
4112 int main() {
4113 int n = MAP_ANONYMOUS;
4114 ; return 0; }
4116 if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4117 rm -rf conftest*
4118 gcc_cv_decl_map_anon=yes
4119 else
4120 echo "configure: failed program was:" >&5
4121 cat conftest.$ac_ext >&5
4122 rm -rf conftest*
4123 gcc_cv_decl_map_anon=no
4125 rm -f conftest*
4128 echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
4130 if test $gcc_cv_decl_map_anon = no; then
4131 gcc_cv_func_mmap_anon=no
4132 else
4133 echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
4134 echo "configure:4135: checking whether mmap with MAP_ANON(YMOUS) works" >&5
4135 if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
4136 echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138 # Add a system to this blacklist if it has mmap() and MAP_ANON or
4139 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
4140 # doesn't give anonymous zeroed pages with the same properties listed
4141 # above for use of /dev/zero.
4142 # Systems known to be in this category are Windows, VMS, and SCO Unix.
4143 case "$host_os" in
4144 vms* | cygwin* | pe | mingw* | sco* | udk* )
4145 gcc_cv_func_mmap_anon=no ;;
4147 gcc_cv_func_mmap_anon=yes;;
4148 esac
4151 echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6
4155 if test $gcc_cv_func_mmap_file = yes; then
4156 cat >> confdefs.h <<\EOF
4157 #define HAVE_MMAP_FILE 1
4161 if test $gcc_cv_func_mmap_dev_zero = yes; then
4162 cat >> confdefs.h <<\EOF
4163 #define HAVE_MMAP_DEV_ZERO 1
4167 if test $gcc_cv_func_mmap_anon = yes; then
4168 cat >> confdefs.h <<\EOF
4169 #define HAVE_MMAP_ANON 1
4175 case "${host}" in
4176 *-*-uwin*)
4177 { echo "configure: error:
4178 *** UWIN may not be used as a host platform because
4179 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4181 *-*-*vms*)
4182 # Under VMS, vfork works very different than on Unix. The standard test
4183 # won't work, and it isn't easily adaptable. It makes more sense to
4184 # just force it.
4185 ac_cv_func_vfork_works=yes
4187 esac
4188 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4189 echo "configure:4190: checking for pid_t" >&5
4190 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4191 echo $ac_n "(cached) $ac_c" 1>&6
4192 else
4193 cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 #include <sys/types.h>
4197 #if STDC_HEADERS
4198 #include <stdlib.h>
4199 #include <stddef.h>
4200 #endif
4202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4203 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4204 rm -rf conftest*
4205 ac_cv_type_pid_t=yes
4206 else
4207 rm -rf conftest*
4208 ac_cv_type_pid_t=no
4210 rm -f conftest*
4213 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4214 if test $ac_cv_type_pid_t = no; then
4215 cat >> confdefs.h <<\EOF
4216 #define pid_t int
4221 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4222 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4223 echo "configure:4224: checking for vfork.h" >&5
4224 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4225 echo $ac_n "(cached) $ac_c" 1>&6
4226 else
4227 cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 #include <vfork.h>
4232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4233 { (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4235 if test -z "$ac_err"; then
4236 rm -rf conftest*
4237 eval "ac_cv_header_$ac_safe=yes"
4238 else
4239 echo "$ac_err" >&5
4240 echo "configure: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
4242 rm -rf conftest*
4243 eval "ac_cv_header_$ac_safe=no"
4245 rm -f conftest*
4247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4248 echo "$ac_t""yes" 1>&6
4249 cat >> confdefs.h <<\EOF
4250 #define HAVE_VFORK_H 1
4253 else
4254 echo "$ac_t""no" 1>&6
4257 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4258 echo "configure:4259: checking for working vfork" >&5
4259 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4260 echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262 if test "$cross_compiling" = yes; then
4263 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4264 echo "configure:4265: checking for vfork" >&5
4265 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4266 echo $ac_n "(cached) $ac_c" 1>&6
4267 else
4268 cat > conftest.$ac_ext <<EOF
4269 #line 4270 "configure"
4270 #include "confdefs.h"
4271 /* System header to define __stub macros and hopefully few prototypes,
4272 which can conflict with char vfork(); below. */
4273 #include <assert.h>
4274 /* Override any gcc2 internal prototype to avoid an error. */
4275 /* We use char because int might match the return type of a gcc2
4276 builtin and then its argument prototype would still apply. */
4277 char vfork();
4279 int main() {
4281 /* The GNU C library defines this for functions which it implements
4282 to always fail with ENOSYS. Some functions are actually named
4283 something starting with __ and the normal name is an alias. */
4284 #if defined (__stub_vfork) || defined (__stub___vfork)
4285 choke me
4286 #else
4287 vfork();
4288 #endif
4290 ; return 0; }
4292 if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4293 rm -rf conftest*
4294 eval "ac_cv_func_vfork=yes"
4295 else
4296 echo "configure: failed program was:" >&5
4297 cat conftest.$ac_ext >&5
4298 rm -rf conftest*
4299 eval "ac_cv_func_vfork=no"
4301 rm -f conftest*
4304 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4305 echo "$ac_t""yes" 1>&6
4307 else
4308 echo "$ac_t""no" 1>&6
4311 ac_cv_func_vfork_works=$ac_cv_func_vfork
4312 else
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 /* Thanks to Paul Eggert for this test. */
4317 #include <stdio.h>
4318 #include <sys/types.h>
4319 #include <sys/stat.h>
4320 #ifdef HAVE_UNISTD_H
4321 #include <unistd.h>
4322 #endif
4323 #ifdef HAVE_VFORK_H
4324 #include <vfork.h>
4325 #endif
4326 /* On some sparc systems, changes by the child to local and incoming
4327 argument registers are propagated back to the parent.
4328 The compiler is told about this with #include <vfork.h>,
4329 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4330 Test for this by using a static variable whose address
4331 is put into a register that is clobbered by the vfork. */
4332 static
4333 #ifdef __cplusplus
4334 sparc_address_test (int arg)
4335 #else
4336 sparc_address_test (arg) int arg;
4337 #endif
4339 static pid_t child;
4340 if (!child) {
4341 child = vfork ();
4342 if (child < 0) {
4343 perror ("vfork");
4344 _exit(2);
4346 if (!child) {
4347 arg = getpid();
4348 write(-1, "", 0);
4349 _exit (arg);
4353 main() {
4354 pid_t parent = getpid ();
4355 pid_t child;
4357 sparc_address_test ();
4359 child = vfork ();
4361 if (child == 0) {
4362 /* Here is another test for sparc vfork register problems.
4363 This test uses lots of local variables, at least
4364 as many local variables as main has allocated so far
4365 including compiler temporaries. 4 locals are enough for
4366 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4367 A buggy compiler should reuse the register of parent
4368 for one of the local variables, since it will think that
4369 parent can't possibly be used any more in this routine.
4370 Assigning to the local variable will thus munge parent
4371 in the parent process. */
4372 pid_t
4373 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4374 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4375 /* Convince the compiler that p..p7 are live; otherwise, it might
4376 use the same hardware register for all 8 local variables. */
4377 if (p != p1 || p != p2 || p != p3 || p != p4
4378 || p != p5 || p != p6 || p != p7)
4379 _exit(1);
4381 /* On some systems (e.g. IRIX 3.3),
4382 vfork doesn't separate parent from child file descriptors.
4383 If the child closes a descriptor before it execs or exits,
4384 this munges the parent's descriptor as well.
4385 Test for this by closing stdout in the child. */
4386 _exit(close(fileno(stdout)) != 0);
4387 } else {
4388 int status;
4389 struct stat st;
4391 while (wait(&status) != child)
4393 exit(
4394 /* Was there some problem with vforking? */
4395 child < 0
4397 /* Did the child fail? (This shouldn't happen.) */
4398 || status
4400 /* Did the vfork/compiler bug occur? */
4401 || parent != getpid()
4403 /* Did the file descriptor bug occur? */
4404 || fstat(fileno(stdout), &st) != 0
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4410 then
4411 ac_cv_func_vfork_works=yes
4412 else
4413 echo "configure: failed program was:" >&5
4414 cat conftest.$ac_ext >&5
4415 rm -fr conftest*
4416 ac_cv_func_vfork_works=no
4418 rm -fr conftest*
4423 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4424 if test $ac_cv_func_vfork_works = no; then
4425 cat >> confdefs.h <<\EOF
4426 #define vfork fork
4434 am_cv_lib_iconv_ldpath=
4435 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4436 if test "${with_libiconv_prefix+set}" = set; then
4437 withval="$with_libiconv_prefix"
4439 for dir in `echo "$withval" | tr : ' '`; do
4440 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4441 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4442 done
4447 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4448 echo "configure:4449: checking for iconv" >&5
4449 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
4451 else
4453 am_cv_func_iconv="no, consider installing GNU libiconv"
4454 am_cv_lib_iconv=no
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <stdlib.h>
4459 #include <iconv.h>
4460 int main() {
4461 iconv_t cd = iconv_open("","");
4462 iconv(cd,NULL,NULL,NULL,NULL);
4463 iconv_close(cd);
4464 ; return 0; }
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467 rm -rf conftest*
4468 am_cv_func_iconv=yes
4469 else
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4473 rm -f conftest*
4474 if test "$am_cv_func_iconv" != yes; then
4475 am_save_LIBS="$LIBS"
4476 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4477 cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480 #include <stdlib.h>
4481 #include <iconv.h>
4482 int main() {
4483 iconv_t cd = iconv_open("","");
4484 iconv(cd,NULL,NULL,NULL,NULL);
4485 iconv_close(cd);
4486 ; return 0; }
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4489 rm -rf conftest*
4490 am_cv_lib_iconv=yes
4491 am_cv_func_iconv=yes
4492 else
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4496 rm -f conftest*
4497 LIBS="$am_save_LIBS"
4502 echo "$ac_t""$am_cv_func_iconv" 1>&6
4503 if test "$am_cv_func_iconv" = yes; then
4504 cat >> confdefs.h <<\EOF
4505 #define HAVE_ICONV 1
4508 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4509 echo "configure:4510: checking for iconv declaration" >&5
4510 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4514 cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4518 #include <stdlib.h>
4519 #include <iconv.h>
4520 extern
4521 #ifdef __cplusplus
4523 #endif
4524 #if defined(__STDC__) || defined(__cplusplus)
4525 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4526 #else
4527 size_t iconv();
4528 #endif
4530 int main() {
4532 ; return 0; }
4534 if { (eval echo configure:4535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4535 rm -rf conftest*
4536 am_cv_proto_iconv_arg1=""
4537 else
4538 echo "configure: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 rm -rf conftest*
4541 am_cv_proto_iconv_arg1="const"
4543 rm -f conftest*
4544 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);"
4547 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4548 echo "$ac_t""${ac_t:-
4549 }$am_cv_proto_iconv" 1>&6
4550 cat >> confdefs.h <<EOF
4551 #define ICONV_CONST $am_cv_proto_iconv_arg1
4555 LIBICONV=
4556 if test "$am_cv_lib_iconv" = yes; then
4557 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4562 # We will need to find libiberty.h and ansidecl.h
4563 saved_CFLAGS="$CFLAGS"
4564 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4565 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4566 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4567 fprintf_unlocked strstr errno vasprintf \
4568 malloc realloc calloc free basename getopt clock
4570 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4571 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4572 echo "configure:4573: checking whether $ac_func is declared" >&5
4573 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 #undef $ac_tr_decl
4580 #define $ac_tr_decl 1
4582 #include "ansidecl.h"
4583 #include "system.h"
4585 int main() {
4586 #ifndef $ac_func
4587 char *(*pfn) = (char *(*)) $ac_func ;
4588 #endif
4589 ; return 0; }
4591 if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4592 rm -rf conftest*
4593 eval "gcc_cv_have_decl_$ac_func=yes"
4594 else
4595 echo "configure: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 rm -rf conftest*
4598 eval "gcc_cv_have_decl_$ac_func=no"
4600 rm -f conftest*
4603 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4604 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4605 #define $ac_tr_decl 1
4608 else
4609 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4610 #define $ac_tr_decl 0
4615 done
4616 if test x = y ; then
4617 cat >> confdefs.h <<\EOF
4618 #define HAVE_DECL_GETENV 1
4620 cat >> confdefs.h <<\EOF
4621 #define HAVE_DECL_ATOL 1
4623 cat >> confdefs.h <<\EOF
4624 #define HAVE_DECL_SBRK 1
4626 cat >> confdefs.h <<\EOF
4627 #define HAVE_DECL_ABORT 1
4629 cat >> confdefs.h <<\EOF
4630 #define HAVE_DECL_ATOF 1
4632 cat >> confdefs.h <<\EOF
4633 #define HAVE_DECL_GETCWD 1
4635 cat >> confdefs.h <<\EOF
4636 #define HAVE_DECL_GETWD 1
4639 cat >> confdefs.h <<\EOF
4640 #define HAVE_DECL_STRSIGNAL 1
4642 cat >> confdefs.h <<\EOF
4643 #define HAVE_DECL_PUTC_UNLOCKED 1
4645 cat >> confdefs.h <<\EOF
4646 #define HAVE_DECL_FPUTS_UNLOCKED 1
4648 cat >> confdefs.h <<\EOF
4649 #define HAVE_DECL_FWRITE_UNLOCKED 1
4652 cat >> confdefs.h <<\EOF
4653 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4655 cat >> confdefs.h <<\EOF
4656 #define HAVE_DECL_STRSTR 1
4658 cat >> confdefs.h <<\EOF
4659 #define HAVE_DECL_ERRNO 1
4661 cat >> confdefs.h <<\EOF
4662 #define HAVE_DECL_VASPRINTF 1
4665 cat >> confdefs.h <<\EOF
4666 #define HAVE_DECL_MALLOC 1
4668 cat >> confdefs.h <<\EOF
4669 #define HAVE_DECL_REALLOC 1
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_DECL_CALLOC 1
4674 cat >> confdefs.h <<\EOF
4675 #define HAVE_DECL_FREE 1
4677 cat >> confdefs.h <<\EOF
4678 #define HAVE_DECL_BASENAME 1
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_DECL_GETOPT 1
4683 cat >> confdefs.h <<\EOF
4684 #define HAVE_DECL_CLOCK 1
4689 for ac_func in getrlimit setrlimit getrusage
4691 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4692 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4693 echo "configure:4694: checking whether $ac_func is declared" >&5
4694 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4695 echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697 cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #undef $ac_tr_decl
4701 #define $ac_tr_decl 1
4703 #include "ansidecl.h"
4704 #include "system.h"
4705 #ifdef HAVE_SYS_RESOURCE_H
4706 #include <sys/resource.h>
4707 #endif
4710 int main() {
4711 #ifndef $ac_func
4712 char *(*pfn) = (char *(*)) $ac_func ;
4713 #endif
4714 ; return 0; }
4716 if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4717 rm -rf conftest*
4718 eval "gcc_cv_have_decl_$ac_func=yes"
4719 else
4720 echo "configure: failed program was:" >&5
4721 cat conftest.$ac_ext >&5
4722 rm -rf conftest*
4723 eval "gcc_cv_have_decl_$ac_func=no"
4725 rm -f conftest*
4728 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4729 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4730 #define $ac_tr_decl 1
4733 else
4734 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4735 #define $ac_tr_decl 0
4740 done
4741 if test x = y ; then
4742 cat >> confdefs.h <<\EOF
4743 #define HAVE_DECL_GETRLIMIT 1
4745 cat >> confdefs.h <<\EOF
4746 #define HAVE_DECL_SETRLIMIT 1
4748 cat >> confdefs.h <<\EOF
4749 #define HAVE_DECL_GETRUSAGE 1
4754 cat > conftest.$ac_ext <<EOF
4755 #line 4756 "configure"
4756 #include "confdefs.h"
4758 #include "ansidecl.h"
4759 #include "system.h"
4760 #ifdef HAVE_SYS_RESOURCE_H
4761 #include <sys/resource.h>
4762 #endif
4764 int main() {
4765 rlim_t l = 0;
4766 ; return 0; }
4768 if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4770 else
4771 echo "configure: failed program was:" >&5
4772 cat conftest.$ac_ext >&5
4773 rm -rf conftest*
4774 cat >> confdefs.h <<\EOF
4775 #define rlim_t long
4779 rm -f conftest*
4781 for ac_func in ldgetname
4783 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4784 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4785 echo "configure:4786: checking whether $ac_func is declared" >&5
4786 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4787 echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792 #undef $ac_tr_decl
4793 #define $ac_tr_decl 1
4795 #include "ansidecl.h"
4796 #include "system.h"
4797 #ifdef HAVE_LDFCN_H
4798 #include <ldfcn.h>
4799 #endif
4802 int main() {
4803 #ifndef $ac_func
4804 char *(*pfn) = (char *(*)) $ac_func ;
4805 #endif
4806 ; return 0; }
4808 if { (eval echo configure:4809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4809 rm -rf conftest*
4810 eval "gcc_cv_have_decl_$ac_func=yes"
4811 else
4812 echo "configure: failed program was:" >&5
4813 cat conftest.$ac_ext >&5
4814 rm -rf conftest*
4815 eval "gcc_cv_have_decl_$ac_func=no"
4817 rm -f conftest*
4820 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4821 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4822 #define $ac_tr_decl 1
4825 else
4826 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4827 #define $ac_tr_decl 0
4832 done
4833 if test x = y ; then
4834 cat >> confdefs.h <<\EOF
4835 #define HAVE_DECL_LDGETNAME 1
4840 for ac_func in times
4842 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4843 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4844 echo "configure:4845: checking whether $ac_func is declared" >&5
4845 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4846 echo $ac_n "(cached) $ac_c" 1>&6
4847 else
4848 cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 #undef $ac_tr_decl
4852 #define $ac_tr_decl 1
4854 #include "ansidecl.h"
4855 #include "system.h"
4856 #ifdef HAVE_SYS_TIMES_H
4857 #include <sys/times.h>
4858 #endif
4861 int main() {
4862 #ifndef $ac_func
4863 char *(*pfn) = (char *(*)) $ac_func ;
4864 #endif
4865 ; return 0; }
4867 if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4868 rm -rf conftest*
4869 eval "gcc_cv_have_decl_$ac_func=yes"
4870 else
4871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 rm -rf conftest*
4874 eval "gcc_cv_have_decl_$ac_func=no"
4876 rm -f conftest*
4879 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4880 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4881 #define $ac_tr_decl 1
4884 else
4885 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4886 #define $ac_tr_decl 0
4891 done
4892 if test x = y ; then
4893 cat >> confdefs.h <<\EOF
4894 #define HAVE_DECL_TIMES 1
4899 # More time-related stuff.
4900 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4901 echo "configure:4902: checking for struct tms" >&5
4902 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4903 echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4906 cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4910 #include "ansidecl.h"
4911 #include "system.h"
4912 #ifdef HAVE_SYS_TIMES_H
4913 #include <sys/times.h>
4914 #endif
4916 int main() {
4917 struct tms tms;
4918 ; return 0; }
4920 if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4921 rm -rf conftest*
4922 ac_cv_struct_tms=yes
4923 else
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926 rm -rf conftest*
4927 ac_cv_struct_tms=no
4929 rm -f conftest*
4932 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4933 if test $ac_cv_struct_tms = yes; then
4934 cat >> confdefs.h <<\EOF
4935 #define HAVE_STRUCT_TMS 1
4940 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4941 # revisit after autoconf 2.50.
4942 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4943 echo "configure:4944: checking for clock_t" >&5
4944 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4945 echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4952 #include "ansidecl.h"
4953 #include "system.h"
4955 int main() {
4956 clock_t x;
4957 ; return 0; }
4959 if { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4960 rm -rf conftest*
4961 gcc_cv_type_clock_t=yes
4962 else
4963 echo "configure: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 rm -rf conftest*
4966 gcc_cv_type_clock_t=no
4968 rm -f conftest*
4971 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4972 if test $gcc_cv_type_clock_t = yes; then
4973 cat >> confdefs.h <<\EOF
4974 #define HAVE_CLOCK_T 1
4979 echo $ac_n "checking for uchar""... $ac_c" 1>&6
4980 echo "configure:4981: checking for uchar" >&5
4981 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
4982 echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4984 cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4988 #include "ansidecl.h"
4989 #include "system.h"
4991 int main() {
4992 if ((uchar *)0) return 0;
4993 if (sizeof(uchar)) return 0;
4994 ; return 0; }
4996 if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4997 rm -rf conftest*
4998 ac_cv_type_uchar=yes
4999 else
5000 echo "configure: failed program was:" >&5
5001 cat conftest.$ac_ext >&5
5002 rm -rf conftest*
5003 ac_cv_type_uchar=no
5005 rm -f conftest*
5008 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5009 if test $ac_cv_type_uchar = yes; then
5010 cat >> confdefs.h <<\EOF
5011 #define HAVE_UCHAR 1
5016 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5017 CFLAGS="$saved_CFLAGS"
5019 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5020 if test "${enable_initfini_array+set}" = set; then
5021 enableval="$enable_initfini_array"
5023 else
5025 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5026 echo "configure:5027: checking for .preinit_array/.init_array/.fini_array support" >&5
5027 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5028 echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030 if test "$cross_compiling" = yes; then
5031 gcc_cv_initfini_array=no
5032 else
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5037 static int x = -1;
5038 int main (void) { return x; }
5039 int foo (void) { x = 0; }
5040 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5042 if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5043 then
5044 gcc_cv_initfini_array=yes
5045 else
5046 echo "configure: failed program was:" >&5
5047 cat conftest.$ac_ext >&5
5048 rm -fr conftest*
5049 gcc_cv_initfini_array=no
5051 rm -fr conftest*
5056 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5057 enable_initfini_array=$gcc_cv_initfini_array
5061 if test $enable_initfini_array = yes; then
5062 cat >> confdefs.h <<\EOF
5063 #define HAVE_INITFINI_ARRAY 1
5068 # mkdir takes a single argument on some systems.
5069 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5070 echo "configure:5071: checking if mkdir takes one argument" >&5
5071 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5072 echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5078 #include <sys/types.h>
5079 #ifdef HAVE_SYS_STAT_H
5080 # include <sys/stat.h>
5081 #endif
5082 #ifdef HAVE_UNISTD_H
5083 # include <unistd.h>
5084 #endif
5085 #ifdef HAVE_DIRECT_H
5086 # include <direct.h>
5087 #endif
5088 int main() {
5089 mkdir ("foo", 0);
5090 ; return 0; }
5092 if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5093 rm -rf conftest*
5094 gcc_cv_mkdir_takes_one_arg=no
5095 else
5096 echo "configure: failed program was:" >&5
5097 cat conftest.$ac_ext >&5
5098 rm -rf conftest*
5099 gcc_cv_mkdir_takes_one_arg=yes
5101 rm -f conftest*
5104 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5105 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5106 cat >> confdefs.h <<\EOF
5107 #define MKDIR_TAKES_ONE_ARG 1
5113 # File extensions
5114 manext='.1'
5115 objext='.o'
5119 # With Setjmp/Longjmp based exception handling.
5120 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5121 if test "${enable_sjlj_exceptions+set}" = set; then
5122 enableval="$enable_sjlj_exceptions"
5123 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5124 cat >> confdefs.h <<EOF
5125 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5131 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5132 echo "configure:5133: checking for main in -lunwind" >&5
5133 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5135 echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137 ac_save_LIBS="$LIBS"
5138 LIBS="-lunwind $LIBS"
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5143 int main() {
5144 main()
5145 ; return 0; }
5147 if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5148 rm -rf conftest*
5149 eval "ac_cv_lib_$ac_lib_var=yes"
5150 else
5151 echo "configure: failed program was:" >&5
5152 cat conftest.$ac_ext >&5
5153 rm -rf conftest*
5154 eval "ac_cv_lib_$ac_lib_var=no"
5156 rm -f conftest*
5157 LIBS="$ac_save_LIBS"
5160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5161 echo "$ac_t""yes" 1>&6
5162 use_libunwind_default=yes
5163 else
5164 echo "$ac_t""no" 1>&6
5165 use_libunwind_default=no
5168 # Use libunwind based exception handling.
5169 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5170 if test "${enable_libunwind_exceptions+set}" = set; then
5171 enableval="$enable_libunwind_exceptions"
5172 use_libunwind_exceptions=$enableval
5173 else
5174 use_libunwind_exceptions=$use_libunwind_default
5177 if test x"$use_libunwind_exceptions" = xyes; then
5178 cat >> confdefs.h <<\EOF
5179 #define USE_LIBUNWIND_EXCEPTIONS 1
5184 # --------------------------------------------------------
5185 # Build, host, and target specific configuration fragments
5186 # --------------------------------------------------------
5188 target_gtfiles=
5189 build_xm_file=
5190 build_xm_defines=
5191 build_install_headers_dir=install-headers-tar
5192 build_exeext=
5193 host_xm_file=
5194 host_xm_defines=
5195 host_xmake_file=
5196 host_exeext=
5198 # Decode the host machine, then the target machine.
5199 # For the host machine, we save the xm_file variable as host_xm_file;
5200 # then we decode the target machine and forget everything else
5201 # that came from the host machine.
5202 for machine in $build $host $target; do
5203 . ${srcdir}/config.gcc
5204 done
5206 extra_objs="${host_extra_objs} ${extra_objs}"
5208 # Default the target-machine variables that were not explicitly set.
5209 if test x"$tm_file" = x
5210 then tm_file=$cpu_type/$cpu_type.h; fi
5212 if test x"$extra_headers" = x
5213 then extra_headers=; fi
5215 if test x$md_file = x
5216 then md_file=$cpu_type/$cpu_type.md; fi
5218 if test x$out_file = x
5219 then out_file=$cpu_type/$cpu_type.c; fi
5221 if test x"$tmake_file" = x
5222 then tmake_file=$cpu_type/t-$cpu_type
5225 if test x"$dwarf2" = xyes
5226 then tm_file="$tm_file tm-dwarf2.h"
5229 # Say what files are being used for the output code and MD file.
5230 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5231 echo "Using \`$srcdir/config/$md_file' as machine description file."
5233 # If any of the xm_file variables contain nonexistent files, warn
5234 # about them and drop them.
5237 for x in $build_xm_file; do
5238 if test -f $srcdir/config/$x
5239 then bx="$bx $x"
5240 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5242 done
5243 build_xm_file="$bx"
5246 for x in $host_xm_file; do
5247 if test -f $srcdir/config/$x
5248 then hx="$hx $x"
5249 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5251 done
5252 host_xm_file="$hx"
5255 for x in $xm_file; do
5256 if test -f $srcdir/config/$x
5257 then tx="$tx $x"
5258 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5260 done
5261 xm_file="$tx"
5263 count=a
5264 for f in $tm_file; do
5265 count=${count}x
5266 done
5267 if test $count = ax; then
5268 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5269 else
5270 echo "Using the following target machine macro files:"
5271 for f in $tm_file; do
5272 echo " $srcdir/config/$f"
5273 done
5276 if test x$need_64bit_hwint = xyes; then
5277 cat >> confdefs.h <<\EOF
5278 #define NEED_64BIT_HOST_WIDE_INT 1
5283 count=a
5284 for f in $host_xm_file; do
5285 count=${count}x
5286 done
5287 if test $count = a; then
5289 elif test $count = ax; then
5290 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5291 else
5292 echo "Using the following host machine macro files:"
5293 for f in $host_xm_file; do
5294 echo " $srcdir/config/$f"
5295 done
5297 echo "Using ${out_host_hook_obj} for host machine hooks."
5299 if test "$host_xm_file" != "$build_xm_file"; then
5300 count=a
5301 for f in $build_xm_file; do
5302 count=${count}x
5303 done
5304 if test $count = a; then
5306 elif test $count = ax; then
5307 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5308 else
5309 echo "Using the following build machine macro files:"
5310 for f in $build_xm_file; do
5311 echo " $srcdir/config/$f"
5312 done
5316 if test x$thread_file = x; then
5317 if test x$target_thread_file != x; then
5318 thread_file=$target_thread_file
5319 else
5320 thread_file='single'
5324 if test x$enable___cxa_atexit = xyes || \
5325 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5326 cat >> confdefs.h <<\EOF
5327 #define DEFAULT_USE_CXA_ATEXIT 1
5332 # Look for a file containing extra machine modes.
5333 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5334 extra_modes_file='$(srcdir)'/config/${extra_modes}
5336 cat >> confdefs.h <<EOF
5337 #define EXTRA_MODES_FILE "$extra_modes"
5340 cat >> confdefs.h <<\EOF
5341 #define EXTRA_CC_MODES 1
5346 # auto-host.h is the file containing items generated by autoconf and is
5347 # the first file included by config.h.
5348 # If host=build, it is correct to have bconfig include auto-host.h
5349 # as well. If host!=build, we are in error and need to do more
5350 # work to find out the build config parameters.
5351 if test x$host = x$build
5352 then
5353 build_auto=auto-host.h
5354 FORBUILD=..
5355 else
5356 # We create a subdir, then run autoconf in the subdir.
5357 # To prevent recursion we set host and build for the new
5358 # invocation of configure to the build for this invocation
5359 # of configure.
5360 tempdir=build.$$
5361 rm -rf $tempdir
5362 mkdir $tempdir
5363 cd $tempdir
5364 case ${srcdir} in
5365 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5366 *) realsrcdir=../${srcdir};;
5367 esac
5368 saved_CFLAGS="${CFLAGS}"
5369 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5370 ${realsrcdir}/configure \
5371 --target=$target_alias --host=$build_alias --build=$build_alias
5372 CFLAGS="${saved_CFLAGS}"
5374 # We just finished tests for the build machine, so rename
5375 # the file auto-build.h in the gcc directory.
5376 mv auto-host.h ../auto-build.h
5377 cd ..
5378 rm -rf $tempdir
5379 build_auto=auto-build.h
5380 FORBUILD=../${build_subdir}
5384 tm_file="${tm_file} defaults.h"
5385 tm_p_file="${tm_p_file} tm-preds.h"
5386 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5387 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5388 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5389 # put this back in temporarily.
5390 xm_file="ansidecl.h ${xm_file}"
5392 # --------
5393 # UNSORTED
5394 # --------
5396 # Get the version trigger filename from the toplevel
5397 if test "${with_gcc_version_trigger+set}" = set; then
5398 gcc_version_trigger=$with_gcc_version_trigger
5399 else
5400 gcc_version_trigger=${srcdir}/version.c
5402 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5403 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5405 # Compile in configure arguments.
5406 if test -f configargs.h ; then
5407 # Being re-configured.
5408 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5409 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5410 else
5411 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5413 cat > configargs.h <<EOF
5414 /* Generated automatically. */
5415 static const char configuration_arguments[] = "$gcc_config_arguments";
5416 static const char thread_model[] = "$thread_file";
5418 static const struct {
5419 const char *name, *value;
5420 } configure_default_options[] = $configure_default_options;
5423 # Internationalization
5424 PACKAGE=gcc
5425 VERSION="$gcc_version"
5429 # Enable NLS support by default
5430 # Check whether --enable-nls or --disable-nls was given.
5431 if test "${enable_nls+set}" = set; then
5432 enableval="$enable_nls"
5434 else
5435 enable_nls=yes
5439 # if cross compiling, disable NLS support.
5440 # It's not worth the trouble, at least for now.
5442 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5443 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5444 enable_nls=no
5449 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5450 echo "configure:5451: checking for library containing strerror" >&5
5451 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5452 echo $ac_n "(cached) $ac_c" 1>&6
5453 else
5454 ac_func_search_save_LIBS="$LIBS"
5455 ac_cv_search_strerror="no"
5456 cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459 /* Override any gcc2 internal prototype to avoid an error. */
5460 /* We use char because int might match the return type of a gcc2
5461 builtin and then its argument prototype would still apply. */
5462 char strerror();
5464 int main() {
5465 strerror()
5466 ; return 0; }
5468 if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469 rm -rf conftest*
5470 ac_cv_search_strerror="none required"
5471 else
5472 echo "configure: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
5475 rm -f conftest*
5476 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5477 LIBS="-l$i $ac_func_search_save_LIBS"
5478 cat > conftest.$ac_ext <<EOF
5479 #line 5480 "configure"
5480 #include "confdefs.h"
5481 /* Override any gcc2 internal prototype to avoid an error. */
5482 /* We use char because int might match the return type of a gcc2
5483 builtin and then its argument prototype would still apply. */
5484 char strerror();
5486 int main() {
5487 strerror()
5488 ; return 0; }
5490 if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5491 rm -rf conftest*
5492 ac_cv_search_strerror="-l$i"
5493 break
5494 else
5495 echo "configure: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5498 rm -f conftest*
5499 done
5500 LIBS="$ac_func_search_save_LIBS"
5503 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5504 if test "$ac_cv_search_strerror" != "no"; then
5505 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5507 else :
5512 echo $ac_n "checking for working const""... $ac_c" 1>&6
5513 echo "configure:5514: checking for working const" >&5
5514 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5521 int main() {
5523 /* Ultrix mips cc rejects this. */
5524 typedef int charset[2]; const charset x;
5525 /* SunOS 4.1.1 cc rejects this. */
5526 char const *const *ccp;
5527 char **p;
5528 /* NEC SVR4.0.2 mips cc rejects this. */
5529 struct point {int x, y;};
5530 static struct point const zero = {0,0};
5531 /* AIX XL C 1.02.0.0 rejects this.
5532 It does not let you subtract one const X* pointer from another in an arm
5533 of an if-expression whose if-part is not a constant expression */
5534 const char *g = "string";
5535 ccp = &g + (g ? g-g : 0);
5536 /* HPUX 7.0 cc rejects these. */
5537 ++ccp;
5538 p = (char**) ccp;
5539 ccp = (char const *const *) p;
5540 { /* SCO 3.2v4 cc rejects this. */
5541 char *t;
5542 char const *s = 0 ? (char *) 0 : (char const *) 0;
5544 *t++ = 0;
5546 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5547 int x[] = {25, 17};
5548 const int *foo = &x[0];
5549 ++foo;
5551 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5552 typedef const int *iptr;
5553 iptr p = 0;
5554 ++p;
5556 { /* AIX XL C 1.02.0.0 rejects this saying
5557 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5558 struct s { int j; const int *ap[3]; };
5559 struct s *b; b->j = 5;
5561 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5562 const int foo = 10;
5565 ; return 0; }
5567 if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5568 rm -rf conftest*
5569 ac_cv_c_const=yes
5570 else
5571 echo "configure: failed program was:" >&5
5572 cat conftest.$ac_ext >&5
5573 rm -rf conftest*
5574 ac_cv_c_const=no
5576 rm -f conftest*
5579 echo "$ac_t""$ac_cv_c_const" 1>&6
5580 if test $ac_cv_c_const = no; then
5581 cat >> confdefs.h <<\EOF
5582 #define const
5587 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5588 echo "configure:5589: checking for off_t" >&5
5589 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5590 echo $ac_n "(cached) $ac_c" 1>&6
5591 else
5592 cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595 #include <sys/types.h>
5596 #if STDC_HEADERS
5597 #include <stdlib.h>
5598 #include <stddef.h>
5599 #endif
5601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5602 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5603 rm -rf conftest*
5604 ac_cv_type_off_t=yes
5605 else
5606 rm -rf conftest*
5607 ac_cv_type_off_t=no
5609 rm -f conftest*
5612 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5613 if test $ac_cv_type_off_t = no; then
5614 cat >> confdefs.h <<\EOF
5615 #define off_t long
5620 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5621 echo "configure:5622: checking for size_t" >&5
5622 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5623 echo $ac_n "(cached) $ac_c" 1>&6
5624 else
5625 cat > conftest.$ac_ext <<EOF
5626 #line 5627 "configure"
5627 #include "confdefs.h"
5628 #include <sys/types.h>
5629 #if STDC_HEADERS
5630 #include <stdlib.h>
5631 #include <stddef.h>
5632 #endif
5634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5635 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5636 rm -rf conftest*
5637 ac_cv_type_size_t=yes
5638 else
5639 rm -rf conftest*
5640 ac_cv_type_size_t=no
5642 rm -f conftest*
5645 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5646 if test $ac_cv_type_size_t = no; then
5647 cat >> confdefs.h <<\EOF
5648 #define size_t unsigned
5653 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5654 # for constant arguments. Useless!
5655 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5656 echo "configure:5657: checking for working alloca.h" >&5
5657 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5658 echo $ac_n "(cached) $ac_c" 1>&6
5659 else
5660 cat > conftest.$ac_ext <<EOF
5661 #line 5662 "configure"
5662 #include "confdefs.h"
5663 #include <alloca.h>
5664 int main() {
5665 char *p = alloca(2 * sizeof(int));
5666 ; return 0; }
5668 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5669 rm -rf conftest*
5670 ac_cv_header_alloca_h=yes
5671 else
5672 echo "configure: failed program was:" >&5
5673 cat conftest.$ac_ext >&5
5674 rm -rf conftest*
5675 ac_cv_header_alloca_h=no
5677 rm -f conftest*
5680 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5681 if test $ac_cv_header_alloca_h = yes; then
5682 cat >> confdefs.h <<\EOF
5683 #define HAVE_ALLOCA_H 1
5688 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5689 echo "configure:5690: checking for alloca" >&5
5690 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5691 echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693 cat > conftest.$ac_ext <<EOF
5694 #line 5695 "configure"
5695 #include "confdefs.h"
5697 #ifdef __GNUC__
5698 # define alloca __builtin_alloca
5699 #else
5700 # ifdef _MSC_VER
5701 # include <malloc.h>
5702 # define alloca _alloca
5703 # else
5704 # if HAVE_ALLOCA_H
5705 # include <alloca.h>
5706 # else
5707 # ifdef _AIX
5708 #pragma alloca
5709 # else
5710 # ifndef alloca /* predefined by HP cc +Olibcalls */
5711 char *alloca ();
5712 # endif
5713 # endif
5714 # endif
5715 # endif
5716 #endif
5718 int main() {
5719 char *p = (char *) alloca(1);
5720 ; return 0; }
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723 rm -rf conftest*
5724 ac_cv_func_alloca_works=yes
5725 else
5726 echo "configure: failed program was:" >&5
5727 cat conftest.$ac_ext >&5
5728 rm -rf conftest*
5729 ac_cv_func_alloca_works=no
5731 rm -f conftest*
5734 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5735 if test $ac_cv_func_alloca_works = yes; then
5736 cat >> confdefs.h <<\EOF
5737 #define HAVE_ALLOCA 1
5742 if test $ac_cv_func_alloca_works = no; then
5743 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5744 # that cause trouble. Some versions do not even contain alloca or
5745 # contain a buggy version. If you still want to use their alloca,
5746 # use ar to extract alloca.o from them instead of compiling alloca.c.
5747 ALLOCA=alloca.${ac_objext}
5748 cat >> confdefs.h <<\EOF
5749 #define C_ALLOCA 1
5753 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5754 echo "configure:5755: checking whether alloca needs Cray hooks" >&5
5755 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5756 echo $ac_n "(cached) $ac_c" 1>&6
5757 else
5758 cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761 #if defined(CRAY) && ! defined(CRAY2)
5762 webecray
5763 #else
5764 wenotbecray
5765 #endif
5768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5769 egrep "webecray" >/dev/null 2>&1; then
5770 rm -rf conftest*
5771 ac_cv_os_cray=yes
5772 else
5773 rm -rf conftest*
5774 ac_cv_os_cray=no
5776 rm -f conftest*
5780 echo "$ac_t""$ac_cv_os_cray" 1>&6
5781 if test $ac_cv_os_cray = yes; then
5782 for ac_func in _getb67 GETB67 getb67; do
5783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5784 echo "configure:5785: checking for $ac_func" >&5
5785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5786 echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788 cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* System header to define __stub macros and hopefully few prototypes,
5792 which can conflict with char $ac_func(); below. */
5793 #include <assert.h>
5794 /* Override any gcc2 internal prototype to avoid an error. */
5795 /* We use char because int might match the return type of a gcc2
5796 builtin and then its argument prototype would still apply. */
5797 char $ac_func();
5799 int main() {
5801 /* The GNU C library defines this for functions which it implements
5802 to always fail with ENOSYS. Some functions are actually named
5803 something starting with __ and the normal name is an alias. */
5804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5805 choke me
5806 #else
5807 $ac_func();
5808 #endif
5810 ; return 0; }
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813 rm -rf conftest*
5814 eval "ac_cv_func_$ac_func=yes"
5815 else
5816 echo "configure: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 rm -rf conftest*
5819 eval "ac_cv_func_$ac_func=no"
5821 rm -f conftest*
5824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5825 echo "$ac_t""yes" 1>&6
5826 cat >> confdefs.h <<EOF
5827 #define CRAY_STACKSEG_END $ac_func
5830 break
5831 else
5832 echo "$ac_t""no" 1>&6
5835 done
5838 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5839 echo "configure:5840: checking stack direction for C alloca" >&5
5840 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5841 echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843 if test "$cross_compiling" = yes; then
5844 ac_cv_c_stack_direction=0
5845 else
5846 cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 find_stack_direction ()
5851 static char *addr = 0;
5852 auto char dummy;
5853 if (addr == 0)
5855 addr = &dummy;
5856 return find_stack_direction ();
5858 else
5859 return (&dummy > addr) ? 1 : -1;
5861 main ()
5863 exit (find_stack_direction() < 0);
5866 if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5867 then
5868 ac_cv_c_stack_direction=1
5869 else
5870 echo "configure: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
5872 rm -fr conftest*
5873 ac_cv_c_stack_direction=-1
5875 rm -fr conftest*
5880 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5881 cat >> confdefs.h <<EOF
5882 #define STACK_DIRECTION $ac_cv_c_stack_direction
5888 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5889 echo "configure:5890: checking whether we are using the GNU C Library 2.1 or newer" >&5
5890 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5891 echo $ac_n "(cached) $ac_c" 1>&6
5892 else
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5897 #include <features.h>
5898 #ifdef __GNU_LIBRARY__
5899 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5900 Lucky GNU user
5901 #endif
5902 #endif
5905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5906 egrep "Lucky GNU user" >/dev/null 2>&1; then
5907 rm -rf conftest*
5908 ac_cv_gnu_library_2_1=yes
5909 else
5910 rm -rf conftest*
5911 ac_cv_gnu_library_2_1=no
5913 rm -f conftest*
5919 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5921 GLIBC21="$ac_cv_gnu_library_2_1"
5925 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5926 stdlib.h string.h unistd.h sys/param.h
5928 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5929 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5930 echo "configure:5931: checking for $ac_hdr" >&5
5931 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5932 echo $ac_n "(cached) $ac_c" 1>&6
5933 else
5934 cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 #include <$ac_hdr>
5939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5940 { (eval echo configure:5941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5942 if test -z "$ac_err"; then
5943 rm -rf conftest*
5944 eval "ac_cv_header_$ac_safe=yes"
5945 else
5946 echo "$ac_err" >&5
5947 echo "configure: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 rm -rf conftest*
5950 eval "ac_cv_header_$ac_safe=no"
5952 rm -f conftest*
5954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5955 echo "$ac_t""yes" 1>&6
5956 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5957 cat >> confdefs.h <<EOF
5958 #define $ac_tr_hdr 1
5961 else
5962 echo "$ac_t""no" 1>&6
5964 done
5966 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5967 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5968 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5971 echo "configure:5972: checking for $ac_func" >&5
5972 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5973 echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975 cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* System header to define __stub macros and hopefully few prototypes,
5979 which can conflict with char $ac_func(); below. */
5980 #include <assert.h>
5981 /* Override any gcc2 internal prototype to avoid an error. */
5982 /* We use char because int might match the return type of a gcc2
5983 builtin and then its argument prototype would still apply. */
5984 char $ac_func();
5986 int main() {
5988 /* The GNU C library defines this for functions which it implements
5989 to always fail with ENOSYS. Some functions are actually named
5990 something starting with __ and the normal name is an alias. */
5991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5992 choke me
5993 #else
5994 $ac_func();
5995 #endif
5997 ; return 0; }
5999 if { (eval echo configure:6000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6000 rm -rf conftest*
6001 eval "ac_cv_func_$ac_func=yes"
6002 else
6003 echo "configure: failed program was:" >&5
6004 cat conftest.$ac_ext >&5
6005 rm -rf conftest*
6006 eval "ac_cv_func_$ac_func=no"
6008 rm -f conftest*
6011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6012 echo "$ac_t""yes" 1>&6
6013 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6014 cat >> confdefs.h <<EOF
6015 #define $ac_tr_func 1
6018 else
6019 echo "$ac_t""no" 1>&6
6021 done
6026 am_cv_lib_iconv_ldpath=
6027 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6028 if test "${with_libiconv_prefix+set}" = set; then
6029 withval="$with_libiconv_prefix"
6031 for dir in `echo "$withval" | tr : ' '`; do
6032 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6033 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6034 done
6039 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6040 echo "configure:6041: checking for iconv" >&5
6041 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6042 echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6045 am_cv_func_iconv="no, consider installing GNU libiconv"
6046 am_cv_lib_iconv=no
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 #include <stdlib.h>
6051 #include <iconv.h>
6052 int main() {
6053 iconv_t cd = iconv_open("","");
6054 iconv(cd,NULL,NULL,NULL,NULL);
6055 iconv_close(cd);
6056 ; return 0; }
6058 if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6059 rm -rf conftest*
6060 am_cv_func_iconv=yes
6061 else
6062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
6065 rm -f conftest*
6066 if test "$am_cv_func_iconv" != yes; then
6067 am_save_LIBS="$LIBS"
6068 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 #include <stdlib.h>
6073 #include <iconv.h>
6074 int main() {
6075 iconv_t cd = iconv_open("","");
6076 iconv(cd,NULL,NULL,NULL,NULL);
6077 iconv_close(cd);
6078 ; return 0; }
6080 if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6081 rm -rf conftest*
6082 am_cv_lib_iconv=yes
6083 am_cv_func_iconv=yes
6084 else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6088 rm -f conftest*
6089 LIBS="$am_save_LIBS"
6094 echo "$ac_t""$am_cv_func_iconv" 1>&6
6095 if test "$am_cv_func_iconv" = yes; then
6096 cat >> confdefs.h <<\EOF
6097 #define HAVE_ICONV 1
6100 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6101 echo "configure:6102: checking for iconv declaration" >&5
6102 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6103 echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6106 cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6110 #include <stdlib.h>
6111 #include <iconv.h>
6112 extern
6113 #ifdef __cplusplus
6115 #endif
6116 #if defined(__STDC__) || defined(__cplusplus)
6117 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6118 #else
6119 size_t iconv();
6120 #endif
6122 int main() {
6124 ; return 0; }
6126 if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6127 rm -rf conftest*
6128 am_cv_proto_iconv_arg1=""
6129 else
6130 echo "configure: failed program was:" >&5
6131 cat conftest.$ac_ext >&5
6132 rm -rf conftest*
6133 am_cv_proto_iconv_arg1="const"
6135 rm -f conftest*
6136 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);"
6139 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6140 echo "$ac_t""${ac_t:-
6141 }$am_cv_proto_iconv" 1>&6
6142 cat >> confdefs.h <<EOF
6143 #define ICONV_CONST $am_cv_proto_iconv_arg1
6147 LIBICONV=
6148 if test "$am_cv_lib_iconv" = yes; then
6149 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6154 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6155 echo "configure:6156: checking for nl_langinfo and CODESET" >&5
6156 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6157 echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159 cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 #include <langinfo.h>
6163 int main() {
6164 char* cs = nl_langinfo(CODESET);
6165 ; return 0; }
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6168 rm -rf conftest*
6169 am_cv_langinfo_codeset=yes
6170 else
6171 echo "configure: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 rm -rf conftest*
6174 am_cv_langinfo_codeset=no
6176 rm -f conftest*
6180 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6181 if test $am_cv_langinfo_codeset = yes; then
6182 cat >> confdefs.h <<\EOF
6183 #define HAVE_LANGINFO_CODESET 1
6188 if test $ac_cv_header_locale_h = yes; then
6189 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6190 echo "configure:6191: checking for LC_MESSAGES" >&5
6191 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6192 echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194 cat > conftest.$ac_ext <<EOF
6195 #line 6196 "configure"
6196 #include "confdefs.h"
6197 #include <locale.h>
6198 int main() {
6199 return LC_MESSAGES
6200 ; return 0; }
6202 if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6203 rm -rf conftest*
6204 am_cv_val_LC_MESSAGES=yes
6205 else
6206 echo "configure: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 rm -rf conftest*
6209 am_cv_val_LC_MESSAGES=no
6211 rm -f conftest*
6214 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6215 if test $am_cv_val_LC_MESSAGES = yes; then
6216 cat >> confdefs.h <<\EOF
6217 #define HAVE_LC_MESSAGES 1
6222 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6223 echo "configure:6224: checking whether NLS is requested" >&5
6224 # Check whether --enable-nls or --disable-nls was given.
6225 if test "${enable_nls+set}" = set; then
6226 enableval="$enable_nls"
6227 USE_NLS=$enableval
6228 else
6229 USE_NLS=yes
6232 echo "$ac_t""$USE_NLS" 1>&6
6235 BUILD_INCLUDED_LIBINTL=no
6236 USE_INCLUDED_LIBINTL=no
6237 INTLLIBS=
6238 INTLDEPS=
6240 if test "$USE_NLS" = "yes"; then
6241 cat >> confdefs.h <<\EOF
6242 #define ENABLE_NLS 1
6245 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6246 echo "configure:6247: checking whether included gettext is requested" >&5
6247 # Check whether --with-included-gettext or --without-included-gettext was given.
6248 if test "${with_included_gettext+set}" = set; then
6249 withval="$with_included_gettext"
6250 nls_cv_force_use_gnu_gettext=$withval
6251 else
6252 nls_cv_force_use_gnu_gettext=no
6255 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6257 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6258 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6259 CATOBJEXT=NONE
6264 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6265 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6266 echo "configure:6267: checking for libintl.h" >&5
6267 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6268 echo $ac_n "(cached) $ac_c" 1>&6
6269 else
6270 cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6273 #include <libintl.h>
6275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6276 { (eval echo configure:6277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6278 if test -z "$ac_err"; then
6279 rm -rf conftest*
6280 eval "ac_cv_header_$ac_safe=yes"
6281 else
6282 echo "$ac_err" >&5
6283 echo "configure: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
6285 rm -rf conftest*
6286 eval "ac_cv_header_$ac_safe=no"
6288 rm -f conftest*
6290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6291 echo "$ac_t""yes" 1>&6
6292 cat >> confdefs.h <<\EOF
6293 #define HAVE_LIBINTL_H 1
6296 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6297 echo "configure:6298: checking for GNU gettext in libc" >&5
6298 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6299 echo $ac_n "(cached) $ac_c" 1>&6
6300 else
6301 cat > conftest.$ac_ext <<EOF
6302 #line 6303 "configure"
6303 #include "confdefs.h"
6304 #include <libintl.h>
6305 extern int _nl_msg_cat_cntr;
6306 int main() {
6307 bindtextdomain ("", "");
6308 return (int) gettext ("") + _nl_msg_cat_cntr
6309 ; return 0; }
6311 if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6312 rm -rf conftest*
6313 gt_cv_func_gnugettext1_libc=yes
6314 else
6315 echo "configure: failed program was:" >&5
6316 cat conftest.$ac_ext >&5
6317 rm -rf conftest*
6318 gt_cv_func_gnugettext1_libc=no
6320 rm -f conftest*
6323 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6325 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6326 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6327 echo "configure:6328: checking for GNU gettext in libintl" >&5
6328 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6329 echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331 gt_save_LIBS="$LIBS"
6332 LIBS="$LIBS -lintl $LIBICONV"
6333 cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 #include <libintl.h>
6337 extern int _nl_msg_cat_cntr;
6338 int main() {
6339 bindtextdomain ("", "");
6340 return (int) gettext ("") + _nl_msg_cat_cntr
6341 ; return 0; }
6343 if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6344 rm -rf conftest*
6345 gt_cv_func_gnugettext1_libintl=yes
6346 else
6347 echo "configure: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6349 rm -rf conftest*
6350 gt_cv_func_gnugettext1_libintl=no
6352 rm -f conftest*
6353 LIBS="$gt_save_LIBS"
6356 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6359 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6360 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6361 && test "$PACKAGE" != gettext; }; then
6362 cat >> confdefs.h <<\EOF
6363 #define HAVE_GETTEXT 1
6367 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6368 INTLLIBS="-lintl $LIBICONV"
6371 gt_save_LIBS="$LIBS"
6372 LIBS="$LIBS $INTLLIBS"
6373 for ac_func in dcgettext
6375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6376 echo "configure:6377: checking for $ac_func" >&5
6377 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6378 echo $ac_n "(cached) $ac_c" 1>&6
6379 else
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 /* System header to define __stub macros and hopefully few prototypes,
6384 which can conflict with char $ac_func(); below. */
6385 #include <assert.h>
6386 /* Override any gcc2 internal prototype to avoid an error. */
6387 /* We use char because int might match the return type of a gcc2
6388 builtin and then its argument prototype would still apply. */
6389 char $ac_func();
6391 int main() {
6393 /* The GNU C library defines this for functions which it implements
6394 to always fail with ENOSYS. Some functions are actually named
6395 something starting with __ and the normal name is an alias. */
6396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6397 choke me
6398 #else
6399 $ac_func();
6400 #endif
6402 ; return 0; }
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405 rm -rf conftest*
6406 eval "ac_cv_func_$ac_func=yes"
6407 else
6408 echo "configure: failed program was:" >&5
6409 cat conftest.$ac_ext >&5
6410 rm -rf conftest*
6411 eval "ac_cv_func_$ac_func=no"
6413 rm -f conftest*
6416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6417 echo "$ac_t""yes" 1>&6
6418 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6419 cat >> confdefs.h <<EOF
6420 #define $ac_tr_func 1
6423 else
6424 echo "$ac_t""no" 1>&6
6426 done
6428 LIBS="$gt_save_LIBS"
6430 # Extract the first word of "msgfmt", so it can be a program name with args.
6431 set dummy msgfmt; ac_word=$2
6432 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6433 echo "configure:6434: checking for $ac_word" >&5
6434 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6435 echo $ac_n "(cached) $ac_c" 1>&6
6436 else
6437 case "$MSGFMT" in
6439 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6443 for ac_dir in $PATH; do
6444 test -z "$ac_dir" && ac_dir=.
6445 if test -f $ac_dir/$ac_word; then
6446 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6447 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6448 break
6451 done
6452 IFS="$ac_save_ifs"
6453 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6455 esac
6457 MSGFMT="$ac_cv_path_MSGFMT"
6458 if test "$MSGFMT" != ":"; then
6459 echo "$ac_t""$MSGFMT" 1>&6
6460 else
6461 echo "$ac_t""no" 1>&6
6464 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6465 set dummy gmsgfmt; ac_word=$2
6466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6467 echo "configure:6468: checking for $ac_word" >&5
6468 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6469 echo $ac_n "(cached) $ac_c" 1>&6
6470 else
6471 case "$GMSGFMT" in
6473 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6475 ?:/*)
6476 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6480 ac_dummy="$PATH"
6481 for ac_dir in $ac_dummy; do
6482 test -z "$ac_dir" && ac_dir=.
6483 if test -f $ac_dir/$ac_word; then
6484 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6485 break
6487 done
6488 IFS="$ac_save_ifs"
6489 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6491 esac
6493 GMSGFMT="$ac_cv_path_GMSGFMT"
6494 if test -n "$GMSGFMT"; then
6495 echo "$ac_t""$GMSGFMT" 1>&6
6496 else
6497 echo "$ac_t""no" 1>&6
6501 # Extract the first word of "xgettext", so it can be a program name with args.
6502 set dummy xgettext; ac_word=$2
6503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6504 echo "configure:6505: checking for $ac_word" >&5
6505 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6506 echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508 case "$XGETTEXT" in
6510 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6513 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6514 for ac_dir in $PATH; do
6515 test -z "$ac_dir" && ac_dir=.
6516 if test -f $ac_dir/$ac_word; then
6517 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6518 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6519 break
6522 done
6523 IFS="$ac_save_ifs"
6524 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6526 esac
6528 XGETTEXT="$ac_cv_path_XGETTEXT"
6529 if test "$XGETTEXT" != ":"; then
6530 echo "$ac_t""$XGETTEXT" 1>&6
6531 else
6532 echo "$ac_t""no" 1>&6
6536 CATOBJEXT=.gmo
6539 else
6540 echo "$ac_t""no" 1>&6
6544 if test "$CATOBJEXT" = "NONE"; then
6545 nls_cv_use_gnu_gettext=yes
6549 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6550 INTLOBJS="\$(GETTOBJS)"
6551 # Extract the first word of "msgfmt", so it can be a program name with args.
6552 set dummy msgfmt; ac_word=$2
6553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6554 echo "configure:6555: checking for $ac_word" >&5
6555 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6556 echo $ac_n "(cached) $ac_c" 1>&6
6557 else
6558 case "$MSGFMT" in
6560 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6563 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6564 for ac_dir in $PATH; do
6565 test -z "$ac_dir" && ac_dir=.
6566 if test -f $ac_dir/$ac_word; then
6567 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6568 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6569 break
6572 done
6573 IFS="$ac_save_ifs"
6574 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6576 esac
6578 MSGFMT="$ac_cv_path_MSGFMT"
6579 if test "$MSGFMT" != ":"; then
6580 echo "$ac_t""$MSGFMT" 1>&6
6581 else
6582 echo "$ac_t""no" 1>&6
6585 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6586 set dummy gmsgfmt; ac_word=$2
6587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6588 echo "configure:6589: checking for $ac_word" >&5
6589 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6590 echo $ac_n "(cached) $ac_c" 1>&6
6591 else
6592 case "$GMSGFMT" in
6594 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6596 ?:/*)
6597 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6601 ac_dummy="$PATH"
6602 for ac_dir in $ac_dummy; do
6603 test -z "$ac_dir" && ac_dir=.
6604 if test -f $ac_dir/$ac_word; then
6605 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6606 break
6608 done
6609 IFS="$ac_save_ifs"
6610 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6612 esac
6614 GMSGFMT="$ac_cv_path_GMSGFMT"
6615 if test -n "$GMSGFMT"; then
6616 echo "$ac_t""$GMSGFMT" 1>&6
6617 else
6618 echo "$ac_t""no" 1>&6
6621 # Extract the first word of "xgettext", so it can be a program name with args.
6622 set dummy xgettext; ac_word=$2
6623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6624 echo "configure:6625: checking for $ac_word" >&5
6625 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6626 echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628 case "$XGETTEXT" in
6630 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6633 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6634 for ac_dir in $PATH; do
6635 test -z "$ac_dir" && ac_dir=.
6636 if test -f $ac_dir/$ac_word; then
6637 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6638 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6639 break
6642 done
6643 IFS="$ac_save_ifs"
6644 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6646 esac
6648 XGETTEXT="$ac_cv_path_XGETTEXT"
6649 if test "$XGETTEXT" != ":"; then
6650 echo "$ac_t""$XGETTEXT" 1>&6
6651 else
6652 echo "$ac_t""no" 1>&6
6656 BUILD_INCLUDED_LIBINTL=yes
6657 USE_INCLUDED_LIBINTL=yes
6658 CATOBJEXT=.gmo
6659 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6660 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6661 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6664 if test "$GMSGFMT" != ":"; then
6665 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6667 else
6668 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6669 GMSGFMT=":"
6673 if test "$XGETTEXT" != ":"; then
6674 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6676 else
6677 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6678 XGETTEXT=":"
6682 POSUB=po
6687 if test "$PACKAGE" = gettext; then
6688 BUILD_INCLUDED_LIBINTL=yes
6691 for ac_prog in bison
6693 # Extract the first word of "$ac_prog", so it can be a program name with args.
6694 set dummy $ac_prog; ac_word=$2
6695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6696 echo "configure:6697: checking for $ac_word" >&5
6697 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6698 echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700 if test -n "$INTLBISON"; then
6701 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6702 else
6703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6704 ac_dummy="$PATH"
6705 for ac_dir in $ac_dummy; do
6706 test -z "$ac_dir" && ac_dir=.
6707 if test -f $ac_dir/$ac_word; then
6708 ac_cv_prog_INTLBISON="$ac_prog"
6709 break
6711 done
6712 IFS="$ac_save_ifs"
6715 INTLBISON="$ac_cv_prog_INTLBISON"
6716 if test -n "$INTLBISON"; then
6717 echo "$ac_t""$INTLBISON" 1>&6
6718 else
6719 echo "$ac_t""no" 1>&6
6722 test -n "$INTLBISON" && break
6723 done
6725 if test -z "$INTLBISON"; then
6726 ac_verc_fail=yes
6727 else
6728 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6729 echo "configure:6730: checking version of bison" >&5
6730 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6731 case $ac_prog_version in
6732 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6733 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6734 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6735 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6736 esac
6737 echo "$ac_t""$ac_prog_version" 1>&6
6739 if test $ac_verc_fail = yes; then
6740 INTLBISON=:
6752 if test $USE_INCLUDED_LIBINTL = yes; then
6753 cat >> confdefs.h <<\EOF
6754 #define USE_INCLUDED_LIBINTL 1
6759 nls_cv_header_intl=
6760 nls_cv_header_libgt=
6762 DATADIRNAME=share
6765 INSTOBJEXT=.mo
6768 GENCAT=gencat
6772 if test "x$CATOBJEXT" != x; then
6773 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6774 echo "configure:6775: checking for catalogs to be installed" >&5
6775 # Look for .po and .gmo files in the source directory.
6776 CATALOGS=
6777 XLINGUAS=
6778 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6779 # If there aren't any .gmo files the shell will give us the
6780 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6781 # weeded out.
6782 case "$cat" in *\**)
6783 continue;;
6784 esac
6785 # The quadruple backslash is collapsed to a double backslash
6786 # by the backticks, then collapsed again by the double quotes,
6787 # leaving us with one backslash in the sed expression (right
6788 # before the dot that mustn't act as a wildcard). The dot to
6789 # be escaped in the second expression is hiding inside CATOBJEXT.
6790 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6791 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6792 # The user is allowed to set LINGUAS to a list of languages to
6793 # install catalogs for. If it's empty that means "all of them."
6794 if test "x$LINGUAS" = x; then
6795 CATALOGS="$CATALOGS $cat"
6796 XLINGUAS="$XLINGUAS $lang"
6797 else
6798 case "$LINGUAS" in *$lang*)
6799 CATALOGS="$CATALOGS $cat"
6800 XLINGUAS="$XLINGUAS $lang"
6802 esac
6804 done
6805 LINGUAS="$XLINGUAS"
6806 echo "$ac_t""$LINGUAS" 1>&6
6809 MKINSTALLDIRS=
6810 if test -n "$ac_aux_dir"; then
6811 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6813 if test -z "$MKINSTALLDIRS"; then
6814 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6818 INTL_LIBTOOL_SUFFIX_PREFIX=
6822 # Windows32 Registry support for specifying GCC installation paths.
6823 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6824 if test "${enable_win32_registry+set}" = set; then
6825 enableval="$enable_win32_registry"
6829 case $host_os in
6830 win32 | pe | cygwin* | mingw32* | uwin*)
6831 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6832 echo "configure:6833: checking whether windows registry support is requested" >&5
6833 if test "x$enable_win32_registry" != xno; then
6834 cat >> confdefs.h <<\EOF
6835 #define ENABLE_WIN32_REGISTRY 1
6838 echo "$ac_t""yes" 1>&6
6840 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6841 echo "configure:6842: checking for library containing RegOpenKeyExA" >&5
6842 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6843 echo $ac_n "(cached) $ac_c" 1>&6
6844 else
6845 ac_func_search_save_LIBS="$LIBS"
6846 ac_cv_search_RegOpenKeyExA="no"
6847 cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 /* Override any gcc2 internal prototype to avoid an error. */
6851 /* We use char because int might match the return type of a gcc2
6852 builtin and then its argument prototype would still apply. */
6853 char RegOpenKeyExA();
6855 int main() {
6856 RegOpenKeyExA()
6857 ; return 0; }
6859 if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6860 rm -rf conftest*
6861 ac_cv_search_RegOpenKeyExA="none required"
6862 else
6863 echo "configure: failed program was:" >&5
6864 cat conftest.$ac_ext >&5
6866 rm -f conftest*
6867 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6868 LIBS="-l$i $ac_func_search_save_LIBS"
6869 cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* Override any gcc2 internal prototype to avoid an error. */
6873 /* We use char because int might match the return type of a gcc2
6874 builtin and then its argument prototype would still apply. */
6875 char RegOpenKeyExA();
6877 int main() {
6878 RegOpenKeyExA()
6879 ; return 0; }
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882 rm -rf conftest*
6883 ac_cv_search_RegOpenKeyExA="-l$i"
6884 break
6885 else
6886 echo "configure: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6889 rm -f conftest*
6890 done
6891 LIBS="$ac_func_search_save_LIBS"
6894 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6895 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6896 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6898 else :
6901 else
6902 echo "$ac_t""no" 1>&6
6905 # Check if user specified a different registry key.
6906 case "x${enable_win32_registry}" in
6907 x | xyes)
6908 # default.
6909 gcc_cv_win32_registry_key="$VERSION"
6911 xno)
6912 # no registry lookup.
6913 gcc_cv_win32_registry_key=''
6916 # user-specified key.
6917 gcc_cv_win32_registry_key="$enable_win32_registry"
6919 esac
6921 if test "x$enable_win32_registry" != xno; then
6922 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6923 echo "configure:6924: checking registry key on windows hosts" >&5
6924 cat >> confdefs.h <<EOF
6925 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6928 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6931 esac
6933 # Get an absolute path to the GCC top-level source directory
6934 holddir=`${PWDCMD-pwd}`
6935 cd $srcdir
6936 topdir=`${PWDCMD-pwd}`
6937 cd $holddir
6939 # Conditionalize the makefile for this host machine.
6940 # Make-host contains the concatenation of all host makefile fragments
6941 # [there can be more than one]. This file is built by configure.frag.
6942 host_overrides=Make-host
6943 dep_host_xmake_file=
6944 for f in .. ${host_xmake_file}
6946 if test -f ${srcdir}/config/$f
6947 then
6948 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6950 done
6952 # Conditionalize the makefile for this target machine.
6953 # Make-target contains the concatenation of all host makefile fragments
6954 # [there can be more than one]. This file is built by configure.frag.
6955 target_overrides=Make-target
6956 dep_tmake_file=
6957 for f in .. ${tmake_file}
6959 if test -f ${srcdir}/config/$f
6960 then
6961 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6963 done
6965 symbolic_link='ln -s'
6967 # If the host doesn't support symlinks, modify CC in
6968 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6969 # Otherwise, we can use "CC=$(CC)".
6970 rm -f symtest.tem
6971 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6972 then
6973 cc_set_by_configure="\$(CC)"
6974 quoted_cc_set_by_configure="\$(CC)"
6975 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6976 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6977 else
6978 rm -f symtest.tem
6979 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6980 then
6981 symbolic_link="cp -p"
6982 else
6983 symbolic_link="cp"
6985 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6986 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6987 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6988 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6990 rm -f symtest.tem
6992 out_object_file=`basename $out_file .c`.o
6994 tm_file_list=
6995 for f in $tm_file; do
6996 case $f in
6997 ansidecl.h )
6998 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6999 defaults.h )
7000 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7001 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7002 esac
7003 done
7005 tm_p_file_list=
7006 for f in $tm_p_file; do
7007 case $f in
7008 tm-preds.h )
7009 tm_p_file_list="${tm_p_file_list} $f" ;;
7010 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7011 esac
7012 done
7014 host_xm_file_list=
7015 for f in $host_xm_file; do
7016 case $f in
7017 ansidecl.h )
7018 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7019 auto-host.h )
7020 host_xm_file_list="${host_xm_file_list} $f" ;;
7021 defaults.h )
7022 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7023 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7024 esac
7025 done
7027 build_xm_file_list=
7028 for f in $build_xm_file; do
7029 case $f in
7030 ansidecl.h )
7031 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7032 auto-build.h | auto-host.h )
7033 build_xm_file_list="${build_xm_file_list} $f" ;;
7034 defaults.h )
7035 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7036 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7037 esac
7038 done
7040 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7041 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7042 CROSS=
7043 ALL=all.internal
7044 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7045 if test x$host != x$target
7046 then
7047 CROSS="-DCROSS_COMPILE"
7048 ALL=all.cross
7049 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7050 case "$host","$target" in
7051 i?86-*-*,x86_64-*-* \
7052 | powerpc*-*-*,powerpc64*-*-*)
7053 CROSS="$CROSS -DNATIVE_CROSS" ;;
7054 esac
7055 elif test "x$TARGET_SYSTEM_ROOT" != x; then
7056 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
7057 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7060 # If this is a cross-compiler that does not
7061 # have its own set of headers then define
7062 # inhibit_libc
7064 # If this is using newlib, without having the headers available now,
7065 # then define inhibit_libc in LIBGCC2_CFLAGS.
7066 # This prevents libgcc2 from containing any code which requires libc
7067 # support.
7068 inhibit_libc=
7069 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
7070 test x$with_newlib = xyes ; } &&
7071 test "x$with_headers" = x ; then
7072 inhibit_libc=-Dinhibit_libc
7076 # When building gcc with a cross-compiler, we need to adjust things so
7077 # that the generator programs are still built with the native compiler.
7078 # Also, we cannot run fixincludes or fix-header.
7080 # These are the normal (build=host) settings:
7081 BUILD_PREFIX=
7082 BUILD_PREFIX_1=ignore-
7083 BUILD_CC='$(CC)'
7084 BUILD_CFLAGS='$(ALL_CFLAGS)'
7086 STMP_FIXINC=stmp-fixinc
7087 STMP_FIXPROTO=stmp-fixproto
7089 # And these apply if build != host.
7090 if test x$build != x$host
7091 then
7092 BUILD_PREFIX=build-
7093 BUILD_PREFIX_1=build-
7094 BUILD_CC='$(CC_FOR_BUILD)'
7095 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7097 if test "x$TARGET_SYSTEM_ROOT" = x; then
7098 STMP_FIXINC=
7099 STMP_FIXPROTO=
7103 # Expand extra_headers to include complete path.
7104 # This substitutes for lots of t-* files.
7105 extra_headers_list=
7106 if test "x$extra_headers" = x
7107 then true
7108 else
7109 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7110 for file in $extra_headers;
7112 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7113 done
7116 # Add a definition of USE_COLLECT2 if system wants one.
7117 case $use_collect2 in
7118 no) use_collect2= ;;
7119 "") ;;
7121 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7122 xm_defines="${xm_defines} USE_COLLECT2"
7124 esac
7126 # Identify the assembler which will work hand-in-glove with the newly
7127 # built GCC, so that we can examine its features. This is the assembler
7128 # which will be driven by the driver program.
7130 # If build != host, and we aren't building gas in-tree, we identify a
7131 # build->target assembler and hope that it will have the same features
7132 # as the host->target assembler we'll be using.
7133 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7134 echo "configure:7135: checking what assembler to use" >&5
7135 in_tree_gas=no
7136 gcc_cv_as=
7137 gcc_cv_gas_major_version=
7138 gcc_cv_gas_minor_version=
7139 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7140 if test -x "$DEFAULT_ASSEMBLER"; then
7141 gcc_cv_as="$DEFAULT_ASSEMBLER"
7142 elif test -x "$AS"; then
7143 gcc_cv_as="$AS"
7144 elif test -x as$host_exeext; then
7145 # Build using assembler in the current directory.
7146 gcc_cv_as=./as$host_exeext
7147 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7148 && test -f ../gas/Makefile; then
7149 # Single tree build which includes gas.
7150 in_tree_gas=yes
7151 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7152 for f in $gcc_cv_as_bfd_srcdir/configure \
7153 $gcc_cv_as_gas_srcdir/configure \
7154 $gcc_cv_as_gas_srcdir/configure.in \
7155 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7156 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7157 if test x$gcc_cv_gas_version != x; then
7158 break
7160 done
7161 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7162 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7163 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7165 rm -f as$host_exeext
7166 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7169 if test "x$gcc_cv_as" = x; then
7170 # Search the same directories that the installed compiler will
7171 # search. Else we may find the wrong assembler and lose. If we
7172 # do not find a suitable assembler binary, then try the user's
7173 # path.
7175 # Also note we have to check MD_EXEC_PREFIX before checking the
7176 # user's path. Unfortunately, there is no good way to get at the
7177 # value of MD_EXEC_PREFIX here. So we do a brute force search
7178 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7179 # to be fixed as part of the make/configure rewrite too.
7181 if test "x$exec_prefix" = xNONE; then
7182 if test "x$prefix" = xNONE; then
7183 test_prefix=/usr/local
7184 else
7185 test_prefix=$prefix
7187 else
7188 test_prefix=$exec_prefix
7191 # If the loop below does not find an assembler, then use whatever
7192 # one we can find in the users's path.
7193 # user's path.
7194 if test "x$program_prefix" != xNONE; then
7195 gcc_cv_as=${program_prefix}as$host_exeext
7196 else
7197 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7200 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7201 $test_prefix/lib/gcc-lib/$target_alias \
7202 /usr/lib/gcc/$target_alias/$gcc_version \
7203 /usr/lib/gcc/$target_alias \
7204 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7205 $test_prefix/$target_alias/bin"
7207 if test x$host = x$target; then
7208 test_dirs="$test_dirs \
7209 /usr/libexec \
7210 /usr/ccs/gcc \
7211 /usr/ccs/bin \
7212 /udk/usr/ccs/bin \
7213 /bsd43/usr/lib/cmplrs/cc \
7214 /usr/cross64/usr/bin \
7215 /usr/lib/cmplrs/cc \
7216 /sysv/usr/lib/cmplrs/cc \
7217 /svr4/usr/lib/cmplrs/cc \
7218 /usr/bin"
7221 for dir in $test_dirs; do
7222 if test -x $dir/as$host_exeext; then
7223 gcc_cv_as=$dir/as$host_exeext
7224 break;
7226 done
7228 case $in_tree_gas in
7229 yes)
7230 echo "$ac_t"""newly built gas"" 1>&6
7233 echo "$ac_t""$gcc_cv_as" 1>&6
7235 esac
7237 # Identify the linker which will work hand-in-glove with the newly
7238 # built GCC, so that we can examine its features. This is the linker
7239 # which will be driven by the driver program.
7241 # If build != host, and we aren't building gas in-tree, we identify a
7242 # build->target linker and hope that it will have the same features
7243 # as the host->target linker we'll be using.
7244 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7245 echo "configure:7246: checking what linker to use" >&5
7246 in_tree_ld=no
7247 gcc_cv_ld=
7248 gcc_cv_gld_major_version=
7249 gcc_cv_gld_minor_version=
7250 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7251 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7252 if test -x "$DEFAULT_LINKER"; then
7253 gcc_cv_ld="$DEFAULT_LINKER"
7254 elif test -x "$LD"; then
7255 gcc_cv_ld="$LD"
7256 elif test -x collect-ld$host_exeext; then
7257 # Build using linker in the current directory.
7258 gcc_cv_ld=./collect-ld$host_exeext
7259 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7260 && test -f ../ld/Makefile; then
7261 # Single tree build which includes ld.
7262 in_tree_ld=yes
7263 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
7265 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7266 if test x$gcc_cv_gld_version != x; then
7267 break
7269 done
7270 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7271 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7272 rm -f collect-ld$host_exeext
7273 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7274 2>/dev/null
7277 if test "x$gcc_cv_ld" = x; then
7278 # Search the same directories that the installed compiler will
7279 # search. Else we may find the wrong linker and lose. If we
7280 # do not find a suitable linker binary, then try the user's
7281 # path.
7283 # Also note we have to check MD_EXEC_PREFIX before checking the
7284 # user's path. Unfortunately, there is no good way to get at the
7285 # value of MD_EXEC_PREFIX here. So we do a brute force search
7286 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7287 # to be fixed as part of the make/configure rewrite too.
7289 if test "x$exec_prefix" = xNONE; then
7290 if test "x$prefix" = xNONE; then
7291 test_prefix=/usr/local
7292 else
7293 test_prefix=$prefix
7295 else
7296 test_prefix=$exec_prefix
7299 # If the loop below does not find an linker, then use whatever
7300 # one we can find in the users's path.
7301 # user's path.
7302 if test "x$program_prefix" != xNONE; then
7303 gcc_cv_ld=${program_prefix}ld$host_exeext
7304 else
7305 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7308 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7309 $test_prefix/lib/gcc-lib/$target_alias \
7310 /usr/lib/gcc/$target_alias/$gcc_version \
7311 /usr/lib/gcc/$target_alias \
7312 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7313 $test_prefix/$target_alias/bin"
7315 if test x$host = x$target; then
7316 test_dirs="$test_dirs \
7317 /usr/libexec \
7318 /usr/ccs/gcc \
7319 /usr/ccs/bin \
7320 /udk/usr/ccs/bin \
7321 /bsd43/usr/lib/cmplrs/cc \
7322 /usr/cross64/usr/bin \
7323 /usr/lib/cmplrs/cc \
7324 /sysv/usr/lib/cmplrs/cc \
7325 /svr4/usr/lib/cmplrs/cc \
7326 /usr/bin"
7329 for dir in $test_dirs; do
7330 if test -x $dir/ld$host_exeext; then
7331 gcc_cv_ld=$dir/ld$host_exeext
7332 break;
7334 done
7336 case $in_tree_ld in
7337 yes)
7338 echo "$ac_t"""newly built ld"" 1>&6
7341 echo "$ac_t""$gcc_cv_ld" 1>&6
7343 esac
7345 # Figure out what nm we will be using.
7346 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7347 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7348 echo "configure:7349: checking what nm to use" >&5
7349 in_tree_nm=no
7350 if test -x nm$host_exeext; then
7351 gcc_cv_nm=./nm$host_exeext
7352 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7353 && test -f ../binutils/Makefile; then
7354 # Single tree build which includes binutils.
7355 in_tree_nm=yes
7356 gcc_cv_nm=./nm$host_exeext
7357 rm -f nm$host_exeext
7358 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7359 elif test "x$program_prefix" != xNONE; then
7360 gcc_cv_nm=${program_prefix}nm$host_exeext
7361 else
7362 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7364 case $in_tree_nm in
7365 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7366 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7367 esac
7369 # Figure out what objdump we will be using.
7370 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7371 echo "configure:7372: checking what objdump to use" >&5
7372 in_tree_objdump=no
7373 if test -x objdump$host_exeext; then
7374 gcc_cv_objdump=./objdump$host_exeext
7375 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7376 && test -f ../binutils/Makefile; then
7377 # Single tree build which includes binutils.
7378 in_tree_objdump=yes
7379 gcc_cv_objdump=./objdump$host_exeext
7380 rm -f objdump$host_exeext
7381 $symbolic_link ../binutils/objdump$host_exeext \
7382 objdump$host_exeext 2>/dev/null
7383 elif test "x$program_prefix" != xNONE; then
7384 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7385 else
7386 gcc_cv_objdump=`echo objdump | \
7387 sed ${program_transform_name}`$host_exeext
7389 case $in_tree_objdump in
7390 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7391 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7392 esac
7394 # Figure out what assembler alignment features are present.
7395 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7396 echo "configure:7397: checking assembler alignment features" >&5
7397 gcc_cv_as_alignment_features=none
7398 if test $in_tree_gas = yes; then
7399 # Gas version 2.6 and later support for .balign and .p2align.
7400 if test $gcc_cv_gas_major_version -eq 2 \
7401 && test $gcc_cv_gas_minor_version -ge 6 \
7402 || test $gcc_cv_gas_major_version -gt 2 ; then
7405 gcc_cv_as_alignment_features=".balign and .p2align"
7406 cat >> confdefs.h <<\EOF
7407 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7414 # Gas version 2.8 and later support specifying the maximum
7415 # bytes to skip when using .p2align.
7416 if test $gcc_cv_gas_major_version -eq 2 \
7417 && test $gcc_cv_gas_minor_version -ge 8 \
7418 || test $gcc_cv_gas_major_version -gt 2 ; then
7421 gcc_cv_as_alignment_features=".p2align including maximum skip"
7422 cat >> confdefs.h <<\EOF
7423 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7430 elif test x$gcc_cv_as != x; then
7431 # Check if we have .balign and .p2align
7432 echo ".balign 4" > conftest.s
7433 echo ".p2align 2" >> conftest.s
7434 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7435 gcc_cv_as_alignment_features=".balign and .p2align"
7436 cat >> confdefs.h <<\EOF
7437 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7441 rm -f conftest.s conftest.o
7442 # Check if specifying the maximum bytes to skip when
7443 # using .p2align is supported.
7444 echo ".p2align 4,,7" > conftest.s
7445 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7446 gcc_cv_as_alignment_features=".p2align including maximum skip"
7447 cat >> confdefs.h <<\EOF
7448 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7452 rm -f conftest.s conftest.o
7454 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7456 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7457 echo "configure:7458: checking assembler subsection support" >&5
7458 gcc_cv_as_subsections=no
7459 if test $in_tree_gas = yes ; then
7460 if test $gcc_cv_gas_major_version -eq 2 \
7461 && test $gcc_cv_gas_minor_version -ge 9 \
7462 || test $gcc_cv_gas_major_version -gt 2 ; then
7465 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7466 gcc_cv_as_subsections="working .subsection -1"
7472 elif test x$gcc_cv_as != x; then
7473 # Check if we have .subsection
7474 echo ".subsection 1" > conftest.s
7475 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7476 gcc_cv_as_subsections=".subsection"
7477 if test x$gcc_cv_nm != x; then
7478 cat > conftest.s <<EOF
7479 conftest_label1: .word 0
7480 .subsection -1
7481 conftest_label2: .word 0
7482 .previous
7484 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7485 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7486 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7487 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7489 else
7490 gcc_cv_as_subsections="working .subsection -1"
7495 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7497 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7498 cat >> confdefs.h <<\EOF
7499 #define HAVE_GAS_SUBSECTION_ORDERING 1
7503 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7505 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7506 echo "configure:7507: checking assembler weak support" >&5
7507 gcc_cv_as_weak=no
7508 if test $in_tree_gas = yes ; then
7509 if test $gcc_cv_gas_major_version -eq 2 \
7510 && test $gcc_cv_gas_minor_version -ge 2 \
7511 || test $gcc_cv_gas_major_version -gt 2 ; then
7514 gcc_cv_as_weak="yes"
7519 elif test x$gcc_cv_as != x; then
7520 # Check if we have .weak
7521 echo " .weak foobar" > conftest.s
7522 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7523 gcc_cv_as_weak="yes"
7525 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7527 if test x"$gcc_cv_as_weak" = xyes; then
7528 cat >> confdefs.h <<\EOF
7529 #define HAVE_GAS_WEAK 1
7533 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7535 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7536 echo "configure:7537: checking assembler hidden support" >&5
7537 gcc_cv_as_hidden=no
7538 if test $in_tree_gas = yes ; then
7539 if test $gcc_cv_gas_major_version -eq 2 \
7540 && (test $gcc_cv_gas_minor_version -gt 12 \
7541 || (test $gcc_cv_gas_minor_version -eq 12 \
7542 && test $gcc_cv_gas_patch_version -ge 1 )) \
7543 || test $gcc_cv_gas_major_version -gt 2 ; then
7546 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7547 gcc_cv_as_hidden="yes"
7553 elif test x$gcc_cv_as != x; then
7554 # Check if we have .hidden
7555 echo " .hidden foobar" > conftest.s
7556 echo "foobar:" >> conftest.s
7557 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7558 gcc_cv_as_hidden="yes"
7560 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7562 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7563 # This is irritatingly difficult to feature test for. Look for
7564 # the date string after the version number.
7565 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7566 if echo "$ld_ver" | grep GNU > /dev/null; then
7567 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
7568 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'`
7569 if test 0"$ld_date" -lt 20020404; then
7570 if test -n "$ld_date"; then
7571 # If there was date string, but was earlier than 2002-04-04, fail
7572 gcc_cv_as_hidden="no"
7573 elif test -z "$ld_vers"; then
7574 # If there was no date string nor ld version number, something is wrong
7575 gcc_cv_as_hidden="no"
7576 else
7577 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7578 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7579 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7580 test -z "$ld_vers_patch" && ld_vers_patch=0
7581 if test "$ld_vers_major" -lt 2; then
7582 gcc_cv_as_hidden="no"
7583 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7584 gcc_cv_as_hidden="no"
7585 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7586 -a "$ld_vers_patch" -eq 0; then
7587 gcc_cv_as_hidden="no"
7593 case "$target" in
7594 mips-sgi-irix6*)
7595 if test x"$gnu_ld_flag" = x"no"; then
7596 # Even if using gas with .hidden support, the resulting object files
7597 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7598 # N64 linkers, the problem is that the linker refuses to accept
7599 # -call_shared (passed by default to the linker) and -r (used to
7600 # link the object file generated without .hidden directives with
7601 # one that hides symbols), so we also lose.
7602 gcc_cv_as_hidden=no
7605 esac
7606 if test x"$gcc_cv_as_hidden" = xyes; then
7607 cat >> confdefs.h <<\EOF
7608 #define HAVE_GAS_HIDDEN 1
7612 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7613 libgcc_visibility=$gcc_cv_as_hidden
7616 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7617 echo "configure:7618: checking assembler leb128 support" >&5
7618 gcc_cv_as_leb128=no
7619 if test $in_tree_gas = yes ; then
7620 if test $gcc_cv_gas_major_version -eq 2 \
7621 && test $gcc_cv_gas_minor_version -ge 11 \
7622 || test $gcc_cv_gas_major_version -gt 2 ; then
7625 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7626 gcc_cv_as_leb128="yes"
7632 elif test x$gcc_cv_as != x; then
7633 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7634 cat > conftest.s <<EOF
7635 .data
7636 .uleb128 L2 - L1
7638 .uleb128 1280
7639 .sleb128 -1010
7642 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7643 gcc_cv_as_leb128="yes"
7645 # GAS versions before 2.11 do not support uleb128,
7646 # despite appearing to.
7647 # ??? There exists an elf-specific test that will crash
7648 # the assembler. Perhaps it's better to figure out whether
7649 # arbitrary sections are supported and try the test.
7650 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7651 if echo "$as_ver" | grep GNU > /dev/null; then
7652 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7653 as_major=`echo $as_ver | sed 's/\..*//'`
7654 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7655 if test $as_major -eq 2 -a $as_minor -lt 11; then
7656 gcc_cv_as_leb128="no"
7660 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7662 if test x"$gcc_cv_as_leb128" = xyes; then
7663 cat >> confdefs.h <<\EOF
7664 #define HAVE_AS_LEB128 1
7668 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7670 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7671 echo "configure:7672: checking assembler eh_frame optimization" >&5
7672 gcc_cv_as_eh_frame=no
7673 if test $in_tree_gas = yes ; then
7674 if test $gcc_cv_gas_major_version -eq 2 \
7675 && test $gcc_cv_gas_minor_version -ge 12 \
7676 || test $gcc_cv_gas_major_version -gt 2 ; then
7679 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7680 gcc_cv_as_eh_frame="yes"
7686 elif test x$gcc_cv_as != x; then
7687 # Check if this is GAS.
7688 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7689 rm -f a.out 2> /dev/null
7690 if echo "$as_ver" | grep GNU > /dev/null; then
7691 # Versions up to and including 2.11.0 may mis-optimize
7692 # .eh_frame data. Try something.
7693 cat > conftest.s <<EOF
7694 .text
7695 .LFB1:
7696 .4byte 0
7697 .L1:
7698 .4byte 0
7699 .LFE1:
7700 .section .eh_frame,"aw",@progbits
7701 __FRAME_BEGIN__:
7702 .4byte .LECIE1-.LSCIE1
7703 .LSCIE1:
7704 .4byte 0x0
7705 .byte 0x1
7706 .ascii "z\0"
7707 .byte 0x1
7708 .byte 0x78
7709 .byte 0x1a
7710 .byte 0x0
7711 .byte 0x4
7712 .4byte 1
7713 .p2align 1
7714 .LECIE1:
7715 .LSFDE1:
7716 .4byte .LEFDE1-.LASFDE1
7717 .LASFDE1:
7718 .4byte .LASFDE1-__FRAME_BEGIN__
7719 .4byte .LFB1
7720 .4byte .LFE1-.LFB1
7721 .byte 0x4
7722 .4byte .LFE1-.LFB1
7723 .byte 0x4
7724 .4byte .L1-.LFB1
7725 .LEFDE1:
7727 cat > conftest.lit <<EOF
7728 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7729 0010 01000000 12000000 18000000 00000000 ................
7730 0020 08000000 04080000 0044 .........D
7732 cat > conftest.big <<EOF
7733 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7734 0010 00000001 00000012 00000018 00000000 ................
7735 0020 00000008 04000000 0844 .........D
7737 # If the assembler didn't choke, and we can objdump,
7738 # and we got the correct data, then succeed.
7739 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7740 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7741 | tail -3 > conftest.got \
7742 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7743 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7744 then
7745 gcc_cv_as_eh_frame="yes"
7746 else
7747 gcc_cv_as_eh_frame="bad"
7748 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7749 cat >> confdefs.h <<\EOF
7750 #define USE_AS_TRADITIONAL_FORMAT 1
7756 rm -f conftest.*
7758 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7760 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7761 echo "configure:7762: checking assembler section merging support" >&5
7762 gcc_cv_as_shf_merge=no
7763 if test $in_tree_gas = yes ; then
7764 if test $gcc_cv_gas_major_version -eq 2 \
7765 && test $gcc_cv_gas_minor_version -ge 12 \
7766 || test $gcc_cv_gas_major_version -gt 2 ; then
7769 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7770 gcc_cv_as_shf_merge=yes
7776 elif test x$gcc_cv_as != x; then
7777 # Check if we support SHF_MERGE sections
7778 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7779 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7780 gcc_cv_as_shf_merge=yes
7782 rm -f conftest.s conftest.o
7784 if test x"$gcc_cv_as_shf_merge" = xyes; then
7785 cat >> confdefs.h <<\EOF
7786 #define HAVE_GAS_SHF_MERGE 1
7790 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7792 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7793 echo "configure:7794: checking assembler thread-local storage support" >&5
7794 gcc_cv_as_tls=no
7795 conftest_s=
7796 tls_first_major=
7797 tls_first_minor=
7798 tls_as_opt=
7799 case "$target" in
7800 alpha*-*-*)
7801 conftest_s='
7802 .section ".tdata","awT",@progbits
7803 foo: .long 25
7804 .text
7805 ldq $27,__tls_get_addr($29) !literal!1
7806 lda $16,foo($29) !tlsgd!1
7807 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7808 ldq $27,__tls_get_addr($29) !literal!2
7809 lda $16,foo($29) !tlsldm!2
7810 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7811 ldq $1,foo($29) !gotdtprel
7812 ldah $2,foo($29) !dtprelhi
7813 lda $3,foo($2) !dtprello
7814 lda $4,foo($29) !dtprel
7815 ldq $1,foo($29) !gottprel
7816 ldah $2,foo($29) !tprelhi
7817 lda $3,foo($2) !tprello
7818 lda $4,foo($29) !tprel'
7819 tls_first_major=2
7820 tls_first_minor=13
7822 i[34567]86-*-*)
7823 conftest_s='
7824 .section ".tdata","awT",@progbits
7825 foo: .long 25
7826 .text
7827 movl %gs:0, %eax
7828 leal foo@TLSGD(,%ebx,1), %eax
7829 leal foo@TLSLDM(%ebx), %eax
7830 leal foo@DTPOFF(%eax), %edx
7831 movl foo@GOTTPOFF(%ebx), %eax
7832 subl foo@GOTTPOFF(%ebx), %eax
7833 addl foo@GOTNTPOFF(%ebx), %eax
7834 movl foo@INDNTPOFF, %eax
7835 movl $foo@TPOFF, %eax
7836 subl $foo@TPOFF, %eax
7837 leal foo@NTPOFF(%ecx), %eax'
7838 tls_first_major=2
7839 tls_first_minor=14
7841 x86_64-*-*)
7842 conftest_s='
7843 .section ".tdata","awT",@progbits
7844 foo: .long 25
7845 .text
7846 movq %fs:0, %rax
7847 leaq foo@TLSGD(%rip), %rdi
7848 leaq foo@TLSLD(%rip), %rdi
7849 leaq foo@DTPOFF(%rax), %rdx
7850 movq foo@GOTTPOFF(%rip), %rax
7851 movq $foo@TPOFF, %rax'
7852 tls_first_major=2
7853 tls_first_minor=14
7855 ia64-*-*)
7856 conftest_s='
7857 .section ".tdata","awT",@progbits
7858 foo: data8 25
7859 .text
7860 addl r16 = @ltoff(@dtpmod(foo#)), gp
7861 addl r17 = @ltoff(@dtprel(foo#)), gp
7862 addl r18 = @ltoff(@tprel(foo#)), gp
7863 addl r19 = @dtprel(foo#), gp
7864 adds r21 = @dtprel(foo#), r13
7865 movl r23 = @dtprel(foo#)
7866 addl r20 = @tprel(foo#), gp
7867 adds r22 = @tprel(foo#), r13
7868 movl r24 = @tprel(foo#)'
7869 tls_first_major=2
7870 tls_first_minor=13
7872 powerpc-*-*)
7873 conftest_s='
7874 .section ".tdata","awT",@progbits
7875 .align 2
7876 ld0: .space 4
7877 ld1: .space 4
7878 x1: .space 4
7879 x2: .space 4
7880 x3: .space 4
7881 .text
7882 addi 3,31,ld0@got@tlsgd
7883 bl __tls_get_addr
7884 addi 3,31,x1@got@tlsld
7885 bl __tls_get_addr
7886 addi 9,3,x1@dtprel
7887 addis 9,3,x2@dtprel@ha
7888 addi 9,9,x2@dtprel@l
7889 lwz 9,x3@got@tprel(31)
7890 add 9,9,x@tls
7891 addi 9,2,x1@tprel
7892 addis 9,2,x2@tprel@ha
7893 addi 9,9,x2@tprel@l'
7894 tls_first_major=2
7895 tls_first_minor=14
7896 tls_as_opt=-a32
7898 powerpc64-*-*)
7899 conftest_s='
7900 .section ".tdata","awT",@progbits
7901 .align 3
7902 ld0: .space 8
7903 ld1: .space 8
7904 x1: .space 8
7905 x2: .space 8
7906 x3: .space 8
7907 .text
7908 addi 3,2,ld0@got@tlsgd
7909 bl .__tls_get_addr
7911 addi 3,2,ld1@toc
7912 bl .__tls_get_addr
7914 addi 3,2,x1@got@tlsld
7915 bl .__tls_get_addr
7917 addi 9,3,x1@dtprel
7918 bl .__tls_get_addr
7920 addis 9,3,x2@dtprel@ha
7921 addi 9,9,x2@dtprel@l
7922 bl .__tls_get_addr
7924 ld 9,x3@got@dtprel(2)
7925 add 9,9,3
7926 bl .__tls_get_addr
7927 nop'
7928 tls_first_major=2
7929 tls_first_minor=14
7930 tls_as_opt=-a64
7932 s390-*-*)
7933 conftest_s='
7934 .section ".tdata","awT",@progbits
7935 foo: .long 25
7936 .text
7937 .long foo@TLSGD
7938 .long foo@TLSLDM
7939 .long foo@DTPOFF
7940 .long foo@NTPOFF
7941 .long foo@GOTNTPOFF
7942 .long foo@INDNTPOFF
7943 l %r1,foo@GOTNTPOFF(%r12)
7944 l %r1,0(%r1):tls_load:foo
7945 bas %r14,0(%r1,%r13):tls_gdcall:foo
7946 bas %r14,0(%r1,%r13):tls_ldcall:foo'
7947 tls_first_major=2
7948 tls_first_minor=14
7949 tls_as_opt=-m31
7951 s390x-*-*)
7952 conftest_s='
7953 .section ".tdata","awT",@progbits
7954 foo: .long 25
7955 .text
7956 .quad foo@TLSGD
7957 .quad foo@TLSLDM
7958 .quad foo@DTPOFF
7959 .quad foo@NTPOFF
7960 .quad foo@GOTNTPOFF
7961 lg %r1,foo@GOTNTPOFF(%r12)
7962 larl %r1,foo@INDNTPOFF
7963 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
7964 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
7965 tls_first_major=2
7966 tls_first_minor=14
7967 tls_as_opt="-m64 -Aesame"
7969 esac
7970 if test -z "$tls_first_major"; then
7972 elif test $in_tree_gas = yes ; then
7973 if test $gcc_cv_gas_major_version -eq $tls_first_major \
7974 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
7975 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
7978 gcc_cv_as_tls=yes
7983 elif test x$gcc_cv_as != x; then
7984 echo "$conftest_s" > conftest.s
7985 if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7986 then
7987 gcc_cv_as_tls=yes
7989 rm -f conftest.s conftest.o
7991 if test "$gcc_cv_as_tls" = yes; then
7992 cat >> confdefs.h <<\EOF
7993 #define HAVE_AS_TLS 1
7997 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7999 case "$target" in
8000 # All TARGET_ABI_OSF targets.
8001 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8002 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8003 echo "configure:8004: checking assembler supports explicit relocations" >&5
8004 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8005 echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8008 gcc_cv_as_explicit_relocs=unknown
8009 if test $in_tree_gas = yes ; then
8010 if test $gcc_cv_gas_major_version -eq 2 \
8011 && test $gcc_cv_gas_minor_version -ge 12 \
8012 || test $gcc_cv_gas_major_version -gt 2 ; then
8015 gcc_cv_as_explicit_relocs=yes
8020 elif test x$gcc_cv_as != x; then
8021 cat > conftest.s << 'EOF'
8022 .set nomacro
8023 .text
8024 extbl $3, $2, $3 !lituse_bytoff!1
8025 ldq $2, a($29) !literal!1
8026 ldq $4, b($29) !literal!2
8027 ldq_u $3, 0($2) !lituse_base!1
8028 ldq $27, f($29) !literal!5
8029 jsr $26, ($27), f !lituse_jsr!5
8030 ldah $29, 0($26) !gpdisp!3
8031 lda $0, c($29) !gprel
8032 ldah $1, d($29) !gprelhigh
8033 lda $1, d($1) !gprellow
8034 lda $29, 0($29) !gpdisp!3
8036 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8037 gcc_cv_as_explicit_relocs=yes
8038 else
8039 gcc_cv_as_explicit_relocs=no
8041 rm -f conftest.s conftest.o
8046 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8047 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8048 cat >> confdefs.h <<\EOF
8049 #define HAVE_AS_EXPLICIT_RELOCS 1
8054 sparc*-*-*)
8055 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8056 echo "configure:8057: checking assembler .register pseudo-op support" >&5
8057 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8058 echo $ac_n "(cached) $ac_c" 1>&6
8059 else
8061 gcc_cv_as_register_pseudo_op=unknown
8062 if test x$gcc_cv_as != x; then
8063 # Check if we have .register
8064 echo ".register %g2, #scratch" > conftest.s
8065 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8066 gcc_cv_as_register_pseudo_op=yes
8067 else
8068 gcc_cv_as_register_pseudo_op=no
8070 rm -f conftest.s conftest.o
8075 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8076 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8077 cat >> confdefs.h <<\EOF
8078 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8083 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8084 echo "configure:8085: checking assembler supports -relax" >&5
8085 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8086 echo $ac_n "(cached) $ac_c" 1>&6
8087 else
8089 gcc_cv_as_relax_opt=unknown
8090 if test x$gcc_cv_as != x; then
8091 # Check if gas supports -relax
8092 echo ".text" > conftest.s
8093 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8094 gcc_cv_as_relax_opt=yes
8095 else
8096 gcc_cv_as_relax_opt=no
8098 rm -f conftest.s conftest.o
8103 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8104 if test "x$gcc_cv_as_relax_opt" = xyes; then
8105 cat >> confdefs.h <<\EOF
8106 #define HAVE_AS_RELAX_OPTION 1
8111 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8112 echo "configure:8113: checking assembler and linker support unaligned pc related relocs" >&5
8113 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8114 echo $ac_n "(cached) $ac_c" 1>&6
8115 else
8117 gcc_cv_as_sparc_ua_pcrel=unknown
8118 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8119 gcc_cv_as_sparc_ua_pcrel=no
8120 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8121 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8122 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8123 gcc_cv_as_sparc_ua_pcrel=yes
8125 rm -f conftest.s conftest.o conftest
8130 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8131 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8132 cat >> confdefs.h <<\EOF
8133 #define HAVE_AS_SPARC_UA_PCREL 1
8138 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8139 echo "configure:8140: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8140 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8141 echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8144 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8145 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8146 if test x$gcc_cv_objdump != x; then
8147 gcc_cv_as_sparc_ua_pcrel_hidden=no
8148 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8149 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8150 echo "foo: .skip 4" >> conftest.s
8151 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8152 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8153 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8154 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8155 if $gcc_cv_objdump -R conftest 2> /dev/null \
8156 | grep 'DISP32' > /dev/null 2>&1; then
8158 else
8159 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8163 rm -f conftest.s conftest.o conftest
8164 else
8165 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8170 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8171 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8172 cat >> confdefs.h <<\EOF
8173 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8178 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8179 echo "configure:8180: checking for assembler offsetable %lo() support" >&5
8180 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8181 echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8184 gcc_cv_as_offsetable_lo10=unknown
8185 if test "x$gcc_cv_as" != x; then
8186 # Check if assembler has offsetable %lo()
8187 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8188 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8189 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8190 > /dev/null 2>&1 &&
8191 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8192 > /dev/null 2>&1; then
8193 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8194 gcc_cv_as_offsetable_lo10=no
8195 else
8196 gcc_cv_as_offsetable_lo10=yes
8198 else
8199 gcc_cv_as_offsetable_lo10=no
8201 rm -f conftest.s conftest.o conftest1.s conftest1.o
8206 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8207 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8208 cat >> confdefs.h <<\EOF
8209 #define HAVE_AS_OFFSETABLE_LO10 1
8216 i[34567]86-*-* | x86_64-*-*)
8217 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8218 echo "configure:8219: checking assembler instructions" >&5
8219 gcc_cv_as_instructions=
8220 if test $in_tree_gas = yes ; then
8221 if test $gcc_cv_gas_major_version -eq 2 \
8222 && test $gcc_cv_gas_minor_version -ge 9 \
8223 || test $gcc_cv_gas_major_version -gt 2 ; then
8226 gcc_cv_as_instructions="filds fists"
8231 elif test x$gcc_cv_as != x; then
8232 set "filds fists" "filds mem; fists mem"
8233 while test $# -gt 0
8235 echo "$2" > conftest.s
8236 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8237 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8239 shift 2
8240 done
8241 rm -f conftest.s conftest.o
8243 if test x"$gcc_cv_as_instructions" != x; then
8244 cat >> confdefs.h <<EOF
8245 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8249 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8251 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8252 echo "configure:8253: checking assembler GOTOFF in data directives" >&5
8253 gcc_cv_as_gotoff_in_data=no
8254 if test $in_tree_gas = yes ; then
8255 if test $gcc_cv_gas_major_version -eq 2 \
8256 && test $gcc_cv_gas_minor_version -ge 11 \
8257 || test $gcc_cv_gas_major_version -gt 2 ; then
8260 gcc_cv_as_gotoff_in_data=yes
8265 elif test x$gcc_cv_as != x; then
8266 cat > conftest.s <<EOF
8267 .text
8268 .L0:
8270 .data
8271 .long .L0@GOTOFF
8273 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8274 gcc_cv_as_gotoff_in_data=yes
8277 cat >> confdefs.h <<EOF
8278 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8281 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8284 ia64*-*-*)
8285 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8286 echo "configure:8287: checking assembler supports ltoffx and ldxmov" >&5
8287 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8288 echo $ac_n "(cached) $ac_c" 1>&6
8289 else
8291 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8292 if test $in_tree_gas = yes ; then
8293 if test $gcc_cv_gas_major_version -eq 2 \
8294 && test $gcc_cv_gas_minor_version -ge 14 \
8295 || test $gcc_cv_gas_major_version -gt 2 ; then
8298 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8303 elif test x$gcc_cv_as != x; then
8304 cat > conftest.s << 'EOF'
8305 .text
8306 addl r15 = @ltoffx(x#), gp
8308 ld8.mov r16 = [r15], x#
8310 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8311 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8312 else
8313 gcc_cv_as_ltoffx_ldxmov_relocs=no
8315 rm -f conftest.s conftest.o
8320 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8321 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8322 cat >> confdefs.h <<\EOF
8323 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8328 esac
8330 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8331 echo "configure:8332: checking assembler dwarf2 debug_line support" >&5
8332 gcc_cv_as_dwarf2_debug_line=no
8333 # ??? Not all targets support dwarf2 debug_line, even within a version
8334 # of gas. Moreover, we need to emit a valid instruction to trigger any
8335 # info to the output file. So, as supported targets are added to gas 2.11,
8336 # add some instruction here to (also) show we expect this might work.
8337 # ??? Once 2.11 is released, probably need to add first known working
8338 # version to the per-target configury.
8339 case "$target" in
8340 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8341 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
8342 | xstormy16*-*-* | cris-*-*)
8343 insn="nop"
8345 ia64*-*-*)
8346 insn="nop 0"
8348 mmix-*-*)
8349 insn="swym 0"
8351 esac
8352 if test $in_tree_gas = yes ; then
8353 if test $gcc_cv_gas_major_version -eq 2 \
8354 && test $gcc_cv_gas_minor_version -ge 11 \
8355 || test $gcc_cv_gas_major_version -gt 2 ; then
8358 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8359 && test x"$insn" != x ; then
8360 gcc_cv_as_dwarf2_debug_line="yes"
8366 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8367 echo ' .file 1 "conftest.s"' > conftest.s
8368 echo ' .loc 1 3 0' >> conftest.s
8369 echo " $insn" >> conftest.s
8370 # ??? This fails with non-gnu grep.
8371 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8372 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8373 # The .debug_line file table must be in the exact order that
8374 # we specified the files, since these indices are also used
8375 # by DW_AT_decl_file. Approximate this test by testing if
8376 # the assembler bitches if the same index is assigned twice.
8377 echo ' .file 1 "foo.s"' > conftest.s
8378 echo ' .file 1 "bar.s"' >> conftest.s
8379 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8380 then
8381 gcc_cv_as_dwarf2_debug_line="no"
8382 else
8383 gcc_cv_as_dwarf2_debug_line="yes"
8386 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8388 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8389 cat >> confdefs.h <<\EOF
8390 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8394 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8396 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8397 echo "configure:8398: checking assembler --gdwarf2 support" >&5
8398 gcc_cv_as_gdwarf2_flag=no
8399 if test $in_tree_gas = yes ; then
8400 if test $gcc_cv_gas_major_version -eq 2 \
8401 && test $gcc_cv_gas_minor_version -ge 11 \
8402 || test $gcc_cv_gas_major_version -gt 2 ; then
8405 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8406 && test x"$insn" != x ; then
8407 gcc_cv_as_gdwarf2_flag="yes"
8413 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8414 echo '' > conftest.s
8415 # ??? This fails with non-gnu grep.
8416 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8417 then
8418 gcc_cv_as_gdwarf2_flag="yes"
8420 rm -f conftest.s conftest.o
8422 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8423 cat >> confdefs.h <<\EOF
8424 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8428 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8430 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8431 echo "configure:8432: checking assembler --gstabs support" >&5
8432 gcc_cv_as_gstabs_flag=no
8433 if test $in_tree_gas = yes ; then
8434 if test $gcc_cv_gas_major_version -eq 2 \
8435 && test $gcc_cv_gas_minor_version -ge 11 \
8436 || test $gcc_cv_gas_major_version -gt 2 ; then
8439 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8440 && test x"$insn" != x ; then
8441 gcc_cv_as_gstabs_flag="yes"
8447 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8448 echo '' > conftest.s
8449 # ??? This fails with non-gnu grep.
8450 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8451 gcc_cv_as_gstabs_flag="yes"
8453 rm -f conftest.s conftest.o
8455 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8456 cat >> confdefs.h <<\EOF
8457 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8461 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8463 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8464 echo "configure:8465: checking linker read-only and read-write section mixing" >&5
8465 gcc_cv_ld_ro_rw_mix=unknown
8466 if test $in_tree_ld = yes ; then
8467 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
8468 gcc_cv_ld_ro_rw_mix=read-write
8470 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8471 echo '.section myfoosect, "a"' > conftest1.s
8472 echo '.section myfoosect, "aw"' > conftest2.s
8473 echo '.byte 1' >> conftest2.s
8474 echo '.section myfoosect, "a"' > conftest3.s
8475 echo '.byte 0' >> conftest3.s
8476 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8477 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8478 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8479 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8480 conftest2.o conftest3.o > /dev/null 2>&1; then
8481 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8482 | sed -e '/myfoosect/!d' -e N`
8483 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8484 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8485 gcc_cv_ld_ro_rw_mix=read-only
8486 else
8487 gcc_cv_ld_ro_rw_mix=read-write
8491 rm -f conftest.* conftest[123].*
8493 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8494 cat >> confdefs.h <<\EOF
8495 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8499 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8501 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8502 echo "configure:8503: checking linker PT_GNU_EH_FRAME support" >&5
8503 gcc_cv_ld_eh_frame_hdr=no
8504 if test $in_tree_ld = yes ; then
8505 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
8506 gcc_cv_ld_eh_frame_hdr=yes
8508 elif test x$gcc_cv_ld != x; then
8509 # Check if linker supports --eh-frame-hdr option
8510 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8511 gcc_cv_ld_eh_frame_hdr=yes
8514 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8515 cat >> confdefs.h <<\EOF
8516 #define HAVE_LD_EH_FRAME_HDR 1
8520 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8522 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
8523 echo "configure:8524: checking linker position independent executable support" >&5
8524 gcc_cv_ld_pie=no
8525 if test $in_tree_ld = yes ; then
8526 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8527 gcc_cv_ld_pie=yes
8529 elif test x$gcc_cv_ld != x; then
8530 # Check if linker supports -pie option
8531 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
8532 gcc_cv_ld_pie=yes
8535 if test x"$gcc_cv_ld_pie" = xyes; then
8536 cat >> confdefs.h <<\EOF
8537 #define HAVE_LD_PIE 1
8541 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
8543 # Miscellaneous target-specific checks.
8544 case "$target" in
8545 mips*-*-*)
8546 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8547 echo "configure:8548: checking whether libgloss uses STARTUP directives consistently" >&5
8548 gcc_cv_mips_libgloss_startup=no
8549 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8550 if test "x$exec_prefix" = xNONE; then
8551 if test "x$prefix" = xNONE; then
8552 test_prefix=/usr/local
8553 else
8554 test_prefix=$prefix
8556 else
8557 test_prefix=$exec_prefix
8559 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8561 if grep '^STARTUP' $f > /dev/null 2>&1; then
8562 gcc_cv_mips_libgloss_startup=yes
8563 break
8565 done
8566 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8567 cat >> confdefs.h <<\EOF
8568 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8572 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8574 echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
8575 echo "configure:8576: checking whether the assembler has explicit relocation support" >&5
8576 if test x$gcc_cv_mips_explicit_relocs = x; then
8577 gcc_cv_mips_explicit_relocs=no
8578 if test $in_tree_gas = yes; then
8579 if test $gcc_cv_gas_major_version -eq 2 \
8580 && test $gcc_cv_gas_minor_version -ge 14 \
8581 || test $gcc_cv_gas_major_version -gt 2 ; then
8584 gcc_cv_mips_explicit_relocs=yes
8589 elif test x$gcc_cv_as != x; then
8590 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
8591 if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
8592 gcc_cv_mips_explicit_relocs=yes
8594 rm -f conftest.s conftest.o
8597 if test $gcc_cv_mips_explicit_relocs = yes; then
8598 test x$target_cpu_default != x || target_cpu_default=0
8599 target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
8601 echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
8603 esac
8605 if test x$with_sysroot = x && test x$host = x$target \
8606 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8607 cat >> confdefs.h <<EOF
8608 #define PREFIX_INCLUDE_DIR "$prefix/include"
8613 # Figure out what language subdirectories are present.
8614 # Look if the user specified --enable-languages="..."; if not, use
8615 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8616 # go away some day.
8617 # NB: embedded tabs in this IF block -- do not untabify
8618 if test x"${enable_languages+set}" != xset; then
8619 if test x"${LANGUAGES+set}" = xset; then
8620 enable_languages="${LANGUAGES}"
8621 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8623 else
8624 enable_languages=all
8626 else
8627 if test x"${enable_languages}" = x \
8628 || test x"${enable_languages}" = xyes;
8629 then
8630 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8633 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8635 # First scan to see if an enabled language requires some other language.
8636 # We assume that a given config-lang.in will list all the language
8637 # front ends it requires, even if some are required indirectly.
8638 for lang in ${srcdir}/*/config-lang.in ..
8640 case $lang in
8643 # The odd quoting in the next line works around
8644 # an apparent bug in bash 1.12 on linux.
8645 ${srcdir}/[*]/config-lang.in)
8648 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8649 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8650 for other in $this_lang_requires
8652 case ,${enable_languages}, in
8653 *,$other,*)
8655 *,all,*)
8657 *,$lang_alias,*)
8658 enable_languages="$enable_languages,$other"
8660 esac
8661 done
8663 esac
8664 done
8666 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8667 found_languages=
8668 subdirs=
8669 for lang in ${srcdir}/*/config-lang.in ..
8671 case $lang in
8672 ..) ;;
8673 # The odd quoting in the next line works around
8674 # an apparent bug in bash 1.12 on linux.
8675 ${srcdir}/[*]/config-lang.in) ;;
8677 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8678 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8679 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8680 if test "x$lang_alias" = x
8681 then
8682 echo "$lang doesn't set \$language." 1>&2
8683 exit 1
8685 case ${build_by_default},${enable_languages}, in
8686 *,$lang_alias,*) add_this_lang=yes ;;
8687 no,*) add_this_lang=no ;;
8688 *,all,*) add_this_lang=yes ;;
8689 *) add_this_lang=no ;;
8690 esac
8691 found_languages="${found_languages} ${lang_alias}"
8692 if test x"${add_this_lang}" = xyes; then
8693 case $lang in
8694 ${srcdir}/ada/config-lang.in)
8695 if test x$have_gnat = xyes ; then
8696 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8700 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8702 esac
8705 esac
8706 done
8708 missing_languages=
8709 for expected_language in ${expected_languages} ..
8711 if test "${expected_language}" != ..; then
8712 missing_language="${expected_language}"
8713 if test "${expected_language}" = "c" \
8714 || test "${expected_language}" = "all"; then
8715 missing_language=
8717 for found_language in ${found_languages} ..
8719 if test "${found_language}" != ..; then
8720 if test "${expected_language}" = "${found_language}"; then
8721 missing_language=
8724 done
8725 if test "x${missing_language}" != x; then
8726 missing_languages="${missing_languages} ${missing_language}"
8729 done
8731 if test "x$missing_languages" != x; then
8732 { echo "configure: error:
8733 The following requested languages were not found:${missing_languages}
8734 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8737 # Make gthr-default.h if we have a thread file.
8738 gthread_flags=
8739 if test $thread_file != single; then
8740 rm -f gthr-default.h
8741 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8742 gthread_flags=-DHAVE_GTHR_DEFAULT
8746 # Find out what GC implementation we want, or may, use.
8747 # Check whether --with-gc or --without-gc was given.
8748 if test "${with_gc+set}" = set; then
8749 withval="$with_gc"
8750 case "$withval" in
8751 simple | page)
8752 GGC=ggc-$withval
8755 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8757 esac
8758 else
8759 GGC=ggc-page
8763 echo "Using $GGC for garbage collection."
8765 # Use the system's zlib library.
8766 zlibdir=-L../zlib
8767 zlibinc="-I\$(srcdir)/../zlib"
8768 # Check whether --with-system-zlib or --without-system-zlib was given.
8769 if test "${with_system_zlib+set}" = set; then
8770 withval="$with_system_zlib"
8771 zlibdir=
8772 zlibinc=
8780 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8781 echo "configure:8782: checking whether to enable maintainer-specific portions of Makefiles" >&5
8782 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8783 if test "${enable_maintainer_mode+set}" = set; then
8784 enableval="$enable_maintainer_mode"
8785 maintainer_mode=$enableval
8786 else
8787 maintainer_mode=no
8791 echo "$ac_t""$maintainer_mode" 1>&6
8793 if test "$maintainer_mode" = "yes"; then
8794 MAINT=''
8795 else
8796 MAINT='#'
8799 # Make empty files to contain the specs and options for each language.
8800 # Then add #include lines to for a compiler that has specs and/or options.
8802 lang_opt_files=
8803 lang_specs_files=
8804 lang_options_files=
8805 lang_tree_files=
8806 for subdir in . $subdirs
8808 if test -f $srcdir/$subdir/lang.opt; then
8809 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
8811 if test -f $srcdir/$subdir/lang-specs.h; then
8812 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8814 if test -f $srcdir/$subdir/lang-options.h; then
8815 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8817 if test -f $srcdir/$subdir/$subdir-tree.def; then
8818 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8820 done
8822 # These (without "all_") are set in each config-lang.in.
8823 # `language' must be a single word so is spelled singularly.
8824 all_languages=
8825 all_boot_languages=
8826 all_compilers=
8827 all_stagestuff=
8828 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8829 # List of language makefile fragments.
8830 all_lang_makefiles=
8831 # Files for gengtype
8832 all_gtfiles="$target_gtfiles"
8833 # Files for gengtype with language
8834 all_gtfiles_files_langs=
8835 all_gtfiles_files_files=
8837 # Add the language fragments.
8838 # Languages are added via two mechanisms. Some information must be
8839 # recorded in makefile variables, these are defined in config-lang.in.
8840 # We accumulate them and plug them into the main Makefile.
8841 # The other mechanism is a set of hooks for each of the main targets
8842 # like `clean', `install', etc.
8844 language_fragments="Make-lang"
8845 language_hooks="Make-hooks"
8847 for s in .. $subdirs
8849 if test $s != ".."
8850 then
8851 language=
8852 boot_language=
8853 compilers=
8854 stagestuff=
8855 outputs=
8856 gtfiles=
8857 . ${srcdir}/$s/config-lang.in
8858 if test "x$language" = x
8859 then
8860 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8861 exit 1
8863 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8864 if test -f ${srcdir}/$s/Makefile.in
8865 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8867 all_languages="$all_languages $language"
8868 if test "x$boot_language" = xyes
8869 then
8870 all_boot_languages="$all_boot_languages $language"
8872 all_compilers="$all_compilers $compilers"
8873 all_stagestuff="$all_stagestuff $stagestuff"
8874 all_outputs="$all_outputs $outputs"
8875 all_gtfiles="$all_gtfiles $gtfiles"
8876 for f in .. $gtfiles
8878 if test $f != ".."
8879 then
8880 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8881 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8883 done
8885 done
8887 # Pick up gtfiles for c
8888 gtfiles=
8889 s="c"
8890 . ${srcdir}/c-config-lang.in
8891 all_gtfiles="$all_gtfiles $gtfiles"
8892 for f in .. $gtfiles
8894 if test $f != ".."
8895 then
8896 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8897 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8899 done
8901 check_languages=
8902 for language in .. $all_languages
8904 if test $language != ".."
8905 then
8906 check_languages="$check_languages check-$language"
8908 done
8910 # Since we can't use `::' targets, we link each language in
8911 # with a set of hooks, reached indirectly via lang.${target}.
8913 rm -f Make-hooks
8914 touch Make-hooks
8915 target_list="all.build all.cross start.encap rest.encap tags \
8916 info dvi generated-manpages \
8917 install-normal install-common install-info install-man \
8918 uninstall \
8919 mostlyclean clean distclean extraclean maintainer-clean \
8920 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
8921 for t in $target_list
8924 for lang in .. $all_languages
8926 if test $lang != ".."; then
8927 x="$x $lang.$t"
8929 done
8930 echo "lang.$t: $x" >> Make-hooks
8931 done
8933 # Create .gdbinit.
8935 echo "dir ." > .gdbinit
8936 echo "dir ${srcdir}" >> .gdbinit
8937 if test x$gdb_needs_out_file_path = xyes
8938 then
8939 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8941 if test "x$subdirs" != x; then
8942 for s in $subdirs
8944 echo "dir ${srcdir}/$s" >> .gdbinit
8945 done
8947 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8949 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8950 # absolute path for gcc_tooldir based on inserting the number of up-directory
8951 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8952 # $(libsubdir)/@(unlibsubdir) based path.
8953 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8954 # make and thus we'd get different behavior depending on where we built the
8955 # sources.
8956 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8957 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8958 else
8959 # An explanation of the sed strings:
8960 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8961 # -e 's|/$||' match a trailing forward slash and eliminates it
8962 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8963 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8965 # (*) Note this pattern overwrites the first character of the string
8966 # with a forward slash if one is not already present. This is not a
8967 # problem because the exact names of the sub-directories concerned is
8968 # unimportant, just the number of them matters.
8970 # The practical upshot of these patterns is like this:
8972 # prefix exec_prefix result
8973 # ------ ----------- ------
8974 # /foo /foo/bar ../
8975 # /foo/ /foo/bar ../
8976 # /foo /foo/bar/ ../
8977 # /foo/ /foo/bar/ ../
8978 # /foo /foo/bar/ugg ../../
8980 dollar='$$'
8981 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8986 # Find a directory in which to install a shared libgcc.
8988 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8989 if test "${enable_version_specific_runtime_libs+set}" = set; then
8990 enableval="$enable_version_specific_runtime_libs"
8995 # Check whether --with-slibdir or --without-slibdir was given.
8996 if test "${with_slibdir+set}" = set; then
8997 withval="$with_slibdir"
8998 slibdir="$with_slibdir"
8999 else
9000 if test "${enable_version_specific_runtime_libs+set}" = set; then
9001 slibdir='$(libsubdir)'
9002 elif test "$host" != "$target"; then
9003 slibdir='$(build_tooldir)/lib'
9004 else
9005 slibdir='$(libdir)'
9011 objdir=`${PWDCMD-pwd}`
9014 # Process the language and host/target makefile fragments.
9015 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9017 # Substitute configuration variables
9088 # Echo that links are built
9089 if test x$host = x$target
9090 then
9091 str1="native "
9092 else
9093 str1="cross-"
9094 str2=" from $host"
9097 if test x$host != x$build
9098 then
9099 str3=" on a $build system"
9102 if test "x$str2" != x || test "x$str3" != x
9103 then
9104 str4=
9107 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9109 if test "x$str2" != x || test "x$str3" != x
9110 then
9111 echo " ${str2}${str3}." 1>&2
9114 # Configure the subdirectories
9115 # AC_CONFIG_SUBDIRS($subdirs)
9117 # Create the Makefile
9118 # and configure language subdirectories
9119 trap '' 1 2 15
9120 cat > confcache <<\EOF
9121 # This file is a shell script that caches the results of configure
9122 # tests run on this system so they can be shared between configure
9123 # scripts and configure runs. It is not useful on other systems.
9124 # If it contains results you don't want to keep, you may remove or edit it.
9126 # By default, configure uses ./config.cache as the cache file,
9127 # creating it if it does not exist already. You can give configure
9128 # the --cache-file=FILE option to use a different cache file; that is
9129 # what configure does when it calls configure scripts in
9130 # subdirectories, so they share the cache.
9131 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9132 # config.status only pays attention to the cache file if you give it the
9133 # --recheck option to rerun configure.
9136 # The following way of writing the cache mishandles newlines in values,
9137 # but we know of no workaround that is simple, portable, and efficient.
9138 # So, don't put newlines in cache variables' values.
9139 # Ultrix sh set writes to stderr and can't be redirected directly,
9140 # and sets the high bit in the cache file unless we assign to the vars.
9141 (set) 2>&1 |
9142 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9143 *ac_space=\ *)
9144 # `set' does not quote correctly, so add quotes (double-quote substitution
9145 # turns \\\\ into \\, and sed turns \\ into \).
9146 sed -n \
9147 -e "s/'/'\\\\''/g" \
9148 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9151 # `set' quotes correctly as required by POSIX, so do not add quotes.
9152 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9154 esac >> confcache
9155 if cmp -s $cache_file confcache; then
9157 else
9158 if test -w $cache_file; then
9159 echo "updating cache $cache_file"
9160 cat confcache > $cache_file
9161 else
9162 echo "not updating unwritable cache $cache_file"
9165 rm -f confcache
9167 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9169 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9170 # Let make expand exec_prefix.
9171 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9173 # Any assignment to VPATH causes Sun make to only execute
9174 # the first set of double-colon rules, so remove it if not needed.
9175 # If there is a colon in the path, we need to keep it.
9176 if test "x$srcdir" = x.; then
9177 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9180 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9182 DEFS=-DHAVE_CONFIG_H
9184 # Without the "./", some shells look in PATH for config.status.
9185 : ${CONFIG_STATUS=./config.status}
9187 echo creating $CONFIG_STATUS
9188 rm -f $CONFIG_STATUS
9189 cat > $CONFIG_STATUS <<EOF
9190 #! /bin/sh
9191 # Generated automatically by configure.
9192 # Run this file to recreate the current configuration.
9193 # This directory was configured as follows,
9194 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9196 # $0 $ac_configure_args
9198 # Compiler output produced by configure, useful for debugging
9199 # configure, is in ./config.log if it exists.
9201 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9202 for ac_option
9204 case "\$ac_option" in
9205 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9206 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9207 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9208 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9209 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9210 exit 0 ;;
9211 -help | --help | --hel | --he | --h)
9212 echo "\$ac_cs_usage"; exit 0 ;;
9213 *) echo "\$ac_cs_usage"; exit 1 ;;
9214 esac
9215 done
9217 ac_given_srcdir=$srcdir
9219 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9221 cat >> $CONFIG_STATUS <<EOF
9223 # Protect against being on the right side of a sed subst in config.status.
9224 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9225 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9226 $ac_vpsub
9227 $extrasub
9228 s%@SHELL@%$SHELL%g
9229 s%@CFLAGS@%$CFLAGS%g
9230 s%@CPPFLAGS@%$CPPFLAGS%g
9231 s%@CXXFLAGS@%$CXXFLAGS%g
9232 s%@FFLAGS@%$FFLAGS%g
9233 s%@DEFS@%$DEFS%g
9234 s%@LDFLAGS@%$LDFLAGS%g
9235 s%@LIBS@%$LIBS%g
9236 s%@exec_prefix@%$exec_prefix%g
9237 s%@prefix@%$prefix%g
9238 s%@program_transform_name@%$program_transform_name%g
9239 s%@bindir@%$bindir%g
9240 s%@sbindir@%$sbindir%g
9241 s%@libexecdir@%$libexecdir%g
9242 s%@datadir@%$datadir%g
9243 s%@sysconfdir@%$sysconfdir%g
9244 s%@sharedstatedir@%$sharedstatedir%g
9245 s%@localstatedir@%$localstatedir%g
9246 s%@libdir@%$libdir%g
9247 s%@includedir@%$includedir%g
9248 s%@oldincludedir@%$oldincludedir%g
9249 s%@infodir@%$infodir%g
9250 s%@mandir@%$mandir%g
9251 s%@host@%$host%g
9252 s%@host_alias@%$host_alias%g
9253 s%@host_cpu@%$host_cpu%g
9254 s%@host_vendor@%$host_vendor%g
9255 s%@host_os@%$host_os%g
9256 s%@target@%$target%g
9257 s%@target_alias@%$target_alias%g
9258 s%@target_cpu@%$target_cpu%g
9259 s%@target_vendor@%$target_vendor%g
9260 s%@target_os@%$target_os%g
9261 s%@build@%$build%g
9262 s%@build_alias@%$build_alias%g
9263 s%@build_cpu@%$build_cpu%g
9264 s%@build_vendor@%$build_vendor%g
9265 s%@build_os@%$build_os%g
9266 s%@build_subdir@%$build_subdir%g
9267 s%@host_subdir@%$host_subdir%g
9268 s%@target_subdir@%$target_subdir%g
9269 s%@CC@%$CC%g
9270 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9271 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9272 s%@CPP@%$CPP%g
9273 s%@GNATBIND@%$GNATBIND%g
9274 s%@ADAC@%$ADAC%g
9275 s%@strict1_warn@%$strict1_warn%g
9276 s%@warn_cflags@%$warn_cflags%g
9277 s%@WERROR@%$WERROR%g
9278 s%@nocommon_flag@%$nocommon_flag%g
9279 s%@valgrind_path@%$valgrind_path%g
9280 s%@valgrind_path_defines@%$valgrind_path_defines%g
9281 s%@valgrind_command@%$valgrind_command%g
9282 s%@coverage_flags@%$coverage_flags%g
9283 s%@enable_multilib@%$enable_multilib%g
9284 s%@enable_shared@%$enable_shared%g
9285 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9286 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9287 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9288 s%@SET_MAKE@%$SET_MAKE%g
9289 s%@AWK@%$AWK%g
9290 s%@LN@%$LN%g
9291 s%@LN_S@%$LN_S%g
9292 s%@RANLIB@%$RANLIB%g
9293 s%@INSTALL@%$INSTALL%g
9294 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9295 s%@INSTALL_DATA@%$INSTALL_DATA%g
9296 s%@have_mktemp_command@%$have_mktemp_command%g
9297 s%@MAKEINFO@%$MAKEINFO%g
9298 s%@BUILD_INFO@%$BUILD_INFO%g
9299 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9300 s%@make_compare_target@%$make_compare_target%g
9301 s%@FLEX@%$FLEX%g
9302 s%@BISON@%$BISON%g
9303 s%@stage1_cflags@%$stage1_cflags%g
9304 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9305 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9306 s%@LDEXP_LIB@%$LDEXP_LIB%g
9307 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9308 s%@LIBICONV@%$LIBICONV%g
9309 s%@manext@%$manext%g
9310 s%@objext@%$objext%g
9311 s%@extra_modes_file@%$extra_modes_file%g
9312 s%@FORBUILD@%$FORBUILD%g
9313 s%@PACKAGE@%$PACKAGE%g
9314 s%@VERSION@%$VERSION%g
9315 s%@ALLOCA@%$ALLOCA%g
9316 s%@GLIBC21@%$GLIBC21%g
9317 s%@USE_NLS@%$USE_NLS%g
9318 s%@MSGFMT@%$MSGFMT%g
9319 s%@GMSGFMT@%$GMSGFMT%g
9320 s%@XGETTEXT@%$XGETTEXT%g
9321 s%@INTLBISON@%$INTLBISON%g
9322 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9323 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9324 s%@CATALOGS@%$CATALOGS%g
9325 s%@CATOBJEXT@%$CATOBJEXT%g
9326 s%@INTLLIBS@%$INTLLIBS%g
9327 s%@INTLDEPS@%$INTLDEPS%g
9328 s%@INTLOBJS@%$INTLOBJS%g
9329 s%@POSUB@%$POSUB%g
9330 s%@DATADIRNAME@%$DATADIRNAME%g
9331 s%@INSTOBJEXT@%$INSTOBJEXT%g
9332 s%@GENCAT@%$GENCAT%g
9333 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9334 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9335 s%@CROSS@%$CROSS%g
9336 s%@ALL@%$ALL%g
9337 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9338 s%@inhibit_libc@%$inhibit_libc%g
9339 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9340 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9341 s%@BUILD_CC@%$BUILD_CC%g
9342 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9343 s%@STMP_FIXINC@%$STMP_FIXINC%g
9344 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9345 s%@libgcc_visibility@%$libgcc_visibility%g
9346 s%@gthread_flags@%$gthread_flags%g
9347 s%@GGC@%$GGC%g
9348 s%@zlibdir@%$zlibdir%g
9349 s%@zlibinc@%$zlibinc%g
9350 s%@MAINT@%$MAINT%g
9351 s%@gcc_tooldir@%$gcc_tooldir%g
9352 s%@dollar@%$dollar%g
9353 s%@slibdir@%$slibdir%g
9354 s%@objdir@%$objdir%g
9355 s%@subdirs@%$subdirs%g
9356 s%@srcdir@%$srcdir%g
9357 s%@all_boot_languages@%$all_boot_languages%g
9358 s%@all_compilers@%$all_compilers%g
9359 s%@all_gtfiles@%$all_gtfiles%g
9360 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9361 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9362 s%@all_lang_makefiles@%$all_lang_makefiles%g
9363 s%@all_languages@%$all_languages%g
9364 s%@all_stagestuff@%$all_stagestuff%g
9365 s%@build_exeext@%$build_exeext%g
9366 s%@build_install_headers_dir@%$build_install_headers_dir%g
9367 s%@build_xm_file_list@%$build_xm_file_list%g
9368 s%@build_xm_file@%$build_xm_file%g
9369 s%@build_xm_defines@%$build_xm_defines%g
9370 s%@check_languages@%$check_languages%g
9371 s%@cc_set_by_configure@%$cc_set_by_configure%g
9372 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9373 s%@cpp_install_dir@%$cpp_install_dir%g
9374 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9375 s%@dep_tmake_file@%$dep_tmake_file%g
9376 s%@extra_headers_list@%$extra_headers_list%g
9377 s%@extra_objs@%$extra_objs%g
9378 s%@extra_parts@%$extra_parts%g
9379 s%@extra_passes@%$extra_passes%g
9380 s%@extra_programs@%$extra_programs%g
9381 s%@float_h_file@%$float_h_file%g
9382 s%@gcc_config_arguments@%$gcc_config_arguments%g
9383 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9384 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9385 s%@gcc_version@%$gcc_version%g
9386 s%@gcc_version_full@%$gcc_version_full%g
9387 s%@gcc_version_trigger@%$gcc_version_trigger%g
9388 s%@host_exeext@%$host_exeext%g
9389 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9390 s%@host_xm_file_list@%$host_xm_file_list%g
9391 s%@host_xm_file@%$host_xm_file%g
9392 s%@host_xm_defines@%$host_xm_defines%g
9393 s%@out_host_hook_obj@%$out_host_hook_obj%g
9394 s%@install@%$install%g
9395 s%@lang_opt_files@%$lang_opt_files%g
9396 s%@lang_options_files@%$lang_options_files%g
9397 s%@lang_specs_files@%$lang_specs_files%g
9398 s%@lang_tree_files@%$lang_tree_files%g
9399 s%@local_prefix@%$local_prefix%g
9400 s%@md_file@%$md_file%g
9401 s%@objc_boehm_gc@%$objc_boehm_gc%g
9402 s%@out_file@%$out_file%g
9403 s%@out_object_file@%$out_object_file%g
9404 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9405 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9406 s%@symbolic_link@%$symbolic_link%g
9407 s%@thread_file@%$thread_file%g
9408 s%@tm_file_list@%$tm_file_list%g
9409 s%@tm_file@%$tm_file%g
9410 s%@tm_defines@%$tm_defines%g
9411 s%@tm_p_file_list@%$tm_p_file_list%g
9412 s%@tm_p_file@%$tm_p_file%g
9413 s%@xm_file@%$xm_file%g
9414 s%@xm_defines@%$xm_defines%g
9415 s%@c_target_objs@%$c_target_objs%g
9416 s%@cxx_target_objs@%$cxx_target_objs%g
9417 s%@target_cpu_default@%$target_cpu_default%g
9418 /@target_overrides@/r $target_overrides
9419 s%@target_overrides@%%g
9420 /@host_overrides@/r $host_overrides
9421 s%@host_overrides@%%g
9422 /@language_fragments@/r $language_fragments
9423 s%@language_fragments@%%g
9424 /@language_hooks@/r $language_hooks
9425 s%@language_hooks@%%g
9427 CEOF
9430 cat >> $CONFIG_STATUS <<\EOF
9432 # Split the substitutions into bite-sized pieces for seds with
9433 # small command number limits, like on Digital OSF/1 and HP-UX.
9434 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9435 ac_file=1 # Number of current file.
9436 ac_beg=1 # First line for current file.
9437 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9438 ac_more_lines=:
9439 ac_sed_cmds=""
9440 while $ac_more_lines; do
9441 if test $ac_beg -gt 1; then
9442 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9443 else
9444 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9446 if test ! -s conftest.s$ac_file; then
9447 ac_more_lines=false
9448 rm -f conftest.s$ac_file
9449 else
9450 if test -z "$ac_sed_cmds"; then
9451 ac_sed_cmds="sed -f conftest.s$ac_file"
9452 else
9453 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9455 ac_file=`expr $ac_file + 1`
9456 ac_beg=$ac_end
9457 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9459 done
9460 if test -z "$ac_sed_cmds"; then
9461 ac_sed_cmds=cat
9465 cat >> $CONFIG_STATUS <<EOF
9467 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9469 cat >> $CONFIG_STATUS <<\EOF
9470 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9471 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9472 case "$ac_file" in
9473 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9474 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9475 *) ac_file_in="${ac_file}.in" ;;
9476 esac
9478 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9480 # Remove last slash and all that follows it. Not all systems have dirname.
9481 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9482 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9483 # The file is in a subdirectory.
9484 test ! -d "$ac_dir" && mkdir "$ac_dir"
9485 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9486 # A "../" for each directory in $ac_dir_suffix.
9487 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9488 else
9489 ac_dir_suffix= ac_dots=
9492 case "$ac_given_srcdir" in
9493 .) srcdir=.
9494 if test -z "$ac_dots"; then top_srcdir=.
9495 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9496 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9497 *) # Relative path.
9498 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9499 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9500 esac
9503 echo creating "$ac_file"
9504 rm -f "$ac_file"
9505 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9506 case "$ac_file" in
9507 *Makefile*) ac_comsub="1i\\
9508 # $configure_input" ;;
9509 *) ac_comsub= ;;
9510 esac
9512 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9513 sed -e "$ac_comsub
9514 s%@configure_input@%$configure_input%g
9515 s%@srcdir@%$srcdir%g
9516 s%@top_srcdir@%$top_srcdir%g
9517 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9518 fi; done
9519 rm -f conftest.s*
9521 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9522 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9524 # ac_d sets the value in "#define NAME VALUE" lines.
9525 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9526 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9527 ac_dC='\3'
9528 ac_dD='%g'
9529 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9530 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9531 ac_uB='\([ ]\)%\1#\2define\3'
9532 ac_uC=' '
9533 ac_uD='\4%g'
9534 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9535 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9536 ac_eB='$%\1#\2define\3'
9537 ac_eC=' '
9538 ac_eD='%g'
9540 if test "${CONFIG_HEADERS+set}" != set; then
9542 cat >> $CONFIG_STATUS <<EOF
9543 CONFIG_HEADERS="auto-host.h:config.in"
9545 cat >> $CONFIG_STATUS <<\EOF
9547 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9548 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9549 case "$ac_file" in
9550 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9551 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9552 *) ac_file_in="${ac_file}.in" ;;
9553 esac
9555 echo creating $ac_file
9557 rm -f conftest.frag conftest.in conftest.out
9558 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9559 cat $ac_file_inputs > conftest.in
9563 # Transform confdefs.h into a sed script conftest.vals that substitutes
9564 # the proper values into config.h.in to produce config.h. And first:
9565 # Protect against being on the right side of a sed subst in config.status.
9566 # Protect against being in an unquoted here document in config.status.
9567 rm -f conftest.vals
9568 cat > conftest.hdr <<\EOF
9569 s/[\\&%]/\\&/g
9570 s%[\\$`]%\\&%g
9571 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9572 s%ac_d%ac_u%gp
9573 s%ac_u%ac_e%gp
9575 sed -n -f conftest.hdr confdefs.h > conftest.vals
9576 rm -f conftest.hdr
9578 # This sed command replaces #undef with comments. This is necessary, for
9579 # example, in the case of _POSIX_SOURCE, which is predefined and required
9580 # on some systems where configure will not decide to define it.
9581 cat >> conftest.vals <<\EOF
9582 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9585 # Break up conftest.vals because some shells have a limit on
9586 # the size of here documents, and old seds have small limits too.
9588 rm -f conftest.tail
9589 while :
9591 ac_lines=`grep -c . conftest.vals`
9592 # grep -c gives empty output for an empty file on some AIX systems.
9593 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9594 # Write a limited-size here document to conftest.frag.
9595 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9596 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9597 echo 'CEOF
9598 sed -f conftest.frag conftest.in > conftest.out
9599 rm -f conftest.in
9600 mv conftest.out conftest.in
9601 ' >> $CONFIG_STATUS
9602 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9603 rm -f conftest.vals
9604 mv conftest.tail conftest.vals
9605 done
9606 rm -f conftest.vals
9608 cat >> $CONFIG_STATUS <<\EOF
9609 rm -f conftest.frag conftest.h
9610 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9611 cat conftest.in >> conftest.h
9612 rm -f conftest.in
9613 if cmp -s $ac_file conftest.h 2>/dev/null; then
9614 echo "$ac_file is unchanged"
9615 rm -f conftest.h
9616 else
9617 # Remove last slash and all that follows it. Not all systems have dirname.
9618 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9619 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9620 # The file is in a subdirectory.
9621 test ! -d "$ac_dir" && mkdir "$ac_dir"
9623 rm -f $ac_file
9624 mv conftest.h $ac_file
9626 fi; done
9629 cat >> $CONFIG_STATUS <<EOF
9631 subdirs='$subdirs'
9632 symbolic_link='$symbolic_link'
9635 cat >> $CONFIG_STATUS <<\EOF
9636 for ac_file in $CONFIG_FILES; do
9637 # Support "outfile[:infile[:infile...]]"
9638 case "$ac_file" in
9639 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9640 esac
9641 # PO directories have a Makefile.in generated from Makefile.in.in.
9642 case "$ac_file" in */Makefile.in)
9643 # Adjust a relative srcdir.
9644 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9645 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9646 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9647 # In autoconf-2.13 it is called $ac_given_srcdir.
9648 # In autoconf-2.50 it is called $srcdir.
9649 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9650 case "$ac_given_srcdir" in
9651 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9652 /*) top_srcdir="$ac_given_srcdir" ;;
9653 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9654 esac
9655 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9656 rm -f "$ac_dir/POTFILES"
9657 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9658 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9659 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9660 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9663 esac
9664 done
9666 case x$CONFIG_HEADERS in
9667 xauto-host.h:config.in)
9668 echo > cstamp-h ;;
9669 esac
9670 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9671 # bootstrapping and the installation procedure can still use
9672 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9673 # FLAGS_TO_PASS has been modified to solve the problem there.
9674 # This is virtually a duplicate of what happens in configure.lang; we do
9675 # an extra check to make sure this only happens if ln -s can be used.
9676 if test "$symbolic_link" = "ln -s"; then
9677 for d in .. ${subdirs} fixinc ; do
9678 if test $d != ..; then
9679 STARTDIR=`${PWDCMD-pwd}`
9680 cd $d
9681 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
9683 rm -f $t
9684 $symbolic_link ../$t $t 2>/dev/null
9685 done
9686 cd $STARTDIR
9688 done
9689 else true ; fi
9690 # Avoid having to add intl to our include paths.
9691 if test -f intl/libintl.h; then
9692 echo creating libintl.h
9693 echo '#include "intl/libintl.h"' >libintl.h
9696 exit 0
9698 chmod +x $CONFIG_STATUS
9699 rm -fr confdefs* $ac_clean_files
9700 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1