configure.in (make_compare_target): Test for GNU cmp and set this variable appropriately.
[official-gcc.git] / gcc / configure
blob1eb432c54610c109d608afd1f4082740534dad1f
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 # Define variables host_canonical and build_canonical
731 build_canonical=${build}
732 host_canonical=${host}
736 target_subdir=
737 if test "${host}" != "${target}" ; then
738 target_subdir=${target_alias}/
742 # Set program_transform_name
743 if test "$program_transform_name" = s,x,x,; then
744 program_transform_name=
745 else
746 # Double any \ or $. echo might interpret backslashes.
747 cat <<\EOF_SED > conftestsed
748 s,\\,\\\\,g; s,\$,$$,g
749 EOF_SED
750 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
751 rm -f conftestsed
753 test "$program_prefix" != NONE &&
754 program_transform_name="s,^,${program_prefix},; $program_transform_name"
755 # Use a double $ so make ignores it.
756 test "$program_suffix" != NONE &&
757 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
759 # sed with no file args requires a program.
760 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
763 # Check for bogus environment variables.
764 # Test if LIBRARY_PATH contains the notation for the current directory
765 # since this would lead to problems installing/building glibc.
766 # LIBRARY_PATH contains the current directory if one of the following
767 # is true:
768 # - one of the terminals (":" and ";") is the first or last sign
769 # - two terminals occur directly after each other
770 # - the path contains an element with a dot in it
771 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
772 echo "configure:773: checking LIBRARY_PATH variable" >&5
773 case ${LIBRARY_PATH} in
774 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
775 library_path_setting="contains current directory"
778 library_path_setting="ok"
780 esac
781 echo "$ac_t""$library_path_setting" 1>&6
782 if test "$library_path_setting" != "ok"; then
783 { echo "configure: error:
784 *** LIBRARY_PATH shouldn't contain the current directory when
785 *** building gcc. Please change the environment variable
786 *** and run configure again." 1>&2; exit 1; }
789 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
790 # since this would lead to problems installing/building glibc.
791 # GCC_EXEC_PREFIX contains the current directory if one of the following
792 # is true:
793 # - one of the terminals (":" and ";") is the first or last sign
794 # - two terminals occur directly after each other
795 # - the path contains an element with a dot in it
796 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
797 echo "configure:798: checking GCC_EXEC_PREFIX variable" >&5
798 case ${GCC_EXEC_PREFIX} in
799 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
800 gcc_exec_prefix_setting="contains current directory"
803 gcc_exec_prefix_setting="ok"
805 esac
806 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
807 if test "$gcc_exec_prefix_setting" != "ok"; then
808 { echo "configure: error:
809 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
810 *** building gcc. Please change the environment variable
811 *** and run configure again." 1>&2; exit 1; }
814 # -----------
815 # Directories
816 # -----------
818 # Specify the local prefix
819 local_prefix=
820 # Check whether --with-local-prefix or --without-local-prefix was given.
821 if test "${with_local_prefix+set}" = set; then
822 withval="$with_local_prefix"
823 case "${withval}" in
824 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
825 no) ;;
826 *) local_prefix=$with_local_prefix ;;
827 esac
831 # Default local prefix if it is empty
832 if test x$local_prefix = x; then
833 local_prefix=/usr/local
836 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
837 # passed in by the toplevel make and thus we'd get different behavior
838 # depending on where we built the sources.
839 gcc_gxx_include_dir=
840 # Specify the g++ header file directory
841 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
842 if test "${with_gxx_include_dir+set}" = set; then
843 withval="$with_gxx_include_dir"
844 case "${withval}" in
845 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
846 no) ;;
847 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
848 esac
852 if test x${gcc_gxx_include_dir} = x; then
853 if test x${enable_version_specific_runtime_libs} = xyes; then
854 gcc_gxx_include_dir='${libsubdir}/include/c++'
855 else
856 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
857 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
861 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
862 if test "${with_cpp_install_dir+set}" = set; then
863 withval="$with_cpp_install_dir"
864 if test x$withval = xyes; then
865 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
866 elif test x$withval != xno; then
867 cpp_install_dir=$withval
872 # -------------------
873 # Find default linker
874 # -------------------
876 # With GNU ld
877 # Check whether --with-gnu-ld or --without-gnu-ld was given.
878 if test "${with_gnu_ld+set}" = set; then
879 withval="$with_gnu_ld"
880 gnu_ld_flag="$with_gnu_ld"
881 else
882 gnu_ld_flag=no
886 # With pre-defined ld
887 # Check whether --with-ld or --without-ld was given.
888 if test "${with_ld+set}" = set; then
889 withval="$with_ld"
890 DEFAULT_LINKER="$with_ld"
893 if test x"${DEFAULT_LINKER+set}" = x"set"; then
894 if test ! -x "$DEFAULT_LINKER"; then
895 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
896 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
897 gnu_ld_flag=yes
899 cat >> confdefs.h <<EOF
900 #define DEFAULT_LINKER "$DEFAULT_LINKER"
905 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
906 echo "configure:907: checking whether a default linker was specified" >&5
907 if test x"${DEFAULT_LINKER+set}" = x"set"; then
908 if test x"$gnu_ld_flag" = x"no"; then
909 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
910 else
911 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
913 else
914 echo "$ac_t""no" 1>&6
917 # ----------------------
918 # Find default assembler
919 # ----------------------
921 # With GNU as
922 # Check whether --with-gnu-as or --without-gnu-as was given.
923 if test "${with_gnu_as+set}" = set; then
924 withval="$with_gnu_as"
925 gas_flag="$with_gnu_as"
926 else
927 gas_flag=no
931 # Check whether --with-as or --without-as was given.
932 if test "${with_as+set}" = set; then
933 withval="$with_as"
934 DEFAULT_ASSEMBLER="$with_as"
937 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
938 if test ! -x "$DEFAULT_ASSEMBLER"; then
939 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
940 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
941 gas_flag=yes
943 cat >> confdefs.h <<EOF
944 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
949 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
950 echo "configure:951: checking whether a default assembler was specified" >&5
951 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
952 if test x"$gas_flag" = x"no"; then
953 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
954 else
955 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
957 else
958 echo "$ac_t""no" 1>&6
961 # ---------------
962 # Find C compiler
963 # ---------------
965 # Find the native compiler
966 # Extract the first word of "gcc", so it can be a program name with args.
967 set dummy gcc; ac_word=$2
968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
969 echo "configure:970: checking for $ac_word" >&5
970 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
971 echo $ac_n "(cached) $ac_c" 1>&6
972 else
973 if test -n "$CC"; then
974 ac_cv_prog_CC="$CC" # Let the user override the test.
975 else
976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
977 ac_dummy="$PATH"
978 for ac_dir in $ac_dummy; do
979 test -z "$ac_dir" && ac_dir=.
980 if test -f $ac_dir/$ac_word; then
981 ac_cv_prog_CC="gcc"
982 break
984 done
985 IFS="$ac_save_ifs"
988 CC="$ac_cv_prog_CC"
989 if test -n "$CC"; then
990 echo "$ac_t""$CC" 1>&6
991 else
992 echo "$ac_t""no" 1>&6
995 if test -z "$CC"; then
996 # Extract the first word of "cc", so it can be a program name with args.
997 set dummy cc; ac_word=$2
998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
999 echo "configure:1000: checking for $ac_word" >&5
1000 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1001 echo $ac_n "(cached) $ac_c" 1>&6
1002 else
1003 if test -n "$CC"; then
1004 ac_cv_prog_CC="$CC" # Let the user override the test.
1005 else
1006 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1007 ac_prog_rejected=no
1008 ac_dummy="$PATH"
1009 for ac_dir in $ac_dummy; do
1010 test -z "$ac_dir" && ac_dir=.
1011 if test -f $ac_dir/$ac_word; then
1012 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1013 ac_prog_rejected=yes
1014 continue
1016 ac_cv_prog_CC="cc"
1017 break
1019 done
1020 IFS="$ac_save_ifs"
1021 if test $ac_prog_rejected = yes; then
1022 # We found a bogon in the path, so make sure we never use it.
1023 set dummy $ac_cv_prog_CC
1024 shift
1025 if test $# -gt 0; then
1026 # We chose a different compiler from the bogus one.
1027 # However, it has the same basename, so the bogon will be chosen
1028 # first if we set CC to just the basename; use the full file name.
1029 shift
1030 set dummy "$ac_dir/$ac_word" "$@"
1031 shift
1032 ac_cv_prog_CC="$@"
1037 CC="$ac_cv_prog_CC"
1038 if test -n "$CC"; then
1039 echo "$ac_t""$CC" 1>&6
1040 else
1041 echo "$ac_t""no" 1>&6
1044 if test -z "$CC"; then
1045 case "`uname -s`" in
1046 *win32* | *WIN32*)
1047 # Extract the first word of "cl", so it can be a program name with args.
1048 set dummy cl; ac_word=$2
1049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1050 echo "configure:1051: checking for $ac_word" >&5
1051 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1052 echo $ac_n "(cached) $ac_c" 1>&6
1053 else
1054 if test -n "$CC"; then
1055 ac_cv_prog_CC="$CC" # Let the user override the test.
1056 else
1057 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1058 ac_dummy="$PATH"
1059 for ac_dir in $ac_dummy; do
1060 test -z "$ac_dir" && ac_dir=.
1061 if test -f $ac_dir/$ac_word; then
1062 ac_cv_prog_CC="cl"
1063 break
1065 done
1066 IFS="$ac_save_ifs"
1069 CC="$ac_cv_prog_CC"
1070 if test -n "$CC"; then
1071 echo "$ac_t""$CC" 1>&6
1072 else
1073 echo "$ac_t""no" 1>&6
1076 esac
1078 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1081 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1082 echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1084 ac_ext=c
1085 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1088 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1089 cross_compiling=$ac_cv_prog_cc_cross
1091 cat > conftest.$ac_ext << EOF
1093 #line 1094 "configure"
1094 #include "confdefs.h"
1096 main(){return(0);}
1098 if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1099 ac_cv_prog_cc_works=yes
1100 # If we can't run a trivial program, we are probably using a cross compiler.
1101 if (./conftest; exit) 2>/dev/null; then
1102 ac_cv_prog_cc_cross=no
1103 else
1104 ac_cv_prog_cc_cross=yes
1106 else
1107 echo "configure: failed program was:" >&5
1108 cat conftest.$ac_ext >&5
1109 ac_cv_prog_cc_works=no
1111 rm -fr conftest*
1112 ac_ext=c
1113 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1114 ac_cpp='$CPP $CPPFLAGS'
1115 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1116 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1117 cross_compiling=$ac_cv_prog_cc_cross
1119 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1120 if test $ac_cv_prog_cc_works = no; then
1121 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1123 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1124 echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1125 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1126 cross_compiling=$ac_cv_prog_cc_cross
1128 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1129 echo "configure:1130: checking whether we are using GNU C" >&5
1130 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1131 echo $ac_n "(cached) $ac_c" 1>&6
1132 else
1133 cat > conftest.c <<EOF
1134 #ifdef __GNUC__
1135 yes;
1136 #endif
1138 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1139 ac_cv_prog_gcc=yes
1140 else
1141 ac_cv_prog_gcc=no
1145 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1147 if test $ac_cv_prog_gcc = yes; then
1148 GCC=yes
1149 else
1150 GCC=
1153 ac_test_CFLAGS="${CFLAGS+set}"
1154 ac_save_CFLAGS="$CFLAGS"
1155 CFLAGS=
1156 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1157 echo "configure:1158: checking whether ${CC-cc} accepts -g" >&5
1158 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1159 echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161 echo 'void f(){}' > conftest.c
1162 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1163 ac_cv_prog_cc_g=yes
1164 else
1165 ac_cv_prog_cc_g=no
1167 rm -f conftest*
1171 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1172 if test "$ac_test_CFLAGS" = set; then
1173 CFLAGS="$ac_save_CFLAGS"
1174 elif test $ac_cv_prog_cc_g = yes; then
1175 if test "$GCC" = yes; then
1176 CFLAGS="-g -O2"
1177 else
1178 CFLAGS="-g"
1180 else
1181 if test "$GCC" = yes; then
1182 CFLAGS="-O2"
1183 else
1184 CFLAGS=
1188 if test "x$CC" != xcc; then
1189 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether $CC and cc understand -c and -o together" >&5
1191 else
1192 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether cc understands -c and -o together" >&5
1195 set dummy $CC; ac_cc="`echo $2 |
1196 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1197 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200 echo 'foo(){}' > conftest.c
1201 # Make sure it works both with $CC and with simple cc.
1202 # We do the test twice because some compilers refuse to overwrite an
1203 # existing .o file with -o, though they will create one.
1204 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1205 if { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1206 test -f conftest.o && { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1207 then
1208 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1209 if test "x$CC" != xcc; then
1210 # Test first that cc exists at all.
1211 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1212 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1213 if { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1214 test -f conftest.o && { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1215 then
1216 # cc works too.
1218 else
1219 # cc exists but doesn't like -o.
1220 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1224 else
1225 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1227 rm -f conftest*
1230 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1231 echo "$ac_t""yes" 1>&6
1232 else
1233 echo "$ac_t""no" 1>&6
1234 cat >> confdefs.h <<\EOF
1235 #define NO_MINUS_C_MINUS_O 1
1240 # autoconf is lame and doesn't give us any substitution variable for this.
1241 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1242 NO_MINUS_C_MINUS_O=yes
1243 else
1244 OUTPUT_OPTION='-o $@'
1249 # -------------------------
1250 # Check C compiler features
1251 # -------------------------
1253 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1254 echo "configure:1255: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258 save_CFLAGS="$CFLAGS"
1259 CFLAGS="-Wno-long-long"
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1264 int main() {
1266 ; return 0; }
1268 if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1269 rm -rf conftest*
1270 ac_cv_prog_cc_no_long_long=yes
1271 else
1272 echo "configure: failed program was:" >&5
1273 cat conftest.$ac_ext >&5
1274 rm -rf conftest*
1275 ac_cv_prog_cc_no_long_long=no
1277 rm -f conftest*
1278 CFLAGS="$save_CFLAGS"
1281 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1283 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1284 echo "configure:1285: checking how to run the C preprocessor" >&5
1285 # On Suns, sometimes $CPP names a directory.
1286 if test -n "$CPP" && test -d "$CPP"; then
1287 CPP=
1289 if test -z "$CPP"; then
1290 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1291 echo $ac_n "(cached) $ac_c" 1>&6
1292 else
1293 # This must be in double quotes, not single quotes, because CPP may get
1294 # substituted into the Makefile and "${CC-cc}" will confuse make.
1295 CPP="${CC-cc} -E"
1296 # On the NeXT, cc -E runs the code through the compiler's parser,
1297 # not just through cpp.
1298 cat > conftest.$ac_ext <<EOF
1299 #line 1300 "configure"
1300 #include "confdefs.h"
1301 #include <assert.h>
1302 Syntax Error
1304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1305 { (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1307 if test -z "$ac_err"; then
1309 else
1310 echo "$ac_err" >&5
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1313 rm -rf conftest*
1314 CPP="${CC-cc} -E -traditional-cpp"
1315 cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318 #include <assert.h>
1319 Syntax Error
1321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1322 { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1324 if test -z "$ac_err"; then
1326 else
1327 echo "$ac_err" >&5
1328 echo "configure: failed program was:" >&5
1329 cat conftest.$ac_ext >&5
1330 rm -rf conftest*
1331 CPP="${CC-cc} -nologo -E"
1332 cat > conftest.$ac_ext <<EOF
1333 #line 1334 "configure"
1334 #include "confdefs.h"
1335 #include <assert.h>
1336 Syntax Error
1338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1339 { (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1341 if test -z "$ac_err"; then
1343 else
1344 echo "$ac_err" >&5
1345 echo "configure: failed program was:" >&5
1346 cat conftest.$ac_ext >&5
1347 rm -rf conftest*
1348 CPP=/lib/cpp
1350 rm -f conftest*
1352 rm -f conftest*
1354 rm -f conftest*
1355 ac_cv_prog_CPP="$CPP"
1357 CPP="$ac_cv_prog_CPP"
1358 else
1359 ac_cv_prog_CPP="$CPP"
1361 echo "$ac_t""$CPP" 1>&6
1363 echo $ac_n "checking for inline""... $ac_c" 1>&6
1364 echo "configure:1365: checking for inline" >&5
1365 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368 ac_cv_c_inline=no
1369 for ac_kw in inline __inline__ __inline; do
1370 cat > conftest.$ac_ext <<EOF
1371 #line 1372 "configure"
1372 #include "confdefs.h"
1374 int main() {
1375 } $ac_kw foo() {
1376 ; return 0; }
1378 if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1379 rm -rf conftest*
1380 ac_cv_c_inline=$ac_kw; break
1381 else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1385 rm -f conftest*
1386 done
1390 echo "$ac_t""$ac_cv_c_inline" 1>&6
1391 case "$ac_cv_c_inline" in
1392 inline | yes) ;;
1393 no) cat >> confdefs.h <<\EOF
1394 #define inline
1397 *) cat >> confdefs.h <<EOF
1398 #define inline $ac_cv_c_inline
1401 esac
1403 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1404 echo "configure:1405: checking for volatile" >&5
1405 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407 else
1408 cat > conftest.$ac_ext <<EOF
1409 #line 1410 "configure"
1410 #include "confdefs.h"
1412 int main() {
1413 volatile int foo;
1414 ; return 0; }
1416 if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1417 rm -rf conftest*
1418 gcc_cv_c_volatile=yes
1419 else
1420 echo "configure: failed program was:" >&5
1421 cat conftest.$ac_ext >&5
1422 rm -rf conftest*
1423 gcc_cv_c_volatile=no
1425 rm -f conftest*
1428 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1429 if test $gcc_cv_c_volatile = yes ; then
1430 cat >> confdefs.h <<\EOF
1431 #define HAVE_VOLATILE 1
1437 echo $ac_n "checking for long double""... $ac_c" 1>&6
1438 echo "configure:1439: checking for long double" >&5
1439 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
1441 else
1442 if test "$GCC" = yes; then
1443 gcc_cv_c_long_double=yes
1444 else
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1449 int main() {
1450 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1451 long double foo = 0.0;
1452 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1453 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1454 ; return 0; }
1456 if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1457 rm -rf conftest*
1458 gcc_cv_c_long_double=yes
1459 else
1460 echo "configure: failed program was:" >&5
1461 cat conftest.$ac_ext >&5
1462 rm -rf conftest*
1463 gcc_cv_c_long_double=no
1465 rm -f conftest*
1469 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1470 if test $gcc_cv_c_long_double = yes; then
1471 cat >> confdefs.h <<\EOF
1472 #define HAVE_LONG_DOUBLE 1
1477 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1478 echo "configure:1479: checking for long long int" >&5
1479 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482 cat > conftest.$ac_ext <<EOF
1483 #line 1484 "configure"
1484 #include "confdefs.h"
1486 int main() {
1487 long long int i;
1488 ; return 0; }
1490 if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1491 rm -rf conftest*
1492 ac_cv_c_long_long=yes
1493 else
1494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
1496 rm -rf conftest*
1497 ac_cv_c_long_long=no
1499 rm -f conftest*
1502 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1503 if test $ac_cv_c_long_long = yes; then
1504 cat >> confdefs.h <<\EOF
1505 #define HAVE_LONG_LONG 1
1509 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1510 echo "configure:1511: checking for __int64" >&5
1511 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1512 echo $ac_n "(cached) $ac_c" 1>&6
1513 else
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1518 int main() {
1519 __int64 i;
1520 ; return 0; }
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1523 rm -rf conftest*
1524 ac_cv_c___int64=yes
1525 else
1526 echo "configure: failed program was:" >&5
1527 cat conftest.$ac_ext >&5
1528 rm -rf conftest*
1529 ac_cv_c___int64=no
1531 rm -f conftest*
1534 echo "$ac_t""$ac_cv_c___int64" 1>&6
1535 if test $ac_cv_c___int64 = yes; then
1536 cat >> confdefs.h <<\EOF
1537 #define HAVE___INT64 1
1542 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1543 echo "configure:1544: checking for built-in _Bool" >&5
1544 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1551 int main() {
1552 _Bool foo;
1553 ; return 0; }
1555 if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1556 rm -rf conftest*
1557 gcc_cv_c__bool=yes
1558 else
1559 echo "configure: failed program was:" >&5
1560 cat conftest.$ac_ext >&5
1561 rm -rf conftest*
1562 gcc_cv_c__bool=no
1564 rm -f conftest*
1568 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1569 if test $gcc_cv_c__bool = yes; then
1570 cat >> confdefs.h <<\EOF
1571 #define HAVE__BOOL 1
1577 # sizeof(char) is 1 by definition.
1578 echo $ac_n "checking size of short""... $ac_c" 1>&6
1579 echo "configure:1580: checking size of short" >&5
1580 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1581 echo $ac_n "(cached) $ac_c" 1>&6
1582 else
1583 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1584 cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587 #include "confdefs.h"
1588 #include <sys/types.h>
1591 int main() {
1592 switch (0) case 0: case (sizeof (short) == $ac_size):;
1593 ; return 0; }
1595 if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1596 rm -rf conftest*
1597 ac_cv_sizeof_short=$ac_size
1598 else
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1602 rm -f conftest*
1603 if test x$ac_cv_sizeof_short != x ; then break; fi
1604 done
1608 if test x$ac_cv_sizeof_short = x ; then
1609 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1611 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1612 cat >> confdefs.h <<EOF
1613 #define SIZEOF_SHORT $ac_cv_sizeof_short
1617 echo $ac_n "checking size of int""... $ac_c" 1>&6
1618 echo "configure:1619: checking size of int" >&5
1619 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1620 echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1623 cat > conftest.$ac_ext <<EOF
1624 #line 1625 "configure"
1625 #include "confdefs.h"
1626 #include "confdefs.h"
1627 #include <sys/types.h>
1630 int main() {
1631 switch (0) case 0: case (sizeof (int) == $ac_size):;
1632 ; return 0; }
1634 if { (eval echo configure:1635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1635 rm -rf conftest*
1636 ac_cv_sizeof_int=$ac_size
1637 else
1638 echo "configure: failed program was:" >&5
1639 cat conftest.$ac_ext >&5
1641 rm -f conftest*
1642 if test x$ac_cv_sizeof_int != x ; then break; fi
1643 done
1647 if test x$ac_cv_sizeof_int = x ; then
1648 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1650 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1651 cat >> confdefs.h <<EOF
1652 #define SIZEOF_INT $ac_cv_sizeof_int
1656 echo $ac_n "checking size of long""... $ac_c" 1>&6
1657 echo "configure:1658: checking size of long" >&5
1658 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
1660 else
1661 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 #include "confdefs.h"
1666 #include <sys/types.h>
1669 int main() {
1670 switch (0) case 0: case (sizeof (long) == $ac_size):;
1671 ; return 0; }
1673 if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1674 rm -rf conftest*
1675 ac_cv_sizeof_long=$ac_size
1676 else
1677 echo "configure: failed program was:" >&5
1678 cat conftest.$ac_ext >&5
1680 rm -f conftest*
1681 if test x$ac_cv_sizeof_long != x ; then break; fi
1682 done
1686 if test x$ac_cv_sizeof_long = x ; then
1687 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1689 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1690 cat >> confdefs.h <<EOF
1691 #define SIZEOF_LONG $ac_cv_sizeof_long
1695 if test $ac_cv_c_long_long = yes; then
1696 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1697 echo "configure:1698: checking size of long long" >&5
1698 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1702 cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 #include "confdefs.h"
1706 #include <sys/types.h>
1709 int main() {
1710 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1711 ; return 0; }
1713 if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1714 rm -rf conftest*
1715 ac_cv_sizeof_long_long=$ac_size
1716 else
1717 echo "configure: failed program was:" >&5
1718 cat conftest.$ac_ext >&5
1720 rm -f conftest*
1721 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1722 done
1726 if test x$ac_cv_sizeof_long_long = x ; then
1727 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1729 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1730 cat >> confdefs.h <<EOF
1731 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1736 if test $ac_cv_c___int64 = yes; then
1737 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1738 echo "configure:1739: checking size of __int64" >&5
1739 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1740 echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1743 cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746 #include "confdefs.h"
1747 #include <sys/types.h>
1750 int main() {
1751 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1752 ; return 0; }
1754 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1755 rm -rf conftest*
1756 ac_cv_sizeof___int64=$ac_size
1757 else
1758 echo "configure: failed program was:" >&5
1759 cat conftest.$ac_ext >&5
1761 rm -f conftest*
1762 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1763 done
1767 if test x$ac_cv_sizeof___int64 = x ; then
1768 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1770 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1771 cat >> confdefs.h <<EOF
1772 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1778 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1779 echo "configure:1780: checking execution character set" >&5
1780 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1781 echo $ac_n "(cached) $ac_c" 1>&6
1782 else
1783 cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1787 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1788 ASCII
1789 #endif
1791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1792 egrep "ASCII" >/dev/null 2>&1; then
1793 rm -rf conftest*
1794 ac_cv_c_charset=ASCII
1796 rm -f conftest*
1798 if test x${ac_cv_c_charset+set} != xset; then
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1803 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1804 EBCDIC
1805 #endif
1807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1808 egrep "EBCDIC" >/dev/null 2>&1; then
1809 rm -rf conftest*
1810 ac_cv_c_charset=EBCDIC
1812 rm -f conftest*
1815 if test x${ac_cv_c_charset+set} != xset; then
1816 ac_cv_c_charset=unknown
1820 echo "$ac_t""$ac_cv_c_charset" 1>&6
1821 if test $ac_cv_c_charset = unknown; then
1822 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1823 elif test $ac_cv_c_charset = EBCDIC; then
1824 cat >> confdefs.h <<\EOF
1825 #define HOST_EBCDIC 1
1830 # -----------------
1831 # Find Ada compiler
1832 # -----------------
1834 # See if GNAT has been installed
1835 if test $host != $build; then
1836 ac_tool_prefix=${host_alias}-
1837 else
1838 ac_tool_prefix=
1842 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1843 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1845 echo "configure:1846: checking for $ac_word" >&5
1846 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1847 echo $ac_n "(cached) $ac_c" 1>&6
1848 else
1849 if test -n "$GNATBIND"; then
1850 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1851 else
1852 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1853 ac_dummy="$PATH"
1854 for ac_dir in $ac_dummy; do
1855 test -z "$ac_dir" && ac_dir=.
1856 if test -f $ac_dir/$ac_word; then
1857 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1858 break
1860 done
1861 IFS="$ac_save_ifs"
1864 GNATBIND="$ac_cv_prog_GNATBIND"
1865 if test -n "$GNATBIND"; then
1866 echo "$ac_t""$GNATBIND" 1>&6
1867 else
1868 echo "$ac_t""no" 1>&6
1872 if test -z "$ac_cv_prog_GNATBIND"; then
1873 if test -n "$ac_tool_prefix"; then
1874 # Extract the first word of "gnatbind", so it can be a program name with args.
1875 set dummy gnatbind; ac_word=$2
1876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1877 echo "configure:1878: checking for $ac_word" >&5
1878 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881 if test -n "$GNATBIND"; then
1882 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1883 else
1884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1885 ac_dummy="$PATH"
1886 for ac_dir in $ac_dummy; do
1887 test -z "$ac_dir" && ac_dir=.
1888 if test -f $ac_dir/$ac_word; then
1889 ac_cv_prog_GNATBIND="gnatbind"
1890 break
1892 done
1893 IFS="$ac_save_ifs"
1894 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1897 GNATBIND="$ac_cv_prog_GNATBIND"
1898 if test -n "$GNATBIND"; then
1899 echo "$ac_t""$GNATBIND" 1>&6
1900 else
1901 echo "$ac_t""no" 1>&6
1904 else
1905 GNATBIND="no"
1909 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1910 echo "configure:1911: checking for compiler driver that understands Ada" >&5
1911 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1912 echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914 cat >conftest.adb <<EOF
1915 procedure conftest is begin null; end conftest;
1917 gcc_cv_prog_adac=no
1918 # Have to do ac_tool_prefix and user overrides by hand.
1919 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1920 ${ac_tool_prefix}gcc gcc \
1921 ${ac_tool_prefix}cc cc \
1922 ${ac_tool_prefix}gnatgcc gnatgcc \
1923 ${ac_tool_prefix}gnatcc gnatcc \
1924 ${ac_tool_prefix}adagcc adagcc \
1925 ${ac_tool_prefix}adacc adacc ; do
1926 # There is a bug in all released versions of GCC which causes the
1927 # driver to exit successfully when the appropriate language module
1928 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1929 # Therefore we must check for the error message as well as an
1930 # unsuccessful exit.
1931 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1932 if test x"$errors" = x; then
1933 gcc_cv_prog_adac=$cand
1934 break
1936 done
1937 rm -f conftest.*
1940 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1941 ADAC=$gcc_cv_prog_adac
1944 if test x$GNATBIND != xno && test x$ADAC != xno; then
1945 have_gnat=yes
1946 else
1947 have_gnat=no
1951 if test x$have_gnat != xno ; then
1952 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1953 echo "configure:1954: checking whether ${ADAC} accepts -Wno-long-long" >&5
1954 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1955 echo $ac_n "(cached) $ac_c" 1>&6
1956 else
1957 cat >conftest.adb <<EOF
1958 procedure conftest is begin null; end conftest;
1960 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1961 ac_cv_prog_adac_no_long_long=yes
1962 else
1963 ac_cv_prog_adac_no_long_long=no
1965 rm -f conftest*
1968 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1969 else
1970 ac_cv_prog_adac_no_long_long=yes
1973 # ---------------------
1974 # Warnings and checking
1975 # ---------------------
1977 strict1_warn=
1978 if test $ac_cv_prog_cc_no_long_long = yes && \
1979 test $ac_cv_prog_adac_no_long_long = yes ; then
1980 strict1_warn="-pedantic -Wno-long-long"
1984 # If the native compiler is GCC, we can enable warnings even in stage1.
1985 # That's useful for people building cross-compilers, or just running a
1986 # quick `make'.
1987 warn_cflags=
1988 if test "x$GCC" = "xyes"; then
1989 warn_cflags='$(GCC_WARN_CFLAGS)'
1993 # Enable -Werror in bootstrap stage2 and later.
1994 # Change the default to "no" on release branches.
1995 # Check whether --enable-werror or --disable-werror was given.
1996 if test "${enable_werror+set}" = set; then
1997 enableval="$enable_werror"
1999 else
2000 enable_werror=yes
2003 if test x$enable_werror = xyes ; then
2004 WERROR=-Werror
2008 # Enable expensive internal checks
2009 # Check whether --enable-checking or --disable-checking was given.
2010 if test "${enable_checking+set}" = set; then
2011 enableval="$enable_checking"
2012 ac_checking=
2013 ac_tree_checking=
2014 ac_rtl_checking=
2015 ac_rtlflag_checking=
2016 ac_gc_checking=
2017 ac_gc_always_collect=
2018 case "${enableval}" in
2019 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
2020 ac_rtlflag_checking=1 ;;
2021 no) ;;
2022 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2023 set fnord $enableval; shift
2024 IFS="$ac_save_IFS"
2025 for check
2027 case $check in
2028 misc) ac_checking=1 ;;
2029 tree) ac_tree_checking=1 ;;
2030 rtlflag) ac_rtlflag_checking=1 ;;
2031 rtl) ac_rtl_checking=1 ;;
2032 gc) ac_gc_checking=1 ;;
2033 gcac) ac_gc_always_collect=1 ;;
2034 valgrind) ac_checking_valgrind=1 ;;
2035 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
2036 esac
2037 done
2039 esac
2041 else
2042 # Enable some checks by default for development versions of GCC
2043 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
2046 nocommon_flag=""
2047 if test x$ac_checking != x ; then
2048 cat >> confdefs.h <<\EOF
2049 #define ENABLE_CHECKING 1
2052 nocommon_flag=-fno-common
2055 if test x$ac_tree_checking != x ; then
2056 cat >> confdefs.h <<\EOF
2057 #define ENABLE_TREE_CHECKING 1
2061 if test x$ac_rtl_checking != x ; then
2062 cat >> confdefs.h <<\EOF
2063 #define ENABLE_RTL_CHECKING 1
2067 if test x$ac_rtlflag_checking != x ; then
2068 cat >> confdefs.h <<\EOF
2069 #define ENABLE_RTL_FLAG_CHECKING 1
2073 if test x$ac_gc_checking != x ; then
2074 cat >> confdefs.h <<\EOF
2075 #define ENABLE_GC_CHECKING 1
2079 if test x$ac_gc_always_collect != x ; then
2080 cat >> confdefs.h <<\EOF
2081 #define ENABLE_GC_ALWAYS_COLLECT 1
2085 valgrind_path_defines=
2086 valgrind_command=
2087 if test x$ac_checking_valgrind != x ; then
2088 # It is certainly possible that there's valgrind but no valgrind.h.
2089 # GCC relies on making annotations so we must have both.
2090 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2091 echo "configure:2092: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <memcheck.h>
2096 #ifndef VALGRIND_DISCARD
2097 #error VALGRIND_DISCARD not defined
2098 #endif
2100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2101 { (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2103 if test -z "$ac_err"; then
2104 rm -rf conftest*
2105 gcc_cv_header_memcheck_h=yes
2106 else
2107 echo "$ac_err" >&5
2108 echo "configure: failed program was:" >&5
2109 cat conftest.$ac_ext >&5
2110 rm -rf conftest*
2111 gcc_cv_header_memcheck_h=no
2113 rm -f conftest*
2114 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2115 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2116 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2117 echo "configure:2118: checking for valgrind.h" >&5
2118 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
2120 else
2121 cat > conftest.$ac_ext <<EOF
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124 #include <valgrind.h>
2126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2127 { (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2129 if test -z "$ac_err"; then
2130 rm -rf conftest*
2131 eval "ac_cv_header_$ac_safe=yes"
2132 else
2133 echo "$ac_err" >&5
2134 echo "configure: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 rm -rf conftest*
2137 eval "ac_cv_header_$ac_safe=no"
2139 rm -f conftest*
2141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2142 echo "$ac_t""yes" 1>&6
2143 have_valgrind_h=yes
2144 else
2145 echo "$ac_t""no" 1>&6
2146 have_valgrind_h=no
2149 # Extract the first word of "valgrind", so it can be a program name with args.
2150 set dummy valgrind; ac_word=$2
2151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2152 echo "configure:2153: checking for $ac_word" >&5
2153 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155 else
2156 case "$valgrind_path" in
2158 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2161 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2162 for ac_dir in $PATH; do
2163 test -z "$ac_dir" && ac_dir=.
2164 if test -f $ac_dir/$ac_word; then
2165 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2166 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2167 break
2170 done
2171 IFS="$ac_save_ifs"
2173 esac
2175 valgrind_path="$ac_cv_path_valgrind_path"
2176 if test -n "$valgrind_path"; then
2177 echo "$ac_t""$valgrind_path" 1>&6
2178 else
2179 echo "$ac_t""no" 1>&6
2182 if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
2183 { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
2185 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2186 valgrind_command="$valgrind_path -q"
2187 cat >> confdefs.h <<\EOF
2188 #define ENABLE_VALGRIND_CHECKING 1
2191 if test $gcc_cv_header_memcheck_h = yes; then
2192 cat >> confdefs.h <<\EOF
2193 #define HAVE_MEMCHECK_H 1
2201 # Enable code coverage collection
2202 # Check whether --enable-coverage or --disable-coverage was given.
2203 if test "${enable_coverage+set}" = set; then
2204 enableval="$enable_coverage"
2205 case "${enableval}" in
2206 yes|noopt)
2207 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2209 opt)
2210 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2213 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2215 esac
2216 else
2217 coverage_flags=""
2222 # -------------------------------
2223 # Miscenalleous configure options
2224 # -------------------------------
2226 # With stabs
2227 # Check whether --with-stabs or --without-stabs was given.
2228 if test "${with_stabs+set}" = set; then
2229 withval="$with_stabs"
2230 stabs="$with_stabs"
2231 else
2232 stabs=no
2236 # With ELF
2237 # Check whether --with-elf or --without-elf was given.
2238 if test "${with_elf+set}" = set; then
2239 withval="$with_elf"
2240 elf="$with_elf"
2241 else
2242 elf=no
2246 # Determine whether or not multilibs are enabled.
2247 # Check whether --enable-multilib or --disable-multilib was given.
2248 if test "${enable_multilib+set}" = set; then
2249 enableval="$enable_multilib"
2251 else
2252 enable_multilib=yes
2257 # Enable __cxa_atexit for C++.
2258 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2259 if test "${enable___cxa_atexit+set}" = set; then
2260 enableval="$enable___cxa_atexit"
2264 if test x$enable___cxa_atexit = xyes; then
2265 cat >> confdefs.h <<\EOF
2266 #define DEFAULT_USE_CXA_ATEXIT 1
2271 # Enable Multibyte Characters for C/C++
2272 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2273 if test "${enable_c_mbchar+set}" = set; then
2274 enableval="$enable_c_mbchar"
2275 if test x$enable_c_mbchar != xno; then
2276 cat >> confdefs.h <<\EOF
2277 #define MULTIBYTE_CHARS 1
2284 # Enable threads
2285 # Pass with no value to take the default
2286 # Pass with a value to specify a thread package
2287 # Check whether --enable-threads or --disable-threads was given.
2288 if test "${enable_threads+set}" = set; then
2289 enableval="$enable_threads"
2291 else
2292 enable_threads=''
2296 enable_threads_flag=$enable_threads
2297 # Check if a valid thread package
2298 case x${enable_threads_flag} in
2299 x | xno)
2300 # No threads
2301 target_thread_file='single'
2303 xyes)
2304 # default
2305 target_thread_file=''
2307 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2308 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat)
2309 target_thread_file=$enable_threads_flag
2312 echo "$enable_threads is an unknown thread package" 1>&2
2313 exit 1
2315 esac
2317 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2318 if test "${enable_objc_gc+set}" = set; then
2319 enableval="$enable_objc_gc"
2320 if test x$enable_objc_gc = xno; then
2321 objc_boehm_gc=''
2322 else
2323 objc_boehm_gc=1
2325 else
2326 objc_boehm_gc=''
2330 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2331 if test "${with_dwarf2+set}" = set; then
2332 withval="$with_dwarf2"
2333 dwarf2="$with_dwarf2"
2334 else
2335 dwarf2=no
2339 # Check whether --enable-shared or --disable-shared was given.
2340 if test "${enable_shared+set}" = set; then
2341 enableval="$enable_shared"
2343 case $enable_shared in
2344 yes | no) ;;
2346 enable_shared=no
2347 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2348 for pkg in $enableval; do
2349 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2350 enable_shared=yes
2352 done
2353 IFS="$ac_save_ifs"
2355 esac
2357 else
2358 enable_shared=yes
2363 # Check whether --with-sysroot or --without-sysroot was given.
2364 if test "${with_sysroot+set}" = set; then
2365 withval="$with_sysroot"
2367 case ${with_sysroot} in
2368 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2369 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2370 esac
2372 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2373 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2375 if test "x$exec_prefix" = xNONE; then
2376 if test "x$prefix" = xNONE; then
2377 test_prefix=/usr/local
2378 else
2379 test_prefix=$prefix
2381 else
2382 test_prefix=$exec_prefix
2384 case ${TARGET_SYSTEM_ROOT} in
2385 "${test_prefix}"|"${test_prefix}/"*|\
2386 '${exec_prefix}'|'${exec_prefix}/'*)
2387 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2388 TARGET_SYSTEM_ROOT_DEFINE="$t"
2390 esac
2392 else
2394 TARGET_SYSTEM_ROOT=
2395 TARGET_SYSTEM_ROOT_DEFINE=
2396 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2404 # -------------------------
2405 # Checks for other programs
2406 # -------------------------
2408 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2409 echo "configure:2410: checking whether ${MAKE-make} sets \${MAKE}" >&5
2410 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2411 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 cat > conftestmake <<\EOF
2415 all:
2416 @echo 'ac_maketemp="${MAKE}"'
2418 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2419 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2420 if test -n "$ac_maketemp"; then
2421 eval ac_cv_prog_make_${ac_make}_set=yes
2422 else
2423 eval ac_cv_prog_make_${ac_make}_set=no
2425 rm -f conftestmake
2427 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2428 echo "$ac_t""yes" 1>&6
2429 SET_MAKE=
2430 else
2431 echo "$ac_t""no" 1>&6
2432 SET_MAKE="MAKE=${MAKE-make}"
2436 # Find some useful tools
2437 for ac_prog in mawk gawk nawk awk
2439 # Extract the first word of "$ac_prog", so it can be a program name with args.
2440 set dummy $ac_prog; ac_word=$2
2441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2442 echo "configure:2443: checking for $ac_word" >&5
2443 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445 else
2446 if test -n "$AWK"; then
2447 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2448 else
2449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2450 ac_dummy="$PATH"
2451 for ac_dir in $ac_dummy; do
2452 test -z "$ac_dir" && ac_dir=.
2453 if test -f $ac_dir/$ac_word; then
2454 ac_cv_prog_AWK="$ac_prog"
2455 break
2457 done
2458 IFS="$ac_save_ifs"
2461 AWK="$ac_cv_prog_AWK"
2462 if test -n "$AWK"; then
2463 echo "$ac_t""$AWK" 1>&6
2464 else
2465 echo "$ac_t""no" 1>&6
2468 test -n "$AWK" && break
2469 done
2471 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2472 echo "configure:2473: checking whether ln works" >&5
2473 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2474 echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476 rm -f conftestdata_t
2477 echo >conftestdata_f
2478 if ln conftestdata_f conftestdata_t 2>/dev/null
2479 then
2480 gcc_cv_prog_LN="ln"
2481 else
2482 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2483 then
2484 gcc_cv_prog_LN="ln -s"
2485 else
2486 gcc_cv_prog_LN=cp
2489 rm -f conftestdata_f conftestdata_t
2492 LN="$gcc_cv_prog_LN"
2493 if test "$gcc_cv_prog_LN" = "ln"; then
2494 echo "$ac_t""yes" 1>&6
2495 else
2496 if test "$gcc_cv_prog_LN" = "ln -s"; then
2497 echo "$ac_t""no, using ln -s" 1>&6
2498 else
2499 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2503 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2504 echo "configure:2505: checking whether ln -s works" >&5
2505 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2506 echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508 rm -f conftestdata_t
2509 echo >conftestdata_f
2510 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2511 then
2512 gcc_cv_prog_LN_S="ln -s"
2513 else
2514 if ln conftestdata_f conftestdata_t 2>/dev/null
2515 then
2516 gcc_cv_prog_LN_S=ln
2517 else
2518 gcc_cv_prog_LN_S=cp
2521 rm -f conftestdata_f conftestdata_t
2524 LN_S="$gcc_cv_prog_LN_S"
2525 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2526 echo "$ac_t""yes" 1>&6
2527 else
2528 if test "$gcc_cv_prog_LN_S" = "ln"; then
2529 echo "$ac_t""no, using ln" 1>&6
2530 else
2531 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2535 # Extract the first word of "ranlib", so it can be a program name with args.
2536 set dummy ranlib; ac_word=$2
2537 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2538 echo "configure:2539: checking for $ac_word" >&5
2539 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2540 echo $ac_n "(cached) $ac_c" 1>&6
2541 else
2542 if test -n "$RANLIB"; then
2543 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2544 else
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_prog_RANLIB="ranlib"
2551 break
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2558 RANLIB="$ac_cv_prog_RANLIB"
2559 if test -n "$RANLIB"; then
2560 echo "$ac_t""$RANLIB" 1>&6
2561 else
2562 echo "$ac_t""no" 1>&6
2565 # Find a good install program. We prefer a C program (faster),
2566 # so one script is as good as another. But avoid the broken or
2567 # incompatible versions:
2568 # SysV /etc/install, /usr/sbin/install
2569 # SunOS /usr/etc/install
2570 # IRIX /sbin/install
2571 # AIX /bin/install
2572 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2573 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2574 # ./install, which can be erroneously created by make from ./install.sh.
2575 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2576 echo "configure:2577: checking for a BSD compatible install" >&5
2577 if test -z "$INSTALL"; then
2578 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2579 echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2582 for ac_dir in $PATH; do
2583 # Account for people who put trailing slashes in PATH elements.
2584 case "$ac_dir/" in
2585 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2587 # OSF1 and SCO ODT 3.0 have their own names for install.
2588 for ac_prog in ginstall scoinst install; do
2589 if test -f $ac_dir/$ac_prog; then
2590 if test $ac_prog = install &&
2591 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2592 # AIX install. It has an incompatible calling convention.
2593 # OSF/1 installbsd also uses dspmsg, but is usable.
2595 else
2596 ac_cv_path_install="$ac_dir/$ac_prog -c"
2597 break 2
2600 done
2602 esac
2603 done
2604 IFS="$ac_save_IFS"
2607 if test "${ac_cv_path_install+set}" = set; then
2608 INSTALL="$ac_cv_path_install"
2609 else
2610 # As a last resort, use the slow shell script. We don't cache a
2611 # path for INSTALL within a source directory, because that will
2612 # break other packages using the cache if that directory is
2613 # removed, or if the path is relative.
2614 INSTALL="$ac_install_sh"
2617 echo "$ac_t""$INSTALL" 1>&6
2619 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2620 # It thinks the first close brace ends the variable substitution.
2621 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2623 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2626 # See if we have the mktemp command.
2627 # Extract the first word of "mktemp", so it can be a program name with args.
2628 set dummy mktemp; ac_word=$2
2629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2630 echo "configure:2631: checking for $ac_word" >&5
2631 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634 if test -n "$have_mktemp_command"; then
2635 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2636 else
2637 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2638 ac_dummy="$PATH"
2639 for ac_dir in $ac_dummy; do
2640 test -z "$ac_dir" && ac_dir=.
2641 if test -f $ac_dir/$ac_word; then
2642 ac_cv_prog_have_mktemp_command="yes"
2643 break
2645 done
2646 IFS="$ac_save_ifs"
2647 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2650 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2651 if test -n "$have_mktemp_command"; then
2652 echo "$ac_t""$have_mktemp_command" 1>&6
2653 else
2654 echo "$ac_t""no" 1>&6
2658 # Do we have a single-tree copy of texinfo?
2659 if test -f $srcdir/../texinfo/Makefile.in; then
2660 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2661 gcc_cv_prog_makeinfo_modern=yes
2662 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2663 else
2664 # See if makeinfo has been installed and is modern enough
2665 # that we can use it.
2666 # Extract the first word of "makeinfo", so it can be a program name with args.
2667 set dummy makeinfo; ac_word=$2
2668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_word" >&5
2670 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2671 echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673 if test -n "$MAKEINFO"; then
2674 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2675 else
2676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2677 ac_dummy="$PATH"
2678 for ac_dir in $ac_dummy; do
2679 test -z "$ac_dir" && ac_dir=.
2680 if test -f $ac_dir/$ac_word; then
2681 ac_cv_prog_MAKEINFO="makeinfo"
2682 break
2684 done
2685 IFS="$ac_save_ifs"
2688 MAKEINFO="$ac_cv_prog_MAKEINFO"
2689 if test -n "$MAKEINFO"; then
2690 echo "$ac_t""$MAKEINFO" 1>&6
2691 else
2692 echo "$ac_t""no" 1>&6
2695 if test -n "$MAKEINFO"; then
2696 # Found it, now check the version.
2697 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2698 echo "configure:2699: checking for modern makeinfo" >&5
2699 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2700 echo $ac_n "(cached) $ac_c" 1>&6
2701 else
2702 ac_prog_version=`$MAKEINFO --version 2>&1 |
2703 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2704 echo "configure:2705: version of makeinfo is $ac_prog_version" >&5
2705 case $ac_prog_version in
2706 '') gcc_cv_prog_makeinfo_modern=no;;
2707 4.[2-9]*)
2708 gcc_cv_prog_makeinfo_modern=yes;;
2709 *) gcc_cv_prog_makeinfo_modern=no;;
2710 esac
2714 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2715 else
2716 gcc_cv_prog_makeinfo_modern=no
2721 if test $gcc_cv_prog_makeinfo_modern = no; then
2722 echo "configure: warning:
2723 *** Makeinfo is missing or too old.
2724 *** Info documentation will not be built." 1>&2
2725 BUILD_INFO=
2726 else
2727 BUILD_INFO=info
2730 # Is pod2man recent enough to regenerate manpages?
2731 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2732 echo "configure:2733: checking for recent Pod::Man" >&5
2733 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
2734 echo "$ac_t""yes" 1>&6
2735 GENERATED_MANPAGES=generated-manpages
2736 else
2737 echo "$ac_t""no" 1>&6
2738 GENERATED_MANPAGES=
2741 # If GNU cmp is present and recent enough, 'make compare' can be
2742 # significantly faster.
2743 # Extract the first word of "cmp", so it can be a program name with args.
2744 set dummy cmp; ac_word=$2
2745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2746 echo "configure:2747: checking for $ac_word" >&5
2747 if eval "test \"`echo '$''{'ac_cv_prog_gnucmp'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750 if test -n "$gnucmp"; then
2751 ac_cv_prog_gnucmp="$gnucmp" # Let the user override the test.
2752 else
2753 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2754 ac_dummy="$PATH"
2755 for ac_dir in $ac_dummy; do
2756 test -z "$ac_dir" && ac_dir=.
2757 if test -f $ac_dir/$ac_word; then
2758 ac_cv_prog_gnucmp="cmp"
2759 break
2761 done
2762 IFS="$ac_save_ifs"
2765 gnucmp="$ac_cv_prog_gnucmp"
2766 if test -n "$gnucmp"; then
2767 echo "$ac_t""$gnucmp" 1>&6
2768 else
2769 echo "$ac_t""no" 1>&6
2772 if test -n "$gnucmp"; then
2773 # Found it, now check the version.
2774 echo $ac_n "checking for modern cmp""... $ac_c" 1>&6
2775 echo "configure:2776: checking for modern cmp" >&5
2776 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_modern'+set}'`\" = set"; then
2777 echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779 ac_prog_version=`$gnucmp --version 2>&1 |
2780 sed -n 's/^.*(GNU diffutils) \([0-9][0-9.]*\).*$/\1/p'`
2781 echo "configure:2782: version of cmp is $ac_prog_version" >&5
2782 case $ac_prog_version in
2783 '') gcc_cv_prog_cmp_modern=no;;
2784 2.[4-9]*)
2785 gcc_cv_prog_cmp_modern=yes;;
2786 *) gcc_cv_prog_cmp_modern=no;;
2787 esac
2791 echo "$ac_t""$gcc_cv_prog_cmp_modern" 1>&6
2792 else
2793 gcc_cv_prog_cmp_modern=no
2796 if test $gcc_cv_prog_cmp_modern = yes; then
2797 make_compare_target=gnucompare
2798 else
2799 make_compare_target=slowcompare
2803 # How about lex?
2804 if test -f $srcdir/../flex/skel.c; then
2805 FLEX='$(objdir)/../flex/flex'
2806 else
2807 # Extract the first word of "flex", so it can be a program name with args.
2808 set dummy flex; ac_word=$2
2809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2810 echo "configure:2811: checking for $ac_word" >&5
2811 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
2813 else
2814 if test -n "$FLEX"; then
2815 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2816 else
2817 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2818 ac_dummy="$PATH"
2819 for ac_dir in $ac_dummy; do
2820 test -z "$ac_dir" && ac_dir=.
2821 if test -f $ac_dir/$ac_word; then
2822 ac_cv_prog_FLEX="flex"
2823 break
2825 done
2826 IFS="$ac_save_ifs"
2827 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2830 FLEX="$ac_cv_prog_FLEX"
2831 if test -n "$FLEX"; then
2832 echo "$ac_t""$FLEX" 1>&6
2833 else
2834 echo "$ac_t""no" 1>&6
2839 # Bison?
2840 # The -L switch is so bison can find its skeleton file.
2841 if test -f $srcdir/../bison/bison.simple; then
2842 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2843 else
2844 # Extract the first word of "bison", so it can be a program name with args.
2845 set dummy bison; ac_word=$2
2846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2847 echo "configure:2848: checking for $ac_word" >&5
2848 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2849 echo $ac_n "(cached) $ac_c" 1>&6
2850 else
2851 if test -n "$BISON"; then
2852 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2853 else
2854 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2855 ac_dummy="$PATH"
2856 for ac_dir in $ac_dummy; do
2857 test -z "$ac_dir" && ac_dir=.
2858 if test -f $ac_dir/$ac_word; then
2859 ac_cv_prog_BISON="bison"
2860 break
2862 done
2863 IFS="$ac_save_ifs"
2864 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2867 BISON="$ac_cv_prog_BISON"
2868 if test -n "$BISON"; then
2869 echo "$ac_t""$BISON" 1>&6
2870 else
2871 echo "$ac_t""no" 1>&6
2876 # --------------------
2877 # Checks for C headers
2878 # --------------------
2880 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2881 echo "configure:2882: checking for GNU C library" >&5
2882 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2883 echo $ac_n "(cached) $ac_c" 1>&6
2884 else
2885 cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2888 #include <features.h>
2889 int main() {
2891 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2892 #error Not a GNU C library system
2893 #endif
2894 ; return 0; }
2896 if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2897 rm -rf conftest*
2898 gcc_cv_glibc=yes
2899 else
2900 echo "configure: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2902 rm -rf conftest*
2903 gcc_cv_glibc=no
2905 rm -f conftest*
2908 echo "$ac_t""$gcc_cv_glibc" 1>&6
2909 if test $gcc_cv_glibc = yes; then
2910 cat >> confdefs.h <<\EOF
2911 #define _GNU_SOURCE 1
2916 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2917 echo "configure:2918: checking for ANSI C header files" >&5
2918 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
2920 else
2921 cat > conftest.$ac_ext <<EOF
2922 #line 2923 "configure"
2923 #include "confdefs.h"
2924 #include <stdlib.h>
2925 #include <stdarg.h>
2926 #include <string.h>
2927 #include <float.h>
2929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2930 { (eval echo configure:2931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2932 if test -z "$ac_err"; then
2933 rm -rf conftest*
2934 ac_cv_header_stdc=yes
2935 else
2936 echo "$ac_err" >&5
2937 echo "configure: failed program was:" >&5
2938 cat conftest.$ac_ext >&5
2939 rm -rf conftest*
2940 ac_cv_header_stdc=no
2942 rm -f conftest*
2944 if test $ac_cv_header_stdc = yes; then
2945 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2946 cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 #include <string.h>
2951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2952 egrep "memchr" >/dev/null 2>&1; then
2954 else
2955 rm -rf conftest*
2956 ac_cv_header_stdc=no
2958 rm -f conftest*
2962 if test $ac_cv_header_stdc = yes; then
2963 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2967 #include <stdlib.h>
2969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2970 egrep "free" >/dev/null 2>&1; then
2972 else
2973 rm -rf conftest*
2974 ac_cv_header_stdc=no
2976 rm -f conftest*
2980 if test $ac_cv_header_stdc = yes; then
2981 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2982 if test "$cross_compiling" = yes; then
2984 else
2985 cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <ctype.h>
2989 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2990 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2991 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2992 int main () { int i; for (i = 0; i < 256; i++)
2993 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2994 exit (0); }
2997 if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2998 then
3000 else
3001 echo "configure: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 rm -fr conftest*
3004 ac_cv_header_stdc=no
3006 rm -fr conftest*
3012 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3013 if test $ac_cv_header_stdc = yes; then
3014 cat >> confdefs.h <<\EOF
3015 #define STDC_HEADERS 1
3020 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3021 echo "configure:3022: checking whether time.h and sys/time.h may both be included" >&5
3022 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3023 echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025 cat > conftest.$ac_ext <<EOF
3026 #line 3027 "configure"
3027 #include "confdefs.h"
3028 #include <sys/types.h>
3029 #include <sys/time.h>
3030 #include <time.h>
3031 int main() {
3032 struct tm *tp;
3033 ; return 0; }
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036 rm -rf conftest*
3037 ac_cv_header_time=yes
3038 else
3039 echo "configure: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3041 rm -rf conftest*
3042 ac_cv_header_time=no
3044 rm -f conftest*
3047 echo "$ac_t""$ac_cv_header_time" 1>&6
3048 if test $ac_cv_header_time = yes; then
3049 cat >> confdefs.h <<\EOF
3050 #define TIME_WITH_SYS_TIME 1
3055 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
3056 echo "configure:3057: checking for working stdbool.h" >&5
3057 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
3058 echo $ac_n "(cached) $ac_c" 1>&6
3059 else
3060 cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3063 #include <stdbool.h>
3064 int main() {
3065 bool foo = false;
3066 ; return 0; }
3068 if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3069 rm -rf conftest*
3070 ac_cv_header_stdbool_h=yes
3071 else
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3074 rm -rf conftest*
3075 ac_cv_header_stdbool_h=no
3077 rm -f conftest*
3080 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
3081 if test $ac_cv_header_stdbool_h = yes; then
3082 cat >> confdefs.h <<\EOF
3083 #define HAVE_STDBOOL_H 1
3088 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
3089 echo "configure:3090: checking whether string.h and strings.h may both be included" >&5
3090 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
3091 echo $ac_n "(cached) $ac_c" 1>&6
3092 else
3093 cat > conftest.$ac_ext <<EOF
3094 #line 3095 "configure"
3095 #include "confdefs.h"
3096 #include <string.h>
3097 #include <strings.h>
3098 int main() {
3100 ; return 0; }
3102 if { (eval echo configure:3103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3103 rm -rf conftest*
3104 gcc_cv_header_string=yes
3105 else
3106 echo "configure: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
3108 rm -rf conftest*
3109 gcc_cv_header_string=no
3111 rm -f conftest*
3114 echo "$ac_t""$gcc_cv_header_string" 1>&6
3115 if test $gcc_cv_header_string = yes; then
3116 cat >> confdefs.h <<\EOF
3117 #define STRING_WITH_STRINGS 1
3122 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3123 echo "configure:3124: checking for sys/wait.h that is POSIX.1 compatible" >&5
3124 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3125 echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127 cat > conftest.$ac_ext <<EOF
3128 #line 3129 "configure"
3129 #include "confdefs.h"
3130 #include <sys/types.h>
3131 #include <sys/wait.h>
3132 #ifndef WEXITSTATUS
3133 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3134 #endif
3135 #ifndef WIFEXITED
3136 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3137 #endif
3138 int main() {
3139 int s;
3140 wait (&s);
3141 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3142 ; return 0; }
3144 if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3145 rm -rf conftest*
3146 ac_cv_header_sys_wait_h=yes
3147 else
3148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 rm -rf conftest*
3151 ac_cv_header_sys_wait_h=no
3153 rm -f conftest*
3156 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3157 if test $ac_cv_header_sys_wait_h = yes; then
3158 cat >> confdefs.h <<\EOF
3159 #define HAVE_SYS_WAIT_H 1
3164 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3165 fcntl.h unistd.h sys/file.h sys/time.h \
3166 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3167 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3171 echo "configure:3172: checking for $ac_hdr" >&5
3172 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 #include <$ac_hdr>
3180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3181 { (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3183 if test -z "$ac_err"; then
3184 rm -rf conftest*
3185 eval "ac_cv_header_$ac_safe=yes"
3186 else
3187 echo "$ac_err" >&5
3188 echo "configure: failed program was:" >&5
3189 cat conftest.$ac_ext >&5
3190 rm -rf conftest*
3191 eval "ac_cv_header_$ac_safe=no"
3193 rm -f conftest*
3195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3196 echo "$ac_t""yes" 1>&6
3197 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3198 cat >> confdefs.h <<EOF
3199 #define $ac_tr_hdr 1
3202 else
3203 echo "$ac_t""no" 1>&6
3205 done
3208 # Check for thread headers.
3209 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3210 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3211 echo "configure:3212: checking for thread.h" >&5
3212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3213 echo $ac_n "(cached) $ac_c" 1>&6
3214 else
3215 cat > conftest.$ac_ext <<EOF
3216 #line 3217 "configure"
3217 #include "confdefs.h"
3218 #include <thread.h>
3220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3221 { (eval echo configure:3222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3223 if test -z "$ac_err"; then
3224 rm -rf conftest*
3225 eval "ac_cv_header_$ac_safe=yes"
3226 else
3227 echo "$ac_err" >&5
3228 echo "configure: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 rm -rf conftest*
3231 eval "ac_cv_header_$ac_safe=no"
3233 rm -f conftest*
3235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3236 echo "$ac_t""yes" 1>&6
3237 have_thread_h=yes
3238 else
3239 echo "$ac_t""no" 1>&6
3240 have_thread_h=
3243 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3244 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3245 echo "configure:3246: checking for pthread.h" >&5
3246 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3247 echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <pthread.h>
3254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3255 { (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3257 if test -z "$ac_err"; then
3258 rm -rf conftest*
3259 eval "ac_cv_header_$ac_safe=yes"
3260 else
3261 echo "$ac_err" >&5
3262 echo "configure: failed program was:" >&5
3263 cat conftest.$ac_ext >&5
3264 rm -rf conftest*
3265 eval "ac_cv_header_$ac_safe=no"
3267 rm -f conftest*
3269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3270 echo "$ac_t""yes" 1>&6
3271 have_pthread_h=yes
3272 else
3273 echo "$ac_t""no" 1>&6
3274 have_pthread_h=
3278 # These tests can't be done till we know if we have limits.h.
3279 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3280 echo "configure:3281: checking for CHAR_BIT" >&5
3281 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3282 echo $ac_n "(cached) $ac_c" 1>&6
3283 else
3284 cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3287 #ifdef HAVE_LIMITS_H
3288 #include <limits.h>
3289 #endif
3290 #ifdef CHAR_BIT
3291 found
3292 #endif
3294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3295 egrep "found" >/dev/null 2>&1; then
3296 rm -rf conftest*
3297 gcc_cv_decl_char_bit=yes
3298 else
3299 rm -rf conftest*
3300 gcc_cv_decl_char_bit=no
3302 rm -f conftest*
3307 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3308 if test $gcc_cv_decl_char_bit = no; then
3309 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3310 echo "configure:3311: checking number of bits in a byte" >&5
3311 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3312 echo $ac_n "(cached) $ac_c" 1>&6
3313 else
3315 gcc_cv_c_nbby=
3316 while test $i -lt 65; do
3317 cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3321 int main() {
3322 switch(0) {
3323 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3324 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3326 ; return 0; }
3328 if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3329 rm -rf conftest*
3330 gcc_cv_c_nbby=$i; break
3331 else
3332 echo "configure: failed program was:" >&5
3333 cat conftest.$ac_ext >&5
3335 rm -f conftest*
3336 i=`expr $i + 1`
3337 done
3338 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3342 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3343 if test $gcc_cv_c_nbby = failed; then
3344 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3345 else
3346 cat >> confdefs.h <<EOF
3347 #define CHAR_BIT $gcc_cv_c_nbby
3352 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3353 echo "configure:3354: checking whether byte ordering is bigendian" >&5
3354 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3355 echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357 ac_cv_c_bigendian=unknown
3358 # See if sys/param.h defines the BYTE_ORDER macro.
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 #include <sys/types.h>
3363 #include <sys/param.h>
3364 int main() {
3366 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3367 bogus endian macros
3368 #endif
3369 ; return 0; }
3371 if { (eval echo configure:3372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3372 rm -rf conftest*
3373 # It does; now see whether it defined to BIG_ENDIAN or not.
3374 cat > conftest.$ac_ext <<EOF
3375 #line 3376 "configure"
3376 #include "confdefs.h"
3377 #include <sys/types.h>
3378 #include <sys/param.h>
3379 int main() {
3381 #if BYTE_ORDER != BIG_ENDIAN
3382 not big endian
3383 #endif
3384 ; return 0; }
3386 if { (eval echo configure:3387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3387 rm -rf conftest*
3388 ac_cv_c_bigendian=yes
3389 else
3390 echo "configure: failed program was:" >&5
3391 cat conftest.$ac_ext >&5
3392 rm -rf conftest*
3393 ac_cv_c_bigendian=no
3395 rm -f conftest*
3396 else
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3400 rm -f conftest*
3401 if test $ac_cv_c_bigendian = unknown; then
3402 if test "$cross_compiling" = yes; then
3403 echo $ac_n "cross-compiling... " 2>&6
3404 else
3405 cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 main () {
3409 /* Are we little or big endian? From Harbison&Steele. */
3410 union
3412 long l;
3413 char c[sizeof (long)];
3414 } u;
3415 u.l = 1;
3416 exit (u.c[sizeof (long) - 1] == 1);
3419 if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3420 then
3421 ac_cv_c_bigendian=no
3422 else
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 rm -fr conftest*
3426 ac_cv_c_bigendian=yes
3428 rm -fr conftest*
3434 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3435 if test $ac_cv_c_bigendian = unknown; then
3436 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3437 echo "configure:3438: checking to probe for byte ordering" >&5
3439 cat >conftest.c <<EOF
3440 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3441 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3442 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3443 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3444 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3445 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3446 int main() { _ascii (); _ebcdic (); return 0; }
3448 if test -f conftest.c ; then
3449 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3450 if test `grep -l BIGenDianSyS conftest.o` ; then
3451 echo $ac_n ' big endian probe OK, ' 1>&6
3452 ac_cv_c_bigendian=yes
3454 if test `grep -l LiTTleEnDian conftest.o` ; then
3455 echo $ac_n ' little endian probe OK, ' 1>&6
3456 if test $ac_cv_c_bigendian = yes ; then
3457 ac_cv_c_bigendian=unknown;
3458 else
3459 ac_cv_c_bigendian=no
3462 echo $ac_n 'guessing bigendian ... ' >&6
3465 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3467 if test $ac_cv_c_bigendian = yes; then
3468 cat >> confdefs.h <<\EOF
3469 #define WORDS_BIGENDIAN 1
3472 cat >> confdefs.h <<\EOF
3473 #define HOST_WORDS_BIG_ENDIAN 1
3476 BYTEORDER=4321
3477 else
3478 BYTEORDER=1234
3480 cat >> confdefs.h <<EOF
3481 #define BYTEORDER $BYTEORDER
3484 if test $ac_cv_c_bigendian = unknown; then
3485 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3489 # --------
3490 # UNSORTED
3491 # --------
3493 # Stage specific cflags for build.
3494 stage1_cflags=
3495 case $build in
3496 vax-*-*)
3497 if test x$GCC = xyes
3498 then
3499 stage1_cflags="-Wa,-J"
3500 else
3501 stage1_cflags="-J"
3504 powerpc-*-darwin*)
3505 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3506 # sources; use -no-cpp-precomp to get to GNU cpp.
3507 # Apple's GCC has bugs in designated initializer handling, so disable
3508 # that too.
3509 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3511 esac
3514 # These libraries may be used by collect2.
3515 # We may need a special search path to get them linked.
3516 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3517 echo "configure:3518: checking for collect2 libraries" >&5
3518 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3519 echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521 save_LIBS="$LIBS"
3522 for libs in '' -lld -lmld \
3523 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3524 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3526 LIBS="$libs"
3527 cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 /* Override any gcc2 internal prototype to avoid an error. */
3531 /* We use char because int might match the return type of a gcc2
3532 builtin and then its argument prototype would still apply. */
3533 char ldopen();
3535 int main() {
3536 ldopen()
3537 ; return 0; }
3539 if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3540 rm -rf conftest*
3541 gcc_cv_collect2_libs="$libs"; break
3542 else
3543 echo "configure: failed program was:" >&5
3544 cat conftest.$ac_ext >&5
3546 rm -f conftest*
3547 done
3548 LIBS="$save_LIBS"
3549 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3552 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3553 case $gcc_cv_collect2_libs in
3554 "none required") ;;
3555 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3556 esac
3559 # When building Ada code on Alpha, we need exc_resume which is usually in
3560 # -lexc. So test for it.
3561 save_LIBS="$LIBS"
3562 LIBS=
3564 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3565 echo "configure:3566: checking for library containing exc_resume" >&5
3566 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3567 echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569 ac_func_search_save_LIBS="$LIBS"
3570 ac_cv_search_exc_resume="no"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574 /* Override any gcc2 internal prototype to avoid an error. */
3575 /* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3577 char exc_resume();
3579 int main() {
3580 exc_resume()
3581 ; return 0; }
3583 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3584 rm -rf conftest*
3585 ac_cv_search_exc_resume="none required"
3586 else
3587 echo "configure: failed program was:" >&5
3588 cat conftest.$ac_ext >&5
3590 rm -f conftest*
3591 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3592 LIBS="-l$i $ac_func_search_save_LIBS"
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 /* Override any gcc2 internal prototype to avoid an error. */
3597 /* We use char because int might match the return type of a gcc2
3598 builtin and then its argument prototype would still apply. */
3599 char exc_resume();
3601 int main() {
3602 exc_resume()
3603 ; return 0; }
3605 if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606 rm -rf conftest*
3607 ac_cv_search_exc_resume="-l$i"
3608 break
3609 else
3610 echo "configure: failed program was:" >&5
3611 cat conftest.$ac_ext >&5
3613 rm -f conftest*
3614 done
3615 LIBS="$ac_func_search_save_LIBS"
3618 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3619 if test "$ac_cv_search_exc_resume" != "no"; then
3620 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3622 else :
3625 GNAT_LIBEXC="$LIBS"
3626 LIBS="$save_LIBS"
3629 # Some systems put ldexp and frexp in libm instead of libc; assume
3630 # they're both in the same place. jcf-dump needs them.
3631 save_LIBS="$LIBS"
3632 LIBS=
3634 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3635 echo "configure:3636: checking for library containing ldexp" >&5
3636 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3637 echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639 ac_func_search_save_LIBS="$LIBS"
3640 ac_cv_search_ldexp="no"
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.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 ldexp();
3649 int main() {
3650 ldexp()
3651 ; return 0; }
3653 if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3654 rm -rf conftest*
3655 ac_cv_search_ldexp="none required"
3656 else
3657 echo "configure: failed program was:" >&5
3658 cat conftest.$ac_ext >&5
3660 rm -f conftest*
3661 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3662 LIBS="-l$i $ac_func_search_save_LIBS"
3663 cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 /* Override any gcc2 internal prototype to avoid an error. */
3667 /* We use char because int might match the return type of a gcc2
3668 builtin and then its argument prototype would still apply. */
3669 char ldexp();
3671 int main() {
3672 ldexp()
3673 ; return 0; }
3675 if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3676 rm -rf conftest*
3677 ac_cv_search_ldexp="-l$i"
3678 break
3679 else
3680 echo "configure: failed program was:" >&5
3681 cat conftest.$ac_ext >&5
3683 rm -f conftest*
3684 done
3685 LIBS="$ac_func_search_save_LIBS"
3688 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3689 if test "$ac_cv_search_ldexp" != "no"; then
3690 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3692 else :
3695 LDEXP_LIB="$LIBS"
3696 LIBS="$save_LIBS"
3699 # See if the stage1 system preprocessor understands the ANSI C
3700 # preprocessor stringification operator. (Used by symcat.h.)
3703 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3704 echo "configure:3705: checking for preprocessor stringizing operator" >&5
3705 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3706 echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3712 #define x(y) #y
3714 char *s = x(teststring);
3717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3718 egrep "#teststring" >/dev/null 2>&1; then
3719 rm -rf conftest*
3720 ac_cv_c_stringize=no
3721 else
3722 rm -rf conftest*
3723 ac_cv_c_stringize=yes
3725 rm -f conftest*
3729 if test "${ac_cv_c_stringize}" = yes
3730 then
3731 cat >> confdefs.h <<\EOF
3732 #define HAVE_STRINGIZE 1
3736 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3739 # Use <inttypes.h> only if it exists,
3740 # doesn't clash with <sys/types.h>, and declares intmax_t.
3741 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3742 echo "configure:3743: checking for inttypes.h" >&5
3743 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3744 echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 #include <sys/types.h>
3750 #include <inttypes.h>
3751 int main() {
3752 intmax_t i = -1;
3753 ; return 0; }
3755 if { (eval echo configure:3756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3756 rm -rf conftest*
3757 gcc_cv_header_inttypes_h=yes
3758 else
3759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3761 rm -rf conftest*
3762 gcc_cv_header_inttypes_h=no
3764 rm -f conftest*
3767 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3768 if test $gcc_cv_header_inttypes_h = yes; then
3769 cat >> confdefs.h <<\EOF
3770 #define HAVE_INTTYPES_H 1
3776 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3777 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3778 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3779 scandir alphasort gettimeofday mbstowcs wcswidth
3781 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3782 echo "configure:3783: checking for $ac_func" >&5
3783 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3784 echo $ac_n "(cached) $ac_c" 1>&6
3785 else
3786 cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789 /* System header to define __stub macros and hopefully few prototypes,
3790 which can conflict with char $ac_func(); below. */
3791 #include <assert.h>
3792 /* Override any gcc2 internal prototype to avoid an error. */
3793 /* We use char because int might match the return type of a gcc2
3794 builtin and then its argument prototype would still apply. */
3795 char $ac_func();
3797 int main() {
3799 /* The GNU C library defines this for functions which it implements
3800 to always fail with ENOSYS. Some functions are actually named
3801 something starting with __ and the normal name is an alias. */
3802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3803 choke me
3804 #else
3805 $ac_func();
3806 #endif
3808 ; return 0; }
3810 if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3811 rm -rf conftest*
3812 eval "ac_cv_func_$ac_func=yes"
3813 else
3814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816 rm -rf conftest*
3817 eval "ac_cv_func_$ac_func=no"
3819 rm -f conftest*
3822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3823 echo "$ac_t""yes" 1>&6
3824 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3825 cat >> confdefs.h <<EOF
3826 #define $ac_tr_func 1
3829 else
3830 echo "$ac_t""no" 1>&6
3832 done
3835 if test x$ac_cv_func_mbstowcs = xyes; then
3836 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3837 echo "configure:3838: checking whether mbstowcs works" >&5
3838 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3839 echo $ac_n "(cached) $ac_c" 1>&6
3840 else
3841 if test "$cross_compiling" = yes; then
3842 gcc_cv_func_mbstowcs_works=yes
3843 else
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <stdlib.h>
3848 int main()
3850 mbstowcs(0, "", 0);
3851 return 0;
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3855 then
3856 gcc_cv_func_mbstowcs_works=yes
3857 else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -fr conftest*
3861 gcc_cv_func_mbstowcs_works=no
3863 rm -fr conftest*
3868 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3869 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3870 cat >> confdefs.h <<\EOF
3871 #define HAVE_WORKING_MBSTOWCS 1
3877 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3878 echo "configure:3879: checking for ssize_t" >&5
3879 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 #include <sys/types.h>
3886 #if STDC_HEADERS
3887 #include <stdlib.h>
3888 #include <stddef.h>
3889 #endif
3891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3892 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3893 rm -rf conftest*
3894 ac_cv_type_ssize_t=yes
3895 else
3896 rm -rf conftest*
3897 ac_cv_type_ssize_t=no
3899 rm -f conftest*
3902 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3903 if test $ac_cv_type_ssize_t = no; then
3904 cat >> confdefs.h <<\EOF
3905 #define ssize_t int
3911 # Try to determine the array type of the second argument of getgroups
3912 # for the target system (int or gid_t).
3913 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3914 echo "configure:3915: checking for uid_t in sys/types.h" >&5
3915 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3916 echo $ac_n "(cached) $ac_c" 1>&6
3917 else
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 #include <sys/types.h>
3923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3924 egrep "uid_t" >/dev/null 2>&1; then
3925 rm -rf conftest*
3926 ac_cv_type_uid_t=yes
3927 else
3928 rm -rf conftest*
3929 ac_cv_type_uid_t=no
3931 rm -f conftest*
3935 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3936 if test $ac_cv_type_uid_t = no; then
3937 cat >> confdefs.h <<\EOF
3938 #define uid_t int
3941 cat >> confdefs.h <<\EOF
3942 #define gid_t int
3947 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3948 echo "configure:3949: checking type of array argument to getgroups" >&5
3949 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3950 echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952 if test "$cross_compiling" = yes; then
3953 ac_cv_type_getgroups=cross
3954 else
3955 cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3959 /* Thanks to Mike Rendell for this test. */
3960 #include <sys/types.h>
3961 #define NGID 256
3962 #undef MAX
3963 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3964 main()
3966 gid_t gidset[NGID];
3967 int i, n;
3968 union { gid_t gval; long lval; } val;
3970 val.lval = -1;
3971 for (i = 0; i < NGID; i++)
3972 gidset[i] = val.gval;
3973 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3974 gidset);
3975 /* Exit non-zero if getgroups seems to require an array of ints. This
3976 happens when gid_t is short but getgroups modifies an array of ints. */
3977 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3982 then
3983 ac_cv_type_getgroups=gid_t
3984 else
3985 echo "configure: failed program was:" >&5
3986 cat conftest.$ac_ext >&5
3987 rm -fr conftest*
3988 ac_cv_type_getgroups=int
3990 rm -fr conftest*
3993 if test $ac_cv_type_getgroups = cross; then
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <unistd.h>
3999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4000 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
4001 rm -rf conftest*
4002 ac_cv_type_getgroups=gid_t
4003 else
4004 rm -rf conftest*
4005 ac_cv_type_getgroups=int
4007 rm -f conftest*
4012 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
4013 cat >> confdefs.h <<EOF
4014 #define GETGROUPS_T $ac_cv_type_getgroups
4018 if test "${target}" = "${build}"; then
4019 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
4020 else
4021 case "${target}" in
4022 # This condition may need some tweaking. It should include all
4023 # targets where the array type of the second argument of getgroups
4024 # is int and the type of gid_t is not equivalent to int.
4025 *-*-sunos* | *-*-ultrix*)
4026 TARGET_GETGROUPS_T=int
4029 TARGET_GETGROUPS_T=gid_t
4031 esac
4035 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
4036 echo "configure:4037: checking whether the printf functions support %p" >&5
4037 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040 if test "$cross_compiling" = yes; then
4041 gcc_cv_func_printf_ptr=no
4042 else
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <stdio.h>
4048 int main()
4050 char buf[64];
4051 char *p = buf, *q = NULL;
4052 sprintf(buf, "%p", p);
4053 sscanf(buf, "%p", &q);
4054 return (p != q);
4057 if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4058 then
4059 gcc_cv_func_printf_ptr=yes
4060 else
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063 rm -fr conftest*
4064 gcc_cv_func_printf_ptr=no
4066 rm -fr conftest*
4069 rm -f core core.* *.core
4072 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
4073 if test $gcc_cv_func_printf_ptr = yes ; then
4074 cat >> confdefs.h <<\EOF
4075 #define HAVE_PRINTF_PTR 1
4081 case "${host}" in
4082 *-*-uwin*)
4083 { echo "configure: error:
4084 *** UWIN may not be used as a host platform because
4085 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4087 *-*-*vms*)
4088 # Under VMS, vfork works very different than on Unix. The standard test
4089 # won't work, and it isn't easily adaptable. It makes more sense to
4090 # just force it.
4091 ac_cv_func_vfork_works=yes
4093 esac
4094 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4095 echo "configure:4096: checking for pid_t" >&5
4096 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102 #include <sys/types.h>
4103 #if STDC_HEADERS
4104 #include <stdlib.h>
4105 #include <stddef.h>
4106 #endif
4108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4109 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4110 rm -rf conftest*
4111 ac_cv_type_pid_t=yes
4112 else
4113 rm -rf conftest*
4114 ac_cv_type_pid_t=no
4116 rm -f conftest*
4119 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4120 if test $ac_cv_type_pid_t = no; then
4121 cat >> confdefs.h <<\EOF
4122 #define pid_t int
4127 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4128 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4129 echo "configure:4130: checking for vfork.h" >&5
4130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4131 echo $ac_n "(cached) $ac_c" 1>&6
4132 else
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 #include <vfork.h>
4138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4139 { (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4141 if test -z "$ac_err"; then
4142 rm -rf conftest*
4143 eval "ac_cv_header_$ac_safe=yes"
4144 else
4145 echo "$ac_err" >&5
4146 echo "configure: failed program was:" >&5
4147 cat conftest.$ac_ext >&5
4148 rm -rf conftest*
4149 eval "ac_cv_header_$ac_safe=no"
4151 rm -f conftest*
4153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4154 echo "$ac_t""yes" 1>&6
4155 cat >> confdefs.h <<\EOF
4156 #define HAVE_VFORK_H 1
4159 else
4160 echo "$ac_t""no" 1>&6
4163 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4164 echo "configure:4165: checking for working vfork" >&5
4165 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4166 echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168 if test "$cross_compiling" = yes; then
4169 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4170 echo "configure:4171: checking for vfork" >&5
4171 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4172 echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 /* System header to define __stub macros and hopefully few prototypes,
4178 which can conflict with char vfork(); below. */
4179 #include <assert.h>
4180 /* Override any gcc2 internal prototype to avoid an error. */
4181 /* We use char because int might match the return type of a gcc2
4182 builtin and then its argument prototype would still apply. */
4183 char vfork();
4185 int main() {
4187 /* The GNU C library defines this for functions which it implements
4188 to always fail with ENOSYS. Some functions are actually named
4189 something starting with __ and the normal name is an alias. */
4190 #if defined (__stub_vfork) || defined (__stub___vfork)
4191 choke me
4192 #else
4193 vfork();
4194 #endif
4196 ; return 0; }
4198 if { (eval echo configure:4199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199 rm -rf conftest*
4200 eval "ac_cv_func_vfork=yes"
4201 else
4202 echo "configure: failed program was:" >&5
4203 cat conftest.$ac_ext >&5
4204 rm -rf conftest*
4205 eval "ac_cv_func_vfork=no"
4207 rm -f conftest*
4210 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4211 echo "$ac_t""yes" 1>&6
4213 else
4214 echo "$ac_t""no" 1>&6
4217 ac_cv_func_vfork_works=$ac_cv_func_vfork
4218 else
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 /* Thanks to Paul Eggert for this test. */
4223 #include <stdio.h>
4224 #include <sys/types.h>
4225 #include <sys/stat.h>
4226 #ifdef HAVE_UNISTD_H
4227 #include <unistd.h>
4228 #endif
4229 #ifdef HAVE_VFORK_H
4230 #include <vfork.h>
4231 #endif
4232 /* On some sparc systems, changes by the child to local and incoming
4233 argument registers are propagated back to the parent.
4234 The compiler is told about this with #include <vfork.h>,
4235 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4236 Test for this by using a static variable whose address
4237 is put into a register that is clobbered by the vfork. */
4238 static
4239 #ifdef __cplusplus
4240 sparc_address_test (int arg)
4241 #else
4242 sparc_address_test (arg) int arg;
4243 #endif
4245 static pid_t child;
4246 if (!child) {
4247 child = vfork ();
4248 if (child < 0) {
4249 perror ("vfork");
4250 _exit(2);
4252 if (!child) {
4253 arg = getpid();
4254 write(-1, "", 0);
4255 _exit (arg);
4259 main() {
4260 pid_t parent = getpid ();
4261 pid_t child;
4263 sparc_address_test ();
4265 child = vfork ();
4267 if (child == 0) {
4268 /* Here is another test for sparc vfork register problems.
4269 This test uses lots of local variables, at least
4270 as many local variables as main has allocated so far
4271 including compiler temporaries. 4 locals are enough for
4272 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4273 A buggy compiler should reuse the register of parent
4274 for one of the local variables, since it will think that
4275 parent can't possibly be used any more in this routine.
4276 Assigning to the local variable will thus munge parent
4277 in the parent process. */
4278 pid_t
4279 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4280 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4281 /* Convince the compiler that p..p7 are live; otherwise, it might
4282 use the same hardware register for all 8 local variables. */
4283 if (p != p1 || p != p2 || p != p3 || p != p4
4284 || p != p5 || p != p6 || p != p7)
4285 _exit(1);
4287 /* On some systems (e.g. IRIX 3.3),
4288 vfork doesn't separate parent from child file descriptors.
4289 If the child closes a descriptor before it execs or exits,
4290 this munges the parent's descriptor as well.
4291 Test for this by closing stdout in the child. */
4292 _exit(close(fileno(stdout)) != 0);
4293 } else {
4294 int status;
4295 struct stat st;
4297 while (wait(&status) != child)
4299 exit(
4300 /* Was there some problem with vforking? */
4301 child < 0
4303 /* Did the child fail? (This shouldn't happen.) */
4304 || status
4306 /* Did the vfork/compiler bug occur? */
4307 || parent != getpid()
4309 /* Did the file descriptor bug occur? */
4310 || fstat(fileno(stdout), &st) != 0
4315 if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4316 then
4317 ac_cv_func_vfork_works=yes
4318 else
4319 echo "configure: failed program was:" >&5
4320 cat conftest.$ac_ext >&5
4321 rm -fr conftest*
4322 ac_cv_func_vfork_works=no
4324 rm -fr conftest*
4329 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4330 if test $ac_cv_func_vfork_works = no; then
4331 cat >> confdefs.h <<\EOF
4332 #define vfork fork
4337 for ac_func in getpagesize
4339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4340 echo "configure:4341: checking for $ac_func" >&5
4341 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344 cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 /* System header to define __stub macros and hopefully few prototypes,
4348 which can conflict with char $ac_func(); below. */
4349 #include <assert.h>
4350 /* Override any gcc2 internal prototype to avoid an error. */
4351 /* We use char because int might match the return type of a gcc2
4352 builtin and then its argument prototype would still apply. */
4353 char $ac_func();
4355 int main() {
4357 /* The GNU C library defines this for functions which it implements
4358 to always fail with ENOSYS. Some functions are actually named
4359 something starting with __ and the normal name is an alias. */
4360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4361 choke me
4362 #else
4363 $ac_func();
4364 #endif
4366 ; return 0; }
4368 if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4369 rm -rf conftest*
4370 eval "ac_cv_func_$ac_func=yes"
4371 else
4372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 eval "ac_cv_func_$ac_func=no"
4377 rm -f conftest*
4380 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4381 echo "$ac_t""yes" 1>&6
4382 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4383 cat >> confdefs.h <<EOF
4384 #define $ac_tr_func 1
4387 else
4388 echo "$ac_t""no" 1>&6
4390 done
4392 # The test program for the next two tests is the same except for one
4393 # set of ifdefs.
4394 cat >ct-mmap.inc <<'EOF'
4395 #include <sys/types.h>
4396 #include <sys/mman.h>
4397 #include <fcntl.h>
4398 #include <signal.h>
4399 #include <setjmp.h>
4400 #include <stdio.h>
4402 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4403 # define MAP_ANONYMOUS MAP_ANON
4404 #endif
4406 /* This mess was copied from the GNU getpagesize.h. */
4407 #ifndef HAVE_GETPAGESIZE
4408 # ifdef HAVE_UNISTD_H
4409 # include <unistd.h>
4410 # endif
4412 /* Assume that all systems that can run configure have sys/param.h. */
4413 # ifndef HAVE_SYS_PARAM_H
4414 # define HAVE_SYS_PARAM_H 1
4415 # endif
4417 # ifdef _SC_PAGESIZE
4418 # define getpagesize() sysconf(_SC_PAGESIZE)
4419 # else /* no _SC_PAGESIZE */
4420 # ifdef HAVE_SYS_PARAM_H
4421 # include <sys/param.h>
4422 # ifdef EXEC_PAGESIZE
4423 # define getpagesize() EXEC_PAGESIZE
4424 # else /* no EXEC_PAGESIZE */
4425 # ifdef NBPG
4426 # define getpagesize() NBPG * CLSIZE
4427 # ifndef CLSIZE
4428 # define CLSIZE 1
4429 # endif /* no CLSIZE */
4430 # else /* no NBPG */
4431 # ifdef NBPC
4432 # define getpagesize() NBPC
4433 # else /* no NBPC */
4434 # ifdef PAGESIZE
4435 # define getpagesize() PAGESIZE
4436 # endif /* PAGESIZE */
4437 # endif /* no NBPC */
4438 # endif /* no NBPG */
4439 # endif /* no EXEC_PAGESIZE */
4440 # else /* no HAVE_SYS_PARAM_H */
4441 # define getpagesize() 8192 /* punt totally */
4442 # endif /* no HAVE_SYS_PARAM_H */
4443 # endif /* no _SC_PAGESIZE */
4445 #endif /* no HAVE_GETPAGESIZE */
4447 #ifndef MAP_FAILED
4448 # define MAP_FAILED -1
4449 #endif
4451 #undef perror_exit
4452 #define perror_exit(str, val) \
4453 do { perror(str); exit(val); } while (0)
4455 /* Some versions of cygwin mmap require that munmap is called with the
4456 same parameters as mmap. GCC expects that this is not the case.
4457 Test for various forms of this problem. Warning - icky signal games. */
4459 static sigset_t unblock_sigsegv;
4460 static jmp_buf r;
4461 static size_t pg;
4462 static int devzero;
4464 static char *
4465 anonmap (size)
4466 size_t size;
4468 #ifdef USE_MAP_ANON
4469 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4470 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4471 #else
4472 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4473 MAP_PRIVATE, devzero, 0);
4474 #endif
4477 static void
4478 sigsegv (unused)
4479 int unused;
4481 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4482 longjmp (r, 1);
4485 /* Basic functionality test. */
4486 void
4487 test_0 ()
4489 char *x = anonmap (pg);
4490 if (x == (char *) MAP_FAILED)
4491 perror_exit("test 0 mmap", 2);
4493 *(int *)x += 1;
4495 if (munmap(x, pg) < 0)
4496 perror_exit("test 0 munmap", 3);
4499 /* 1. If we map a 2-page region and unmap its second page, the first page
4500 must remain. */
4501 static void
4502 test_1 ()
4504 char *x = anonmap (pg * 2);
4505 if (x == (char *)MAP_FAILED)
4506 perror_exit ("test 1 mmap", 4);
4508 signal (SIGSEGV, sigsegv);
4509 if (setjmp (r))
4510 perror_exit ("test 1 fault", 5);
4512 x[0] = 1;
4513 x[pg] = 1;
4515 if (munmap (x + pg, pg) < 0)
4516 perror_exit ("test 1 munmap 1", 6);
4517 x[0] = 2;
4519 if (setjmp (r) == 0)
4521 x[pg] = 1;
4522 perror_exit ("test 1 no fault", 7);
4524 if (munmap (x, pg) < 0)
4525 perror_exit ("test 1 munmap 2", 8);
4528 /* 2. If we map a 2-page region and unmap its first page, the second
4529 page must remain. */
4530 static void
4531 test_2 ()
4533 char *x = anonmap (pg * 2);
4534 if (x == (char *)MAP_FAILED)
4535 perror_exit ("test 2 mmap", 9);
4537 signal (SIGSEGV, sigsegv);
4538 if (setjmp (r))
4539 perror_exit ("test 2 fault", 10);
4541 x[0] = 1;
4542 x[pg] = 1;
4544 if (munmap (x, pg) < 0)
4545 perror_exit ("test 2 munmap 1", 11);
4547 x[pg] = 2;
4549 if (setjmp (r) == 0)
4551 x[0] = 1;
4552 perror_exit ("test 2 no fault", 12);
4555 if (munmap (x+pg, pg) < 0)
4556 perror_exit ("test 2 munmap 2", 13);
4559 /* 3. If we map two adjacent 1-page regions and unmap them both with
4560 one munmap, both must go away.
4562 Getting two adjacent 1-page regions with two mmap calls is slightly
4563 tricky. All OS's tested skip over already-allocated blocks; therefore
4564 we have been careful to unmap all allocated regions in previous tests.
4565 HP/UX allocates pages backward in memory. No OS has yet been observed
4566 to be so perverse as to leave unmapped space between consecutive calls
4567 to mmap. */
4569 static void
4570 test_3 ()
4572 char *x, *y, *z;
4574 x = anonmap (pg);
4575 if (x == (char *)MAP_FAILED)
4576 perror_exit ("test 3 mmap 1", 14);
4577 y = anonmap (pg);
4578 if (y == (char *)MAP_FAILED)
4579 perror_exit ("test 3 mmap 2", 15);
4581 if (y != x + pg)
4583 if (y == x - pg)
4584 z = y, y = x, x = z;
4585 else
4587 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4588 (unsigned long)x, (unsigned long)y);
4589 exit (16);
4593 signal (SIGSEGV, sigsegv);
4594 if (setjmp (r))
4595 perror_exit ("test 3 fault", 17);
4597 x[0] = 1;
4598 y[0] = 1;
4600 if (munmap (x, pg*2) < 0)
4601 perror_exit ("test 3 munmap", 18);
4603 if (setjmp (r) == 0)
4605 x[0] = 1;
4606 perror_exit ("test 3 no fault 1", 19);
4609 signal (SIGSEGV, sigsegv);
4610 if (setjmp (r) == 0)
4612 y[0] = 1;
4613 perror_exit ("test 3 no fault 2", 20);
4618 main ()
4620 sigemptyset (&unblock_sigsegv);
4621 sigaddset (&unblock_sigsegv, SIGSEGV);
4622 pg = getpagesize ();
4623 #ifndef USE_MAP_ANON
4624 devzero = open ("/dev/zero", O_RDWR);
4625 if (devzero < 0)
4626 perror_exit ("open /dev/zero", 1);
4627 #endif
4629 test_0();
4630 test_1();
4631 test_2();
4632 test_3();
4634 exit(0);
4638 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4639 echo "configure:4640: checking for working mmap from /dev/zero" >&5
4640 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4641 echo $ac_n "(cached) $ac_c" 1>&6
4642 else
4643 if test "$cross_compiling" = yes; then
4644 # When cross-building, assume that this works, unless we know it
4645 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4646 # on the host, let alone whether mmap will work on it.
4647 case "$host_os" in
4648 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4649 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4650 * ) ac_cv_func_mmap_dev_zero=yes ;;
4651 esac
4652 else
4653 cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 #include "ct-mmap.inc"
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4659 then
4660 ac_cv_func_mmap_dev_zero=yes
4661 else
4662 echo "configure: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4664 rm -fr conftest*
4665 if test $? -lt 4
4666 then ac_cv_func_mmap_dev_zero=no
4667 else ac_cv_func_mmap_dev_zero=buggy
4670 rm -fr conftest*
4676 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4677 if test $ac_cv_func_mmap_dev_zero = yes; then
4678 cat >> confdefs.h <<\EOF
4679 #define HAVE_MMAP_DEV_ZERO 1
4684 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4685 echo "configure:4686: checking for working mmap with MAP_ANON(YMOUS)" >&5
4686 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4687 echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689 if test "$cross_compiling" = yes; then
4690 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4691 # just because it's there. Some SCO Un*xen define it but don't implement it.
4692 case "$host_os" in
4693 darwin* ) ac_cv_func_mmap_anon=yes ;;
4694 * ) ac_cv_func_mmap_anon=no ;;
4695 esac
4696 else
4697 cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #define USE_MAP_ANON
4701 #include "ct-mmap.inc"
4703 if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4704 then
4705 ac_cv_func_mmap_anon=yes
4706 else
4707 echo "configure: failed program was:" >&5
4708 cat conftest.$ac_ext >&5
4709 rm -fr conftest*
4710 if test $? -lt 4
4711 then ac_cv_func_mmap_anon=no
4712 else ac_cv_func_mmap_anon=buggy
4715 rm -fr conftest*
4721 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4722 if test $ac_cv_func_mmap_anon = yes; then
4723 cat >> confdefs.h <<\EOF
4724 #define HAVE_MMAP_ANON 1
4728 rm -f ct-mmap.inc
4730 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4731 echo "configure:4732: checking for working mmap of a file" >&5
4732 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4733 echo $ac_n "(cached) $ac_c" 1>&6
4734 else
4735 # Create a file one thousand bytes long.
4736 for i in 1 2 3 4 5 6 7 8 9 0
4737 do for j in 1 2 3 4 5 6 7 8 9 0
4738 do echo $i $j xxxxx
4739 done
4740 done > conftestdata$$
4742 if test "$cross_compiling" = yes; then
4743 case "$host_os" in
4744 darwin* ) ac_cv_func_mmap_file=yes ;;
4745 * ) ac_cv_func_mmap_file=no ;;
4746 esac
4747 else
4748 cat > conftest.$ac_ext <<EOF
4749 #line 4750 "configure"
4750 #include "confdefs.h"
4752 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4753 Richard Henderson and Alexandre Oliva.
4754 Check whether read-only mmap of a plain file works. */
4755 #include <sys/types.h>
4756 #include <sys/stat.h>
4757 #include <fcntl.h>
4758 #include <sys/mman.h>
4760 int main()
4762 char *x;
4763 int fd;
4764 struct stat st;
4766 fd = open("conftestdata$$", O_RDONLY);
4767 if (fd < 0)
4768 exit(1);
4770 if (fstat (fd, &st))
4771 exit(2);
4773 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4774 if (x == (char *) -1)
4775 exit(3);
4777 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4778 exit(4);
4780 if (munmap(x, st.st_size) < 0)
4781 exit(5);
4783 exit(0);
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4787 then
4788 ac_cv_func_mmap_file=yes
4789 else
4790 echo "configure: failed program was:" >&5
4791 cat conftest.$ac_ext >&5
4792 rm -fr conftest*
4793 ac_cv_func_mmap_file=no
4795 rm -fr conftest*
4800 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4801 if test $ac_cv_func_mmap_file = yes; then
4802 cat >> confdefs.h <<\EOF
4803 #define HAVE_MMAP_FILE 1
4811 am_cv_lib_iconv_ldpath=
4812 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4813 if test "${with_libiconv_prefix+set}" = set; then
4814 withval="$with_libiconv_prefix"
4816 for dir in `echo "$withval" | tr : ' '`; do
4817 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4818 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4819 done
4824 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4825 echo "configure:4826: checking for iconv" >&5
4826 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4827 echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4830 am_cv_func_iconv="no, consider installing GNU libiconv"
4831 am_cv_lib_iconv=no
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 #include <stdlib.h>
4836 #include <iconv.h>
4837 int main() {
4838 iconv_t cd = iconv_open("","");
4839 iconv(cd,NULL,NULL,NULL,NULL);
4840 iconv_close(cd);
4841 ; return 0; }
4843 if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4844 rm -rf conftest*
4845 am_cv_func_iconv=yes
4846 else
4847 echo "configure: failed program was:" >&5
4848 cat conftest.$ac_ext >&5
4850 rm -f conftest*
4851 if test "$am_cv_func_iconv" != yes; then
4852 am_save_LIBS="$LIBS"
4853 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 #include <stdlib.h>
4858 #include <iconv.h>
4859 int main() {
4860 iconv_t cd = iconv_open("","");
4861 iconv(cd,NULL,NULL,NULL,NULL);
4862 iconv_close(cd);
4863 ; return 0; }
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866 rm -rf conftest*
4867 am_cv_lib_iconv=yes
4868 am_cv_func_iconv=yes
4869 else
4870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
4873 rm -f conftest*
4874 LIBS="$am_save_LIBS"
4879 echo "$ac_t""$am_cv_func_iconv" 1>&6
4880 if test "$am_cv_func_iconv" = yes; then
4881 cat >> confdefs.h <<\EOF
4882 #define HAVE_ICONV 1
4885 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4886 echo "configure:4887: checking for iconv declaration" >&5
4887 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4888 echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4891 cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4895 #include <stdlib.h>
4896 #include <iconv.h>
4897 extern
4898 #ifdef __cplusplus
4900 #endif
4901 #if defined(__STDC__) || defined(__cplusplus)
4902 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4903 #else
4904 size_t iconv();
4905 #endif
4907 int main() {
4909 ; return 0; }
4911 if { (eval echo configure:4912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4912 rm -rf conftest*
4913 am_cv_proto_iconv_arg1=""
4914 else
4915 echo "configure: failed program was:" >&5
4916 cat conftest.$ac_ext >&5
4917 rm -rf conftest*
4918 am_cv_proto_iconv_arg1="const"
4920 rm -f conftest*
4921 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);"
4924 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4925 echo "$ac_t""${ac_t:-
4926 }$am_cv_proto_iconv" 1>&6
4927 cat >> confdefs.h <<EOF
4928 #define ICONV_CONST $am_cv_proto_iconv_arg1
4932 LIBICONV=
4933 if test "$am_cv_lib_iconv" = yes; then
4934 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4939 # We will need to find libiberty.h and ansidecl.h
4940 saved_CFLAGS="$CFLAGS"
4941 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4942 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4943 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4944 fprintf_unlocked strstr errno vasprintf \
4945 malloc realloc calloc free basename getopt clock
4947 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4948 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4949 echo "configure:4950: checking whether $ac_func is declared" >&5
4950 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953 cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 #undef $ac_tr_decl
4957 #define $ac_tr_decl 1
4959 #include "ansidecl.h"
4960 #include "system.h"
4962 int main() {
4963 #ifndef $ac_func
4964 char *(*pfn) = (char *(*)) $ac_func ;
4965 #endif
4966 ; return 0; }
4968 if { (eval echo configure:4969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4969 rm -rf conftest*
4970 eval "gcc_cv_have_decl_$ac_func=yes"
4971 else
4972 echo "configure: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 rm -rf conftest*
4975 eval "gcc_cv_have_decl_$ac_func=no"
4977 rm -f conftest*
4980 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4981 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4982 #define $ac_tr_decl 1
4985 else
4986 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4987 #define $ac_tr_decl 0
4992 done
4993 if test x = y ; then
4994 cat >> confdefs.h <<\EOF
4995 #define HAVE_DECL_GETENV 1
4997 cat >> confdefs.h <<\EOF
4998 #define HAVE_DECL_ATOL 1
5000 cat >> confdefs.h <<\EOF
5001 #define HAVE_DECL_SBRK 1
5003 cat >> confdefs.h <<\EOF
5004 #define HAVE_DECL_ABORT 1
5006 cat >> confdefs.h <<\EOF
5007 #define HAVE_DECL_ATOF 1
5009 cat >> confdefs.h <<\EOF
5010 #define HAVE_DECL_GETCWD 1
5012 cat >> confdefs.h <<\EOF
5013 #define HAVE_DECL_GETWD 1
5016 cat >> confdefs.h <<\EOF
5017 #define HAVE_DECL_STRSIGNAL 1
5019 cat >> confdefs.h <<\EOF
5020 #define HAVE_DECL_PUTC_UNLOCKED 1
5022 cat >> confdefs.h <<\EOF
5023 #define HAVE_DECL_FPUTS_UNLOCKED 1
5025 cat >> confdefs.h <<\EOF
5026 #define HAVE_DECL_FWRITE_UNLOCKED 1
5029 cat >> confdefs.h <<\EOF
5030 #define HAVE_DECL_FPRINTF_UNLOCKED 1
5032 cat >> confdefs.h <<\EOF
5033 #define HAVE_DECL_STRSTR 1
5035 cat >> confdefs.h <<\EOF
5036 #define HAVE_DECL_ERRNO 1
5038 cat >> confdefs.h <<\EOF
5039 #define HAVE_DECL_VASPRINTF 1
5042 cat >> confdefs.h <<\EOF
5043 #define HAVE_DECL_MALLOC 1
5045 cat >> confdefs.h <<\EOF
5046 #define HAVE_DECL_REALLOC 1
5048 cat >> confdefs.h <<\EOF
5049 #define HAVE_DECL_CALLOC 1
5051 cat >> confdefs.h <<\EOF
5052 #define HAVE_DECL_FREE 1
5054 cat >> confdefs.h <<\EOF
5055 #define HAVE_DECL_BASENAME 1
5057 cat >> confdefs.h <<\EOF
5058 #define HAVE_DECL_GETOPT 1
5060 cat >> confdefs.h <<\EOF
5061 #define HAVE_DECL_CLOCK 1
5066 for ac_func in getrlimit setrlimit getrusage
5068 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5069 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5070 echo "configure:5071: checking whether $ac_func is declared" >&5
5071 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5072 echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 #undef $ac_tr_decl
5078 #define $ac_tr_decl 1
5080 #include "ansidecl.h"
5081 #include "system.h"
5082 #ifdef HAVE_SYS_RESOURCE_H
5083 #include <sys/resource.h>
5084 #endif
5087 int main() {
5088 #ifndef $ac_func
5089 char *(*pfn) = (char *(*)) $ac_func ;
5090 #endif
5091 ; return 0; }
5093 if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5094 rm -rf conftest*
5095 eval "gcc_cv_have_decl_$ac_func=yes"
5096 else
5097 echo "configure: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
5099 rm -rf conftest*
5100 eval "gcc_cv_have_decl_$ac_func=no"
5102 rm -f conftest*
5105 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5106 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5107 #define $ac_tr_decl 1
5110 else
5111 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5112 #define $ac_tr_decl 0
5117 done
5118 if test x = y ; then
5119 cat >> confdefs.h <<\EOF
5120 #define HAVE_DECL_GETRLIMIT 1
5122 cat >> confdefs.h <<\EOF
5123 #define HAVE_DECL_SETRLIMIT 1
5125 cat >> confdefs.h <<\EOF
5126 #define HAVE_DECL_GETRUSAGE 1
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5135 #include "ansidecl.h"
5136 #include "system.h"
5137 #ifdef HAVE_SYS_RESOURCE_H
5138 #include <sys/resource.h>
5139 #endif
5141 int main() {
5142 rlim_t l = 0;
5143 ; return 0; }
5145 if { (eval echo configure:5146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5147 else
5148 echo "configure: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 rm -rf conftest*
5151 cat >> confdefs.h <<\EOF
5152 #define rlim_t long
5156 rm -f conftest*
5158 for ac_func in ldgetname
5160 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5161 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5162 echo "configure:5163: checking whether $ac_func is declared" >&5
5163 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5164 echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169 #undef $ac_tr_decl
5170 #define $ac_tr_decl 1
5172 #include "ansidecl.h"
5173 #include "system.h"
5174 #ifdef HAVE_LDFCN_H
5175 #include <ldfcn.h>
5176 #endif
5179 int main() {
5180 #ifndef $ac_func
5181 char *(*pfn) = (char *(*)) $ac_func ;
5182 #endif
5183 ; return 0; }
5185 if { (eval echo configure:5186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5186 rm -rf conftest*
5187 eval "gcc_cv_have_decl_$ac_func=yes"
5188 else
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 rm -rf conftest*
5192 eval "gcc_cv_have_decl_$ac_func=no"
5194 rm -f conftest*
5197 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5198 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5199 #define $ac_tr_decl 1
5202 else
5203 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5204 #define $ac_tr_decl 0
5209 done
5210 if test x = y ; then
5211 cat >> confdefs.h <<\EOF
5212 #define HAVE_DECL_LDGETNAME 1
5217 for ac_func in times
5219 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5220 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5221 echo "configure:5222: checking whether $ac_func is declared" >&5
5222 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5223 echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225 cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228 #undef $ac_tr_decl
5229 #define $ac_tr_decl 1
5231 #include "ansidecl.h"
5232 #include "system.h"
5233 #ifdef HAVE_SYS_TIMES_H
5234 #include <sys/times.h>
5235 #endif
5238 int main() {
5239 #ifndef $ac_func
5240 char *(*pfn) = (char *(*)) $ac_func ;
5241 #endif
5242 ; return 0; }
5244 if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5245 rm -rf conftest*
5246 eval "gcc_cv_have_decl_$ac_func=yes"
5247 else
5248 echo "configure: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 rm -rf conftest*
5251 eval "gcc_cv_have_decl_$ac_func=no"
5253 rm -f conftest*
5256 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5257 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5258 #define $ac_tr_decl 1
5261 else
5262 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5263 #define $ac_tr_decl 0
5268 done
5269 if test x = y ; then
5270 cat >> confdefs.h <<\EOF
5271 #define HAVE_DECL_TIMES 1
5276 # More time-related stuff.
5277 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5278 echo "configure:5279: checking for struct tms" >&5
5279 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5280 echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5283 cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5287 #include "ansidecl.h"
5288 #include "system.h"
5289 #ifdef HAVE_SYS_TIMES_H
5290 #include <sys/times.h>
5291 #endif
5293 int main() {
5294 struct tms tms;
5295 ; return 0; }
5297 if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5298 rm -rf conftest*
5299 ac_cv_struct_tms=yes
5300 else
5301 echo "configure: failed program was:" >&5
5302 cat conftest.$ac_ext >&5
5303 rm -rf conftest*
5304 ac_cv_struct_tms=no
5306 rm -f conftest*
5309 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5310 if test $ac_cv_struct_tms = yes; then
5311 cat >> confdefs.h <<\EOF
5312 #define HAVE_STRUCT_TMS 1
5317 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5318 # revisit after autoconf 2.50.
5319 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5320 echo "configure:5321: checking for clock_t" >&5
5321 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5322 echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5329 #include "ansidecl.h"
5330 #include "system.h"
5332 int main() {
5333 clock_t x;
5334 ; return 0; }
5336 if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5337 rm -rf conftest*
5338 gcc_cv_type_clock_t=yes
5339 else
5340 echo "configure: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 rm -rf conftest*
5343 gcc_cv_type_clock_t=no
5345 rm -f conftest*
5348 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5349 if test $gcc_cv_type_clock_t = yes; then
5350 cat >> confdefs.h <<\EOF
5351 #define HAVE_CLOCK_T 1
5356 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5357 echo "configure:5358: checking for uchar" >&5
5358 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5359 echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361 cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5365 #include "ansidecl.h"
5366 #include "system.h"
5368 int main() {
5369 if ((uchar *)0) return 0;
5370 if (sizeof(uchar)) return 0;
5371 ; return 0; }
5373 if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5374 rm -rf conftest*
5375 ac_cv_type_uchar=yes
5376 else
5377 echo "configure: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
5379 rm -rf conftest*
5380 ac_cv_type_uchar=no
5382 rm -f conftest*
5385 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5386 if test $ac_cv_type_uchar = yes; then
5387 cat >> confdefs.h <<\EOF
5388 #define HAVE_UCHAR 1
5393 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5394 CFLAGS="$saved_CFLAGS"
5396 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5397 if test "${enable_initfini_array+set}" = set; then
5398 enableval="$enable_initfini_array"
5400 else
5402 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5403 echo "configure:5404: checking for .preinit_array/.init_array/.fini_array support" >&5
5404 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5405 echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407 if test "$cross_compiling" = yes; then
5408 gcc_cv_initfini_array=no
5409 else
5410 cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5414 static int x = -1;
5415 int main (void) { return x; }
5416 int foo (void) { x = 0; }
5417 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5419 if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5420 then
5421 gcc_cv_initfini_array=yes
5422 else
5423 echo "configure: failed program was:" >&5
5424 cat conftest.$ac_ext >&5
5425 rm -fr conftest*
5426 gcc_cv_initfini_array=no
5428 rm -fr conftest*
5433 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5434 enable_initfini_array=$gcc_cv_initfini_array
5438 if test $enable_initfini_array = yes; then
5439 cat >> confdefs.h <<\EOF
5440 #define HAVE_INITFINI_ARRAY 1
5445 # mkdir takes a single argument on some systems.
5446 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5447 echo "configure:5448: checking if mkdir takes one argument" >&5
5448 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5449 echo $ac_n "(cached) $ac_c" 1>&6
5450 else
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5455 #include <sys/types.h>
5456 #ifdef HAVE_SYS_STAT_H
5457 # include <sys/stat.h>
5458 #endif
5459 #ifdef HAVE_UNISTD_H
5460 # include <unistd.h>
5461 #endif
5462 #ifdef HAVE_DIRECT_H
5463 # include <direct.h>
5464 #endif
5465 int main() {
5466 mkdir ("foo", 0);
5467 ; return 0; }
5469 if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5470 rm -rf conftest*
5471 gcc_cv_mkdir_takes_one_arg=no
5472 else
5473 echo "configure: failed program was:" >&5
5474 cat conftest.$ac_ext >&5
5475 rm -rf conftest*
5476 gcc_cv_mkdir_takes_one_arg=yes
5478 rm -f conftest*
5481 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5482 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5483 cat >> confdefs.h <<\EOF
5484 #define MKDIR_TAKES_ONE_ARG 1
5490 # File extensions
5491 manext='.1'
5492 objext='.o'
5496 # With Setjmp/Longjmp based exception handling.
5497 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5498 if test "${enable_sjlj_exceptions+set}" = set; then
5499 enableval="$enable_sjlj_exceptions"
5500 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5501 cat >> confdefs.h <<EOF
5502 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5508 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5509 echo "configure:5510: checking for main in -lunwind" >&5
5510 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5511 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5512 echo $ac_n "(cached) $ac_c" 1>&6
5513 else
5514 ac_save_LIBS="$LIBS"
5515 LIBS="-lunwind $LIBS"
5516 cat > conftest.$ac_ext <<EOF
5517 #line 5518 "configure"
5518 #include "confdefs.h"
5520 int main() {
5521 main()
5522 ; return 0; }
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525 rm -rf conftest*
5526 eval "ac_cv_lib_$ac_lib_var=yes"
5527 else
5528 echo "configure: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5530 rm -rf conftest*
5531 eval "ac_cv_lib_$ac_lib_var=no"
5533 rm -f conftest*
5534 LIBS="$ac_save_LIBS"
5537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5538 echo "$ac_t""yes" 1>&6
5539 use_libunwind_default=yes
5540 else
5541 echo "$ac_t""no" 1>&6
5542 use_libunwind_default=no
5545 # Use libunwind based exception handling.
5546 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5547 if test "${enable_libunwind_exceptions+set}" = set; then
5548 enableval="$enable_libunwind_exceptions"
5549 use_libunwind_exceptions=$enableval
5550 else
5551 use_libunwind_exceptions=$use_libunwind_default
5554 if test x"$use_libunwind_exceptions" = xyes; then
5555 cat >> confdefs.h <<\EOF
5556 #define USE_LIBUNWIND_EXCEPTIONS 1
5561 # --------------------------------------------------------
5562 # Build, host, and target specific configuration fragments
5563 # --------------------------------------------------------
5565 target_gtfiles=
5566 build_xm_file=
5567 build_xm_defines=
5568 build_install_headers_dir=install-headers-tar
5569 build_exeext=
5570 host_xm_file=
5571 host_xm_defines=
5572 host_xmake_file=
5573 host_truncate_target=
5574 host_exeext=
5576 # Decode the host machine, then the target machine.
5577 # For the host machine, we save the xm_file variable as host_xm_file;
5578 # then we decode the target machine and forget everything else
5579 # that came from the host machine.
5580 for machine in $build $host $target; do
5581 . ${srcdir}/config.gcc
5582 done
5584 extra_objs="${host_extra_objs} ${extra_objs}"
5586 # Default the target-machine variables that were not explicitly set.
5587 if test x"$tm_file" = x
5588 then tm_file=$cpu_type/$cpu_type.h; fi
5590 if test x"$extra_headers" = x
5591 then extra_headers=; fi
5593 if test x$md_file = x
5594 then md_file=$cpu_type/$cpu_type.md; fi
5596 if test x$out_file = x
5597 then out_file=$cpu_type/$cpu_type.c; fi
5599 if test x"$tmake_file" = x
5600 then tmake_file=$cpu_type/t-$cpu_type
5603 if test x"$dwarf2" = xyes
5604 then tm_file="$tm_file tm-dwarf2.h"
5607 # Say what files are being used for the output code and MD file.
5608 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5609 echo "Using \`$srcdir/config/$md_file' as machine description file."
5611 # If any of the xm_file variables contain nonexistent files, warn
5612 # about them and drop them.
5615 for x in $build_xm_file; do
5616 if test -f $srcdir/config/$x
5617 then bx="$bx $x"
5618 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5620 done
5621 build_xm_file="$bx"
5624 for x in $host_xm_file; do
5625 if test -f $srcdir/config/$x
5626 then hx="$hx $x"
5627 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5629 done
5630 host_xm_file="$hx"
5633 for x in $xm_file; do
5634 if test -f $srcdir/config/$x
5635 then tx="$tx $x"
5636 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5638 done
5639 xm_file="$tx"
5641 count=a
5642 for f in $tm_file; do
5643 count=${count}x
5644 done
5645 if test $count = ax; then
5646 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5647 else
5648 echo "Using the following target machine macro files:"
5649 for f in $tm_file; do
5650 echo " $srcdir/config/$f"
5651 done
5654 if test x$need_64bit_hwint = xyes; then
5655 cat >> confdefs.h <<\EOF
5656 #define NEED_64BIT_HOST_WIDE_INT 1
5661 count=a
5662 for f in $host_xm_file; do
5663 count=${count}x
5664 done
5665 if test $count = a; then
5667 elif test $count = ax; then
5668 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5669 else
5670 echo "Using the following host machine macro files:"
5671 for f in $host_xm_file; do
5672 echo " $srcdir/config/$f"
5673 done
5675 echo "Using ${out_host_hook_obj} for host machine hooks."
5677 if test "$host_xm_file" != "$build_xm_file"; then
5678 count=a
5679 for f in $build_xm_file; do
5680 count=${count}x
5681 done
5682 if test $count = a; then
5684 elif test $count = ax; then
5685 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5686 else
5687 echo "Using the following build machine macro files:"
5688 for f in $build_xm_file; do
5689 echo " $srcdir/config/$f"
5690 done
5694 if test x$thread_file = x; then
5695 if test x$target_thread_file != x; then
5696 thread_file=$target_thread_file
5697 else
5698 thread_file='single'
5702 # Look for a file containing extra machine modes.
5703 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5704 extra_modes_file='$(srcdir)'/config/${extra_modes}
5706 cat >> confdefs.h <<EOF
5707 #define EXTRA_MODES_FILE "$extra_modes"
5710 cat >> confdefs.h <<\EOF
5711 #define EXTRA_CC_MODES 1
5716 # auto-host.h is the file containing items generated by autoconf and is
5717 # the first file included by config.h.
5718 # If host=build, it is correct to have bconfig include auto-host.h
5719 # as well. If host!=build, we are in error and need to do more
5720 # work to find out the build config parameters.
5721 if test x$host = x$build
5722 then
5723 build_auto=auto-host.h
5724 FORBUILD=..
5725 else
5726 # We create a subdir, then run autoconf in the subdir.
5727 # To prevent recursion we set host and build for the new
5728 # invocation of configure to the build for this invocation
5729 # of configure.
5730 tempdir=build.$$
5731 rm -rf $tempdir
5732 mkdir $tempdir
5733 cd $tempdir
5734 case ${srcdir} in
5735 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5736 *) realsrcdir=../${srcdir};;
5737 esac
5738 saved_CFLAGS="${CFLAGS}"
5739 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5740 ${realsrcdir}/configure \
5741 --target=$target_alias --host=$build_alias --build=$build_alias
5742 CFLAGS="${saved_CFLAGS}"
5744 # We just finished tests for the build machine, so rename
5745 # the file auto-build.h in the gcc directory.
5746 mv auto-host.h ../auto-build.h
5747 cd ..
5748 rm -rf $tempdir
5749 build_auto=auto-build.h
5750 FORBUILD=../build-$build_alias
5754 tm_file="${tm_file} defaults.h"
5755 tm_p_file="${tm_p_file} tm-preds.h"
5756 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5757 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5758 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5759 # put this back in temporarily.
5760 xm_file="ansidecl.h ${xm_file}"
5762 # --------
5763 # UNSORTED
5764 # --------
5766 # Truncate the target if necessary
5767 if test x$host_truncate_target != x; then
5768 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5771 # Get the version trigger filename from the toplevel
5772 if test "${with_gcc_version_trigger+set}" = set; then
5773 gcc_version_trigger=$with_gcc_version_trigger
5774 else
5775 gcc_version_trigger=${srcdir}/version.c
5777 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5778 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5780 # Compile in configure arguments.
5781 if test -f configargs.h ; then
5782 # Being re-configured.
5783 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5784 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5785 else
5786 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5788 cat > configargs.h <<EOF
5789 /* Generated automatically. */
5790 static const char configuration_arguments[] = "$gcc_config_arguments";
5791 static const char thread_model[] = "$thread_file";
5794 # Internationalization
5795 PACKAGE=gcc
5796 VERSION="$gcc_version"
5800 # Enable NLS support by default
5801 # Check whether --enable-nls or --disable-nls was given.
5802 if test "${enable_nls+set}" = set; then
5803 enableval="$enable_nls"
5805 else
5806 enable_nls=yes
5810 # if cross compiling, disable NLS support.
5811 # It's not worth the trouble, at least for now.
5813 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5814 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5815 enable_nls=no
5820 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5821 echo "configure:5822: checking for library containing strerror" >&5
5822 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5823 echo $ac_n "(cached) $ac_c" 1>&6
5824 else
5825 ac_func_search_save_LIBS="$LIBS"
5826 ac_cv_search_strerror="no"
5827 cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 /* Override any gcc2 internal prototype to avoid an error. */
5831 /* We use char because int might match the return type of a gcc2
5832 builtin and then its argument prototype would still apply. */
5833 char strerror();
5835 int main() {
5836 strerror()
5837 ; return 0; }
5839 if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5840 rm -rf conftest*
5841 ac_cv_search_strerror="none required"
5842 else
5843 echo "configure: failed program was:" >&5
5844 cat conftest.$ac_ext >&5
5846 rm -f conftest*
5847 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5848 LIBS="-l$i $ac_func_search_save_LIBS"
5849 cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 /* Override any gcc2 internal prototype to avoid an error. */
5853 /* We use char because int might match the return type of a gcc2
5854 builtin and then its argument prototype would still apply. */
5855 char strerror();
5857 int main() {
5858 strerror()
5859 ; return 0; }
5861 if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5862 rm -rf conftest*
5863 ac_cv_search_strerror="-l$i"
5864 break
5865 else
5866 echo "configure: failed program was:" >&5
5867 cat conftest.$ac_ext >&5
5869 rm -f conftest*
5870 done
5871 LIBS="$ac_func_search_save_LIBS"
5874 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5875 if test "$ac_cv_search_strerror" != "no"; then
5876 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5878 else :
5883 echo $ac_n "checking for working const""... $ac_c" 1>&6
5884 echo "configure:5885: checking for working const" >&5
5885 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5886 echo $ac_n "(cached) $ac_c" 1>&6
5887 else
5888 cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5892 int main() {
5894 /* Ultrix mips cc rejects this. */
5895 typedef int charset[2]; const charset x;
5896 /* SunOS 4.1.1 cc rejects this. */
5897 char const *const *ccp;
5898 char **p;
5899 /* NEC SVR4.0.2 mips cc rejects this. */
5900 struct point {int x, y;};
5901 static struct point const zero = {0,0};
5902 /* AIX XL C 1.02.0.0 rejects this.
5903 It does not let you subtract one const X* pointer from another in an arm
5904 of an if-expression whose if-part is not a constant expression */
5905 const char *g = "string";
5906 ccp = &g + (g ? g-g : 0);
5907 /* HPUX 7.0 cc rejects these. */
5908 ++ccp;
5909 p = (char**) ccp;
5910 ccp = (char const *const *) p;
5911 { /* SCO 3.2v4 cc rejects this. */
5912 char *t;
5913 char const *s = 0 ? (char *) 0 : (char const *) 0;
5915 *t++ = 0;
5917 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5918 int x[] = {25, 17};
5919 const int *foo = &x[0];
5920 ++foo;
5922 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5923 typedef const int *iptr;
5924 iptr p = 0;
5925 ++p;
5927 { /* AIX XL C 1.02.0.0 rejects this saying
5928 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5929 struct s { int j; const int *ap[3]; };
5930 struct s *b; b->j = 5;
5932 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5933 const int foo = 10;
5936 ; return 0; }
5938 if { (eval echo configure:5939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5939 rm -rf conftest*
5940 ac_cv_c_const=yes
5941 else
5942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 rm -rf conftest*
5945 ac_cv_c_const=no
5947 rm -f conftest*
5950 echo "$ac_t""$ac_cv_c_const" 1>&6
5951 if test $ac_cv_c_const = no; then
5952 cat >> confdefs.h <<\EOF
5953 #define const
5958 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5959 echo "configure:5960: checking for off_t" >&5
5960 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5961 echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963 cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966 #include <sys/types.h>
5967 #if STDC_HEADERS
5968 #include <stdlib.h>
5969 #include <stddef.h>
5970 #endif
5972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5973 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5974 rm -rf conftest*
5975 ac_cv_type_off_t=yes
5976 else
5977 rm -rf conftest*
5978 ac_cv_type_off_t=no
5980 rm -f conftest*
5983 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5984 if test $ac_cv_type_off_t = no; then
5985 cat >> confdefs.h <<\EOF
5986 #define off_t long
5991 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5992 echo "configure:5993: checking for size_t" >&5
5993 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5994 echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996 cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 #include <sys/types.h>
6000 #if STDC_HEADERS
6001 #include <stdlib.h>
6002 #include <stddef.h>
6003 #endif
6005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6006 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6007 rm -rf conftest*
6008 ac_cv_type_size_t=yes
6009 else
6010 rm -rf conftest*
6011 ac_cv_type_size_t=no
6013 rm -f conftest*
6016 echo "$ac_t""$ac_cv_type_size_t" 1>&6
6017 if test $ac_cv_type_size_t = no; then
6018 cat >> confdefs.h <<\EOF
6019 #define size_t unsigned
6024 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6025 # for constant arguments. Useless!
6026 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6027 echo "configure:6028: checking for working alloca.h" >&5
6028 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6029 echo $ac_n "(cached) $ac_c" 1>&6
6030 else
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 #include <alloca.h>
6035 int main() {
6036 char *p = alloca(2 * sizeof(int));
6037 ; return 0; }
6039 if { (eval echo configure:6040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6040 rm -rf conftest*
6041 ac_cv_header_alloca_h=yes
6042 else
6043 echo "configure: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6045 rm -rf conftest*
6046 ac_cv_header_alloca_h=no
6048 rm -f conftest*
6051 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6052 if test $ac_cv_header_alloca_h = yes; then
6053 cat >> confdefs.h <<\EOF
6054 #define HAVE_ALLOCA_H 1
6059 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6060 echo "configure:6061: checking for alloca" >&5
6061 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6062 echo $ac_n "(cached) $ac_c" 1>&6
6063 else
6064 cat > conftest.$ac_ext <<EOF
6065 #line 6066 "configure"
6066 #include "confdefs.h"
6068 #ifdef __GNUC__
6069 # define alloca __builtin_alloca
6070 #else
6071 # ifdef _MSC_VER
6072 # include <malloc.h>
6073 # define alloca _alloca
6074 # else
6075 # if HAVE_ALLOCA_H
6076 # include <alloca.h>
6077 # else
6078 # ifdef _AIX
6079 #pragma alloca
6080 # else
6081 # ifndef alloca /* predefined by HP cc +Olibcalls */
6082 char *alloca ();
6083 # endif
6084 # endif
6085 # endif
6086 # endif
6087 #endif
6089 int main() {
6090 char *p = (char *) alloca(1);
6091 ; return 0; }
6093 if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6094 rm -rf conftest*
6095 ac_cv_func_alloca_works=yes
6096 else
6097 echo "configure: failed program was:" >&5
6098 cat conftest.$ac_ext >&5
6099 rm -rf conftest*
6100 ac_cv_func_alloca_works=no
6102 rm -f conftest*
6105 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6106 if test $ac_cv_func_alloca_works = yes; then
6107 cat >> confdefs.h <<\EOF
6108 #define HAVE_ALLOCA 1
6113 if test $ac_cv_func_alloca_works = no; then
6114 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6115 # that cause trouble. Some versions do not even contain alloca or
6116 # contain a buggy version. If you still want to use their alloca,
6117 # use ar to extract alloca.o from them instead of compiling alloca.c.
6118 ALLOCA=alloca.${ac_objext}
6119 cat >> confdefs.h <<\EOF
6120 #define C_ALLOCA 1
6124 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6125 echo "configure:6126: checking whether alloca needs Cray hooks" >&5
6126 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6127 echo $ac_n "(cached) $ac_c" 1>&6
6128 else
6129 cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 #if defined(CRAY) && ! defined(CRAY2)
6133 webecray
6134 #else
6135 wenotbecray
6136 #endif
6139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6140 egrep "webecray" >/dev/null 2>&1; then
6141 rm -rf conftest*
6142 ac_cv_os_cray=yes
6143 else
6144 rm -rf conftest*
6145 ac_cv_os_cray=no
6147 rm -f conftest*
6151 echo "$ac_t""$ac_cv_os_cray" 1>&6
6152 if test $ac_cv_os_cray = yes; then
6153 for ac_func in _getb67 GETB67 getb67; do
6154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6155 echo "configure:6156: checking for $ac_func" >&5
6156 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6157 echo $ac_n "(cached) $ac_c" 1>&6
6158 else
6159 cat > conftest.$ac_ext <<EOF
6160 #line 6161 "configure"
6161 #include "confdefs.h"
6162 /* System header to define __stub macros and hopefully few prototypes,
6163 which can conflict with char $ac_func(); below. */
6164 #include <assert.h>
6165 /* Override any gcc2 internal prototype to avoid an error. */
6166 /* We use char because int might match the return type of a gcc2
6167 builtin and then its argument prototype would still apply. */
6168 char $ac_func();
6170 int main() {
6172 /* The GNU C library defines this for functions which it implements
6173 to always fail with ENOSYS. Some functions are actually named
6174 something starting with __ and the normal name is an alias. */
6175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6176 choke me
6177 #else
6178 $ac_func();
6179 #endif
6181 ; return 0; }
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6184 rm -rf conftest*
6185 eval "ac_cv_func_$ac_func=yes"
6186 else
6187 echo "configure: failed program was:" >&5
6188 cat conftest.$ac_ext >&5
6189 rm -rf conftest*
6190 eval "ac_cv_func_$ac_func=no"
6192 rm -f conftest*
6195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6196 echo "$ac_t""yes" 1>&6
6197 cat >> confdefs.h <<EOF
6198 #define CRAY_STACKSEG_END $ac_func
6201 break
6202 else
6203 echo "$ac_t""no" 1>&6
6206 done
6209 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6210 echo "configure:6211: checking stack direction for C alloca" >&5
6211 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6212 echo $ac_n "(cached) $ac_c" 1>&6
6213 else
6214 if test "$cross_compiling" = yes; then
6215 ac_cv_c_stack_direction=0
6216 else
6217 cat > conftest.$ac_ext <<EOF
6218 #line 6219 "configure"
6219 #include "confdefs.h"
6220 find_stack_direction ()
6222 static char *addr = 0;
6223 auto char dummy;
6224 if (addr == 0)
6226 addr = &dummy;
6227 return find_stack_direction ();
6229 else
6230 return (&dummy > addr) ? 1 : -1;
6232 main ()
6234 exit (find_stack_direction() < 0);
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6238 then
6239 ac_cv_c_stack_direction=1
6240 else
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -fr conftest*
6244 ac_cv_c_stack_direction=-1
6246 rm -fr conftest*
6251 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6252 cat >> confdefs.h <<EOF
6253 #define STACK_DIRECTION $ac_cv_c_stack_direction
6259 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6260 echo "configure:6261: checking whether we are using the GNU C Library 2.1 or newer" >&5
6261 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6262 echo $ac_n "(cached) $ac_c" 1>&6
6263 else
6264 cat > conftest.$ac_ext <<EOF
6265 #line 6266 "configure"
6266 #include "confdefs.h"
6268 #include <features.h>
6269 #ifdef __GNU_LIBRARY__
6270 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6271 Lucky GNU user
6272 #endif
6273 #endif
6276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6277 egrep "Lucky GNU user" >/dev/null 2>&1; then
6278 rm -rf conftest*
6279 ac_cv_gnu_library_2_1=yes
6280 else
6281 rm -rf conftest*
6282 ac_cv_gnu_library_2_1=no
6284 rm -f conftest*
6290 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6292 GLIBC21="$ac_cv_gnu_library_2_1"
6296 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6297 stdlib.h string.h unistd.h sys/param.h
6299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_hdr" >&5
6302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6303 echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305 cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 #include <$ac_hdr>
6310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6311 { (eval echo configure:6312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6313 if test -z "$ac_err"; then
6314 rm -rf conftest*
6315 eval "ac_cv_header_$ac_safe=yes"
6316 else
6317 echo "$ac_err" >&5
6318 echo "configure: failed program was:" >&5
6319 cat conftest.$ac_ext >&5
6320 rm -rf conftest*
6321 eval "ac_cv_header_$ac_safe=no"
6323 rm -f conftest*
6325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6326 echo "$ac_t""yes" 1>&6
6327 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6328 cat >> confdefs.h <<EOF
6329 #define $ac_tr_hdr 1
6332 else
6333 echo "$ac_t""no" 1>&6
6335 done
6337 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6338 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6339 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6341 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6342 echo "configure:6343: checking for $ac_func" >&5
6343 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6344 echo $ac_n "(cached) $ac_c" 1>&6
6345 else
6346 cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6349 /* System header to define __stub macros and hopefully few prototypes,
6350 which can conflict with char $ac_func(); below. */
6351 #include <assert.h>
6352 /* Override any gcc2 internal prototype to avoid an error. */
6353 /* We use char because int might match the return type of a gcc2
6354 builtin and then its argument prototype would still apply. */
6355 char $ac_func();
6357 int main() {
6359 /* The GNU C library defines this for functions which it implements
6360 to always fail with ENOSYS. Some functions are actually named
6361 something starting with __ and the normal name is an alias. */
6362 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6363 choke me
6364 #else
6365 $ac_func();
6366 #endif
6368 ; return 0; }
6370 if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6371 rm -rf conftest*
6372 eval "ac_cv_func_$ac_func=yes"
6373 else
6374 echo "configure: failed program was:" >&5
6375 cat conftest.$ac_ext >&5
6376 rm -rf conftest*
6377 eval "ac_cv_func_$ac_func=no"
6379 rm -f conftest*
6382 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6383 echo "$ac_t""yes" 1>&6
6384 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6385 cat >> confdefs.h <<EOF
6386 #define $ac_tr_func 1
6389 else
6390 echo "$ac_t""no" 1>&6
6392 done
6397 am_cv_lib_iconv_ldpath=
6398 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6399 if test "${with_libiconv_prefix+set}" = set; then
6400 withval="$with_libiconv_prefix"
6402 for dir in `echo "$withval" | tr : ' '`; do
6403 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6404 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6405 done
6410 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6411 echo "configure:6412: checking for iconv" >&5
6412 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6413 echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6416 am_cv_func_iconv="no, consider installing GNU libiconv"
6417 am_cv_lib_iconv=no
6418 cat > conftest.$ac_ext <<EOF
6419 #line 6420 "configure"
6420 #include "confdefs.h"
6421 #include <stdlib.h>
6422 #include <iconv.h>
6423 int main() {
6424 iconv_t cd = iconv_open("","");
6425 iconv(cd,NULL,NULL,NULL,NULL);
6426 iconv_close(cd);
6427 ; return 0; }
6429 if { (eval echo configure:6430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6430 rm -rf conftest*
6431 am_cv_func_iconv=yes
6432 else
6433 echo "configure: failed program was:" >&5
6434 cat conftest.$ac_ext >&5
6436 rm -f conftest*
6437 if test "$am_cv_func_iconv" != yes; then
6438 am_save_LIBS="$LIBS"
6439 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6440 cat > conftest.$ac_ext <<EOF
6441 #line 6442 "configure"
6442 #include "confdefs.h"
6443 #include <stdlib.h>
6444 #include <iconv.h>
6445 int main() {
6446 iconv_t cd = iconv_open("","");
6447 iconv(cd,NULL,NULL,NULL,NULL);
6448 iconv_close(cd);
6449 ; return 0; }
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452 rm -rf conftest*
6453 am_cv_lib_iconv=yes
6454 am_cv_func_iconv=yes
6455 else
6456 echo "configure: failed program was:" >&5
6457 cat conftest.$ac_ext >&5
6459 rm -f conftest*
6460 LIBS="$am_save_LIBS"
6465 echo "$ac_t""$am_cv_func_iconv" 1>&6
6466 if test "$am_cv_func_iconv" = yes; then
6467 cat >> confdefs.h <<\EOF
6468 #define HAVE_ICONV 1
6471 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6472 echo "configure:6473: checking for iconv declaration" >&5
6473 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6474 echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6477 cat > conftest.$ac_ext <<EOF
6478 #line 6479 "configure"
6479 #include "confdefs.h"
6481 #include <stdlib.h>
6482 #include <iconv.h>
6483 extern
6484 #ifdef __cplusplus
6486 #endif
6487 #if defined(__STDC__) || defined(__cplusplus)
6488 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6489 #else
6490 size_t iconv();
6491 #endif
6493 int main() {
6495 ; return 0; }
6497 if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6498 rm -rf conftest*
6499 am_cv_proto_iconv_arg1=""
6500 else
6501 echo "configure: failed program was:" >&5
6502 cat conftest.$ac_ext >&5
6503 rm -rf conftest*
6504 am_cv_proto_iconv_arg1="const"
6506 rm -f conftest*
6507 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);"
6510 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6511 echo "$ac_t""${ac_t:-
6512 }$am_cv_proto_iconv" 1>&6
6513 cat >> confdefs.h <<EOF
6514 #define ICONV_CONST $am_cv_proto_iconv_arg1
6518 LIBICONV=
6519 if test "$am_cv_lib_iconv" = yes; then
6520 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6525 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6526 echo "configure:6527: checking for nl_langinfo and CODESET" >&5
6527 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6528 echo $ac_n "(cached) $ac_c" 1>&6
6529 else
6530 cat > conftest.$ac_ext <<EOF
6531 #line 6532 "configure"
6532 #include "confdefs.h"
6533 #include <langinfo.h>
6534 int main() {
6535 char* cs = nl_langinfo(CODESET);
6536 ; return 0; }
6538 if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6539 rm -rf conftest*
6540 am_cv_langinfo_codeset=yes
6541 else
6542 echo "configure: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6544 rm -rf conftest*
6545 am_cv_langinfo_codeset=no
6547 rm -f conftest*
6551 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6552 if test $am_cv_langinfo_codeset = yes; then
6553 cat >> confdefs.h <<\EOF
6554 #define HAVE_LANGINFO_CODESET 1
6559 if test $ac_cv_header_locale_h = yes; then
6560 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6561 echo "configure:6562: checking for LC_MESSAGES" >&5
6562 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6563 echo $ac_n "(cached) $ac_c" 1>&6
6564 else
6565 cat > conftest.$ac_ext <<EOF
6566 #line 6567 "configure"
6567 #include "confdefs.h"
6568 #include <locale.h>
6569 int main() {
6570 return LC_MESSAGES
6571 ; return 0; }
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574 rm -rf conftest*
6575 am_cv_val_LC_MESSAGES=yes
6576 else
6577 echo "configure: failed program was:" >&5
6578 cat conftest.$ac_ext >&5
6579 rm -rf conftest*
6580 am_cv_val_LC_MESSAGES=no
6582 rm -f conftest*
6585 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6586 if test $am_cv_val_LC_MESSAGES = yes; then
6587 cat >> confdefs.h <<\EOF
6588 #define HAVE_LC_MESSAGES 1
6593 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6594 echo "configure:6595: checking whether NLS is requested" >&5
6595 # Check whether --enable-nls or --disable-nls was given.
6596 if test "${enable_nls+set}" = set; then
6597 enableval="$enable_nls"
6598 USE_NLS=$enableval
6599 else
6600 USE_NLS=yes
6603 echo "$ac_t""$USE_NLS" 1>&6
6606 BUILD_INCLUDED_LIBINTL=no
6607 USE_INCLUDED_LIBINTL=no
6608 INTLLIBS=
6609 INTLDEPS=
6611 if test "$USE_NLS" = "yes"; then
6612 cat >> confdefs.h <<\EOF
6613 #define ENABLE_NLS 1
6616 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6617 echo "configure:6618: checking whether included gettext is requested" >&5
6618 # Check whether --with-included-gettext or --without-included-gettext was given.
6619 if test "${with_included_gettext+set}" = set; then
6620 withval="$with_included_gettext"
6621 nls_cv_force_use_gnu_gettext=$withval
6622 else
6623 nls_cv_force_use_gnu_gettext=no
6626 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6628 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6629 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6630 CATOBJEXT=NONE
6635 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6636 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6637 echo "configure:6638: checking for libintl.h" >&5
6638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6639 echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641 cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644 #include <libintl.h>
6646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6647 { (eval echo configure:6648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6649 if test -z "$ac_err"; then
6650 rm -rf conftest*
6651 eval "ac_cv_header_$ac_safe=yes"
6652 else
6653 echo "$ac_err" >&5
6654 echo "configure: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6656 rm -rf conftest*
6657 eval "ac_cv_header_$ac_safe=no"
6659 rm -f conftest*
6661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6662 echo "$ac_t""yes" 1>&6
6663 cat >> confdefs.h <<\EOF
6664 #define HAVE_LIBINTL_H 1
6667 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6668 echo "configure:6669: checking for GNU gettext in libc" >&5
6669 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6670 echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 #include <libintl.h>
6676 extern int _nl_msg_cat_cntr;
6677 int main() {
6678 bindtextdomain ("", "");
6679 return (int) gettext ("") + _nl_msg_cat_cntr
6680 ; return 0; }
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683 rm -rf conftest*
6684 gt_cv_func_gnugettext1_libc=yes
6685 else
6686 echo "configure: failed program was:" >&5
6687 cat conftest.$ac_ext >&5
6688 rm -rf conftest*
6689 gt_cv_func_gnugettext1_libc=no
6691 rm -f conftest*
6694 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6696 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6697 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6698 echo "configure:6699: checking for GNU gettext in libintl" >&5
6699 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6700 echo $ac_n "(cached) $ac_c" 1>&6
6701 else
6702 gt_save_LIBS="$LIBS"
6703 LIBS="$LIBS -lintl $LIBICONV"
6704 cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 #include <libintl.h>
6708 extern int _nl_msg_cat_cntr;
6709 int main() {
6710 bindtextdomain ("", "");
6711 return (int) gettext ("") + _nl_msg_cat_cntr
6712 ; return 0; }
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715 rm -rf conftest*
6716 gt_cv_func_gnugettext1_libintl=yes
6717 else
6718 echo "configure: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6720 rm -rf conftest*
6721 gt_cv_func_gnugettext1_libintl=no
6723 rm -f conftest*
6724 LIBS="$gt_save_LIBS"
6727 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6730 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6731 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6732 && test "$PACKAGE" != gettext; }; then
6733 cat >> confdefs.h <<\EOF
6734 #define HAVE_GETTEXT 1
6738 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6739 INTLLIBS="-lintl $LIBICONV"
6742 gt_save_LIBS="$LIBS"
6743 LIBS="$LIBS $INTLLIBS"
6744 for ac_func in dcgettext
6746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6747 echo "configure:6748: checking for $ac_func" >&5
6748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6749 echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751 cat > conftest.$ac_ext <<EOF
6752 #line 6753 "configure"
6753 #include "confdefs.h"
6754 /* System header to define __stub macros and hopefully few prototypes,
6755 which can conflict with char $ac_func(); below. */
6756 #include <assert.h>
6757 /* Override any gcc2 internal prototype to avoid an error. */
6758 /* We use char because int might match the return type of a gcc2
6759 builtin and then its argument prototype would still apply. */
6760 char $ac_func();
6762 int main() {
6764 /* The GNU C library defines this for functions which it implements
6765 to always fail with ENOSYS. Some functions are actually named
6766 something starting with __ and the normal name is an alias. */
6767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6768 choke me
6769 #else
6770 $ac_func();
6771 #endif
6773 ; return 0; }
6775 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6776 rm -rf conftest*
6777 eval "ac_cv_func_$ac_func=yes"
6778 else
6779 echo "configure: failed program was:" >&5
6780 cat conftest.$ac_ext >&5
6781 rm -rf conftest*
6782 eval "ac_cv_func_$ac_func=no"
6784 rm -f conftest*
6787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6788 echo "$ac_t""yes" 1>&6
6789 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6790 cat >> confdefs.h <<EOF
6791 #define $ac_tr_func 1
6794 else
6795 echo "$ac_t""no" 1>&6
6797 done
6799 LIBS="$gt_save_LIBS"
6801 # Extract the first word of "msgfmt", so it can be a program name with args.
6802 set dummy msgfmt; ac_word=$2
6803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6804 echo "configure:6805: checking for $ac_word" >&5
6805 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6806 echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808 case "$MSGFMT" in
6810 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6813 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6814 for ac_dir in $PATH; do
6815 test -z "$ac_dir" && ac_dir=.
6816 if test -f $ac_dir/$ac_word; then
6817 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6818 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6819 break
6822 done
6823 IFS="$ac_save_ifs"
6824 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6826 esac
6828 MSGFMT="$ac_cv_path_MSGFMT"
6829 if test "$MSGFMT" != ":"; then
6830 echo "$ac_t""$MSGFMT" 1>&6
6831 else
6832 echo "$ac_t""no" 1>&6
6835 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6836 set dummy gmsgfmt; ac_word=$2
6837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6838 echo "configure:6839: checking for $ac_word" >&5
6839 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6840 echo $ac_n "(cached) $ac_c" 1>&6
6841 else
6842 case "$GMSGFMT" in
6844 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6846 ?:/*)
6847 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6851 ac_dummy="$PATH"
6852 for ac_dir in $ac_dummy; do
6853 test -z "$ac_dir" && ac_dir=.
6854 if test -f $ac_dir/$ac_word; then
6855 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6856 break
6858 done
6859 IFS="$ac_save_ifs"
6860 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6862 esac
6864 GMSGFMT="$ac_cv_path_GMSGFMT"
6865 if test -n "$GMSGFMT"; then
6866 echo "$ac_t""$GMSGFMT" 1>&6
6867 else
6868 echo "$ac_t""no" 1>&6
6872 # Extract the first word of "xgettext", so it can be a program name with args.
6873 set dummy xgettext; ac_word=$2
6874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6875 echo "configure:6876: checking for $ac_word" >&5
6876 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6877 echo $ac_n "(cached) $ac_c" 1>&6
6878 else
6879 case "$XGETTEXT" in
6881 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6885 for ac_dir in $PATH; do
6886 test -z "$ac_dir" && ac_dir=.
6887 if test -f $ac_dir/$ac_word; then
6888 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6889 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6890 break
6893 done
6894 IFS="$ac_save_ifs"
6895 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6897 esac
6899 XGETTEXT="$ac_cv_path_XGETTEXT"
6900 if test "$XGETTEXT" != ":"; then
6901 echo "$ac_t""$XGETTEXT" 1>&6
6902 else
6903 echo "$ac_t""no" 1>&6
6907 CATOBJEXT=.gmo
6910 else
6911 echo "$ac_t""no" 1>&6
6915 if test "$CATOBJEXT" = "NONE"; then
6916 nls_cv_use_gnu_gettext=yes
6920 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6921 INTLOBJS="\$(GETTOBJS)"
6922 # Extract the first word of "msgfmt", so it can be a program name with args.
6923 set dummy msgfmt; ac_word=$2
6924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6925 echo "configure:6926: checking for $ac_word" >&5
6926 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6927 echo $ac_n "(cached) $ac_c" 1>&6
6928 else
6929 case "$MSGFMT" in
6931 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6935 for ac_dir in $PATH; do
6936 test -z "$ac_dir" && ac_dir=.
6937 if test -f $ac_dir/$ac_word; then
6938 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6939 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6940 break
6943 done
6944 IFS="$ac_save_ifs"
6945 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6947 esac
6949 MSGFMT="$ac_cv_path_MSGFMT"
6950 if test "$MSGFMT" != ":"; then
6951 echo "$ac_t""$MSGFMT" 1>&6
6952 else
6953 echo "$ac_t""no" 1>&6
6956 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6957 set dummy gmsgfmt; ac_word=$2
6958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6959 echo "configure:6960: checking for $ac_word" >&5
6960 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6961 echo $ac_n "(cached) $ac_c" 1>&6
6962 else
6963 case "$GMSGFMT" in
6965 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6967 ?:/*)
6968 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6972 ac_dummy="$PATH"
6973 for ac_dir in $ac_dummy; do
6974 test -z "$ac_dir" && ac_dir=.
6975 if test -f $ac_dir/$ac_word; then
6976 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6977 break
6979 done
6980 IFS="$ac_save_ifs"
6981 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6983 esac
6985 GMSGFMT="$ac_cv_path_GMSGFMT"
6986 if test -n "$GMSGFMT"; then
6987 echo "$ac_t""$GMSGFMT" 1>&6
6988 else
6989 echo "$ac_t""no" 1>&6
6992 # Extract the first word of "xgettext", so it can be a program name with args.
6993 set dummy xgettext; ac_word=$2
6994 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6995 echo "configure:6996: checking for $ac_word" >&5
6996 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6997 echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999 case "$XGETTEXT" in
7001 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7004 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7005 for ac_dir in $PATH; do
7006 test -z "$ac_dir" && ac_dir=.
7007 if test -f $ac_dir/$ac_word; then
7008 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7009 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7010 break
7013 done
7014 IFS="$ac_save_ifs"
7015 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7017 esac
7019 XGETTEXT="$ac_cv_path_XGETTEXT"
7020 if test "$XGETTEXT" != ":"; then
7021 echo "$ac_t""$XGETTEXT" 1>&6
7022 else
7023 echo "$ac_t""no" 1>&6
7027 BUILD_INCLUDED_LIBINTL=yes
7028 USE_INCLUDED_LIBINTL=yes
7029 CATOBJEXT=.gmo
7030 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
7031 INTLDEPS="\$(top_builddir)/intl/libintl.a"
7032 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7035 if test "$GMSGFMT" != ":"; then
7036 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7038 else
7039 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
7040 GMSGFMT=":"
7044 if test "$XGETTEXT" != ":"; then
7045 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7047 else
7048 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
7049 XGETTEXT=":"
7053 POSUB=po
7058 if test "$PACKAGE" = gettext; then
7059 BUILD_INCLUDED_LIBINTL=yes
7062 for ac_prog in bison
7064 # Extract the first word of "$ac_prog", so it can be a program name with args.
7065 set dummy $ac_prog; ac_word=$2
7066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7067 echo "configure:7068: checking for $ac_word" >&5
7068 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
7069 echo $ac_n "(cached) $ac_c" 1>&6
7070 else
7071 if test -n "$INTLBISON"; then
7072 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7073 else
7074 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7075 ac_dummy="$PATH"
7076 for ac_dir in $ac_dummy; do
7077 test -z "$ac_dir" && ac_dir=.
7078 if test -f $ac_dir/$ac_word; then
7079 ac_cv_prog_INTLBISON="$ac_prog"
7080 break
7082 done
7083 IFS="$ac_save_ifs"
7086 INTLBISON="$ac_cv_prog_INTLBISON"
7087 if test -n "$INTLBISON"; then
7088 echo "$ac_t""$INTLBISON" 1>&6
7089 else
7090 echo "$ac_t""no" 1>&6
7093 test -n "$INTLBISON" && break
7094 done
7096 if test -z "$INTLBISON"; then
7097 ac_verc_fail=yes
7098 else
7099 echo $ac_n "checking version of bison""... $ac_c" 1>&6
7100 echo "configure:7101: checking version of bison" >&5
7101 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7102 case $ac_prog_version in
7103 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7104 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7105 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7106 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7107 esac
7108 echo "$ac_t""$ac_prog_version" 1>&6
7110 if test $ac_verc_fail = yes; then
7111 INTLBISON=:
7123 if test $USE_INCLUDED_LIBINTL = yes; then
7124 cat >> confdefs.h <<\EOF
7125 #define USE_INCLUDED_LIBINTL 1
7130 nls_cv_header_intl=
7131 nls_cv_header_libgt=
7133 DATADIRNAME=share
7136 INSTOBJEXT=.mo
7139 GENCAT=gencat
7143 if test "x$CATOBJEXT" != x; then
7144 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
7145 echo "configure:7146: checking for catalogs to be installed" >&5
7146 # Look for .po and .gmo files in the source directory.
7147 CATALOGS=
7148 XLINGUAS=
7149 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
7150 # If there aren't any .gmo files the shell will give us the
7151 # literal string "../path/to/srcdir/po/*.gmo" which has to be
7152 # weeded out.
7153 case "$cat" in *\**)
7154 continue;;
7155 esac
7156 # The quadruple backslash is collapsed to a double backslash
7157 # by the backticks, then collapsed again by the double quotes,
7158 # leaving us with one backslash in the sed expression (right
7159 # before the dot that mustn't act as a wildcard). The dot to
7160 # be escaped in the second expression is hiding inside CATOBJEXT.
7161 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
7162 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
7163 # The user is allowed to set LINGUAS to a list of languages to
7164 # install catalogs for. If it's empty that means "all of them."
7165 if test "x$LINGUAS" = x; then
7166 CATALOGS="$CATALOGS $cat"
7167 XLINGUAS="$XLINGUAS $lang"
7168 else
7169 case "$LINGUAS" in *$lang*)
7170 CATALOGS="$CATALOGS $cat"
7171 XLINGUAS="$XLINGUAS $lang"
7173 esac
7175 done
7176 LINGUAS="$XLINGUAS"
7177 echo "$ac_t""$LINGUAS" 1>&6
7180 MKINSTALLDIRS=
7181 if test -n "$ac_aux_dir"; then
7182 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7184 if test -z "$MKINSTALLDIRS"; then
7185 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7189 INTL_LIBTOOL_SUFFIX_PREFIX=
7193 # Windows32 Registry support for specifying GCC installation paths.
7194 # Check whether --enable-win32-registry or --disable-win32-registry was given.
7195 if test "${enable_win32_registry+set}" = set; then
7196 enableval="$enable_win32_registry"
7200 case $host_os in
7201 win32 | pe | cygwin* | mingw32* | uwin*)
7202 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
7203 echo "configure:7204: checking whether windows registry support is requested" >&5
7204 if test "x$enable_win32_registry" != xno; then
7205 cat >> confdefs.h <<\EOF
7206 #define ENABLE_WIN32_REGISTRY 1
7209 echo "$ac_t""yes" 1>&6
7211 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7212 echo "configure:7213: checking for library containing RegOpenKeyExA" >&5
7213 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7214 echo $ac_n "(cached) $ac_c" 1>&6
7215 else
7216 ac_func_search_save_LIBS="$LIBS"
7217 ac_cv_search_RegOpenKeyExA="no"
7218 cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221 /* Override any gcc2 internal prototype to avoid an error. */
7222 /* We use char because int might match the return type of a gcc2
7223 builtin and then its argument prototype would still apply. */
7224 char RegOpenKeyExA();
7226 int main() {
7227 RegOpenKeyExA()
7228 ; return 0; }
7230 if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7231 rm -rf conftest*
7232 ac_cv_search_RegOpenKeyExA="none required"
7233 else
7234 echo "configure: failed program was:" >&5
7235 cat conftest.$ac_ext >&5
7237 rm -f conftest*
7238 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7239 LIBS="-l$i $ac_func_search_save_LIBS"
7240 cat > conftest.$ac_ext <<EOF
7241 #line 7242 "configure"
7242 #include "confdefs.h"
7243 /* Override any gcc2 internal prototype to avoid an error. */
7244 /* We use char because int might match the return type of a gcc2
7245 builtin and then its argument prototype would still apply. */
7246 char RegOpenKeyExA();
7248 int main() {
7249 RegOpenKeyExA()
7250 ; return 0; }
7252 if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7253 rm -rf conftest*
7254 ac_cv_search_RegOpenKeyExA="-l$i"
7255 break
7256 else
7257 echo "configure: failed program was:" >&5
7258 cat conftest.$ac_ext >&5
7260 rm -f conftest*
7261 done
7262 LIBS="$ac_func_search_save_LIBS"
7265 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7266 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7267 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7269 else :
7272 else
7273 echo "$ac_t""no" 1>&6
7276 # Check if user specified a different registry key.
7277 case "x${enable_win32_registry}" in
7278 x | xyes)
7279 # default.
7280 gcc_cv_win32_registry_key="$VERSION"
7282 xno)
7283 # no registry lookup.
7284 gcc_cv_win32_registry_key=''
7287 # user-specified key.
7288 gcc_cv_win32_registry_key="$enable_win32_registry"
7290 esac
7292 if test "x$enable_win32_registry" != xno; then
7293 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7294 echo "configure:7295: checking registry key on windows hosts" >&5
7295 cat >> confdefs.h <<EOF
7296 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7299 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7302 esac
7304 # Get an absolute path to the GCC top-level source directory
7305 holddir=`${PWDCMD-pwd}`
7306 cd $srcdir
7307 topdir=`${PWDCMD-pwd}`
7308 cd $holddir
7310 # Conditionalize the makefile for this host machine.
7311 # Make-host contains the concatenation of all host makefile fragments
7312 # [there can be more than one]. This file is built by configure.frag.
7313 host_overrides=Make-host
7314 dep_host_xmake_file=
7315 for f in .. ${host_xmake_file}
7317 if test -f ${srcdir}/config/$f
7318 then
7319 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7321 done
7323 # Conditionalize the makefile for this target machine.
7324 # Make-target contains the concatenation of all host makefile fragments
7325 # [there can be more than one]. This file is built by configure.frag.
7326 target_overrides=Make-target
7327 dep_tmake_file=
7328 for f in .. ${tmake_file}
7330 if test -f ${srcdir}/config/$f
7331 then
7332 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7334 done
7336 symbolic_link='ln -s'
7338 # If the host doesn't support symlinks, modify CC in
7339 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7340 # Otherwise, we can use "CC=$(CC)".
7341 rm -f symtest.tem
7342 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7343 then
7344 cc_set_by_configure="\$(CC)"
7345 quoted_cc_set_by_configure="\$(CC)"
7346 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7347 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7348 else
7349 rm -f symtest.tem
7350 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7351 then
7352 symbolic_link="cp -p"
7353 else
7354 symbolic_link="cp"
7356 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7357 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7358 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7359 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7361 rm -f symtest.tem
7363 out_object_file=`basename $out_file .c`.o
7365 tm_file_list=
7366 for f in $tm_file; do
7367 case $f in
7368 ansidecl.h )
7369 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7370 defaults.h )
7371 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7372 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7373 esac
7374 done
7376 tm_p_file_list=
7377 for f in $tm_p_file; do
7378 case $f in
7379 tm-preds.h )
7380 tm_p_file_list="${tm_p_file_list} $f" ;;
7381 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7382 esac
7383 done
7385 host_xm_file_list=
7386 for f in $host_xm_file; do
7387 case $f in
7388 ansidecl.h )
7389 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7390 auto-host.h )
7391 host_xm_file_list="${host_xm_file_list} $f" ;;
7392 defaults.h )
7393 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7394 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7395 esac
7396 done
7398 build_xm_file_list=
7399 for f in $build_xm_file; do
7400 case $f in
7401 ansidecl.h )
7402 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7403 auto-build.h | auto-host.h )
7404 build_xm_file_list="${build_xm_file_list} $f" ;;
7405 defaults.h )
7406 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7407 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7408 esac
7409 done
7411 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7412 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7413 CROSS=
7414 ALL=all.internal
7415 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7416 if test x$host != x$target
7417 then
7418 CROSS="-DCROSS_COMPILE"
7419 ALL=all.cross
7420 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7421 case "$host","$target" in
7422 i?86-*-*,x86_64-*-* \
7423 | powerpc*-*-*,powerpc64*-*-*)
7424 CROSS="$CROSS -DNATIVE_CROSS" ;;
7425 esac
7426 elif test "x$TARGET_SYSTEM_ROOT" != x; then
7427 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
7428 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7431 # If this is a cross-compiler that does not
7432 # have its own set of headers then define
7433 # inhibit_libc
7435 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7436 # This prevents libgcc2 from containing any code which requires libc
7437 # support.
7438 inhibit_libc=
7439 if { test x$host != x$target && test "x$with_headers" = x &&
7440 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7441 inhibit_libc=-Dinhibit_libc
7445 # When building gcc with a cross-compiler, we need to adjust things so
7446 # that the generator programs are still built with the native compiler.
7447 # Also, we cannot run fixincludes or fix-header.
7449 # These are the normal (build=host) settings:
7450 BUILD_PREFIX=
7451 BUILD_PREFIX_1=ignore-
7452 BUILD_CC='$(CC)'
7453 BUILD_CFLAGS='$(ALL_CFLAGS)'
7455 STMP_FIXINC=stmp-fixinc
7456 STMP_FIXPROTO=stmp-fixproto
7458 # And these apply if build != host.
7459 if test x$build != x$host
7460 then
7461 BUILD_PREFIX=build-
7462 BUILD_PREFIX_1=build-
7463 BUILD_CC='$(CC_FOR_BUILD)'
7464 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7466 if test "x$TARGET_SYSTEM_ROOT" = x; then
7467 STMP_FIXINC=
7468 STMP_FIXPROTO=
7472 # Expand extra_headers to include complete path.
7473 # This substitutes for lots of t-* files.
7474 extra_headers_list=
7475 if test "x$extra_headers" = x
7476 then true
7477 else
7478 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7479 for file in $extra_headers;
7481 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7482 done
7485 # Add a definition of USE_COLLECT2 if system wants one.
7486 case $use_collect2 in
7487 no) use_collect2= ;;
7488 "") ;;
7490 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7491 xm_defines="${xm_defines} USE_COLLECT2"
7493 esac
7495 # Identify the assembler which will work hand-in-glove with the newly
7496 # built GCC, so that we can examine its features. This is the assembler
7497 # which will be driven by the driver program.
7499 # If build != host, and we aren't building gas in-tree, we identify a
7500 # build->target assembler and hope that it will have the same features
7501 # as the host->target assembler we'll be using.
7502 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7503 echo "configure:7504: checking what assembler to use" >&5
7504 in_tree_gas=no
7505 gcc_cv_as=
7506 gcc_cv_gas_major_version=
7507 gcc_cv_gas_minor_version=
7508 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7509 if test -x "$DEFAULT_ASSEMBLER"; then
7510 gcc_cv_as="$DEFAULT_ASSEMBLER"
7511 elif test -x "$AS"; then
7512 gcc_cv_as="$AS"
7513 elif test -x as$host_exeext; then
7514 # Build using assembler in the current directory.
7515 gcc_cv_as=./as$host_exeext
7516 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7517 && test -f ../gas/Makefile; then
7518 # Single tree build which includes gas.
7519 in_tree_gas=yes
7520 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7521 for f in $gcc_cv_as_bfd_srcdir/configure \
7522 $gcc_cv_as_gas_srcdir/configure \
7523 $gcc_cv_as_gas_srcdir/configure.in \
7524 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7525 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7526 if test x$gcc_cv_gas_version != x; then
7527 break
7529 done
7530 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7531 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7532 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7534 rm -f as$host_exeext
7535 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7538 if test "x$gcc_cv_as" = x; then
7539 # Search the same directories that the installed compiler will
7540 # search. Else we may find the wrong assembler and lose. If we
7541 # do not find a suitable assembler binary, then try the user's
7542 # path.
7544 # Also note we have to check MD_EXEC_PREFIX before checking the
7545 # user's path. Unfortunately, there is no good way to get at the
7546 # value of MD_EXEC_PREFIX here. So we do a brute force search
7547 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7548 # to be fixed as part of the make/configure rewrite too.
7550 if test "x$exec_prefix" = xNONE; then
7551 if test "x$prefix" = xNONE; then
7552 test_prefix=/usr/local
7553 else
7554 test_prefix=$prefix
7556 else
7557 test_prefix=$exec_prefix
7560 # If the loop below does not find an assembler, then use whatever
7561 # one we can find in the users's path.
7562 # user's path.
7563 if test "x$program_prefix" != xNONE; then
7564 gcc_cv_as=${program_prefix}as$host_exeext
7565 else
7566 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7569 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7570 $test_prefix/lib/gcc-lib/$target_alias \
7571 /usr/lib/gcc/$target_alias/$gcc_version \
7572 /usr/lib/gcc/$target_alias \
7573 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7574 $test_prefix/$target_alias/bin"
7576 if test x$host = x$target; then
7577 test_dirs="$test_dirs \
7578 /usr/libexec \
7579 /usr/ccs/gcc \
7580 /usr/ccs/bin \
7581 /udk/usr/ccs/bin \
7582 /bsd43/usr/lib/cmplrs/cc \
7583 /usr/cross64/usr/bin \
7584 /usr/lib/cmplrs/cc \
7585 /sysv/usr/lib/cmplrs/cc \
7586 /svr4/usr/lib/cmplrs/cc \
7587 /usr/bin"
7590 for dir in $test_dirs; do
7591 if test -x $dir/as$host_exeext; then
7592 gcc_cv_as=$dir/as$host_exeext
7593 break;
7595 done
7597 case $in_tree_gas in
7598 yes)
7599 echo "$ac_t"""newly built gas"" 1>&6
7602 echo "$ac_t""$gcc_cv_as" 1>&6
7604 esac
7606 # Identify the linker which will work hand-in-glove with the newly
7607 # built GCC, so that we can examine its features. This is the linker
7608 # which will be driven by the driver program.
7610 # If build != host, and we aren't building gas in-tree, we identify a
7611 # build->target linker and hope that it will have the same features
7612 # as the host->target linker we'll be using.
7613 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7614 echo "configure:7615: checking what linker to use" >&5
7615 in_tree_ld=no
7616 gcc_cv_ld=
7617 gcc_cv_gld_major_version=
7618 gcc_cv_gld_minor_version=
7619 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7620 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7621 if test -x "$DEFAULT_LINKER"; then
7622 gcc_cv_ld="$DEFAULT_LINKER"
7623 elif test -x "$LD"; then
7624 gcc_cv_ld="$LD"
7625 elif test -x collect-ld$host_exeext; then
7626 # Build using linker in the current directory.
7627 gcc_cv_ld=./collect-ld$host_exeext
7628 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7629 && test -f ../ld/Makefile; then
7630 # Single tree build which includes ld.
7631 in_tree_ld=yes
7632 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
7634 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7635 if test x$gcc_cv_gld_version != x; then
7636 break
7638 done
7639 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7640 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7641 rm -f collect-ld$host_exeext
7642 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7643 2>/dev/null
7646 if test "x$gcc_cv_ld" = x; then
7647 # Search the same directories that the installed compiler will
7648 # search. Else we may find the wrong linker and lose. If we
7649 # do not find a suitable linker binary, then try the user's
7650 # path.
7652 # Also note we have to check MD_EXEC_PREFIX before checking the
7653 # user's path. Unfortunately, there is no good way to get at the
7654 # value of MD_EXEC_PREFIX here. So we do a brute force search
7655 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7656 # to be fixed as part of the make/configure rewrite too.
7658 if test "x$exec_prefix" = xNONE; then
7659 if test "x$prefix" = xNONE; then
7660 test_prefix=/usr/local
7661 else
7662 test_prefix=$prefix
7664 else
7665 test_prefix=$exec_prefix
7668 # If the loop below does not find an linker, then use whatever
7669 # one we can find in the users's path.
7670 # user's path.
7671 if test "x$program_prefix" != xNONE; then
7672 gcc_cv_ld=${program_prefix}ld$host_exeext
7673 else
7674 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7677 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7678 $test_prefix/lib/gcc-lib/$target_alias \
7679 /usr/lib/gcc/$target_alias/$gcc_version \
7680 /usr/lib/gcc/$target_alias \
7681 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7682 $test_prefix/$target_alias/bin"
7684 if test x$host = x$target; then
7685 test_dirs="$test_dirs \
7686 /usr/libexec \
7687 /usr/ccs/gcc \
7688 /usr/ccs/bin \
7689 /udk/usr/ccs/bin \
7690 /bsd43/usr/lib/cmplrs/cc \
7691 /usr/cross64/usr/bin \
7692 /usr/lib/cmplrs/cc \
7693 /sysv/usr/lib/cmplrs/cc \
7694 /svr4/usr/lib/cmplrs/cc \
7695 /usr/bin"
7698 for dir in $test_dirs; do
7699 if test -x $dir/ld$host_exeext; then
7700 gcc_cv_ld=$dir/ld$host_exeext
7701 break;
7703 done
7705 case $in_tree_ld in
7706 yes)
7707 echo "$ac_t"""newly built ld"" 1>&6
7710 echo "$ac_t""$gcc_cv_ld" 1>&6
7712 esac
7714 # Figure out what nm we will be using.
7715 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7716 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7717 echo "configure:7718: checking what nm to use" >&5
7718 in_tree_nm=no
7719 if test -x nm$host_exeext; then
7720 gcc_cv_nm=./nm$host_exeext
7721 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7722 && test -f ../binutils/Makefile; then
7723 # Single tree build which includes binutils.
7724 in_tree_nm=yes
7725 gcc_cv_nm=./nm$host_exeext
7726 rm -f nm$host_exeext
7727 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7728 elif test "x$program_prefix" != xNONE; then
7729 gcc_cv_nm=${program_prefix}nm$host_exeext
7730 else
7731 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7733 case $in_tree_nm in
7734 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7735 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7736 esac
7738 # Figure out what objdump we will be using.
7739 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7740 echo "configure:7741: checking what objdump to use" >&5
7741 in_tree_objdump=no
7742 if test -x objdump$host_exeext; then
7743 gcc_cv_objdump=./objdump$host_exeext
7744 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7745 && test -f ../binutils/Makefile; then
7746 # Single tree build which includes binutils.
7747 in_tree_objdump=yes
7748 gcc_cv_objdump=./objdump$host_exeext
7749 rm -f objdump$host_exeext
7750 $symbolic_link ../binutils/objdump$host_exeext \
7751 objdump$host_exeext 2>/dev/null
7752 elif test "x$program_prefix" != xNONE; then
7753 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7754 else
7755 gcc_cv_objdump=`echo objdump | \
7756 sed ${program_transform_name}`$host_exeext
7758 case $in_tree_objdump in
7759 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7760 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7761 esac
7763 # Figure out what assembler alignment features are present.
7764 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7765 echo "configure:7766: checking assembler alignment features" >&5
7766 gcc_cv_as_alignment_features=none
7767 if test $in_tree_gas = yes; then
7768 # Gas version 2.6 and later support for .balign and .p2align.
7769 if test $gcc_cv_gas_major_version -eq 2 \
7770 && test $gcc_cv_gas_minor_version -ge 6 \
7771 || test $gcc_cv_gas_major_version -gt 2 ; then
7774 gcc_cv_as_alignment_features=".balign and .p2align"
7775 cat >> confdefs.h <<\EOF
7776 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7783 # Gas version 2.8 and later support specifying the maximum
7784 # bytes to skip when using .p2align.
7785 if test $gcc_cv_gas_major_version -eq 2 \
7786 && test $gcc_cv_gas_minor_version -ge 8 \
7787 || test $gcc_cv_gas_major_version -gt 2 ; then
7790 gcc_cv_as_alignment_features=".p2align including maximum skip"
7791 cat >> confdefs.h <<\EOF
7792 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7799 elif test x$gcc_cv_as != x; then
7800 # Check if we have .balign and .p2align
7801 echo ".balign 4" > conftest.s
7802 echo ".p2align 2" >> conftest.s
7803 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7804 gcc_cv_as_alignment_features=".balign and .p2align"
7805 cat >> confdefs.h <<\EOF
7806 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7810 rm -f conftest.s conftest.o
7811 # Check if specifying the maximum bytes to skip when
7812 # using .p2align is supported.
7813 echo ".p2align 4,,7" > conftest.s
7814 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7815 gcc_cv_as_alignment_features=".p2align including maximum skip"
7816 cat >> confdefs.h <<\EOF
7817 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7821 rm -f conftest.s conftest.o
7823 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7825 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7826 echo "configure:7827: checking assembler subsection support" >&5
7827 gcc_cv_as_subsections=no
7828 if test $in_tree_gas = yes ; then
7829 if test $gcc_cv_gas_major_version -eq 2 \
7830 && test $gcc_cv_gas_minor_version -ge 9 \
7831 || test $gcc_cv_gas_major_version -gt 2 ; then
7834 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7835 gcc_cv_as_subsections="working .subsection -1"
7841 elif test x$gcc_cv_as != x; then
7842 # Check if we have .subsection
7843 echo ".subsection 1" > conftest.s
7844 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7845 gcc_cv_as_subsections=".subsection"
7846 if test x$gcc_cv_nm != x; then
7847 cat > conftest.s <<EOF
7848 conftest_label1: .word 0
7849 .subsection -1
7850 conftest_label2: .word 0
7851 .previous
7853 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7854 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7855 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7856 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7858 else
7859 gcc_cv_as_subsections="working .subsection -1"
7864 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7866 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7867 cat >> confdefs.h <<\EOF
7868 #define HAVE_GAS_SUBSECTION_ORDERING 1
7872 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7874 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7875 echo "configure:7876: checking assembler weak support" >&5
7876 gcc_cv_as_weak=no
7877 if test $in_tree_gas = yes ; then
7878 if test $gcc_cv_gas_major_version -eq 2 \
7879 && test $gcc_cv_gas_minor_version -ge 2 \
7880 || test $gcc_cv_gas_major_version -gt 2 ; then
7883 gcc_cv_as_weak="yes"
7888 elif test x$gcc_cv_as != x; then
7889 # Check if we have .weak
7890 echo " .weak foobar" > conftest.s
7891 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7892 gcc_cv_as_weak="yes"
7894 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7896 if test x"$gcc_cv_as_weak" = xyes; then
7897 cat >> confdefs.h <<\EOF
7898 #define HAVE_GAS_WEAK 1
7902 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7904 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7905 echo "configure:7906: checking assembler hidden support" >&5
7906 gcc_cv_as_hidden=no
7907 if test $in_tree_gas = yes ; then
7908 if test $gcc_cv_gas_major_version -eq 2 \
7909 && (test $gcc_cv_gas_minor_version -gt 12 \
7910 || (test $gcc_cv_gas_minor_version -eq 12 \
7911 && test $gcc_cv_gas_patch_version -ge 1 )) \
7912 || test $gcc_cv_gas_major_version -gt 2 ; then
7915 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7916 gcc_cv_as_hidden="yes"
7922 elif test x$gcc_cv_as != x; then
7923 # Check if we have .hidden
7924 echo " .hidden foobar" > conftest.s
7925 echo "foobar:" >> conftest.s
7926 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7927 gcc_cv_as_hidden="yes"
7929 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7931 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7932 # This is irritatingly difficult to feature test for. Look for
7933 # the date string after the version number.
7934 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7935 if echo "$ld_ver" | grep GNU > /dev/null; then
7936 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7937 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'`
7938 if test 0"$ld_date" -lt 20020404; then
7939 if test -n "$ld_date"; then
7940 # If there was date string, but was earlier than 2002-04-04, fail
7941 gcc_cv_as_hidden="no"
7942 elif test -z "$ld_vers"; then
7943 # If there was no date string nor ld version number, something is wrong
7944 gcc_cv_as_hidden="no"
7945 else
7946 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7947 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7948 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7949 test -z "$ld_vers_patch" && ld_vers_patch=0
7950 if test "$ld_vers_major" -lt 2; then
7951 gcc_cv_as_hidden="no"
7952 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7953 gcc_cv_as_hidden="no"
7954 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7955 -a "$ld_vers_patch" -eq 0; then
7956 gcc_cv_as_hidden="no"
7962 if test x"$gcc_cv_as_hidden" = xyes; then
7963 cat >> confdefs.h <<\EOF
7964 #define HAVE_GAS_HIDDEN 1
7968 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7969 libgcc_visibility=$gcc_cv_as_hidden
7970 case "$target" in
7971 mips-sgi-irix6*)
7972 if test x"$gnu_ld_flag" = x"no"; then
7973 # Even if using gas with .hidden support, the resulting object files
7974 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7975 # N64 linkers, the problem is that the linker refuses to accept
7976 # -call_shared (passed by default to the linker) and -r (used to
7977 # link the object file generated without .hidden directives with
7978 # one that hides symbols), so we also lose.
7979 libgcc_visibility=no
7982 esac
7985 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7986 echo "configure:7987: checking assembler leb128 support" >&5
7987 gcc_cv_as_leb128=no
7988 if test $in_tree_gas = yes ; then
7989 if test $gcc_cv_gas_major_version -eq 2 \
7990 && test $gcc_cv_gas_minor_version -ge 11 \
7991 || test $gcc_cv_gas_major_version -gt 2 ; then
7994 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7995 gcc_cv_as_leb128="yes"
8001 elif test x$gcc_cv_as != x; then
8002 # Check if we have .[us]leb128, and support symbol arithmetic with it.
8003 cat > conftest.s <<EOF
8004 .data
8005 .uleb128 L2 - L1
8007 .uleb128 1280
8008 .sleb128 -1010
8011 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8012 gcc_cv_as_leb128="yes"
8014 # GAS versions before 2.11 do not support uleb128,
8015 # despite appearing to.
8016 # ??? There exists an elf-specific test that will crash
8017 # the assembler. Perhaps it's better to figure out whether
8018 # arbitrary sections are supported and try the test.
8019 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
8020 if echo "$as_ver" | grep GNU > /dev/null; then
8021 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
8022 as_major=`echo $as_ver | sed 's/\..*//'`
8023 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
8024 if test $as_major -eq 2 -a $as_minor -lt 11; then
8025 gcc_cv_as_leb128="no"
8029 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8031 if test x"$gcc_cv_as_leb128" = xyes; then
8032 cat >> confdefs.h <<\EOF
8033 #define HAVE_AS_LEB128 1
8037 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
8039 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
8040 echo "configure:8041: checking assembler eh_frame optimization" >&5
8041 gcc_cv_as_eh_frame=no
8042 if test $in_tree_gas = yes ; then
8043 if test $gcc_cv_gas_major_version -eq 2 \
8044 && test $gcc_cv_gas_minor_version -ge 12 \
8045 || test $gcc_cv_gas_major_version -gt 2 ; then
8048 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8049 gcc_cv_as_eh_frame="yes"
8055 elif test x$gcc_cv_as != x; then
8056 # Check if this is GAS.
8057 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
8058 rm -f a.out 2> /dev/null
8059 if echo "$as_ver" | grep GNU > /dev/null; then
8060 # Versions up to and including 2.11.0 may mis-optimize
8061 # .eh_frame data. Try something.
8062 cat > conftest.s <<EOF
8063 .text
8064 .LFB1:
8065 .4byte 0
8066 .L1:
8067 .4byte 0
8068 .LFE1:
8069 .section .eh_frame,"aw",@progbits
8070 __FRAME_BEGIN__:
8071 .4byte .LECIE1-.LSCIE1
8072 .LSCIE1:
8073 .4byte 0x0
8074 .byte 0x1
8075 .ascii "z\0"
8076 .byte 0x1
8077 .byte 0x78
8078 .byte 0x1a
8079 .byte 0x0
8080 .byte 0x4
8081 .4byte 1
8082 .p2align 1
8083 .LECIE1:
8084 .LSFDE1:
8085 .4byte .LEFDE1-.LASFDE1
8086 .LASFDE1:
8087 .4byte .LASFDE1-__FRAME_BEGIN__
8088 .4byte .LFB1
8089 .4byte .LFE1-.LFB1
8090 .byte 0x4
8091 .4byte .LFE1-.LFB1
8092 .byte 0x4
8093 .4byte .L1-.LFB1
8094 .LEFDE1:
8096 cat > conftest.lit <<EOF
8097 0000 10000000 00000000 017a0001 781a0004 .........z..x...
8098 0010 01000000 12000000 18000000 00000000 ................
8099 0020 08000000 04080000 0044 .........D
8101 cat > conftest.big <<EOF
8102 0000 00000010 00000000 017a0001 781a0004 .........z..x...
8103 0010 00000001 00000012 00000018 00000000 ................
8104 0020 00000008 04000000 0844 .........D
8106 # If the assembler didn't choke, and we can objdump,
8107 # and we got the correct data, then succeed.
8108 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8109 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
8110 | tail -3 > conftest.got \
8111 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
8112 || cmp conftest.big conftest.got > /dev/null 2>&1; }
8113 then
8114 gcc_cv_as_eh_frame="yes"
8115 else
8116 gcc_cv_as_eh_frame="bad"
8117 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
8118 cat >> confdefs.h <<\EOF
8119 #define USE_AS_TRADITIONAL_FORMAT 1
8125 rm -f conftest.*
8127 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
8129 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
8130 echo "configure:8131: checking assembler section merging support" >&5
8131 gcc_cv_as_shf_merge=no
8132 if test $in_tree_gas = yes ; then
8133 if test $gcc_cv_gas_major_version -eq 2 \
8134 && test $gcc_cv_gas_minor_version -ge 12 \
8135 || test $gcc_cv_gas_major_version -gt 2 ; then
8138 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8139 gcc_cv_as_shf_merge=yes
8145 elif test x$gcc_cv_as != x; then
8146 # Check if we support SHF_MERGE sections
8147 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
8148 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
8149 gcc_cv_as_shf_merge=yes
8151 rm -f conftest.s conftest.o
8153 if test x"$gcc_cv_as_shf_merge" = xyes; then
8154 cat >> confdefs.h <<\EOF
8155 #define HAVE_GAS_SHF_MERGE 1
8159 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
8161 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
8162 echo "configure:8163: checking assembler thread-local storage support" >&5
8163 gcc_cv_as_tls=no
8164 conftest_s=
8165 tls_first_major=
8166 tls_first_minor=
8167 case "$target" in
8168 alpha*-*-*)
8169 conftest_s='
8170 .section ".tdata","awT",@progbits
8171 foo: .long 25
8172 .text
8173 ldq $27,__tls_get_addr($29) !literal!1
8174 lda $16,foo($29) !tlsgd!1
8175 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
8176 ldq $27,__tls_get_addr($29) !literal!2
8177 lda $16,foo($29) !tlsldm!2
8178 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
8179 ldq $1,foo($29) !gotdtprel
8180 ldah $2,foo($29) !dtprelhi
8181 lda $3,foo($2) !dtprello
8182 lda $4,foo($29) !dtprel
8183 ldq $1,foo($29) !gottprel
8184 ldah $2,foo($29) !tprelhi
8185 lda $3,foo($2) !tprello
8186 lda $4,foo($29) !tprel'
8187 tls_first_major=2
8188 tls_first_minor=13
8190 i[34567]86-*-*)
8191 conftest_s='
8192 .section ".tdata","awT",@progbits
8193 foo: .long 25
8194 .text
8195 movl %gs:0, %eax
8196 leal foo@TLSGD(,%ebx,1), %eax
8197 leal foo@TLSLDM(%ebx), %eax
8198 leal foo@DTPOFF(%eax), %edx
8199 movl foo@GOTTPOFF(%ebx), %eax
8200 subl foo@GOTTPOFF(%ebx), %eax
8201 addl foo@GOTNTPOFF(%ebx), %eax
8202 movl foo@INDNTPOFF, %eax
8203 movl $foo@TPOFF, %eax
8204 subl $foo@TPOFF, %eax
8205 leal foo@NTPOFF(%ecx), %eax'
8206 tls_first_major=2
8207 tls_first_minor=14
8209 x86_64-*-*)
8210 conftest_s='
8211 .section ".tdata","awT",@progbits
8212 foo: .long 25
8213 .text
8214 movq %fs:0, %rax
8215 leaq foo@TLSGD(%rip), %rdi
8216 leaq foo@TLSLD(%rip), %rdi
8217 leaq foo@DTPOFF(%rax), %rdx
8218 movq foo@GOTTPOFF(%rip), %rax
8219 movq $foo@TPOFF, %rax'
8220 tls_first_major=2
8221 tls_first_minor=14
8223 ia64-*-*)
8224 conftest_s='
8225 .section ".tdata","awT",@progbits
8226 foo: data8 25
8227 .text
8228 addl r16 = @ltoff(@dtpmod(foo#)), gp
8229 addl r17 = @ltoff(@dtprel(foo#)), gp
8230 addl r18 = @ltoff(@tprel(foo#)), gp
8231 addl r19 = @dtprel(foo#), gp
8232 adds r21 = @dtprel(foo#), r13
8233 movl r23 = @dtprel(foo#)
8234 addl r20 = @tprel(foo#), gp
8235 adds r22 = @tprel(foo#), r13
8236 movl r24 = @tprel(foo#)'
8237 tls_first_major=2
8238 tls_first_minor=13
8240 s390-*-*)
8241 conftest_s='
8242 .section ".tdata","awT",@progbits
8243 foo: .long 25
8244 .text
8245 .long foo@TLSGD
8246 .long foo@TLSLDM
8247 .long foo@DTPOFF
8248 .long foo@NTPOFF
8249 .long foo@GOTNTPOFF
8250 .long foo@INDNTPOFF
8251 l %r1,foo@GOTNTPOFF(%r12)
8252 l %r1,0(%r1):tls_load:foo
8253 bas %r14,0(%r1,%r13):tls_gdcall:foo
8254 bas %r14,0(%r1,%r13):tls_ldcall:foo'
8255 tls_first_major=2
8256 tls_first_minor=14
8258 s390x-*-*)
8259 conftest_s='
8260 .section ".tdata","awT",@progbits
8261 foo: .long 25
8262 .text
8263 .quad foo@TLSGD
8264 .quad foo@TLSLDM
8265 .quad foo@DTPOFF
8266 .quad foo@NTPOFF
8267 .quad foo@GOTNTPOFF
8268 lg %r1,foo@GOTNTPOFF(%r12)
8269 larl %r1,foo@INDNTPOFF
8270 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
8271 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
8272 tls_first_major=2
8273 tls_first_minor=14
8275 esac
8276 if test -z "$tls_first_major"; then
8278 elif test $in_tree_gas = yes ; then
8279 if test $gcc_cv_gas_major_version -eq $tls_first_major \
8280 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
8281 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
8284 gcc_cv_as_tls=yes
8289 elif test x$gcc_cv_as != x; then
8290 echo "$conftest_s" > conftest.s
8291 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
8292 then
8293 gcc_cv_as_tls=yes
8295 rm -f conftest.s conftest.o
8297 if test "$gcc_cv_as_tls" = yes; then
8298 cat >> confdefs.h <<\EOF
8299 #define HAVE_AS_TLS 1
8303 echo "$ac_t""$gcc_cv_as_tls" 1>&6
8305 case "$target" in
8306 # All TARGET_ABI_OSF targets.
8307 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8308 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8309 echo "configure:8310: checking assembler supports explicit relocations" >&5
8310 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8311 echo $ac_n "(cached) $ac_c" 1>&6
8312 else
8314 gcc_cv_as_explicit_relocs=unknown
8315 if test $in_tree_gas = yes ; then
8316 if test $gcc_cv_gas_major_version -eq 2 \
8317 && test $gcc_cv_gas_minor_version -ge 12 \
8318 || test $gcc_cv_gas_major_version -gt 2 ; then
8321 gcc_cv_as_explicit_relocs=yes
8326 elif test x$gcc_cv_as != x; then
8327 cat > conftest.s << 'EOF'
8328 .set nomacro
8329 .text
8330 extbl $3, $2, $3 !lituse_bytoff!1
8331 ldq $2, a($29) !literal!1
8332 ldq $4, b($29) !literal!2
8333 ldq_u $3, 0($2) !lituse_base!1
8334 ldq $27, f($29) !literal!5
8335 jsr $26, ($27), f !lituse_jsr!5
8336 ldah $29, 0($26) !gpdisp!3
8337 lda $0, c($29) !gprel
8338 ldah $1, d($29) !gprelhigh
8339 lda $1, d($1) !gprellow
8340 lda $29, 0($29) !gpdisp!3
8342 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8343 gcc_cv_as_explicit_relocs=yes
8344 else
8345 gcc_cv_as_explicit_relocs=no
8347 rm -f conftest.s conftest.o
8352 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8353 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8354 cat >> confdefs.h <<\EOF
8355 #define HAVE_AS_EXPLICIT_RELOCS 1
8360 sparc*-*-*)
8361 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8362 echo "configure:8363: checking assembler .register pseudo-op support" >&5
8363 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8364 echo $ac_n "(cached) $ac_c" 1>&6
8365 else
8367 gcc_cv_as_register_pseudo_op=unknown
8368 if test x$gcc_cv_as != x; then
8369 # Check if we have .register
8370 echo ".register %g2, #scratch" > conftest.s
8371 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8372 gcc_cv_as_register_pseudo_op=yes
8373 else
8374 gcc_cv_as_register_pseudo_op=no
8376 rm -f conftest.s conftest.o
8381 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8382 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8383 cat >> confdefs.h <<\EOF
8384 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8389 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8390 echo "configure:8391: checking assembler supports -relax" >&5
8391 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8392 echo $ac_n "(cached) $ac_c" 1>&6
8393 else
8395 gcc_cv_as_relax_opt=unknown
8396 if test x$gcc_cv_as != x; then
8397 # Check if gas supports -relax
8398 echo ".text" > conftest.s
8399 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8400 gcc_cv_as_relax_opt=yes
8401 else
8402 gcc_cv_as_relax_opt=no
8404 rm -f conftest.s conftest.o
8409 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8410 if test "x$gcc_cv_as_relax_opt" = xyes; then
8411 cat >> confdefs.h <<\EOF
8412 #define HAVE_AS_RELAX_OPTION 1
8417 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8418 echo "configure:8419: checking assembler and linker support unaligned pc related relocs" >&5
8419 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8420 echo $ac_n "(cached) $ac_c" 1>&6
8421 else
8423 gcc_cv_as_sparc_ua_pcrel=unknown
8424 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8425 gcc_cv_as_sparc_ua_pcrel=no
8426 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8427 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8428 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8429 gcc_cv_as_sparc_ua_pcrel=yes
8431 rm -f conftest.s conftest.o conftest
8436 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8437 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8438 cat >> confdefs.h <<\EOF
8439 #define HAVE_AS_SPARC_UA_PCREL 1
8444 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8445 echo "configure:8446: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8446 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8447 echo $ac_n "(cached) $ac_c" 1>&6
8448 else
8450 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8451 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8452 if test x$gcc_cv_objdump != x; then
8453 gcc_cv_as_sparc_ua_pcrel_hidden=no
8454 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8455 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8456 echo "foo: .skip 4" >> conftest.s
8457 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8458 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8459 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8460 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8461 if $gcc_cv_objdump -R conftest 2> /dev/null \
8462 | grep 'DISP32' > /dev/null 2>&1; then
8464 else
8465 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8469 rm -f conftest.s conftest.o conftest
8470 else
8471 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8476 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8477 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8478 cat >> confdefs.h <<\EOF
8479 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8484 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8485 echo "configure:8486: checking for assembler offsetable %lo() support" >&5
8486 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8487 echo $ac_n "(cached) $ac_c" 1>&6
8488 else
8490 gcc_cv_as_offsetable_lo10=unknown
8491 if test "x$gcc_cv_as" != x; then
8492 # Check if assembler has offsetable %lo()
8493 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8494 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8495 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8496 > /dev/null 2>&1 &&
8497 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8498 > /dev/null 2>&1; then
8499 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8500 gcc_cv_as_offsetable_lo10=no
8501 else
8502 gcc_cv_as_offsetable_lo10=yes
8504 else
8505 gcc_cv_as_offsetable_lo10=no
8507 rm -f conftest.s conftest.o conftest1.s conftest1.o
8512 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8513 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8514 cat >> confdefs.h <<\EOF
8515 #define HAVE_AS_OFFSETABLE_LO10 1
8522 i[34567]86-*-* | x86_64-*-*)
8523 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8524 echo "configure:8525: checking assembler instructions" >&5
8525 gcc_cv_as_instructions=
8526 if test $in_tree_gas = yes ; then
8527 if test $gcc_cv_gas_major_version -eq 2 \
8528 && test $gcc_cv_gas_minor_version -ge 9 \
8529 || test $gcc_cv_gas_major_version -gt 2 ; then
8532 gcc_cv_as_instructions="filds fists"
8537 elif test x$gcc_cv_as != x; then
8538 set "filds fists" "filds mem; fists mem"
8539 while test $# -gt 0
8541 echo "$2" > conftest.s
8542 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8543 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8545 shift 2
8546 done
8547 rm -f conftest.s conftest.o
8549 if test x"$gcc_cv_as_instructions" != x; then
8550 cat >> confdefs.h <<EOF
8551 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8555 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8557 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8558 echo "configure:8559: checking assembler GOTOFF in data directives" >&5
8559 gcc_cv_as_gotoff_in_data=no
8560 if test $in_tree_gas = yes ; then
8561 if test $gcc_cv_gas_major_version -eq 2 \
8562 && test $gcc_cv_gas_minor_version -ge 11 \
8563 || test $gcc_cv_gas_major_version -gt 2 ; then
8566 gcc_cv_as_gotoff_in_data=yes
8571 elif test x$gcc_cv_as != x; then
8572 cat > conftest.s <<EOF
8573 .text
8574 .L0:
8576 .data
8577 .long .L0@GOTOFF
8579 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8580 gcc_cv_as_gotoff_in_data=yes
8583 cat >> confdefs.h <<EOF
8584 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8587 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8590 ia64*-*-*)
8591 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8592 echo "configure:8593: checking assembler supports ltoffx and ldxmov" >&5
8593 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8594 echo $ac_n "(cached) $ac_c" 1>&6
8595 else
8597 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8598 if test $in_tree_gas = yes ; then
8599 if test $gcc_cv_gas_major_version -eq 2 \
8600 && test $gcc_cv_gas_minor_version -ge 14 \
8601 || test $gcc_cv_gas_major_version -gt 2 ; then
8604 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8609 elif test x$gcc_cv_as != x; then
8610 cat > conftest.s << 'EOF'
8611 .text
8612 addl r15 = @ltoffx(x#), gp
8614 ld8.mov r16 = [r15], x#
8616 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8617 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8618 else
8619 gcc_cv_as_ltoffx_ldxmov_relocs=no
8621 rm -f conftest.s conftest.o
8626 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8627 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8628 cat >> confdefs.h <<\EOF
8629 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8634 esac
8636 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8637 echo "configure:8638: checking assembler dwarf2 debug_line support" >&5
8638 gcc_cv_as_dwarf2_debug_line=no
8639 # ??? Not all targets support dwarf2 debug_line, even within a version
8640 # of gas. Moreover, we need to emit a valid instruction to trigger any
8641 # info to the output file. So, as supported targets are added to gas 2.11,
8642 # add some instruction here to (also) show we expect this might work.
8643 # ??? Once 2.11 is released, probably need to add first known working
8644 # version to the per-target configury.
8645 case "$target" in
8646 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8647 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
8648 insn="nop"
8650 ia64*-*-*)
8651 insn="nop 0"
8653 esac
8654 if test $in_tree_gas = yes ; then
8655 if test $gcc_cv_gas_major_version -eq 2 \
8656 && test $gcc_cv_gas_minor_version -ge 11 \
8657 || test $gcc_cv_gas_major_version -gt 2 ; then
8660 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8661 && test x"$insn" != x ; then
8662 gcc_cv_as_dwarf2_debug_line="yes"
8668 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8669 echo ' .file 1 "conftest.s"' > conftest.s
8670 echo ' .loc 1 3 0' >> conftest.s
8671 echo " $insn" >> conftest.s
8672 # ??? This fails with non-gnu grep.
8673 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8674 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8675 # The .debug_line file table must be in the exact order that
8676 # we specified the files, since these indices are also used
8677 # by DW_AT_decl_file. Approximate this test by testing if
8678 # the assembler bitches if the same index is assigned twice.
8679 echo ' .file 1 "foo.s"' > conftest.s
8680 echo ' .file 1 "bar.s"' >> conftest.s
8681 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8682 then
8683 gcc_cv_as_dwarf2_debug_line="no"
8684 else
8685 gcc_cv_as_dwarf2_debug_line="yes"
8688 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8690 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8691 cat >> confdefs.h <<\EOF
8692 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8696 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8698 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8699 echo "configure:8700: checking assembler --gdwarf2 support" >&5
8700 gcc_cv_as_gdwarf2_flag=no
8701 if test $in_tree_gas = yes ; then
8702 if test $gcc_cv_gas_major_version -eq 2 \
8703 && test $gcc_cv_gas_minor_version -ge 11 \
8704 || test $gcc_cv_gas_major_version -gt 2 ; then
8707 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8708 && test x"$insn" != x ; then
8709 gcc_cv_as_gdwarf2_flag="yes"
8715 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8716 echo '' > conftest.s
8717 # ??? This fails with non-gnu grep.
8718 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8719 then
8720 gcc_cv_as_gdwarf2_flag="yes"
8722 rm -f conftest.s conftest.o
8724 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8725 cat >> confdefs.h <<\EOF
8726 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8730 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8732 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8733 echo "configure:8734: checking assembler --gstabs support" >&5
8734 gcc_cv_as_gstabs_flag=no
8735 if test $in_tree_gas = yes ; then
8736 if test $gcc_cv_gas_major_version -eq 2 \
8737 && test $gcc_cv_gas_minor_version -ge 11 \
8738 || test $gcc_cv_gas_major_version -gt 2 ; then
8741 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8742 && test x"$insn" != x ; then
8743 gcc_cv_as_gstabs_flag="yes"
8749 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8750 echo '' > conftest.s
8751 # ??? This fails with non-gnu grep.
8752 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8753 gcc_cv_as_gstabs_flag="yes"
8755 rm -f conftest.s conftest.o
8757 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8758 cat >> confdefs.h <<\EOF
8759 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8763 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8765 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8766 echo "configure:8767: checking linker read-only and read-write section mixing" >&5
8767 gcc_cv_ld_ro_rw_mix=unknown
8768 if test $in_tree_ld = yes ; then
8769 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
8770 gcc_cv_ld_ro_rw_mix=read-write
8772 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8773 echo '.section "myfoosect", "a"' > conftest1.s
8774 echo '.section "myfoosect", "aw"' > conftest2.s
8775 echo '.byte 1' >> conftest2.s
8776 echo '.section "myfoosect", "a"' > conftest3.s
8777 echo '.byte 0' >> conftest3.s
8778 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8779 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8780 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8781 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8782 conftest2.o conftest3.o; then
8783 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8784 | grep -A1 myfoosect`
8785 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8786 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8787 gcc_cv_ld_ro_rw_mix=read-only
8788 else
8789 gcc_cv_ld_ro_rw_mix=read-write
8793 rm -f conftest.* conftest[123].*
8795 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8796 cat >> confdefs.h <<\EOF
8797 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8801 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8803 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8804 echo "configure:8805: checking linker PT_GNU_EH_FRAME support" >&5
8805 gcc_cv_ld_eh_frame_hdr=no
8806 if test $in_tree_ld = yes ; then
8807 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
8808 gcc_cv_ld_eh_frame_hdr=yes
8810 elif test x$gcc_cv_ld != x; then
8811 # Check if linker supports --eh-frame-hdr option
8812 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8813 gcc_cv_ld_eh_frame_hdr=yes
8816 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8817 cat >> confdefs.h <<\EOF
8818 #define HAVE_LD_EH_FRAME_HDR 1
8822 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8824 # Miscellaneous target-specific checks.
8825 case "$target" in
8826 mips*-*-*)
8827 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8828 echo "configure:8829: checking whether libgloss uses STARTUP directives consistently" >&5
8829 gcc_cv_mips_libgloss_startup=no
8830 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8831 if test "x$exec_prefix" = xNONE; then
8832 if test "x$prefix" = xNONE; then
8833 test_prefix=/usr/local
8834 else
8835 test_prefix=$prefix
8837 else
8838 test_prefix=$exec_prefix
8840 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8842 if grep '^STARTUP' $f > /dev/null 2>&1; then
8843 gcc_cv_mips_libgloss_startup=yes
8844 break
8846 done
8847 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8848 cat >> confdefs.h <<\EOF
8849 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8853 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8855 esac
8857 if test x$with_sysroot = x && test x$host = x$target \
8858 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8859 cat >> confdefs.h <<EOF
8860 #define PREFIX_INCLUDE_DIR "$prefix/include"
8865 # Figure out what language subdirectories are present.
8866 # Look if the user specified --enable-languages="..."; if not, use
8867 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8868 # go away some day.
8869 # NB: embedded tabs in this IF block -- do not untabify
8870 if test x"${enable_languages+set}" != xset; then
8871 if test x"${LANGUAGES+set}" = xset; then
8872 enable_languages="${LANGUAGES}"
8873 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8875 else
8876 enable_languages=all
8878 else
8879 if test x"${enable_languages}" = x \
8880 || test x"${enable_languages}" = xyes;
8881 then
8882 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8885 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8887 # First scan to see if an enabled language requires some other language.
8888 # We assume that a given config-lang.in will list all the language
8889 # front ends it requires, even if some are required indirectly.
8890 for lang in ${srcdir}/*/config-lang.in ..
8892 case $lang in
8895 # The odd quoting in the next line works around
8896 # an apparent bug in bash 1.12 on linux.
8897 ${srcdir}/[*]/config-lang.in)
8900 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8901 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8902 for other in $this_lang_requires
8904 case ,${enable_languages}, in
8905 *,$other,*)
8907 *,all,*)
8909 *,$lang_alias,*)
8910 enable_languages="$enable_languages,$other"
8912 esac
8913 done
8915 esac
8916 done
8918 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8919 found_languages=
8920 subdirs=
8921 for lang in ${srcdir}/*/config-lang.in ..
8923 case $lang in
8924 ..) ;;
8925 # The odd quoting in the next line works around
8926 # an apparent bug in bash 1.12 on linux.
8927 ${srcdir}/[*]/config-lang.in) ;;
8929 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8930 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8931 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8932 if test "x$lang_alias" = x
8933 then
8934 echo "$lang doesn't set \$language." 1>&2
8935 exit 1
8937 case ${build_by_default},${enable_languages}, in
8938 *,$lang_alias,*) add_this_lang=yes ;;
8939 no,*) add_this_lang=no ;;
8940 *,all,*) add_this_lang=yes ;;
8941 *) add_this_lang=no ;;
8942 esac
8943 found_languages="${found_languages} ${lang_alias}"
8944 if test x"${add_this_lang}" = xyes; then
8945 case $lang in
8946 ${srcdir}/ada/config-lang.in)
8947 if test x$have_gnat = xyes ; then
8948 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8952 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8954 esac
8957 esac
8958 done
8960 missing_languages=
8961 for expected_language in ${expected_languages} ..
8963 if test "${expected_language}" != ..; then
8964 missing_language="${expected_language}"
8965 if test "${expected_language}" = "c" \
8966 || test "${expected_language}" = "all"; then
8967 missing_language=
8969 for found_language in ${found_languages} ..
8971 if test "${found_language}" != ..; then
8972 if test "${expected_language}" = "${found_language}"; then
8973 missing_language=
8976 done
8977 if test "x${missing_language}" != x; then
8978 missing_languages="${missing_languages} ${missing_language}"
8981 done
8983 if test "x$missing_languages" != x; then
8984 { echo "configure: error:
8985 The following requested languages were not found:${missing_languages}
8986 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8989 # Make gthr-default.h if we have a thread file.
8990 gthread_flags=
8991 if test $thread_file != single; then
8992 rm -f gthr-default.h
8993 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8994 gthread_flags=-DHAVE_GTHR_DEFAULT
8998 # Find out what GC implementation we want, or may, use.
8999 # Check whether --with-gc or --without-gc was given.
9000 if test "${with_gc+set}" = set; then
9001 withval="$with_gc"
9002 case "$withval" in
9003 simple | page)
9004 GGC=ggc-$withval
9007 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
9009 esac
9010 else
9011 GGC=ggc-page
9015 echo "Using $GGC for garbage collection."
9017 # Use the system's zlib library.
9018 zlibdir=-L../zlib
9019 zlibinc="-I\$(srcdir)/../zlib"
9020 # Check whether --with-system-zlib or --without-system-zlib was given.
9021 if test "${with_system_zlib+set}" = set; then
9022 withval="$with_system_zlib"
9023 zlibdir=
9024 zlibinc=
9032 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
9033 echo "configure:9034: checking whether to enable maintainer-specific portions of Makefiles" >&5
9034 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
9035 if test "${enable_maintainer_mode+set}" = set; then
9036 enableval="$enable_maintainer_mode"
9037 maintainer_mode=$enableval
9038 else
9039 maintainer_mode=no
9043 echo "$ac_t""$maintainer_mode" 1>&6
9045 if test "$maintainer_mode" = "yes"; then
9046 MAINT=''
9047 else
9048 MAINT='#'
9051 # Make empty files to contain the specs and options for each language.
9052 # Then add #include lines to for a compiler that has specs and/or options.
9054 lang_specs_files=
9055 lang_options_files=
9056 lang_tree_files=
9057 for subdir in . $subdirs
9059 if test -f $srcdir/$subdir/lang-specs.h; then
9060 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
9062 if test -f $srcdir/$subdir/lang-options.h; then
9063 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
9065 if test -f $srcdir/$subdir/$subdir-tree.def; then
9066 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
9068 done
9070 # These (without "all_") are set in each config-lang.in.
9071 # `language' must be a single word so is spelled singularly.
9072 all_languages=
9073 all_boot_languages=
9074 all_compilers=
9075 all_stagestuff=
9076 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
9077 # List of language makefile fragments.
9078 all_lang_makefiles=
9079 # Files for gengtype
9080 all_gtfiles="$target_gtfiles"
9081 # Files for gengtype with language
9082 all_gtfiles_files_langs=
9083 all_gtfiles_files_files=
9085 # Add the language fragments.
9086 # Languages are added via two mechanisms. Some information must be
9087 # recorded in makefile variables, these are defined in config-lang.in.
9088 # We accumulate them and plug them into the main Makefile.
9089 # The other mechanism is a set of hooks for each of the main targets
9090 # like `clean', `install', etc.
9092 language_fragments="Make-lang"
9093 language_hooks="Make-hooks"
9095 for s in .. $subdirs
9097 if test $s != ".."
9098 then
9099 language=
9100 boot_language=
9101 compilers=
9102 stagestuff=
9103 outputs=
9104 gtfiles=
9105 . ${srcdir}/$s/config-lang.in
9106 if test "x$language" = x
9107 then
9108 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
9109 exit 1
9111 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
9112 if test -f ${srcdir}/$s/Makefile.in
9113 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
9115 all_languages="$all_languages $language"
9116 if test "x$boot_language" = xyes
9117 then
9118 all_boot_languages="$all_boot_languages $language"
9120 all_compilers="$all_compilers $compilers"
9121 all_stagestuff="$all_stagestuff $stagestuff"
9122 all_outputs="$all_outputs $outputs"
9123 all_gtfiles="$all_gtfiles $gtfiles"
9124 for f in .. $gtfiles
9126 if test $f != ".."
9127 then
9128 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9129 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9131 done
9133 done
9135 # Pick up gtfiles for c
9136 gtfiles=
9137 s="c"
9138 . ${srcdir}/c-config-lang.in
9139 all_gtfiles="$all_gtfiles $gtfiles"
9140 for f in .. $gtfiles
9142 if test $f != ".."
9143 then
9144 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9145 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9147 done
9149 check_languages=
9150 for language in .. $all_languages
9152 if test $language != ".."
9153 then
9154 check_languages="$check_languages check-$language"
9156 done
9158 # Since we can't use `::' targets, we link each language in
9159 # with a set of hooks, reached indirectly via lang.${target}.
9161 rm -f Make-hooks
9162 touch Make-hooks
9163 target_list="all.build all.cross start.encap rest.encap tags \
9164 info dvi generated-manpages \
9165 install-normal install-common install-info install-man \
9166 uninstall \
9167 mostlyclean clean distclean extraclean maintainer-clean \
9168 stage1 stage2 stage3 stage4"
9169 for t in $target_list
9172 for lang in .. $all_languages
9174 if test $lang != ".."; then
9175 x="$x $lang.$t"
9177 done
9178 echo "lang.$t: $x" >> Make-hooks
9179 done
9181 # Create .gdbinit.
9183 echo "dir ." > .gdbinit
9184 echo "dir ${srcdir}" >> .gdbinit
9185 if test x$gdb_needs_out_file_path = xyes
9186 then
9187 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
9189 if test "x$subdirs" != x; then
9190 for s in $subdirs
9192 echo "dir ${srcdir}/$s" >> .gdbinit
9193 done
9195 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
9197 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
9198 # absolute path for gcc_tooldir based on inserting the number of up-directory
9199 # movements required to get from $(exec_prefix) to $(prefix) into the basic
9200 # $(libsubdir)/@(unlibsubdir) based path.
9201 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
9202 # make and thus we'd get different behavior depending on where we built the
9203 # sources.
9204 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
9205 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
9206 else
9207 # An explanation of the sed strings:
9208 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
9209 # -e 's|/$||' match a trailing forward slash and eliminates it
9210 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
9211 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
9213 # (*) Note this pattern overwrites the first character of the string
9214 # with a forward slash if one is not already present. This is not a
9215 # problem because the exact names of the sub-directories concerned is
9216 # unimportant, just the number of them matters.
9218 # The practical upshot of these patterns is like this:
9220 # prefix exec_prefix result
9221 # ------ ----------- ------
9222 # /foo /foo/bar ../
9223 # /foo/ /foo/bar ../
9224 # /foo /foo/bar/ ../
9225 # /foo/ /foo/bar/ ../
9226 # /foo /foo/bar/ugg ../../
9228 dollar='$$'
9229 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
9234 # Find a directory in which to install a shared libgcc.
9236 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
9237 if test "${enable_version_specific_runtime_libs+set}" = set; then
9238 enableval="$enable_version_specific_runtime_libs"
9243 # Check whether --with-slibdir or --without-slibdir was given.
9244 if test "${with_slibdir+set}" = set; then
9245 withval="$with_slibdir"
9246 slibdir="$with_slibdir"
9247 else
9248 if test "${enable_version_specific_runtime_libs+set}" = set; then
9249 slibdir='$(libsubdir)'
9250 elif test "$host" != "$target"; then
9251 slibdir='$(build_tooldir)/lib'
9252 else
9253 slibdir='$(libdir)'
9259 objdir=`${PWDCMD-pwd}`
9262 # Process the language and host/target makefile fragments.
9263 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9265 # Substitute configuration variables
9335 # Echo that links are built
9336 if test x$host = x$target
9337 then
9338 str1="native "
9339 else
9340 str1="cross-"
9341 str2=" from $host"
9344 if test x$host != x$build
9345 then
9346 str3=" on a $build system"
9349 if test "x$str2" != x || test "x$str3" != x
9350 then
9351 str4=
9354 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9356 if test "x$str2" != x || test "x$str3" != x
9357 then
9358 echo " ${str2}${str3}." 1>&2
9361 # Truncate the target if necessary
9362 if test x$host_truncate_target != x; then
9363 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9366 # Configure the subdirectories
9367 # AC_CONFIG_SUBDIRS($subdirs)
9369 # Create the Makefile
9370 # and configure language subdirectories
9371 trap '' 1 2 15
9372 cat > confcache <<\EOF
9373 # This file is a shell script that caches the results of configure
9374 # tests run on this system so they can be shared between configure
9375 # scripts and configure runs. It is not useful on other systems.
9376 # If it contains results you don't want to keep, you may remove or edit it.
9378 # By default, configure uses ./config.cache as the cache file,
9379 # creating it if it does not exist already. You can give configure
9380 # the --cache-file=FILE option to use a different cache file; that is
9381 # what configure does when it calls configure scripts in
9382 # subdirectories, so they share the cache.
9383 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9384 # config.status only pays attention to the cache file if you give it the
9385 # --recheck option to rerun configure.
9388 # The following way of writing the cache mishandles newlines in values,
9389 # but we know of no workaround that is simple, portable, and efficient.
9390 # So, don't put newlines in cache variables' values.
9391 # Ultrix sh set writes to stderr and can't be redirected directly,
9392 # and sets the high bit in the cache file unless we assign to the vars.
9393 (set) 2>&1 |
9394 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9395 *ac_space=\ *)
9396 # `set' does not quote correctly, so add quotes (double-quote substitution
9397 # turns \\\\ into \\, and sed turns \\ into \).
9398 sed -n \
9399 -e "s/'/'\\\\''/g" \
9400 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9403 # `set' quotes correctly as required by POSIX, so do not add quotes.
9404 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9406 esac >> confcache
9407 if cmp -s $cache_file confcache; then
9409 else
9410 if test -w $cache_file; then
9411 echo "updating cache $cache_file"
9412 cat confcache > $cache_file
9413 else
9414 echo "not updating unwritable cache $cache_file"
9417 rm -f confcache
9419 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9421 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9422 # Let make expand exec_prefix.
9423 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9425 # Any assignment to VPATH causes Sun make to only execute
9426 # the first set of double-colon rules, so remove it if not needed.
9427 # If there is a colon in the path, we need to keep it.
9428 if test "x$srcdir" = x.; then
9429 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9432 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9434 DEFS=-DHAVE_CONFIG_H
9436 # Without the "./", some shells look in PATH for config.status.
9437 : ${CONFIG_STATUS=./config.status}
9439 echo creating $CONFIG_STATUS
9440 rm -f $CONFIG_STATUS
9441 cat > $CONFIG_STATUS <<EOF
9442 #! /bin/sh
9443 # Generated automatically by configure.
9444 # Run this file to recreate the current configuration.
9445 # This directory was configured as follows,
9446 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9448 # $0 $ac_configure_args
9450 # Compiler output produced by configure, useful for debugging
9451 # configure, is in ./config.log if it exists.
9453 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9454 for ac_option
9456 case "\$ac_option" in
9457 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9458 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9459 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9460 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9461 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9462 exit 0 ;;
9463 -help | --help | --hel | --he | --h)
9464 echo "\$ac_cs_usage"; exit 0 ;;
9465 *) echo "\$ac_cs_usage"; exit 1 ;;
9466 esac
9467 done
9469 ac_given_srcdir=$srcdir
9471 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9473 cat >> $CONFIG_STATUS <<EOF
9475 # Protect against being on the right side of a sed subst in config.status.
9476 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9477 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9478 $ac_vpsub
9479 $extrasub
9480 s%@SHELL@%$SHELL%g
9481 s%@CFLAGS@%$CFLAGS%g
9482 s%@CPPFLAGS@%$CPPFLAGS%g
9483 s%@CXXFLAGS@%$CXXFLAGS%g
9484 s%@FFLAGS@%$FFLAGS%g
9485 s%@DEFS@%$DEFS%g
9486 s%@LDFLAGS@%$LDFLAGS%g
9487 s%@LIBS@%$LIBS%g
9488 s%@exec_prefix@%$exec_prefix%g
9489 s%@prefix@%$prefix%g
9490 s%@program_transform_name@%$program_transform_name%g
9491 s%@bindir@%$bindir%g
9492 s%@sbindir@%$sbindir%g
9493 s%@libexecdir@%$libexecdir%g
9494 s%@datadir@%$datadir%g
9495 s%@sysconfdir@%$sysconfdir%g
9496 s%@sharedstatedir@%$sharedstatedir%g
9497 s%@localstatedir@%$localstatedir%g
9498 s%@libdir@%$libdir%g
9499 s%@includedir@%$includedir%g
9500 s%@oldincludedir@%$oldincludedir%g
9501 s%@infodir@%$infodir%g
9502 s%@mandir@%$mandir%g
9503 s%@host@%$host%g
9504 s%@host_alias@%$host_alias%g
9505 s%@host_cpu@%$host_cpu%g
9506 s%@host_vendor@%$host_vendor%g
9507 s%@host_os@%$host_os%g
9508 s%@target@%$target%g
9509 s%@target_alias@%$target_alias%g
9510 s%@target_cpu@%$target_cpu%g
9511 s%@target_vendor@%$target_vendor%g
9512 s%@target_os@%$target_os%g
9513 s%@build@%$build%g
9514 s%@build_alias@%$build_alias%g
9515 s%@build_cpu@%$build_cpu%g
9516 s%@build_vendor@%$build_vendor%g
9517 s%@build_os@%$build_os%g
9518 s%@build_canonical@%$build_canonical%g
9519 s%@host_canonical@%$host_canonical%g
9520 s%@target_subdir@%$target_subdir%g
9521 s%@CC@%$CC%g
9522 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9523 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9524 s%@CPP@%$CPP%g
9525 s%@GNATBIND@%$GNATBIND%g
9526 s%@ADAC@%$ADAC%g
9527 s%@strict1_warn@%$strict1_warn%g
9528 s%@warn_cflags@%$warn_cflags%g
9529 s%@WERROR@%$WERROR%g
9530 s%@nocommon_flag@%$nocommon_flag%g
9531 s%@valgrind_path@%$valgrind_path%g
9532 s%@valgrind_path_defines@%$valgrind_path_defines%g
9533 s%@valgrind_command@%$valgrind_command%g
9534 s%@coverage_flags@%$coverage_flags%g
9535 s%@enable_multilib@%$enable_multilib%g
9536 s%@enable_shared@%$enable_shared%g
9537 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9538 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9539 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9540 s%@SET_MAKE@%$SET_MAKE%g
9541 s%@AWK@%$AWK%g
9542 s%@LN@%$LN%g
9543 s%@LN_S@%$LN_S%g
9544 s%@RANLIB@%$RANLIB%g
9545 s%@INSTALL@%$INSTALL%g
9546 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9547 s%@INSTALL_DATA@%$INSTALL_DATA%g
9548 s%@have_mktemp_command@%$have_mktemp_command%g
9549 s%@MAKEINFO@%$MAKEINFO%g
9550 s%@BUILD_INFO@%$BUILD_INFO%g
9551 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9552 s%@gnucmp@%$gnucmp%g
9553 s%@make_compare_target@%$make_compare_target%g
9554 s%@FLEX@%$FLEX%g
9555 s%@BISON@%$BISON%g
9556 s%@stage1_cflags@%$stage1_cflags%g
9557 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9558 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9559 s%@LDEXP_LIB@%$LDEXP_LIB%g
9560 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9561 s%@LIBICONV@%$LIBICONV%g
9562 s%@manext@%$manext%g
9563 s%@objext@%$objext%g
9564 s%@extra_modes_file@%$extra_modes_file%g
9565 s%@FORBUILD@%$FORBUILD%g
9566 s%@PACKAGE@%$PACKAGE%g
9567 s%@VERSION@%$VERSION%g
9568 s%@ALLOCA@%$ALLOCA%g
9569 s%@GLIBC21@%$GLIBC21%g
9570 s%@USE_NLS@%$USE_NLS%g
9571 s%@MSGFMT@%$MSGFMT%g
9572 s%@GMSGFMT@%$GMSGFMT%g
9573 s%@XGETTEXT@%$XGETTEXT%g
9574 s%@INTLBISON@%$INTLBISON%g
9575 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9576 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9577 s%@CATALOGS@%$CATALOGS%g
9578 s%@CATOBJEXT@%$CATOBJEXT%g
9579 s%@INTLLIBS@%$INTLLIBS%g
9580 s%@INTLDEPS@%$INTLDEPS%g
9581 s%@INTLOBJS@%$INTLOBJS%g
9582 s%@POSUB@%$POSUB%g
9583 s%@DATADIRNAME@%$DATADIRNAME%g
9584 s%@INSTOBJEXT@%$INSTOBJEXT%g
9585 s%@GENCAT@%$GENCAT%g
9586 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9587 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9588 s%@CROSS@%$CROSS%g
9589 s%@ALL@%$ALL%g
9590 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9591 s%@inhibit_libc@%$inhibit_libc%g
9592 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9593 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9594 s%@BUILD_CC@%$BUILD_CC%g
9595 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9596 s%@STMP_FIXINC@%$STMP_FIXINC%g
9597 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9598 s%@libgcc_visibility@%$libgcc_visibility%g
9599 s%@gthread_flags@%$gthread_flags%g
9600 s%@GGC@%$GGC%g
9601 s%@zlibdir@%$zlibdir%g
9602 s%@zlibinc@%$zlibinc%g
9603 s%@MAINT@%$MAINT%g
9604 s%@gcc_tooldir@%$gcc_tooldir%g
9605 s%@dollar@%$dollar%g
9606 s%@slibdir@%$slibdir%g
9607 s%@objdir@%$objdir%g
9608 s%@subdirs@%$subdirs%g
9609 s%@srcdir@%$srcdir%g
9610 s%@all_boot_languages@%$all_boot_languages%g
9611 s%@all_compilers@%$all_compilers%g
9612 s%@all_gtfiles@%$all_gtfiles%g
9613 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9614 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9615 s%@all_lang_makefiles@%$all_lang_makefiles%g
9616 s%@all_languages@%$all_languages%g
9617 s%@all_stagestuff@%$all_stagestuff%g
9618 s%@build_exeext@%$build_exeext%g
9619 s%@build_install_headers_dir@%$build_install_headers_dir%g
9620 s%@build_xm_file_list@%$build_xm_file_list%g
9621 s%@build_xm_file@%$build_xm_file%g
9622 s%@build_xm_defines@%$build_xm_defines%g
9623 s%@check_languages@%$check_languages%g
9624 s%@cc_set_by_configure@%$cc_set_by_configure%g
9625 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9626 s%@cpp_install_dir@%$cpp_install_dir%g
9627 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9628 s%@dep_tmake_file@%$dep_tmake_file%g
9629 s%@extra_headers_list@%$extra_headers_list%g
9630 s%@extra_objs@%$extra_objs%g
9631 s%@extra_parts@%$extra_parts%g
9632 s%@extra_passes@%$extra_passes%g
9633 s%@extra_programs@%$extra_programs%g
9634 s%@float_h_file@%$float_h_file%g
9635 s%@gcc_config_arguments@%$gcc_config_arguments%g
9636 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9637 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9638 s%@gcc_version@%$gcc_version%g
9639 s%@gcc_version_full@%$gcc_version_full%g
9640 s%@gcc_version_trigger@%$gcc_version_trigger%g
9641 s%@host_exeext@%$host_exeext%g
9642 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9643 s%@host_xm_file_list@%$host_xm_file_list%g
9644 s%@host_xm_file@%$host_xm_file%g
9645 s%@host_xm_defines@%$host_xm_defines%g
9646 s%@out_host_hook_obj@%$out_host_hook_obj%g
9647 s%@install@%$install%g
9648 s%@lang_options_files@%$lang_options_files%g
9649 s%@lang_specs_files@%$lang_specs_files%g
9650 s%@lang_tree_files@%$lang_tree_files%g
9651 s%@local_prefix@%$local_prefix%g
9652 s%@md_file@%$md_file%g
9653 s%@objc_boehm_gc@%$objc_boehm_gc%g
9654 s%@out_file@%$out_file%g
9655 s%@out_object_file@%$out_object_file%g
9656 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9657 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9658 s%@symbolic_link@%$symbolic_link%g
9659 s%@thread_file@%$thread_file%g
9660 s%@tm_file_list@%$tm_file_list%g
9661 s%@tm_file@%$tm_file%g
9662 s%@tm_defines@%$tm_defines%g
9663 s%@tm_p_file_list@%$tm_p_file_list%g
9664 s%@tm_p_file@%$tm_p_file%g
9665 s%@xm_file@%$xm_file%g
9666 s%@xm_defines@%$xm_defines%g
9667 s%@c_target_objs@%$c_target_objs%g
9668 s%@cxx_target_objs@%$cxx_target_objs%g
9669 s%@target_cpu_default@%$target_cpu_default%g
9670 /@target_overrides@/r $target_overrides
9671 s%@target_overrides@%%g
9672 /@host_overrides@/r $host_overrides
9673 s%@host_overrides@%%g
9674 /@language_fragments@/r $language_fragments
9675 s%@language_fragments@%%g
9676 /@language_hooks@/r $language_hooks
9677 s%@language_hooks@%%g
9679 CEOF
9682 cat >> $CONFIG_STATUS <<\EOF
9684 # Split the substitutions into bite-sized pieces for seds with
9685 # small command number limits, like on Digital OSF/1 and HP-UX.
9686 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9687 ac_file=1 # Number of current file.
9688 ac_beg=1 # First line for current file.
9689 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9690 ac_more_lines=:
9691 ac_sed_cmds=""
9692 while $ac_more_lines; do
9693 if test $ac_beg -gt 1; then
9694 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9695 else
9696 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9698 if test ! -s conftest.s$ac_file; then
9699 ac_more_lines=false
9700 rm -f conftest.s$ac_file
9701 else
9702 if test -z "$ac_sed_cmds"; then
9703 ac_sed_cmds="sed -f conftest.s$ac_file"
9704 else
9705 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9707 ac_file=`expr $ac_file + 1`
9708 ac_beg=$ac_end
9709 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9711 done
9712 if test -z "$ac_sed_cmds"; then
9713 ac_sed_cmds=cat
9717 cat >> $CONFIG_STATUS <<EOF
9719 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9721 cat >> $CONFIG_STATUS <<\EOF
9722 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9723 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9724 case "$ac_file" in
9725 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9726 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9727 *) ac_file_in="${ac_file}.in" ;;
9728 esac
9730 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9732 # Remove last slash and all that follows it. Not all systems have dirname.
9733 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9734 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9735 # The file is in a subdirectory.
9736 test ! -d "$ac_dir" && mkdir "$ac_dir"
9737 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9738 # A "../" for each directory in $ac_dir_suffix.
9739 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9740 else
9741 ac_dir_suffix= ac_dots=
9744 case "$ac_given_srcdir" in
9745 .) srcdir=.
9746 if test -z "$ac_dots"; then top_srcdir=.
9747 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9748 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9749 *) # Relative path.
9750 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9751 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9752 esac
9755 echo creating "$ac_file"
9756 rm -f "$ac_file"
9757 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9758 case "$ac_file" in
9759 *Makefile*) ac_comsub="1i\\
9760 # $configure_input" ;;
9761 *) ac_comsub= ;;
9762 esac
9764 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9765 sed -e "$ac_comsub
9766 s%@configure_input@%$configure_input%g
9767 s%@srcdir@%$srcdir%g
9768 s%@top_srcdir@%$top_srcdir%g
9769 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9770 fi; done
9771 rm -f conftest.s*
9773 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9774 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9776 # ac_d sets the value in "#define NAME VALUE" lines.
9777 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9778 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9779 ac_dC='\3'
9780 ac_dD='%g'
9781 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9782 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9783 ac_uB='\([ ]\)%\1#\2define\3'
9784 ac_uC=' '
9785 ac_uD='\4%g'
9786 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9787 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9788 ac_eB='$%\1#\2define\3'
9789 ac_eC=' '
9790 ac_eD='%g'
9792 if test "${CONFIG_HEADERS+set}" != set; then
9794 cat >> $CONFIG_STATUS <<EOF
9795 CONFIG_HEADERS="auto-host.h:config.in"
9797 cat >> $CONFIG_STATUS <<\EOF
9799 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9800 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9801 case "$ac_file" in
9802 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9803 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9804 *) ac_file_in="${ac_file}.in" ;;
9805 esac
9807 echo creating $ac_file
9809 rm -f conftest.frag conftest.in conftest.out
9810 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9811 cat $ac_file_inputs > conftest.in
9815 # Transform confdefs.h into a sed script conftest.vals that substitutes
9816 # the proper values into config.h.in to produce config.h. And first:
9817 # Protect against being on the right side of a sed subst in config.status.
9818 # Protect against being in an unquoted here document in config.status.
9819 rm -f conftest.vals
9820 cat > conftest.hdr <<\EOF
9821 s/[\\&%]/\\&/g
9822 s%[\\$`]%\\&%g
9823 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9824 s%ac_d%ac_u%gp
9825 s%ac_u%ac_e%gp
9827 sed -n -f conftest.hdr confdefs.h > conftest.vals
9828 rm -f conftest.hdr
9830 # This sed command replaces #undef with comments. This is necessary, for
9831 # example, in the case of _POSIX_SOURCE, which is predefined and required
9832 # on some systems where configure will not decide to define it.
9833 cat >> conftest.vals <<\EOF
9834 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9837 # Break up conftest.vals because some shells have a limit on
9838 # the size of here documents, and old seds have small limits too.
9840 rm -f conftest.tail
9841 while :
9843 ac_lines=`grep -c . conftest.vals`
9844 # grep -c gives empty output for an empty file on some AIX systems.
9845 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9846 # Write a limited-size here document to conftest.frag.
9847 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9848 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9849 echo 'CEOF
9850 sed -f conftest.frag conftest.in > conftest.out
9851 rm -f conftest.in
9852 mv conftest.out conftest.in
9853 ' >> $CONFIG_STATUS
9854 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9855 rm -f conftest.vals
9856 mv conftest.tail conftest.vals
9857 done
9858 rm -f conftest.vals
9860 cat >> $CONFIG_STATUS <<\EOF
9861 rm -f conftest.frag conftest.h
9862 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9863 cat conftest.in >> conftest.h
9864 rm -f conftest.in
9865 if cmp -s $ac_file conftest.h 2>/dev/null; then
9866 echo "$ac_file is unchanged"
9867 rm -f conftest.h
9868 else
9869 # Remove last slash and all that follows it. Not all systems have dirname.
9870 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9871 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9872 # The file is in a subdirectory.
9873 test ! -d "$ac_dir" && mkdir "$ac_dir"
9875 rm -f $ac_file
9876 mv conftest.h $ac_file
9878 fi; done
9881 cat >> $CONFIG_STATUS <<EOF
9883 subdirs='$subdirs'
9884 symbolic_link='$symbolic_link'
9887 cat >> $CONFIG_STATUS <<\EOF
9888 for ac_file in $CONFIG_FILES; do
9889 # Support "outfile[:infile[:infile...]]"
9890 case "$ac_file" in
9891 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9892 esac
9893 # PO directories have a Makefile.in generated from Makefile.in.in.
9894 case "$ac_file" in */Makefile.in)
9895 # Adjust a relative srcdir.
9896 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9897 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9898 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9899 # In autoconf-2.13 it is called $ac_given_srcdir.
9900 # In autoconf-2.50 it is called $srcdir.
9901 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9902 case "$ac_given_srcdir" in
9903 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9904 /*) top_srcdir="$ac_given_srcdir" ;;
9905 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9906 esac
9907 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9908 rm -f "$ac_dir/POTFILES"
9909 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9910 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9911 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9912 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9915 esac
9916 done
9918 case x$CONFIG_HEADERS in
9919 xauto-host.h:config.in)
9920 echo > cstamp-h ;;
9921 esac
9922 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9923 # bootstrapping and the installation procedure can still use
9924 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9925 # FLAGS_TO_PASS has been modified to solve the problem there.
9926 # This is virtually a duplicate of what happens in configure.lang; we do
9927 # an extra check to make sure this only happens if ln -s can be used.
9928 if test "$symbolic_link" = "ln -s"; then
9929 for d in .. ${subdirs} fixinc ; do
9930 if test $d != ..; then
9931 STARTDIR=`${PWDCMD-pwd}`
9932 cd $d
9933 for t in stage1 stage2 stage3 stage4 include
9935 rm -f $t
9936 $symbolic_link ../$t $t 2>/dev/null
9937 done
9938 cd $STARTDIR
9940 done
9941 else true ; fi
9942 # Avoid having to add intl to our include paths.
9943 if test -f intl/libintl.h; then
9944 echo creating libintl.h
9945 echo '#include "intl/libintl.h"' >libintl.h
9948 exit 0
9950 chmod +x $CONFIG_STATUS
9951 rm -fr confdefs* $ac_clean_files
9952 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1