2003-05-31 Bud Davis <bdavis9659@comcast.net>
[official-gcc.git] / gcc / configure
blobfe5e6b39f7a0dc285a2a7667e278de5203537de7
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 gawk mawk 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 # 'make compare' can be significantly faster, if cmp itself can
2742 # skip bytes instead of using tail. The test being performed is
2743 # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
2744 # but we need to sink errors and handle broken shells.
2745 echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6
2746 echo "configure:2747: checking for cmp's capabilities" >&5
2747 echo abfoo >t1
2748 echo cdfoo >t2
2749 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2750 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2751 make_compare_target=slowcompare
2752 else
2753 make_compare_target=gnucompare
2755 else
2756 make_compare_target=slowcompare
2758 rm t1 t2
2760 echo "$ac_t""$make_compare_target" 1>&6
2762 # How about lex?
2763 if test -f $srcdir/../flex/skel.c; then
2764 FLEX='$(objdir)/../flex/flex'
2765 else
2766 # Extract the first word of "flex", so it can be a program name with args.
2767 set dummy flex; ac_word=$2
2768 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2769 echo "configure:2770: checking for $ac_word" >&5
2770 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2771 echo $ac_n "(cached) $ac_c" 1>&6
2772 else
2773 if test -n "$FLEX"; then
2774 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2775 else
2776 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2777 ac_dummy="$PATH"
2778 for ac_dir in $ac_dummy; do
2779 test -z "$ac_dir" && ac_dir=.
2780 if test -f $ac_dir/$ac_word; then
2781 ac_cv_prog_FLEX="flex"
2782 break
2784 done
2785 IFS="$ac_save_ifs"
2786 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
2789 FLEX="$ac_cv_prog_FLEX"
2790 if test -n "$FLEX"; then
2791 echo "$ac_t""$FLEX" 1>&6
2792 else
2793 echo "$ac_t""no" 1>&6
2798 # Bison?
2799 # The -L switch is so bison can find its skeleton file.
2800 if test -f $srcdir/../bison/bison.simple; then
2801 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2802 else
2803 # Extract the first word of "bison", so it can be a program name with args.
2804 set dummy bison; ac_word=$2
2805 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2806 echo "configure:2807: checking for $ac_word" >&5
2807 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2808 echo $ac_n "(cached) $ac_c" 1>&6
2809 else
2810 if test -n "$BISON"; then
2811 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2812 else
2813 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2814 ac_dummy="$PATH"
2815 for ac_dir in $ac_dummy; do
2816 test -z "$ac_dir" && ac_dir=.
2817 if test -f $ac_dir/$ac_word; then
2818 ac_cv_prog_BISON="bison"
2819 break
2821 done
2822 IFS="$ac_save_ifs"
2823 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
2826 BISON="$ac_cv_prog_BISON"
2827 if test -n "$BISON"; then
2828 echo "$ac_t""$BISON" 1>&6
2829 else
2830 echo "$ac_t""no" 1>&6
2835 # --------------------
2836 # Checks for C headers
2837 # --------------------
2839 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2840 echo "configure:2841: checking for GNU C library" >&5
2841 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <features.h>
2848 int main() {
2850 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2851 #error Not a GNU C library system
2852 #endif
2853 ; return 0; }
2855 if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2856 rm -rf conftest*
2857 gcc_cv_glibc=yes
2858 else
2859 echo "configure: failed program was:" >&5
2860 cat conftest.$ac_ext >&5
2861 rm -rf conftest*
2862 gcc_cv_glibc=no
2864 rm -f conftest*
2867 echo "$ac_t""$gcc_cv_glibc" 1>&6
2868 if test $gcc_cv_glibc = yes; then
2869 cat >> confdefs.h <<\EOF
2870 #define _GNU_SOURCE 1
2875 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2876 echo "configure:2877: checking for ANSI C header files" >&5
2877 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2878 echo $ac_n "(cached) $ac_c" 1>&6
2879 else
2880 cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2883 #include <stdlib.h>
2884 #include <stdarg.h>
2885 #include <string.h>
2886 #include <float.h>
2888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2889 { (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2891 if test -z "$ac_err"; then
2892 rm -rf conftest*
2893 ac_cv_header_stdc=yes
2894 else
2895 echo "$ac_err" >&5
2896 echo "configure: failed program was:" >&5
2897 cat conftest.$ac_ext >&5
2898 rm -rf conftest*
2899 ac_cv_header_stdc=no
2901 rm -f conftest*
2903 if test $ac_cv_header_stdc = yes; then
2904 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2905 cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <string.h>
2910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2911 egrep "memchr" >/dev/null 2>&1; then
2913 else
2914 rm -rf conftest*
2915 ac_cv_header_stdc=no
2917 rm -f conftest*
2921 if test $ac_cv_header_stdc = yes; then
2922 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2923 cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 #include <stdlib.h>
2928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2929 egrep "free" >/dev/null 2>&1; then
2931 else
2932 rm -rf conftest*
2933 ac_cv_header_stdc=no
2935 rm -f conftest*
2939 if test $ac_cv_header_stdc = yes; then
2940 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2941 if test "$cross_compiling" = yes; then
2943 else
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #include <ctype.h>
2948 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2949 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2950 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2951 int main () { int i; for (i = 0; i < 256; i++)
2952 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2953 exit (0); }
2956 if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2957 then
2959 else
2960 echo "configure: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 rm -fr conftest*
2963 ac_cv_header_stdc=no
2965 rm -fr conftest*
2971 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2972 if test $ac_cv_header_stdc = yes; then
2973 cat >> confdefs.h <<\EOF
2974 #define STDC_HEADERS 1
2979 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2980 echo "configure:2981: checking whether time.h and sys/time.h may both be included" >&5
2981 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2982 echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984 cat > conftest.$ac_ext <<EOF
2985 #line 2986 "configure"
2986 #include "confdefs.h"
2987 #include <sys/types.h>
2988 #include <sys/time.h>
2989 #include <time.h>
2990 int main() {
2991 struct tm *tp;
2992 ; return 0; }
2994 if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995 rm -rf conftest*
2996 ac_cv_header_time=yes
2997 else
2998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -rf conftest*
3001 ac_cv_header_time=no
3003 rm -f conftest*
3006 echo "$ac_t""$ac_cv_header_time" 1>&6
3007 if test $ac_cv_header_time = yes; then
3008 cat >> confdefs.h <<\EOF
3009 #define TIME_WITH_SYS_TIME 1
3014 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
3015 echo "configure:3016: checking for working stdbool.h" >&5
3016 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
3017 echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019 cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022 #include <stdbool.h>
3023 int main() {
3024 bool foo = false;
3025 ; return 0; }
3027 if { (eval echo configure:3028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3028 rm -rf conftest*
3029 ac_cv_header_stdbool_h=yes
3030 else
3031 echo "configure: failed program was:" >&5
3032 cat conftest.$ac_ext >&5
3033 rm -rf conftest*
3034 ac_cv_header_stdbool_h=no
3036 rm -f conftest*
3039 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
3040 if test $ac_cv_header_stdbool_h = yes; then
3041 cat >> confdefs.h <<\EOF
3042 #define HAVE_STDBOOL_H 1
3047 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
3048 echo "configure:3049: checking whether string.h and strings.h may both be included" >&5
3049 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052 cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <string.h>
3056 #include <strings.h>
3057 int main() {
3059 ; return 0; }
3061 if { (eval echo configure:3062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3062 rm -rf conftest*
3063 gcc_cv_header_string=yes
3064 else
3065 echo "configure: failed program was:" >&5
3066 cat conftest.$ac_ext >&5
3067 rm -rf conftest*
3068 gcc_cv_header_string=no
3070 rm -f conftest*
3073 echo "$ac_t""$gcc_cv_header_string" 1>&6
3074 if test $gcc_cv_header_string = yes; then
3075 cat >> confdefs.h <<\EOF
3076 #define STRING_WITH_STRINGS 1
3081 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3082 echo "configure:3083: checking for sys/wait.h that is POSIX.1 compatible" >&5
3083 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
3084 echo $ac_n "(cached) $ac_c" 1>&6
3085 else
3086 cat > conftest.$ac_ext <<EOF
3087 #line 3088 "configure"
3088 #include "confdefs.h"
3089 #include <sys/types.h>
3090 #include <sys/wait.h>
3091 #ifndef WEXITSTATUS
3092 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3093 #endif
3094 #ifndef WIFEXITED
3095 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3096 #endif
3097 int main() {
3098 int s;
3099 wait (&s);
3100 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3101 ; return 0; }
3103 if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3104 rm -rf conftest*
3105 ac_cv_header_sys_wait_h=yes
3106 else
3107 echo "configure: failed program was:" >&5
3108 cat conftest.$ac_ext >&5
3109 rm -rf conftest*
3110 ac_cv_header_sys_wait_h=no
3112 rm -f conftest*
3115 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3116 if test $ac_cv_header_sys_wait_h = yes; then
3117 cat >> confdefs.h <<\EOF
3118 #define HAVE_SYS_WAIT_H 1
3123 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
3124 fcntl.h unistd.h sys/file.h sys/time.h \
3125 sys/resource.h sys/param.h sys/times.h sys/stat.h \
3126 direct.h malloc.h langinfo.h ldfcn.h wchar.h
3128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3130 echo "configure:3131: checking for $ac_hdr" >&5
3131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3132 echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 #include <$ac_hdr>
3139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3140 { (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3142 if test -z "$ac_err"; then
3143 rm -rf conftest*
3144 eval "ac_cv_header_$ac_safe=yes"
3145 else
3146 echo "$ac_err" >&5
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3149 rm -rf conftest*
3150 eval "ac_cv_header_$ac_safe=no"
3152 rm -f conftest*
3154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3155 echo "$ac_t""yes" 1>&6
3156 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3157 cat >> confdefs.h <<EOF
3158 #define $ac_tr_hdr 1
3161 else
3162 echo "$ac_t""no" 1>&6
3164 done
3167 # Check for thread headers.
3168 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
3169 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
3170 echo "configure:3171: checking for thread.h" >&5
3171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174 cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 #include <thread.h>
3179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3180 { (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3182 if test -z "$ac_err"; then
3183 rm -rf conftest*
3184 eval "ac_cv_header_$ac_safe=yes"
3185 else
3186 echo "$ac_err" >&5
3187 echo "configure: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 rm -rf conftest*
3190 eval "ac_cv_header_$ac_safe=no"
3192 rm -f conftest*
3194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3195 echo "$ac_t""yes" 1>&6
3196 have_thread_h=yes
3197 else
3198 echo "$ac_t""no" 1>&6
3199 have_thread_h=
3202 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
3203 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
3204 echo "configure:3205: checking for pthread.h" >&5
3205 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3206 echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 #include <pthread.h>
3213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3214 { (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3216 if test -z "$ac_err"; then
3217 rm -rf conftest*
3218 eval "ac_cv_header_$ac_safe=yes"
3219 else
3220 echo "$ac_err" >&5
3221 echo "configure: failed program was:" >&5
3222 cat conftest.$ac_ext >&5
3223 rm -rf conftest*
3224 eval "ac_cv_header_$ac_safe=no"
3226 rm -f conftest*
3228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3229 echo "$ac_t""yes" 1>&6
3230 have_pthread_h=yes
3231 else
3232 echo "$ac_t""no" 1>&6
3233 have_pthread_h=
3237 # These tests can't be done till we know if we have limits.h.
3238 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3239 echo "configure:3240: checking for CHAR_BIT" >&5
3240 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3241 echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243 cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 #ifdef HAVE_LIMITS_H
3247 #include <limits.h>
3248 #endif
3249 #ifdef CHAR_BIT
3250 found
3251 #endif
3253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3254 egrep "found" >/dev/null 2>&1; then
3255 rm -rf conftest*
3256 gcc_cv_decl_char_bit=yes
3257 else
3258 rm -rf conftest*
3259 gcc_cv_decl_char_bit=no
3261 rm -f conftest*
3266 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3267 if test $gcc_cv_decl_char_bit = no; then
3268 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3269 echo "configure:3270: checking number of bits in a byte" >&5
3270 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3271 echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3274 gcc_cv_c_nbby=
3275 while test $i -lt 65; do
3276 cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3280 int main() {
3281 switch(0) {
3282 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3283 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3285 ; return 0; }
3287 if { (eval echo configure:3288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3288 rm -rf conftest*
3289 gcc_cv_c_nbby=$i; break
3290 else
3291 echo "configure: failed program was:" >&5
3292 cat conftest.$ac_ext >&5
3294 rm -f conftest*
3295 i=`expr $i + 1`
3296 done
3297 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3301 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3302 if test $gcc_cv_c_nbby = failed; then
3303 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3304 else
3305 cat >> confdefs.h <<EOF
3306 #define CHAR_BIT $gcc_cv_c_nbby
3311 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3312 echo "configure:3313: checking whether byte ordering is bigendian" >&5
3313 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3314 echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316 ac_cv_c_bigendian=unknown
3317 # See if sys/param.h defines the BYTE_ORDER macro.
3318 cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <sys/types.h>
3322 #include <sys/param.h>
3323 int main() {
3325 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3326 bogus endian macros
3327 #endif
3328 ; return 0; }
3330 if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3331 rm -rf conftest*
3332 # It does; now see whether it defined to BIG_ENDIAN or not.
3333 cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 #include <sys/param.h>
3338 int main() {
3340 #if BYTE_ORDER != BIG_ENDIAN
3341 not big endian
3342 #endif
3343 ; return 0; }
3345 if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3346 rm -rf conftest*
3347 ac_cv_c_bigendian=yes
3348 else
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3351 rm -rf conftest*
3352 ac_cv_c_bigendian=no
3354 rm -f conftest*
3355 else
3356 echo "configure: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3359 rm -f conftest*
3360 if test $ac_cv_c_bigendian = unknown; then
3361 if test "$cross_compiling" = yes; then
3362 echo $ac_n "cross-compiling... " 2>&6
3363 else
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3367 main () {
3368 /* Are we little or big endian? From Harbison&Steele. */
3369 union
3371 long l;
3372 char c[sizeof (long)];
3373 } u;
3374 u.l = 1;
3375 exit (u.c[sizeof (long) - 1] == 1);
3378 if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3379 then
3380 ac_cv_c_bigendian=no
3381 else
3382 echo "configure: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384 rm -fr conftest*
3385 ac_cv_c_bigendian=yes
3387 rm -fr conftest*
3393 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3394 if test $ac_cv_c_bigendian = unknown; then
3395 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3396 echo "configure:3397: checking to probe for byte ordering" >&5
3398 cat >conftest.c <<EOF
3399 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3400 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3401 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3402 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3403 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3404 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3405 int main() { _ascii (); _ebcdic (); return 0; }
3407 if test -f conftest.c ; then
3408 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3409 if test `grep -l BIGenDianSyS conftest.o` ; then
3410 echo $ac_n ' big endian probe OK, ' 1>&6
3411 ac_cv_c_bigendian=yes
3413 if test `grep -l LiTTleEnDian conftest.o` ; then
3414 echo $ac_n ' little endian probe OK, ' 1>&6
3415 if test $ac_cv_c_bigendian = yes ; then
3416 ac_cv_c_bigendian=unknown;
3417 else
3418 ac_cv_c_bigendian=no
3421 echo $ac_n 'guessing bigendian ... ' >&6
3424 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3426 if test $ac_cv_c_bigendian = yes; then
3427 cat >> confdefs.h <<\EOF
3428 #define WORDS_BIGENDIAN 1
3431 cat >> confdefs.h <<\EOF
3432 #define HOST_WORDS_BIG_ENDIAN 1
3435 BYTEORDER=4321
3436 else
3437 BYTEORDER=1234
3439 cat >> confdefs.h <<EOF
3440 #define BYTEORDER $BYTEORDER
3443 if test $ac_cv_c_bigendian = unknown; then
3444 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3448 # --------
3449 # UNSORTED
3450 # --------
3452 # Stage specific cflags for build.
3453 stage1_cflags=
3454 case $build in
3455 vax-*-*)
3456 if test x$GCC = xyes
3457 then
3458 stage1_cflags="-Wa,-J"
3459 else
3460 stage1_cflags="-J"
3463 powerpc-*-darwin*)
3464 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
3465 # sources; use -no-cpp-precomp to get to GNU cpp.
3466 # Apple's GCC has bugs in designated initializer handling, so disable
3467 # that too.
3468 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
3470 esac
3473 # These libraries may be used by collect2.
3474 # We may need a special search path to get them linked.
3475 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3476 echo "configure:3477: checking for collect2 libraries" >&5
3477 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3478 echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480 save_LIBS="$LIBS"
3481 for libs in '' -lld -lmld \
3482 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3483 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3485 LIBS="$libs"
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 /* Override any gcc2 internal prototype to avoid an error. */
3490 /* We use char because int might match the return type of a gcc2
3491 builtin and then its argument prototype would still apply. */
3492 char ldopen();
3494 int main() {
3495 ldopen()
3496 ; return 0; }
3498 if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3499 rm -rf conftest*
3500 gcc_cv_collect2_libs="$libs"; break
3501 else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3505 rm -f conftest*
3506 done
3507 LIBS="$save_LIBS"
3508 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3511 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3512 case $gcc_cv_collect2_libs in
3513 "none required") ;;
3514 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3515 esac
3518 # When building Ada code on Alpha, we need exc_resume which is usually in
3519 # -lexc. So test for it.
3520 save_LIBS="$LIBS"
3521 LIBS=
3523 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3524 echo "configure:3525: checking for library containing exc_resume" >&5
3525 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3526 echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528 ac_func_search_save_LIBS="$LIBS"
3529 ac_cv_search_exc_resume="no"
3530 cat > conftest.$ac_ext <<EOF
3531 #line 3532 "configure"
3532 #include "confdefs.h"
3533 /* Override any gcc2 internal prototype to avoid an error. */
3534 /* We use char because int might match the return type of a gcc2
3535 builtin and then its argument prototype would still apply. */
3536 char exc_resume();
3538 int main() {
3539 exc_resume()
3540 ; return 0; }
3542 if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3543 rm -rf conftest*
3544 ac_cv_search_exc_resume="none required"
3545 else
3546 echo "configure: failed program was:" >&5
3547 cat conftest.$ac_ext >&5
3549 rm -f conftest*
3550 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3551 LIBS="-l$i $ac_func_search_save_LIBS"
3552 cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555 /* Override any gcc2 internal prototype to avoid an error. */
3556 /* We use char because int might match the return type of a gcc2
3557 builtin and then its argument prototype would still apply. */
3558 char exc_resume();
3560 int main() {
3561 exc_resume()
3562 ; return 0; }
3564 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3565 rm -rf conftest*
3566 ac_cv_search_exc_resume="-l$i"
3567 break
3568 else
3569 echo "configure: failed program was:" >&5
3570 cat conftest.$ac_ext >&5
3572 rm -f conftest*
3573 done
3574 LIBS="$ac_func_search_save_LIBS"
3577 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3578 if test "$ac_cv_search_exc_resume" != "no"; then
3579 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3581 else :
3584 GNAT_LIBEXC="$LIBS"
3585 LIBS="$save_LIBS"
3588 # Some systems put ldexp and frexp in libm instead of libc; assume
3589 # they're both in the same place. jcf-dump needs them.
3590 save_LIBS="$LIBS"
3591 LIBS=
3593 echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6
3594 echo "configure:3595: checking for library containing ldexp" >&5
3595 if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then
3596 echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598 ac_func_search_save_LIBS="$LIBS"
3599 ac_cv_search_ldexp="no"
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 /* Override any gcc2 internal prototype to avoid an error. */
3604 /* We use char because int might match the return type of a gcc2
3605 builtin and then its argument prototype would still apply. */
3606 char ldexp();
3608 int main() {
3609 ldexp()
3610 ; return 0; }
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3613 rm -rf conftest*
3614 ac_cv_search_ldexp="none required"
3615 else
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3619 rm -f conftest*
3620 test "$ac_cv_search_ldexp" = "no" && for i in m; do
3621 LIBS="-l$i $ac_func_search_save_LIBS"
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 /* Override any gcc2 internal prototype to avoid an error. */
3626 /* We use char because int might match the return type of a gcc2
3627 builtin and then its argument prototype would still apply. */
3628 char ldexp();
3630 int main() {
3631 ldexp()
3632 ; return 0; }
3634 if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3635 rm -rf conftest*
3636 ac_cv_search_ldexp="-l$i"
3637 break
3638 else
3639 echo "configure: failed program was:" >&5
3640 cat conftest.$ac_ext >&5
3642 rm -f conftest*
3643 done
3644 LIBS="$ac_func_search_save_LIBS"
3647 echo "$ac_t""$ac_cv_search_ldexp" 1>&6
3648 if test "$ac_cv_search_ldexp" != "no"; then
3649 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
3651 else :
3654 LDEXP_LIB="$LIBS"
3655 LIBS="$save_LIBS"
3658 # See if the stage1 system preprocessor understands the ANSI C
3659 # preprocessor stringification operator. (Used by symcat.h.)
3662 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3663 echo "configure:3664: checking for preprocessor stringizing operator" >&5
3664 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3665 echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667 cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3671 #define x(y) #y
3673 char *s = x(teststring);
3676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3677 egrep "#teststring" >/dev/null 2>&1; then
3678 rm -rf conftest*
3679 ac_cv_c_stringize=no
3680 else
3681 rm -rf conftest*
3682 ac_cv_c_stringize=yes
3684 rm -f conftest*
3688 if test "${ac_cv_c_stringize}" = yes
3689 then
3690 cat >> confdefs.h <<\EOF
3691 #define HAVE_STRINGIZE 1
3695 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3698 # Use <inttypes.h> only if it exists,
3699 # doesn't clash with <sys/types.h>, and declares intmax_t.
3700 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3701 echo "configure:3702: checking for inttypes.h" >&5
3702 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3703 echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <sys/types.h>
3709 #include <inttypes.h>
3710 int main() {
3711 intmax_t i = -1;
3712 ; return 0; }
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715 rm -rf conftest*
3716 gcc_cv_header_inttypes_h=yes
3717 else
3718 echo "configure: failed program was:" >&5
3719 cat conftest.$ac_ext >&5
3720 rm -rf conftest*
3721 gcc_cv_header_inttypes_h=no
3723 rm -f conftest*
3726 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3727 if test $gcc_cv_header_inttypes_h = yes; then
3728 cat >> confdefs.h <<\EOF
3729 #define HAVE_INTTYPES_H 1
3735 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3736 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3737 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3738 scandir alphasort gettimeofday mbstowcs wcswidth
3740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3741 echo "configure:3742: checking for $ac_func" >&5
3742 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3743 echo $ac_n "(cached) $ac_c" 1>&6
3744 else
3745 cat > conftest.$ac_ext <<EOF
3746 #line 3747 "configure"
3747 #include "confdefs.h"
3748 /* System header to define __stub macros and hopefully few prototypes,
3749 which can conflict with char $ac_func(); below. */
3750 #include <assert.h>
3751 /* Override any gcc2 internal prototype to avoid an error. */
3752 /* We use char because int might match the return type of a gcc2
3753 builtin and then its argument prototype would still apply. */
3754 char $ac_func();
3756 int main() {
3758 /* The GNU C library defines this for functions which it implements
3759 to always fail with ENOSYS. Some functions are actually named
3760 something starting with __ and the normal name is an alias. */
3761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3762 choke me
3763 #else
3764 $ac_func();
3765 #endif
3767 ; return 0; }
3769 if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3770 rm -rf conftest*
3771 eval "ac_cv_func_$ac_func=yes"
3772 else
3773 echo "configure: failed program was:" >&5
3774 cat conftest.$ac_ext >&5
3775 rm -rf conftest*
3776 eval "ac_cv_func_$ac_func=no"
3778 rm -f conftest*
3781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3782 echo "$ac_t""yes" 1>&6
3783 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3784 cat >> confdefs.h <<EOF
3785 #define $ac_tr_func 1
3788 else
3789 echo "$ac_t""no" 1>&6
3791 done
3794 if test x$ac_cv_func_mbstowcs = xyes; then
3795 echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6
3796 echo "configure:3797: checking whether mbstowcs works" >&5
3797 if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800 if test "$cross_compiling" = yes; then
3801 gcc_cv_func_mbstowcs_works=yes
3802 else
3803 cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 #include <stdlib.h>
3807 int main()
3809 mbstowcs(0, "", 0);
3810 return 0;
3813 if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3814 then
3815 gcc_cv_func_mbstowcs_works=yes
3816 else
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 rm -fr conftest*
3820 gcc_cv_func_mbstowcs_works=no
3822 rm -fr conftest*
3827 echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6
3828 if test x$gcc_cv_func_mbstowcs_works = xyes; then
3829 cat >> confdefs.h <<\EOF
3830 #define HAVE_WORKING_MBSTOWCS 1
3836 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3837 echo "configure:3838: checking for ssize_t" >&5
3838 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3839 echo $ac_n "(cached) $ac_c" 1>&6
3840 else
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 #include <sys/types.h>
3845 #if STDC_HEADERS
3846 #include <stdlib.h>
3847 #include <stddef.h>
3848 #endif
3850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3851 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3852 rm -rf conftest*
3853 ac_cv_type_ssize_t=yes
3854 else
3855 rm -rf conftest*
3856 ac_cv_type_ssize_t=no
3858 rm -f conftest*
3861 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3862 if test $ac_cv_type_ssize_t = no; then
3863 cat >> confdefs.h <<\EOF
3864 #define ssize_t int
3870 # Try to determine the array type of the second argument of getgroups
3871 # for the target system (int or gid_t).
3872 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3873 echo "configure:3874: checking for uid_t in sys/types.h" >&5
3874 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3875 echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3880 #include <sys/types.h>
3882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3883 egrep "uid_t" >/dev/null 2>&1; then
3884 rm -rf conftest*
3885 ac_cv_type_uid_t=yes
3886 else
3887 rm -rf conftest*
3888 ac_cv_type_uid_t=no
3890 rm -f conftest*
3894 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3895 if test $ac_cv_type_uid_t = no; then
3896 cat >> confdefs.h <<\EOF
3897 #define uid_t int
3900 cat >> confdefs.h <<\EOF
3901 #define gid_t int
3906 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3907 echo "configure:3908: checking type of array argument to getgroups" >&5
3908 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3909 echo $ac_n "(cached) $ac_c" 1>&6
3910 else
3911 if test "$cross_compiling" = yes; then
3912 ac_cv_type_getgroups=cross
3913 else
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3918 /* Thanks to Mike Rendell for this test. */
3919 #include <sys/types.h>
3920 #define NGID 256
3921 #undef MAX
3922 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3923 main()
3925 gid_t gidset[NGID];
3926 int i, n;
3927 union { gid_t gval; long lval; } val;
3929 val.lval = -1;
3930 for (i = 0; i < NGID; i++)
3931 gidset[i] = val.gval;
3932 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3933 gidset);
3934 /* Exit non-zero if getgroups seems to require an array of ints. This
3935 happens when gid_t is short but getgroups modifies an array of ints. */
3936 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3940 if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3941 then
3942 ac_cv_type_getgroups=gid_t
3943 else
3944 echo "configure: failed program was:" >&5
3945 cat conftest.$ac_ext >&5
3946 rm -fr conftest*
3947 ac_cv_type_getgroups=int
3949 rm -fr conftest*
3952 if test $ac_cv_type_getgroups = cross; then
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <unistd.h>
3958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3959 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3960 rm -rf conftest*
3961 ac_cv_type_getgroups=gid_t
3962 else
3963 rm -rf conftest*
3964 ac_cv_type_getgroups=int
3966 rm -f conftest*
3971 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3972 cat >> confdefs.h <<EOF
3973 #define GETGROUPS_T $ac_cv_type_getgroups
3977 if test "${target}" = "${build}"; then
3978 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3979 else
3980 case "${target}" in
3981 # This condition may need some tweaking. It should include all
3982 # targets where the array type of the second argument of getgroups
3983 # is int and the type of gid_t is not equivalent to int.
3984 *-*-sunos* | *-*-ultrix*)
3985 TARGET_GETGROUPS_T=int
3988 TARGET_GETGROUPS_T=gid_t
3990 esac
3994 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3995 echo "configure:3996: checking whether the printf functions support %p" >&5
3996 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3997 echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999 if test "$cross_compiling" = yes; then
4000 gcc_cv_func_printf_ptr=no
4001 else
4002 cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <stdio.h>
4007 int main()
4009 char buf[64];
4010 char *p = buf, *q = NULL;
4011 sprintf(buf, "%p", p);
4012 sscanf(buf, "%p", &q);
4013 return (p != q);
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4017 then
4018 gcc_cv_func_printf_ptr=yes
4019 else
4020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 rm -fr conftest*
4023 gcc_cv_func_printf_ptr=no
4025 rm -fr conftest*
4028 rm -f core core.* *.core
4031 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
4032 if test $gcc_cv_func_printf_ptr = yes ; then
4033 cat >> confdefs.h <<\EOF
4034 #define HAVE_PRINTF_PTR 1
4040 case "${host}" in
4041 *-*-uwin*)
4042 { echo "configure: error:
4043 *** UWIN may not be used as a host platform because
4044 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4046 *-*-*vms*)
4047 # Under VMS, vfork works very different than on Unix. The standard test
4048 # won't work, and it isn't easily adaptable. It makes more sense to
4049 # just force it.
4050 ac_cv_func_vfork_works=yes
4052 esac
4053 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4054 echo "configure:4055: checking for pid_t" >&5
4055 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4056 echo $ac_n "(cached) $ac_c" 1>&6
4057 else
4058 cat > conftest.$ac_ext <<EOF
4059 #line 4060 "configure"
4060 #include "confdefs.h"
4061 #include <sys/types.h>
4062 #if STDC_HEADERS
4063 #include <stdlib.h>
4064 #include <stddef.h>
4065 #endif
4067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4068 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4069 rm -rf conftest*
4070 ac_cv_type_pid_t=yes
4071 else
4072 rm -rf conftest*
4073 ac_cv_type_pid_t=no
4075 rm -f conftest*
4078 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4079 if test $ac_cv_type_pid_t = no; then
4080 cat >> confdefs.h <<\EOF
4081 #define pid_t int
4086 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4087 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4088 echo "configure:4089: checking for vfork.h" >&5
4089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095 #include <vfork.h>
4097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4098 { (eval echo configure:4099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4100 if test -z "$ac_err"; then
4101 rm -rf conftest*
4102 eval "ac_cv_header_$ac_safe=yes"
4103 else
4104 echo "$ac_err" >&5
4105 echo "configure: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107 rm -rf conftest*
4108 eval "ac_cv_header_$ac_safe=no"
4110 rm -f conftest*
4112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4113 echo "$ac_t""yes" 1>&6
4114 cat >> confdefs.h <<\EOF
4115 #define HAVE_VFORK_H 1
4118 else
4119 echo "$ac_t""no" 1>&6
4122 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4123 echo "configure:4124: checking for working vfork" >&5
4124 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4125 echo $ac_n "(cached) $ac_c" 1>&6
4126 else
4127 if test "$cross_compiling" = yes; then
4128 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4129 echo "configure:4130: checking for vfork" >&5
4130 if eval "test \"`echo '$''{'ac_cv_func_vfork'+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 /* System header to define __stub macros and hopefully few prototypes,
4137 which can conflict with char vfork(); below. */
4138 #include <assert.h>
4139 /* Override any gcc2 internal prototype to avoid an error. */
4140 /* We use char because int might match the return type of a gcc2
4141 builtin and then its argument prototype would still apply. */
4142 char vfork();
4144 int main() {
4146 /* The GNU C library defines this for functions which it implements
4147 to always fail with ENOSYS. Some functions are actually named
4148 something starting with __ and the normal name is an alias. */
4149 #if defined (__stub_vfork) || defined (__stub___vfork)
4150 choke me
4151 #else
4152 vfork();
4153 #endif
4155 ; return 0; }
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4158 rm -rf conftest*
4159 eval "ac_cv_func_vfork=yes"
4160 else
4161 echo "configure: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163 rm -rf conftest*
4164 eval "ac_cv_func_vfork=no"
4166 rm -f conftest*
4169 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4170 echo "$ac_t""yes" 1>&6
4172 else
4173 echo "$ac_t""no" 1>&6
4176 ac_cv_func_vfork_works=$ac_cv_func_vfork
4177 else
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 /* Thanks to Paul Eggert for this test. */
4182 #include <stdio.h>
4183 #include <sys/types.h>
4184 #include <sys/stat.h>
4185 #ifdef HAVE_UNISTD_H
4186 #include <unistd.h>
4187 #endif
4188 #ifdef HAVE_VFORK_H
4189 #include <vfork.h>
4190 #endif
4191 /* On some sparc systems, changes by the child to local and incoming
4192 argument registers are propagated back to the parent.
4193 The compiler is told about this with #include <vfork.h>,
4194 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4195 Test for this by using a static variable whose address
4196 is put into a register that is clobbered by the vfork. */
4197 static
4198 #ifdef __cplusplus
4199 sparc_address_test (int arg)
4200 #else
4201 sparc_address_test (arg) int arg;
4202 #endif
4204 static pid_t child;
4205 if (!child) {
4206 child = vfork ();
4207 if (child < 0) {
4208 perror ("vfork");
4209 _exit(2);
4211 if (!child) {
4212 arg = getpid();
4213 write(-1, "", 0);
4214 _exit (arg);
4218 main() {
4219 pid_t parent = getpid ();
4220 pid_t child;
4222 sparc_address_test ();
4224 child = vfork ();
4226 if (child == 0) {
4227 /* Here is another test for sparc vfork register problems.
4228 This test uses lots of local variables, at least
4229 as many local variables as main has allocated so far
4230 including compiler temporaries. 4 locals are enough for
4231 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4232 A buggy compiler should reuse the register of parent
4233 for one of the local variables, since it will think that
4234 parent can't possibly be used any more in this routine.
4235 Assigning to the local variable will thus munge parent
4236 in the parent process. */
4237 pid_t
4238 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4239 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4240 /* Convince the compiler that p..p7 are live; otherwise, it might
4241 use the same hardware register for all 8 local variables. */
4242 if (p != p1 || p != p2 || p != p3 || p != p4
4243 || p != p5 || p != p6 || p != p7)
4244 _exit(1);
4246 /* On some systems (e.g. IRIX 3.3),
4247 vfork doesn't separate parent from child file descriptors.
4248 If the child closes a descriptor before it execs or exits,
4249 this munges the parent's descriptor as well.
4250 Test for this by closing stdout in the child. */
4251 _exit(close(fileno(stdout)) != 0);
4252 } else {
4253 int status;
4254 struct stat st;
4256 while (wait(&status) != child)
4258 exit(
4259 /* Was there some problem with vforking? */
4260 child < 0
4262 /* Did the child fail? (This shouldn't happen.) */
4263 || status
4265 /* Did the vfork/compiler bug occur? */
4266 || parent != getpid()
4268 /* Did the file descriptor bug occur? */
4269 || fstat(fileno(stdout), &st) != 0
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4275 then
4276 ac_cv_func_vfork_works=yes
4277 else
4278 echo "configure: failed program was:" >&5
4279 cat conftest.$ac_ext >&5
4280 rm -fr conftest*
4281 ac_cv_func_vfork_works=no
4283 rm -fr conftest*
4288 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4289 if test $ac_cv_func_vfork_works = no; then
4290 cat >> confdefs.h <<\EOF
4291 #define vfork fork
4296 for ac_func in getpagesize
4298 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4299 echo "configure:4300: checking for $ac_func" >&5
4300 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4301 echo $ac_n "(cached) $ac_c" 1>&6
4302 else
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 /* System header to define __stub macros and hopefully few prototypes,
4307 which can conflict with char $ac_func(); below. */
4308 #include <assert.h>
4309 /* Override any gcc2 internal prototype to avoid an error. */
4310 /* We use char because int might match the return type of a gcc2
4311 builtin and then its argument prototype would still apply. */
4312 char $ac_func();
4314 int main() {
4316 /* The GNU C library defines this for functions which it implements
4317 to always fail with ENOSYS. Some functions are actually named
4318 something starting with __ and the normal name is an alias. */
4319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4320 choke me
4321 #else
4322 $ac_func();
4323 #endif
4325 ; return 0; }
4327 if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4328 rm -rf conftest*
4329 eval "ac_cv_func_$ac_func=yes"
4330 else
4331 echo "configure: failed program was:" >&5
4332 cat conftest.$ac_ext >&5
4333 rm -rf conftest*
4334 eval "ac_cv_func_$ac_func=no"
4336 rm -f conftest*
4339 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4340 echo "$ac_t""yes" 1>&6
4341 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4342 cat >> confdefs.h <<EOF
4343 #define $ac_tr_func 1
4346 else
4347 echo "$ac_t""no" 1>&6
4349 done
4351 # The test program for the next two tests is the same except for one
4352 # set of ifdefs.
4353 cat >ct-mmap.inc <<'EOF'
4354 #include <sys/types.h>
4355 #include <sys/mman.h>
4356 #include <fcntl.h>
4357 #include <signal.h>
4358 #include <setjmp.h>
4359 #include <stdio.h>
4361 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4362 # define MAP_ANONYMOUS MAP_ANON
4363 #endif
4365 /* This mess was copied from the GNU getpagesize.h. */
4366 #ifndef HAVE_GETPAGESIZE
4367 # ifdef HAVE_UNISTD_H
4368 # include <unistd.h>
4369 # endif
4371 /* Assume that all systems that can run configure have sys/param.h. */
4372 # ifndef HAVE_SYS_PARAM_H
4373 # define HAVE_SYS_PARAM_H 1
4374 # endif
4376 # ifdef _SC_PAGESIZE
4377 # define getpagesize() sysconf(_SC_PAGESIZE)
4378 # else /* no _SC_PAGESIZE */
4379 # ifdef HAVE_SYS_PARAM_H
4380 # include <sys/param.h>
4381 # ifdef EXEC_PAGESIZE
4382 # define getpagesize() EXEC_PAGESIZE
4383 # else /* no EXEC_PAGESIZE */
4384 # ifdef NBPG
4385 # define getpagesize() NBPG * CLSIZE
4386 # ifndef CLSIZE
4387 # define CLSIZE 1
4388 # endif /* no CLSIZE */
4389 # else /* no NBPG */
4390 # ifdef NBPC
4391 # define getpagesize() NBPC
4392 # else /* no NBPC */
4393 # ifdef PAGESIZE
4394 # define getpagesize() PAGESIZE
4395 # endif /* PAGESIZE */
4396 # endif /* no NBPC */
4397 # endif /* no NBPG */
4398 # endif /* no EXEC_PAGESIZE */
4399 # else /* no HAVE_SYS_PARAM_H */
4400 # define getpagesize() 8192 /* punt totally */
4401 # endif /* no HAVE_SYS_PARAM_H */
4402 # endif /* no _SC_PAGESIZE */
4404 #endif /* no HAVE_GETPAGESIZE */
4406 #ifndef MAP_FAILED
4407 # define MAP_FAILED -1
4408 #endif
4410 #undef perror_exit
4411 #define perror_exit(str, val) \
4412 do { perror(str); exit(val); } while (0)
4414 /* Some versions of cygwin mmap require that munmap is called with the
4415 same parameters as mmap. GCC expects that this is not the case.
4416 Test for various forms of this problem. Warning - icky signal games. */
4418 static sigset_t unblock_sigsegv;
4419 static jmp_buf r;
4420 static size_t pg;
4421 static int devzero;
4423 static char *
4424 anonmap (size)
4425 size_t size;
4427 #ifdef USE_MAP_ANON
4428 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4429 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4430 #else
4431 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4432 MAP_PRIVATE, devzero, 0);
4433 #endif
4436 static void
4437 sigsegv (unused)
4438 int unused;
4440 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4441 longjmp (r, 1);
4444 /* Basic functionality test. */
4445 void
4446 test_0 ()
4448 char *x = anonmap (pg);
4449 if (x == (char *) MAP_FAILED)
4450 perror_exit("test 0 mmap", 2);
4452 *(int *)x += 1;
4454 if (munmap(x, pg) < 0)
4455 perror_exit("test 0 munmap", 3);
4458 /* 1. If we map a 2-page region and unmap its second page, the first page
4459 must remain. */
4460 static void
4461 test_1 ()
4463 char *x = anonmap (pg * 2);
4464 if (x == (char *)MAP_FAILED)
4465 perror_exit ("test 1 mmap", 4);
4467 signal (SIGSEGV, sigsegv);
4468 if (setjmp (r))
4469 perror_exit ("test 1 fault", 5);
4471 x[0] = 1;
4472 x[pg] = 1;
4474 if (munmap (x + pg, pg) < 0)
4475 perror_exit ("test 1 munmap 1", 6);
4476 x[0] = 2;
4478 if (setjmp (r) == 0)
4480 x[pg] = 1;
4481 perror_exit ("test 1 no fault", 7);
4483 if (munmap (x, pg) < 0)
4484 perror_exit ("test 1 munmap 2", 8);
4487 /* 2. If we map a 2-page region and unmap its first page, the second
4488 page must remain. */
4489 static void
4490 test_2 ()
4492 char *x = anonmap (pg * 2);
4493 if (x == (char *)MAP_FAILED)
4494 perror_exit ("test 2 mmap", 9);
4496 signal (SIGSEGV, sigsegv);
4497 if (setjmp (r))
4498 perror_exit ("test 2 fault", 10);
4500 x[0] = 1;
4501 x[pg] = 1;
4503 if (munmap (x, pg) < 0)
4504 perror_exit ("test 2 munmap 1", 11);
4506 x[pg] = 2;
4508 if (setjmp (r) == 0)
4510 x[0] = 1;
4511 perror_exit ("test 2 no fault", 12);
4514 if (munmap (x+pg, pg) < 0)
4515 perror_exit ("test 2 munmap 2", 13);
4518 /* 3. If we map two adjacent 1-page regions and unmap them both with
4519 one munmap, both must go away.
4521 Getting two adjacent 1-page regions with two mmap calls is slightly
4522 tricky. All OS's tested skip over already-allocated blocks; therefore
4523 we have been careful to unmap all allocated regions in previous tests.
4524 HP/UX allocates pages backward in memory. No OS has yet been observed
4525 to be so perverse as to leave unmapped space between consecutive calls
4526 to mmap. */
4528 static void
4529 test_3 ()
4531 char *x, *y, *z;
4533 x = anonmap (pg);
4534 if (x == (char *)MAP_FAILED)
4535 perror_exit ("test 3 mmap 1", 14);
4536 y = anonmap (pg);
4537 if (y == (char *)MAP_FAILED)
4538 perror_exit ("test 3 mmap 2", 15);
4540 if (y != x + pg)
4542 if (y == x - pg)
4543 z = y, y = x, x = z;
4544 else
4546 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4547 (unsigned long)x, (unsigned long)y);
4548 exit (16);
4552 signal (SIGSEGV, sigsegv);
4553 if (setjmp (r))
4554 perror_exit ("test 3 fault", 17);
4556 x[0] = 1;
4557 y[0] = 1;
4559 if (munmap (x, pg*2) < 0)
4560 perror_exit ("test 3 munmap", 18);
4562 if (setjmp (r) == 0)
4564 x[0] = 1;
4565 perror_exit ("test 3 no fault 1", 19);
4568 signal (SIGSEGV, sigsegv);
4569 if (setjmp (r) == 0)
4571 y[0] = 1;
4572 perror_exit ("test 3 no fault 2", 20);
4577 main ()
4579 sigemptyset (&unblock_sigsegv);
4580 sigaddset (&unblock_sigsegv, SIGSEGV);
4581 pg = getpagesize ();
4582 #ifndef USE_MAP_ANON
4583 devzero = open ("/dev/zero", O_RDWR);
4584 if (devzero < 0)
4585 perror_exit ("open /dev/zero", 1);
4586 #endif
4588 test_0();
4589 test_1();
4590 test_2();
4591 test_3();
4593 exit(0);
4597 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4598 echo "configure:4599: checking for working mmap from /dev/zero" >&5
4599 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4600 echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602 if test "$cross_compiling" = yes; then
4603 # When cross-building, assume that this works, unless we know it
4604 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4605 # on the host, let alone whether mmap will work on it.
4606 case "$host_os" in
4607 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4608 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4609 * ) ac_cv_func_mmap_dev_zero=yes ;;
4610 esac
4611 else
4612 cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615 #include "ct-mmap.inc"
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4618 then
4619 ac_cv_func_mmap_dev_zero=yes
4620 else
4621 echo "configure: failed program was:" >&5
4622 cat conftest.$ac_ext >&5
4623 rm -fr conftest*
4624 if test $? -lt 4
4625 then ac_cv_func_mmap_dev_zero=no
4626 else ac_cv_func_mmap_dev_zero=buggy
4629 rm -fr conftest*
4635 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4636 if test $ac_cv_func_mmap_dev_zero = yes; then
4637 cat >> confdefs.h <<\EOF
4638 #define HAVE_MMAP_DEV_ZERO 1
4643 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4644 echo "configure:4645: checking for working mmap with MAP_ANON(YMOUS)" >&5
4645 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4646 echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648 if test "$cross_compiling" = yes; then
4649 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4650 # just because it's there. Some SCO Un*xen define it but don't implement it.
4651 case "$host_os" in
4652 darwin* ) ac_cv_func_mmap_anon=yes ;;
4653 * ) ac_cv_func_mmap_anon=no ;;
4654 esac
4655 else
4656 cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #define USE_MAP_ANON
4660 #include "ct-mmap.inc"
4662 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4663 then
4664 ac_cv_func_mmap_anon=yes
4665 else
4666 echo "configure: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
4668 rm -fr conftest*
4669 if test $? -lt 4
4670 then ac_cv_func_mmap_anon=no
4671 else ac_cv_func_mmap_anon=buggy
4674 rm -fr conftest*
4680 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4681 if test $ac_cv_func_mmap_anon = yes; then
4682 cat >> confdefs.h <<\EOF
4683 #define HAVE_MMAP_ANON 1
4687 rm -f ct-mmap.inc
4689 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4690 echo "configure:4691: checking for working mmap of a file" >&5
4691 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4692 echo $ac_n "(cached) $ac_c" 1>&6
4693 else
4694 # Create a file one thousand bytes long.
4695 for i in 1 2 3 4 5 6 7 8 9 0
4696 do for j in 1 2 3 4 5 6 7 8 9 0
4697 do echo $i $j xxxxx
4698 done
4699 done > conftestdata$$
4701 if test "$cross_compiling" = yes; then
4702 case "$host_os" in
4703 darwin* ) ac_cv_func_mmap_file=yes ;;
4704 * ) ac_cv_func_mmap_file=no ;;
4705 esac
4706 else
4707 cat > conftest.$ac_ext <<EOF
4708 #line 4709 "configure"
4709 #include "confdefs.h"
4711 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4712 Richard Henderson and Alexandre Oliva.
4713 Check whether read-only mmap of a plain file works. */
4714 #include <sys/types.h>
4715 #include <sys/stat.h>
4716 #include <fcntl.h>
4717 #include <sys/mman.h>
4719 int main()
4721 char *x;
4722 int fd;
4723 struct stat st;
4725 fd = open("conftestdata$$", O_RDONLY);
4726 if (fd < 0)
4727 exit(1);
4729 if (fstat (fd, &st))
4730 exit(2);
4732 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4733 if (x == (char *) -1)
4734 exit(3);
4736 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4737 exit(4);
4739 if (munmap(x, st.st_size) < 0)
4740 exit(5);
4742 exit(0);
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4746 then
4747 ac_cv_func_mmap_file=yes
4748 else
4749 echo "configure: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4751 rm -fr conftest*
4752 ac_cv_func_mmap_file=no
4754 rm -fr conftest*
4759 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4760 if test $ac_cv_func_mmap_file = yes; then
4761 cat >> confdefs.h <<\EOF
4762 #define HAVE_MMAP_FILE 1
4770 am_cv_lib_iconv_ldpath=
4771 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4772 if test "${with_libiconv_prefix+set}" = set; then
4773 withval="$with_libiconv_prefix"
4775 for dir in `echo "$withval" | tr : ' '`; do
4776 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4777 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4778 done
4783 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4784 echo "configure:4785: checking for iconv" >&5
4785 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4786 echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4789 am_cv_func_iconv="no, consider installing GNU libiconv"
4790 am_cv_lib_iconv=no
4791 cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 #include <stdlib.h>
4795 #include <iconv.h>
4796 int main() {
4797 iconv_t cd = iconv_open("","");
4798 iconv(cd,NULL,NULL,NULL,NULL);
4799 iconv_close(cd);
4800 ; return 0; }
4802 if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4803 rm -rf conftest*
4804 am_cv_func_iconv=yes
4805 else
4806 echo "configure: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4809 rm -f conftest*
4810 if test "$am_cv_func_iconv" != yes; then
4811 am_save_LIBS="$LIBS"
4812 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4813 cat > conftest.$ac_ext <<EOF
4814 #line 4815 "configure"
4815 #include "confdefs.h"
4816 #include <stdlib.h>
4817 #include <iconv.h>
4818 int main() {
4819 iconv_t cd = iconv_open("","");
4820 iconv(cd,NULL,NULL,NULL,NULL);
4821 iconv_close(cd);
4822 ; return 0; }
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825 rm -rf conftest*
4826 am_cv_lib_iconv=yes
4827 am_cv_func_iconv=yes
4828 else
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4832 rm -f conftest*
4833 LIBS="$am_save_LIBS"
4838 echo "$ac_t""$am_cv_func_iconv" 1>&6
4839 if test "$am_cv_func_iconv" = yes; then
4840 cat >> confdefs.h <<\EOF
4841 #define HAVE_ICONV 1
4844 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4845 echo "configure:4846: checking for iconv declaration" >&5
4846 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4847 echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4850 cat > conftest.$ac_ext <<EOF
4851 #line 4852 "configure"
4852 #include "confdefs.h"
4854 #include <stdlib.h>
4855 #include <iconv.h>
4856 extern
4857 #ifdef __cplusplus
4859 #endif
4860 #if defined(__STDC__) || defined(__cplusplus)
4861 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4862 #else
4863 size_t iconv();
4864 #endif
4866 int main() {
4868 ; return 0; }
4870 if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4871 rm -rf conftest*
4872 am_cv_proto_iconv_arg1=""
4873 else
4874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
4876 rm -rf conftest*
4877 am_cv_proto_iconv_arg1="const"
4879 rm -f conftest*
4880 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);"
4883 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4884 echo "$ac_t""${ac_t:-
4885 }$am_cv_proto_iconv" 1>&6
4886 cat >> confdefs.h <<EOF
4887 #define ICONV_CONST $am_cv_proto_iconv_arg1
4891 LIBICONV=
4892 if test "$am_cv_lib_iconv" = yes; then
4893 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4898 # We will need to find libiberty.h and ansidecl.h
4899 saved_CFLAGS="$CFLAGS"
4900 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4901 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4902 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4903 fprintf_unlocked strstr errno vasprintf \
4904 malloc realloc calloc free basename getopt clock
4906 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4907 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4908 echo "configure:4909: checking whether $ac_func is declared" >&5
4909 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4911 else
4912 cat > conftest.$ac_ext <<EOF
4913 #line 4914 "configure"
4914 #include "confdefs.h"
4915 #undef $ac_tr_decl
4916 #define $ac_tr_decl 1
4918 #include "ansidecl.h"
4919 #include "system.h"
4921 int main() {
4922 #ifndef $ac_func
4923 char *(*pfn) = (char *(*)) $ac_func ;
4924 #endif
4925 ; return 0; }
4927 if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4928 rm -rf conftest*
4929 eval "gcc_cv_have_decl_$ac_func=yes"
4930 else
4931 echo "configure: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
4933 rm -rf conftest*
4934 eval "gcc_cv_have_decl_$ac_func=no"
4936 rm -f conftest*
4939 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4940 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4941 #define $ac_tr_decl 1
4944 else
4945 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4946 #define $ac_tr_decl 0
4951 done
4952 if test x = y ; then
4953 cat >> confdefs.h <<\EOF
4954 #define HAVE_DECL_GETENV 1
4956 cat >> confdefs.h <<\EOF
4957 #define HAVE_DECL_ATOL 1
4959 cat >> confdefs.h <<\EOF
4960 #define HAVE_DECL_SBRK 1
4962 cat >> confdefs.h <<\EOF
4963 #define HAVE_DECL_ABORT 1
4965 cat >> confdefs.h <<\EOF
4966 #define HAVE_DECL_ATOF 1
4968 cat >> confdefs.h <<\EOF
4969 #define HAVE_DECL_GETCWD 1
4971 cat >> confdefs.h <<\EOF
4972 #define HAVE_DECL_GETWD 1
4975 cat >> confdefs.h <<\EOF
4976 #define HAVE_DECL_STRSIGNAL 1
4978 cat >> confdefs.h <<\EOF
4979 #define HAVE_DECL_PUTC_UNLOCKED 1
4981 cat >> confdefs.h <<\EOF
4982 #define HAVE_DECL_FPUTS_UNLOCKED 1
4984 cat >> confdefs.h <<\EOF
4985 #define HAVE_DECL_FWRITE_UNLOCKED 1
4988 cat >> confdefs.h <<\EOF
4989 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4991 cat >> confdefs.h <<\EOF
4992 #define HAVE_DECL_STRSTR 1
4994 cat >> confdefs.h <<\EOF
4995 #define HAVE_DECL_ERRNO 1
4997 cat >> confdefs.h <<\EOF
4998 #define HAVE_DECL_VASPRINTF 1
5001 cat >> confdefs.h <<\EOF
5002 #define HAVE_DECL_MALLOC 1
5004 cat >> confdefs.h <<\EOF
5005 #define HAVE_DECL_REALLOC 1
5007 cat >> confdefs.h <<\EOF
5008 #define HAVE_DECL_CALLOC 1
5010 cat >> confdefs.h <<\EOF
5011 #define HAVE_DECL_FREE 1
5013 cat >> confdefs.h <<\EOF
5014 #define HAVE_DECL_BASENAME 1
5016 cat >> confdefs.h <<\EOF
5017 #define HAVE_DECL_GETOPT 1
5019 cat >> confdefs.h <<\EOF
5020 #define HAVE_DECL_CLOCK 1
5025 for ac_func in getrlimit setrlimit getrusage
5027 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5028 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5029 echo "configure:5030: checking whether $ac_func is declared" >&5
5030 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5031 echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033 cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036 #undef $ac_tr_decl
5037 #define $ac_tr_decl 1
5039 #include "ansidecl.h"
5040 #include "system.h"
5041 #ifdef HAVE_SYS_RESOURCE_H
5042 #include <sys/resource.h>
5043 #endif
5046 int main() {
5047 #ifndef $ac_func
5048 char *(*pfn) = (char *(*)) $ac_func ;
5049 #endif
5050 ; return 0; }
5052 if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5053 rm -rf conftest*
5054 eval "gcc_cv_have_decl_$ac_func=yes"
5055 else
5056 echo "configure: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 rm -rf conftest*
5059 eval "gcc_cv_have_decl_$ac_func=no"
5061 rm -f conftest*
5064 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5065 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5066 #define $ac_tr_decl 1
5069 else
5070 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5071 #define $ac_tr_decl 0
5076 done
5077 if test x = y ; then
5078 cat >> confdefs.h <<\EOF
5079 #define HAVE_DECL_GETRLIMIT 1
5081 cat >> confdefs.h <<\EOF
5082 #define HAVE_DECL_SETRLIMIT 1
5084 cat >> confdefs.h <<\EOF
5085 #define HAVE_DECL_GETRUSAGE 1
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5094 #include "ansidecl.h"
5095 #include "system.h"
5096 #ifdef HAVE_SYS_RESOURCE_H
5097 #include <sys/resource.h>
5098 #endif
5100 int main() {
5101 rlim_t l = 0;
5102 ; return 0; }
5104 if { (eval echo configure:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5106 else
5107 echo "configure: failed program was:" >&5
5108 cat conftest.$ac_ext >&5
5109 rm -rf conftest*
5110 cat >> confdefs.h <<\EOF
5111 #define rlim_t long
5115 rm -f conftest*
5117 for ac_func in ldgetname
5119 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5120 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5121 echo "configure:5122: checking whether $ac_func is declared" >&5
5122 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5123 echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125 cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128 #undef $ac_tr_decl
5129 #define $ac_tr_decl 1
5131 #include "ansidecl.h"
5132 #include "system.h"
5133 #ifdef HAVE_LDFCN_H
5134 #include <ldfcn.h>
5135 #endif
5138 int main() {
5139 #ifndef $ac_func
5140 char *(*pfn) = (char *(*)) $ac_func ;
5141 #endif
5142 ; return 0; }
5144 if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5145 rm -rf conftest*
5146 eval "gcc_cv_have_decl_$ac_func=yes"
5147 else
5148 echo "configure: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 rm -rf conftest*
5151 eval "gcc_cv_have_decl_$ac_func=no"
5153 rm -f conftest*
5156 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5157 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5158 #define $ac_tr_decl 1
5161 else
5162 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5163 #define $ac_tr_decl 0
5168 done
5169 if test x = y ; then
5170 cat >> confdefs.h <<\EOF
5171 #define HAVE_DECL_LDGETNAME 1
5176 for ac_func in times
5178 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5179 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5180 echo "configure:5181: checking whether $ac_func is declared" >&5
5181 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5182 echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184 cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187 #undef $ac_tr_decl
5188 #define $ac_tr_decl 1
5190 #include "ansidecl.h"
5191 #include "system.h"
5192 #ifdef HAVE_SYS_TIMES_H
5193 #include <sys/times.h>
5194 #endif
5197 int main() {
5198 #ifndef $ac_func
5199 char *(*pfn) = (char *(*)) $ac_func ;
5200 #endif
5201 ; return 0; }
5203 if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5204 rm -rf conftest*
5205 eval "gcc_cv_have_decl_$ac_func=yes"
5206 else
5207 echo "configure: failed program was:" >&5
5208 cat conftest.$ac_ext >&5
5209 rm -rf conftest*
5210 eval "gcc_cv_have_decl_$ac_func=no"
5212 rm -f conftest*
5215 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5216 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5217 #define $ac_tr_decl 1
5220 else
5221 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5222 #define $ac_tr_decl 0
5227 done
5228 if test x = y ; then
5229 cat >> confdefs.h <<\EOF
5230 #define HAVE_DECL_TIMES 1
5235 # More time-related stuff.
5236 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5237 echo "configure:5238: checking for struct tms" >&5
5238 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5239 echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5246 #include "ansidecl.h"
5247 #include "system.h"
5248 #ifdef HAVE_SYS_TIMES_H
5249 #include <sys/times.h>
5250 #endif
5252 int main() {
5253 struct tms tms;
5254 ; return 0; }
5256 if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5257 rm -rf conftest*
5258 ac_cv_struct_tms=yes
5259 else
5260 echo "configure: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
5262 rm -rf conftest*
5263 ac_cv_struct_tms=no
5265 rm -f conftest*
5268 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5269 if test $ac_cv_struct_tms = yes; then
5270 cat >> confdefs.h <<\EOF
5271 #define HAVE_STRUCT_TMS 1
5276 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5277 # revisit after autoconf 2.50.
5278 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5279 echo "configure:5280: checking for clock_t" >&5
5280 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5281 echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5284 cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5288 #include "ansidecl.h"
5289 #include "system.h"
5291 int main() {
5292 clock_t x;
5293 ; return 0; }
5295 if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5296 rm -rf conftest*
5297 gcc_cv_type_clock_t=yes
5298 else
5299 echo "configure: failed program was:" >&5
5300 cat conftest.$ac_ext >&5
5301 rm -rf conftest*
5302 gcc_cv_type_clock_t=no
5304 rm -f conftest*
5307 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5308 if test $gcc_cv_type_clock_t = yes; then
5309 cat >> confdefs.h <<\EOF
5310 #define HAVE_CLOCK_T 1
5315 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5316 echo "configure:5317: checking for uchar" >&5
5317 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5318 echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320 cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5324 #include "ansidecl.h"
5325 #include "system.h"
5327 int main() {
5328 if ((uchar *)0) return 0;
5329 if (sizeof(uchar)) return 0;
5330 ; return 0; }
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333 rm -rf conftest*
5334 ac_cv_type_uchar=yes
5335 else
5336 echo "configure: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5338 rm -rf conftest*
5339 ac_cv_type_uchar=no
5341 rm -f conftest*
5344 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5345 if test $ac_cv_type_uchar = yes; then
5346 cat >> confdefs.h <<\EOF
5347 #define HAVE_UCHAR 1
5352 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5353 CFLAGS="$saved_CFLAGS"
5355 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5356 if test "${enable_initfini_array+set}" = set; then
5357 enableval="$enable_initfini_array"
5359 else
5361 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5362 echo "configure:5363: checking for .preinit_array/.init_array/.fini_array support" >&5
5363 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5364 echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366 if test "$cross_compiling" = yes; then
5367 gcc_cv_initfini_array=no
5368 else
5369 cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5373 static int x = -1;
5374 int main (void) { return x; }
5375 int foo (void) { x = 0; }
5376 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5378 if { (eval echo configure:5379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5379 then
5380 gcc_cv_initfini_array=yes
5381 else
5382 echo "configure: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 rm -fr conftest*
5385 gcc_cv_initfini_array=no
5387 rm -fr conftest*
5392 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5393 enable_initfini_array=$gcc_cv_initfini_array
5397 if test $enable_initfini_array = yes; then
5398 cat >> confdefs.h <<\EOF
5399 #define HAVE_INITFINI_ARRAY 1
5404 # mkdir takes a single argument on some systems.
5405 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5406 echo "configure:5407: checking if mkdir takes one argument" >&5
5407 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5408 echo $ac_n "(cached) $ac_c" 1>&6
5409 else
5410 cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5414 #include <sys/types.h>
5415 #ifdef HAVE_SYS_STAT_H
5416 # include <sys/stat.h>
5417 #endif
5418 #ifdef HAVE_UNISTD_H
5419 # include <unistd.h>
5420 #endif
5421 #ifdef HAVE_DIRECT_H
5422 # include <direct.h>
5423 #endif
5424 int main() {
5425 mkdir ("foo", 0);
5426 ; return 0; }
5428 if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5429 rm -rf conftest*
5430 gcc_cv_mkdir_takes_one_arg=no
5431 else
5432 echo "configure: failed program was:" >&5
5433 cat conftest.$ac_ext >&5
5434 rm -rf conftest*
5435 gcc_cv_mkdir_takes_one_arg=yes
5437 rm -f conftest*
5440 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5441 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5442 cat >> confdefs.h <<\EOF
5443 #define MKDIR_TAKES_ONE_ARG 1
5449 # File extensions
5450 manext='.1'
5451 objext='.o'
5455 # With Setjmp/Longjmp based exception handling.
5456 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5457 if test "${enable_sjlj_exceptions+set}" = set; then
5458 enableval="$enable_sjlj_exceptions"
5459 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5460 cat >> confdefs.h <<EOF
5461 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5467 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5468 echo "configure:5469: checking for main in -lunwind" >&5
5469 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5471 echo $ac_n "(cached) $ac_c" 1>&6
5472 else
5473 ac_save_LIBS="$LIBS"
5474 LIBS="-lunwind $LIBS"
5475 cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5479 int main() {
5480 main()
5481 ; return 0; }
5483 if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5484 rm -rf conftest*
5485 eval "ac_cv_lib_$ac_lib_var=yes"
5486 else
5487 echo "configure: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
5489 rm -rf conftest*
5490 eval "ac_cv_lib_$ac_lib_var=no"
5492 rm -f conftest*
5493 LIBS="$ac_save_LIBS"
5496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5497 echo "$ac_t""yes" 1>&6
5498 use_libunwind_default=yes
5499 else
5500 echo "$ac_t""no" 1>&6
5501 use_libunwind_default=no
5504 # Use libunwind based exception handling.
5505 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5506 if test "${enable_libunwind_exceptions+set}" = set; then
5507 enableval="$enable_libunwind_exceptions"
5508 use_libunwind_exceptions=$enableval
5509 else
5510 use_libunwind_exceptions=$use_libunwind_default
5513 if test x"$use_libunwind_exceptions" = xyes; then
5514 cat >> confdefs.h <<\EOF
5515 #define USE_LIBUNWIND_EXCEPTIONS 1
5520 # --------------------------------------------------------
5521 # Build, host, and target specific configuration fragments
5522 # --------------------------------------------------------
5524 target_gtfiles=
5525 build_xm_file=
5526 build_xm_defines=
5527 build_install_headers_dir=install-headers-tar
5528 build_exeext=
5529 host_xm_file=
5530 host_xm_defines=
5531 host_xmake_file=
5532 host_truncate_target=
5533 host_exeext=
5535 # Decode the host machine, then the target machine.
5536 # For the host machine, we save the xm_file variable as host_xm_file;
5537 # then we decode the target machine and forget everything else
5538 # that came from the host machine.
5539 for machine in $build $host $target; do
5540 . ${srcdir}/config.gcc
5541 done
5543 extra_objs="${host_extra_objs} ${extra_objs}"
5545 # Default the target-machine variables that were not explicitly set.
5546 if test x"$tm_file" = x
5547 then tm_file=$cpu_type/$cpu_type.h; fi
5549 if test x"$extra_headers" = x
5550 then extra_headers=; fi
5552 if test x$md_file = x
5553 then md_file=$cpu_type/$cpu_type.md; fi
5555 if test x$out_file = x
5556 then out_file=$cpu_type/$cpu_type.c; fi
5558 if test x"$tmake_file" = x
5559 then tmake_file=$cpu_type/t-$cpu_type
5562 if test x"$dwarf2" = xyes
5563 then tm_file="$tm_file tm-dwarf2.h"
5566 # Say what files are being used for the output code and MD file.
5567 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5568 echo "Using \`$srcdir/config/$md_file' as machine description file."
5570 # If any of the xm_file variables contain nonexistent files, warn
5571 # about them and drop them.
5574 for x in $build_xm_file; do
5575 if test -f $srcdir/config/$x
5576 then bx="$bx $x"
5577 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5579 done
5580 build_xm_file="$bx"
5583 for x in $host_xm_file; do
5584 if test -f $srcdir/config/$x
5585 then hx="$hx $x"
5586 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5588 done
5589 host_xm_file="$hx"
5592 for x in $xm_file; do
5593 if test -f $srcdir/config/$x
5594 then tx="$tx $x"
5595 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5597 done
5598 xm_file="$tx"
5600 count=a
5601 for f in $tm_file; do
5602 count=${count}x
5603 done
5604 if test $count = ax; then
5605 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5606 else
5607 echo "Using the following target machine macro files:"
5608 for f in $tm_file; do
5609 echo " $srcdir/config/$f"
5610 done
5613 if test x$need_64bit_hwint = xyes; then
5614 cat >> confdefs.h <<\EOF
5615 #define NEED_64BIT_HOST_WIDE_INT 1
5620 count=a
5621 for f in $host_xm_file; do
5622 count=${count}x
5623 done
5624 if test $count = a; then
5626 elif test $count = ax; then
5627 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5628 else
5629 echo "Using the following host machine macro files:"
5630 for f in $host_xm_file; do
5631 echo " $srcdir/config/$f"
5632 done
5634 echo "Using ${out_host_hook_obj} for host machine hooks."
5636 if test "$host_xm_file" != "$build_xm_file"; then
5637 count=a
5638 for f in $build_xm_file; do
5639 count=${count}x
5640 done
5641 if test $count = a; then
5643 elif test $count = ax; then
5644 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5645 else
5646 echo "Using the following build machine macro files:"
5647 for f in $build_xm_file; do
5648 echo " $srcdir/config/$f"
5649 done
5653 if test x$thread_file = x; then
5654 if test x$target_thread_file != x; then
5655 thread_file=$target_thread_file
5656 else
5657 thread_file='single'
5661 # Look for a file containing extra machine modes.
5662 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5663 extra_modes_file='$(srcdir)'/config/${extra_modes}
5665 cat >> confdefs.h <<EOF
5666 #define EXTRA_MODES_FILE "$extra_modes"
5669 cat >> confdefs.h <<\EOF
5670 #define EXTRA_CC_MODES 1
5675 # auto-host.h is the file containing items generated by autoconf and is
5676 # the first file included by config.h.
5677 # If host=build, it is correct to have bconfig include auto-host.h
5678 # as well. If host!=build, we are in error and need to do more
5679 # work to find out the build config parameters.
5680 if test x$host = x$build
5681 then
5682 build_auto=auto-host.h
5683 FORBUILD=..
5684 else
5685 # We create a subdir, then run autoconf in the subdir.
5686 # To prevent recursion we set host and build for the new
5687 # invocation of configure to the build for this invocation
5688 # of configure.
5689 tempdir=build.$$
5690 rm -rf $tempdir
5691 mkdir $tempdir
5692 cd $tempdir
5693 case ${srcdir} in
5694 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5695 *) realsrcdir=../${srcdir};;
5696 esac
5697 saved_CFLAGS="${CFLAGS}"
5698 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5699 ${realsrcdir}/configure \
5700 --target=$target_alias --host=$build_alias --build=$build_alias
5701 CFLAGS="${saved_CFLAGS}"
5703 # We just finished tests for the build machine, so rename
5704 # the file auto-build.h in the gcc directory.
5705 mv auto-host.h ../auto-build.h
5706 cd ..
5707 rm -rf $tempdir
5708 build_auto=auto-build.h
5709 FORBUILD=../build-$build_alias
5713 tm_file="${tm_file} defaults.h"
5714 tm_p_file="${tm_p_file} tm-preds.h"
5715 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5716 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5717 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5718 # put this back in temporarily.
5719 xm_file="ansidecl.h ${xm_file}"
5721 # --------
5722 # UNSORTED
5723 # --------
5725 # Truncate the target if necessary
5726 if test x$host_truncate_target != x; then
5727 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5730 # Get the version trigger filename from the toplevel
5731 if test "${with_gcc_version_trigger+set}" = set; then
5732 gcc_version_trigger=$with_gcc_version_trigger
5733 else
5734 gcc_version_trigger=${srcdir}/version.c
5736 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5737 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5739 # Compile in configure arguments.
5740 if test -f configargs.h ; then
5741 # Being re-configured.
5742 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5743 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5744 else
5745 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5747 cat > configargs.h <<EOF
5748 /* Generated automatically. */
5749 static const char configuration_arguments[] = "$gcc_config_arguments";
5750 static const char thread_model[] = "$thread_file";
5753 # Internationalization
5754 PACKAGE=gcc
5755 VERSION="$gcc_version"
5759 # Enable NLS support by default
5760 # Check whether --enable-nls or --disable-nls was given.
5761 if test "${enable_nls+set}" = set; then
5762 enableval="$enable_nls"
5764 else
5765 enable_nls=yes
5769 # if cross compiling, disable NLS support.
5770 # It's not worth the trouble, at least for now.
5772 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5773 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5774 enable_nls=no
5779 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5780 echo "configure:5781: checking for library containing strerror" >&5
5781 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5782 echo $ac_n "(cached) $ac_c" 1>&6
5783 else
5784 ac_func_search_save_LIBS="$LIBS"
5785 ac_cv_search_strerror="no"
5786 cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789 /* Override any gcc2 internal prototype to avoid an error. */
5790 /* We use char because int might match the return type of a gcc2
5791 builtin and then its argument prototype would still apply. */
5792 char strerror();
5794 int main() {
5795 strerror()
5796 ; return 0; }
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5799 rm -rf conftest*
5800 ac_cv_search_strerror="none required"
5801 else
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5805 rm -f conftest*
5806 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5807 LIBS="-l$i $ac_func_search_save_LIBS"
5808 cat > conftest.$ac_ext <<EOF
5809 #line 5810 "configure"
5810 #include "confdefs.h"
5811 /* Override any gcc2 internal prototype to avoid an error. */
5812 /* We use char because int might match the return type of a gcc2
5813 builtin and then its argument prototype would still apply. */
5814 char strerror();
5816 int main() {
5817 strerror()
5818 ; return 0; }
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821 rm -rf conftest*
5822 ac_cv_search_strerror="-l$i"
5823 break
5824 else
5825 echo "configure: failed program was:" >&5
5826 cat conftest.$ac_ext >&5
5828 rm -f conftest*
5829 done
5830 LIBS="$ac_func_search_save_LIBS"
5833 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5834 if test "$ac_cv_search_strerror" != "no"; then
5835 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5837 else :
5842 echo $ac_n "checking for working const""... $ac_c" 1>&6
5843 echo "configure:5844: checking for working const" >&5
5844 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5845 echo $ac_n "(cached) $ac_c" 1>&6
5846 else
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5851 int main() {
5853 /* Ultrix mips cc rejects this. */
5854 typedef int charset[2]; const charset x;
5855 /* SunOS 4.1.1 cc rejects this. */
5856 char const *const *ccp;
5857 char **p;
5858 /* NEC SVR4.0.2 mips cc rejects this. */
5859 struct point {int x, y;};
5860 static struct point const zero = {0,0};
5861 /* AIX XL C 1.02.0.0 rejects this.
5862 It does not let you subtract one const X* pointer from another in an arm
5863 of an if-expression whose if-part is not a constant expression */
5864 const char *g = "string";
5865 ccp = &g + (g ? g-g : 0);
5866 /* HPUX 7.0 cc rejects these. */
5867 ++ccp;
5868 p = (char**) ccp;
5869 ccp = (char const *const *) p;
5870 { /* SCO 3.2v4 cc rejects this. */
5871 char *t;
5872 char const *s = 0 ? (char *) 0 : (char const *) 0;
5874 *t++ = 0;
5876 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5877 int x[] = {25, 17};
5878 const int *foo = &x[0];
5879 ++foo;
5881 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5882 typedef const int *iptr;
5883 iptr p = 0;
5884 ++p;
5886 { /* AIX XL C 1.02.0.0 rejects this saying
5887 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5888 struct s { int j; const int *ap[3]; };
5889 struct s *b; b->j = 5;
5891 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5892 const int foo = 10;
5895 ; return 0; }
5897 if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5898 rm -rf conftest*
5899 ac_cv_c_const=yes
5900 else
5901 echo "configure: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 rm -rf conftest*
5904 ac_cv_c_const=no
5906 rm -f conftest*
5909 echo "$ac_t""$ac_cv_c_const" 1>&6
5910 if test $ac_cv_c_const = no; then
5911 cat >> confdefs.h <<\EOF
5912 #define const
5917 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5918 echo "configure:5919: checking for off_t" >&5
5919 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5920 echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922 cat > conftest.$ac_ext <<EOF
5923 #line 5924 "configure"
5924 #include "confdefs.h"
5925 #include <sys/types.h>
5926 #if STDC_HEADERS
5927 #include <stdlib.h>
5928 #include <stddef.h>
5929 #endif
5931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5932 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5933 rm -rf conftest*
5934 ac_cv_type_off_t=yes
5935 else
5936 rm -rf conftest*
5937 ac_cv_type_off_t=no
5939 rm -f conftest*
5942 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5943 if test $ac_cv_type_off_t = no; then
5944 cat >> confdefs.h <<\EOF
5945 #define off_t long
5950 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5951 echo "configure:5952: checking for size_t" >&5
5952 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5953 echo $ac_n "(cached) $ac_c" 1>&6
5954 else
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 #include <sys/types.h>
5959 #if STDC_HEADERS
5960 #include <stdlib.h>
5961 #include <stddef.h>
5962 #endif
5964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5965 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5966 rm -rf conftest*
5967 ac_cv_type_size_t=yes
5968 else
5969 rm -rf conftest*
5970 ac_cv_type_size_t=no
5972 rm -f conftest*
5975 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5976 if test $ac_cv_type_size_t = no; then
5977 cat >> confdefs.h <<\EOF
5978 #define size_t unsigned
5983 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5984 # for constant arguments. Useless!
5985 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5986 echo "configure:5987: checking for working alloca.h" >&5
5987 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5988 echo $ac_n "(cached) $ac_c" 1>&6
5989 else
5990 cat > conftest.$ac_ext <<EOF
5991 #line 5992 "configure"
5992 #include "confdefs.h"
5993 #include <alloca.h>
5994 int main() {
5995 char *p = alloca(2 * sizeof(int));
5996 ; return 0; }
5998 if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5999 rm -rf conftest*
6000 ac_cv_header_alloca_h=yes
6001 else
6002 echo "configure: failed program was:" >&5
6003 cat conftest.$ac_ext >&5
6004 rm -rf conftest*
6005 ac_cv_header_alloca_h=no
6007 rm -f conftest*
6010 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6011 if test $ac_cv_header_alloca_h = yes; then
6012 cat >> confdefs.h <<\EOF
6013 #define HAVE_ALLOCA_H 1
6018 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6019 echo "configure:6020: checking for alloca" >&5
6020 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6021 echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023 cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6027 #ifdef __GNUC__
6028 # define alloca __builtin_alloca
6029 #else
6030 # ifdef _MSC_VER
6031 # include <malloc.h>
6032 # define alloca _alloca
6033 # else
6034 # if HAVE_ALLOCA_H
6035 # include <alloca.h>
6036 # else
6037 # ifdef _AIX
6038 #pragma alloca
6039 # else
6040 # ifndef alloca /* predefined by HP cc +Olibcalls */
6041 char *alloca ();
6042 # endif
6043 # endif
6044 # endif
6045 # endif
6046 #endif
6048 int main() {
6049 char *p = (char *) alloca(1);
6050 ; return 0; }
6052 if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6053 rm -rf conftest*
6054 ac_cv_func_alloca_works=yes
6055 else
6056 echo "configure: failed program was:" >&5
6057 cat conftest.$ac_ext >&5
6058 rm -rf conftest*
6059 ac_cv_func_alloca_works=no
6061 rm -f conftest*
6064 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6065 if test $ac_cv_func_alloca_works = yes; then
6066 cat >> confdefs.h <<\EOF
6067 #define HAVE_ALLOCA 1
6072 if test $ac_cv_func_alloca_works = no; then
6073 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6074 # that cause trouble. Some versions do not even contain alloca or
6075 # contain a buggy version. If you still want to use their alloca,
6076 # use ar to extract alloca.o from them instead of compiling alloca.c.
6077 ALLOCA=alloca.${ac_objext}
6078 cat >> confdefs.h <<\EOF
6079 #define C_ALLOCA 1
6083 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6084 echo "configure:6085: checking whether alloca needs Cray hooks" >&5
6085 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6086 echo $ac_n "(cached) $ac_c" 1>&6
6087 else
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 #if defined(CRAY) && ! defined(CRAY2)
6092 webecray
6093 #else
6094 wenotbecray
6095 #endif
6098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6099 egrep "webecray" >/dev/null 2>&1; then
6100 rm -rf conftest*
6101 ac_cv_os_cray=yes
6102 else
6103 rm -rf conftest*
6104 ac_cv_os_cray=no
6106 rm -f conftest*
6110 echo "$ac_t""$ac_cv_os_cray" 1>&6
6111 if test $ac_cv_os_cray = yes; then
6112 for ac_func in _getb67 GETB67 getb67; do
6113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6114 echo "configure:6115: checking for $ac_func" >&5
6115 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6116 echo $ac_n "(cached) $ac_c" 1>&6
6117 else
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* System header to define __stub macros and hopefully few prototypes,
6122 which can conflict with char $ac_func(); below. */
6123 #include <assert.h>
6124 /* Override any gcc2 internal prototype to avoid an error. */
6125 /* We use char because int might match the return type of a gcc2
6126 builtin and then its argument prototype would still apply. */
6127 char $ac_func();
6129 int main() {
6131 /* The GNU C library defines this for functions which it implements
6132 to always fail with ENOSYS. Some functions are actually named
6133 something starting with __ and the normal name is an alias. */
6134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6135 choke me
6136 #else
6137 $ac_func();
6138 #endif
6140 ; return 0; }
6142 if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6143 rm -rf conftest*
6144 eval "ac_cv_func_$ac_func=yes"
6145 else
6146 echo "configure: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 rm -rf conftest*
6149 eval "ac_cv_func_$ac_func=no"
6151 rm -f conftest*
6154 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6155 echo "$ac_t""yes" 1>&6
6156 cat >> confdefs.h <<EOF
6157 #define CRAY_STACKSEG_END $ac_func
6160 break
6161 else
6162 echo "$ac_t""no" 1>&6
6165 done
6168 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6169 echo "configure:6170: checking stack direction for C alloca" >&5
6170 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6171 echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173 if test "$cross_compiling" = yes; then
6174 ac_cv_c_stack_direction=0
6175 else
6176 cat > conftest.$ac_ext <<EOF
6177 #line 6178 "configure"
6178 #include "confdefs.h"
6179 find_stack_direction ()
6181 static char *addr = 0;
6182 auto char dummy;
6183 if (addr == 0)
6185 addr = &dummy;
6186 return find_stack_direction ();
6188 else
6189 return (&dummy > addr) ? 1 : -1;
6191 main ()
6193 exit (find_stack_direction() < 0);
6196 if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6197 then
6198 ac_cv_c_stack_direction=1
6199 else
6200 echo "configure: failed program was:" >&5
6201 cat conftest.$ac_ext >&5
6202 rm -fr conftest*
6203 ac_cv_c_stack_direction=-1
6205 rm -fr conftest*
6210 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6211 cat >> confdefs.h <<EOF
6212 #define STACK_DIRECTION $ac_cv_c_stack_direction
6218 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6219 echo "configure:6220: checking whether we are using the GNU C Library 2.1 or newer" >&5
6220 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6221 echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6227 #include <features.h>
6228 #ifdef __GNU_LIBRARY__
6229 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6230 Lucky GNU user
6231 #endif
6232 #endif
6235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6236 egrep "Lucky GNU user" >/dev/null 2>&1; then
6237 rm -rf conftest*
6238 ac_cv_gnu_library_2_1=yes
6239 else
6240 rm -rf conftest*
6241 ac_cv_gnu_library_2_1=no
6243 rm -f conftest*
6249 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6251 GLIBC21="$ac_cv_gnu_library_2_1"
6255 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6256 stdlib.h string.h unistd.h sys/param.h
6258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_hdr" >&5
6261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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"
6267 #include <$ac_hdr>
6269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6270 { (eval echo configure:6271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6272 if test -z "$ac_err"; then
6273 rm -rf conftest*
6274 eval "ac_cv_header_$ac_safe=yes"
6275 else
6276 echo "$ac_err" >&5
6277 echo "configure: failed program was:" >&5
6278 cat conftest.$ac_ext >&5
6279 rm -rf conftest*
6280 eval "ac_cv_header_$ac_safe=no"
6282 rm -f conftest*
6284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6285 echo "$ac_t""yes" 1>&6
6286 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6287 cat >> confdefs.h <<EOF
6288 #define $ac_tr_hdr 1
6291 else
6292 echo "$ac_t""no" 1>&6
6294 done
6296 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6297 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6298 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6301 echo "configure:6302: checking for $ac_func" >&5
6302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 /* System header to define __stub macros and hopefully few prototypes,
6309 which can conflict with char $ac_func(); below. */
6310 #include <assert.h>
6311 /* Override any gcc2 internal prototype to avoid an error. */
6312 /* We use char because int might match the return type of a gcc2
6313 builtin and then its argument prototype would still apply. */
6314 char $ac_func();
6316 int main() {
6318 /* The GNU C library defines this for functions which it implements
6319 to always fail with ENOSYS. Some functions are actually named
6320 something starting with __ and the normal name is an alias. */
6321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6322 choke me
6323 #else
6324 $ac_func();
6325 #endif
6327 ; return 0; }
6329 if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330 rm -rf conftest*
6331 eval "ac_cv_func_$ac_func=yes"
6332 else
6333 echo "configure: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 rm -rf conftest*
6336 eval "ac_cv_func_$ac_func=no"
6338 rm -f conftest*
6341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6342 echo "$ac_t""yes" 1>&6
6343 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6344 cat >> confdefs.h <<EOF
6345 #define $ac_tr_func 1
6348 else
6349 echo "$ac_t""no" 1>&6
6351 done
6356 am_cv_lib_iconv_ldpath=
6357 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6358 if test "${with_libiconv_prefix+set}" = set; then
6359 withval="$with_libiconv_prefix"
6361 for dir in `echo "$withval" | tr : ' '`; do
6362 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6363 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6364 done
6369 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6370 echo "configure:6371: checking for iconv" >&5
6371 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6372 echo $ac_n "(cached) $ac_c" 1>&6
6373 else
6375 am_cv_func_iconv="no, consider installing GNU libiconv"
6376 am_cv_lib_iconv=no
6377 cat > conftest.$ac_ext <<EOF
6378 #line 6379 "configure"
6379 #include "confdefs.h"
6380 #include <stdlib.h>
6381 #include <iconv.h>
6382 int main() {
6383 iconv_t cd = iconv_open("","");
6384 iconv(cd,NULL,NULL,NULL,NULL);
6385 iconv_close(cd);
6386 ; return 0; }
6388 if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6389 rm -rf conftest*
6390 am_cv_func_iconv=yes
6391 else
6392 echo "configure: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
6395 rm -f conftest*
6396 if test "$am_cv_func_iconv" != yes; then
6397 am_save_LIBS="$LIBS"
6398 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6399 cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6402 #include <stdlib.h>
6403 #include <iconv.h>
6404 int main() {
6405 iconv_t cd = iconv_open("","");
6406 iconv(cd,NULL,NULL,NULL,NULL);
6407 iconv_close(cd);
6408 ; return 0; }
6410 if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6411 rm -rf conftest*
6412 am_cv_lib_iconv=yes
6413 am_cv_func_iconv=yes
6414 else
6415 echo "configure: failed program was:" >&5
6416 cat conftest.$ac_ext >&5
6418 rm -f conftest*
6419 LIBS="$am_save_LIBS"
6424 echo "$ac_t""$am_cv_func_iconv" 1>&6
6425 if test "$am_cv_func_iconv" = yes; then
6426 cat >> confdefs.h <<\EOF
6427 #define HAVE_ICONV 1
6430 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6431 echo "configure:6432: checking for iconv declaration" >&5
6432 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6433 echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6436 cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6440 #include <stdlib.h>
6441 #include <iconv.h>
6442 extern
6443 #ifdef __cplusplus
6445 #endif
6446 #if defined(__STDC__) || defined(__cplusplus)
6447 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6448 #else
6449 size_t iconv();
6450 #endif
6452 int main() {
6454 ; return 0; }
6456 if { (eval echo configure:6457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6457 rm -rf conftest*
6458 am_cv_proto_iconv_arg1=""
6459 else
6460 echo "configure: failed program was:" >&5
6461 cat conftest.$ac_ext >&5
6462 rm -rf conftest*
6463 am_cv_proto_iconv_arg1="const"
6465 rm -f conftest*
6466 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);"
6469 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6470 echo "$ac_t""${ac_t:-
6471 }$am_cv_proto_iconv" 1>&6
6472 cat >> confdefs.h <<EOF
6473 #define ICONV_CONST $am_cv_proto_iconv_arg1
6477 LIBICONV=
6478 if test "$am_cv_lib_iconv" = yes; then
6479 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6484 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6485 echo "configure:6486: checking for nl_langinfo and CODESET" >&5
6486 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6487 echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489 cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492 #include <langinfo.h>
6493 int main() {
6494 char* cs = nl_langinfo(CODESET);
6495 ; return 0; }
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498 rm -rf conftest*
6499 am_cv_langinfo_codeset=yes
6500 else
6501 echo "configure: failed program was:" >&5
6502 cat conftest.$ac_ext >&5
6503 rm -rf conftest*
6504 am_cv_langinfo_codeset=no
6506 rm -f conftest*
6510 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6511 if test $am_cv_langinfo_codeset = yes; then
6512 cat >> confdefs.h <<\EOF
6513 #define HAVE_LANGINFO_CODESET 1
6518 if test $ac_cv_header_locale_h = yes; then
6519 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6520 echo "configure:6521: checking for LC_MESSAGES" >&5
6521 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6522 echo $ac_n "(cached) $ac_c" 1>&6
6523 else
6524 cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 #include <locale.h>
6528 int main() {
6529 return LC_MESSAGES
6530 ; return 0; }
6532 if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6533 rm -rf conftest*
6534 am_cv_val_LC_MESSAGES=yes
6535 else
6536 echo "configure: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6538 rm -rf conftest*
6539 am_cv_val_LC_MESSAGES=no
6541 rm -f conftest*
6544 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6545 if test $am_cv_val_LC_MESSAGES = yes; then
6546 cat >> confdefs.h <<\EOF
6547 #define HAVE_LC_MESSAGES 1
6552 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6553 echo "configure:6554: checking whether NLS is requested" >&5
6554 # Check whether --enable-nls or --disable-nls was given.
6555 if test "${enable_nls+set}" = set; then
6556 enableval="$enable_nls"
6557 USE_NLS=$enableval
6558 else
6559 USE_NLS=yes
6562 echo "$ac_t""$USE_NLS" 1>&6
6565 BUILD_INCLUDED_LIBINTL=no
6566 USE_INCLUDED_LIBINTL=no
6567 INTLLIBS=
6568 INTLDEPS=
6570 if test "$USE_NLS" = "yes"; then
6571 cat >> confdefs.h <<\EOF
6572 #define ENABLE_NLS 1
6575 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6576 echo "configure:6577: checking whether included gettext is requested" >&5
6577 # Check whether --with-included-gettext or --without-included-gettext was given.
6578 if test "${with_included_gettext+set}" = set; then
6579 withval="$with_included_gettext"
6580 nls_cv_force_use_gnu_gettext=$withval
6581 else
6582 nls_cv_force_use_gnu_gettext=no
6585 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6587 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6588 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6589 CATOBJEXT=NONE
6594 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6595 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6596 echo "configure:6597: checking for libintl.h" >&5
6597 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6598 echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600 cat > conftest.$ac_ext <<EOF
6601 #line 6602 "configure"
6602 #include "confdefs.h"
6603 #include <libintl.h>
6605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6606 { (eval echo configure:6607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6608 if test -z "$ac_err"; then
6609 rm -rf conftest*
6610 eval "ac_cv_header_$ac_safe=yes"
6611 else
6612 echo "$ac_err" >&5
6613 echo "configure: failed program was:" >&5
6614 cat conftest.$ac_ext >&5
6615 rm -rf conftest*
6616 eval "ac_cv_header_$ac_safe=no"
6618 rm -f conftest*
6620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6621 echo "$ac_t""yes" 1>&6
6622 cat >> confdefs.h <<\EOF
6623 #define HAVE_LIBINTL_H 1
6626 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6627 echo "configure:6628: checking for GNU gettext in libc" >&5
6628 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6629 echo $ac_n "(cached) $ac_c" 1>&6
6630 else
6631 cat > conftest.$ac_ext <<EOF
6632 #line 6633 "configure"
6633 #include "confdefs.h"
6634 #include <libintl.h>
6635 extern int _nl_msg_cat_cntr;
6636 int main() {
6637 bindtextdomain ("", "");
6638 return (int) gettext ("") + _nl_msg_cat_cntr
6639 ; return 0; }
6641 if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6642 rm -rf conftest*
6643 gt_cv_func_gnugettext1_libc=yes
6644 else
6645 echo "configure: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6647 rm -rf conftest*
6648 gt_cv_func_gnugettext1_libc=no
6650 rm -f conftest*
6653 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6655 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6656 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6657 echo "configure:6658: checking for GNU gettext in libintl" >&5
6658 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661 gt_save_LIBS="$LIBS"
6662 LIBS="$LIBS -lintl $LIBICONV"
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <libintl.h>
6667 extern int _nl_msg_cat_cntr;
6668 int main() {
6669 bindtextdomain ("", "");
6670 return (int) gettext ("") + _nl_msg_cat_cntr
6671 ; return 0; }
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674 rm -rf conftest*
6675 gt_cv_func_gnugettext1_libintl=yes
6676 else
6677 echo "configure: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6679 rm -rf conftest*
6680 gt_cv_func_gnugettext1_libintl=no
6682 rm -f conftest*
6683 LIBS="$gt_save_LIBS"
6686 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6689 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6690 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6691 && test "$PACKAGE" != gettext; }; then
6692 cat >> confdefs.h <<\EOF
6693 #define HAVE_GETTEXT 1
6697 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6698 INTLLIBS="-lintl $LIBICONV"
6701 gt_save_LIBS="$LIBS"
6702 LIBS="$LIBS $INTLLIBS"
6703 for ac_func in dcgettext
6705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6706 echo "configure:6707: checking for $ac_func" >&5
6707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6708 echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* System header to define __stub macros and hopefully few prototypes,
6714 which can conflict with char $ac_func(); below. */
6715 #include <assert.h>
6716 /* Override any gcc2 internal prototype to avoid an error. */
6717 /* We use char because int might match the return type of a gcc2
6718 builtin and then its argument prototype would still apply. */
6719 char $ac_func();
6721 int main() {
6723 /* The GNU C library defines this for functions which it implements
6724 to always fail with ENOSYS. Some functions are actually named
6725 something starting with __ and the normal name is an alias. */
6726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6727 choke me
6728 #else
6729 $ac_func();
6730 #endif
6732 ; return 0; }
6734 if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6735 rm -rf conftest*
6736 eval "ac_cv_func_$ac_func=yes"
6737 else
6738 echo "configure: failed program was:" >&5
6739 cat conftest.$ac_ext >&5
6740 rm -rf conftest*
6741 eval "ac_cv_func_$ac_func=no"
6743 rm -f conftest*
6746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6747 echo "$ac_t""yes" 1>&6
6748 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6749 cat >> confdefs.h <<EOF
6750 #define $ac_tr_func 1
6753 else
6754 echo "$ac_t""no" 1>&6
6756 done
6758 LIBS="$gt_save_LIBS"
6760 # Extract the first word of "msgfmt", so it can be a program name with args.
6761 set dummy msgfmt; ac_word=$2
6762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6763 echo "configure:6764: checking for $ac_word" >&5
6764 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6765 echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767 case "$MSGFMT" in
6769 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6772 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6773 for ac_dir in $PATH; do
6774 test -z "$ac_dir" && ac_dir=.
6775 if test -f $ac_dir/$ac_word; then
6776 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6777 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6778 break
6781 done
6782 IFS="$ac_save_ifs"
6783 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6785 esac
6787 MSGFMT="$ac_cv_path_MSGFMT"
6788 if test "$MSGFMT" != ":"; then
6789 echo "$ac_t""$MSGFMT" 1>&6
6790 else
6791 echo "$ac_t""no" 1>&6
6794 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6795 set dummy gmsgfmt; ac_word=$2
6796 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6797 echo "configure:6798: checking for $ac_word" >&5
6798 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6799 echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801 case "$GMSGFMT" in
6803 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6805 ?:/*)
6806 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6809 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6810 ac_dummy="$PATH"
6811 for ac_dir in $ac_dummy; do
6812 test -z "$ac_dir" && ac_dir=.
6813 if test -f $ac_dir/$ac_word; then
6814 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6815 break
6817 done
6818 IFS="$ac_save_ifs"
6819 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6821 esac
6823 GMSGFMT="$ac_cv_path_GMSGFMT"
6824 if test -n "$GMSGFMT"; then
6825 echo "$ac_t""$GMSGFMT" 1>&6
6826 else
6827 echo "$ac_t""no" 1>&6
6831 # Extract the first word of "xgettext", so it can be a program name with args.
6832 set dummy xgettext; ac_word=$2
6833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6834 echo "configure:6835: checking for $ac_word" >&5
6835 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6836 echo $ac_n "(cached) $ac_c" 1>&6
6837 else
6838 case "$XGETTEXT" in
6840 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6844 for ac_dir in $PATH; do
6845 test -z "$ac_dir" && ac_dir=.
6846 if test -f $ac_dir/$ac_word; then
6847 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6848 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6849 break
6852 done
6853 IFS="$ac_save_ifs"
6854 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6856 esac
6858 XGETTEXT="$ac_cv_path_XGETTEXT"
6859 if test "$XGETTEXT" != ":"; then
6860 echo "$ac_t""$XGETTEXT" 1>&6
6861 else
6862 echo "$ac_t""no" 1>&6
6866 CATOBJEXT=.gmo
6869 else
6870 echo "$ac_t""no" 1>&6
6874 if test "$CATOBJEXT" = "NONE"; then
6875 nls_cv_use_gnu_gettext=yes
6879 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6880 INTLOBJS="\$(GETTOBJS)"
6881 # Extract the first word of "msgfmt", so it can be a program name with args.
6882 set dummy msgfmt; ac_word=$2
6883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6884 echo "configure:6885: checking for $ac_word" >&5
6885 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6886 echo $ac_n "(cached) $ac_c" 1>&6
6887 else
6888 case "$MSGFMT" in
6890 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6893 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6894 for ac_dir in $PATH; do
6895 test -z "$ac_dir" && ac_dir=.
6896 if test -f $ac_dir/$ac_word; then
6897 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6898 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6899 break
6902 done
6903 IFS="$ac_save_ifs"
6904 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6906 esac
6908 MSGFMT="$ac_cv_path_MSGFMT"
6909 if test "$MSGFMT" != ":"; then
6910 echo "$ac_t""$MSGFMT" 1>&6
6911 else
6912 echo "$ac_t""no" 1>&6
6915 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6916 set dummy gmsgfmt; ac_word=$2
6917 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6918 echo "configure:6919: checking for $ac_word" >&5
6919 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6920 echo $ac_n "(cached) $ac_c" 1>&6
6921 else
6922 case "$GMSGFMT" in
6924 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6926 ?:/*)
6927 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6931 ac_dummy="$PATH"
6932 for ac_dir in $ac_dummy; do
6933 test -z "$ac_dir" && ac_dir=.
6934 if test -f $ac_dir/$ac_word; then
6935 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6936 break
6938 done
6939 IFS="$ac_save_ifs"
6940 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6942 esac
6944 GMSGFMT="$ac_cv_path_GMSGFMT"
6945 if test -n "$GMSGFMT"; then
6946 echo "$ac_t""$GMSGFMT" 1>&6
6947 else
6948 echo "$ac_t""no" 1>&6
6951 # Extract the first word of "xgettext", so it can be a program name with args.
6952 set dummy xgettext; ac_word=$2
6953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6954 echo "configure:6955: checking for $ac_word" >&5
6955 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6956 echo $ac_n "(cached) $ac_c" 1>&6
6957 else
6958 case "$XGETTEXT" in
6960 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6963 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6964 for ac_dir in $PATH; do
6965 test -z "$ac_dir" && ac_dir=.
6966 if test -f $ac_dir/$ac_word; then
6967 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6968 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6969 break
6972 done
6973 IFS="$ac_save_ifs"
6974 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6976 esac
6978 XGETTEXT="$ac_cv_path_XGETTEXT"
6979 if test "$XGETTEXT" != ":"; then
6980 echo "$ac_t""$XGETTEXT" 1>&6
6981 else
6982 echo "$ac_t""no" 1>&6
6986 BUILD_INCLUDED_LIBINTL=yes
6987 USE_INCLUDED_LIBINTL=yes
6988 CATOBJEXT=.gmo
6989 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6990 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6991 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6994 if test "$GMSGFMT" != ":"; then
6995 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6997 else
6998 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6999 GMSGFMT=":"
7003 if test "$XGETTEXT" != ":"; then
7004 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7006 else
7007 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
7008 XGETTEXT=":"
7012 POSUB=po
7017 if test "$PACKAGE" = gettext; then
7018 BUILD_INCLUDED_LIBINTL=yes
7021 for ac_prog in bison
7023 # Extract the first word of "$ac_prog", so it can be a program name with args.
7024 set dummy $ac_prog; ac_word=$2
7025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7026 echo "configure:7027: checking for $ac_word" >&5
7027 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
7028 echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030 if test -n "$INTLBISON"; then
7031 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7032 else
7033 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7034 ac_dummy="$PATH"
7035 for ac_dir in $ac_dummy; do
7036 test -z "$ac_dir" && ac_dir=.
7037 if test -f $ac_dir/$ac_word; then
7038 ac_cv_prog_INTLBISON="$ac_prog"
7039 break
7041 done
7042 IFS="$ac_save_ifs"
7045 INTLBISON="$ac_cv_prog_INTLBISON"
7046 if test -n "$INTLBISON"; then
7047 echo "$ac_t""$INTLBISON" 1>&6
7048 else
7049 echo "$ac_t""no" 1>&6
7052 test -n "$INTLBISON" && break
7053 done
7055 if test -z "$INTLBISON"; then
7056 ac_verc_fail=yes
7057 else
7058 echo $ac_n "checking version of bison""... $ac_c" 1>&6
7059 echo "configure:7060: checking version of bison" >&5
7060 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7061 case $ac_prog_version in
7062 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7063 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7064 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7065 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7066 esac
7067 echo "$ac_t""$ac_prog_version" 1>&6
7069 if test $ac_verc_fail = yes; then
7070 INTLBISON=:
7082 if test $USE_INCLUDED_LIBINTL = yes; then
7083 cat >> confdefs.h <<\EOF
7084 #define USE_INCLUDED_LIBINTL 1
7089 nls_cv_header_intl=
7090 nls_cv_header_libgt=
7092 DATADIRNAME=share
7095 INSTOBJEXT=.mo
7098 GENCAT=gencat
7102 if test "x$CATOBJEXT" != x; then
7103 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
7104 echo "configure:7105: checking for catalogs to be installed" >&5
7105 # Look for .po and .gmo files in the source directory.
7106 CATALOGS=
7107 XLINGUAS=
7108 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
7109 # If there aren't any .gmo files the shell will give us the
7110 # literal string "../path/to/srcdir/po/*.gmo" which has to be
7111 # weeded out.
7112 case "$cat" in *\**)
7113 continue;;
7114 esac
7115 # The quadruple backslash is collapsed to a double backslash
7116 # by the backticks, then collapsed again by the double quotes,
7117 # leaving us with one backslash in the sed expression (right
7118 # before the dot that mustn't act as a wildcard). The dot to
7119 # be escaped in the second expression is hiding inside CATOBJEXT.
7120 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
7121 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
7122 # The user is allowed to set LINGUAS to a list of languages to
7123 # install catalogs for. If it's empty that means "all of them."
7124 if test "x$LINGUAS" = x; then
7125 CATALOGS="$CATALOGS $cat"
7126 XLINGUAS="$XLINGUAS $lang"
7127 else
7128 case "$LINGUAS" in *$lang*)
7129 CATALOGS="$CATALOGS $cat"
7130 XLINGUAS="$XLINGUAS $lang"
7132 esac
7134 done
7135 LINGUAS="$XLINGUAS"
7136 echo "$ac_t""$LINGUAS" 1>&6
7139 MKINSTALLDIRS=
7140 if test -n "$ac_aux_dir"; then
7141 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7143 if test -z "$MKINSTALLDIRS"; then
7144 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7148 INTL_LIBTOOL_SUFFIX_PREFIX=
7152 # Windows32 Registry support for specifying GCC installation paths.
7153 # Check whether --enable-win32-registry or --disable-win32-registry was given.
7154 if test "${enable_win32_registry+set}" = set; then
7155 enableval="$enable_win32_registry"
7159 case $host_os in
7160 win32 | pe | cygwin* | mingw32* | uwin*)
7161 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
7162 echo "configure:7163: checking whether windows registry support is requested" >&5
7163 if test "x$enable_win32_registry" != xno; then
7164 cat >> confdefs.h <<\EOF
7165 #define ENABLE_WIN32_REGISTRY 1
7168 echo "$ac_t""yes" 1>&6
7170 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7171 echo "configure:7172: checking for library containing RegOpenKeyExA" >&5
7172 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7173 echo $ac_n "(cached) $ac_c" 1>&6
7174 else
7175 ac_func_search_save_LIBS="$LIBS"
7176 ac_cv_search_RegOpenKeyExA="no"
7177 cat > conftest.$ac_ext <<EOF
7178 #line 7179 "configure"
7179 #include "confdefs.h"
7180 /* Override any gcc2 internal prototype to avoid an error. */
7181 /* We use char because int might match the return type of a gcc2
7182 builtin and then its argument prototype would still apply. */
7183 char RegOpenKeyExA();
7185 int main() {
7186 RegOpenKeyExA()
7187 ; return 0; }
7189 if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7190 rm -rf conftest*
7191 ac_cv_search_RegOpenKeyExA="none required"
7192 else
7193 echo "configure: failed program was:" >&5
7194 cat conftest.$ac_ext >&5
7196 rm -f conftest*
7197 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7198 LIBS="-l$i $ac_func_search_save_LIBS"
7199 cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202 /* Override any gcc2 internal prototype to avoid an error. */
7203 /* We use char because int might match the return type of a gcc2
7204 builtin and then its argument prototype would still apply. */
7205 char RegOpenKeyExA();
7207 int main() {
7208 RegOpenKeyExA()
7209 ; return 0; }
7211 if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7212 rm -rf conftest*
7213 ac_cv_search_RegOpenKeyExA="-l$i"
7214 break
7215 else
7216 echo "configure: failed program was:" >&5
7217 cat conftest.$ac_ext >&5
7219 rm -f conftest*
7220 done
7221 LIBS="$ac_func_search_save_LIBS"
7224 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7225 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7226 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7228 else :
7231 else
7232 echo "$ac_t""no" 1>&6
7235 # Check if user specified a different registry key.
7236 case "x${enable_win32_registry}" in
7237 x | xyes)
7238 # default.
7239 gcc_cv_win32_registry_key="$VERSION"
7241 xno)
7242 # no registry lookup.
7243 gcc_cv_win32_registry_key=''
7246 # user-specified key.
7247 gcc_cv_win32_registry_key="$enable_win32_registry"
7249 esac
7251 if test "x$enable_win32_registry" != xno; then
7252 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7253 echo "configure:7254: checking registry key on windows hosts" >&5
7254 cat >> confdefs.h <<EOF
7255 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7258 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7261 esac
7263 # Get an absolute path to the GCC top-level source directory
7264 holddir=`${PWDCMD-pwd}`
7265 cd $srcdir
7266 topdir=`${PWDCMD-pwd}`
7267 cd $holddir
7269 # Conditionalize the makefile for this host machine.
7270 # Make-host contains the concatenation of all host makefile fragments
7271 # [there can be more than one]. This file is built by configure.frag.
7272 host_overrides=Make-host
7273 dep_host_xmake_file=
7274 for f in .. ${host_xmake_file}
7276 if test -f ${srcdir}/config/$f
7277 then
7278 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7280 done
7282 # Conditionalize the makefile for this target machine.
7283 # Make-target contains the concatenation of all host makefile fragments
7284 # [there can be more than one]. This file is built by configure.frag.
7285 target_overrides=Make-target
7286 dep_tmake_file=
7287 for f in .. ${tmake_file}
7289 if test -f ${srcdir}/config/$f
7290 then
7291 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7293 done
7295 symbolic_link='ln -s'
7297 # If the host doesn't support symlinks, modify CC in
7298 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7299 # Otherwise, we can use "CC=$(CC)".
7300 rm -f symtest.tem
7301 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7302 then
7303 cc_set_by_configure="\$(CC)"
7304 quoted_cc_set_by_configure="\$(CC)"
7305 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7306 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7307 else
7308 rm -f symtest.tem
7309 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7310 then
7311 symbolic_link="cp -p"
7312 else
7313 symbolic_link="cp"
7315 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7316 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7317 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7318 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7320 rm -f symtest.tem
7322 out_object_file=`basename $out_file .c`.o
7324 tm_file_list=
7325 for f in $tm_file; do
7326 case $f in
7327 ansidecl.h )
7328 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7329 defaults.h )
7330 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7331 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7332 esac
7333 done
7335 tm_p_file_list=
7336 for f in $tm_p_file; do
7337 case $f in
7338 tm-preds.h )
7339 tm_p_file_list="${tm_p_file_list} $f" ;;
7340 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7341 esac
7342 done
7344 host_xm_file_list=
7345 for f in $host_xm_file; do
7346 case $f in
7347 ansidecl.h )
7348 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7349 auto-host.h )
7350 host_xm_file_list="${host_xm_file_list} $f" ;;
7351 defaults.h )
7352 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7353 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7354 esac
7355 done
7357 build_xm_file_list=
7358 for f in $build_xm_file; do
7359 case $f in
7360 ansidecl.h )
7361 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7362 auto-build.h | auto-host.h )
7363 build_xm_file_list="${build_xm_file_list} $f" ;;
7364 defaults.h )
7365 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7366 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7367 esac
7368 done
7370 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7371 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7372 CROSS=
7373 ALL=all.internal
7374 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7375 if test x$host != x$target
7376 then
7377 CROSS="-DCROSS_COMPILE"
7378 ALL=all.cross
7379 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7380 case "$host","$target" in
7381 i?86-*-*,x86_64-*-* \
7382 | powerpc*-*-*,powerpc64*-*-*)
7383 CROSS="$CROSS -DNATIVE_CROSS" ;;
7384 esac
7385 elif test "x$TARGET_SYSTEM_ROOT" != x; then
7386 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
7387 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7390 # If this is a cross-compiler that does not
7391 # have its own set of headers then define
7392 # inhibit_libc
7394 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7395 # This prevents libgcc2 from containing any code which requires libc
7396 # support.
7397 inhibit_libc=
7398 if { test x$host != x$target && test "x$with_headers" = x &&
7399 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7400 inhibit_libc=-Dinhibit_libc
7404 # When building gcc with a cross-compiler, we need to adjust things so
7405 # that the generator programs are still built with the native compiler.
7406 # Also, we cannot run fixincludes or fix-header.
7408 # These are the normal (build=host) settings:
7409 BUILD_PREFIX=
7410 BUILD_PREFIX_1=ignore-
7411 BUILD_CC='$(CC)'
7412 BUILD_CFLAGS='$(ALL_CFLAGS)'
7414 STMP_FIXINC=stmp-fixinc
7415 STMP_FIXPROTO=stmp-fixproto
7417 # And these apply if build != host.
7418 if test x$build != x$host
7419 then
7420 BUILD_PREFIX=build-
7421 BUILD_PREFIX_1=build-
7422 BUILD_CC='$(CC_FOR_BUILD)'
7423 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7425 if test "x$TARGET_SYSTEM_ROOT" = x; then
7426 STMP_FIXINC=
7427 STMP_FIXPROTO=
7431 # Expand extra_headers to include complete path.
7432 # This substitutes for lots of t-* files.
7433 extra_headers_list=
7434 if test "x$extra_headers" = x
7435 then true
7436 else
7437 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7438 for file in $extra_headers;
7440 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7441 done
7444 # Add a definition of USE_COLLECT2 if system wants one.
7445 case $use_collect2 in
7446 no) use_collect2= ;;
7447 "") ;;
7449 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7450 xm_defines="${xm_defines} USE_COLLECT2"
7452 esac
7454 # Identify the assembler which will work hand-in-glove with the newly
7455 # built GCC, so that we can examine its features. This is the assembler
7456 # which will be driven by the driver program.
7458 # If build != host, and we aren't building gas in-tree, we identify a
7459 # build->target assembler and hope that it will have the same features
7460 # as the host->target assembler we'll be using.
7461 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7462 echo "configure:7463: checking what assembler to use" >&5
7463 in_tree_gas=no
7464 gcc_cv_as=
7465 gcc_cv_gas_major_version=
7466 gcc_cv_gas_minor_version=
7467 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7468 if test -x "$DEFAULT_ASSEMBLER"; then
7469 gcc_cv_as="$DEFAULT_ASSEMBLER"
7470 elif test -x "$AS"; then
7471 gcc_cv_as="$AS"
7472 elif test -x as$host_exeext; then
7473 # Build using assembler in the current directory.
7474 gcc_cv_as=./as$host_exeext
7475 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7476 && test -f ../gas/Makefile; then
7477 # Single tree build which includes gas.
7478 in_tree_gas=yes
7479 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7480 for f in $gcc_cv_as_bfd_srcdir/configure \
7481 $gcc_cv_as_gas_srcdir/configure \
7482 $gcc_cv_as_gas_srcdir/configure.in \
7483 $gcc_cv_as_gas_srcdir/Makefile.in ; do
7484 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7485 if test x$gcc_cv_gas_version != x; then
7486 break
7488 done
7489 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7490 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7491 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7493 rm -f as$host_exeext
7494 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7497 if test "x$gcc_cv_as" = x; then
7498 # Search the same directories that the installed compiler will
7499 # search. Else we may find the wrong assembler and lose. If we
7500 # do not find a suitable assembler binary, then try the user's
7501 # path.
7503 # Also note we have to check MD_EXEC_PREFIX before checking the
7504 # user's path. Unfortunately, there is no good way to get at the
7505 # value of MD_EXEC_PREFIX here. So we do a brute force search
7506 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7507 # to be fixed as part of the make/configure rewrite too.
7509 if test "x$exec_prefix" = xNONE; then
7510 if test "x$prefix" = xNONE; then
7511 test_prefix=/usr/local
7512 else
7513 test_prefix=$prefix
7515 else
7516 test_prefix=$exec_prefix
7519 # If the loop below does not find an assembler, then use whatever
7520 # one we can find in the users's path.
7521 # user's path.
7522 if test "x$program_prefix" != xNONE; then
7523 gcc_cv_as=${program_prefix}as$host_exeext
7524 else
7525 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7528 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7529 $test_prefix/lib/gcc-lib/$target_alias \
7530 /usr/lib/gcc/$target_alias/$gcc_version \
7531 /usr/lib/gcc/$target_alias \
7532 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7533 $test_prefix/$target_alias/bin"
7535 if test x$host = x$target; then
7536 test_dirs="$test_dirs \
7537 /usr/libexec \
7538 /usr/ccs/gcc \
7539 /usr/ccs/bin \
7540 /udk/usr/ccs/bin \
7541 /bsd43/usr/lib/cmplrs/cc \
7542 /usr/cross64/usr/bin \
7543 /usr/lib/cmplrs/cc \
7544 /sysv/usr/lib/cmplrs/cc \
7545 /svr4/usr/lib/cmplrs/cc \
7546 /usr/bin"
7549 for dir in $test_dirs; do
7550 if test -x $dir/as$host_exeext; then
7551 gcc_cv_as=$dir/as$host_exeext
7552 break;
7554 done
7556 case $in_tree_gas in
7557 yes)
7558 echo "$ac_t"""newly built gas"" 1>&6
7561 echo "$ac_t""$gcc_cv_as" 1>&6
7563 esac
7565 # Identify the linker which will work hand-in-glove with the newly
7566 # built GCC, so that we can examine its features. This is the linker
7567 # which will be driven by the driver program.
7569 # If build != host, and we aren't building gas in-tree, we identify a
7570 # build->target linker and hope that it will have the same features
7571 # as the host->target linker we'll be using.
7572 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7573 echo "configure:7574: checking what linker to use" >&5
7574 in_tree_ld=no
7575 gcc_cv_ld=
7576 gcc_cv_gld_major_version=
7577 gcc_cv_gld_minor_version=
7578 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7579 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7580 if test -x "$DEFAULT_LINKER"; then
7581 gcc_cv_ld="$DEFAULT_LINKER"
7582 elif test -x "$LD"; then
7583 gcc_cv_ld="$LD"
7584 elif test -x collect-ld$host_exeext; then
7585 # Build using linker in the current directory.
7586 gcc_cv_ld=./collect-ld$host_exeext
7587 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7588 && test -f ../ld/Makefile; then
7589 # Single tree build which includes ld.
7590 in_tree_ld=yes
7591 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
7593 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7594 if test x$gcc_cv_gld_version != x; then
7595 break
7597 done
7598 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7599 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7600 rm -f collect-ld$host_exeext
7601 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
7602 2>/dev/null
7605 if test "x$gcc_cv_ld" = x; then
7606 # Search the same directories that the installed compiler will
7607 # search. Else we may find the wrong linker and lose. If we
7608 # do not find a suitable linker binary, then try the user's
7609 # path.
7611 # Also note we have to check MD_EXEC_PREFIX before checking the
7612 # user's path. Unfortunately, there is no good way to get at the
7613 # value of MD_EXEC_PREFIX here. So we do a brute force search
7614 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7615 # to be fixed as part of the make/configure rewrite too.
7617 if test "x$exec_prefix" = xNONE; then
7618 if test "x$prefix" = xNONE; then
7619 test_prefix=/usr/local
7620 else
7621 test_prefix=$prefix
7623 else
7624 test_prefix=$exec_prefix
7627 # If the loop below does not find an linker, then use whatever
7628 # one we can find in the users's path.
7629 # user's path.
7630 if test "x$program_prefix" != xNONE; then
7631 gcc_cv_ld=${program_prefix}ld$host_exeext
7632 else
7633 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7636 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7637 $test_prefix/lib/gcc-lib/$target_alias \
7638 /usr/lib/gcc/$target_alias/$gcc_version \
7639 /usr/lib/gcc/$target_alias \
7640 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7641 $test_prefix/$target_alias/bin"
7643 if test x$host = x$target; then
7644 test_dirs="$test_dirs \
7645 /usr/libexec \
7646 /usr/ccs/gcc \
7647 /usr/ccs/bin \
7648 /udk/usr/ccs/bin \
7649 /bsd43/usr/lib/cmplrs/cc \
7650 /usr/cross64/usr/bin \
7651 /usr/lib/cmplrs/cc \
7652 /sysv/usr/lib/cmplrs/cc \
7653 /svr4/usr/lib/cmplrs/cc \
7654 /usr/bin"
7657 for dir in $test_dirs; do
7658 if test -x $dir/ld$host_exeext; then
7659 gcc_cv_ld=$dir/ld$host_exeext
7660 break;
7662 done
7664 case $in_tree_ld in
7665 yes)
7666 echo "$ac_t"""newly built ld"" 1>&6
7669 echo "$ac_t""$gcc_cv_ld" 1>&6
7671 esac
7673 # Figure out what nm we will be using.
7674 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
7675 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7676 echo "configure:7677: checking what nm to use" >&5
7677 in_tree_nm=no
7678 if test -x nm$host_exeext; then
7679 gcc_cv_nm=./nm$host_exeext
7680 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7681 && test -f ../binutils/Makefile; then
7682 # Single tree build which includes binutils.
7683 in_tree_nm=yes
7684 gcc_cv_nm=./nm$host_exeext
7685 rm -f nm$host_exeext
7686 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7687 elif test "x$program_prefix" != xNONE; then
7688 gcc_cv_nm=${program_prefix}nm$host_exeext
7689 else
7690 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7692 case $in_tree_nm in
7693 yes) echo "$ac_t"""newly built nm"" 1>&6 ;;
7694 no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;;
7695 esac
7697 # Figure out what objdump we will be using.
7698 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7699 echo "configure:7700: checking what objdump to use" >&5
7700 in_tree_objdump=no
7701 if test -x objdump$host_exeext; then
7702 gcc_cv_objdump=./objdump$host_exeext
7703 elif test -f $gcc_cv_binutils_srcdir/configure.in \
7704 && test -f ../binutils/Makefile; then
7705 # Single tree build which includes binutils.
7706 in_tree_objdump=yes
7707 gcc_cv_objdump=./objdump$host_exeext
7708 rm -f objdump$host_exeext
7709 $symbolic_link ../binutils/objdump$host_exeext \
7710 objdump$host_exeext 2>/dev/null
7711 elif test "x$program_prefix" != xNONE; then
7712 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7713 else
7714 gcc_cv_objdump=`echo objdump | \
7715 sed ${program_transform_name}`$host_exeext
7717 case $in_tree_objdump in
7718 yes) echo "$ac_t"""newly built objdump"" 1>&6 ;;
7719 no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;;
7720 esac
7722 # Figure out what assembler alignment features are present.
7723 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7724 echo "configure:7725: checking assembler alignment features" >&5
7725 gcc_cv_as_alignment_features=none
7726 if test $in_tree_gas = yes; then
7727 # Gas version 2.6 and later support for .balign and .p2align.
7728 if test $gcc_cv_gas_major_version -eq 2 \
7729 && test $gcc_cv_gas_minor_version -ge 6 \
7730 || test $gcc_cv_gas_major_version -gt 2 ; then
7733 gcc_cv_as_alignment_features=".balign and .p2align"
7734 cat >> confdefs.h <<\EOF
7735 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7742 # Gas version 2.8 and later support specifying the maximum
7743 # bytes to skip when using .p2align.
7744 if test $gcc_cv_gas_major_version -eq 2 \
7745 && test $gcc_cv_gas_minor_version -ge 8 \
7746 || test $gcc_cv_gas_major_version -gt 2 ; then
7749 gcc_cv_as_alignment_features=".p2align including maximum skip"
7750 cat >> confdefs.h <<\EOF
7751 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7758 elif test x$gcc_cv_as != x; then
7759 # Check if we have .balign and .p2align
7760 echo ".balign 4" > conftest.s
7761 echo ".p2align 2" >> conftest.s
7762 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7763 gcc_cv_as_alignment_features=".balign and .p2align"
7764 cat >> confdefs.h <<\EOF
7765 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7769 rm -f conftest.s conftest.o
7770 # Check if specifying the maximum bytes to skip when
7771 # using .p2align is supported.
7772 echo ".p2align 4,,7" > conftest.s
7773 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7774 gcc_cv_as_alignment_features=".p2align including maximum skip"
7775 cat >> confdefs.h <<\EOF
7776 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7780 rm -f conftest.s conftest.o
7782 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7784 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7785 echo "configure:7786: checking assembler subsection support" >&5
7786 gcc_cv_as_subsections=no
7787 if test $in_tree_gas = yes ; then
7788 if test $gcc_cv_gas_major_version -eq 2 \
7789 && test $gcc_cv_gas_minor_version -ge 9 \
7790 || test $gcc_cv_gas_major_version -gt 2 ; then
7793 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7794 gcc_cv_as_subsections="working .subsection -1"
7800 elif test x$gcc_cv_as != x; then
7801 # Check if we have .subsection
7802 echo ".subsection 1" > conftest.s
7803 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7804 gcc_cv_as_subsections=".subsection"
7805 if test x$gcc_cv_nm != x; then
7806 cat > conftest.s <<EOF
7807 conftest_label1: .word 0
7808 .subsection -1
7809 conftest_label2: .word 0
7810 .previous
7812 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7813 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7814 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7815 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7817 else
7818 gcc_cv_as_subsections="working .subsection -1"
7823 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7825 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7826 cat >> confdefs.h <<\EOF
7827 #define HAVE_GAS_SUBSECTION_ORDERING 1
7831 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7833 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7834 echo "configure:7835: checking assembler weak support" >&5
7835 gcc_cv_as_weak=no
7836 if test $in_tree_gas = yes ; then
7837 if test $gcc_cv_gas_major_version -eq 2 \
7838 && test $gcc_cv_gas_minor_version -ge 2 \
7839 || test $gcc_cv_gas_major_version -gt 2 ; then
7842 gcc_cv_as_weak="yes"
7847 elif test x$gcc_cv_as != x; then
7848 # Check if we have .weak
7849 echo " .weak foobar" > conftest.s
7850 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7851 gcc_cv_as_weak="yes"
7853 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7855 if test x"$gcc_cv_as_weak" = xyes; then
7856 cat >> confdefs.h <<\EOF
7857 #define HAVE_GAS_WEAK 1
7861 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7863 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7864 echo "configure:7865: checking assembler hidden support" >&5
7865 gcc_cv_as_hidden=no
7866 if test $in_tree_gas = yes ; then
7867 if test $gcc_cv_gas_major_version -eq 2 \
7868 && (test $gcc_cv_gas_minor_version -gt 12 \
7869 || (test $gcc_cv_gas_minor_version -eq 12 \
7870 && test $gcc_cv_gas_patch_version -ge 1 )) \
7871 || test $gcc_cv_gas_major_version -gt 2 ; then
7874 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7875 gcc_cv_as_hidden="yes"
7881 elif test x$gcc_cv_as != x; then
7882 # Check if we have .hidden
7883 echo " .hidden foobar" > conftest.s
7884 echo "foobar:" >> conftest.s
7885 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7886 gcc_cv_as_hidden="yes"
7888 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7890 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7891 # This is irritatingly difficult to feature test for. Look for
7892 # the date string after the version number.
7893 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7894 if echo "$ld_ver" | grep GNU > /dev/null; then
7895 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
7896 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'`
7897 if test 0"$ld_date" -lt 20020404; then
7898 if test -n "$ld_date"; then
7899 # If there was date string, but was earlier than 2002-04-04, fail
7900 gcc_cv_as_hidden="no"
7901 elif test -z "$ld_vers"; then
7902 # If there was no date string nor ld version number, something is wrong
7903 gcc_cv_as_hidden="no"
7904 else
7905 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7906 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7907 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7908 test -z "$ld_vers_patch" && ld_vers_patch=0
7909 if test "$ld_vers_major" -lt 2; then
7910 gcc_cv_as_hidden="no"
7911 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7912 gcc_cv_as_hidden="no"
7913 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7914 -a "$ld_vers_patch" -eq 0; then
7915 gcc_cv_as_hidden="no"
7921 if test x"$gcc_cv_as_hidden" = xyes; then
7922 cat >> confdefs.h <<\EOF
7923 #define HAVE_GAS_HIDDEN 1
7927 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7928 libgcc_visibility=$gcc_cv_as_hidden
7929 case "$target" in
7930 mips-sgi-irix6*)
7931 if test x"$gnu_ld_flag" = x"no"; then
7932 # Even if using gas with .hidden support, the resulting object files
7933 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7934 # N64 linkers, the problem is that the linker refuses to accept
7935 # -call_shared (passed by default to the linker) and -r (used to
7936 # link the object file generated without .hidden directives with
7937 # one that hides symbols), so we also lose.
7938 libgcc_visibility=no
7941 esac
7944 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7945 echo "configure:7946: checking assembler leb128 support" >&5
7946 gcc_cv_as_leb128=no
7947 if test $in_tree_gas = yes ; then
7948 if test $gcc_cv_gas_major_version -eq 2 \
7949 && test $gcc_cv_gas_minor_version -ge 11 \
7950 || test $gcc_cv_gas_major_version -gt 2 ; then
7953 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7954 gcc_cv_as_leb128="yes"
7960 elif test x$gcc_cv_as != x; then
7961 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7962 cat > conftest.s <<EOF
7963 .data
7964 .uleb128 L2 - L1
7966 .uleb128 1280
7967 .sleb128 -1010
7970 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7971 gcc_cv_as_leb128="yes"
7973 # GAS versions before 2.11 do not support uleb128,
7974 # despite appearing to.
7975 # ??? There exists an elf-specific test that will crash
7976 # the assembler. Perhaps it's better to figure out whether
7977 # arbitrary sections are supported and try the test.
7978 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7979 if echo "$as_ver" | grep GNU > /dev/null; then
7980 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7981 as_major=`echo $as_ver | sed 's/\..*//'`
7982 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7983 if test $as_major -eq 2 -a $as_minor -lt 11; then
7984 gcc_cv_as_leb128="no"
7988 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7990 if test x"$gcc_cv_as_leb128" = xyes; then
7991 cat >> confdefs.h <<\EOF
7992 #define HAVE_AS_LEB128 1
7996 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7998 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7999 echo "configure:8000: checking assembler eh_frame optimization" >&5
8000 gcc_cv_as_eh_frame=no
8001 if test $in_tree_gas = yes ; then
8002 if test $gcc_cv_gas_major_version -eq 2 \
8003 && test $gcc_cv_gas_minor_version -ge 12 \
8004 || test $gcc_cv_gas_major_version -gt 2 ; then
8007 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8008 gcc_cv_as_eh_frame="yes"
8014 elif test x$gcc_cv_as != x; then
8015 # Check if this is GAS.
8016 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
8017 rm -f a.out 2> /dev/null
8018 if echo "$as_ver" | grep GNU > /dev/null; then
8019 # Versions up to and including 2.11.0 may mis-optimize
8020 # .eh_frame data. Try something.
8021 cat > conftest.s <<EOF
8022 .text
8023 .LFB1:
8024 .4byte 0
8025 .L1:
8026 .4byte 0
8027 .LFE1:
8028 .section .eh_frame,"aw",@progbits
8029 __FRAME_BEGIN__:
8030 .4byte .LECIE1-.LSCIE1
8031 .LSCIE1:
8032 .4byte 0x0
8033 .byte 0x1
8034 .ascii "z\0"
8035 .byte 0x1
8036 .byte 0x78
8037 .byte 0x1a
8038 .byte 0x0
8039 .byte 0x4
8040 .4byte 1
8041 .p2align 1
8042 .LECIE1:
8043 .LSFDE1:
8044 .4byte .LEFDE1-.LASFDE1
8045 .LASFDE1:
8046 .4byte .LASFDE1-__FRAME_BEGIN__
8047 .4byte .LFB1
8048 .4byte .LFE1-.LFB1
8049 .byte 0x4
8050 .4byte .LFE1-.LFB1
8051 .byte 0x4
8052 .4byte .L1-.LFB1
8053 .LEFDE1:
8055 cat > conftest.lit <<EOF
8056 0000 10000000 00000000 017a0001 781a0004 .........z..x...
8057 0010 01000000 12000000 18000000 00000000 ................
8058 0020 08000000 04080000 0044 .........D
8060 cat > conftest.big <<EOF
8061 0000 00000010 00000000 017a0001 781a0004 .........z..x...
8062 0010 00000001 00000012 00000018 00000000 ................
8063 0020 00000008 04000000 0844 .........D
8065 # If the assembler didn't choke, and we can objdump,
8066 # and we got the correct data, then succeed.
8067 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8068 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
8069 | tail -3 > conftest.got \
8070 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
8071 || cmp conftest.big conftest.got > /dev/null 2>&1; }
8072 then
8073 gcc_cv_as_eh_frame="yes"
8074 else
8075 gcc_cv_as_eh_frame="bad"
8076 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
8077 cat >> confdefs.h <<\EOF
8078 #define USE_AS_TRADITIONAL_FORMAT 1
8084 rm -f conftest.*
8086 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
8088 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
8089 echo "configure:8090: checking assembler section merging support" >&5
8090 gcc_cv_as_shf_merge=no
8091 if test $in_tree_gas = yes ; then
8092 if test $gcc_cv_gas_major_version -eq 2 \
8093 && test $gcc_cv_gas_minor_version -ge 12 \
8094 || test $gcc_cv_gas_major_version -gt 2 ; then
8097 if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
8098 gcc_cv_as_shf_merge=yes
8104 elif test x$gcc_cv_as != x; then
8105 # Check if we support SHF_MERGE sections
8106 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
8107 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
8108 gcc_cv_as_shf_merge=yes
8110 rm -f conftest.s conftest.o
8112 if test x"$gcc_cv_as_shf_merge" = xyes; then
8113 cat >> confdefs.h <<\EOF
8114 #define HAVE_GAS_SHF_MERGE 1
8118 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
8120 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
8121 echo "configure:8122: checking assembler thread-local storage support" >&5
8122 gcc_cv_as_tls=no
8123 conftest_s=
8124 tls_first_major=
8125 tls_first_minor=
8126 case "$target" in
8127 alpha*-*-*)
8128 conftest_s='
8129 .section ".tdata","awT",@progbits
8130 foo: .long 25
8131 .text
8132 ldq $27,__tls_get_addr($29) !literal!1
8133 lda $16,foo($29) !tlsgd!1
8134 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
8135 ldq $27,__tls_get_addr($29) !literal!2
8136 lda $16,foo($29) !tlsldm!2
8137 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
8138 ldq $1,foo($29) !gotdtprel
8139 ldah $2,foo($29) !dtprelhi
8140 lda $3,foo($2) !dtprello
8141 lda $4,foo($29) !dtprel
8142 ldq $1,foo($29) !gottprel
8143 ldah $2,foo($29) !tprelhi
8144 lda $3,foo($2) !tprello
8145 lda $4,foo($29) !tprel'
8146 tls_first_major=2
8147 tls_first_minor=13
8149 i[34567]86-*-*)
8150 conftest_s='
8151 .section ".tdata","awT",@progbits
8152 foo: .long 25
8153 .text
8154 movl %gs:0, %eax
8155 leal foo@TLSGD(,%ebx,1), %eax
8156 leal foo@TLSLDM(%ebx), %eax
8157 leal foo@DTPOFF(%eax), %edx
8158 movl foo@GOTTPOFF(%ebx), %eax
8159 subl foo@GOTTPOFF(%ebx), %eax
8160 addl foo@GOTNTPOFF(%ebx), %eax
8161 movl foo@INDNTPOFF, %eax
8162 movl $foo@TPOFF, %eax
8163 subl $foo@TPOFF, %eax
8164 leal foo@NTPOFF(%ecx), %eax'
8165 tls_first_major=2
8166 tls_first_minor=14
8168 x86_64-*-*)
8169 conftest_s='
8170 .section ".tdata","awT",@progbits
8171 foo: .long 25
8172 .text
8173 movq %fs:0, %rax
8174 leaq foo@TLSGD(%rip), %rdi
8175 leaq foo@TLSLD(%rip), %rdi
8176 leaq foo@DTPOFF(%rax), %rdx
8177 movq foo@GOTTPOFF(%rip), %rax
8178 movq $foo@TPOFF, %rax'
8179 tls_first_major=2
8180 tls_first_minor=14
8182 ia64-*-*)
8183 conftest_s='
8184 .section ".tdata","awT",@progbits
8185 foo: data8 25
8186 .text
8187 addl r16 = @ltoff(@dtpmod(foo#)), gp
8188 addl r17 = @ltoff(@dtprel(foo#)), gp
8189 addl r18 = @ltoff(@tprel(foo#)), gp
8190 addl r19 = @dtprel(foo#), gp
8191 adds r21 = @dtprel(foo#), r13
8192 movl r23 = @dtprel(foo#)
8193 addl r20 = @tprel(foo#), gp
8194 adds r22 = @tprel(foo#), r13
8195 movl r24 = @tprel(foo#)'
8196 tls_first_major=2
8197 tls_first_minor=13
8199 powerpc-*-*)
8200 conftest_s='
8201 .section ".tdata","awT",@progbits
8202 .align 2
8203 ld0: .space 4
8204 ld1: .space 4
8205 x1: .space 4
8206 x2: .space 4
8207 x3: .space 4
8208 .text
8209 addi 3,31,ld0@got@tlsgd
8210 bl __tls_get_addr
8211 addi 3,31,x1@got@tlsld
8212 bl __tls_get_addr
8213 addi 9,3,x1@dtprel
8214 addis 9,3,x2@dtprel@ha
8215 addi 9,9,x2@dtprel@l
8216 lwz 9,x3@got@tprel(31)
8217 add 9,9,x@tls
8218 addi 9,2,x1@tprel
8219 addis 9,2,x2@tprel@ha
8220 addi 9,9,x2@tprel@l'
8221 tls_first_major=2
8222 tls_first_minor=14
8224 powerpc64-*-*)
8225 conftest_s='
8226 .section ".tdata","awT",@progbits
8227 .align 3
8228 ld0: .space 8
8229 ld1: .space 8
8230 x1: .space 8
8231 x2: .space 8
8232 x3: .space 8
8233 .text
8234 addi 3,2,ld0@got@tlsgd
8235 bl .__tls_get_addr
8237 addi 3,2,ld1@toc
8238 bl .__tls_get_addr
8240 addi 3,2,x1@got@tlsld
8241 bl .__tls_get_addr
8243 addi 9,3,x1@dtprel
8244 bl .__tls_get_addr
8246 addis 9,3,x2@dtprel@ha
8247 addi 9,9,x2@dtprel@l
8248 bl .__tls_get_addr
8250 ld 9,x3@got@dtprel(2)
8251 add 9,9,3
8252 bl .__tls_get_addr
8253 nop'
8254 tls_first_major=2
8255 tls_first_minor=14
8257 s390-*-*)
8258 conftest_s='
8259 .section ".tdata","awT",@progbits
8260 foo: .long 25
8261 .text
8262 .long foo@TLSGD
8263 .long foo@TLSLDM
8264 .long foo@DTPOFF
8265 .long foo@NTPOFF
8266 .long foo@GOTNTPOFF
8267 .long foo@INDNTPOFF
8268 l %r1,foo@GOTNTPOFF(%r12)
8269 l %r1,0(%r1):tls_load:foo
8270 bas %r14,0(%r1,%r13):tls_gdcall:foo
8271 bas %r14,0(%r1,%r13):tls_ldcall:foo'
8272 tls_first_major=2
8273 tls_first_minor=14
8275 s390x-*-*)
8276 conftest_s='
8277 .section ".tdata","awT",@progbits
8278 foo: .long 25
8279 .text
8280 .quad foo@TLSGD
8281 .quad foo@TLSLDM
8282 .quad foo@DTPOFF
8283 .quad foo@NTPOFF
8284 .quad foo@GOTNTPOFF
8285 lg %r1,foo@GOTNTPOFF(%r12)
8286 larl %r1,foo@INDNTPOFF
8287 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
8288 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
8289 tls_first_major=2
8290 tls_first_minor=14
8292 esac
8293 if test -z "$tls_first_major"; then
8295 elif test $in_tree_gas = yes ; then
8296 if test $gcc_cv_gas_major_version -eq $tls_first_major \
8297 && test $gcc_cv_gas_minor_version -ge $tls_first_minor \
8298 || test $gcc_cv_gas_major_version -gt $tls_first_major ; then
8301 gcc_cv_as_tls=yes
8306 elif test x$gcc_cv_as != x; then
8307 echo "$conftest_s" > conftest.s
8308 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
8309 then
8310 gcc_cv_as_tls=yes
8312 rm -f conftest.s conftest.o
8314 if test "$gcc_cv_as_tls" = yes; then
8315 cat >> confdefs.h <<\EOF
8316 #define HAVE_AS_TLS 1
8320 echo "$ac_t""$gcc_cv_as_tls" 1>&6
8322 case "$target" in
8323 # All TARGET_ABI_OSF targets.
8324 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8325 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8326 echo "configure:8327: checking assembler supports explicit relocations" >&5
8327 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8328 echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8331 gcc_cv_as_explicit_relocs=unknown
8332 if test $in_tree_gas = yes ; then
8333 if test $gcc_cv_gas_major_version -eq 2 \
8334 && test $gcc_cv_gas_minor_version -ge 12 \
8335 || test $gcc_cv_gas_major_version -gt 2 ; then
8338 gcc_cv_as_explicit_relocs=yes
8343 elif test x$gcc_cv_as != x; then
8344 cat > conftest.s << 'EOF'
8345 .set nomacro
8346 .text
8347 extbl $3, $2, $3 !lituse_bytoff!1
8348 ldq $2, a($29) !literal!1
8349 ldq $4, b($29) !literal!2
8350 ldq_u $3, 0($2) !lituse_base!1
8351 ldq $27, f($29) !literal!5
8352 jsr $26, ($27), f !lituse_jsr!5
8353 ldah $29, 0($26) !gpdisp!3
8354 lda $0, c($29) !gprel
8355 ldah $1, d($29) !gprelhigh
8356 lda $1, d($1) !gprellow
8357 lda $29, 0($29) !gpdisp!3
8359 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8360 gcc_cv_as_explicit_relocs=yes
8361 else
8362 gcc_cv_as_explicit_relocs=no
8364 rm -f conftest.s conftest.o
8369 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8370 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8371 cat >> confdefs.h <<\EOF
8372 #define HAVE_AS_EXPLICIT_RELOCS 1
8377 sparc*-*-*)
8378 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8379 echo "configure:8380: checking assembler .register pseudo-op support" >&5
8380 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8381 echo $ac_n "(cached) $ac_c" 1>&6
8382 else
8384 gcc_cv_as_register_pseudo_op=unknown
8385 if test x$gcc_cv_as != x; then
8386 # Check if we have .register
8387 echo ".register %g2, #scratch" > conftest.s
8388 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8389 gcc_cv_as_register_pseudo_op=yes
8390 else
8391 gcc_cv_as_register_pseudo_op=no
8393 rm -f conftest.s conftest.o
8398 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8399 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8400 cat >> confdefs.h <<\EOF
8401 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8406 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8407 echo "configure:8408: checking assembler supports -relax" >&5
8408 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8409 echo $ac_n "(cached) $ac_c" 1>&6
8410 else
8412 gcc_cv_as_relax_opt=unknown
8413 if test x$gcc_cv_as != x; then
8414 # Check if gas supports -relax
8415 echo ".text" > conftest.s
8416 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8417 gcc_cv_as_relax_opt=yes
8418 else
8419 gcc_cv_as_relax_opt=no
8421 rm -f conftest.s conftest.o
8426 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8427 if test "x$gcc_cv_as_relax_opt" = xyes; then
8428 cat >> confdefs.h <<\EOF
8429 #define HAVE_AS_RELAX_OPTION 1
8434 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8435 echo "configure:8436: checking assembler and linker support unaligned pc related relocs" >&5
8436 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8437 echo $ac_n "(cached) $ac_c" 1>&6
8438 else
8440 gcc_cv_as_sparc_ua_pcrel=unknown
8441 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8442 gcc_cv_as_sparc_ua_pcrel=no
8443 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8444 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8445 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8446 gcc_cv_as_sparc_ua_pcrel=yes
8448 rm -f conftest.s conftest.o conftest
8453 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8454 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8455 cat >> confdefs.h <<\EOF
8456 #define HAVE_AS_SPARC_UA_PCREL 1
8461 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8462 echo "configure:8463: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8463 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8464 echo $ac_n "(cached) $ac_c" 1>&6
8465 else
8467 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8468 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8469 if test x$gcc_cv_objdump != x; then
8470 gcc_cv_as_sparc_ua_pcrel_hidden=no
8471 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8472 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8473 echo "foo: .skip 4" >> conftest.s
8474 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8475 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8476 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8477 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8478 if $gcc_cv_objdump -R conftest 2> /dev/null \
8479 | grep 'DISP32' > /dev/null 2>&1; then
8481 else
8482 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8486 rm -f conftest.s conftest.o conftest
8487 else
8488 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8493 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8494 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8495 cat >> confdefs.h <<\EOF
8496 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8501 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8502 echo "configure:8503: checking for assembler offsetable %lo() support" >&5
8503 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8504 echo $ac_n "(cached) $ac_c" 1>&6
8505 else
8507 gcc_cv_as_offsetable_lo10=unknown
8508 if test "x$gcc_cv_as" != x; then
8509 # Check if assembler has offsetable %lo()
8510 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8511 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8512 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8513 > /dev/null 2>&1 &&
8514 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8515 > /dev/null 2>&1; then
8516 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8517 gcc_cv_as_offsetable_lo10=no
8518 else
8519 gcc_cv_as_offsetable_lo10=yes
8521 else
8522 gcc_cv_as_offsetable_lo10=no
8524 rm -f conftest.s conftest.o conftest1.s conftest1.o
8529 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8530 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8531 cat >> confdefs.h <<\EOF
8532 #define HAVE_AS_OFFSETABLE_LO10 1
8539 i[34567]86-*-* | x86_64-*-*)
8540 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8541 echo "configure:8542: checking assembler instructions" >&5
8542 gcc_cv_as_instructions=
8543 if test $in_tree_gas = yes ; then
8544 if test $gcc_cv_gas_major_version -eq 2 \
8545 && test $gcc_cv_gas_minor_version -ge 9 \
8546 || test $gcc_cv_gas_major_version -gt 2 ; then
8549 gcc_cv_as_instructions="filds fists"
8554 elif test x$gcc_cv_as != x; then
8555 set "filds fists" "filds mem; fists mem"
8556 while test $# -gt 0
8558 echo "$2" > conftest.s
8559 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8560 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8562 shift 2
8563 done
8564 rm -f conftest.s conftest.o
8566 if test x"$gcc_cv_as_instructions" != x; then
8567 cat >> confdefs.h <<EOF
8568 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8572 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8574 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8575 echo "configure:8576: checking assembler GOTOFF in data directives" >&5
8576 gcc_cv_as_gotoff_in_data=no
8577 if test $in_tree_gas = yes ; then
8578 if test $gcc_cv_gas_major_version -eq 2 \
8579 && test $gcc_cv_gas_minor_version -ge 11 \
8580 || test $gcc_cv_gas_major_version -gt 2 ; then
8583 gcc_cv_as_gotoff_in_data=yes
8588 elif test x$gcc_cv_as != x; then
8589 cat > conftest.s <<EOF
8590 .text
8591 .L0:
8593 .data
8594 .long .L0@GOTOFF
8596 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8597 gcc_cv_as_gotoff_in_data=yes
8600 cat >> confdefs.h <<EOF
8601 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8604 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8607 ia64*-*-*)
8608 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8609 echo "configure:8610: checking assembler supports ltoffx and ldxmov" >&5
8610 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8611 echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8614 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8615 if test $in_tree_gas = yes ; then
8616 if test $gcc_cv_gas_major_version -eq 2 \
8617 && test $gcc_cv_gas_minor_version -ge 14 \
8618 || test $gcc_cv_gas_major_version -gt 2 ; then
8621 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8626 elif test x$gcc_cv_as != x; then
8627 cat > conftest.s << 'EOF'
8628 .text
8629 addl r15 = @ltoffx(x#), gp
8631 ld8.mov r16 = [r15], x#
8633 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8634 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8635 else
8636 gcc_cv_as_ltoffx_ldxmov_relocs=no
8638 rm -f conftest.s conftest.o
8643 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8644 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8645 cat >> confdefs.h <<\EOF
8646 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8651 esac
8653 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8654 echo "configure:8655: checking assembler dwarf2 debug_line support" >&5
8655 gcc_cv_as_dwarf2_debug_line=no
8656 # ??? Not all targets support dwarf2 debug_line, even within a version
8657 # of gas. Moreover, we need to emit a valid instruction to trigger any
8658 # info to the output file. So, as supported targets are added to gas 2.11,
8659 # add some instruction here to (also) show we expect this might work.
8660 # ??? Once 2.11 is released, probably need to add first known working
8661 # version to the per-target configury.
8662 case "$target" in
8663 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8664 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* | xstormy16*-*-*)
8665 insn="nop"
8667 ia64*-*-*)
8668 insn="nop 0"
8670 esac
8671 if test $in_tree_gas = yes ; then
8672 if test $gcc_cv_gas_major_version -eq 2 \
8673 && test $gcc_cv_gas_minor_version -ge 11 \
8674 || test $gcc_cv_gas_major_version -gt 2 ; then
8677 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8678 && test x"$insn" != x ; then
8679 gcc_cv_as_dwarf2_debug_line="yes"
8685 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8686 echo ' .file 1 "conftest.s"' > conftest.s
8687 echo ' .loc 1 3 0' >> conftest.s
8688 echo " $insn" >> conftest.s
8689 # ??? This fails with non-gnu grep.
8690 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8691 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8692 # The .debug_line file table must be in the exact order that
8693 # we specified the files, since these indices are also used
8694 # by DW_AT_decl_file. Approximate this test by testing if
8695 # the assembler bitches if the same index is assigned twice.
8696 echo ' .file 1 "foo.s"' > conftest.s
8697 echo ' .file 1 "bar.s"' >> conftest.s
8698 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8699 then
8700 gcc_cv_as_dwarf2_debug_line="no"
8701 else
8702 gcc_cv_as_dwarf2_debug_line="yes"
8705 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8707 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8708 cat >> confdefs.h <<\EOF
8709 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8713 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8715 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8716 echo "configure:8717: checking assembler --gdwarf2 support" >&5
8717 gcc_cv_as_gdwarf2_flag=no
8718 if test $in_tree_gas = yes ; then
8719 if test $gcc_cv_gas_major_version -eq 2 \
8720 && test $gcc_cv_gas_minor_version -ge 11 \
8721 || test $gcc_cv_gas_major_version -gt 2 ; then
8724 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8725 && test x"$insn" != x ; then
8726 gcc_cv_as_gdwarf2_flag="yes"
8732 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8733 echo '' > conftest.s
8734 # ??? This fails with non-gnu grep.
8735 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8736 then
8737 gcc_cv_as_gdwarf2_flag="yes"
8739 rm -f conftest.s conftest.o
8741 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8742 cat >> confdefs.h <<\EOF
8743 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8747 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8749 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8750 echo "configure:8751: checking assembler --gstabs support" >&5
8751 gcc_cv_as_gstabs_flag=no
8752 if test $in_tree_gas = yes ; then
8753 if test $gcc_cv_gas_major_version -eq 2 \
8754 && test $gcc_cv_gas_minor_version -ge 11 \
8755 || test $gcc_cv_gas_major_version -gt 2 ; then
8758 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8759 && test x"$insn" != x ; then
8760 gcc_cv_as_gstabs_flag="yes"
8766 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8767 echo '' > conftest.s
8768 # ??? This fails with non-gnu grep.
8769 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8770 gcc_cv_as_gstabs_flag="yes"
8772 rm -f conftest.s conftest.o
8774 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8775 cat >> confdefs.h <<\EOF
8776 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8780 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8782 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8783 echo "configure:8784: checking linker read-only and read-write section mixing" >&5
8784 gcc_cv_ld_ro_rw_mix=unknown
8785 if test $in_tree_ld = yes ; then
8786 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
8787 gcc_cv_ld_ro_rw_mix=read-write
8789 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8790 echo '.section "myfoosect", "a"' > conftest1.s
8791 echo '.section "myfoosect", "aw"' > conftest2.s
8792 echo '.byte 1' >> conftest2.s
8793 echo '.section "myfoosect", "a"' > conftest3.s
8794 echo '.byte 0' >> conftest3.s
8795 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8796 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8797 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8798 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8799 conftest2.o conftest3.o; then
8800 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8801 | grep -A1 myfoosect`
8802 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8803 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8804 gcc_cv_ld_ro_rw_mix=read-only
8805 else
8806 gcc_cv_ld_ro_rw_mix=read-write
8810 rm -f conftest.* conftest[123].*
8812 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8813 cat >> confdefs.h <<\EOF
8814 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8818 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8820 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8821 echo "configure:8822: checking linker PT_GNU_EH_FRAME support" >&5
8822 gcc_cv_ld_eh_frame_hdr=no
8823 if test $in_tree_ld = yes ; then
8824 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
8825 gcc_cv_ld_eh_frame_hdr=yes
8827 elif test x$gcc_cv_ld != x; then
8828 # Check if linker supports --eh-frame-hdr option
8829 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8830 gcc_cv_ld_eh_frame_hdr=yes
8833 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8834 cat >> confdefs.h <<\EOF
8835 #define HAVE_LD_EH_FRAME_HDR 1
8839 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8841 # Miscellaneous target-specific checks.
8842 case "$target" in
8843 mips*-*-*)
8844 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8845 echo "configure:8846: checking whether libgloss uses STARTUP directives consistently" >&5
8846 gcc_cv_mips_libgloss_startup=no
8847 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8848 if test "x$exec_prefix" = xNONE; then
8849 if test "x$prefix" = xNONE; then
8850 test_prefix=/usr/local
8851 else
8852 test_prefix=$prefix
8854 else
8855 test_prefix=$exec_prefix
8857 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8859 if grep '^STARTUP' $f > /dev/null 2>&1; then
8860 gcc_cv_mips_libgloss_startup=yes
8861 break
8863 done
8864 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8865 cat >> confdefs.h <<\EOF
8866 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8870 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8872 echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
8873 echo "configure:8874: checking whether the assembler has explicit relocation support" >&5
8874 if test x$gcc_cv_mips_explicit_relocs = x; then
8875 gcc_cv_mips_explicit_relocs=no
8876 if test x$gcc_cv_as != x; then
8877 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
8878 if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
8879 gcc_cv_mips_explicit_relocs=yes
8881 rm -f conftest.s conftest.o
8884 if test $gcc_cv_mips_explicit_relocs = yes; then
8885 test x$target_cpu_default != x || target_cpu_default=0
8886 target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
8888 echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
8890 esac
8892 if test x$with_sysroot = x && test x$host = x$target \
8893 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8894 cat >> confdefs.h <<EOF
8895 #define PREFIX_INCLUDE_DIR "$prefix/include"
8900 # Figure out what language subdirectories are present.
8901 # Look if the user specified --enable-languages="..."; if not, use
8902 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8903 # go away some day.
8904 # NB: embedded tabs in this IF block -- do not untabify
8905 if test x"${enable_languages+set}" != xset; then
8906 if test x"${LANGUAGES+set}" = xset; then
8907 enable_languages="${LANGUAGES}"
8908 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8910 else
8911 enable_languages=all
8913 else
8914 if test x"${enable_languages}" = x \
8915 || test x"${enable_languages}" = xyes;
8916 then
8917 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8920 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8922 # First scan to see if an enabled language requires some other language.
8923 # We assume that a given config-lang.in will list all the language
8924 # front ends it requires, even if some are required indirectly.
8925 for lang in ${srcdir}/*/config-lang.in ..
8927 case $lang in
8930 # The odd quoting in the next line works around
8931 # an apparent bug in bash 1.12 on linux.
8932 ${srcdir}/[*]/config-lang.in)
8935 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8936 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8937 for other in $this_lang_requires
8939 case ,${enable_languages}, in
8940 *,$other,*)
8942 *,all,*)
8944 *,$lang_alias,*)
8945 enable_languages="$enable_languages,$other"
8947 esac
8948 done
8950 esac
8951 done
8953 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8954 found_languages=
8955 subdirs=
8956 for lang in ${srcdir}/*/config-lang.in ..
8958 case $lang in
8959 ..) ;;
8960 # The odd quoting in the next line works around
8961 # an apparent bug in bash 1.12 on linux.
8962 ${srcdir}/[*]/config-lang.in) ;;
8964 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8965 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8966 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8967 if test "x$lang_alias" = x
8968 then
8969 echo "$lang doesn't set \$language." 1>&2
8970 exit 1
8972 case ${build_by_default},${enable_languages}, in
8973 *,$lang_alias,*) add_this_lang=yes ;;
8974 no,*) add_this_lang=no ;;
8975 *,all,*) add_this_lang=yes ;;
8976 *) add_this_lang=no ;;
8977 esac
8978 found_languages="${found_languages} ${lang_alias}"
8979 if test x"${add_this_lang}" = xyes; then
8980 case $lang in
8981 ${srcdir}/ada/config-lang.in)
8982 if test x$have_gnat = xyes ; then
8983 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8987 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8989 esac
8992 esac
8993 done
8995 missing_languages=
8996 for expected_language in ${expected_languages} ..
8998 if test "${expected_language}" != ..; then
8999 missing_language="${expected_language}"
9000 if test "${expected_language}" = "c" \
9001 || test "${expected_language}" = "all"; then
9002 missing_language=
9004 for found_language in ${found_languages} ..
9006 if test "${found_language}" != ..; then
9007 if test "${expected_language}" = "${found_language}"; then
9008 missing_language=
9011 done
9012 if test "x${missing_language}" != x; then
9013 missing_languages="${missing_languages} ${missing_language}"
9016 done
9018 if test "x$missing_languages" != x; then
9019 { echo "configure: error:
9020 The following requested languages were not found:${missing_languages}
9021 The following languages were available: c${found_languages}" 1>&2; exit 1; }
9024 # Make gthr-default.h if we have a thread file.
9025 gthread_flags=
9026 if test $thread_file != single; then
9027 rm -f gthr-default.h
9028 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
9029 gthread_flags=-DHAVE_GTHR_DEFAULT
9033 # Find out what GC implementation we want, or may, use.
9034 # Check whether --with-gc or --without-gc was given.
9035 if test "${with_gc+set}" = set; then
9036 withval="$with_gc"
9037 case "$withval" in
9038 simple | page)
9039 GGC=ggc-$withval
9042 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
9044 esac
9045 else
9046 GGC=ggc-page
9050 echo "Using $GGC for garbage collection."
9052 # Use the system's zlib library.
9053 zlibdir=-L../zlib
9054 zlibinc="-I\$(srcdir)/../zlib"
9055 # Check whether --with-system-zlib or --without-system-zlib was given.
9056 if test "${with_system_zlib+set}" = set; then
9057 withval="$with_system_zlib"
9058 zlibdir=
9059 zlibinc=
9067 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
9068 echo "configure:9069: checking whether to enable maintainer-specific portions of Makefiles" >&5
9069 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
9070 if test "${enable_maintainer_mode+set}" = set; then
9071 enableval="$enable_maintainer_mode"
9072 maintainer_mode=$enableval
9073 else
9074 maintainer_mode=no
9078 echo "$ac_t""$maintainer_mode" 1>&6
9080 if test "$maintainer_mode" = "yes"; then
9081 MAINT=''
9082 else
9083 MAINT='#'
9086 # Make empty files to contain the specs and options for each language.
9087 # Then add #include lines to for a compiler that has specs and/or options.
9089 lang_specs_files=
9090 lang_options_files=
9091 lang_tree_files=
9092 for subdir in . $subdirs
9094 if test -f $srcdir/$subdir/lang-specs.h; then
9095 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
9097 if test -f $srcdir/$subdir/lang-options.h; then
9098 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
9100 if test -f $srcdir/$subdir/$subdir-tree.def; then
9101 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
9103 done
9105 # These (without "all_") are set in each config-lang.in.
9106 # `language' must be a single word so is spelled singularly.
9107 all_languages=
9108 all_boot_languages=
9109 all_compilers=
9110 all_stagestuff=
9111 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
9112 # List of language makefile fragments.
9113 all_lang_makefiles=
9114 # Files for gengtype
9115 all_gtfiles="$target_gtfiles"
9116 # Files for gengtype with language
9117 all_gtfiles_files_langs=
9118 all_gtfiles_files_files=
9120 # Add the language fragments.
9121 # Languages are added via two mechanisms. Some information must be
9122 # recorded in makefile variables, these are defined in config-lang.in.
9123 # We accumulate them and plug them into the main Makefile.
9124 # The other mechanism is a set of hooks for each of the main targets
9125 # like `clean', `install', etc.
9127 language_fragments="Make-lang"
9128 language_hooks="Make-hooks"
9130 for s in .. $subdirs
9132 if test $s != ".."
9133 then
9134 language=
9135 boot_language=
9136 compilers=
9137 stagestuff=
9138 outputs=
9139 gtfiles=
9140 . ${srcdir}/$s/config-lang.in
9141 if test "x$language" = x
9142 then
9143 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
9144 exit 1
9146 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
9147 if test -f ${srcdir}/$s/Makefile.in
9148 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
9150 all_languages="$all_languages $language"
9151 if test "x$boot_language" = xyes
9152 then
9153 all_boot_languages="$all_boot_languages $language"
9155 all_compilers="$all_compilers $compilers"
9156 all_stagestuff="$all_stagestuff $stagestuff"
9157 all_outputs="$all_outputs $outputs"
9158 all_gtfiles="$all_gtfiles $gtfiles"
9159 for f in .. $gtfiles
9161 if test $f != ".."
9162 then
9163 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9164 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9166 done
9168 done
9170 # Pick up gtfiles for c
9171 gtfiles=
9172 s="c"
9173 . ${srcdir}/c-config-lang.in
9174 all_gtfiles="$all_gtfiles $gtfiles"
9175 for f in .. $gtfiles
9177 if test $f != ".."
9178 then
9179 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
9180 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
9182 done
9184 check_languages=
9185 for language in .. $all_languages
9187 if test $language != ".."
9188 then
9189 check_languages="$check_languages check-$language"
9191 done
9193 # Since we can't use `::' targets, we link each language in
9194 # with a set of hooks, reached indirectly via lang.${target}.
9196 rm -f Make-hooks
9197 touch Make-hooks
9198 target_list="all.build all.cross start.encap rest.encap tags \
9199 info dvi generated-manpages \
9200 install-normal install-common install-info install-man \
9201 uninstall \
9202 mostlyclean clean distclean extraclean maintainer-clean \
9203 stage1 stage2 stage3 stage4"
9204 for t in $target_list
9207 for lang in .. $all_languages
9209 if test $lang != ".."; then
9210 x="$x $lang.$t"
9212 done
9213 echo "lang.$t: $x" >> Make-hooks
9214 done
9216 # Create .gdbinit.
9218 echo "dir ." > .gdbinit
9219 echo "dir ${srcdir}" >> .gdbinit
9220 if test x$gdb_needs_out_file_path = xyes
9221 then
9222 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
9224 if test "x$subdirs" != x; then
9225 for s in $subdirs
9227 echo "dir ${srcdir}/$s" >> .gdbinit
9228 done
9230 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
9232 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
9233 # absolute path for gcc_tooldir based on inserting the number of up-directory
9234 # movements required to get from $(exec_prefix) to $(prefix) into the basic
9235 # $(libsubdir)/@(unlibsubdir) based path.
9236 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
9237 # make and thus we'd get different behavior depending on where we built the
9238 # sources.
9239 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
9240 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
9241 else
9242 # An explanation of the sed strings:
9243 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
9244 # -e 's|/$||' match a trailing forward slash and eliminates it
9245 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
9246 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
9248 # (*) Note this pattern overwrites the first character of the string
9249 # with a forward slash if one is not already present. This is not a
9250 # problem because the exact names of the sub-directories concerned is
9251 # unimportant, just the number of them matters.
9253 # The practical upshot of these patterns is like this:
9255 # prefix exec_prefix result
9256 # ------ ----------- ------
9257 # /foo /foo/bar ../
9258 # /foo/ /foo/bar ../
9259 # /foo /foo/bar/ ../
9260 # /foo/ /foo/bar/ ../
9261 # /foo /foo/bar/ugg ../../
9263 dollar='$$'
9264 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
9269 # Find a directory in which to install a shared libgcc.
9271 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
9272 if test "${enable_version_specific_runtime_libs+set}" = set; then
9273 enableval="$enable_version_specific_runtime_libs"
9278 # Check whether --with-slibdir or --without-slibdir was given.
9279 if test "${with_slibdir+set}" = set; then
9280 withval="$with_slibdir"
9281 slibdir="$with_slibdir"
9282 else
9283 if test "${enable_version_specific_runtime_libs+set}" = set; then
9284 slibdir='$(libsubdir)'
9285 elif test "$host" != "$target"; then
9286 slibdir='$(build_tooldir)/lib'
9287 else
9288 slibdir='$(libdir)'
9294 objdir=`${PWDCMD-pwd}`
9297 # Process the language and host/target makefile fragments.
9298 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9300 # Substitute configuration variables
9370 # Echo that links are built
9371 if test x$host = x$target
9372 then
9373 str1="native "
9374 else
9375 str1="cross-"
9376 str2=" from $host"
9379 if test x$host != x$build
9380 then
9381 str3=" on a $build system"
9384 if test "x$str2" != x || test "x$str3" != x
9385 then
9386 str4=
9389 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9391 if test "x$str2" != x || test "x$str3" != x
9392 then
9393 echo " ${str2}${str3}." 1>&2
9396 # Truncate the target if necessary
9397 if test x$host_truncate_target != x; then
9398 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9401 # Configure the subdirectories
9402 # AC_CONFIG_SUBDIRS($subdirs)
9404 # Create the Makefile
9405 # and configure language subdirectories
9406 trap '' 1 2 15
9407 cat > confcache <<\EOF
9408 # This file is a shell script that caches the results of configure
9409 # tests run on this system so they can be shared between configure
9410 # scripts and configure runs. It is not useful on other systems.
9411 # If it contains results you don't want to keep, you may remove or edit it.
9413 # By default, configure uses ./config.cache as the cache file,
9414 # creating it if it does not exist already. You can give configure
9415 # the --cache-file=FILE option to use a different cache file; that is
9416 # what configure does when it calls configure scripts in
9417 # subdirectories, so they share the cache.
9418 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9419 # config.status only pays attention to the cache file if you give it the
9420 # --recheck option to rerun configure.
9423 # The following way of writing the cache mishandles newlines in values,
9424 # but we know of no workaround that is simple, portable, and efficient.
9425 # So, don't put newlines in cache variables' values.
9426 # Ultrix sh set writes to stderr and can't be redirected directly,
9427 # and sets the high bit in the cache file unless we assign to the vars.
9428 (set) 2>&1 |
9429 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9430 *ac_space=\ *)
9431 # `set' does not quote correctly, so add quotes (double-quote substitution
9432 # turns \\\\ into \\, and sed turns \\ into \).
9433 sed -n \
9434 -e "s/'/'\\\\''/g" \
9435 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9438 # `set' quotes correctly as required by POSIX, so do not add quotes.
9439 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9441 esac >> confcache
9442 if cmp -s $cache_file confcache; then
9444 else
9445 if test -w $cache_file; then
9446 echo "updating cache $cache_file"
9447 cat confcache > $cache_file
9448 else
9449 echo "not updating unwritable cache $cache_file"
9452 rm -f confcache
9454 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9456 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9457 # Let make expand exec_prefix.
9458 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9460 # Any assignment to VPATH causes Sun make to only execute
9461 # the first set of double-colon rules, so remove it if not needed.
9462 # If there is a colon in the path, we need to keep it.
9463 if test "x$srcdir" = x.; then
9464 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9467 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9469 DEFS=-DHAVE_CONFIG_H
9471 # Without the "./", some shells look in PATH for config.status.
9472 : ${CONFIG_STATUS=./config.status}
9474 echo creating $CONFIG_STATUS
9475 rm -f $CONFIG_STATUS
9476 cat > $CONFIG_STATUS <<EOF
9477 #! /bin/sh
9478 # Generated automatically by configure.
9479 # Run this file to recreate the current configuration.
9480 # This directory was configured as follows,
9481 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9483 # $0 $ac_configure_args
9485 # Compiler output produced by configure, useful for debugging
9486 # configure, is in ./config.log if it exists.
9488 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9489 for ac_option
9491 case "\$ac_option" in
9492 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9493 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9494 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9495 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9496 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9497 exit 0 ;;
9498 -help | --help | --hel | --he | --h)
9499 echo "\$ac_cs_usage"; exit 0 ;;
9500 *) echo "\$ac_cs_usage"; exit 1 ;;
9501 esac
9502 done
9504 ac_given_srcdir=$srcdir
9506 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9508 cat >> $CONFIG_STATUS <<EOF
9510 # Protect against being on the right side of a sed subst in config.status.
9511 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9512 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9513 $ac_vpsub
9514 $extrasub
9515 s%@SHELL@%$SHELL%g
9516 s%@CFLAGS@%$CFLAGS%g
9517 s%@CPPFLAGS@%$CPPFLAGS%g
9518 s%@CXXFLAGS@%$CXXFLAGS%g
9519 s%@FFLAGS@%$FFLAGS%g
9520 s%@DEFS@%$DEFS%g
9521 s%@LDFLAGS@%$LDFLAGS%g
9522 s%@LIBS@%$LIBS%g
9523 s%@exec_prefix@%$exec_prefix%g
9524 s%@prefix@%$prefix%g
9525 s%@program_transform_name@%$program_transform_name%g
9526 s%@bindir@%$bindir%g
9527 s%@sbindir@%$sbindir%g
9528 s%@libexecdir@%$libexecdir%g
9529 s%@datadir@%$datadir%g
9530 s%@sysconfdir@%$sysconfdir%g
9531 s%@sharedstatedir@%$sharedstatedir%g
9532 s%@localstatedir@%$localstatedir%g
9533 s%@libdir@%$libdir%g
9534 s%@includedir@%$includedir%g
9535 s%@oldincludedir@%$oldincludedir%g
9536 s%@infodir@%$infodir%g
9537 s%@mandir@%$mandir%g
9538 s%@host@%$host%g
9539 s%@host_alias@%$host_alias%g
9540 s%@host_cpu@%$host_cpu%g
9541 s%@host_vendor@%$host_vendor%g
9542 s%@host_os@%$host_os%g
9543 s%@target@%$target%g
9544 s%@target_alias@%$target_alias%g
9545 s%@target_cpu@%$target_cpu%g
9546 s%@target_vendor@%$target_vendor%g
9547 s%@target_os@%$target_os%g
9548 s%@build@%$build%g
9549 s%@build_alias@%$build_alias%g
9550 s%@build_cpu@%$build_cpu%g
9551 s%@build_vendor@%$build_vendor%g
9552 s%@build_os@%$build_os%g
9553 s%@build_canonical@%$build_canonical%g
9554 s%@host_canonical@%$host_canonical%g
9555 s%@target_subdir@%$target_subdir%g
9556 s%@CC@%$CC%g
9557 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9558 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9559 s%@CPP@%$CPP%g
9560 s%@GNATBIND@%$GNATBIND%g
9561 s%@ADAC@%$ADAC%g
9562 s%@strict1_warn@%$strict1_warn%g
9563 s%@warn_cflags@%$warn_cflags%g
9564 s%@WERROR@%$WERROR%g
9565 s%@nocommon_flag@%$nocommon_flag%g
9566 s%@valgrind_path@%$valgrind_path%g
9567 s%@valgrind_path_defines@%$valgrind_path_defines%g
9568 s%@valgrind_command@%$valgrind_command%g
9569 s%@coverage_flags@%$coverage_flags%g
9570 s%@enable_multilib@%$enable_multilib%g
9571 s%@enable_shared@%$enable_shared%g
9572 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9573 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9574 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9575 s%@SET_MAKE@%$SET_MAKE%g
9576 s%@AWK@%$AWK%g
9577 s%@LN@%$LN%g
9578 s%@LN_S@%$LN_S%g
9579 s%@RANLIB@%$RANLIB%g
9580 s%@INSTALL@%$INSTALL%g
9581 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9582 s%@INSTALL_DATA@%$INSTALL_DATA%g
9583 s%@have_mktemp_command@%$have_mktemp_command%g
9584 s%@MAKEINFO@%$MAKEINFO%g
9585 s%@BUILD_INFO@%$BUILD_INFO%g
9586 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9587 s%@make_compare_target@%$make_compare_target%g
9588 s%@FLEX@%$FLEX%g
9589 s%@BISON@%$BISON%g
9590 s%@stage1_cflags@%$stage1_cflags%g
9591 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9592 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9593 s%@LDEXP_LIB@%$LDEXP_LIB%g
9594 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9595 s%@LIBICONV@%$LIBICONV%g
9596 s%@manext@%$manext%g
9597 s%@objext@%$objext%g
9598 s%@extra_modes_file@%$extra_modes_file%g
9599 s%@FORBUILD@%$FORBUILD%g
9600 s%@PACKAGE@%$PACKAGE%g
9601 s%@VERSION@%$VERSION%g
9602 s%@ALLOCA@%$ALLOCA%g
9603 s%@GLIBC21@%$GLIBC21%g
9604 s%@USE_NLS@%$USE_NLS%g
9605 s%@MSGFMT@%$MSGFMT%g
9606 s%@GMSGFMT@%$GMSGFMT%g
9607 s%@XGETTEXT@%$XGETTEXT%g
9608 s%@INTLBISON@%$INTLBISON%g
9609 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9610 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9611 s%@CATALOGS@%$CATALOGS%g
9612 s%@CATOBJEXT@%$CATOBJEXT%g
9613 s%@INTLLIBS@%$INTLLIBS%g
9614 s%@INTLDEPS@%$INTLDEPS%g
9615 s%@INTLOBJS@%$INTLOBJS%g
9616 s%@POSUB@%$POSUB%g
9617 s%@DATADIRNAME@%$DATADIRNAME%g
9618 s%@INSTOBJEXT@%$INSTOBJEXT%g
9619 s%@GENCAT@%$GENCAT%g
9620 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9621 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9622 s%@CROSS@%$CROSS%g
9623 s%@ALL@%$ALL%g
9624 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9625 s%@inhibit_libc@%$inhibit_libc%g
9626 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9627 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9628 s%@BUILD_CC@%$BUILD_CC%g
9629 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9630 s%@STMP_FIXINC@%$STMP_FIXINC%g
9631 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9632 s%@libgcc_visibility@%$libgcc_visibility%g
9633 s%@gthread_flags@%$gthread_flags%g
9634 s%@GGC@%$GGC%g
9635 s%@zlibdir@%$zlibdir%g
9636 s%@zlibinc@%$zlibinc%g
9637 s%@MAINT@%$MAINT%g
9638 s%@gcc_tooldir@%$gcc_tooldir%g
9639 s%@dollar@%$dollar%g
9640 s%@slibdir@%$slibdir%g
9641 s%@objdir@%$objdir%g
9642 s%@subdirs@%$subdirs%g
9643 s%@srcdir@%$srcdir%g
9644 s%@all_boot_languages@%$all_boot_languages%g
9645 s%@all_compilers@%$all_compilers%g
9646 s%@all_gtfiles@%$all_gtfiles%g
9647 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9648 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9649 s%@all_lang_makefiles@%$all_lang_makefiles%g
9650 s%@all_languages@%$all_languages%g
9651 s%@all_stagestuff@%$all_stagestuff%g
9652 s%@build_exeext@%$build_exeext%g
9653 s%@build_install_headers_dir@%$build_install_headers_dir%g
9654 s%@build_xm_file_list@%$build_xm_file_list%g
9655 s%@build_xm_file@%$build_xm_file%g
9656 s%@build_xm_defines@%$build_xm_defines%g
9657 s%@check_languages@%$check_languages%g
9658 s%@cc_set_by_configure@%$cc_set_by_configure%g
9659 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9660 s%@cpp_install_dir@%$cpp_install_dir%g
9661 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9662 s%@dep_tmake_file@%$dep_tmake_file%g
9663 s%@extra_headers_list@%$extra_headers_list%g
9664 s%@extra_objs@%$extra_objs%g
9665 s%@extra_parts@%$extra_parts%g
9666 s%@extra_passes@%$extra_passes%g
9667 s%@extra_programs@%$extra_programs%g
9668 s%@float_h_file@%$float_h_file%g
9669 s%@gcc_config_arguments@%$gcc_config_arguments%g
9670 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9671 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9672 s%@gcc_version@%$gcc_version%g
9673 s%@gcc_version_full@%$gcc_version_full%g
9674 s%@gcc_version_trigger@%$gcc_version_trigger%g
9675 s%@host_exeext@%$host_exeext%g
9676 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9677 s%@host_xm_file_list@%$host_xm_file_list%g
9678 s%@host_xm_file@%$host_xm_file%g
9679 s%@host_xm_defines@%$host_xm_defines%g
9680 s%@out_host_hook_obj@%$out_host_hook_obj%g
9681 s%@install@%$install%g
9682 s%@lang_options_files@%$lang_options_files%g
9683 s%@lang_specs_files@%$lang_specs_files%g
9684 s%@lang_tree_files@%$lang_tree_files%g
9685 s%@local_prefix@%$local_prefix%g
9686 s%@md_file@%$md_file%g
9687 s%@objc_boehm_gc@%$objc_boehm_gc%g
9688 s%@out_file@%$out_file%g
9689 s%@out_object_file@%$out_object_file%g
9690 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9691 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9692 s%@symbolic_link@%$symbolic_link%g
9693 s%@thread_file@%$thread_file%g
9694 s%@tm_file_list@%$tm_file_list%g
9695 s%@tm_file@%$tm_file%g
9696 s%@tm_defines@%$tm_defines%g
9697 s%@tm_p_file_list@%$tm_p_file_list%g
9698 s%@tm_p_file@%$tm_p_file%g
9699 s%@xm_file@%$xm_file%g
9700 s%@xm_defines@%$xm_defines%g
9701 s%@c_target_objs@%$c_target_objs%g
9702 s%@cxx_target_objs@%$cxx_target_objs%g
9703 s%@target_cpu_default@%$target_cpu_default%g
9704 /@target_overrides@/r $target_overrides
9705 s%@target_overrides@%%g
9706 /@host_overrides@/r $host_overrides
9707 s%@host_overrides@%%g
9708 /@language_fragments@/r $language_fragments
9709 s%@language_fragments@%%g
9710 /@language_hooks@/r $language_hooks
9711 s%@language_hooks@%%g
9713 CEOF
9716 cat >> $CONFIG_STATUS <<\EOF
9718 # Split the substitutions into bite-sized pieces for seds with
9719 # small command number limits, like on Digital OSF/1 and HP-UX.
9720 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9721 ac_file=1 # Number of current file.
9722 ac_beg=1 # First line for current file.
9723 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9724 ac_more_lines=:
9725 ac_sed_cmds=""
9726 while $ac_more_lines; do
9727 if test $ac_beg -gt 1; then
9728 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9729 else
9730 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9732 if test ! -s conftest.s$ac_file; then
9733 ac_more_lines=false
9734 rm -f conftest.s$ac_file
9735 else
9736 if test -z "$ac_sed_cmds"; then
9737 ac_sed_cmds="sed -f conftest.s$ac_file"
9738 else
9739 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9741 ac_file=`expr $ac_file + 1`
9742 ac_beg=$ac_end
9743 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9745 done
9746 if test -z "$ac_sed_cmds"; then
9747 ac_sed_cmds=cat
9751 cat >> $CONFIG_STATUS <<EOF
9753 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9755 cat >> $CONFIG_STATUS <<\EOF
9756 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9757 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9758 case "$ac_file" in
9759 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9760 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9761 *) ac_file_in="${ac_file}.in" ;;
9762 esac
9764 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9766 # Remove last slash and all that follows it. Not all systems have dirname.
9767 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9768 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9769 # The file is in a subdirectory.
9770 test ! -d "$ac_dir" && mkdir "$ac_dir"
9771 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9772 # A "../" for each directory in $ac_dir_suffix.
9773 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9774 else
9775 ac_dir_suffix= ac_dots=
9778 case "$ac_given_srcdir" in
9779 .) srcdir=.
9780 if test -z "$ac_dots"; then top_srcdir=.
9781 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9782 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9783 *) # Relative path.
9784 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9785 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9786 esac
9789 echo creating "$ac_file"
9790 rm -f "$ac_file"
9791 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9792 case "$ac_file" in
9793 *Makefile*) ac_comsub="1i\\
9794 # $configure_input" ;;
9795 *) ac_comsub= ;;
9796 esac
9798 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9799 sed -e "$ac_comsub
9800 s%@configure_input@%$configure_input%g
9801 s%@srcdir@%$srcdir%g
9802 s%@top_srcdir@%$top_srcdir%g
9803 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9804 fi; done
9805 rm -f conftest.s*
9807 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9808 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9810 # ac_d sets the value in "#define NAME VALUE" lines.
9811 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9812 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9813 ac_dC='\3'
9814 ac_dD='%g'
9815 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9816 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9817 ac_uB='\([ ]\)%\1#\2define\3'
9818 ac_uC=' '
9819 ac_uD='\4%g'
9820 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9821 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9822 ac_eB='$%\1#\2define\3'
9823 ac_eC=' '
9824 ac_eD='%g'
9826 if test "${CONFIG_HEADERS+set}" != set; then
9828 cat >> $CONFIG_STATUS <<EOF
9829 CONFIG_HEADERS="auto-host.h:config.in"
9831 cat >> $CONFIG_STATUS <<\EOF
9833 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9834 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9835 case "$ac_file" in
9836 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9837 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9838 *) ac_file_in="${ac_file}.in" ;;
9839 esac
9841 echo creating $ac_file
9843 rm -f conftest.frag conftest.in conftest.out
9844 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9845 cat $ac_file_inputs > conftest.in
9849 # Transform confdefs.h into a sed script conftest.vals that substitutes
9850 # the proper values into config.h.in to produce config.h. And first:
9851 # Protect against being on the right side of a sed subst in config.status.
9852 # Protect against being in an unquoted here document in config.status.
9853 rm -f conftest.vals
9854 cat > conftest.hdr <<\EOF
9855 s/[\\&%]/\\&/g
9856 s%[\\$`]%\\&%g
9857 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9858 s%ac_d%ac_u%gp
9859 s%ac_u%ac_e%gp
9861 sed -n -f conftest.hdr confdefs.h > conftest.vals
9862 rm -f conftest.hdr
9864 # This sed command replaces #undef with comments. This is necessary, for
9865 # example, in the case of _POSIX_SOURCE, which is predefined and required
9866 # on some systems where configure will not decide to define it.
9867 cat >> conftest.vals <<\EOF
9868 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9871 # Break up conftest.vals because some shells have a limit on
9872 # the size of here documents, and old seds have small limits too.
9874 rm -f conftest.tail
9875 while :
9877 ac_lines=`grep -c . conftest.vals`
9878 # grep -c gives empty output for an empty file on some AIX systems.
9879 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9880 # Write a limited-size here document to conftest.frag.
9881 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9882 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9883 echo 'CEOF
9884 sed -f conftest.frag conftest.in > conftest.out
9885 rm -f conftest.in
9886 mv conftest.out conftest.in
9887 ' >> $CONFIG_STATUS
9888 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9889 rm -f conftest.vals
9890 mv conftest.tail conftest.vals
9891 done
9892 rm -f conftest.vals
9894 cat >> $CONFIG_STATUS <<\EOF
9895 rm -f conftest.frag conftest.h
9896 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9897 cat conftest.in >> conftest.h
9898 rm -f conftest.in
9899 if cmp -s $ac_file conftest.h 2>/dev/null; then
9900 echo "$ac_file is unchanged"
9901 rm -f conftest.h
9902 else
9903 # Remove last slash and all that follows it. Not all systems have dirname.
9904 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9905 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9906 # The file is in a subdirectory.
9907 test ! -d "$ac_dir" && mkdir "$ac_dir"
9909 rm -f $ac_file
9910 mv conftest.h $ac_file
9912 fi; done
9915 cat >> $CONFIG_STATUS <<EOF
9917 subdirs='$subdirs'
9918 symbolic_link='$symbolic_link'
9921 cat >> $CONFIG_STATUS <<\EOF
9922 for ac_file in $CONFIG_FILES; do
9923 # Support "outfile[:infile[:infile...]]"
9924 case "$ac_file" in
9925 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9926 esac
9927 # PO directories have a Makefile.in generated from Makefile.in.in.
9928 case "$ac_file" in */Makefile.in)
9929 # Adjust a relative srcdir.
9930 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9931 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9932 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9933 # In autoconf-2.13 it is called $ac_given_srcdir.
9934 # In autoconf-2.50 it is called $srcdir.
9935 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9936 case "$ac_given_srcdir" in
9937 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9938 /*) top_srcdir="$ac_given_srcdir" ;;
9939 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9940 esac
9941 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9942 rm -f "$ac_dir/POTFILES"
9943 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9944 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9945 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9946 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9949 esac
9950 done
9952 case x$CONFIG_HEADERS in
9953 xauto-host.h:config.in)
9954 echo > cstamp-h ;;
9955 esac
9956 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9957 # bootstrapping and the installation procedure can still use
9958 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9959 # FLAGS_TO_PASS has been modified to solve the problem there.
9960 # This is virtually a duplicate of what happens in configure.lang; we do
9961 # an extra check to make sure this only happens if ln -s can be used.
9962 if test "$symbolic_link" = "ln -s"; then
9963 for d in .. ${subdirs} fixinc ; do
9964 if test $d != ..; then
9965 STARTDIR=`${PWDCMD-pwd}`
9966 cd $d
9967 for t in stage1 stage2 stage3 stage4 include
9969 rm -f $t
9970 $symbolic_link ../$t $t 2>/dev/null
9971 done
9972 cd $STARTDIR
9974 done
9975 else true ; fi
9976 # Avoid having to add intl to our include paths.
9977 if test -f intl/libintl.h; then
9978 echo creating libintl.h
9979 echo '#include "intl/libintl.h"' >libintl.h
9982 exit 0
9984 chmod +x $CONFIG_STATUS
9985 rm -fr confdefs* $ac_clean_files
9986 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1