(ARM Built-in Functions): New node. Document ARM builtin functions for iWMMXt
[official-gcc.git] / gcc / configure
blob929509dd98ed01dddd83afec8b09e120e83c317a
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
1416 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1417 echo "configure:1418: checking for long long int" >&5
1418 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1419 echo $ac_n "(cached) $ac_c" 1>&6
1420 else
1421 cat > conftest.$ac_ext <<EOF
1422 #line 1423 "configure"
1423 #include "confdefs.h"
1425 int main() {
1426 long long int i;
1427 ; return 0; }
1429 if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1430 rm -rf conftest*
1431 ac_cv_c_long_long=yes
1432 else
1433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
1435 rm -rf conftest*
1436 ac_cv_c_long_long=no
1438 rm -f conftest*
1441 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1442 if test $ac_cv_c_long_long = yes; then
1443 cat >> confdefs.h <<\EOF
1444 #define HAVE_LONG_LONG 1
1448 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1449 echo "configure:1450: checking for __int64" >&5
1450 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1451 echo $ac_n "(cached) $ac_c" 1>&6
1452 else
1453 cat > conftest.$ac_ext <<EOF
1454 #line 1455 "configure"
1455 #include "confdefs.h"
1457 int main() {
1458 __int64 i;
1459 ; return 0; }
1461 if { (eval echo configure:1462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1462 rm -rf conftest*
1463 ac_cv_c___int64=yes
1464 else
1465 echo "configure: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1467 rm -rf conftest*
1468 ac_cv_c___int64=no
1470 rm -f conftest*
1473 echo "$ac_t""$ac_cv_c___int64" 1>&6
1474 if test $ac_cv_c___int64 = yes; then
1475 cat >> confdefs.h <<\EOF
1476 #define HAVE___INT64 1
1481 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1482 echo "configure:1483: checking for built-in _Bool" >&5
1483 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1484 echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486 cat > conftest.$ac_ext <<EOF
1487 #line 1488 "configure"
1488 #include "confdefs.h"
1490 int main() {
1491 _Bool foo;
1492 ; return 0; }
1494 if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1495 rm -rf conftest*
1496 gcc_cv_c__bool=yes
1497 else
1498 echo "configure: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1500 rm -rf conftest*
1501 gcc_cv_c__bool=no
1503 rm -f conftest*
1507 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1508 if test $gcc_cv_c__bool = yes; then
1509 cat >> confdefs.h <<\EOF
1510 #define HAVE__BOOL 1
1516 # sizeof(char) is 1 by definition.
1517 echo $ac_n "checking size of short""... $ac_c" 1>&6
1518 echo "configure:1519: checking size of short" >&5
1519 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1521 else
1522 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1523 cat > conftest.$ac_ext <<EOF
1524 #line 1525 "configure"
1525 #include "confdefs.h"
1526 #include "confdefs.h"
1527 #include <sys/types.h>
1530 int main() {
1531 switch (0) case 0: case (sizeof (short) == $ac_size):;
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_sizeof_short=$ac_size
1537 else
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1541 rm -f conftest*
1542 if test x$ac_cv_sizeof_short != x ; then break; fi
1543 done
1547 if test x$ac_cv_sizeof_short = x ; then
1548 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1550 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1551 cat >> confdefs.h <<EOF
1552 #define SIZEOF_SHORT $ac_cv_sizeof_short
1556 echo $ac_n "checking size of int""... $ac_c" 1>&6
1557 echo "configure:1558: checking size of int" >&5
1558 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1559 echo $ac_n "(cached) $ac_c" 1>&6
1560 else
1561 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1562 cat > conftest.$ac_ext <<EOF
1563 #line 1564 "configure"
1564 #include "confdefs.h"
1565 #include "confdefs.h"
1566 #include <sys/types.h>
1569 int main() {
1570 switch (0) case 0: case (sizeof (int) == $ac_size):;
1571 ; return 0; }
1573 if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1574 rm -rf conftest*
1575 ac_cv_sizeof_int=$ac_size
1576 else
1577 echo "configure: failed program was:" >&5
1578 cat conftest.$ac_ext >&5
1580 rm -f conftest*
1581 if test x$ac_cv_sizeof_int != x ; then break; fi
1582 done
1586 if test x$ac_cv_sizeof_int = x ; then
1587 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1589 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1590 cat >> confdefs.h <<EOF
1591 #define SIZEOF_INT $ac_cv_sizeof_int
1595 echo $ac_n "checking size of long""... $ac_c" 1>&6
1596 echo "configure:1597: checking size of long" >&5
1597 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1598 echo $ac_n "(cached) $ac_c" 1>&6
1599 else
1600 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1601 cat > conftest.$ac_ext <<EOF
1602 #line 1603 "configure"
1603 #include "confdefs.h"
1604 #include "confdefs.h"
1605 #include <sys/types.h>
1608 int main() {
1609 switch (0) case 0: case (sizeof (long) == $ac_size):;
1610 ; return 0; }
1612 if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1613 rm -rf conftest*
1614 ac_cv_sizeof_long=$ac_size
1615 else
1616 echo "configure: failed program was:" >&5
1617 cat conftest.$ac_ext >&5
1619 rm -f conftest*
1620 if test x$ac_cv_sizeof_long != x ; then break; fi
1621 done
1625 if test x$ac_cv_sizeof_long = x ; then
1626 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1628 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1629 cat >> confdefs.h <<EOF
1630 #define SIZEOF_LONG $ac_cv_sizeof_long
1634 if test $ac_cv_c_long_long = yes; then
1635 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1636 echo "configure:1637: checking size of long long" >&5
1637 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1641 cat > conftest.$ac_ext <<EOF
1642 #line 1643 "configure"
1643 #include "confdefs.h"
1644 #include "confdefs.h"
1645 #include <sys/types.h>
1648 int main() {
1649 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1650 ; return 0; }
1652 if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1653 rm -rf conftest*
1654 ac_cv_sizeof_long_long=$ac_size
1655 else
1656 echo "configure: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
1659 rm -f conftest*
1660 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1661 done
1665 if test x$ac_cv_sizeof_long_long = x ; then
1666 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1668 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1669 cat >> confdefs.h <<EOF
1670 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1675 if test $ac_cv_c___int64 = yes; then
1676 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1677 echo "configure:1678: checking size of __int64" >&5
1678 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1679 echo $ac_n "(cached) $ac_c" 1>&6
1680 else
1681 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1684 "configure"
1684 #include "confdefs.h"
1685 #include "confdefs.h"
1686 #include <sys/types.h>
1689 int main() {
1690 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1691 ; return 0; }
1693 if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1694 rm -rf conftest*
1695 ac_cv_sizeof___int64=$ac_size
1696 else
1697 echo "configure: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1700 rm -f conftest*
1701 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1702 done
1706 if test x$ac_cv_sizeof___int64 = x ; then
1707 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1709 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1710 cat >> confdefs.h <<EOF
1711 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1717 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1718 echo "configure:1719: checking execution character set" >&5
1719 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722 cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1726 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1727 ASCII
1728 #endif
1730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1731 egrep "ASCII" >/dev/null 2>&1; then
1732 rm -rf conftest*
1733 ac_cv_c_charset=ASCII
1735 rm -f conftest*
1737 if test x${ac_cv_c_charset+set} != xset; then
1738 cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1741 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1742 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1743 EBCDIC
1744 #endif
1746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1747 egrep "EBCDIC" >/dev/null 2>&1; then
1748 rm -rf conftest*
1749 ac_cv_c_charset=EBCDIC
1751 rm -f conftest*
1754 if test x${ac_cv_c_charset+set} != xset; then
1755 ac_cv_c_charset=unknown
1759 echo "$ac_t""$ac_cv_c_charset" 1>&6
1760 if test $ac_cv_c_charset = unknown; then
1761 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1762 elif test $ac_cv_c_charset = EBCDIC; then
1763 cat >> confdefs.h <<\EOF
1764 #define HOST_EBCDIC 1
1769 # -----------------
1770 # Find Ada compiler
1771 # -----------------
1773 # See if GNAT has been installed
1774 if test $host != $build; then
1775 ac_tool_prefix=${host_alias}-
1776 else
1777 ac_tool_prefix=
1781 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1782 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1784 echo "configure:1785: checking for $ac_word" >&5
1785 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1786 echo $ac_n "(cached) $ac_c" 1>&6
1787 else
1788 if test -n "$GNATBIND"; then
1789 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1790 else
1791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1792 ac_dummy="$PATH"
1793 for ac_dir in $ac_dummy; do
1794 test -z "$ac_dir" && ac_dir=.
1795 if test -f $ac_dir/$ac_word; then
1796 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1797 break
1799 done
1800 IFS="$ac_save_ifs"
1803 GNATBIND="$ac_cv_prog_GNATBIND"
1804 if test -n "$GNATBIND"; then
1805 echo "$ac_t""$GNATBIND" 1>&6
1806 else
1807 echo "$ac_t""no" 1>&6
1811 if test -z "$ac_cv_prog_GNATBIND"; then
1812 if test -n "$ac_tool_prefix"; then
1813 # Extract the first word of "gnatbind", so it can be a program name with args.
1814 set dummy gnatbind; ac_word=$2
1815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1816 echo "configure:1817: checking for $ac_word" >&5
1817 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820 if test -n "$GNATBIND"; then
1821 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1822 else
1823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1824 ac_dummy="$PATH"
1825 for ac_dir in $ac_dummy; do
1826 test -z "$ac_dir" && ac_dir=.
1827 if test -f $ac_dir/$ac_word; then
1828 ac_cv_prog_GNATBIND="gnatbind"
1829 break
1831 done
1832 IFS="$ac_save_ifs"
1833 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1836 GNATBIND="$ac_cv_prog_GNATBIND"
1837 if test -n "$GNATBIND"; then
1838 echo "$ac_t""$GNATBIND" 1>&6
1839 else
1840 echo "$ac_t""no" 1>&6
1843 else
1844 GNATBIND="no"
1848 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1849 echo "configure:1850: checking for compiler driver that understands Ada" >&5
1850 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853 cat >conftest.adb <<EOF
1854 procedure conftest is begin null; end conftest;
1856 gcc_cv_prog_adac=no
1857 # Have to do ac_tool_prefix and user overrides by hand.
1858 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1859 ${ac_tool_prefix}gcc gcc \
1860 ${ac_tool_prefix}cc cc \
1861 ${ac_tool_prefix}gnatgcc gnatgcc \
1862 ${ac_tool_prefix}gnatcc gnatcc \
1863 ${ac_tool_prefix}adagcc adagcc \
1864 ${ac_tool_prefix}adacc adacc ; do
1865 # There is a bug in all released versions of GCC which causes the
1866 # driver to exit successfully when the appropriate language module
1867 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1868 # Therefore we must check for the error message as well as an
1869 # unsuccessful exit.
1870 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1871 if test x"$errors" = x; then
1872 gcc_cv_prog_adac=$cand
1873 break
1875 done
1876 rm -f conftest.*
1879 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1880 ADAC=$gcc_cv_prog_adac
1883 if test x$GNATBIND != xno && test x$ADAC != xno; then
1884 have_gnat=yes
1885 else
1886 have_gnat=no
1890 if test x$have_gnat != xno ; then
1891 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1892 echo "configure:1893: checking whether ${ADAC} accepts -Wno-long-long" >&5
1893 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896 cat >conftest.adb <<EOF
1897 procedure conftest is begin null; end conftest;
1899 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1900 ac_cv_prog_adac_no_long_long=yes
1901 else
1902 ac_cv_prog_adac_no_long_long=no
1904 rm -f conftest*
1907 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1908 else
1909 ac_cv_prog_adac_no_long_long=yes
1912 # ---------------------
1913 # Warnings and checking
1914 # ---------------------
1916 strict1_warn=
1917 if test $ac_cv_prog_cc_no_long_long = yes && \
1918 test $ac_cv_prog_adac_no_long_long = yes ; then
1919 strict1_warn="-pedantic -Wno-long-long"
1923 # If the native compiler is GCC, we can enable warnings even in stage1.
1924 # That's useful for people building cross-compilers, or just running a
1925 # quick `make'.
1926 warn_cflags=
1927 if test "x$GCC" = "xyes"; then
1928 warn_cflags='$(GCC_WARN_CFLAGS)'
1932 # Enable -Werror in bootstrap stage2 and later.
1933 # Change the default to "no" on release branches.
1934 # Check whether --enable-werror or --disable-werror was given.
1935 if test "${enable_werror+set}" = set; then
1936 enableval="$enable_werror"
1938 else
1939 enable_werror=yes
1942 if test x$enable_werror = xyes ; then
1943 WERROR=-Werror
1947 # Enable expensive internal checks
1948 # Check whether --enable-checking or --disable-checking was given.
1949 if test "${enable_checking+set}" = set; then
1950 enableval="$enable_checking"
1951 ac_checking=
1952 ac_tree_checking=
1953 ac_rtl_checking=
1954 ac_rtlflag_checking=
1955 ac_gc_checking=
1956 ac_gc_always_collect=
1957 case "${enableval}" in
1958 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1959 ac_rtlflag_checking=1 ;;
1960 no) ;;
1961 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1962 set fnord $enableval; shift
1963 IFS="$ac_save_IFS"
1964 for check
1966 case $check in
1967 misc) ac_checking=1 ;;
1968 tree) ac_tree_checking=1 ;;
1969 rtlflag) ac_rtlflag_checking=1 ;;
1970 rtl) ac_rtl_checking=1 ;;
1971 gc) ac_gc_checking=1 ;;
1972 gcac) ac_gc_always_collect=1 ;;
1973 valgrind) ac_checking_valgrind=1 ;;
1974 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1975 esac
1976 done
1978 esac
1980 else
1981 # Enable some checks by default for development versions of GCC
1982 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1985 nocommon_flag=""
1986 if test x$ac_checking != x ; then
1987 cat >> confdefs.h <<\EOF
1988 #define ENABLE_CHECKING 1
1991 nocommon_flag=-fno-common
1994 if test x$ac_tree_checking != x ; then
1995 cat >> confdefs.h <<\EOF
1996 #define ENABLE_TREE_CHECKING 1
2000 if test x$ac_rtl_checking != x ; then
2001 cat >> confdefs.h <<\EOF
2002 #define ENABLE_RTL_CHECKING 1
2006 if test x$ac_rtlflag_checking != x ; then
2007 cat >> confdefs.h <<\EOF
2008 #define ENABLE_RTL_FLAG_CHECKING 1
2012 if test x$ac_gc_checking != x ; then
2013 cat >> confdefs.h <<\EOF
2014 #define ENABLE_GC_CHECKING 1
2018 if test x$ac_gc_always_collect != x ; then
2019 cat >> confdefs.h <<\EOF
2020 #define ENABLE_GC_ALWAYS_COLLECT 1
2024 valgrind_path_defines=
2025 valgrind_command=
2026 if test x$ac_checking_valgrind != x ; then
2027 # It is certainly possible that there's valgrind but no valgrind.h.
2028 # GCC relies on making annotations so we must have both.
2029 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2030 echo "configure:2031: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2031 cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <memcheck.h>
2035 #ifndef VALGRIND_DISCARD
2036 #error VALGRIND_DISCARD not defined
2037 #endif
2039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2040 { (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2042 if test -z "$ac_err"; then
2043 rm -rf conftest*
2044 gcc_cv_header_memcheck_h=yes
2045 else
2046 echo "$ac_err" >&5
2047 echo "configure: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2049 rm -rf conftest*
2050 gcc_cv_header_memcheck_h=no
2052 rm -f conftest*
2053 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2054 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2055 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2056 echo "configure:2057: checking for valgrind.h" >&5
2057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2058 echo $ac_n "(cached) $ac_c" 1>&6
2059 else
2060 cat > conftest.$ac_ext <<EOF
2061 #line 2062 "configure"
2062 #include "confdefs.h"
2063 #include <valgrind.h>
2065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2066 { (eval echo configure:2067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2068 if test -z "$ac_err"; then
2069 rm -rf conftest*
2070 eval "ac_cv_header_$ac_safe=yes"
2071 else
2072 echo "$ac_err" >&5
2073 echo "configure: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 rm -rf conftest*
2076 eval "ac_cv_header_$ac_safe=no"
2078 rm -f conftest*
2080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2081 echo "$ac_t""yes" 1>&6
2082 have_valgrind_h=yes
2083 else
2084 echo "$ac_t""no" 1>&6
2085 have_valgrind_h=no
2088 # Extract the first word of "valgrind", so it can be a program name with args.
2089 set dummy valgrind; ac_word=$2
2090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2091 echo "configure:2092: checking for $ac_word" >&5
2092 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2093 echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095 case "$valgrind_path" in
2097 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2100 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2101 for ac_dir in $PATH; do
2102 test -z "$ac_dir" && ac_dir=.
2103 if test -f $ac_dir/$ac_word; then
2104 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2105 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2106 break
2109 done
2110 IFS="$ac_save_ifs"
2112 esac
2114 valgrind_path="$ac_cv_path_valgrind_path"
2115 if test -n "$valgrind_path"; then
2116 echo "$ac_t""$valgrind_path" 1>&6
2117 else
2118 echo "$ac_t""no" 1>&6
2121 if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2122 { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2124 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2125 valgrind_command="$valgrind_path -q"
2126 cat >> confdefs.h <<\EOF
2127 #define ENABLE_VALGRIND_CHECKING 1
2130 if test $gcc_cv_header_memcheck_h = yes; then
2131 cat >> confdefs.h <<\EOF
2132 #define HAVE_MEMCHECK_H 1
2140 # Enable code coverage collection
2141 # Check whether --enable-coverage or --disable-coverage was given.
2142 if test "${enable_coverage+set}" = set; then
2143 enableval="$enable_coverage"
2144 case "${enableval}" in
2145 yes|noopt)
2146 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2148 opt)
2149 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2152 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2154 esac
2155 else
2156 coverage_flags=""
2161 # -------------------------------
2162 # Miscenalleous configure options
2163 # -------------------------------
2165 # With stabs
2166 # Check whether --with-stabs or --without-stabs was given.
2167 if test "${with_stabs+set}" = set; then
2168 withval="$with_stabs"
2169 stabs="$with_stabs"
2170 else
2171 stabs=no
2175 # With ELF
2176 # Check whether --with-elf or --without-elf was given.
2177 if test "${with_elf+set}" = set; then
2178 withval="$with_elf"
2179 elf="$with_elf"
2180 else
2181 elf=no
2185 # Determine whether or not multilibs are enabled.
2186 # Check whether --enable-multilib or --disable-multilib was given.
2187 if test "${enable_multilib+set}" = set; then
2188 enableval="$enable_multilib"
2190 else
2191 enable_multilib=yes
2196 # Enable __cxa_atexit for C++.
2197 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2198 if test "${enable___cxa_atexit+set}" = set; then
2199 enableval="$enable___cxa_atexit"
2204 # Enable Multibyte Characters for C/C++
2205 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2206 if test "${enable_c_mbchar+set}" = set; then
2207 enableval="$enable_c_mbchar"
2208 if test x$enable_c_mbchar != xno; then
2209 cat >> confdefs.h <<\EOF
2210 #define MULTIBYTE_CHARS 1
2217 # Enable threads
2218 # Pass with no value to take the default
2219 # Pass with a value to specify a thread package
2220 # Check whether --enable-threads or --disable-threads was given.
2221 if test "${enable_threads+set}" = set; then
2222 enableval="$enable_threads"
2224 else
2225 enable_threads=''
2229 enable_threads_flag=$enable_threads
2230 # Check if a valid thread package
2231 case x${enable_threads_flag} in
2232 x | xno)
2233 # No threads
2234 target_thread_file='single'
2236 xyes)
2237 # default
2238 target_thread_file=''
2240 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2241 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2242 target_thread_file=$enable_threads_flag
2245 echo "$enable_threads is an unknown thread package" 1>&2
2246 exit 1
2248 esac
2250 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2251 if test "${enable_objc_gc+set}" = set; then
2252 enableval="$enable_objc_gc"
2253 if test x$enable_objc_gc = xno; then
2254 objc_boehm_gc=''
2255 else
2256 objc_boehm_gc=1
2258 else
2259 objc_boehm_gc=''
2263 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2264 if test "${with_dwarf2+set}" = set; then
2265 withval="$with_dwarf2"
2266 dwarf2="$with_dwarf2"
2267 else
2268 dwarf2=no
2272 # Check whether --enable-shared or --disable-shared was given.
2273 if test "${enable_shared+set}" = set; then
2274 enableval="$enable_shared"
2276 case $enable_shared in
2277 yes | no) ;;
2279 enable_shared=no
2280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2281 for pkg in $enableval; do
2282 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2283 enable_shared=yes
2285 done
2286 IFS="$ac_save_ifs"
2288 esac
2290 else
2291 enable_shared=yes
2296 # Check whether --with-sysroot or --without-sysroot was given.
2297 if test "${with_sysroot+set}" = set; then
2298 withval="$with_sysroot"
2300 case ${with_sysroot} in
2301 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2302 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2303 esac
2305 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2306 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2308 if test "x$exec_prefix" = xNONE; then
2309 if test "x$prefix" = xNONE; then
2310 test_prefix=/usr/local
2311 else
2312 test_prefix=$prefix
2314 else
2315 test_prefix=$exec_prefix
2317 case ${TARGET_SYSTEM_ROOT} in
2318 "${test_prefix}"|"${test_prefix}/"*|\
2319 '${exec_prefix}'|'${exec_prefix}/'*)
2320 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2321 TARGET_SYSTEM_ROOT_DEFINE="$t"
2323 esac
2325 else
2327 TARGET_SYSTEM_ROOT=
2328 TARGET_SYSTEM_ROOT_DEFINE=
2329 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2337 # -------------------------
2338 # Checks for other programs
2339 # -------------------------
2341 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2342 echo "configure:2343: checking whether ${MAKE-make} sets \${MAKE}" >&5
2343 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2344 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2346 else
2347 cat > conftestmake <<\EOF
2348 all:
2349 @echo 'ac_maketemp="${MAKE}"'
2351 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2352 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2353 if test -n "$ac_maketemp"; then
2354 eval ac_cv_prog_make_${ac_make}_set=yes
2355 else
2356 eval ac_cv_prog_make_${ac_make}_set=no
2358 rm -f conftestmake
2360 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2361 echo "$ac_t""yes" 1>&6
2362 SET_MAKE=
2363 else
2364 echo "$ac_t""no" 1>&6
2365 SET_MAKE="MAKE=${MAKE-make}"
2369 # Find some useful tools
2370 for ac_prog in mawk gawk nawk awk
2372 # Extract the first word of "$ac_prog", so it can be a program name with args.
2373 set dummy $ac_prog; ac_word=$2
2374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2375 echo "configure:2376: checking for $ac_word" >&5
2376 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2377 echo $ac_n "(cached) $ac_c" 1>&6
2378 else
2379 if test -n "$AWK"; then
2380 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2381 else
2382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2383 ac_dummy="$PATH"
2384 for ac_dir in $ac_dummy; do
2385 test -z "$ac_dir" && ac_dir=.
2386 if test -f $ac_dir/$ac_word; then
2387 ac_cv_prog_AWK="$ac_prog"
2388 break
2390 done
2391 IFS="$ac_save_ifs"
2394 AWK="$ac_cv_prog_AWK"
2395 if test -n "$AWK"; then
2396 echo "$ac_t""$AWK" 1>&6
2397 else
2398 echo "$ac_t""no" 1>&6
2401 test -n "$AWK" && break
2402 done
2404 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2405 echo "configure:2406: checking whether ln works" >&5
2406 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2407 echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409 rm -f conftestdata_t
2410 echo >conftestdata_f
2411 if ln conftestdata_f conftestdata_t 2>/dev/null
2412 then
2413 gcc_cv_prog_LN="ln"
2414 else
2415 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2416 then
2417 gcc_cv_prog_LN="ln -s"
2418 else
2419 gcc_cv_prog_LN=cp
2422 rm -f conftestdata_f conftestdata_t
2425 LN="$gcc_cv_prog_LN"
2426 if test "$gcc_cv_prog_LN" = "ln"; then
2427 echo "$ac_t""yes" 1>&6
2428 else
2429 if test "$gcc_cv_prog_LN" = "ln -s"; then
2430 echo "$ac_t""no, using ln -s" 1>&6
2431 else
2432 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2436 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2437 echo "configure:2438: checking whether ln -s works" >&5
2438 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2441 rm -f conftestdata_t
2442 echo >conftestdata_f
2443 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2444 then
2445 gcc_cv_prog_LN_S="ln -s"
2446 else
2447 if ln conftestdata_f conftestdata_t 2>/dev/null
2448 then
2449 gcc_cv_prog_LN_S=ln
2450 else
2451 gcc_cv_prog_LN_S=cp
2454 rm -f conftestdata_f conftestdata_t
2457 LN_S="$gcc_cv_prog_LN_S"
2458 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2459 echo "$ac_t""yes" 1>&6
2460 else
2461 if test "$gcc_cv_prog_LN_S" = "ln"; then
2462 echo "$ac_t""no, using ln" 1>&6
2463 else
2464 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2468 # Extract the first word of "ranlib", so it can be a program name with args.
2469 set dummy ranlib; ac_word=$2
2470 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2471 echo "configure:2472: checking for $ac_word" >&5
2472 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2473 echo $ac_n "(cached) $ac_c" 1>&6
2474 else
2475 if test -n "$RANLIB"; then
2476 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2477 else
2478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2479 ac_dummy="$PATH"
2480 for ac_dir in $ac_dummy; do
2481 test -z "$ac_dir" && ac_dir=.
2482 if test -f $ac_dir/$ac_word; then
2483 ac_cv_prog_RANLIB="ranlib"
2484 break
2486 done
2487 IFS="$ac_save_ifs"
2488 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2491 RANLIB="$ac_cv_prog_RANLIB"
2492 if test -n "$RANLIB"; then
2493 echo "$ac_t""$RANLIB" 1>&6
2494 else
2495 echo "$ac_t""no" 1>&6
2498 # Find a good install program. We prefer a C program (faster),
2499 # so one script is as good as another. But avoid the broken or
2500 # incompatible versions:
2501 # SysV /etc/install, /usr/sbin/install
2502 # SunOS /usr/etc/install
2503 # IRIX /sbin/install
2504 # AIX /bin/install
2505 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2506 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2507 # ./install, which can be erroneously created by make from ./install.sh.
2508 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2509 echo "configure:2510: checking for a BSD compatible install" >&5
2510 if test -z "$INSTALL"; then
2511 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2512 echo $ac_n "(cached) $ac_c" 1>&6
2513 else
2514 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2515 for ac_dir in $PATH; do
2516 # Account for people who put trailing slashes in PATH elements.
2517 case "$ac_dir/" in
2518 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2520 # OSF1 and SCO ODT 3.0 have their own names for install.
2521 for ac_prog in ginstall scoinst install; do
2522 if test -f $ac_dir/$ac_prog; then
2523 if test $ac_prog = install &&
2524 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2525 # AIX install. It has an incompatible calling convention.
2526 # OSF/1 installbsd also uses dspmsg, but is usable.
2528 else
2529 ac_cv_path_install="$ac_dir/$ac_prog -c"
2530 break 2
2533 done
2535 esac
2536 done
2537 IFS="$ac_save_IFS"
2540 if test "${ac_cv_path_install+set}" = set; then
2541 INSTALL="$ac_cv_path_install"
2542 else
2543 # As a last resort, use the slow shell script. We don't cache a
2544 # path for INSTALL within a source directory, because that will
2545 # break other packages using the cache if that directory is
2546 # removed, or if the path is relative.
2547 INSTALL="$ac_install_sh"
2550 echo "$ac_t""$INSTALL" 1>&6
2552 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2553 # It thinks the first close brace ends the variable substitution.
2554 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2556 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2559 # See if we have the mktemp command.
2560 # Extract the first word of "mktemp", so it can be a program name with args.
2561 set dummy mktemp; ac_word=$2
2562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2563 echo "configure:2564: checking for $ac_word" >&5
2564 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2565 echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567 if test -n "$have_mktemp_command"; then
2568 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2569 else
2570 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2571 ac_dummy="$PATH"
2572 for ac_dir in $ac_dummy; do
2573 test -z "$ac_dir" && ac_dir=.
2574 if test -f $ac_dir/$ac_word; then
2575 ac_cv_prog_have_mktemp_command="yes"
2576 break
2578 done
2579 IFS="$ac_save_ifs"
2580 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2583 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2584 if test -n "$have_mktemp_command"; then
2585 echo "$ac_t""$have_mktemp_command" 1>&6
2586 else
2587 echo "$ac_t""no" 1>&6
2591 # Do we have a single-tree copy of texinfo?
2592 if test -f $srcdir/../texinfo/Makefile.in; then
2593 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2594 gcc_cv_prog_makeinfo_modern=yes
2595 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2596 else
2597 # See if makeinfo has been installed and is modern enough
2598 # that we can use it.
2599 # Extract the first word of "makeinfo", so it can be a program name with args.
2600 set dummy makeinfo; ac_word=$2
2601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2602 echo "configure:2603: checking for $ac_word" >&5
2603 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2604 echo $ac_n "(cached) $ac_c" 1>&6
2605 else
2606 if test -n "$MAKEINFO"; then
2607 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2608 else
2609 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2610 ac_dummy="$PATH"
2611 for ac_dir in $ac_dummy; do
2612 test -z "$ac_dir" && ac_dir=.
2613 if test -f $ac_dir/$ac_word; then
2614 ac_cv_prog_MAKEINFO="makeinfo"
2615 break
2617 done
2618 IFS="$ac_save_ifs"
2621 MAKEINFO="$ac_cv_prog_MAKEINFO"
2622 if test -n "$MAKEINFO"; then
2623 echo "$ac_t""$MAKEINFO" 1>&6
2624 else
2625 echo "$ac_t""no" 1>&6
2628 if test -n "$MAKEINFO"; then
2629 # Found it, now check the version.
2630 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2631 echo "configure:2632: checking for modern makeinfo" >&5
2632 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2633 echo $ac_n "(cached) $ac_c" 1>&6
2634 else
2635 ac_prog_version=`$MAKEINFO --version 2>&1 |
2636 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2637 echo "configure:2638: version of makeinfo is $ac_prog_version" >&5
2638 case $ac_prog_version in
2639 '') gcc_cv_prog_makeinfo_modern=no;;
2640 4.[2-9]*)
2641 gcc_cv_prog_makeinfo_modern=yes;;
2642 *) gcc_cv_prog_makeinfo_modern=no;;
2643 esac
2647 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2648 else
2649 gcc_cv_prog_makeinfo_modern=no
2654 if test $gcc_cv_prog_makeinfo_modern = no; then
2655 echo "configure: warning:
2656 *** Makeinfo is missing or too old.
2657 *** Info documentation will not be built." 1>&2
2658 BUILD_INFO=
2659 else
2660 BUILD_INFO=info
2663 # Is pod2man recent enough to regenerate manpages?
2664 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2665 echo "configure:2666: checking for recent Pod::Man" >&5
2666 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2667 echo "$ac_t""yes" 1>&6
2668 GENERATED_MANPAGES=generated-manpages
2669 else
2670 echo "$ac_t""no" 1>&6
2671 GENERATED_MANPAGES=
2674 # 'make compare' can be significantly faster, if cmp itself can
2675 # skip bytes instead of using tail. The test being performed is
2676 # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
2677 # but we need to sink errors and handle broken shells.
2678 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2679 echo "configure:2680: checking for cmp's capabilities" >&5
2680 echo abfoo >t1
2681 echo cdfoo >t2
2682 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2683 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2684 make_compare_target=slowcompare
2685 else
2686 make_compare_target=gnucompare
2688 else
2689 make_compare_target=slowcompare
2691 rm t1 t2
2693 echo "$ac_t""$make_compare_target" 1>&6
2695 # How about lex?
2696 if test -f $srcdir/../flex/skel.c; then
2697 FLEX='$(objdir)/../flex/flex'
2698 else
2699 # Extract the first word of "flex", so it can be a program name with args.
2700 set dummy flex; ac_word=$2
2701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2702 echo "configure:2703: checking for $ac_word" >&5
2703 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2704 echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706 if test -n "$FLEX"; then
2707 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2708 else
2709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2710 ac_dummy="$PATH"
2711 for ac_dir in $ac_dummy; do
2712 test -z "$ac_dir" && ac_dir=.
2713 if test -f $ac_dir/$ac_word; then
2714 ac_cv_prog_FLEX="flex"
2715 break
2717 done
2718 IFS="$ac_save_ifs"
2719 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2722 FLEX="$ac_cv_prog_FLEX"
2723 if test -n "$FLEX"; then
2724 echo "$ac_t""$FLEX" 1>&6
2725 else
2726 echo "$ac_t""no" 1>&6
2731 # Bison?
2732 # The -L switch is so bison can find its skeleton file.
2733 if test -f $srcdir/../bison/bison.simple; then
2734 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2735 else
2736 # Extract the first word of "bison", so it can be a program name with args.
2737 set dummy bison; ac_word=$2
2738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2739 echo "configure:2740: checking for $ac_word" >&5
2740 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743 if test -n "$BISON"; then
2744 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2745 else
2746 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2747 ac_dummy="$PATH"
2748 for ac_dir in $ac_dummy; do
2749 test -z "$ac_dir" && ac_dir=.
2750 if test -f $ac_dir/$ac_word; then
2751 ac_cv_prog_BISON="bison"
2752 break
2754 done
2755 IFS="$ac_save_ifs"
2756 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2759 BISON="$ac_cv_prog_BISON"
2760 if test -n "$BISON"; then
2761 echo "$ac_t""$BISON" 1>&6
2762 else
2763 echo "$ac_t""no" 1>&6
2768 # --------------------
2769 # Checks for C headers
2770 # --------------------
2772 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2773 echo "configure:2774: checking for GNU C library" >&5
2774 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2775 echo $ac_n "(cached) $ac_c" 1>&6
2776 else
2777 cat > conftest.$ac_ext <<EOF
2778 #line 2779 "configure"
2779 #include "confdefs.h"
2780 #include <features.h>
2781 int main() {
2783 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2784 #error Not a GNU C library system
2785 #endif
2786 ; return 0; }
2788 if { (eval echo configure:2789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2789 rm -rf conftest*
2790 gcc_cv_glibc=yes
2791 else
2792 echo "configure: failed program was:" >&5
2793 cat conftest.$ac_ext >&5
2794 rm -rf conftest*
2795 gcc_cv_glibc=no
2797 rm -f conftest*
2800 echo "$ac_t""$gcc_cv_glibc" 1>&6
2801 if test $gcc_cv_glibc = yes; then
2802 cat >> confdefs.h <<\EOF
2803 #define _GNU_SOURCE 1
2808 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2809 echo "configure:2810: checking for ANSI C header files" >&5
2810 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2811 echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813 cat > conftest.$ac_ext <<EOF
2814 #line 2815 "configure"
2815 #include "confdefs.h"
2816 #include <stdlib.h>
2817 #include <stdarg.h>
2818 #include <string.h>
2819 #include <float.h>
2821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2822 { (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2824 if test -z "$ac_err"; then
2825 rm -rf conftest*
2826 ac_cv_header_stdc=yes
2827 else
2828 echo "$ac_err" >&5
2829 echo "configure: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
2831 rm -rf conftest*
2832 ac_cv_header_stdc=no
2834 rm -f conftest*
2836 if test $ac_cv_header_stdc = yes; then
2837 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <string.h>
2843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2844 egrep "memchr" >/dev/null 2>&1; then
2846 else
2847 rm -rf conftest*
2848 ac_cv_header_stdc=no
2850 rm -f conftest*
2854 if test $ac_cv_header_stdc = yes; then
2855 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2856 cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 #include <stdlib.h>
2861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2862 egrep "free" >/dev/null 2>&1; then
2864 else
2865 rm -rf conftest*
2866 ac_cv_header_stdc=no
2868 rm -f conftest*
2872 if test $ac_cv_header_stdc = yes; then
2873 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2874 if test "$cross_compiling" = yes; then
2876 else
2877 cat > conftest.$ac_ext <<EOF
2878 #line 2879 "configure"
2879 #include "confdefs.h"
2880 #include <ctype.h>
2881 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2882 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2883 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2884 int main () { int i; for (i = 0; i < 256; i++)
2885 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2886 exit (0); }
2889 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2890 then
2892 else
2893 echo "configure: failed program was:" >&5
2894 cat conftest.$ac_ext >&5
2895 rm -fr conftest*
2896 ac_cv_header_stdc=no
2898 rm -fr conftest*
2904 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2905 if test $ac_cv_header_stdc = yes; then
2906 cat >> confdefs.h <<\EOF
2907 #define STDC_HEADERS 1
2912 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2913 echo "configure:2914: checking whether time.h and sys/time.h may both be included" >&5
2914 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2915 echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 #include <sys/types.h>
2921 #include <sys/time.h>
2922 #include <time.h>
2923 int main() {
2924 struct tm *tp;
2925 ; return 0; }
2927 if { (eval echo configure:2928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2928 rm -rf conftest*
2929 ac_cv_header_time=yes
2930 else
2931 echo "configure: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2933 rm -rf conftest*
2934 ac_cv_header_time=no
2936 rm -f conftest*
2939 echo "$ac_t""$ac_cv_header_time" 1>&6
2940 if test $ac_cv_header_time = yes; then
2941 cat >> confdefs.h <<\EOF
2942 #define TIME_WITH_SYS_TIME 1
2947 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2948 echo "configure:2949: checking for working stdbool.h" >&5
2949 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <stdbool.h>
2956 int main() {
2957 bool foo = false;
2958 ; return 0; }
2960 if { (eval echo configure:2961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2961 rm -rf conftest*
2962 ac_cv_header_stdbool_h=yes
2963 else
2964 echo "configure: failed program was:" >&5
2965 cat conftest.$ac_ext >&5
2966 rm -rf conftest*
2967 ac_cv_header_stdbool_h=no
2969 rm -f conftest*
2972 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2973 if test $ac_cv_header_stdbool_h = yes; then
2974 cat >> confdefs.h <<\EOF
2975 #define HAVE_STDBOOL_H 1
2980 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2981 echo "configure:2982: checking whether string.h and strings.h may both be included" >&5
2982 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2983 echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985 cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <string.h>
2989 #include <strings.h>
2990 int main() {
2992 ; return 0; }
2994 if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995 rm -rf conftest*
2996 gcc_cv_header_string=yes
2997 else
2998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -rf conftest*
3001 gcc_cv_header_string=no
3003 rm -f conftest*
3006 echo "$ac_t""$gcc_cv_header_string" 1>&6
3007 if test $gcc_cv_header_string = yes; then
3008 cat >> confdefs.h <<\EOF
3009 #define STRING_WITH_STRINGS 1
3014 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3015 echo "configure:3016: checking for sys/wait.h that is POSIX.1 compatible" >&5
3016 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3017 echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019 cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022 #include <sys/types.h>
3023 #include <sys/wait.h>
3024 #ifndef WEXITSTATUS
3025 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3026 #endif
3027 #ifndef WIFEXITED
3028 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3029 #endif
3030 int main() {
3031 int s;
3032 wait (&s);
3033 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3034 ; return 0; }
3036 if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3037 rm -rf conftest*
3038 ac_cv_header_sys_wait_h=yes
3039 else
3040 echo "configure: failed program was:" >&5
3041 cat conftest.$ac_ext >&5
3042 rm -rf conftest*
3043 ac_cv_header_sys_wait_h=no
3045 rm -f conftest*
3048 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3049 if test $ac_cv_header_sys_wait_h = yes; then
3050 cat >> confdefs.h <<\EOF
3051 #define HAVE_SYS_WAIT_H 1
3056 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3057 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
3058 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3059 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3063 echo "configure:3064: checking for $ac_hdr" >&5
3064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3065 echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 #include <$ac_hdr>
3072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3073 { (eval echo configure:3074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3075 if test -z "$ac_err"; then
3076 rm -rf conftest*
3077 eval "ac_cv_header_$ac_safe=yes"
3078 else
3079 echo "$ac_err" >&5
3080 echo "configure: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3082 rm -rf conftest*
3083 eval "ac_cv_header_$ac_safe=no"
3085 rm -f conftest*
3087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3088 echo "$ac_t""yes" 1>&6
3089 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3090 cat >> confdefs.h <<EOF
3091 #define $ac_tr_hdr 1
3094 else
3095 echo "$ac_t""no" 1>&6
3097 done
3100 # Check for thread headers.
3101 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3102 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3103 echo "configure:3104: checking for thread.h" >&5
3104 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3105 echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107 cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 #include <thread.h>
3112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3113 { (eval echo configure:3114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3115 if test -z "$ac_err"; then
3116 rm -rf conftest*
3117 eval "ac_cv_header_$ac_safe=yes"
3118 else
3119 echo "$ac_err" >&5
3120 echo "configure: failed program was:" >&5
3121 cat conftest.$ac_ext >&5
3122 rm -rf conftest*
3123 eval "ac_cv_header_$ac_safe=no"
3125 rm -f conftest*
3127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3128 echo "$ac_t""yes" 1>&6
3129 have_thread_h=yes
3130 else
3131 echo "$ac_t""no" 1>&6
3132 have_thread_h=
3135 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3136 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3137 echo "configure:3138: checking for pthread.h" >&5
3138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3139 echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141 cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144 #include <pthread.h>
3146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3147 { (eval echo configure:3148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3149 if test -z "$ac_err"; then
3150 rm -rf conftest*
3151 eval "ac_cv_header_$ac_safe=yes"
3152 else
3153 echo "$ac_err" >&5
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
3156 rm -rf conftest*
3157 eval "ac_cv_header_$ac_safe=no"
3159 rm -f conftest*
3161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3162 echo "$ac_t""yes" 1>&6
3163 have_pthread_h=yes
3164 else
3165 echo "$ac_t""no" 1>&6
3166 have_pthread_h=
3170 # These tests can't be done till we know if we have limits.h.
3171 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3172 echo "configure:3173: checking for CHAR_BIT" >&5
3173 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 #ifdef HAVE_LIMITS_H
3180 #include <limits.h>
3181 #endif
3182 #ifdef CHAR_BIT
3183 found
3184 #endif
3186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3187 egrep "found" >/dev/null 2>&1; then
3188 rm -rf conftest*
3189 gcc_cv_decl_char_bit=yes
3190 else
3191 rm -rf conftest*
3192 gcc_cv_decl_char_bit=no
3194 rm -f conftest*
3199 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3200 if test $gcc_cv_decl_char_bit = no; then
3201 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3202 echo "configure:3203: checking number of bits in a byte" >&5
3203 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3204 echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3207 gcc_cv_c_nbby=
3208 while test $i -lt 65; do
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3213 int main() {
3214 switch(0) {
3215 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3216 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3218 ; return 0; }
3220 if { (eval echo configure:3221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3221 rm -rf conftest*
3222 gcc_cv_c_nbby=$i; break
3223 else
3224 echo "configure: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3227 rm -f conftest*
3228 i=`expr $i + 1`
3229 done
3230 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3234 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3235 if test $gcc_cv_c_nbby = failed; then
3236 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3237 else
3238 cat >> confdefs.h <<EOF
3239 #define CHAR_BIT $gcc_cv_c_nbby
3244 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3245 echo "configure:3246: checking whether byte ordering is bigendian" >&5
3246 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3247 echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249 ac_cv_c_bigendian=unknown
3250 # See if sys/param.h defines the BYTE_ORDER macro.
3251 cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <sys/types.h>
3255 #include <sys/param.h>
3256 int main() {
3258 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3259 bogus endian macros
3260 #endif
3261 ; return 0; }
3263 if { (eval echo configure:3264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3264 rm -rf conftest*
3265 # It does; now see whether it defined to BIG_ENDIAN or not.
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <sys/types.h>
3270 #include <sys/param.h>
3271 int main() {
3273 #if BYTE_ORDER != BIG_ENDIAN
3274 not big endian
3275 #endif
3276 ; return 0; }
3278 if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279 rm -rf conftest*
3280 ac_cv_c_bigendian=yes
3281 else
3282 echo "configure: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 rm -rf conftest*
3285 ac_cv_c_bigendian=no
3287 rm -f conftest*
3288 else
3289 echo "configure: failed program was:" >&5
3290 cat conftest.$ac_ext >&5
3292 rm -f conftest*
3293 if test $ac_cv_c_bigendian = unknown; then
3294 if test "$cross_compiling" = yes; then
3295 echo $ac_n "cross-compiling... " 2>&6
3296 else
3297 cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 main () {
3301 /* Are we little or big endian? From Harbison&Steele. */
3302 union
3304 long l;
3305 char c[sizeof (long)];
3306 } u;
3307 u.l = 1;
3308 exit (u.c[sizeof (long) - 1] == 1);
3311 if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3312 then
3313 ac_cv_c_bigendian=no
3314 else
3315 echo "configure: failed program was:" >&5
3316 cat conftest.$ac_ext >&5
3317 rm -fr conftest*
3318 ac_cv_c_bigendian=yes
3320 rm -fr conftest*
3326 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3327 if test $ac_cv_c_bigendian = unknown; then
3328 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3329 echo "configure:3330: checking to probe for byte ordering" >&5
3331 cat >conftest.c <<EOF
3332 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3333 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3334 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3335 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3336 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3337 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3338 int main() { _ascii (); _ebcdic (); return 0; }
3340 if test -f conftest.c ; then
3341 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3342 if test `grep -l BIGenDianSyS conftest.o` ; then
3343 echo $ac_n ' big endian probe OK, ' 1>&6
3344 ac_cv_c_bigendian=yes
3346 if test `grep -l LiTTleEnDian conftest.o` ; then
3347 echo $ac_n ' little endian probe OK, ' 1>&6
3348 if test $ac_cv_c_bigendian = yes ; then
3349 ac_cv_c_bigendian=unknown;
3350 else
3351 ac_cv_c_bigendian=no
3354 echo $ac_n 'guessing bigendian ... ' >&6
3357 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3359 if test $ac_cv_c_bigendian = yes; then
3360 cat >> confdefs.h <<\EOF
3361 #define WORDS_BIGENDIAN 1
3364 cat >> confdefs.h <<\EOF
3365 #define HOST_WORDS_BIG_ENDIAN 1
3368 BYTEORDER=4321
3369 else
3370 BYTEORDER=1234
3372 cat >> confdefs.h <<EOF
3373 #define BYTEORDER $BYTEORDER
3376 if test $ac_cv_c_bigendian = unknown; then
3377 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3381 # --------
3382 # UNSORTED
3383 # --------
3385 # Stage specific cflags for build.
3386 stage1_cflags=
3387 case $build in
3388 vax-*-*)
3389 if test x$GCC = xyes
3390 then
3391 stage1_cflags="-Wa,-J"
3392 else
3393 stage1_cflags="-J"
3396 powerpc-*-darwin*)
3397 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3398 # sources; use -no-cpp-precomp to get to GNU cpp.
3399 # Apple's GCC has bugs in designated initializer handling, so disable
3400 # that too.
3401 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3403 esac
3406 # These libraries may be used by collect2.
3407 # We may need a special search path to get them linked.
3408 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3409 echo "configure:3410: checking for collect2 libraries" >&5
3410 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3411 echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413 save_LIBS="$LIBS"
3414 for libs in '' -lld -lmld \
3415 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3416 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3418 LIBS="$libs"
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 /* Override any gcc2 internal prototype to avoid an error. */
3423 /* We use char because int might match the return type of a gcc2
3424 builtin and then its argument prototype would still apply. */
3425 char ldopen();
3427 int main() {
3428 ldopen()
3429 ; return 0; }
3431 if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3432 rm -rf conftest*
3433 gcc_cv_collect2_libs="$libs"; break
3434 else
3435 echo "configure: failed program was:" >&5
3436 cat conftest.$ac_ext >&5
3438 rm -f conftest*
3439 done
3440 LIBS="$save_LIBS"
3441 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3444 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3445 case $gcc_cv_collect2_libs in
3446 "none required") ;;
3447 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3448 esac
3451 # When building Ada code on Alpha, we need exc_resume which is usually in
3452 # -lexc. So test for it.
3453 save_LIBS="$LIBS"
3454 LIBS=
3456 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3457 echo "configure:3458: checking for library containing exc_resume" >&5
3458 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461 ac_func_search_save_LIBS="$LIBS"
3462 ac_cv_search_exc_resume="no"
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 /* Override any gcc2 internal prototype to avoid an error. */
3467 /* We use char because int might match the return type of a gcc2
3468 builtin and then its argument prototype would still apply. */
3469 char exc_resume();
3471 int main() {
3472 exc_resume()
3473 ; return 0; }
3475 if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3476 rm -rf conftest*
3477 ac_cv_search_exc_resume="none required"
3478 else
3479 echo "configure: failed program was:" >&5
3480 cat conftest.$ac_ext >&5
3482 rm -f conftest*
3483 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3484 LIBS="-l$i $ac_func_search_save_LIBS"
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 /* Override any gcc2 internal prototype to avoid an error. */
3489 /* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491 char exc_resume();
3493 int main() {
3494 exc_resume()
3495 ; return 0; }
3497 if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3498 rm -rf conftest*
3499 ac_cv_search_exc_resume="-l$i"
3500 break
3501 else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3505 rm -f conftest*
3506 done
3507 LIBS="$ac_func_search_save_LIBS"
3510 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3511 if test "$ac_cv_search_exc_resume" != "no"; then
3512 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3514 else :
3517 GNAT_LIBEXC="$LIBS"
3518 LIBS="$save_LIBS"
3521 # Some systems put ldexp and frexp in libm instead of libc; assume
3522 # they're both in the same place. jcf-dump needs them.
3523 save_LIBS="$LIBS"
3524 LIBS=
3526 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3527 echo "configure:3528: checking for library containing ldexp" >&5
3528 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3529 echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531 ac_func_search_save_LIBS="$LIBS"
3532 ac_cv_search_ldexp="no"
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 /* Override any gcc2 internal prototype to avoid an error. */
3537 /* We use char because int might match the return type of a gcc2
3538 builtin and then its argument prototype would still apply. */
3539 char ldexp();
3541 int main() {
3542 ldexp()
3543 ; return 0; }
3545 if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3546 rm -rf conftest*
3547 ac_cv_search_ldexp="none required"
3548 else
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
3552 rm -f conftest*
3553 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3554 LIBS="-l$i $ac_func_search_save_LIBS"
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 /* Override any gcc2 internal prototype to avoid an error. */
3559 /* We use char because int might match the return type of a gcc2
3560 builtin and then its argument prototype would still apply. */
3561 char ldexp();
3563 int main() {
3564 ldexp()
3565 ; return 0; }
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568 rm -rf conftest*
3569 ac_cv_search_ldexp="-l$i"
3570 break
3571 else
3572 echo "configure: failed program was:" >&5
3573 cat conftest.$ac_ext >&5
3575 rm -f conftest*
3576 done
3577 LIBS="$ac_func_search_save_LIBS"
3580 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3581 if test "$ac_cv_search_ldexp" != "no"; then
3582 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3584 else :
3587 LDEXP_LIB="$LIBS"
3588 LIBS="$save_LIBS"
3591 # Use <inttypes.h> only if it exists,
3592 # doesn't clash with <sys/types.h>, and declares intmax_t.
3593 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3594 echo "configure:3595: checking for inttypes.h" >&5
3595 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3596 echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <sys/types.h>
3602 #include <inttypes.h>
3603 int main() {
3604 intmax_t i = -1;
3605 ; return 0; }
3607 if { (eval echo configure:3608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3608 rm -rf conftest*
3609 gcc_cv_header_inttypes_h=yes
3610 else
3611 echo "configure: failed program was:" >&5
3612 cat conftest.$ac_ext >&5
3613 rm -rf conftest*
3614 gcc_cv_header_inttypes_h=no
3616 rm -f conftest*
3619 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3620 if test $gcc_cv_header_inttypes_h = yes; then
3621 cat >> confdefs.h <<\EOF
3622 #define HAVE_INTTYPES_H 1
3628 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3629 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3630 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3631 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore
3633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3634 echo "configure:3635: checking for $ac_func" >&5
3635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3636 echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 /* System header to define __stub macros and hopefully few prototypes,
3642 which can conflict with char $ac_func(); below. */
3643 #include <assert.h>
3644 /* Override any gcc2 internal prototype to avoid an error. */
3645 /* We use char because int might match the return type of a gcc2
3646 builtin and then its argument prototype would still apply. */
3647 char $ac_func();
3649 int main() {
3651 /* The GNU C library defines this for functions which it implements
3652 to always fail with ENOSYS. Some functions are actually named
3653 something starting with __ and the normal name is an alias. */
3654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3655 choke me
3656 #else
3657 $ac_func();
3658 #endif
3660 ; return 0; }
3662 if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663 rm -rf conftest*
3664 eval "ac_cv_func_$ac_func=yes"
3665 else
3666 echo "configure: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 rm -rf conftest*
3669 eval "ac_cv_func_$ac_func=no"
3671 rm -f conftest*
3674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3675 echo "$ac_t""yes" 1>&6
3676 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3677 cat >> confdefs.h <<EOF
3678 #define $ac_tr_func 1
3681 else
3682 echo "$ac_t""no" 1>&6
3684 done
3687 if test x$ac_cv_func_mbstowcs = xyes; then
3688 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3689 echo "configure:3690: checking whether mbstowcs works" >&5
3690 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3691 echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693 if test "$cross_compiling" = yes; then
3694 gcc_cv_func_mbstowcs_works=yes
3695 else
3696 cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699 #include <stdlib.h>
3700 int main()
3702 mbstowcs(0, "", 0);
3703 return 0;
3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3707 then
3708 gcc_cv_func_mbstowcs_works=yes
3709 else
3710 echo "configure: failed program was:" >&5
3711 cat conftest.$ac_ext >&5
3712 rm -fr conftest*
3713 gcc_cv_func_mbstowcs_works=no
3715 rm -fr conftest*
3720 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3721 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3722 cat >> confdefs.h <<\EOF
3723 #define HAVE_WORKING_MBSTOWCS 1
3729 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3730 echo "configure:3731: checking for ssize_t" >&5
3731 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3732 echo $ac_n "(cached) $ac_c" 1>&6
3733 else
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 #include <sys/types.h>
3738 #if STDC_HEADERS
3739 #include <stdlib.h>
3740 #include <stddef.h>
3741 #endif
3743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3744 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3745 rm -rf conftest*
3746 ac_cv_type_ssize_t=yes
3747 else
3748 rm -rf conftest*
3749 ac_cv_type_ssize_t=no
3751 rm -f conftest*
3754 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3755 if test $ac_cv_type_ssize_t = no; then
3756 cat >> confdefs.h <<\EOF
3757 #define ssize_t int
3763 # Try to determine the array type of the second argument of getgroups
3764 # for the target system (int or gid_t).
3765 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3766 echo "configure:3767: checking for uid_t in sys/types.h" >&5
3767 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3768 echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 #include <sys/types.h>
3775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3776 egrep "uid_t" >/dev/null 2>&1; then
3777 rm -rf conftest*
3778 ac_cv_type_uid_t=yes
3779 else
3780 rm -rf conftest*
3781 ac_cv_type_uid_t=no
3783 rm -f conftest*
3787 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3788 if test $ac_cv_type_uid_t = no; then
3789 cat >> confdefs.h <<\EOF
3790 #define uid_t int
3793 cat >> confdefs.h <<\EOF
3794 #define gid_t int
3799 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3800 echo "configure:3801: checking type of array argument to getgroups" >&5
3801 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3802 echo $ac_n "(cached) $ac_c" 1>&6
3803 else
3804 if test "$cross_compiling" = yes; then
3805 ac_cv_type_getgroups=cross
3806 else
3807 cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3811 /* Thanks to Mike Rendell for this test. */
3812 #include <sys/types.h>
3813 #define NGID 256
3814 #undef MAX
3815 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3816 main()
3818 gid_t gidset[NGID];
3819 int i, n;
3820 union { gid_t gval; long lval; } val;
3822 val.lval = -1;
3823 for (i = 0; i < NGID; i++)
3824 gidset[i] = val.gval;
3825 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3826 gidset);
3827 /* Exit non-zero if getgroups seems to require an array of ints. This
3828 happens when gid_t is short but getgroups modifies an array of ints. */
3829 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3833 if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3834 then
3835 ac_cv_type_getgroups=gid_t
3836 else
3837 echo "configure: failed program was:" >&5
3838 cat conftest.$ac_ext >&5
3839 rm -fr conftest*
3840 ac_cv_type_getgroups=int
3842 rm -fr conftest*
3845 if test $ac_cv_type_getgroups = cross; then
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 #include <unistd.h>
3851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3852 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3853 rm -rf conftest*
3854 ac_cv_type_getgroups=gid_t
3855 else
3856 rm -rf conftest*
3857 ac_cv_type_getgroups=int
3859 rm -f conftest*
3864 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3865 cat >> confdefs.h <<EOF
3866 #define GETGROUPS_T $ac_cv_type_getgroups
3870 if test "${target}" = "${build}"; then
3871 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3872 else
3873 case "${target}" in
3874 # This condition may need some tweaking. It should include all
3875 # targets where the array type of the second argument of getgroups
3876 # is int and the type of gid_t is not equivalent to int.
3877 *-*-sunos* | *-*-ultrix*)
3878 TARGET_GETGROUPS_T=int
3881 TARGET_GETGROUPS_T=gid_t
3883 esac
3887 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3888 echo "configure:3889: checking whether the printf functions support %p" >&5
3889 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3890 echo $ac_n "(cached) $ac_c" 1>&6
3891 else
3892 if test "$cross_compiling" = yes; then
3893 gcc_cv_func_printf_ptr=no
3894 else
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3897 "configure"
3897 #include "confdefs.h"
3898 #include <stdio.h>
3900 int main()
3902 char buf[64];
3903 char *p = buf, *q = NULL;
3904 sprintf(buf, "%p", p);
3905 sscanf(buf, "%p", &q);
3906 return (p != q);
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3910 then
3911 gcc_cv_func_printf_ptr=yes
3912 else
3913 echo "configure: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3915 rm -fr conftest*
3916 gcc_cv_func_printf_ptr=no
3918 rm -fr conftest*
3921 rm -f core core.* *.core
3924 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3925 if test $gcc_cv_func_printf_ptr = yes ; then
3926 cat >> confdefs.h <<\EOF
3927 #define HAVE_PRINTF_PTR 1
3932 if test $ac_cv_header_sys_mman_h != yes \
3933 || test $ac_cv_func_mmap != yes; then
3934 gcc_cv_func_mmap_file=no
3935 gcc_cv_func_mmap_dev_zero=no
3936 gcc_cv_func_mmap_anon=no
3937 else
3938 echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
3939 echo "configure:3940: checking whether read-only mmap of a plain file works" >&5
3940 if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then
3941 echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943 # Add a system to this blacklist if
3944 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
3945 # memory area containing the same data that you'd get if you applied
3946 # read() to the same fd. The only system known to have a problem here
3947 # is VMS, where text files have record structure.
3948 case "$host_os" in
3949 vms*)
3950 gcc_cv_func_mmap_file=no ;;
3952 gcc_cv_func_mmap_file=yes;;
3953 esac
3956 echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6
3957 echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
3958 echo "configure:3959: checking whether mmap from /dev/zero works" >&5
3959 if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3960 echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962 # Add a system to this blacklist if it has mmap() but /dev/zero
3963 # does not exist, or if mmapping /dev/zero does not give anonymous
3964 # zeroed pages with both the following properties:
3965 # 1. If you map N consecutive pages in with one call, and then
3966 # unmap any subset of those pages, the pages that were not
3967 # explicitly unmapped remain accessible.
3968 # 2. If you map two adjacent blocks of memory and then unmap them
3969 # both at once, they must both go away.
3970 # Systems known to be in this category are Windows (all variants),
3971 # VMS, and Darwin.
3972 case "$host_os" in
3973 vms* | cygwin* | pe | mingw* | darwin*)
3974 gcc_cv_func_mmap_dev_zero=no ;;
3976 gcc_cv_func_mmap_dev_zero=yes;;
3977 esac
3980 echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6
3982 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
3983 echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
3984 echo "configure:3985: checking for MAP_ANON(YMOUS)" >&5
3985 if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then
3986 echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <sys/types.h>
3992 #include <sys/mman.h>
3993 #include <unistd.h>
3995 #ifndef MAP_ANONYMOUS
3996 #define MAP_ANONYMOUS MAP_ANON
3997 #endif
3999 int main() {
4000 int n = MAP_ANONYMOUS;
4001 ; return 0; }
4003 if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4004 rm -rf conftest*
4005 gcc_cv_decl_map_anon=yes
4006 else
4007 echo "configure: failed program was:" >&5
4008 cat conftest.$ac_ext >&5
4009 rm -rf conftest*
4010 gcc_cv_decl_map_anon=no
4012 rm -f conftest*
4015 echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6
4017 if test $gcc_cv_decl_map_anon = no; then
4018 gcc_cv_func_mmap_anon=no
4019 else
4020 echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
4021 echo "configure:4022: checking whether mmap with MAP_ANON(YMOUS) works" >&5
4022 if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then
4023 echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025 # Add a system to this blacklist if it has mmap() and MAP_ANON or
4026 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
4027 # doesn't give anonymous zeroed pages with the same properties listed
4028 # above for use of /dev/zero.
4029 # Systems known to be in this category are Windows, VMS, and SCO Unix.
4030 case "$host_os" in
4031 vms* | cygwin* | pe | mingw* | sco* | udk* )
4032 gcc_cv_func_mmap_anon=no ;;
4034 gcc_cv_func_mmap_anon=yes;;
4035 esac
4038 echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6
4042 if test $gcc_cv_func_mmap_file = yes; then
4043 cat >> confdefs.h <<\EOF
4044 #define HAVE_MMAP_FILE 1
4048 if test $gcc_cv_func_mmap_dev_zero = yes; then
4049 cat >> confdefs.h <<\EOF
4050 #define HAVE_MMAP_DEV_ZERO 1
4054 if test $gcc_cv_func_mmap_anon = yes; then
4055 cat >> confdefs.h <<\EOF
4056 #define HAVE_MMAP_ANON 1
4062 case "${host}" in
4063 *-*-uwin*)
4064 { echo "configure: error:
4065 *** UWIN may not be used as a host platform because
4066 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4068 *-*-*vms*)
4069 # Under VMS, vfork works very different than on Unix. The standard test
4070 # won't work, and it isn't easily adaptable. It makes more sense to
4071 # just force it.
4072 ac_cv_func_vfork_works=yes
4074 esac
4075 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4076 echo "configure:4077: checking for pid_t" >&5
4077 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4078 echo $ac_n "(cached) $ac_c" 1>&6
4079 else
4080 cat > conftest.$ac_ext <<EOF
4081 #line 4082 "configure"
4082 #include "confdefs.h"
4083 #include <sys/types.h>
4084 #if STDC_HEADERS
4085 #include <stdlib.h>
4086 #include <stddef.h>
4087 #endif
4089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4090 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4091 rm -rf conftest*
4092 ac_cv_type_pid_t=yes
4093 else
4094 rm -rf conftest*
4095 ac_cv_type_pid_t=no
4097 rm -f conftest*
4100 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4101 if test $ac_cv_type_pid_t = no; then
4102 cat >> confdefs.h <<\EOF
4103 #define pid_t int
4108 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4109 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4110 echo "configure:4111: checking for vfork.h" >&5
4111 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4112 echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <vfork.h>
4119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4120 { (eval echo configure:4121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4122 if test -z "$ac_err"; then
4123 rm -rf conftest*
4124 eval "ac_cv_header_$ac_safe=yes"
4125 else
4126 echo "$ac_err" >&5
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129 rm -rf conftest*
4130 eval "ac_cv_header_$ac_safe=no"
4132 rm -f conftest*
4134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4135 echo "$ac_t""yes" 1>&6
4136 cat >> confdefs.h <<\EOF
4137 #define HAVE_VFORK_H 1
4140 else
4141 echo "$ac_t""no" 1>&6
4144 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4145 echo "configure:4146: checking for working vfork" >&5
4146 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4147 echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149 if test "$cross_compiling" = yes; then
4150 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4151 echo "configure:4152: checking for vfork" >&5
4152 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4153 echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 /* System header to define __stub macros and hopefully few prototypes,
4159 which can conflict with char vfork(); below. */
4160 #include <assert.h>
4161 /* Override any gcc2 internal prototype to avoid an error. */
4162 /* We use char because int might match the return type of a gcc2
4163 builtin and then its argument prototype would still apply. */
4164 char vfork();
4166 int main() {
4168 /* The GNU C library defines this for functions which it implements
4169 to always fail with ENOSYS. Some functions are actually named
4170 something starting with __ and the normal name is an alias. */
4171 #if defined (__stub_vfork) || defined (__stub___vfork)
4172 choke me
4173 #else
4174 vfork();
4175 #endif
4177 ; return 0; }
4179 if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4180 rm -rf conftest*
4181 eval "ac_cv_func_vfork=yes"
4182 else
4183 echo "configure: failed program was:" >&5
4184 cat conftest.$ac_ext >&5
4185 rm -rf conftest*
4186 eval "ac_cv_func_vfork=no"
4188 rm -f conftest*
4191 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4192 echo "$ac_t""yes" 1>&6
4194 else
4195 echo "$ac_t""no" 1>&6
4198 ac_cv_func_vfork_works=$ac_cv_func_vfork
4199 else
4200 cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 /* Thanks to Paul Eggert for this test. */
4204 #include <stdio.h>
4205 #include <sys/types.h>
4206 #include <sys/stat.h>
4207 #ifdef HAVE_UNISTD_H
4208 #include <unistd.h>
4209 #endif
4210 #ifdef HAVE_VFORK_H
4211 #include <vfork.h>
4212 #endif
4213 /* On some sparc systems, changes by the child to local and incoming
4214 argument registers are propagated back to the parent.
4215 The compiler is told about this with #include <vfork.h>,
4216 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4217 Test for this by using a static variable whose address
4218 is put into a register that is clobbered by the vfork. */
4219 static
4220 #ifdef __cplusplus
4221 sparc_address_test (int arg)
4222 #else
4223 sparc_address_test (arg) int arg;
4224 #endif
4226 static pid_t child;
4227 if (!child) {
4228 child = vfork ();
4229 if (child < 0) {
4230 perror ("vfork");
4231 _exit(2);
4233 if (!child) {
4234 arg = getpid();
4235 write(-1, "", 0);
4236 _exit (arg);
4240 main() {
4241 pid_t parent = getpid ();
4242 pid_t child;
4244 sparc_address_test ();
4246 child = vfork ();
4248 if (child == 0) {
4249 /* Here is another test for sparc vfork register problems.
4250 This test uses lots of local variables, at least
4251 as many local variables as main has allocated so far
4252 including compiler temporaries. 4 locals are enough for
4253 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4254 A buggy compiler should reuse the register of parent
4255 for one of the local variables, since it will think that
4256 parent can't possibly be used any more in this routine.
4257 Assigning to the local variable will thus munge parent
4258 in the parent process. */
4259 pid_t
4260 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4261 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4262 /* Convince the compiler that p..p7 are live; otherwise, it might
4263 use the same hardware register for all 8 local variables. */
4264 if (p != p1 || p != p2 || p != p3 || p != p4
4265 || p != p5 || p != p6 || p != p7)
4266 _exit(1);
4268 /* On some systems (e.g. IRIX 3.3),
4269 vfork doesn't separate parent from child file descriptors.
4270 If the child closes a descriptor before it execs or exits,
4271 this munges the parent's descriptor as well.
4272 Test for this by closing stdout in the child. */
4273 _exit(close(fileno(stdout)) != 0);
4274 } else {
4275 int status;
4276 struct stat st;
4278 while (wait(&status) != child)
4280 exit(
4281 /* Was there some problem with vforking? */
4282 child < 0
4284 /* Did the child fail? (This shouldn't happen.) */
4285 || status
4287 /* Did the vfork/compiler bug occur? */
4288 || parent != getpid()
4290 /* Did the file descriptor bug occur? */
4291 || fstat(fileno(stdout), &st) != 0
4296 if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4297 then
4298 ac_cv_func_vfork_works=yes
4299 else
4300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
4302 rm -fr conftest*
4303 ac_cv_func_vfork_works=no
4305 rm -fr conftest*
4310 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4311 if test $ac_cv_func_vfork_works = no; then
4312 cat >> confdefs.h <<\EOF
4313 #define vfork fork
4321 am_cv_lib_iconv_ldpath=
4322 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4323 if test "${with_libiconv_prefix+set}" = set; then
4324 withval="$with_libiconv_prefix"
4326 for dir in `echo "$withval" | tr : ' '`; do
4327 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4328 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4329 done
4334 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4335 echo "configure:4336: checking for iconv" >&5
4336 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4337 echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4340 am_cv_func_iconv="no, consider installing GNU libiconv"
4341 am_cv_lib_iconv=no
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 #include <stdlib.h>
4346 #include <iconv.h>
4347 int main() {
4348 iconv_t cd = iconv_open("","");
4349 iconv(cd,NULL,NULL,NULL,NULL);
4350 iconv_close(cd);
4351 ; return 0; }
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354 rm -rf conftest*
4355 am_cv_func_iconv=yes
4356 else
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4360 rm -f conftest*
4361 if test "$am_cv_func_iconv" != yes; then
4362 am_save_LIBS="$LIBS"
4363 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 #include <stdlib.h>
4368 #include <iconv.h>
4369 int main() {
4370 iconv_t cd = iconv_open("","");
4371 iconv(cd,NULL,NULL,NULL,NULL);
4372 iconv_close(cd);
4373 ; return 0; }
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376 rm -rf conftest*
4377 am_cv_lib_iconv=yes
4378 am_cv_func_iconv=yes
4379 else
4380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
4383 rm -f conftest*
4384 LIBS="$am_save_LIBS"
4389 echo "$ac_t""$am_cv_func_iconv" 1>&6
4390 if test "$am_cv_func_iconv" = yes; then
4391 cat >> confdefs.h <<\EOF
4392 #define HAVE_ICONV 1
4395 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4396 echo "configure:4397: checking for iconv declaration" >&5
4397 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4398 echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4405 #include <stdlib.h>
4406 #include <iconv.h>
4407 extern
4408 #ifdef __cplusplus
4410 #endif
4411 #if defined(__STDC__) || defined(__cplusplus)
4412 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4413 #else
4414 size_t iconv();
4415 #endif
4417 int main() {
4419 ; return 0; }
4421 if { (eval echo configure:4422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4422 rm -rf conftest*
4423 am_cv_proto_iconv_arg1=""
4424 else
4425 echo "configure: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 rm -rf conftest*
4428 am_cv_proto_iconv_arg1="const"
4430 rm -f conftest*
4431 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);"
4434 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4435 echo "$ac_t""${ac_t:-
4436 }$am_cv_proto_iconv" 1>&6
4437 cat >> confdefs.h <<EOF
4438 #define ICONV_CONST $am_cv_proto_iconv_arg1
4442 LIBICONV=
4443 if test "$am_cv_lib_iconv" = yes; then
4444 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4449 # We will need to find libiberty.h and ansidecl.h
4450 saved_CFLAGS="$CFLAGS"
4451 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4452 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4453 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4454 fprintf_unlocked strstr errno vasprintf \
4455 malloc realloc calloc free basename getopt clock
4457 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4458 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4459 echo "configure:4460: checking whether $ac_func is declared" >&5
4460 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4461 echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 #undef $ac_tr_decl
4467 #define $ac_tr_decl 1
4469 #include "ansidecl.h"
4470 #include "system.h"
4472 int main() {
4473 #ifndef $ac_func
4474 char *(*pfn) = (char *(*)) $ac_func ;
4475 #endif
4476 ; return 0; }
4478 if { (eval echo configure:4479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4479 rm -rf conftest*
4480 eval "gcc_cv_have_decl_$ac_func=yes"
4481 else
4482 echo "configure: failed program was:" >&5
4483 cat conftest.$ac_ext >&5
4484 rm -rf conftest*
4485 eval "gcc_cv_have_decl_$ac_func=no"
4487 rm -f conftest*
4490 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4492 #define $ac_tr_decl 1
4495 else
4496 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4497 #define $ac_tr_decl 0
4502 done
4503 if test x = y ; then
4504 cat >> confdefs.h <<\EOF
4505 #define HAVE_DECL_GETENV 1
4507 cat >> confdefs.h <<\EOF
4508 #define HAVE_DECL_ATOL 1
4510 cat >> confdefs.h <<\EOF
4511 #define HAVE_DECL_SBRK 1
4513 cat >> confdefs.h <<\EOF
4514 #define HAVE_DECL_ABORT 1
4516 cat >> confdefs.h <<\EOF
4517 #define HAVE_DECL_ATOF 1
4519 cat >> confdefs.h <<\EOF
4520 #define HAVE_DECL_GETCWD 1
4522 cat >> confdefs.h <<\EOF
4523 #define HAVE_DECL_GETWD 1
4526 cat >> confdefs.h <<\EOF
4527 #define HAVE_DECL_STRSIGNAL 1
4529 cat >> confdefs.h <<\EOF
4530 #define HAVE_DECL_PUTC_UNLOCKED 1
4532 cat >> confdefs.h <<\EOF
4533 #define HAVE_DECL_FPUTS_UNLOCKED 1
4535 cat >> confdefs.h <<\EOF
4536 #define HAVE_DECL_FWRITE_UNLOCKED 1
4539 cat >> confdefs.h <<\EOF
4540 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4542 cat >> confdefs.h <<\EOF
4543 #define HAVE_DECL_STRSTR 1
4545 cat >> confdefs.h <<\EOF
4546 #define HAVE_DECL_ERRNO 1
4548 cat >> confdefs.h <<\EOF
4549 #define HAVE_DECL_VASPRINTF 1
4552 cat >> confdefs.h <<\EOF
4553 #define HAVE_DECL_MALLOC 1
4555 cat >> confdefs.h <<\EOF
4556 #define HAVE_DECL_REALLOC 1
4558 cat >> confdefs.h <<\EOF
4559 #define HAVE_DECL_CALLOC 1
4561 cat >> confdefs.h <<\EOF
4562 #define HAVE_DECL_FREE 1
4564 cat >> confdefs.h <<\EOF
4565 #define HAVE_DECL_BASENAME 1
4567 cat >> confdefs.h <<\EOF
4568 #define HAVE_DECL_GETOPT 1
4570 cat >> confdefs.h <<\EOF
4571 #define HAVE_DECL_CLOCK 1
4576 for ac_func in getrlimit setrlimit getrusage
4578 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4579 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4580 echo "configure:4581: checking whether $ac_func is declared" >&5
4581 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4582 echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584 cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 #undef $ac_tr_decl
4588 #define $ac_tr_decl 1
4590 #include "ansidecl.h"
4591 #include "system.h"
4592 #ifdef HAVE_SYS_RESOURCE_H
4593 #include <sys/resource.h>
4594 #endif
4597 int main() {
4598 #ifndef $ac_func
4599 char *(*pfn) = (char *(*)) $ac_func ;
4600 #endif
4601 ; return 0; }
4603 if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4604 rm -rf conftest*
4605 eval "gcc_cv_have_decl_$ac_func=yes"
4606 else
4607 echo "configure: failed program was:" >&5
4608 cat conftest.$ac_ext >&5
4609 rm -rf conftest*
4610 eval "gcc_cv_have_decl_$ac_func=no"
4612 rm -f conftest*
4615 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4616 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4617 #define $ac_tr_decl 1
4620 else
4621 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4622 #define $ac_tr_decl 0
4627 done
4628 if test x = y ; then
4629 cat >> confdefs.h <<\EOF
4630 #define HAVE_DECL_GETRLIMIT 1
4632 cat >> confdefs.h <<\EOF
4633 #define HAVE_DECL_SETRLIMIT 1
4635 cat >> confdefs.h <<\EOF
4636 #define HAVE_DECL_GETRUSAGE 1
4641 cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4645 #include "ansidecl.h"
4646 #include "system.h"
4647 #ifdef HAVE_SYS_RESOURCE_H
4648 #include <sys/resource.h>
4649 #endif
4651 int main() {
4652 rlim_t l = 0;
4653 ; return 0; }
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4657 else
4658 echo "configure: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
4660 rm -rf conftest*
4661 cat >> confdefs.h <<\EOF
4662 #define rlim_t long
4666 rm -f conftest*
4668 for ac_func in ldgetname
4670 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4671 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4672 echo "configure:4673: checking whether $ac_func is declared" >&5
4673 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4674 echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #undef $ac_tr_decl
4680 #define $ac_tr_decl 1
4682 #include "ansidecl.h"
4683 #include "system.h"
4684 #ifdef HAVE_LDFCN_H
4685 #include <ldfcn.h>
4686 #endif
4689 int main() {
4690 #ifndef $ac_func
4691 char *(*pfn) = (char *(*)) $ac_func ;
4692 #endif
4693 ; return 0; }
4695 if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4696 rm -rf conftest*
4697 eval "gcc_cv_have_decl_$ac_func=yes"
4698 else
4699 echo "configure: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 rm -rf conftest*
4702 eval "gcc_cv_have_decl_$ac_func=no"
4704 rm -f conftest*
4707 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4708 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4709 #define $ac_tr_decl 1
4712 else
4713 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4714 #define $ac_tr_decl 0
4719 done
4720 if test x = y ; then
4721 cat >> confdefs.h <<\EOF
4722 #define HAVE_DECL_LDGETNAME 1
4727 for ac_func in times
4729 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4730 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4731 echo "configure:4732: checking whether $ac_func is declared" >&5
4732 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4733 echo $ac_n "(cached) $ac_c" 1>&6
4734 else
4735 cat > conftest.$ac_ext <<EOF
4736 #line 4737 "configure"
4737 #include "confdefs.h"
4738 #undef $ac_tr_decl
4739 #define $ac_tr_decl 1
4741 #include "ansidecl.h"
4742 #include "system.h"
4743 #ifdef HAVE_SYS_TIMES_H
4744 #include <sys/times.h>
4745 #endif
4748 int main() {
4749 #ifndef $ac_func
4750 char *(*pfn) = (char *(*)) $ac_func ;
4751 #endif
4752 ; return 0; }
4754 if { (eval echo configure:4755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4755 rm -rf conftest*
4756 eval "gcc_cv_have_decl_$ac_func=yes"
4757 else
4758 echo "configure: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760 rm -rf conftest*
4761 eval "gcc_cv_have_decl_$ac_func=no"
4763 rm -f conftest*
4766 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4768 #define $ac_tr_decl 1
4771 else
4772 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4773 #define $ac_tr_decl 0
4778 done
4779 if test x = y ; then
4780 cat >> confdefs.h <<\EOF
4781 #define HAVE_DECL_TIMES 1
4786 # More time-related stuff.
4787 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4788 echo "configure:4789: checking for struct tms" >&5
4789 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4790 echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4793 cat > conftest.$ac_ext <<EOF
4794 #line 4795 "configure"
4795 #include "confdefs.h"
4797 #include "ansidecl.h"
4798 #include "system.h"
4799 #ifdef HAVE_SYS_TIMES_H
4800 #include <sys/times.h>
4801 #endif
4803 int main() {
4804 struct tms tms;
4805 ; return 0; }
4807 if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4808 rm -rf conftest*
4809 ac_cv_struct_tms=yes
4810 else
4811 echo "configure: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 rm -rf conftest*
4814 ac_cv_struct_tms=no
4816 rm -f conftest*
4819 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4820 if test $ac_cv_struct_tms = yes; then
4821 cat >> confdefs.h <<\EOF
4822 #define HAVE_STRUCT_TMS 1
4827 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4828 # revisit after autoconf 2.50.
4829 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4830 echo "configure:4831: checking for clock_t" >&5
4831 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4832 echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4835 cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4839 #include "ansidecl.h"
4840 #include "system.h"
4842 int main() {
4843 clock_t x;
4844 ; return 0; }
4846 if { (eval echo configure:4847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4847 rm -rf conftest*
4848 gcc_cv_type_clock_t=yes
4849 else
4850 echo "configure: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 rm -rf conftest*
4853 gcc_cv_type_clock_t=no
4855 rm -f conftest*
4858 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4859 if test $gcc_cv_type_clock_t = yes; then
4860 cat >> confdefs.h <<\EOF
4861 #define HAVE_CLOCK_T 1
4866 echo $ac_n "checking for uchar""... $ac_c" 1>&6
4867 echo "configure:4868: checking for uchar" >&5
4868 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871 cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4875 #include "ansidecl.h"
4876 #include "system.h"
4878 int main() {
4879 if ((uchar *)0) return 0;
4880 if (sizeof(uchar)) return 0;
4881 ; return 0; }
4883 if { (eval echo configure:4884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4884 rm -rf conftest*
4885 ac_cv_type_uchar=yes
4886 else
4887 echo "configure: failed program was:" >&5
4888 cat conftest.$ac_ext >&5
4889 rm -rf conftest*
4890 ac_cv_type_uchar=no
4892 rm -f conftest*
4895 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
4896 if test $ac_cv_type_uchar = yes; then
4897 cat >> confdefs.h <<\EOF
4898 #define HAVE_UCHAR 1
4903 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4904 CFLAGS="$saved_CFLAGS"
4906 # Check whether --enable-initfini-array or --disable-initfini-array was given.
4907 if test "${enable_initfini_array+set}" = set; then
4908 enableval="$enable_initfini_array"
4910 else
4912 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
4913 echo "configure:4914: checking for .preinit_array/.init_array/.fini_array support" >&5
4914 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
4915 echo $ac_n "(cached) $ac_c" 1>&6
4916 else
4917 if test "$cross_compiling" = yes; then
4918 gcc_cv_initfini_array=no
4919 else
4920 cat > conftest.$ac_ext <<EOF
4921 #line 4922 "configure"
4922 #include "confdefs.h"
4924 static int x = -1;
4925 int main (void) { return x; }
4926 int foo (void) { x = 0; }
4927 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
4929 if { (eval echo configure:4930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4930 then
4931 gcc_cv_initfini_array=yes
4932 else
4933 echo "configure: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
4935 rm -fr conftest*
4936 gcc_cv_initfini_array=no
4938 rm -fr conftest*
4943 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
4944 enable_initfini_array=$gcc_cv_initfini_array
4948 if test $enable_initfini_array = yes; then
4949 cat >> confdefs.h <<\EOF
4950 #define HAVE_INITFINI_ARRAY 1
4955 # mkdir takes a single argument on some systems.
4956 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4957 echo "configure:4958: checking if mkdir takes one argument" >&5
4958 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4959 echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961 cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4965 #include <sys/types.h>
4966 #ifdef HAVE_SYS_STAT_H
4967 # include <sys/stat.h>
4968 #endif
4969 #ifdef HAVE_UNISTD_H
4970 # include <unistd.h>
4971 #endif
4972 #ifdef HAVE_DIRECT_H
4973 # include <direct.h>
4974 #endif
4975 int main() {
4976 mkdir ("foo", 0);
4977 ; return 0; }
4979 if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4980 rm -rf conftest*
4981 gcc_cv_mkdir_takes_one_arg=no
4982 else
4983 echo "configure: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 rm -rf conftest*
4986 gcc_cv_mkdir_takes_one_arg=yes
4988 rm -f conftest*
4991 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4992 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4993 cat >> confdefs.h <<\EOF
4994 #define MKDIR_TAKES_ONE_ARG 1
5000 # File extensions
5001 manext='.1'
5002 objext='.o'
5006 # With Setjmp/Longjmp based exception handling.
5007 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5008 if test "${enable_sjlj_exceptions+set}" = set; then
5009 enableval="$enable_sjlj_exceptions"
5010 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5011 cat >> confdefs.h <<EOF
5012 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5018 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5019 echo "configure:5020: checking for main in -lunwind" >&5
5020 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5021 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5022 echo $ac_n "(cached) $ac_c" 1>&6
5023 else
5024 ac_save_LIBS="$LIBS"
5025 LIBS="-lunwind $LIBS"
5026 cat > conftest.$ac_ext <<EOF
5027 #line 5028 "configure"
5028 #include "confdefs.h"
5030 int main() {
5031 main()
5032 ; return 0; }
5034 if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5035 rm -rf conftest*
5036 eval "ac_cv_lib_$ac_lib_var=yes"
5037 else
5038 echo "configure: failed program was:" >&5
5039 cat conftest.$ac_ext >&5
5040 rm -rf conftest*
5041 eval "ac_cv_lib_$ac_lib_var=no"
5043 rm -f conftest*
5044 LIBS="$ac_save_LIBS"
5047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5048 echo "$ac_t""yes" 1>&6
5049 use_libunwind_default=yes
5050 else
5051 echo "$ac_t""no" 1>&6
5052 use_libunwind_default=no
5055 # Use libunwind based exception handling.
5056 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5057 if test "${enable_libunwind_exceptions+set}" = set; then
5058 enableval="$enable_libunwind_exceptions"
5059 use_libunwind_exceptions=$enableval
5060 else
5061 use_libunwind_exceptions=$use_libunwind_default
5064 if test x"$use_libunwind_exceptions" = xyes; then
5065 cat >> confdefs.h <<\EOF
5066 #define USE_LIBUNWIND_EXCEPTIONS 1
5071 # --------------------------------------------------------
5072 # Build, host, and target specific configuration fragments
5073 # --------------------------------------------------------
5075 target_gtfiles=
5076 build_xm_file=
5077 build_xm_defines=
5078 build_install_headers_dir=install-headers-tar
5079 build_exeext=
5080 host_xm_file=
5081 host_xm_defines=
5082 host_xmake_file=
5083 host_exeext=
5085 # Decode the host machine, then the target machine.
5086 # For the host machine, we save the xm_file variable as host_xm_file;
5087 # then we decode the target machine and forget everything else
5088 # that came from the host machine.
5089 for machine in $build $host $target; do
5090 . ${srcdir}/config.gcc
5091 done
5093 extra_objs="${host_extra_objs} ${extra_objs}"
5095 # Default the target-machine variables that were not explicitly set.
5096 if test x"$tm_file" = x
5097 then tm_file=$cpu_type/$cpu_type.h; fi
5099 if test x"$extra_headers" = x
5100 then extra_headers=; fi
5102 if test x$md_file = x
5103 then md_file=$cpu_type/$cpu_type.md; fi
5105 if test x$out_file = x
5106 then out_file=$cpu_type/$cpu_type.c; fi
5108 if test x"$tmake_file" = x
5109 then tmake_file=$cpu_type/t-$cpu_type
5112 if test x"$dwarf2" = xyes
5113 then tm_file="$tm_file tm-dwarf2.h"
5116 # Say what files are being used for the output code and MD file.
5117 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5118 echo "Using \`$srcdir/config/$md_file' as machine description file."
5120 # If any of the xm_file variables contain nonexistent files, warn
5121 # about them and drop them.
5124 for x in $build_xm_file; do
5125 if test -f $srcdir/config/$x
5126 then bx="$bx $x"
5127 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5129 done
5130 build_xm_file="$bx"
5133 for x in $host_xm_file; do
5134 if test -f $srcdir/config/$x
5135 then hx="$hx $x"
5136 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5138 done
5139 host_xm_file="$hx"
5142 for x in $xm_file; do
5143 if test -f $srcdir/config/$x
5144 then tx="$tx $x"
5145 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5147 done
5148 xm_file="$tx"
5150 count=a
5151 for f in $tm_file; do
5152 count=${count}x
5153 done
5154 if test $count = ax; then
5155 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5156 else
5157 echo "Using the following target machine macro files:"
5158 for f in $tm_file; do
5159 echo " $srcdir/config/$f"
5160 done
5163 if test x$need_64bit_hwint = xyes; then
5164 cat >> confdefs.h <<\EOF
5165 #define NEED_64BIT_HOST_WIDE_INT 1
5170 count=a
5171 for f in $host_xm_file; do
5172 count=${count}x
5173 done
5174 if test $count = a; then
5176 elif test $count = ax; then
5177 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5178 else
5179 echo "Using the following host machine macro files:"
5180 for f in $host_xm_file; do
5181 echo " $srcdir/config/$f"
5182 done
5184 echo "Using ${out_host_hook_obj} for host machine hooks."
5186 if test "$host_xm_file" != "$build_xm_file"; then
5187 count=a
5188 for f in $build_xm_file; do
5189 count=${count}x
5190 done
5191 if test $count = a; then
5193 elif test $count = ax; then
5194 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5195 else
5196 echo "Using the following build machine macro files:"
5197 for f in $build_xm_file; do
5198 echo " $srcdir/config/$f"
5199 done
5203 if test x$thread_file = x; then
5204 if test x$target_thread_file != x; then
5205 thread_file=$target_thread_file
5206 else
5207 thread_file='single'
5211 if test x$enable___cxa_atexit = xyes || \
5212 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
5213 cat >> confdefs.h <<\EOF
5214 #define DEFAULT_USE_CXA_ATEXIT 1
5219 # Look for a file containing extra machine modes.
5220 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5221 extra_modes_file='$(srcdir)'/config/${extra_modes}
5223 cat >> confdefs.h <<EOF
5224 #define EXTRA_MODES_FILE "$extra_modes"
5227 cat >> confdefs.h <<\EOF
5228 #define EXTRA_CC_MODES 1
5233 # auto-host.h is the file containing items generated by autoconf and is
5234 # the first file included by config.h.
5235 # If host=build, it is correct to have bconfig include auto-host.h
5236 # as well. If host!=build, we are in error and need to do more
5237 # work to find out the build config parameters.
5238 if test x$host = x$build
5239 then
5240 build_auto=auto-host.h
5241 FORBUILD=..
5242 else
5243 # We create a subdir, then run autoconf in the subdir.
5244 # To prevent recursion we set host and build for the new
5245 # invocation of configure to the build for this invocation
5246 # of configure.
5247 tempdir=build.$$
5248 rm -rf $tempdir
5249 mkdir $tempdir
5250 cd $tempdir
5251 case ${srcdir} in
5252 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5253 *) realsrcdir=../${srcdir};;
5254 esac
5255 saved_CFLAGS="${CFLAGS}"
5256 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5257 ${realsrcdir}/configure \
5258 --target=$target_alias --host=$build_alias --build=$build_alias
5259 CFLAGS="${saved_CFLAGS}"
5261 # We just finished tests for the build machine, so rename
5262 # the file auto-build.h in the gcc directory.
5263 mv auto-host.h ../auto-build.h
5264 cd ..
5265 rm -rf $tempdir
5266 build_auto=auto-build.h
5267 FORBUILD=../${build_subdir}
5271 tm_file="${tm_file} defaults.h"
5272 tm_p_file="${tm_p_file} tm-preds.h"
5273 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5274 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5275 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5276 # put this back in temporarily.
5277 xm_file="ansidecl.h ${xm_file}"
5279 # --------
5280 # UNSORTED
5281 # --------
5283 # Get the version trigger filename from the toplevel
5284 if test "${with_gcc_version_trigger+set}" = set; then
5285 gcc_version_trigger=$with_gcc_version_trigger
5286 else
5287 gcc_version_trigger=${srcdir}/version.c
5289 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5290 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5292 # Compile in configure arguments.
5293 if test -f configargs.h ; then
5294 # Being re-configured.
5295 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5296 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5297 else
5298 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5300 cat > configargs.h <<EOF
5301 /* Generated automatically. */
5302 static const char configuration_arguments[] = "$gcc_config_arguments";
5303 static const char thread_model[] = "$thread_file";
5305 static const struct {
5306 const char *name, *value;
5307 } configure_default_options[] = $configure_default_options;
5310 # Internationalization
5311 PACKAGE=gcc
5312 VERSION="$gcc_version"
5316 # Enable NLS support by default
5317 # Check whether --enable-nls or --disable-nls was given.
5318 if test "${enable_nls+set}" = set; then
5319 enableval="$enable_nls"
5321 else
5322 enable_nls=yes
5326 # if cross compiling, disable NLS support.
5327 # It's not worth the trouble, at least for now.
5329 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5330 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5331 enable_nls=no
5336 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5337 echo "configure:5338: checking for library containing strerror" >&5
5338 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5339 echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341 ac_func_search_save_LIBS="$LIBS"
5342 ac_cv_search_strerror="no"
5343 cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346 /* Override any gcc2 internal prototype to avoid an error. */
5347 /* We use char because int might match the return type of a gcc2
5348 builtin and then its argument prototype would still apply. */
5349 char strerror();
5351 int main() {
5352 strerror()
5353 ; return 0; }
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356 rm -rf conftest*
5357 ac_cv_search_strerror="none required"
5358 else
5359 echo "configure: failed program was:" >&5
5360 cat conftest.$ac_ext >&5
5362 rm -f conftest*
5363 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5364 LIBS="-l$i $ac_func_search_save_LIBS"
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* Override any gcc2 internal prototype to avoid an error. */
5369 /* We use char because int might match the return type of a gcc2
5370 builtin and then its argument prototype would still apply. */
5371 char strerror();
5373 int main() {
5374 strerror()
5375 ; return 0; }
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378 rm -rf conftest*
5379 ac_cv_search_strerror="-l$i"
5380 break
5381 else
5382 echo "configure: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5385 rm -f conftest*
5386 done
5387 LIBS="$ac_func_search_save_LIBS"
5390 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5391 if test "$ac_cv_search_strerror" != "no"; then
5392 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5394 else :
5399 echo $ac_n "checking for working const""... $ac_c" 1>&6
5400 echo "configure:5401: checking for working const" >&5
5401 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5402 echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5408 int main() {
5410 /* Ultrix mips cc rejects this. */
5411 typedef int charset[2]; const charset x;
5412 /* SunOS 4.1.1 cc rejects this. */
5413 char const *const *ccp;
5414 char **p;
5415 /* NEC SVR4.0.2 mips cc rejects this. */
5416 struct point {int x, y;};
5417 static struct point const zero = {0,0};
5418 /* AIX XL C 1.02.0.0 rejects this.
5419 It does not let you subtract one const X* pointer from another in an arm
5420 of an if-expression whose if-part is not a constant expression */
5421 const char *g = "string";
5422 ccp = &g + (g ? g-g : 0);
5423 /* HPUX 7.0 cc rejects these. */
5424 ++ccp;
5425 p = (char**) ccp;
5426 ccp = (char const *const *) p;
5427 { /* SCO 3.2v4 cc rejects this. */
5428 char *t;
5429 char const *s = 0 ? (char *) 0 : (char const *) 0;
5431 *t++ = 0;
5433 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5434 int x[] = {25, 17};
5435 const int *foo = &x[0];
5436 ++foo;
5438 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5439 typedef const int *iptr;
5440 iptr p = 0;
5441 ++p;
5443 { /* AIX XL C 1.02.0.0 rejects this saying
5444 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5445 struct s { int j; const int *ap[3]; };
5446 struct s *b; b->j = 5;
5448 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5449 const int foo = 10;
5452 ; return 0; }
5454 if { (eval echo configure:5455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5455 rm -rf conftest*
5456 ac_cv_c_const=yes
5457 else
5458 echo "configure: failed program was:" >&5
5459 cat conftest.$ac_ext >&5
5460 rm -rf conftest*
5461 ac_cv_c_const=no
5463 rm -f conftest*
5466 echo "$ac_t""$ac_cv_c_const" 1>&6
5467 if test $ac_cv_c_const = no; then
5468 cat >> confdefs.h <<\EOF
5469 #define const
5474 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5475 echo "configure:5476: checking for off_t" >&5
5476 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 #include <sys/types.h>
5483 #if STDC_HEADERS
5484 #include <stdlib.h>
5485 #include <stddef.h>
5486 #endif
5488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5489 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5490 rm -rf conftest*
5491 ac_cv_type_off_t=yes
5492 else
5493 rm -rf conftest*
5494 ac_cv_type_off_t=no
5496 rm -f conftest*
5499 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5500 if test $ac_cv_type_off_t = no; then
5501 cat >> confdefs.h <<\EOF
5502 #define off_t long
5507 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5508 echo "configure:5509: checking for size_t" >&5
5509 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5510 echo $ac_n "(cached) $ac_c" 1>&6
5511 else
5512 cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 #include <sys/types.h>
5516 #if STDC_HEADERS
5517 #include <stdlib.h>
5518 #include <stddef.h>
5519 #endif
5521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5522 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5523 rm -rf conftest*
5524 ac_cv_type_size_t=yes
5525 else
5526 rm -rf conftest*
5527 ac_cv_type_size_t=no
5529 rm -f conftest*
5532 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5533 if test $ac_cv_type_size_t = no; then
5534 cat >> confdefs.h <<\EOF
5535 #define size_t unsigned
5540 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5541 # for constant arguments. Useless!
5542 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5543 echo "configure:5544: checking for working alloca.h" >&5
5544 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5545 echo $ac_n "(cached) $ac_c" 1>&6
5546 else
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 #include <alloca.h>
5551 int main() {
5552 char *p = alloca(2 * sizeof(int));
5553 ; return 0; }
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556 rm -rf conftest*
5557 ac_cv_header_alloca_h=yes
5558 else
5559 echo "configure: failed program was:" >&5
5560 cat conftest.$ac_ext >&5
5561 rm -rf conftest*
5562 ac_cv_header_alloca_h=no
5564 rm -f conftest*
5567 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5568 if test $ac_cv_header_alloca_h = yes; then
5569 cat >> confdefs.h <<\EOF
5570 #define HAVE_ALLOCA_H 1
5575 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5576 echo "configure:5577: checking for alloca" >&5
5577 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5578 echo $ac_n "(cached) $ac_c" 1>&6
5579 else
5580 cat > conftest.$ac_ext <<EOF
5581 #line 5582 "configure"
5582 #include "confdefs.h"
5584 #ifdef __GNUC__
5585 # define alloca __builtin_alloca
5586 #else
5587 # ifdef _MSC_VER
5588 # include <malloc.h>
5589 # define alloca _alloca
5590 # else
5591 # if HAVE_ALLOCA_H
5592 # include <alloca.h>
5593 # else
5594 # ifdef _AIX
5595 #pragma alloca
5596 # else
5597 # ifndef alloca /* predefined by HP cc +Olibcalls */
5598 char *alloca ();
5599 # endif
5600 # endif
5601 # endif
5602 # endif
5603 #endif
5605 int main() {
5606 char *p = (char *) alloca(1);
5607 ; return 0; }
5609 if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5610 rm -rf conftest*
5611 ac_cv_func_alloca_works=yes
5612 else
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 ac_cv_func_alloca_works=no
5618 rm -f conftest*
5621 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5622 if test $ac_cv_func_alloca_works = yes; then
5623 cat >> confdefs.h <<\EOF
5624 #define HAVE_ALLOCA 1
5629 if test $ac_cv_func_alloca_works = no; then
5630 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5631 # that cause trouble. Some versions do not even contain alloca or
5632 # contain a buggy version. If you still want to use their alloca,
5633 # use ar to extract alloca.o from them instead of compiling alloca.c.
5634 ALLOCA=alloca.${ac_objext}
5635 cat >> confdefs.h <<\EOF
5636 #define C_ALLOCA 1
5640 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5641 echo "configure:5642: checking whether alloca needs Cray hooks" >&5
5642 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5643 echo $ac_n "(cached) $ac_c" 1>&6
5644 else
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648 #if defined(CRAY) && ! defined(CRAY2)
5649 webecray
5650 #else
5651 wenotbecray
5652 #endif
5655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5656 egrep "webecray" >/dev/null 2>&1; then
5657 rm -rf conftest*
5658 ac_cv_os_cray=yes
5659 else
5660 rm -rf conftest*
5661 ac_cv_os_cray=no
5663 rm -f conftest*
5667 echo "$ac_t""$ac_cv_os_cray" 1>&6
5668 if test $ac_cv_os_cray = yes; then
5669 for ac_func in _getb67 GETB67 getb67; do
5670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5671 echo "configure:5672: checking for $ac_func" >&5
5672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5673 echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675 cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679 which can conflict with char $ac_func(); below. */
5680 #include <assert.h>
5681 /* Override any gcc2 internal prototype to avoid an error. */
5682 /* We use char because int might match the return type of a gcc2
5683 builtin and then its argument prototype would still apply. */
5684 char $ac_func();
5686 int main() {
5688 /* The GNU C library defines this for functions which it implements
5689 to always fail with ENOSYS. Some functions are actually named
5690 something starting with __ and the normal name is an alias. */
5691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5692 choke me
5693 #else
5694 $ac_func();
5695 #endif
5697 ; return 0; }
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700 rm -rf conftest*
5701 eval "ac_cv_func_$ac_func=yes"
5702 else
5703 echo "configure: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 rm -rf conftest*
5706 eval "ac_cv_func_$ac_func=no"
5708 rm -f conftest*
5711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5712 echo "$ac_t""yes" 1>&6
5713 cat >> confdefs.h <<EOF
5714 #define CRAY_STACKSEG_END $ac_func
5717 break
5718 else
5719 echo "$ac_t""no" 1>&6
5722 done
5725 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5726 echo "configure:5727: checking stack direction for C alloca" >&5
5727 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5728 echo $ac_n "(cached) $ac_c" 1>&6
5729 else
5730 if test "$cross_compiling" = yes; then
5731 ac_cv_c_stack_direction=0
5732 else
5733 cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736 find_stack_direction ()
5738 static char *addr = 0;
5739 auto char dummy;
5740 if (addr == 0)
5742 addr = &dummy;
5743 return find_stack_direction ();
5745 else
5746 return (&dummy > addr) ? 1 : -1;
5748 main ()
5750 exit (find_stack_direction() < 0);
5753 if { (eval echo configure:5754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5754 then
5755 ac_cv_c_stack_direction=1
5756 else
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5759 rm -fr conftest*
5760 ac_cv_c_stack_direction=-1
5762 rm -fr conftest*
5767 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5768 cat >> confdefs.h <<EOF
5769 #define STACK_DIRECTION $ac_cv_c_stack_direction
5775 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5776 echo "configure:5777: checking whether we are using the GNU C Library 2.1 or newer" >&5
5777 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5784 #include <features.h>
5785 #ifdef __GNU_LIBRARY__
5786 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5787 Lucky GNU user
5788 #endif
5789 #endif
5792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5793 egrep "Lucky GNU user" >/dev/null 2>&1; then
5794 rm -rf conftest*
5795 ac_cv_gnu_library_2_1=yes
5796 else
5797 rm -rf conftest*
5798 ac_cv_gnu_library_2_1=no
5800 rm -f conftest*
5806 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5808 GLIBC21="$ac_cv_gnu_library_2_1"
5812 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5813 stdlib.h string.h unistd.h sys/param.h
5815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5817 echo "configure:5818: checking for $ac_hdr" >&5
5818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5819 echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821 cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 #include <$ac_hdr>
5826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5827 { (eval echo configure:5828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5829 if test -z "$ac_err"; then
5830 rm -rf conftest*
5831 eval "ac_cv_header_$ac_safe=yes"
5832 else
5833 echo "$ac_err" >&5
5834 echo "configure: failed program was:" >&5
5835 cat conftest.$ac_ext >&5
5836 rm -rf conftest*
5837 eval "ac_cv_header_$ac_safe=no"
5839 rm -f conftest*
5841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5842 echo "$ac_t""yes" 1>&6
5843 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5844 cat >> confdefs.h <<EOF
5845 #define $ac_tr_hdr 1
5848 else
5849 echo "$ac_t""no" 1>&6
5851 done
5853 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5854 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5855 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5858 echo "configure:5859: checking for $ac_func" >&5
5859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5860 echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862 cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 /* System header to define __stub macros and hopefully few prototypes,
5866 which can conflict with char $ac_func(); below. */
5867 #include <assert.h>
5868 /* Override any gcc2 internal prototype to avoid an error. */
5869 /* We use char because int might match the return type of a gcc2
5870 builtin and then its argument prototype would still apply. */
5871 char $ac_func();
5873 int main() {
5875 /* The GNU C library defines this for functions which it implements
5876 to always fail with ENOSYS. Some functions are actually named
5877 something starting with __ and the normal name is an alias. */
5878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5879 choke me
5880 #else
5881 $ac_func();
5882 #endif
5884 ; return 0; }
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887 rm -rf conftest*
5888 eval "ac_cv_func_$ac_func=yes"
5889 else
5890 echo "configure: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892 rm -rf conftest*
5893 eval "ac_cv_func_$ac_func=no"
5895 rm -f conftest*
5898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5899 echo "$ac_t""yes" 1>&6
5900 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5901 cat >> confdefs.h <<EOF
5902 #define $ac_tr_func 1
5905 else
5906 echo "$ac_t""no" 1>&6
5908 done
5913 am_cv_lib_iconv_ldpath=
5914 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5915 if test "${with_libiconv_prefix+set}" = set; then
5916 withval="$with_libiconv_prefix"
5918 for dir in `echo "$withval" | tr : ' '`; do
5919 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5920 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5921 done
5926 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5927 echo "configure:5928: checking for iconv" >&5
5928 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5929 echo $ac_n "(cached) $ac_c" 1>&6
5930 else
5932 am_cv_func_iconv="no, consider installing GNU libiconv"
5933 am_cv_lib_iconv=no
5934 cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 #include <stdlib.h>
5938 #include <iconv.h>
5939 int main() {
5940 iconv_t cd = iconv_open("","");
5941 iconv(cd,NULL,NULL,NULL,NULL);
5942 iconv_close(cd);
5943 ; return 0; }
5945 if { (eval echo configure:5946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5946 rm -rf conftest*
5947 am_cv_func_iconv=yes
5948 else
5949 echo "configure: failed program was:" >&5
5950 cat conftest.$ac_ext >&5
5952 rm -f conftest*
5953 if test "$am_cv_func_iconv" != yes; then
5954 am_save_LIBS="$LIBS"
5955 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5956 cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 #include <stdlib.h>
5960 #include <iconv.h>
5961 int main() {
5962 iconv_t cd = iconv_open("","");
5963 iconv(cd,NULL,NULL,NULL,NULL);
5964 iconv_close(cd);
5965 ; return 0; }
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968 rm -rf conftest*
5969 am_cv_lib_iconv=yes
5970 am_cv_func_iconv=yes
5971 else
5972 echo "configure: failed program was:" >&5
5973 cat conftest.$ac_ext >&5
5975 rm -f conftest*
5976 LIBS="$am_save_LIBS"
5981 echo "$ac_t""$am_cv_func_iconv" 1>&6
5982 if test "$am_cv_func_iconv" = yes; then
5983 cat >> confdefs.h <<\EOF
5984 #define HAVE_ICONV 1
5987 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5988 echo "configure:5989: checking for iconv declaration" >&5
5989 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5990 echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5997 #include <stdlib.h>
5998 #include <iconv.h>
5999 extern
6000 #ifdef __cplusplus
6002 #endif
6003 #if defined(__STDC__) || defined(__cplusplus)
6004 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6005 #else
6006 size_t iconv();
6007 #endif
6009 int main() {
6011 ; return 0; }
6013 if { (eval echo configure:6014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6014 rm -rf conftest*
6015 am_cv_proto_iconv_arg1=""
6016 else
6017 echo "configure: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
6019 rm -rf conftest*
6020 am_cv_proto_iconv_arg1="const"
6022 rm -f conftest*
6023 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);"
6026 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6027 echo "$ac_t""${ac_t:-
6028 }$am_cv_proto_iconv" 1>&6
6029 cat >> confdefs.h <<EOF
6030 #define ICONV_CONST $am_cv_proto_iconv_arg1
6034 LIBICONV=
6035 if test "$am_cv_lib_iconv" = yes; then
6036 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6041 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6042 echo "configure:6043: checking for nl_langinfo and CODESET" >&5
6043 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 #include <langinfo.h>
6050 int main() {
6051 char* cs = nl_langinfo(CODESET);
6052 ; return 0; }
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055 rm -rf conftest*
6056 am_cv_langinfo_codeset=yes
6057 else
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 rm -rf conftest*
6061 am_cv_langinfo_codeset=no
6063 rm -f conftest*
6067 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6068 if test $am_cv_langinfo_codeset = yes; then
6069 cat >> confdefs.h <<\EOF
6070 #define HAVE_LANGINFO_CODESET 1
6075 if test $ac_cv_header_locale_h = yes; then
6076 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6077 echo "configure:6078: checking for LC_MESSAGES" >&5
6078 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6079 echo $ac_n "(cached) $ac_c" 1>&6
6080 else
6081 cat > conftest.$ac_ext <<EOF
6082 #line 6083 "configure"
6083 #include "confdefs.h"
6084 #include <locale.h>
6085 int main() {
6086 return LC_MESSAGES
6087 ; return 0; }
6089 if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6090 rm -rf conftest*
6091 am_cv_val_LC_MESSAGES=yes
6092 else
6093 echo "configure: failed program was:" >&5
6094 cat conftest.$ac_ext >&5
6095 rm -rf conftest*
6096 am_cv_val_LC_MESSAGES=no
6098 rm -f conftest*
6101 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6102 if test $am_cv_val_LC_MESSAGES = yes; then
6103 cat >> confdefs.h <<\EOF
6104 #define HAVE_LC_MESSAGES 1
6109 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6110 echo "configure:6111: checking whether NLS is requested" >&5
6111 # Check whether --enable-nls or --disable-nls was given.
6112 if test "${enable_nls+set}" = set; then
6113 enableval="$enable_nls"
6114 USE_NLS=$enableval
6115 else
6116 USE_NLS=yes
6119 echo "$ac_t""$USE_NLS" 1>&6
6122 BUILD_INCLUDED_LIBINTL=no
6123 USE_INCLUDED_LIBINTL=no
6124 INTLLIBS=
6125 INTLDEPS=
6127 if test "$USE_NLS" = "yes"; then
6128 cat >> confdefs.h <<\EOF
6129 #define ENABLE_NLS 1
6132 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6133 echo "configure:6134: checking whether included gettext is requested" >&5
6134 # Check whether --with-included-gettext or --without-included-gettext was given.
6135 if test "${with_included_gettext+set}" = set; then
6136 withval="$with_included_gettext"
6137 nls_cv_force_use_gnu_gettext=$withval
6138 else
6139 nls_cv_force_use_gnu_gettext=no
6142 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6144 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6145 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6146 CATOBJEXT=NONE
6151 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6152 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6153 echo "configure:6154: checking for libintl.h" >&5
6154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6155 echo $ac_n "(cached) $ac_c" 1>&6
6156 else
6157 cat > conftest.$ac_ext <<EOF
6158 #line 6159 "configure"
6159 #include "confdefs.h"
6160 #include <libintl.h>
6162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6163 { (eval echo configure:6164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6165 if test -z "$ac_err"; then
6166 rm -rf conftest*
6167 eval "ac_cv_header_$ac_safe=yes"
6168 else
6169 echo "$ac_err" >&5
6170 echo "configure: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 rm -rf conftest*
6173 eval "ac_cv_header_$ac_safe=no"
6175 rm -f conftest*
6177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6178 echo "$ac_t""yes" 1>&6
6179 cat >> confdefs.h <<\EOF
6180 #define HAVE_LIBINTL_H 1
6183 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6184 echo "configure:6185: checking for GNU gettext in libc" >&5
6185 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6186 echo $ac_n "(cached) $ac_c" 1>&6
6187 else
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6190 "configure"
6190 #include "confdefs.h"
6191 #include <libintl.h>
6192 extern int _nl_msg_cat_cntr;
6193 int main() {
6194 bindtextdomain ("", "");
6195 return (int) gettext ("") + _nl_msg_cat_cntr
6196 ; return 0; }
6198 if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6199 rm -rf conftest*
6200 gt_cv_func_gnugettext1_libc=yes
6201 else
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6204 rm -rf conftest*
6205 gt_cv_func_gnugettext1_libc=no
6207 rm -f conftest*
6210 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6212 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6213 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6214 echo "configure:6215: checking for GNU gettext in libintl" >&5
6215 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6216 echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218 gt_save_LIBS="$LIBS"
6219 LIBS="$LIBS -lintl $LIBICONV"
6220 cat > conftest.$ac_ext <<EOF
6221 #line 6222 "configure"
6222 #include "confdefs.h"
6223 #include <libintl.h>
6224 extern int _nl_msg_cat_cntr;
6225 int main() {
6226 bindtextdomain ("", "");
6227 return (int) gettext ("") + _nl_msg_cat_cntr
6228 ; return 0; }
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231 rm -rf conftest*
6232 gt_cv_func_gnugettext1_libintl=yes
6233 else
6234 echo "configure: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6236 rm -rf conftest*
6237 gt_cv_func_gnugettext1_libintl=no
6239 rm -f conftest*
6240 LIBS="$gt_save_LIBS"
6243 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6246 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6247 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6248 && test "$PACKAGE" != gettext; }; then
6249 cat >> confdefs.h <<\EOF
6250 #define HAVE_GETTEXT 1
6254 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6255 INTLLIBS="-lintl $LIBICONV"
6258 gt_save_LIBS="$LIBS"
6259 LIBS="$LIBS $INTLLIBS"
6260 for ac_func in dcgettext
6262 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6263 echo "configure:6264: checking for $ac_func" >&5
6264 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6265 echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267 cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 /* System header to define __stub macros and hopefully few prototypes,
6271 which can conflict with char $ac_func(); below. */
6272 #include <assert.h>
6273 /* Override any gcc2 internal prototype to avoid an error. */
6274 /* We use char because int might match the return type of a gcc2
6275 builtin and then its argument prototype would still apply. */
6276 char $ac_func();
6278 int main() {
6280 /* The GNU C library defines this for functions which it implements
6281 to always fail with ENOSYS. Some functions are actually named
6282 something starting with __ and the normal name is an alias. */
6283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6284 choke me
6285 #else
6286 $ac_func();
6287 #endif
6289 ; return 0; }
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6292 rm -rf conftest*
6293 eval "ac_cv_func_$ac_func=yes"
6294 else
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6297 rm -rf conftest*
6298 eval "ac_cv_func_$ac_func=no"
6300 rm -f conftest*
6303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6304 echo "$ac_t""yes" 1>&6
6305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6306 cat >> confdefs.h <<EOF
6307 #define $ac_tr_func 1
6310 else
6311 echo "$ac_t""no" 1>&6
6313 done
6315 LIBS="$gt_save_LIBS"
6317 # Extract the first word of "msgfmt", so it can be a program name with args.
6318 set dummy msgfmt; ac_word=$2
6319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6320 echo "configure:6321: checking for $ac_word" >&5
6321 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6322 echo $ac_n "(cached) $ac_c" 1>&6
6323 else
6324 case "$MSGFMT" in
6326 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6329 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6330 for ac_dir in $PATH; do
6331 test -z "$ac_dir" && ac_dir=.
6332 if test -f $ac_dir/$ac_word; then
6333 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6334 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6335 break
6338 done
6339 IFS="$ac_save_ifs"
6340 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6342 esac
6344 MSGFMT="$ac_cv_path_MSGFMT"
6345 if test "$MSGFMT" != ":"; then
6346 echo "$ac_t""$MSGFMT" 1>&6
6347 else
6348 echo "$ac_t""no" 1>&6
6351 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6352 set dummy gmsgfmt; ac_word=$2
6353 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6354 echo "configure:6355: checking for $ac_word" >&5
6355 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6356 echo $ac_n "(cached) $ac_c" 1>&6
6357 else
6358 case "$GMSGFMT" in
6360 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6362 ?:/*)
6363 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6367 ac_dummy="$PATH"
6368 for ac_dir in $ac_dummy; do
6369 test -z "$ac_dir" && ac_dir=.
6370 if test -f $ac_dir/$ac_word; then
6371 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6372 break
6374 done
6375 IFS="$ac_save_ifs"
6376 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6378 esac
6380 GMSGFMT="$ac_cv_path_GMSGFMT"
6381 if test -n "$GMSGFMT"; then
6382 echo "$ac_t""$GMSGFMT" 1>&6
6383 else
6384 echo "$ac_t""no" 1>&6
6388 # Extract the first word of "xgettext", so it can be a program name with args.
6389 set dummy xgettext; ac_word=$2
6390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6391 echo "configure:6392: checking for $ac_word" >&5
6392 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6393 echo $ac_n "(cached) $ac_c" 1>&6
6394 else
6395 case "$XGETTEXT" in
6397 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6401 for ac_dir in $PATH; do
6402 test -z "$ac_dir" && ac_dir=.
6403 if test -f $ac_dir/$ac_word; then
6404 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6405 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6406 break
6409 done
6410 IFS="$ac_save_ifs"
6411 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6413 esac
6415 XGETTEXT="$ac_cv_path_XGETTEXT"
6416 if test "$XGETTEXT" != ":"; then
6417 echo "$ac_t""$XGETTEXT" 1>&6
6418 else
6419 echo "$ac_t""no" 1>&6
6423 CATOBJEXT=.gmo
6426 else
6427 echo "$ac_t""no" 1>&6
6431 if test "$CATOBJEXT" = "NONE"; then
6432 nls_cv_use_gnu_gettext=yes
6436 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6437 INTLOBJS="\$(GETTOBJS)"
6438 # Extract the first word of "msgfmt", so it can be a program name with args.
6439 set dummy msgfmt; ac_word=$2
6440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6441 echo "configure:6442: checking for $ac_word" >&5
6442 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6443 echo $ac_n "(cached) $ac_c" 1>&6
6444 else
6445 case "$MSGFMT" in
6447 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6451 for ac_dir in $PATH; do
6452 test -z "$ac_dir" && ac_dir=.
6453 if test -f $ac_dir/$ac_word; then
6454 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6455 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6456 break
6459 done
6460 IFS="$ac_save_ifs"
6461 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6463 esac
6465 MSGFMT="$ac_cv_path_MSGFMT"
6466 if test "$MSGFMT" != ":"; then
6467 echo "$ac_t""$MSGFMT" 1>&6
6468 else
6469 echo "$ac_t""no" 1>&6
6472 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6473 set dummy gmsgfmt; ac_word=$2
6474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6475 echo "configure:6476: checking for $ac_word" >&5
6476 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6477 echo $ac_n "(cached) $ac_c" 1>&6
6478 else
6479 case "$GMSGFMT" in
6481 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6483 ?:/*)
6484 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6487 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6488 ac_dummy="$PATH"
6489 for ac_dir in $ac_dummy; do
6490 test -z "$ac_dir" && ac_dir=.
6491 if test -f $ac_dir/$ac_word; then
6492 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6493 break
6495 done
6496 IFS="$ac_save_ifs"
6497 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6499 esac
6501 GMSGFMT="$ac_cv_path_GMSGFMT"
6502 if test -n "$GMSGFMT"; then
6503 echo "$ac_t""$GMSGFMT" 1>&6
6504 else
6505 echo "$ac_t""no" 1>&6
6508 # Extract the first word of "xgettext", so it can be a program name with args.
6509 set dummy xgettext; ac_word=$2
6510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6511 echo "configure:6512: checking for $ac_word" >&5
6512 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6513 echo $ac_n "(cached) $ac_c" 1>&6
6514 else
6515 case "$XGETTEXT" in
6517 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6520 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6521 for ac_dir in $PATH; do
6522 test -z "$ac_dir" && ac_dir=.
6523 if test -f $ac_dir/$ac_word; then
6524 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6525 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6526 break
6529 done
6530 IFS="$ac_save_ifs"
6531 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6533 esac
6535 XGETTEXT="$ac_cv_path_XGETTEXT"
6536 if test "$XGETTEXT" != ":"; then
6537 echo "$ac_t""$XGETTEXT" 1>&6
6538 else
6539 echo "$ac_t""no" 1>&6
6543 BUILD_INCLUDED_LIBINTL=yes
6544 USE_INCLUDED_LIBINTL=yes
6545 CATOBJEXT=.gmo
6546 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6547 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6548 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6551 if test "$GMSGFMT" != ":"; then
6552 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6554 else
6555 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6556 GMSGFMT=":"
6560 if test "$XGETTEXT" != ":"; then
6561 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6563 else
6564 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6565 XGETTEXT=":"
6569 POSUB=po
6574 if test "$PACKAGE" = gettext; then
6575 BUILD_INCLUDED_LIBINTL=yes
6578 for ac_prog in bison
6580 # Extract the first word of "$ac_prog", so it can be a program name with args.
6581 set dummy $ac_prog; ac_word=$2
6582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6583 echo "configure:6584: checking for $ac_word" >&5
6584 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6585 echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587 if test -n "$INTLBISON"; then
6588 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6589 else
6590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6591 ac_dummy="$PATH"
6592 for ac_dir in $ac_dummy; do
6593 test -z "$ac_dir" && ac_dir=.
6594 if test -f $ac_dir/$ac_word; then
6595 ac_cv_prog_INTLBISON="$ac_prog"
6596 break
6598 done
6599 IFS="$ac_save_ifs"
6602 INTLBISON="$ac_cv_prog_INTLBISON"
6603 if test -n "$INTLBISON"; then
6604 echo "$ac_t""$INTLBISON" 1>&6
6605 else
6606 echo "$ac_t""no" 1>&6
6609 test -n "$INTLBISON" && break
6610 done
6612 if test -z "$INTLBISON"; then
6613 ac_verc_fail=yes
6614 else
6615 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6616 echo "configure:6617: checking version of bison" >&5
6617 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6618 case $ac_prog_version in
6619 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6620 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6621 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6622 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6623 esac
6624 echo "$ac_t""$ac_prog_version" 1>&6
6626 if test $ac_verc_fail = yes; then
6627 INTLBISON=:
6639 if test $USE_INCLUDED_LIBINTL = yes; then
6640 cat >> confdefs.h <<\EOF
6641 #define USE_INCLUDED_LIBINTL 1
6646 nls_cv_header_intl=
6647 nls_cv_header_libgt=
6649 DATADIRNAME=share
6652 INSTOBJEXT=.mo
6655 GENCAT=gencat
6659 if test "x$CATOBJEXT" != x; then
6660 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6661 echo "configure:6662: checking for catalogs to be installed" >&5
6662 # Look for .po and .gmo files in the source directory.
6663 CATALOGS=
6664 XLINGUAS=
6665 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6666 # If there aren't any .gmo files the shell will give us the
6667 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6668 # weeded out.
6669 case "$cat" in *\**)
6670 continue;;
6671 esac
6672 # The quadruple backslash is collapsed to a double backslash
6673 # by the backticks, then collapsed again by the double quotes,
6674 # leaving us with one backslash in the sed expression (right
6675 # before the dot that mustn't act as a wildcard). The dot to
6676 # be escaped in the second expression is hiding inside CATOBJEXT.
6677 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6678 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6679 # The user is allowed to set LINGUAS to a list of languages to
6680 # install catalogs for. If it's empty that means "all of them."
6681 if test "x$LINGUAS" = x; then
6682 CATALOGS="$CATALOGS $cat"
6683 XLINGUAS="$XLINGUAS $lang"
6684 else
6685 case "$LINGUAS" in *$lang*)
6686 CATALOGS="$CATALOGS $cat"
6687 XLINGUAS="$XLINGUAS $lang"
6689 esac
6691 done
6692 LINGUAS="$XLINGUAS"
6693 echo "$ac_t""$LINGUAS" 1>&6
6696 MKINSTALLDIRS=
6697 if test -n "$ac_aux_dir"; then
6698 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6700 if test -z "$MKINSTALLDIRS"; then
6701 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6705 INTL_LIBTOOL_SUFFIX_PREFIX=
6709 # Windows32 Registry support for specifying GCC installation paths.
6710 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6711 if test "${enable_win32_registry+set}" = set; then
6712 enableval="$enable_win32_registry"
6716 case $host_os in
6717 win32 | pe | cygwin* | mingw32* | uwin*)
6718 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6719 echo "configure:6720: checking whether windows registry support is requested" >&5
6720 if test "x$enable_win32_registry" != xno; then
6721 cat >> confdefs.h <<\EOF
6722 #define ENABLE_WIN32_REGISTRY 1
6725 echo "$ac_t""yes" 1>&6
6727 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6728 echo "configure:6729: checking for library containing RegOpenKeyExA" >&5
6729 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6730 echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732 ac_func_search_save_LIBS="$LIBS"
6733 ac_cv_search_RegOpenKeyExA="no"
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error. */
6738 /* We use char because int might match the return type of a gcc2
6739 builtin and then its argument prototype would still apply. */
6740 char RegOpenKeyExA();
6742 int main() {
6743 RegOpenKeyExA()
6744 ; return 0; }
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747 rm -rf conftest*
6748 ac_cv_search_RegOpenKeyExA="none required"
6749 else
6750 echo "configure: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6753 rm -f conftest*
6754 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6755 LIBS="-l$i $ac_func_search_save_LIBS"
6756 cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 /* Override any gcc2 internal prototype to avoid an error. */
6760 /* We use char because int might match the return type of a gcc2
6761 builtin and then its argument prototype would still apply. */
6762 char RegOpenKeyExA();
6764 int main() {
6765 RegOpenKeyExA()
6766 ; return 0; }
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769 rm -rf conftest*
6770 ac_cv_search_RegOpenKeyExA="-l$i"
6771 break
6772 else
6773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6776 rm -f conftest*
6777 done
6778 LIBS="$ac_func_search_save_LIBS"
6781 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6782 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6783 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6785 else :
6788 else
6789 echo "$ac_t""no" 1>&6
6792 # Check if user specified a different registry key.
6793 case "x${enable_win32_registry}" in
6794 x | xyes)
6795 # default.
6796 gcc_cv_win32_registry_key="$VERSION"
6798 xno)
6799 # no registry lookup.
6800 gcc_cv_win32_registry_key=''
6803 # user-specified key.
6804 gcc_cv_win32_registry_key="$enable_win32_registry"
6806 esac
6808 if test "x$enable_win32_registry" != xno; then
6809 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6810 echo "configure:6811: checking registry key on windows hosts" >&5
6811 cat >> confdefs.h <<EOF
6812 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6815 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6818 esac
6820 # Get an absolute path to the GCC top-level source directory
6821 holddir=`${PWDCMD-pwd}`
6822 cd $srcdir
6823 topdir=`${PWDCMD-pwd}`
6824 cd $holddir
6826 # Conditionalize the makefile for this host machine.
6827 # Make-host contains the concatenation of all host makefile fragments
6828 # [there can be more than one]. This file is built by configure.frag.
6829 host_overrides=Make-host
6830 dep_host_xmake_file=
6831 for f in .. ${host_xmake_file}
6833 if test -f ${srcdir}/config/$f
6834 then
6835 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6837 done
6839 # Conditionalize the makefile for this target machine.
6840 # Make-target contains the concatenation of all host makefile fragments
6841 # [there can be more than one]. This file is built by configure.frag.
6842 target_overrides=Make-target
6843 dep_tmake_file=
6844 for f in .. ${tmake_file}
6846 if test -f ${srcdir}/config/$f
6847 then
6848 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6850 done
6852 symbolic_link='ln -s'
6854 # If the host doesn't support symlinks, modify CC in
6855 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6856 # Otherwise, we can use "CC=$(CC)".
6857 rm -f symtest.tem
6858 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6859 then
6860 cc_set_by_configure="\$(CC)"
6861 quoted_cc_set_by_configure="\$(CC)"
6862 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6863 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6864 else
6865 rm -f symtest.tem
6866 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6867 then
6868 symbolic_link="cp -p"
6869 else
6870 symbolic_link="cp"
6872 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6873 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6874 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6875 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6877 rm -f symtest.tem
6879 out_object_file=`basename $out_file .c`.o
6881 tm_file_list=
6882 for f in $tm_file; do
6883 case $f in
6884 ansidecl.h )
6885 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6886 defaults.h )
6887 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6888 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6889 esac
6890 done
6892 tm_p_file_list=
6893 for f in $tm_p_file; do
6894 case $f in
6895 tm-preds.h )
6896 tm_p_file_list="${tm_p_file_list} $f" ;;
6897 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
6898 esac
6899 done
6901 host_xm_file_list=
6902 for f in $host_xm_file; do
6903 case $f in
6904 ansidecl.h )
6905 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6906 auto-host.h )
6907 host_xm_file_list="${host_xm_file_list} $f" ;;
6908 defaults.h )
6909 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6910 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6911 esac
6912 done
6914 build_xm_file_list=
6915 for f in $build_xm_file; do
6916 case $f in
6917 ansidecl.h )
6918 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6919 auto-build.h | auto-host.h )
6920 build_xm_file_list="${build_xm_file_list} $f" ;;
6921 defaults.h )
6922 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6923 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6924 esac
6925 done
6927 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6928 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6929 CROSS=
6930 ALL=all.internal
6931 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6932 if test x$host != x$target
6933 then
6934 CROSS="-DCROSS_COMPILE"
6935 ALL=all.cross
6936 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6937 case "$host","$target" in
6938 i?86-*-*,x86_64-*-* \
6939 | powerpc*-*-*,powerpc64*-*-*)
6940 CROSS="$CROSS -DNATIVE_CROSS" ;;
6941 esac
6942 elif test "x$TARGET_SYSTEM_ROOT" != x; then
6943 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
6944 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6947 # If this is a cross-compiler that does not
6948 # have its own set of headers then define
6949 # inhibit_libc
6951 # If this is using newlib, without having the headers available now,
6952 # then define inhibit_libc in LIBGCC2_CFLAGS.
6953 # This prevents libgcc2 from containing any code which requires libc
6954 # support.
6955 inhibit_libc=
6956 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
6957 test x$with_newlib = xyes ; } &&
6958 test "x$with_headers" = x ; then
6959 inhibit_libc=-Dinhibit_libc
6963 # When building gcc with a cross-compiler, we need to adjust things so
6964 # that the generator programs are still built with the native compiler.
6965 # Also, we cannot run fixincludes or fix-header.
6967 # These are the normal (build=host) settings:
6968 BUILD_PREFIX=
6969 BUILD_PREFIX_1=ignore-
6970 CC_FOR_BUILD='$(CC)'
6971 BUILD_CFLAGS='$(ALL_CFLAGS)'
6973 STMP_FIXINC=stmp-fixinc
6974 STMP_FIXPROTO=stmp-fixproto
6976 # And these apply if build != host.
6977 if test x$build != x$host
6978 then
6979 BUILD_PREFIX=build-
6980 BUILD_PREFIX_1=build-
6981 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6983 if test "x$TARGET_SYSTEM_ROOT" = x; then
6984 STMP_FIXINC=
6985 STMP_FIXPROTO=
6989 # Expand extra_headers to include complete path.
6990 # This substitutes for lots of t-* files.
6991 extra_headers_list=
6992 if test "x$extra_headers" = x
6993 then true
6994 else
6995 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6996 for file in $extra_headers;
6998 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6999 done
7002 # Add a definition of USE_COLLECT2 if system wants one.
7003 case $use_collect2 in
7004 no) use_collect2= ;;
7005 "") ;;
7007 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7008 xm_defines="${xm_defines} USE_COLLECT2"
7010 esac
7012 # Identify the assembler which will work hand-in-glove with the newly
7013 # built GCC, so that we can examine its features. This is the assembler
7014 # which will be driven by the driver program.
7016 # If build != host, and we aren't building gas in-tree, we identify a
7017 # build->target assembler and hope that it will have the same features
7018 # as the host->target assembler we'll be using.
7019 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7020 echo "configure:7021: checking what assembler to use" >&5
7021 in_tree_gas=no
7022 gcc_cv_as=
7023 gcc_cv_gas_major_version=
7024 gcc_cv_gas_minor_version=
7025 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7026 if test -x "$DEFAULT_ASSEMBLER"; then
7027 gcc_cv_as="$DEFAULT_ASSEMBLER"
7028 elif test -x "$AS"; then
7029 gcc_cv_as="$AS"
7030 elif test -x as$host_exeext; then
7031 # Build using assembler in the current directory.
7032 gcc_cv_as=./as$host_exeext
7033 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7034 && test -f ../gas/Makefile; then
7035 # Single tree build which includes gas.
7036 in_tree_gas=yes
7037 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7038 for f in $gcc_cv_as_bfd_srcdir/configure \
7039 $gcc_cv_as_gas_srcdir/configure \
7040 $gcc_cv_as_gas_srcdir/configure.in \
7041 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7042 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7043 if test x$gcc_cv_gas_version != x; then
7044 break
7046 done
7047 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7048 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7049 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7051 rm -f as$host_exeext
7052 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7055 if test "x$gcc_cv_as" = x; then
7056 # Search the same directories that the installed compiler will
7057 # search. Else we may find the wrong assembler and lose. If we
7058 # do not find a suitable assembler binary, then try the user's
7059 # path.
7061 # Also note we have to check MD_EXEC_PREFIX before checking the
7062 # user's path. Unfortunately, there is no good way to get at the
7063 # value of MD_EXEC_PREFIX here. So we do a brute force search
7064 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7065 # to be fixed as part of the make/configure rewrite too.
7067 if test "x$exec_prefix" = xNONE; then
7068 if test "x$prefix" = xNONE; then
7069 test_prefix=/usr/local
7070 else
7071 test_prefix=$prefix
7073 else
7074 test_prefix=$exec_prefix
7077 # If the loop below does not find an assembler, then use whatever
7078 # one we can find in the users's path.
7079 # user's path.
7080 if test "x$program_prefix" != xNONE; then
7081 gcc_cv_as=${program_prefix}as$host_exeext
7082 else
7083 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7086 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7087 $test_prefix/lib/gcc-lib/$target_alias \
7088 /usr/lib/gcc/$target_alias/$gcc_version \
7089 /usr/lib/gcc/$target_alias \
7090 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7091 $test_prefix/$target_alias/bin"
7093 if test x$host = x$target; then
7094 test_dirs="$test_dirs \
7095 /usr/libexec \
7096 /usr/ccs/gcc \
7097 /usr/ccs/bin \
7098 /udk/usr/ccs/bin \
7099 /bsd43/usr/lib/cmplrs/cc \
7100 /usr/cross64/usr/bin \
7101 /usr/lib/cmplrs/cc \
7102 /sysv/usr/lib/cmplrs/cc \
7103 /svr4/usr/lib/cmplrs/cc \
7104 /usr/bin"
7107 for dir in $test_dirs; do
7108 if test -x $dir/as$host_exeext; then
7109 gcc_cv_as=$dir/as$host_exeext
7110 break;
7112 done
7114 case $in_tree_gas in
7115 yes)
7116 echo "$ac_t"""newly built gas"" 1>&6
7119 echo "$ac_t""$gcc_cv_as" 1>&6
7121 esac
7123 # Identify the linker which will work hand-in-glove with the newly
7124 # built GCC, so that we can examine its features. This is the linker
7125 # which will be driven by the driver program.
7127 # If build != host, and we aren't building gas in-tree, we identify a
7128 # build->target linker and hope that it will have the same features
7129 # as the host->target linker we'll be using.
7130 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7131 echo "configure:7132: checking what linker to use" >&5
7132 in_tree_ld=no
7133 gcc_cv_ld=
7134 gcc_cv_gld_major_version=
7135 gcc_cv_gld_minor_version=
7136 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7137 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7138 if test -x "$DEFAULT_LINKER"; then
7139 gcc_cv_ld="$DEFAULT_LINKER"
7140 elif test -x "$LD"; then
7141 gcc_cv_ld="$LD"
7142 elif test -x collect-ld$host_exeext; then
7143 # Build using linker in the current directory.
7144 gcc_cv_ld=./collect-ld$host_exeext
7145 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7146 && test -f ../ld/Makefile; then
7147 # Single tree build which includes ld.
7148 in_tree_ld=yes
7149 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
7151 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7152 if test x$gcc_cv_gld_version != x; then
7153 break
7155 done
7156 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7157 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7158 rm -f collect-ld$host_exeext
7159 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7160 2>/dev/null
7163 if test "x$gcc_cv_ld" = x; then
7164 # Search the same directories that the installed compiler will
7165 # search. Else we may find the wrong linker and lose. If we
7166 # do not find a suitable linker binary, then try the user's
7167 # path.
7169 # Also note we have to check MD_EXEC_PREFIX before checking the
7170 # user's path. Unfortunately, there is no good way to get at the
7171 # value of MD_EXEC_PREFIX here. So we do a brute force search
7172 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7173 # to be fixed as part of the make/configure rewrite too.
7175 if test "x$exec_prefix" = xNONE; then
7176 if test "x$prefix" = xNONE; then
7177 test_prefix=/usr/local
7178 else
7179 test_prefix=$prefix
7181 else
7182 test_prefix=$exec_prefix
7185 # If the loop below does not find an linker, then use whatever
7186 # one we can find in the users's path.
7187 # user's path.
7188 if test "x$program_prefix" != xNONE; then
7189 gcc_cv_ld=${program_prefix}ld$host_exeext
7190 else
7191 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7194 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7195 $test_prefix/lib/gcc-lib/$target_alias \
7196 /usr/lib/gcc/$target_alias/$gcc_version \
7197 /usr/lib/gcc/$target_alias \
7198 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7199 $test_prefix/$target_alias/bin"
7201 if test x$host = x$target; then
7202 test_dirs="$test_dirs \
7203 /usr/libexec \
7204 /usr/ccs/gcc \
7205 /usr/ccs/bin \
7206 /udk/usr/ccs/bin \
7207 /bsd43/usr/lib/cmplrs/cc \
7208 /usr/cross64/usr/bin \
7209 /usr/lib/cmplrs/cc \
7210 /sysv/usr/lib/cmplrs/cc \
7211 /svr4/usr/lib/cmplrs/cc \
7212 /usr/bin"
7215 for dir in $test_dirs; do
7216 if test -x $dir/ld$host_exeext; then
7217 gcc_cv_ld=$dir/ld$host_exeext
7218 break;
7220 done
7222 case $in_tree_ld in
7223 yes)
7224 echo "$ac_t"""newly built ld"" 1>&6
7227 echo "$ac_t""$gcc_cv_ld" 1>&6
7229 esac
7231 # Figure out what nm we will be using.
7232 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7233 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7234 echo "configure:7235: checking what nm to use" >&5
7235 in_tree_nm=no
7236 if test -x nm$host_exeext; then
7237 gcc_cv_nm=./nm$host_exeext
7238 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7239 && test -f ../binutils/Makefile; then
7240 # Single tree build which includes binutils.
7241 in_tree_nm=yes
7242 gcc_cv_nm=./nm$host_exeext
7243 rm -f nm$host_exeext
7244 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7245 elif test "x$program_prefix" != xNONE; then
7246 gcc_cv_nm=${program_prefix}nm$host_exeext
7247 else
7248 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7250 case $in_tree_nm in
7251 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7252 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7253 esac
7255 # Figure out what objdump we will be using.
7256 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7257 echo "configure:7258: checking what objdump to use" >&5
7258 in_tree_objdump=no
7259 if test -x objdump$host_exeext; then
7260 gcc_cv_objdump=./objdump$host_exeext
7261 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7262 && test -f ../binutils/Makefile; then
7263 # Single tree build which includes binutils.
7264 in_tree_objdump=yes
7265 gcc_cv_objdump=./objdump$host_exeext
7266 rm -f objdump$host_exeext
7267 $symbolic_link ../binutils/objdump$host_exeext \
7268 objdump$host_exeext 2>/dev/null
7269 elif test "x$program_prefix" != xNONE; then
7270 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7271 else
7272 gcc_cv_objdump=`echo objdump | \
7273 sed ${program_transform_name}`$host_exeext
7275 case $in_tree_objdump in
7276 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7277 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7278 esac
7280 # Figure out what assembler alignment features are present.
7281 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7282 echo "configure:7283: checking assembler alignment features" >&5
7283 gcc_cv_as_alignment_features=none
7284 if test $in_tree_gas = yes; then
7285 # Gas version 2.6 and later support for .balign and .p2align.
7286 if test $gcc_cv_gas_major_version -eq 2 \
7287 && test $gcc_cv_gas_minor_version -ge 6 \
7288 || test $gcc_cv_gas_major_version -gt 2 ; then
7291 gcc_cv_as_alignment_features=".balign and .p2align"
7292 cat >> confdefs.h <<\EOF
7293 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7300 # Gas version 2.8 and later support specifying the maximum
7301 # bytes to skip when using .p2align.
7302 if test $gcc_cv_gas_major_version -eq 2 \
7303 && test $gcc_cv_gas_minor_version -ge 8 \
7304 || test $gcc_cv_gas_major_version -gt 2 ; then
7307 gcc_cv_as_alignment_features=".p2align including maximum skip"
7308 cat >> confdefs.h <<\EOF
7309 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7316 elif test x$gcc_cv_as != x; then
7317 # Check if we have .balign and .p2align
7318 echo ".balign 4" > conftest.s
7319 echo ".p2align 2" >> conftest.s
7320 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7321 gcc_cv_as_alignment_features=".balign and .p2align"
7322 cat >> confdefs.h <<\EOF
7323 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7327 rm -f conftest.s conftest.o
7328 # Check if specifying the maximum bytes to skip when
7329 # using .p2align is supported.
7330 echo ".p2align 4,,7" > conftest.s
7331 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7332 gcc_cv_as_alignment_features=".p2align including maximum skip"
7333 cat >> confdefs.h <<\EOF
7334 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7338 rm -f conftest.s conftest.o
7340 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7342 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7343 echo "configure:7344: checking assembler subsection support" >&5
7344 gcc_cv_as_subsections=no
7345 if test $in_tree_gas = yes ; then
7346 if test $gcc_cv_gas_major_version -eq 2 \
7347 && test $gcc_cv_gas_minor_version -ge 9 \
7348 || test $gcc_cv_gas_major_version -gt 2 ; then
7351 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7352 gcc_cv_as_subsections="working .subsection -1"
7358 elif test x$gcc_cv_as != x; then
7359 # Check if we have .subsection
7360 echo ".subsection 1" > conftest.s
7361 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7362 gcc_cv_as_subsections=".subsection"
7363 if test x$gcc_cv_nm != x; then
7364 cat > conftest.s <<EOF
7365 conftest_label1: .word 0
7366 .subsection -1
7367 conftest_label2: .word 0
7368 .previous
7370 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7371 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7372 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7373 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7375 else
7376 gcc_cv_as_subsections="working .subsection -1"
7381 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7383 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7384 cat >> confdefs.h <<\EOF
7385 #define HAVE_GAS_SUBSECTION_ORDERING 1
7389 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7391 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7392 echo "configure:7393: checking assembler weak support" >&5
7393 gcc_cv_as_weak=no
7394 if test $in_tree_gas = yes ; then
7395 if test $gcc_cv_gas_major_version -eq 2 \
7396 && test $gcc_cv_gas_minor_version -ge 2 \
7397 || test $gcc_cv_gas_major_version -gt 2 ; then
7400 gcc_cv_as_weak="yes"
7405 elif test x$gcc_cv_as != x; then
7406 # Check if we have .weak
7407 echo " .weak foobar" > conftest.s
7408 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7409 gcc_cv_as_weak="yes"
7411 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7413 if test x"$gcc_cv_as_weak" = xyes; then
7414 cat >> confdefs.h <<\EOF
7415 #define HAVE_GAS_WEAK 1
7419 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7421 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7422 echo "configure:7423: checking assembler hidden support" >&5
7423 gcc_cv_as_hidden=no
7424 if test $in_tree_gas = yes ; then
7425 if test $gcc_cv_gas_major_version -eq 2 \
7426 && (test $gcc_cv_gas_minor_version -gt 12 \
7427 || (test $gcc_cv_gas_minor_version -eq 12 \
7428 && test $gcc_cv_gas_patch_version -ge 1 )) \
7429 || test $gcc_cv_gas_major_version -gt 2 ; then
7432 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7433 gcc_cv_as_hidden="yes"
7439 elif test x$gcc_cv_as != x; then
7440 # Check if we have .hidden
7441 echo " .hidden foobar" > conftest.s
7442 echo "foobar:" >> conftest.s
7443 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7444 gcc_cv_as_hidden="yes"
7446 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7448 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7449 # This is irritatingly difficult to feature test for. Look for
7450 # the date string after the version number.
7451 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7452 if echo "$ld_ver" | grep GNU > /dev/null; then
7453 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'`
7454 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'`
7455 if test 0"$ld_date" -lt 20020404; then
7456 if test -n "$ld_date"; then
7457 # If there was date string, but was earlier than 2002-04-04, fail
7458 gcc_cv_as_hidden="no"
7459 elif test -z "$ld_vers"; then
7460 # If there was no date string nor ld version number, something is wrong
7461 gcc_cv_as_hidden="no"
7462 else
7463 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7464 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7465 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7466 test -z "$ld_vers_patch" && ld_vers_patch=0
7467 if test "$ld_vers_major" -lt 2; then
7468 gcc_cv_as_hidden="no"
7469 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7470 gcc_cv_as_hidden="no"
7471 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7472 -a "$ld_vers_patch" -eq 0; then
7473 gcc_cv_as_hidden="no"
7479 case "$target" in
7480 mips-sgi-irix6*)
7481 if test x"$gnu_ld_flag" = x"no"; then
7482 # Even if using gas with .hidden support, the resulting object files
7483 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7484 # N64 linkers, the problem is that the linker refuses to accept
7485 # -call_shared (passed by default to the linker) and -r (used to
7486 # link the object file generated without .hidden directives with
7487 # one that hides symbols), so we also lose.
7488 gcc_cv_as_hidden=no
7491 esac
7492 if test x"$gcc_cv_as_hidden" = xyes; then
7493 cat >> confdefs.h <<\EOF
7494 #define HAVE_GAS_HIDDEN 1
7498 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7499 libgcc_visibility=$gcc_cv_as_hidden
7502 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7503 echo "configure:7504: checking assembler leb128 support" >&5
7504 gcc_cv_as_leb128=no
7505 if test $in_tree_gas = yes ; then
7506 if test $gcc_cv_gas_major_version -eq 2 \
7507 && test $gcc_cv_gas_minor_version -ge 11 \
7508 || test $gcc_cv_gas_major_version -gt 2 ; then
7511 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7512 gcc_cv_as_leb128="yes"
7518 elif test x$gcc_cv_as != x; then
7519 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7520 cat > conftest.s <<EOF
7521 .data
7522 .uleb128 L2 - L1
7524 .uleb128 1280
7525 .sleb128 -1010
7528 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7529 gcc_cv_as_leb128="yes"
7531 # GAS versions before 2.11 do not support uleb128,
7532 # despite appearing to.
7533 # ??? There exists an elf-specific test that will crash
7534 # the assembler. Perhaps it's better to figure out whether
7535 # arbitrary sections are supported and try the test.
7536 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7537 if echo "$as_ver" | grep GNU > /dev/null; then
7538 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7539 as_major=`echo $as_ver | sed 's/\..*//'`
7540 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7541 if test $as_major -eq 2 -a $as_minor -lt 11; then
7542 gcc_cv_as_leb128="no"
7546 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7548 if test x"$gcc_cv_as_leb128" = xyes; then
7549 cat >> confdefs.h <<\EOF
7550 #define HAVE_AS_LEB128 1
7554 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7556 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7557 echo "configure:7558: checking assembler eh_frame optimization" >&5
7558 gcc_cv_as_eh_frame=no
7559 if test $in_tree_gas = yes ; then
7560 if test $gcc_cv_gas_major_version -eq 2 \
7561 && test $gcc_cv_gas_minor_version -ge 12 \
7562 || test $gcc_cv_gas_major_version -gt 2 ; then
7565 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7566 gcc_cv_as_eh_frame="yes"
7572 elif test x$gcc_cv_as != x; then
7573 # Check if this is GAS.
7574 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7575 rm -f a.out 2> /dev/null
7576 if echo "$as_ver" | grep GNU > /dev/null; then
7577 # Versions up to and including 2.11.0 may mis-optimize
7578 # .eh_frame data. Try something.
7579 cat > conftest.s <<EOF
7580 .text
7581 .LFB1:
7582 .4byte 0
7583 .L1:
7584 .4byte 0
7585 .LFE1:
7586 .section .eh_frame,"aw",@progbits
7587 __FRAME_BEGIN__:
7588 .4byte .LECIE1-.LSCIE1
7589 .LSCIE1:
7590 .4byte 0x0
7591 .byte 0x1
7592 .ascii "z\0"
7593 .byte 0x1
7594 .byte 0x78
7595 .byte 0x1a
7596 .byte 0x0
7597 .byte 0x4
7598 .4byte 1
7599 .p2align 1
7600 .LECIE1:
7601 .LSFDE1:
7602 .4byte .LEFDE1-.LASFDE1
7603 .LASFDE1:
7604 .4byte .LASFDE1-__FRAME_BEGIN__
7605 .4byte .LFB1
7606 .4byte .LFE1-.LFB1
7607 .byte 0x4
7608 .4byte .LFE1-.LFB1
7609 .byte 0x4
7610 .4byte .L1-.LFB1
7611 .LEFDE1:
7613 cat > conftest.lit <<EOF
7614 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7615 0010 01000000 12000000 18000000 00000000 ................
7616 0020 08000000 04080000 0044 .........D
7618 cat > conftest.big <<EOF
7619 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7620 0010 00000001 00000012 00000018 00000000 ................
7621 0020 00000008 04000000 0844 .........D
7623 # If the assembler didn't choke, and we can objdump,
7624 # and we got the correct data, then succeed.
7625 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7626 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7627 | tail -3 > conftest.got \
7628 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7629 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7630 then
7631 gcc_cv_as_eh_frame="yes"
7632 else
7633 gcc_cv_as_eh_frame="bad"
7634 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7635 cat >> confdefs.h <<\EOF
7636 #define USE_AS_TRADITIONAL_FORMAT 1
7642 rm -f conftest.*
7644 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7646 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7647 echo "configure:7648: checking assembler section merging support" >&5
7648 gcc_cv_as_shf_merge=no
7649 if test $in_tree_gas = yes ; then
7650 if test $gcc_cv_gas_major_version -eq 2 \
7651 && test $gcc_cv_gas_minor_version -ge 12 \
7652 || test $gcc_cv_gas_major_version -gt 2 ; then
7655 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7656 gcc_cv_as_shf_merge=yes
7662 elif test x$gcc_cv_as != x; then
7663 # Check if we support SHF_MERGE sections
7664 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7665 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7666 gcc_cv_as_shf_merge=yes
7668 rm -f conftest.s conftest.o
7670 if test x"$gcc_cv_as_shf_merge" = xyes; then
7671 cat >> confdefs.h <<\EOF
7672 #define HAVE_GAS_SHF_MERGE 1
7676 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7678 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7679 echo "configure:7680: checking assembler thread-local storage support" >&5
7680 gcc_cv_as_tls=no
7681 conftest_s=
7682 tls_first_major=
7683 tls_first_minor=
7684 tls_as_opt=
7685 case "$target" in
7686 alpha*-*-*)
7687 conftest_s='
7688 .section ".tdata","awT",@progbits
7689 foo: .long 25
7690 .text
7691 ldq $27,__tls_get_addr($29) !literal!1
7692 lda $16,foo($29) !tlsgd!1
7693 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7694 ldq $27,__tls_get_addr($29) !literal!2
7695 lda $16,foo($29) !tlsldm!2
7696 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7697 ldq $1,foo($29) !gotdtprel
7698 ldah $2,foo($29) !dtprelhi
7699 lda $3,foo($2) !dtprello
7700 lda $4,foo($29) !dtprel
7701 ldq $1,foo($29) !gottprel
7702 ldah $2,foo($29) !tprelhi
7703 lda $3,foo($2) !tprello
7704 lda $4,foo($29) !tprel'
7705 tls_first_major=2
7706 tls_first_minor=13
7708 i[34567]86-*-*)
7709 conftest_s='
7710 .section ".tdata","awT",@progbits
7711 foo: .long 25
7712 .text
7713 movl %gs:0, %eax
7714 leal foo@TLSGD(,%ebx,1), %eax
7715 leal foo@TLSLDM(%ebx), %eax
7716 leal foo@DTPOFF(%eax), %edx
7717 movl foo@GOTTPOFF(%ebx), %eax
7718 subl foo@GOTTPOFF(%ebx), %eax
7719 addl foo@GOTNTPOFF(%ebx), %eax
7720 movl foo@INDNTPOFF, %eax
7721 movl $foo@TPOFF, %eax
7722 subl $foo@TPOFF, %eax
7723 leal foo@NTPOFF(%ecx), %eax'
7724 tls_first_major=2
7725 tls_first_minor=14
7727 x86_64-*-*)
7728 conftest_s='
7729 .section ".tdata","awT",@progbits
7730 foo: .long 25
7731 .text
7732 movq %fs:0, %rax
7733 leaq foo@TLSGD(%rip), %rdi
7734 leaq foo@TLSLD(%rip), %rdi
7735 leaq foo@DTPOFF(%rax), %rdx
7736 movq foo@GOTTPOFF(%rip), %rax
7737 movq $foo@TPOFF, %rax'
7738 tls_first_major=2
7739 tls_first_minor=14
7741 ia64-*-*)
7742 conftest_s='
7743 .section ".tdata","awT",@progbits
7744 foo: data8 25
7745 .text
7746 addl r16 = @ltoff(@dtpmod(foo#)), gp
7747 addl r17 = @ltoff(@dtprel(foo#)), gp
7748 addl r18 = @ltoff(@tprel(foo#)), gp
7749 addl r19 = @dtprel(foo#), gp
7750 adds r21 = @dtprel(foo#), r13
7751 movl r23 = @dtprel(foo#)
7752 addl r20 = @tprel(foo#), gp
7753 adds r22 = @tprel(foo#), r13
7754 movl r24 = @tprel(foo#)'
7755 tls_first_major=2
7756 tls_first_minor=13
7758 powerpc-*-*)
7759 conftest_s='
7760 .section ".tdata","awT",@progbits
7761 .align 2
7762 ld0: .space 4
7763 ld1: .space 4
7764 x1: .space 4
7765 x2: .space 4
7766 x3: .space 4
7767 .text
7768 addi 3,31,ld0@got@tlsgd
7769 bl __tls_get_addr
7770 addi 3,31,x1@got@tlsld
7771 bl __tls_get_addr
7772 addi 9,3,x1@dtprel
7773 addis 9,3,x2@dtprel@ha
7774 addi 9,9,x2@dtprel@l
7775 lwz 9,x3@got@tprel(31)
7776 add 9,9,x@tls
7777 addi 9,2,x1@tprel
7778 addis 9,2,x2@tprel@ha
7779 addi 9,9,x2@tprel@l'
7780 tls_first_major=2
7781 tls_first_minor=14
7782 tls_as_opt=-a32
7784 powerpc64-*-*)
7785 conftest_s='
7786 .section ".tdata","awT",@progbits
7787 .align 3
7788 ld0: .space 8
7789 ld1: .space 8
7790 x1: .space 8
7791 x2: .space 8
7792 x3: .space 8
7793 .text
7794 addi 3,2,ld0@got@tlsgd
7795 bl .__tls_get_addr
7797 addi 3,2,ld1@toc
7798 bl .__tls_get_addr
7800 addi 3,2,x1@got@tlsld
7801 bl .__tls_get_addr
7803 addi 9,3,x1@dtprel
7804 bl .__tls_get_addr
7806 addis 9,3,x2@dtprel@ha
7807 addi 9,9,x2@dtprel@l
7808 bl .__tls_get_addr
7810 ld 9,x3@got@dtprel(2)
7811 add 9,9,3
7812 bl .__tls_get_addr
7813 nop'
7814 tls_first_major=2
7815 tls_first_minor=14
7816 tls_as_opt=-a64
7818 s390-*-*)
7819 conftest_s='
7820 .section ".tdata","awT",@progbits
7821 foo: .long 25
7822 .text
7823 .long foo@TLSGD
7824 .long foo@TLSLDM
7825 .long foo@DTPOFF
7826 .long foo@NTPOFF
7827 .long foo@GOTNTPOFF
7828 .long foo@INDNTPOFF
7829 l %r1,foo@GOTNTPOFF(%r12)
7830 l %r1,0(%r1):tls_load:foo
7831 bas %r14,0(%r1,%r13):tls_gdcall:foo
7832 bas %r14,0(%r1,%r13):tls_ldcall:foo'
7833 tls_first_major=2
7834 tls_first_minor=14
7835 tls_as_opt=-m31
7837 s390x-*-*)
7838 conftest_s='
7839 .section ".tdata","awT",@progbits
7840 foo: .long 25
7841 .text
7842 .quad foo@TLSGD
7843 .quad foo@TLSLDM
7844 .quad foo@DTPOFF
7845 .quad foo@NTPOFF
7846 .quad foo@GOTNTPOFF
7847 lg %r1,foo@GOTNTPOFF(%r12)
7848 larl %r1,foo@INDNTPOFF
7849 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
7850 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
7851 tls_first_major=2
7852 tls_first_minor=14
7853 tls_as_opt="-m64 -Aesame"
7855 esac
7856 if test -z "$tls_first_major"; then
7858 elif test $in_tree_gas = yes ; then
7859 if test $gcc_cv_gas_major_version -eq $tls_first_major \
7860 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
7861 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
7864 gcc_cv_as_tls=yes
7869 elif test x$gcc_cv_as != x; then
7870 echo "$conftest_s" > conftest.s
7871 if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7872 then
7873 gcc_cv_as_tls=yes
7875 rm -f conftest.s conftest.o
7877 if test "$gcc_cv_as_tls" = yes; then
7878 cat >> confdefs.h <<\EOF
7879 #define HAVE_AS_TLS 1
7883 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7885 case "$target" in
7886 # All TARGET_ABI_OSF targets.
7887 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7888 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7889 echo "configure:7890: checking assembler supports explicit relocations" >&5
7890 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7891 echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7894 gcc_cv_as_explicit_relocs=unknown
7895 if test $in_tree_gas = yes ; then
7896 if test $gcc_cv_gas_major_version -eq 2 \
7897 && test $gcc_cv_gas_minor_version -ge 12 \
7898 || test $gcc_cv_gas_major_version -gt 2 ; then
7901 gcc_cv_as_explicit_relocs=yes
7906 elif test x$gcc_cv_as != x; then
7907 cat > conftest.s << 'EOF'
7908 .set nomacro
7909 .text
7910 extbl $3, $2, $3 !lituse_bytoff!1
7911 ldq $2, a($29) !literal!1
7912 ldq $4, b($29) !literal!2
7913 ldq_u $3, 0($2) !lituse_base!1
7914 ldq $27, f($29) !literal!5
7915 jsr $26, ($27), f !lituse_jsr!5
7916 ldah $29, 0($26) !gpdisp!3
7917 lda $0, c($29) !gprel
7918 ldah $1, d($29) !gprelhigh
7919 lda $1, d($1) !gprellow
7920 lda $29, 0($29) !gpdisp!3
7922 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7923 gcc_cv_as_explicit_relocs=yes
7924 else
7925 gcc_cv_as_explicit_relocs=no
7927 rm -f conftest.s conftest.o
7932 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7933 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7934 cat >> confdefs.h <<\EOF
7935 #define HAVE_AS_EXPLICIT_RELOCS 1
7940 sparc*-*-*)
7941 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7942 echo "configure:7943: checking assembler .register pseudo-op support" >&5
7943 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7944 echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7947 gcc_cv_as_register_pseudo_op=unknown
7948 if test x$gcc_cv_as != x; then
7949 # Check if we have .register
7950 echo ".register %g2, #scratch" > conftest.s
7951 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7952 gcc_cv_as_register_pseudo_op=yes
7953 else
7954 gcc_cv_as_register_pseudo_op=no
7956 rm -f conftest.s conftest.o
7961 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7962 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7963 cat >> confdefs.h <<\EOF
7964 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7969 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7970 echo "configure:7971: checking assembler supports -relax" >&5
7971 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7972 echo $ac_n "(cached) $ac_c" 1>&6
7973 else
7975 gcc_cv_as_relax_opt=unknown
7976 if test x$gcc_cv_as != x; then
7977 # Check if gas supports -relax
7978 echo ".text" > conftest.s
7979 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7980 gcc_cv_as_relax_opt=yes
7981 else
7982 gcc_cv_as_relax_opt=no
7984 rm -f conftest.s conftest.o
7989 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7990 if test "x$gcc_cv_as_relax_opt" = xyes; then
7991 cat >> confdefs.h <<\EOF
7992 #define HAVE_AS_RELAX_OPTION 1
7997 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7998 echo "configure:7999: checking assembler and linker support unaligned pc related relocs" >&5
7999 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8000 echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8003 gcc_cv_as_sparc_ua_pcrel=unknown
8004 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8005 gcc_cv_as_sparc_ua_pcrel=no
8006 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8007 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8008 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8009 gcc_cv_as_sparc_ua_pcrel=yes
8011 rm -f conftest.s conftest.o conftest
8016 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8017 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8018 cat >> confdefs.h <<\EOF
8019 #define HAVE_AS_SPARC_UA_PCREL 1
8024 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8025 echo "configure:8026: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8026 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8027 echo $ac_n "(cached) $ac_c" 1>&6
8028 else
8030 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8031 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8032 if test x$gcc_cv_objdump != x; then
8033 gcc_cv_as_sparc_ua_pcrel_hidden=no
8034 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8035 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8036 echo "foo: .skip 4" >> conftest.s
8037 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8038 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8039 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8040 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8041 if $gcc_cv_objdump -R conftest 2> /dev/null \
8042 | grep 'DISP32' > /dev/null 2>&1; then
8044 else
8045 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8049 rm -f conftest.s conftest.o conftest
8050 else
8051 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8056 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8057 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8058 cat >> confdefs.h <<\EOF
8059 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8064 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8065 echo "configure:8066: checking for assembler offsetable %lo() support" >&5
8066 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8067 echo $ac_n "(cached) $ac_c" 1>&6
8068 else
8070 gcc_cv_as_offsetable_lo10=unknown
8071 if test "x$gcc_cv_as" != x; then
8072 # Check if assembler has offsetable %lo()
8073 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8074 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8075 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8076 > /dev/null 2>&1 &&
8077 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8078 > /dev/null 2>&1; then
8079 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8080 gcc_cv_as_offsetable_lo10=no
8081 else
8082 gcc_cv_as_offsetable_lo10=yes
8084 else
8085 gcc_cv_as_offsetable_lo10=no
8087 rm -f conftest.s conftest.o conftest1.s conftest1.o
8092 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8093 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8094 cat >> confdefs.h <<\EOF
8095 #define HAVE_AS_OFFSETABLE_LO10 1
8102 i[34567]86-*-* | x86_64-*-*)
8103 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8104 echo "configure:8105: checking assembler instructions" >&5
8105 gcc_cv_as_instructions=
8106 if test $in_tree_gas = yes ; then
8107 if test $gcc_cv_gas_major_version -eq 2 \
8108 && test $gcc_cv_gas_minor_version -ge 9 \
8109 || test $gcc_cv_gas_major_version -gt 2 ; then
8112 gcc_cv_as_instructions="filds fists"
8117 elif test x$gcc_cv_as != x; then
8118 set "filds fists" "filds mem; fists mem"
8119 while test $# -gt 0
8121 echo "$2" > conftest.s
8122 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8123 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8125 shift 2
8126 done
8127 rm -f conftest.s conftest.o
8129 if test x"$gcc_cv_as_instructions" != x; then
8130 cat >> confdefs.h <<EOF
8131 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8135 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8137 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8138 echo "configure:8139: checking assembler GOTOFF in data directives" >&5
8139 gcc_cv_as_gotoff_in_data=no
8140 if test $in_tree_gas = yes ; then
8141 if test $gcc_cv_gas_major_version -eq 2 \
8142 && test $gcc_cv_gas_minor_version -ge 11 \
8143 || test $gcc_cv_gas_major_version -gt 2 ; then
8146 gcc_cv_as_gotoff_in_data=yes
8151 elif test x$gcc_cv_as != x; then
8152 cat > conftest.s <<EOF
8153 .text
8154 .L0:
8156 .data
8157 .long .L0@GOTOFF
8159 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8160 gcc_cv_as_gotoff_in_data=yes
8163 cat >> confdefs.h <<EOF
8164 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8167 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8170 ia64*-*-*)
8171 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8172 echo "configure:8173: checking assembler supports ltoffx and ldxmov" >&5
8173 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8174 echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8177 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8178 if test $in_tree_gas = yes ; then
8179 if test $gcc_cv_gas_major_version -eq 2 \
8180 && test $gcc_cv_gas_minor_version -ge 14 \
8181 || test $gcc_cv_gas_major_version -gt 2 ; then
8184 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8189 elif test x$gcc_cv_as != x; then
8190 cat > conftest.s << 'EOF'
8191 .text
8192 addl r15 = @ltoffx(x#), gp
8194 ld8.mov r16 = [r15], x#
8196 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8197 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8198 else
8199 gcc_cv_as_ltoffx_ldxmov_relocs=no
8201 rm -f conftest.s conftest.o
8206 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8207 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8208 cat >> confdefs.h <<\EOF
8209 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8214 esac
8216 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8217 echo "configure:8218: checking assembler dwarf2 debug_line support" >&5
8218 gcc_cv_as_dwarf2_debug_line=no
8219 # ??? Not all targets support dwarf2 debug_line, even within a version
8220 # of gas. Moreover, we need to emit a valid instruction to trigger any
8221 # info to the output file. So, as supported targets are added to gas 2.11,
8222 # add some instruction here to (also) show we expect this might work.
8223 # ??? Once 2.11 is released, probably need to add first known working
8224 # version to the per-target configury.
8225 case "$target" in
8226 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8227 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
8228 | xstormy16*-*-* | cris-*-*)
8229 insn="nop"
8231 ia64*-*-*)
8232 insn="nop 0"
8234 mmix-*-*)
8235 insn="swym 0"
8237 esac
8238 if test $in_tree_gas = yes ; then
8239 if test $gcc_cv_gas_major_version -eq 2 \
8240 && test $gcc_cv_gas_minor_version -ge 11 \
8241 || test $gcc_cv_gas_major_version -gt 2 ; then
8244 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8245 && test x"$insn" != x ; then
8246 gcc_cv_as_dwarf2_debug_line="yes"
8252 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8253 echo ' .file 1 "conftest.s"' > conftest.s
8254 echo ' .loc 1 3 0' >> conftest.s
8255 echo " $insn" >> conftest.s
8256 # ??? This fails with non-gnu grep.
8257 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8258 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8259 # The .debug_line file table must be in the exact order that
8260 # we specified the files, since these indices are also used
8261 # by DW_AT_decl_file. Approximate this test by testing if
8262 # the assembler bitches if the same index is assigned twice.
8263 echo ' .file 1 "foo.s"' > conftest.s
8264 echo ' .file 1 "bar.s"' >> conftest.s
8265 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8266 then
8267 gcc_cv_as_dwarf2_debug_line="no"
8268 else
8269 gcc_cv_as_dwarf2_debug_line="yes"
8272 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8274 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8275 cat >> confdefs.h <<\EOF
8276 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8280 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8282 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8283 echo "configure:8284: checking assembler --gdwarf2 support" >&5
8284 gcc_cv_as_gdwarf2_flag=no
8285 if test $in_tree_gas = yes ; then
8286 if test $gcc_cv_gas_major_version -eq 2 \
8287 && test $gcc_cv_gas_minor_version -ge 11 \
8288 || test $gcc_cv_gas_major_version -gt 2 ; then
8291 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8292 && test x"$insn" != x ; then
8293 gcc_cv_as_gdwarf2_flag="yes"
8299 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8300 echo '' > conftest.s
8301 # ??? This fails with non-gnu grep.
8302 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8303 then
8304 gcc_cv_as_gdwarf2_flag="yes"
8306 rm -f conftest.s conftest.o
8308 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8309 cat >> confdefs.h <<\EOF
8310 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8314 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8316 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8317 echo "configure:8318: checking assembler --gstabs support" >&5
8318 gcc_cv_as_gstabs_flag=no
8319 if test $in_tree_gas = yes ; then
8320 if test $gcc_cv_gas_major_version -eq 2 \
8321 && test $gcc_cv_gas_minor_version -ge 11 \
8322 || test $gcc_cv_gas_major_version -gt 2 ; then
8325 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8326 && test x"$insn" != x ; then
8327 gcc_cv_as_gstabs_flag="yes"
8333 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8334 echo '' > conftest.s
8335 # ??? This fails with non-gnu grep.
8336 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8337 gcc_cv_as_gstabs_flag="yes"
8339 rm -f conftest.s conftest.o
8341 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8342 cat >> confdefs.h <<\EOF
8343 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8347 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8349 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8350 echo "configure:8351: checking linker read-only and read-write section mixing" >&5
8351 gcc_cv_ld_ro_rw_mix=unknown
8352 if test $in_tree_ld = yes ; then
8353 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
8354 gcc_cv_ld_ro_rw_mix=read-write
8356 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8357 echo '.section myfoosect, "a"' > conftest1.s
8358 echo '.section myfoosect, "aw"' > conftest2.s
8359 echo '.byte 1' >> conftest2.s
8360 echo '.section myfoosect, "a"' > conftest3.s
8361 echo '.byte 0' >> conftest3.s
8362 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8363 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8364 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8365 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8366 conftest2.o conftest3.o > /dev/null 2>&1; then
8367 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8368 | sed -e '/myfoosect/!d' -e N`
8369 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8370 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8371 gcc_cv_ld_ro_rw_mix=read-only
8372 else
8373 gcc_cv_ld_ro_rw_mix=read-write
8377 rm -f conftest.* conftest[123].*
8379 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8380 cat >> confdefs.h <<\EOF
8381 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8385 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8387 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8388 echo "configure:8389: checking linker PT_GNU_EH_FRAME support" >&5
8389 gcc_cv_ld_eh_frame_hdr=no
8390 if test $in_tree_ld = yes ; then
8391 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
8392 gcc_cv_ld_eh_frame_hdr=yes
8394 elif test x$gcc_cv_ld != x; then
8395 # Check if linker supports --eh-frame-hdr option
8396 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8397 gcc_cv_ld_eh_frame_hdr=yes
8400 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8401 cat >> confdefs.h <<\EOF
8402 #define HAVE_LD_EH_FRAME_HDR 1
8406 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8408 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
8409 echo "configure:8410: checking linker position independent executable support" >&5
8410 gcc_cv_ld_pie=no
8411 if test $in_tree_ld = yes ; then
8412 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
8413 gcc_cv_ld_pie=yes
8415 elif test x$gcc_cv_ld != x; then
8416 # Check if linker supports -pie option
8417 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
8418 gcc_cv_ld_pie=yes
8421 if test x"$gcc_cv_ld_pie" = xyes; then
8422 cat >> confdefs.h <<\EOF
8423 #define HAVE_LD_PIE 1
8427 echo "$ac_t""$gcc_cv_ld_pie" 1>&6
8429 # Miscellaneous target-specific checks.
8430 case "$target" in
8431 mips*-*-*)
8432 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8433 echo "configure:8434: checking whether libgloss uses STARTUP directives consistently" >&5
8434 gcc_cv_mips_libgloss_startup=no
8435 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8436 if test "x$exec_prefix" = xNONE; then
8437 if test "x$prefix" = xNONE; then
8438 test_prefix=/usr/local
8439 else
8440 test_prefix=$prefix
8442 else
8443 test_prefix=$exec_prefix
8445 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8447 if grep '^STARTUP' $f > /dev/null 2>&1; then
8448 gcc_cv_mips_libgloss_startup=yes
8449 break
8451 done
8452 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8453 cat >> confdefs.h <<\EOF
8454 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8458 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8460 echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
8461 echo "configure:8462: checking whether the assembler has explicit relocation support" >&5
8462 if test x$gcc_cv_mips_explicit_relocs = x; then
8463 gcc_cv_mips_explicit_relocs=no
8464 if test $in_tree_gas = yes; then
8465 if test $gcc_cv_gas_major_version -eq 2 \
8466 && test $gcc_cv_gas_minor_version -ge 14 \
8467 || test $gcc_cv_gas_major_version -gt 2 ; then
8470 gcc_cv_mips_explicit_relocs=yes
8475 elif test x$gcc_cv_as != x; then
8476 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
8477 if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
8478 gcc_cv_mips_explicit_relocs=yes
8480 rm -f conftest.s conftest.o
8483 if test $gcc_cv_mips_explicit_relocs = yes; then
8484 test x$target_cpu_default != x || target_cpu_default=0
8485 target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
8487 echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
8489 esac
8491 if test x$with_sysroot = x && test x$host = x$target \
8492 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8493 cat >> confdefs.h <<EOF
8494 #define PREFIX_INCLUDE_DIR "$prefix/include"
8499 # Figure out what language subdirectories are present.
8500 # Look if the user specified --enable-languages="..."; if not, use
8501 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8502 # go away some day.
8503 # NB: embedded tabs in this IF block -- do not untabify
8504 if test x"${enable_languages+set}" != xset; then
8505 if test x"${LANGUAGES+set}" = xset; then
8506 enable_languages="${LANGUAGES}"
8507 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8509 else
8510 enable_languages=all
8512 else
8513 if test x"${enable_languages}" = x \
8514 || test x"${enable_languages}" = xyes;
8515 then
8516 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8519 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8521 # First scan to see if an enabled language requires some other language.
8522 # We assume that a given config-lang.in will list all the language
8523 # front ends it requires, even if some are required indirectly.
8524 for lang in ${srcdir}/*/config-lang.in ..
8526 case $lang in
8529 # The odd quoting in the next line works around
8530 # an apparent bug in bash 1.12 on linux.
8531 ${srcdir}/[*]/config-lang.in)
8534 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8535 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8536 for other in $this_lang_requires
8538 case ,${enable_languages}, in
8539 *,$other,*)
8541 *,all,*)
8543 *,$lang_alias,*)
8544 enable_languages="$enable_languages,$other"
8546 esac
8547 done
8549 esac
8550 done
8552 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8553 found_languages=
8554 subdirs=
8555 for lang in ${srcdir}/*/config-lang.in ..
8557 case $lang in
8558 ..) ;;
8559 # The odd quoting in the next line works around
8560 # an apparent bug in bash 1.12 on linux.
8561 ${srcdir}/[*]/config-lang.in) ;;
8563 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8564 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8565 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8566 if test "x$lang_alias" = x
8567 then
8568 echo "$lang doesn't set \$language." 1>&2
8569 exit 1
8571 case ${build_by_default},${enable_languages}, in
8572 *,$lang_alias,*) add_this_lang=yes ;;
8573 no,*) add_this_lang=no ;;
8574 *,all,*) add_this_lang=yes ;;
8575 *) add_this_lang=no ;;
8576 esac
8577 found_languages="${found_languages} ${lang_alias}"
8578 if test x"${add_this_lang}" = xyes; then
8579 case $lang in
8580 ${srcdir}/ada/config-lang.in)
8581 if test x$have_gnat = xyes ; then
8582 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8586 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8588 esac
8591 esac
8592 done
8594 missing_languages=
8595 for expected_language in ${expected_languages} ..
8597 if test "${expected_language}" != ..; then
8598 missing_language="${expected_language}"
8599 if test "${expected_language}" = "c" \
8600 || test "${expected_language}" = "all"; then
8601 missing_language=
8603 for found_language in ${found_languages} ..
8605 if test "${found_language}" != ..; then
8606 if test "${expected_language}" = "${found_language}"; then
8607 missing_language=
8610 done
8611 if test "x${missing_language}" != x; then
8612 missing_languages="${missing_languages} ${missing_language}"
8615 done
8617 if test "x$missing_languages" != x; then
8618 { echo "configure: error:
8619 The following requested languages were not found:${missing_languages}
8620 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8623 # Make gthr-default.h if we have a thread file.
8624 gthread_flags=
8625 if test $thread_file != single; then
8626 rm -f gthr-default.h
8627 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8628 gthread_flags=-DHAVE_GTHR_DEFAULT
8632 # Find out what GC implementation we want, or may, use.
8633 # Check whether --with-gc or --without-gc was given.
8634 if test "${with_gc+set}" = set; then
8635 withval="$with_gc"
8636 case "$withval" in
8637 simple | page)
8638 GGC=ggc-$withval
8641 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8643 esac
8644 else
8645 GGC=ggc-page
8649 echo "Using $GGC for garbage collection."
8651 # Use the system's zlib library.
8652 zlibdir=-L../zlib
8653 zlibinc="-I\$(srcdir)/../zlib"
8654 # Check whether --with-system-zlib or --without-system-zlib was given.
8655 if test "${with_system_zlib+set}" = set; then
8656 withval="$with_system_zlib"
8657 zlibdir=
8658 zlibinc=
8666 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8667 echo "configure:8668: checking whether to enable maintainer-specific portions of Makefiles" >&5
8668 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8669 if test "${enable_maintainer_mode+set}" = set; then
8670 enableval="$enable_maintainer_mode"
8671 maintainer_mode=$enableval
8672 else
8673 maintainer_mode=no
8677 echo "$ac_t""$maintainer_mode" 1>&6
8679 if test "$maintainer_mode" = "yes"; then
8680 MAINT=''
8681 else
8682 MAINT='#'
8685 # Make empty files to contain the specs and options for each language.
8686 # Then add #include lines to for a compiler that has specs and/or options.
8688 lang_opt_files=
8689 lang_specs_files=
8690 lang_options_files=
8691 lang_tree_files=
8692 for subdir in . $subdirs
8694 if test -f $srcdir/$subdir/lang.opt; then
8695 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
8697 if test -f $srcdir/$subdir/lang-specs.h; then
8698 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8700 if test -f $srcdir/$subdir/lang-options.h; then
8701 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8703 if test -f $srcdir/$subdir/$subdir-tree.def; then
8704 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8706 done
8708 # These (without "all_") are set in each config-lang.in.
8709 # `language' must be a single word so is spelled singularly.
8710 all_languages=
8711 all_boot_languages=
8712 all_compilers=
8713 all_stagestuff=
8714 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8715 # List of language makefile fragments.
8716 all_lang_makefiles=
8717 # Files for gengtype
8718 all_gtfiles="$target_gtfiles"
8719 # Files for gengtype with language
8720 all_gtfiles_files_langs=
8721 all_gtfiles_files_files=
8723 # Add the language fragments.
8724 # Languages are added via two mechanisms. Some information must be
8725 # recorded in makefile variables, these are defined in config-lang.in.
8726 # We accumulate them and plug them into the main Makefile.
8727 # The other mechanism is a set of hooks for each of the main targets
8728 # like `clean', `install', etc.
8730 language_fragments="Make-lang"
8731 language_hooks="Make-hooks"
8733 for s in .. $subdirs
8735 if test $s != ".."
8736 then
8737 language=
8738 boot_language=
8739 compilers=
8740 stagestuff=
8741 outputs=
8742 gtfiles=
8743 . ${srcdir}/$s/config-lang.in
8744 if test "x$language" = x
8745 then
8746 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8747 exit 1
8749 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8750 if test -f ${srcdir}/$s/Makefile.in
8751 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8753 all_languages="$all_languages $language"
8754 if test "x$boot_language" = xyes
8755 then
8756 all_boot_languages="$all_boot_languages $language"
8758 all_compilers="$all_compilers $compilers"
8759 all_stagestuff="$all_stagestuff $stagestuff"
8760 all_outputs="$all_outputs $outputs"
8761 all_gtfiles="$all_gtfiles $gtfiles"
8762 for f in .. $gtfiles
8764 if test $f != ".."
8765 then
8766 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8767 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8769 done
8771 done
8773 # Pick up gtfiles for c
8774 gtfiles=
8775 s="c"
8776 . ${srcdir}/c-config-lang.in
8777 all_gtfiles="$all_gtfiles $gtfiles"
8778 for f in .. $gtfiles
8780 if test $f != ".."
8781 then
8782 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8783 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8785 done
8787 check_languages=
8788 for language in .. $all_languages
8790 if test $language != ".."
8791 then
8792 check_languages="$check_languages check-$language"
8794 done
8796 # Since we can't use `::' targets, we link each language in
8797 # with a set of hooks, reached indirectly via lang.${target}.
8799 rm -f Make-hooks
8800 touch Make-hooks
8801 target_list="all.build all.cross start.encap rest.encap tags \
8802 info dvi generated-manpages \
8803 install-normal install-common install-info install-man \
8804 uninstall \
8805 mostlyclean clean distclean extraclean maintainer-clean \
8806 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
8807 for t in $target_list
8810 for lang in .. $all_languages
8812 if test $lang != ".."; then
8813 x="$x $lang.$t"
8815 done
8816 echo "lang.$t: $x" >> Make-hooks
8817 done
8819 # Create .gdbinit.
8821 echo "dir ." > .gdbinit
8822 echo "dir ${srcdir}" >> .gdbinit
8823 if test x$gdb_needs_out_file_path = xyes
8824 then
8825 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8827 if test "x$subdirs" != x; then
8828 for s in $subdirs
8830 echo "dir ${srcdir}/$s" >> .gdbinit
8831 done
8833 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8835 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8836 # absolute path for gcc_tooldir based on inserting the number of up-directory
8837 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8838 # $(libsubdir)/@(unlibsubdir) based path.
8839 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8840 # make and thus we'd get different behavior depending on where we built the
8841 # sources.
8842 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8843 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8844 else
8845 # An explanation of the sed strings:
8846 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8847 # -e 's|/$||' match a trailing forward slash and eliminates it
8848 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8849 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8851 # (*) Note this pattern overwrites the first character of the string
8852 # with a forward slash if one is not already present. This is not a
8853 # problem because the exact names of the sub-directories concerned is
8854 # unimportant, just the number of them matters.
8856 # The practical upshot of these patterns is like this:
8858 # prefix exec_prefix result
8859 # ------ ----------- ------
8860 # /foo /foo/bar ../
8861 # /foo/ /foo/bar ../
8862 # /foo /foo/bar/ ../
8863 # /foo/ /foo/bar/ ../
8864 # /foo /foo/bar/ugg ../../
8866 dollar='$$'
8867 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8872 # Find a directory in which to install a shared libgcc.
8874 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8875 if test "${enable_version_specific_runtime_libs+set}" = set; then
8876 enableval="$enable_version_specific_runtime_libs"
8881 # Check whether --with-slibdir or --without-slibdir was given.
8882 if test "${with_slibdir+set}" = set; then
8883 withval="$with_slibdir"
8884 slibdir="$with_slibdir"
8885 else
8886 if test "${enable_version_specific_runtime_libs+set}" = set; then
8887 slibdir='$(libsubdir)'
8888 elif test "$host" != "$target"; then
8889 slibdir='$(build_tooldir)/lib'
8890 else
8891 slibdir='$(libdir)'
8897 objdir=`${PWDCMD-pwd}`
8900 # Process the language and host/target makefile fragments.
8901 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8903 # Substitute configuration variables
8974 # Echo that links are built
8975 if test x$host = x$target
8976 then
8977 str1="native "
8978 else
8979 str1="cross-"
8980 str2=" from $host"
8983 if test x$host != x$build
8984 then
8985 str3=" on a $build system"
8988 if test "x$str2" != x || test "x$str3" != x
8989 then
8990 str4=
8993 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8995 if test "x$str2" != x || test "x$str3" != x
8996 then
8997 echo " ${str2}${str3}." 1>&2
9000 # Configure the subdirectories
9001 # AC_CONFIG_SUBDIRS($subdirs)
9003 # Create the Makefile
9004 # and configure language subdirectories
9005 trap '' 1 2 15
9006 cat > confcache <<\EOF
9007 # This file is a shell script that caches the results of configure
9008 # tests run on this system so they can be shared between configure
9009 # scripts and configure runs. It is not useful on other systems.
9010 # If it contains results you don't want to keep, you may remove or edit it.
9012 # By default, configure uses ./config.cache as the cache file,
9013 # creating it if it does not exist already. You can give configure
9014 # the --cache-file=FILE option to use a different cache file; that is
9015 # what configure does when it calls configure scripts in
9016 # subdirectories, so they share the cache.
9017 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9018 # config.status only pays attention to the cache file if you give it the
9019 # --recheck option to rerun configure.
9022 # The following way of writing the cache mishandles newlines in values,
9023 # but we know of no workaround that is simple, portable, and efficient.
9024 # So, don't put newlines in cache variables' values.
9025 # Ultrix sh set writes to stderr and can't be redirected directly,
9026 # and sets the high bit in the cache file unless we assign to the vars.
9027 (set) 2>&1 |
9028 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9029 *ac_space=\ *)
9030 # `set' does not quote correctly, so add quotes (double-quote substitution
9031 # turns \\\\ into \\, and sed turns \\ into \).
9032 sed -n \
9033 -e "s/'/'\\\\''/g" \
9034 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9037 # `set' quotes correctly as required by POSIX, so do not add quotes.
9038 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9040 esac >> confcache
9041 if cmp -s $cache_file confcache; then
9043 else
9044 if test -w $cache_file; then
9045 echo "updating cache $cache_file"
9046 cat confcache > $cache_file
9047 else
9048 echo "not updating unwritable cache $cache_file"
9051 rm -f confcache
9053 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9055 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9056 # Let make expand exec_prefix.
9057 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9059 # Any assignment to VPATH causes Sun make to only execute
9060 # the first set of double-colon rules, so remove it if not needed.
9061 # If there is a colon in the path, we need to keep it.
9062 if test "x$srcdir" = x.; then
9063 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9066 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9068 DEFS=-DHAVE_CONFIG_H
9070 # Without the "./", some shells look in PATH for config.status.
9071 : ${CONFIG_STATUS=./config.status}
9073 echo creating $CONFIG_STATUS
9074 rm -f $CONFIG_STATUS
9075 cat > $CONFIG_STATUS <<EOF
9076 #! /bin/sh
9077 # Generated automatically by configure.
9078 # Run this file to recreate the current configuration.
9079 # This directory was configured as follows,
9080 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9082 # $0 $ac_configure_args
9084 # Compiler output produced by configure, useful for debugging
9085 # configure, is in ./config.log if it exists.
9087 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9088 for ac_option
9090 case "\$ac_option" in
9091 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9092 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9093 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9094 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9095 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9096 exit 0 ;;
9097 -help | --help | --hel | --he | --h)
9098 echo "\$ac_cs_usage"; exit 0 ;;
9099 *) echo "\$ac_cs_usage"; exit 1 ;;
9100 esac
9101 done
9103 ac_given_srcdir=$srcdir
9105 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9107 cat >> $CONFIG_STATUS <<EOF
9109 # Protect against being on the right side of a sed subst in config.status.
9110 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9111 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9112 $ac_vpsub
9113 $extrasub
9114 s%@SHELL@%$SHELL%g
9115 s%@CFLAGS@%$CFLAGS%g
9116 s%@CPPFLAGS@%$CPPFLAGS%g
9117 s%@CXXFLAGS@%$CXXFLAGS%g
9118 s%@FFLAGS@%$FFLAGS%g
9119 s%@DEFS@%$DEFS%g
9120 s%@LDFLAGS@%$LDFLAGS%g
9121 s%@LIBS@%$LIBS%g
9122 s%@exec_prefix@%$exec_prefix%g
9123 s%@prefix@%$prefix%g
9124 s%@program_transform_name@%$program_transform_name%g
9125 s%@bindir@%$bindir%g
9126 s%@sbindir@%$sbindir%g
9127 s%@libexecdir@%$libexecdir%g
9128 s%@datadir@%$datadir%g
9129 s%@sysconfdir@%$sysconfdir%g
9130 s%@sharedstatedir@%$sharedstatedir%g
9131 s%@localstatedir@%$localstatedir%g
9132 s%@libdir@%$libdir%g
9133 s%@includedir@%$includedir%g
9134 s%@oldincludedir@%$oldincludedir%g
9135 s%@infodir@%$infodir%g
9136 s%@mandir@%$mandir%g
9137 s%@host@%$host%g
9138 s%@host_alias@%$host_alias%g
9139 s%@host_cpu@%$host_cpu%g
9140 s%@host_vendor@%$host_vendor%g
9141 s%@host_os@%$host_os%g
9142 s%@target@%$target%g
9143 s%@target_alias@%$target_alias%g
9144 s%@target_cpu@%$target_cpu%g
9145 s%@target_vendor@%$target_vendor%g
9146 s%@target_os@%$target_os%g
9147 s%@build@%$build%g
9148 s%@build_alias@%$build_alias%g
9149 s%@build_cpu@%$build_cpu%g
9150 s%@build_vendor@%$build_vendor%g
9151 s%@build_os@%$build_os%g
9152 s%@build_subdir@%$build_subdir%g
9153 s%@host_subdir@%$host_subdir%g
9154 s%@target_subdir@%$target_subdir%g
9155 s%@CC@%$CC%g
9156 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9157 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9158 s%@CPP@%$CPP%g
9159 s%@GNATBIND@%$GNATBIND%g
9160 s%@ADAC@%$ADAC%g
9161 s%@strict1_warn@%$strict1_warn%g
9162 s%@warn_cflags@%$warn_cflags%g
9163 s%@WERROR@%$WERROR%g
9164 s%@nocommon_flag@%$nocommon_flag%g
9165 s%@valgrind_path@%$valgrind_path%g
9166 s%@valgrind_path_defines@%$valgrind_path_defines%g
9167 s%@valgrind_command@%$valgrind_command%g
9168 s%@coverage_flags@%$coverage_flags%g
9169 s%@enable_multilib@%$enable_multilib%g
9170 s%@enable_shared@%$enable_shared%g
9171 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9172 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9173 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9174 s%@SET_MAKE@%$SET_MAKE%g
9175 s%@AWK@%$AWK%g
9176 s%@LN@%$LN%g
9177 s%@LN_S@%$LN_S%g
9178 s%@RANLIB@%$RANLIB%g
9179 s%@INSTALL@%$INSTALL%g
9180 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9181 s%@INSTALL_DATA@%$INSTALL_DATA%g
9182 s%@have_mktemp_command@%$have_mktemp_command%g
9183 s%@MAKEINFO@%$MAKEINFO%g
9184 s%@BUILD_INFO@%$BUILD_INFO%g
9185 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9186 s%@make_compare_target@%$make_compare_target%g
9187 s%@FLEX@%$FLEX%g
9188 s%@BISON@%$BISON%g
9189 s%@stage1_cflags@%$stage1_cflags%g
9190 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9191 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9192 s%@LDEXP_LIB@%$LDEXP_LIB%g
9193 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9194 s%@LIBICONV@%$LIBICONV%g
9195 s%@manext@%$manext%g
9196 s%@objext@%$objext%g
9197 s%@extra_modes_file@%$extra_modes_file%g
9198 s%@FORBUILD@%$FORBUILD%g
9199 s%@PACKAGE@%$PACKAGE%g
9200 s%@VERSION@%$VERSION%g
9201 s%@ALLOCA@%$ALLOCA%g
9202 s%@GLIBC21@%$GLIBC21%g
9203 s%@USE_NLS@%$USE_NLS%g
9204 s%@MSGFMT@%$MSGFMT%g
9205 s%@GMSGFMT@%$GMSGFMT%g
9206 s%@XGETTEXT@%$XGETTEXT%g
9207 s%@INTLBISON@%$INTLBISON%g
9208 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9209 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9210 s%@CATALOGS@%$CATALOGS%g
9211 s%@CATOBJEXT@%$CATOBJEXT%g
9212 s%@INTLLIBS@%$INTLLIBS%g
9213 s%@INTLDEPS@%$INTLDEPS%g
9214 s%@INTLOBJS@%$INTLOBJS%g
9215 s%@POSUB@%$POSUB%g
9216 s%@DATADIRNAME@%$DATADIRNAME%g
9217 s%@INSTOBJEXT@%$INSTOBJEXT%g
9218 s%@GENCAT@%$GENCAT%g
9219 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9220 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9221 s%@CROSS@%$CROSS%g
9222 s%@ALL@%$ALL%g
9223 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9224 s%@inhibit_libc@%$inhibit_libc%g
9225 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9226 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9227 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
9228 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9229 s%@STMP_FIXINC@%$STMP_FIXINC%g
9230 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9231 s%@libgcc_visibility@%$libgcc_visibility%g
9232 s%@gthread_flags@%$gthread_flags%g
9233 s%@GGC@%$GGC%g
9234 s%@zlibdir@%$zlibdir%g
9235 s%@zlibinc@%$zlibinc%g
9236 s%@MAINT@%$MAINT%g
9237 s%@gcc_tooldir@%$gcc_tooldir%g
9238 s%@dollar@%$dollar%g
9239 s%@slibdir@%$slibdir%g
9240 s%@objdir@%$objdir%g
9241 s%@subdirs@%$subdirs%g
9242 s%@srcdir@%$srcdir%g
9243 s%@all_boot_languages@%$all_boot_languages%g
9244 s%@all_compilers@%$all_compilers%g
9245 s%@all_gtfiles@%$all_gtfiles%g
9246 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9247 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9248 s%@all_lang_makefiles@%$all_lang_makefiles%g
9249 s%@all_languages@%$all_languages%g
9250 s%@all_stagestuff@%$all_stagestuff%g
9251 s%@build_exeext@%$build_exeext%g
9252 s%@build_install_headers_dir@%$build_install_headers_dir%g
9253 s%@build_xm_file_list@%$build_xm_file_list%g
9254 s%@build_xm_file@%$build_xm_file%g
9255 s%@build_xm_defines@%$build_xm_defines%g
9256 s%@check_languages@%$check_languages%g
9257 s%@cc_set_by_configure@%$cc_set_by_configure%g
9258 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9259 s%@cpp_install_dir@%$cpp_install_dir%g
9260 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9261 s%@dep_tmake_file@%$dep_tmake_file%g
9262 s%@extra_headers_list@%$extra_headers_list%g
9263 s%@extra_objs@%$extra_objs%g
9264 s%@extra_parts@%$extra_parts%g
9265 s%@extra_passes@%$extra_passes%g
9266 s%@extra_programs@%$extra_programs%g
9267 s%@float_h_file@%$float_h_file%g
9268 s%@gcc_config_arguments@%$gcc_config_arguments%g
9269 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9270 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9271 s%@gcc_version@%$gcc_version%g
9272 s%@gcc_version_full@%$gcc_version_full%g
9273 s%@gcc_version_trigger@%$gcc_version_trigger%g
9274 s%@host_exeext@%$host_exeext%g
9275 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9276 s%@host_xm_file_list@%$host_xm_file_list%g
9277 s%@host_xm_file@%$host_xm_file%g
9278 s%@host_xm_defines@%$host_xm_defines%g
9279 s%@out_host_hook_obj@%$out_host_hook_obj%g
9280 s%@install@%$install%g
9281 s%@lang_opt_files@%$lang_opt_files%g
9282 s%@lang_options_files@%$lang_options_files%g
9283 s%@lang_specs_files@%$lang_specs_files%g
9284 s%@lang_tree_files@%$lang_tree_files%g
9285 s%@local_prefix@%$local_prefix%g
9286 s%@md_file@%$md_file%g
9287 s%@objc_boehm_gc@%$objc_boehm_gc%g
9288 s%@out_file@%$out_file%g
9289 s%@out_object_file@%$out_object_file%g
9290 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9291 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9292 s%@symbolic_link@%$symbolic_link%g
9293 s%@thread_file@%$thread_file%g
9294 s%@tm_file_list@%$tm_file_list%g
9295 s%@tm_file@%$tm_file%g
9296 s%@tm_defines@%$tm_defines%g
9297 s%@tm_p_file_list@%$tm_p_file_list%g
9298 s%@tm_p_file@%$tm_p_file%g
9299 s%@xm_file@%$xm_file%g
9300 s%@xm_defines@%$xm_defines%g
9301 s%@c_target_objs@%$c_target_objs%g
9302 s%@cxx_target_objs@%$cxx_target_objs%g
9303 s%@target_cpu_default@%$target_cpu_default%g
9304 /@target_overrides@/r $target_overrides
9305 s%@target_overrides@%%g
9306 /@host_overrides@/r $host_overrides
9307 s%@host_overrides@%%g
9308 /@language_fragments@/r $language_fragments
9309 s%@language_fragments@%%g
9310 /@language_hooks@/r $language_hooks
9311 s%@language_hooks@%%g
9313 CEOF
9316 cat >> $CONFIG_STATUS <<\EOF
9318 # Split the substitutions into bite-sized pieces for seds with
9319 # small command number limits, like on Digital OSF/1 and HP-UX.
9320 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9321 ac_file=1 # Number of current file.
9322 ac_beg=1 # First line for current file.
9323 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9324 ac_more_lines=:
9325 ac_sed_cmds=""
9326 while $ac_more_lines; do
9327 if test $ac_beg -gt 1; then
9328 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9329 else
9330 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9332 if test ! -s conftest.s$ac_file; then
9333 ac_more_lines=false
9334 rm -f conftest.s$ac_file
9335 else
9336 if test -z "$ac_sed_cmds"; then
9337 ac_sed_cmds="sed -f conftest.s$ac_file"
9338 else
9339 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9341 ac_file=`expr $ac_file + 1`
9342 ac_beg=$ac_end
9343 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9345 done
9346 if test -z "$ac_sed_cmds"; then
9347 ac_sed_cmds=cat
9351 cat >> $CONFIG_STATUS <<EOF
9353 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9355 cat >> $CONFIG_STATUS <<\EOF
9356 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9357 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9358 case "$ac_file" in
9359 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9360 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9361 *) ac_file_in="${ac_file}.in" ;;
9362 esac
9364 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9366 # Remove last slash and all that follows it. Not all systems have dirname.
9367 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9368 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9369 # The file is in a subdirectory.
9370 test ! -d "$ac_dir" && mkdir "$ac_dir"
9371 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9372 # A "../" for each directory in $ac_dir_suffix.
9373 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9374 else
9375 ac_dir_suffix= ac_dots=
9378 case "$ac_given_srcdir" in
9379 .) srcdir=.
9380 if test -z "$ac_dots"; then top_srcdir=.
9381 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9382 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9383 *) # Relative path.
9384 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9385 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9386 esac
9389 echo creating "$ac_file"
9390 rm -f "$ac_file"
9391 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9392 case "$ac_file" in
9393 *Makefile*) ac_comsub="1i\\
9394 # $configure_input" ;;
9395 *) ac_comsub= ;;
9396 esac
9398 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9399 sed -e "$ac_comsub
9400 s%@configure_input@%$configure_input%g
9401 s%@srcdir@%$srcdir%g
9402 s%@top_srcdir@%$top_srcdir%g
9403 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9404 fi; done
9405 rm -f conftest.s*
9407 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9408 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9410 # ac_d sets the value in "#define NAME VALUE" lines.
9411 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9412 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9413 ac_dC='\3'
9414 ac_dD='%g'
9415 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9416 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9417 ac_uB='\([ ]\)%\1#\2define\3'
9418 ac_uC=' '
9419 ac_uD='\4%g'
9420 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9421 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9422 ac_eB='$%\1#\2define\3'
9423 ac_eC=' '
9424 ac_eD='%g'
9426 if test "${CONFIG_HEADERS+set}" != set; then
9428 cat >> $CONFIG_STATUS <<EOF
9429 CONFIG_HEADERS="auto-host.h:config.in"
9431 cat >> $CONFIG_STATUS <<\EOF
9433 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9434 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9435 case "$ac_file" in
9436 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9437 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9438 *) ac_file_in="${ac_file}.in" ;;
9439 esac
9441 echo creating $ac_file
9443 rm -f conftest.frag conftest.in conftest.out
9444 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9445 cat $ac_file_inputs > conftest.in
9449 # Transform confdefs.h into a sed script conftest.vals that substitutes
9450 # the proper values into config.h.in to produce config.h. And first:
9451 # Protect against being on the right side of a sed subst in config.status.
9452 # Protect against being in an unquoted here document in config.status.
9453 rm -f conftest.vals
9454 cat > conftest.hdr <<\EOF
9455 s/[\\&%]/\\&/g
9456 s%[\\$`]%\\&%g
9457 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9458 s%ac_d%ac_u%gp
9459 s%ac_u%ac_e%gp
9461 sed -n -f conftest.hdr confdefs.h > conftest.vals
9462 rm -f conftest.hdr
9464 # This sed command replaces #undef with comments. This is necessary, for
9465 # example, in the case of _POSIX_SOURCE, which is predefined and required
9466 # on some systems where configure will not decide to define it.
9467 cat >> conftest.vals <<\EOF
9468 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9471 # Break up conftest.vals because some shells have a limit on
9472 # the size of here documents, and old seds have small limits too.
9474 rm -f conftest.tail
9475 while :
9477 ac_lines=`grep -c . conftest.vals`
9478 # grep -c gives empty output for an empty file on some AIX systems.
9479 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9480 # Write a limited-size here document to conftest.frag.
9481 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9482 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9483 echo 'CEOF
9484 sed -f conftest.frag conftest.in > conftest.out
9485 rm -f conftest.in
9486 mv conftest.out conftest.in
9487 ' >> $CONFIG_STATUS
9488 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9489 rm -f conftest.vals
9490 mv conftest.tail conftest.vals
9491 done
9492 rm -f conftest.vals
9494 cat >> $CONFIG_STATUS <<\EOF
9495 rm -f conftest.frag conftest.h
9496 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9497 cat conftest.in >> conftest.h
9498 rm -f conftest.in
9499 if cmp -s $ac_file conftest.h 2>/dev/null; then
9500 echo "$ac_file is unchanged"
9501 rm -f conftest.h
9502 else
9503 # Remove last slash and all that follows it. Not all systems have dirname.
9504 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9505 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9506 # The file is in a subdirectory.
9507 test ! -d "$ac_dir" && mkdir "$ac_dir"
9509 rm -f $ac_file
9510 mv conftest.h $ac_file
9512 fi; done
9515 cat >> $CONFIG_STATUS <<EOF
9517 subdirs='$subdirs'
9518 symbolic_link='$symbolic_link'
9521 cat >> $CONFIG_STATUS <<\EOF
9522 for ac_file in $CONFIG_FILES; do
9523 # Support "outfile[:infile[:infile...]]"
9524 case "$ac_file" in
9525 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9526 esac
9527 # PO directories have a Makefile.in generated from Makefile.in.in.
9528 case "$ac_file" in */Makefile.in)
9529 # Adjust a relative srcdir.
9530 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9531 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9532 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9533 # In autoconf-2.13 it is called $ac_given_srcdir.
9534 # In autoconf-2.50 it is called $srcdir.
9535 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9536 case "$ac_given_srcdir" in
9537 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9538 /*) top_srcdir="$ac_given_srcdir" ;;
9539 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9540 esac
9541 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9542 rm -f "$ac_dir/POTFILES"
9543 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9544 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9545 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9546 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9549 esac
9550 done
9552 case x$CONFIG_HEADERS in
9553 xauto-host.h:config.in)
9554 echo > cstamp-h ;;
9555 esac
9556 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9557 # bootstrapping and the installation procedure can still use
9558 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9559 # FLAGS_TO_PASS has been modified to solve the problem there.
9560 # This is virtually a duplicate of what happens in configure.lang; we do
9561 # an extra check to make sure this only happens if ln -s can be used.
9562 if test "$symbolic_link" = "ln -s"; then
9563 for d in .. ${subdirs} fixinc ; do
9564 if test $d != ..; then
9565 STARTDIR=`${PWDCMD-pwd}`
9566 cd $d
9567 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
9569 rm -f $t
9570 $symbolic_link ../$t $t 2>/dev/null
9571 done
9572 cd $STARTDIR
9574 done
9575 else true ; fi
9576 # Avoid having to add intl to our include paths.
9577 if test -f intl/libintl.h; then
9578 echo creating libintl.h
9579 echo '#include "intl/libintl.h"' >libintl.h
9582 exit 0
9584 chmod +x $CONFIG_STATUS
9585 rm -fr confdefs* $ac_clean_files
9586 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1