* java/util/Properties.java (load): Only skip line if the first
[official-gcc.git] / gcc / configure
blob6d5b8f614127e59472b1284df1a54a2f0bf3817d
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-gnu-ld arrange to work with GNU ld."
16 ac_help="$ac_help
17 --with-ld arrange to use the specified ld (full pathname)"
18 ac_help="$ac_help
19 --with-gnu-as arrange to work with GNU as"
20 ac_help="$ac_help
21 --with-as arrange to use the specified as (full pathname)"
22 ac_help="$ac_help
23 --with-stabs arrange to use stabs instead of host debug format"
24 ac_help="$ac_help
25 --with-elf arrange to use ELF instead of host debug format"
26 ac_help="$ac_help
27 --with-local-prefix=DIR specifies directory to put local include"
28 ac_help="$ac_help
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files"
31 ac_help="$ac_help
32 --enable-multilib enable library support for multiple ABIs"
33 ac_help="$ac_help
34 --enable-werror enable -Werror in bootstrap stage2 and later"
35 ac_help="$ac_help
36 --enable-checking[=LIST]
37 enable expensive run-time checks. With LIST,
38 enable only specific categories of checks.
39 Categories are: misc,tree,rtl,rtlflag,gc,gcac;
40 default is misc,tree,gc,rtlflag"
41 ac_help="$ac_help
42 --enable-coverage[=LEVEL]
43 enable compiler\'s code coverage collection.
44 Use to measure compiler performance and locate
45 unused parts of the compiler. With LEVEL, specify
46 optimization. Values are opt, noopt,
47 default is noopt"
48 ac_help="$ac_help
49 --with-cpp-install-dir=DIR
50 install the user visible C preprocessor in DIR
51 (relative to PREFIX) as well as PREFIX/bin"
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 remove=rm
621 hard_link=ln
622 symbolic_link='ln -s'
623 copy=cp
625 # Check for bogus environment variables.
626 # Test if LIBRARY_PATH contains the notation for the current directory
627 # since this would lead to problems installing/building glibc.
628 # LIBRARY_PATH contains the current directory if one of the following
629 # is true:
630 # - one of the terminals (":" and ";") is the first or last sign
631 # - two terminals occur directly after each other
632 # - the path contains an element with a dot in it
633 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
634 echo "configure:635: checking LIBRARY_PATH variable" >&5
635 case ${LIBRARY_PATH} in
636 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
637 library_path_setting="contains current directory"
640 library_path_setting="ok"
642 esac
643 echo "$ac_t""$library_path_setting" 1>&6
644 if test "$library_path_setting" != "ok"; then
645 { echo "configure: error:
646 *** LIBRARY_PATH shouldn't contain the current directory when
647 *** building gcc. Please change the environment variable
648 *** and run configure again." 1>&2; exit 1; }
651 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
652 # since this would lead to problems installing/building glibc.
653 # GCC_EXEC_PREFIX contains the current directory if one of the following
654 # is true:
655 # - one of the terminals (":" and ";") is the first or last sign
656 # - two terminals occur directly after each other
657 # - the path contains an element with a dot in it
658 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
659 echo "configure:660: checking GCC_EXEC_PREFIX variable" >&5
660 case ${GCC_EXEC_PREFIX} in
661 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
662 gcc_exec_prefix_setting="contains current directory"
665 gcc_exec_prefix_setting="ok"
667 esac
668 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
669 if test "$gcc_exec_prefix_setting" != "ok"; then
670 { echo "configure: error:
671 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
672 *** building gcc. Please change the environment variable
673 *** and run configure again." 1>&2; exit 1; }
676 # Check for additional parameters
678 # With GNU ld
679 # Check whether --with-gnu-ld or --without-gnu-ld was given.
680 if test "${with_gnu_ld+set}" = set; then
681 withval="$with_gnu_ld"
682 gnu_ld_flag="$with_gnu_ld"
683 else
684 gnu_ld_flag=no
688 # With pre-defined ld
689 # Check whether --with-ld or --without-ld was given.
690 if test "${with_ld+set}" = set; then
691 withval="$with_ld"
692 DEFAULT_LINKER="$with_ld"
695 if test x"${DEFAULT_LINKER+set}" = x"set"; then
696 if test ! -x "$DEFAULT_LINKER"; then
697 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
698 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
699 gnu_ld_flag=yes
701 cat >> confdefs.h <<EOF
702 #define DEFAULT_LINKER "$DEFAULT_LINKER"
707 # With GNU as
708 # Check whether --with-gnu-as or --without-gnu-as was given.
709 if test "${with_gnu_as+set}" = set; then
710 withval="$with_gnu_as"
711 gas_flag="$with_gnu_as"
712 else
713 gas_flag=no
717 # Check whether --with-as or --without-as was given.
718 if test "${with_as+set}" = set; then
719 withval="$with_as"
720 DEFAULT_ASSEMBLER="$with_as"
723 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
724 if test ! -x "$DEFAULT_ASSEMBLER"; then
725 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
726 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
727 gas_flag=yes
729 cat >> confdefs.h <<EOF
730 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
735 # With stabs
736 # Check whether --with-stabs or --without-stabs was given.
737 if test "${with_stabs+set}" = set; then
738 withval="$with_stabs"
739 stabs="$with_stabs"
740 else
741 stabs=no
745 # With ELF
746 # Check whether --with-elf or --without-elf was given.
747 if test "${with_elf+set}" = set; then
748 withval="$with_elf"
749 elf="$with_elf"
750 else
751 elf=no
755 # Specify the local prefix
756 local_prefix=
757 # Check whether --with-local-prefix or --without-local-prefix was given.
758 if test "${with_local_prefix+set}" = set; then
759 withval="$with_local_prefix"
760 case "${withval}" in
761 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
762 no) ;;
763 *) local_prefix=$with_local_prefix ;;
764 esac
768 # Default local prefix if it is empty
769 if test x$local_prefix = x; then
770 local_prefix=/usr/local
773 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
774 # passed in by the toplevel make and thus we'd get different behavior
775 # depending on where we built the sources.
776 gcc_gxx_include_dir=
777 # Specify the g++ header file directory
778 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
779 if test "${with_gxx_include_dir+set}" = set; then
780 withval="$with_gxx_include_dir"
781 case "${withval}" in
782 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
783 no) ;;
784 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
785 esac
789 if test x${gcc_gxx_include_dir} = x; then
790 if test x${enable_version_specific_runtime_libs} = xyes; then
791 gcc_gxx_include_dir='${libsubdir}/include/c++'
792 else
793 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
794 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
798 # Determine the host, build, and target systems
799 ac_aux_dir=
800 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
801 if test -f $ac_dir/install-sh; then
802 ac_aux_dir=$ac_dir
803 ac_install_sh="$ac_aux_dir/install-sh -c"
804 break
805 elif test -f $ac_dir/install.sh; then
806 ac_aux_dir=$ac_dir
807 ac_install_sh="$ac_aux_dir/install.sh -c"
808 break
810 done
811 if test -z "$ac_aux_dir"; then
812 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
814 ac_config_guess=$ac_aux_dir/config.guess
815 ac_config_sub=$ac_aux_dir/config.sub
816 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
819 # Do some error checking and defaulting for the host and target type.
820 # The inputs are:
821 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
823 # The rules are:
824 # 1. You are not allowed to specify --host, --target, and nonopt at the
825 # same time.
826 # 2. Host defaults to nonopt.
827 # 3. If nonopt is not specified, then host defaults to the current host,
828 # as determined by config.guess.
829 # 4. Target and build default to nonopt.
830 # 5. If nonopt is not specified, then target and build default to host.
832 # The aliases save the names the user supplied, while $host etc.
833 # will get canonicalized.
834 case $host---$target---$nonopt in
835 NONE---*---* | *---NONE---* | *---*---NONE) ;;
836 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
837 esac
840 # Make sure we can run config.sub.
841 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
842 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
845 echo $ac_n "checking host system type""... $ac_c" 1>&6
846 echo "configure:847: checking host system type" >&5
848 host_alias=$host
849 case "$host_alias" in
850 NONE)
851 case $nonopt in
852 NONE)
853 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
854 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
855 fi ;;
856 *) host_alias=$nonopt ;;
857 esac ;;
858 esac
860 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
862 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
863 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
864 echo "$ac_t""$host" 1>&6
866 echo $ac_n "checking target system type""... $ac_c" 1>&6
867 echo "configure:868: checking target system type" >&5
869 target_alias=$target
870 case "$target_alias" in
871 NONE)
872 case $nonopt in
873 NONE) target_alias=$host_alias ;;
874 *) target_alias=$nonopt ;;
875 esac ;;
876 esac
878 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
879 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
880 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
881 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
882 echo "$ac_t""$target" 1>&6
884 echo $ac_n "checking build system type""... $ac_c" 1>&6
885 echo "configure:886: checking build system type" >&5
887 build_alias=$build
888 case "$build_alias" in
889 NONE)
890 case $nonopt in
891 NONE) build_alias=$host_alias ;;
892 *) build_alias=$nonopt ;;
893 esac ;;
894 esac
896 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
897 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 echo "$ac_t""$build" 1>&6
902 test "$host_alias" != "$target_alias" &&
903 test "$program_prefix$program_suffix$program_transform_name" = \
904 NONENONEs,x,x, &&
905 program_prefix=${target_alias}-
908 # Set program_transform_name
909 if test "$program_transform_name" = s,x,x,; then
910 program_transform_name=
911 else
912 # Double any \ or $. echo might interpret backslashes.
913 cat <<\EOF_SED > conftestsed
914 s,\\,\\\\,g; s,\$,$$,g
915 EOF_SED
916 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
917 rm -f conftestsed
919 test "$program_prefix" != NONE &&
920 program_transform_name="s,^,${program_prefix},; $program_transform_name"
921 # Use a double $ so make ignores it.
922 test "$program_suffix" != NONE &&
923 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
925 # sed with no file args requires a program.
926 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
929 # Find the native compiler
930 # Extract the first word of "gcc", so it can be a program name with args.
931 set dummy gcc; ac_word=$2
932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
933 echo "configure:934: checking for $ac_word" >&5
934 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
936 else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939 else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="gcc"
946 break
948 done
949 IFS="$ac_save_ifs"
952 CC="$ac_cv_prog_CC"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955 else
956 echo "$ac_t""no" 1>&6
959 if test -z "$CC"; then
960 # Extract the first word of "cc", so it can be a program name with args.
961 set dummy cc; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
965 echo $ac_n "(cached) $ac_c" 1>&6
966 else
967 if test -n "$CC"; then
968 ac_cv_prog_CC="$CC" # Let the user override the test.
969 else
970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
971 ac_prog_rejected=no
972 ac_dummy="$PATH"
973 for ac_dir in $ac_dummy; do
974 test -z "$ac_dir" && ac_dir=.
975 if test -f $ac_dir/$ac_word; then
976 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
977 ac_prog_rejected=yes
978 continue
980 ac_cv_prog_CC="cc"
981 break
983 done
984 IFS="$ac_save_ifs"
985 if test $ac_prog_rejected = yes; then
986 # We found a bogon in the path, so make sure we never use it.
987 set dummy $ac_cv_prog_CC
988 shift
989 if test $# -gt 0; then
990 # We chose a different compiler from the bogus one.
991 # However, it has the same basename, so the bogon will be chosen
992 # first if we set CC to just the basename; use the full file name.
993 shift
994 set dummy "$ac_dir/$ac_word" "$@"
995 shift
996 ac_cv_prog_CC="$@"
1001 CC="$ac_cv_prog_CC"
1002 if test -n "$CC"; then
1003 echo "$ac_t""$CC" 1>&6
1004 else
1005 echo "$ac_t""no" 1>&6
1008 if test -z "$CC"; then
1009 case "`uname -s`" in
1010 *win32* | *WIN32*)
1011 # Extract the first word of "cl", so it can be a program name with args.
1012 set dummy cl; ac_word=$2
1013 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1014 echo "configure:1015: checking for $ac_word" >&5
1015 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1016 echo $ac_n "(cached) $ac_c" 1>&6
1017 else
1018 if test -n "$CC"; then
1019 ac_cv_prog_CC="$CC" # Let the user override the test.
1020 else
1021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1022 ac_dummy="$PATH"
1023 for ac_dir in $ac_dummy; do
1024 test -z "$ac_dir" && ac_dir=.
1025 if test -f $ac_dir/$ac_word; then
1026 ac_cv_prog_CC="cl"
1027 break
1029 done
1030 IFS="$ac_save_ifs"
1033 CC="$ac_cv_prog_CC"
1034 if test -n "$CC"; then
1035 echo "$ac_t""$CC" 1>&6
1036 else
1037 echo "$ac_t""no" 1>&6
1040 esac
1042 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1045 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1046 echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1048 ac_ext=c
1049 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1050 ac_cpp='$CPP $CPPFLAGS'
1051 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1052 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1053 cross_compiling=$ac_cv_prog_cc_cross
1055 cat > conftest.$ac_ext << EOF
1057 #line 1058 "configure"
1058 #include "confdefs.h"
1060 main(){return(0);}
1062 if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1063 ac_cv_prog_cc_works=yes
1064 # If we can't run a trivial program, we are probably using a cross compiler.
1065 if (./conftest; exit) 2>/dev/null; then
1066 ac_cv_prog_cc_cross=no
1067 else
1068 ac_cv_prog_cc_cross=yes
1070 else
1071 echo "configure: failed program was:" >&5
1072 cat conftest.$ac_ext >&5
1073 ac_cv_prog_cc_works=no
1075 rm -fr conftest*
1076 ac_ext=c
1077 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1078 ac_cpp='$CPP $CPPFLAGS'
1079 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1080 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1081 cross_compiling=$ac_cv_prog_cc_cross
1083 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1084 if test $ac_cv_prog_cc_works = no; then
1085 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1087 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1088 echo "configure:1089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1089 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1090 cross_compiling=$ac_cv_prog_cc_cross
1092 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1093 echo "configure:1094: checking whether we are using GNU C" >&5
1094 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1095 echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097 cat > conftest.c <<EOF
1098 #ifdef __GNUC__
1099 yes;
1100 #endif
1102 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1103 ac_cv_prog_gcc=yes
1104 else
1105 ac_cv_prog_gcc=no
1109 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1111 if test $ac_cv_prog_gcc = yes; then
1112 GCC=yes
1113 else
1114 GCC=
1117 ac_test_CFLAGS="${CFLAGS+set}"
1118 ac_save_CFLAGS="$CFLAGS"
1119 CFLAGS=
1120 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1121 echo "configure:1122: checking whether ${CC-cc} accepts -g" >&5
1122 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1123 echo $ac_n "(cached) $ac_c" 1>&6
1124 else
1125 echo 'void f(){}' > conftest.c
1126 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1127 ac_cv_prog_cc_g=yes
1128 else
1129 ac_cv_prog_cc_g=no
1131 rm -f conftest*
1135 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1136 if test "$ac_test_CFLAGS" = set; then
1137 CFLAGS="$ac_save_CFLAGS"
1138 elif test $ac_cv_prog_cc_g = yes; then
1139 if test "$GCC" = yes; then
1140 CFLAGS="-g -O2"
1141 else
1142 CFLAGS="-g"
1144 else
1145 if test "$GCC" = yes; then
1146 CFLAGS="-O2"
1147 else
1148 CFLAGS=
1152 if test "x$CC" != xcc; then
1153 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1154 echo "configure:1155: checking whether $CC and cc understand -c and -o together" >&5
1155 else
1156 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1157 echo "configure:1158: checking whether cc understands -c and -o together" >&5
1159 set dummy $CC; ac_cc="`echo $2 |
1160 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1161 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164 echo 'foo(){}' > conftest.c
1165 # Make sure it works both with $CC and with simple cc.
1166 # We do the test twice because some compilers refuse to overwrite an
1167 # existing .o file with -o, though they will create one.
1168 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1169 if { (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1170 test -f conftest.o && { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1171 then
1172 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1173 if test "x$CC" != xcc; then
1174 # Test first that cc exists at all.
1175 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1176 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1177 if { (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1178 test -f conftest.o && { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1179 then
1180 # cc works too.
1182 else
1183 # cc exists but doesn't like -o.
1184 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1188 else
1189 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1191 rm -f conftest*
1194 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1195 echo "$ac_t""yes" 1>&6
1196 else
1197 echo "$ac_t""no" 1>&6
1198 cat >> confdefs.h <<\EOF
1199 #define NO_MINUS_C_MINUS_O 1
1204 # autoconf is lame and doesn't give us any substitution variable for this.
1205 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1206 NO_MINUS_C_MINUS_O=yes
1207 else
1208 OUTPUT_OPTION='-o $@'
1213 # See if GNAT has been installed
1214 if test $host != $build; then
1215 ac_tool_prefix=${host_alias}-
1216 else
1217 ac_tool_prefix=
1221 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1222 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1224 echo "configure:1225: checking for $ac_word" >&5
1225 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228 if test -n "$GNATBIND"; then
1229 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1230 else
1231 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1232 ac_dummy="$PATH"
1233 for ac_dir in $ac_dummy; do
1234 test -z "$ac_dir" && ac_dir=.
1235 if test -f $ac_dir/$ac_word; then
1236 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1237 break
1239 done
1240 IFS="$ac_save_ifs"
1243 GNATBIND="$ac_cv_prog_GNATBIND"
1244 if test -n "$GNATBIND"; then
1245 echo "$ac_t""$GNATBIND" 1>&6
1246 else
1247 echo "$ac_t""no" 1>&6
1251 if test -z "$ac_cv_prog_GNATBIND"; then
1252 if test -n "$ac_tool_prefix"; then
1253 # Extract the first word of "gnatbind", so it can be a program name with args.
1254 set dummy gnatbind; ac_word=$2
1255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1256 echo "configure:1257: checking for $ac_word" >&5
1257 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260 if test -n "$GNATBIND"; then
1261 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1262 else
1263 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1264 ac_dummy="$PATH"
1265 for ac_dir in $ac_dummy; do
1266 test -z "$ac_dir" && ac_dir=.
1267 if test -f $ac_dir/$ac_word; then
1268 ac_cv_prog_GNATBIND="gnatbind"
1269 break
1271 done
1272 IFS="$ac_save_ifs"
1273 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1276 GNATBIND="$ac_cv_prog_GNATBIND"
1277 if test -n "$GNATBIND"; then
1278 echo "$ac_t""$GNATBIND" 1>&6
1279 else
1280 echo "$ac_t""no" 1>&6
1283 else
1284 GNATBIND="no"
1288 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1289 echo "configure:1290: checking for compiler driver that understands Ada" >&5
1290 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1291 echo $ac_n "(cached) $ac_c" 1>&6
1292 else
1293 cat >conftest.adb <<EOF
1294 procedure conftest is begin null; end conftest;
1296 gcc_cv_prog_adac=no
1297 # Have to do ac_tool_prefix and user overrides by hand.
1298 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1299 ${ac_tool_prefix}gcc gcc \
1300 ${ac_tool_prefix}cc cc \
1301 ${ac_tool_prefix}gnatgcc gnatgcc \
1302 ${ac_tool_prefix}gnatcc gnatcc \
1303 ${ac_tool_prefix}adagcc adagcc \
1304 ${ac_tool_prefix}adacc adacc ; do
1305 # There is a bug in all released versions of GCC which causes the
1306 # driver to exit successfully when the appropriate language module
1307 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1308 # Therefore we must check for the error message as well as an
1309 # unsuccessful exit.
1310 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1311 if test x"$errors" = x; then
1312 gcc_cv_prog_adac=$cand
1313 break
1315 done
1316 rm -f conftest.*
1319 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1320 ADAC=$gcc_cv_prog_adac
1323 if test x$GNATBIND != xno && test x$ADAC != xno; then
1324 have_gnat=yes
1325 else
1326 have_gnat=no
1330 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1331 echo "configure:1332: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1332 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 save_CFLAGS="$CFLAGS"
1336 CFLAGS="-Wno-long-long"
1337 cat > conftest.$ac_ext <<EOF
1338 #line 1339 "configure"
1339 #include "confdefs.h"
1341 int main() {
1343 ; return 0; }
1345 if { (eval echo configure:1346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1346 rm -rf conftest*
1347 ac_cv_prog_cc_no_long_long=yes
1348 else
1349 echo "configure: failed program was:" >&5
1350 cat conftest.$ac_ext >&5
1351 rm -rf conftest*
1352 ac_cv_prog_cc_no_long_long=no
1354 rm -f conftest*
1355 CFLAGS="$save_CFLAGS"
1358 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1360 if test x$have_gnat != xno ; then
1361 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1362 echo "configure:1363: checking whether ${ADAC} accepts -Wno-long-long" >&5
1363 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366 cat >conftest.adb <<EOF
1367 procedure conftest is begin null; end conftest;
1369 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1370 ac_cv_prog_adac_no_long_long=yes
1371 else
1372 ac_cv_prog_adac_no_long_long=no
1374 rm -f conftest*
1377 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1378 else
1379 ac_cv_prog_adac_no_long_long=yes
1382 strict1_warn=
1383 if test $ac_cv_prog_cc_no_long_long = yes && \
1384 test $ac_cv_prog_adac_no_long_long = yes ; then
1385 strict1_warn="-pedantic -Wno-long-long"
1389 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1390 echo "configure:1391: checking how to run the C preprocessor" >&5
1391 # On Suns, sometimes $CPP names a directory.
1392 if test -n "$CPP" && test -d "$CPP"; then
1393 CPP=
1395 if test -z "$CPP"; then
1396 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398 else
1399 # This must be in double quotes, not single quotes, because CPP may get
1400 # substituted into the Makefile and "${CC-cc}" will confuse make.
1401 CPP="${CC-cc} -E"
1402 # On the NeXT, cc -E runs the code through the compiler's parser,
1403 # not just through cpp.
1404 cat > conftest.$ac_ext <<EOF
1405 #line 1406 "configure"
1406 #include "confdefs.h"
1407 #include <assert.h>
1408 Syntax Error
1410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1411 { (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1413 if test -z "$ac_err"; then
1415 else
1416 echo "$ac_err" >&5
1417 echo "configure: failed program was:" >&5
1418 cat conftest.$ac_ext >&5
1419 rm -rf conftest*
1420 CPP="${CC-cc} -E -traditional-cpp"
1421 cat > conftest.$ac_ext <<EOF
1422 #line 1423 "configure"
1423 #include "confdefs.h"
1424 #include <assert.h>
1425 Syntax Error
1427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1428 { (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1430 if test -z "$ac_err"; then
1432 else
1433 echo "$ac_err" >&5
1434 echo "configure: failed program was:" >&5
1435 cat conftest.$ac_ext >&5
1436 rm -rf conftest*
1437 CPP="${CC-cc} -nologo -E"
1438 cat > conftest.$ac_ext <<EOF
1439 #line 1440 "configure"
1440 #include "confdefs.h"
1441 #include <assert.h>
1442 Syntax Error
1444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1445 { (eval echo configure:1446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1447 if test -z "$ac_err"; then
1449 else
1450 echo "$ac_err" >&5
1451 echo "configure: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
1453 rm -rf conftest*
1454 CPP=/lib/cpp
1456 rm -f conftest*
1458 rm -f conftest*
1460 rm -f conftest*
1461 ac_cv_prog_CPP="$CPP"
1463 CPP="$ac_cv_prog_CPP"
1464 else
1465 ac_cv_prog_CPP="$CPP"
1467 echo "$ac_t""$CPP" 1>&6
1469 echo $ac_n "checking for inline""... $ac_c" 1>&6
1470 echo "configure:1471: checking for inline" >&5
1471 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474 ac_cv_c_inline=no
1475 for ac_kw in inline __inline__ __inline; do
1476 cat > conftest.$ac_ext <<EOF
1477 #line 1478 "configure"
1478 #include "confdefs.h"
1480 int main() {
1481 } $ac_kw foo() {
1482 ; return 0; }
1484 if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485 rm -rf conftest*
1486 ac_cv_c_inline=$ac_kw; break
1487 else
1488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
1491 rm -f conftest*
1492 done
1496 echo "$ac_t""$ac_cv_c_inline" 1>&6
1497 case "$ac_cv_c_inline" in
1498 inline | yes) ;;
1499 no) cat >> confdefs.h <<\EOF
1500 #define inline
1503 *) cat >> confdefs.h <<EOF
1504 #define inline $ac_cv_c_inline
1507 esac
1509 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1510 echo "configure:1511: checking for volatile" >&5
1511 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+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 volatile int foo;
1520 ; return 0; }
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1523 rm -rf conftest*
1524 gcc_cv_c_volatile=yes
1525 else
1526 echo "configure: failed program was:" >&5
1527 cat conftest.$ac_ext >&5
1528 rm -rf conftest*
1529 gcc_cv_c_volatile=no
1531 rm -f conftest*
1534 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1535 if test $gcc_cv_c_volatile = yes ; then
1536 cat >> confdefs.h <<\EOF
1537 #define HAVE_VOLATILE 1
1543 echo $ac_n "checking for long double""... $ac_c" 1>&6
1544 echo "configure:1545: checking for long double" >&5
1545 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1546 echo $ac_n "(cached) $ac_c" 1>&6
1547 else
1548 if test "$GCC" = yes; then
1549 gcc_cv_c_long_double=yes
1550 else
1551 cat > conftest.$ac_ext <<EOF
1552 #line 1553 "configure"
1553 #include "confdefs.h"
1555 int main() {
1556 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1557 long double foo = 0.0;
1558 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1559 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1560 ; return 0; }
1562 if { (eval echo configure:1563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1563 rm -rf conftest*
1564 gcc_cv_c_long_double=yes
1565 else
1566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
1568 rm -rf conftest*
1569 gcc_cv_c_long_double=no
1571 rm -f conftest*
1575 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1576 if test $gcc_cv_c_long_double = yes; then
1577 cat >> confdefs.h <<\EOF
1578 #define HAVE_LONG_DOUBLE 1
1583 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1584 echo "configure:1585: checking for long long int" >&5
1585 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1586 echo $ac_n "(cached) $ac_c" 1>&6
1587 else
1588 cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1592 int main() {
1593 long long int i;
1594 ; return 0; }
1596 if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597 rm -rf conftest*
1598 ac_cv_c_long_long=yes
1599 else
1600 echo "configure: failed program was:" >&5
1601 cat conftest.$ac_ext >&5
1602 rm -rf conftest*
1603 ac_cv_c_long_long=no
1605 rm -f conftest*
1608 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1609 if test $ac_cv_c_long_long = yes; then
1610 cat >> confdefs.h <<\EOF
1611 #define HAVE_LONG_LONG 1
1615 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1616 echo "configure:1617: checking for __int64" >&5
1617 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1618 echo $ac_n "(cached) $ac_c" 1>&6
1619 else
1620 cat > conftest.$ac_ext <<EOF
1621 #line 1622 "configure"
1622 #include "confdefs.h"
1624 int main() {
1625 __int64 i;
1626 ; return 0; }
1628 if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1629 rm -rf conftest*
1630 ac_cv_c___int64=yes
1631 else
1632 echo "configure: failed program was:" >&5
1633 cat conftest.$ac_ext >&5
1634 rm -rf conftest*
1635 ac_cv_c___int64=no
1637 rm -f conftest*
1640 echo "$ac_t""$ac_cv_c___int64" 1>&6
1641 if test $ac_cv_c___int64 = yes; then
1642 cat >> confdefs.h <<\EOF
1643 #define HAVE___INT64 1
1648 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1649 echo "configure:1650: checking for built-in _Bool" >&5
1650 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1651 echo $ac_n "(cached) $ac_c" 1>&6
1652 else
1653 cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1657 int main() {
1658 _Bool foo;
1659 ; return 0; }
1661 if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1662 rm -rf conftest*
1663 gcc_cv_c__bool=yes
1664 else
1665 echo "configure: failed program was:" >&5
1666 cat conftest.$ac_ext >&5
1667 rm -rf conftest*
1668 gcc_cv_c__bool=no
1670 rm -f conftest*
1674 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1675 if test $gcc_cv_c__bool = yes; then
1676 cat >> confdefs.h <<\EOF
1677 #define HAVE__BOOL 1
1683 # sizeof(char) is 1 by definition.
1684 echo $ac_n "checking size of short""... $ac_c" 1>&6
1685 echo "configure:1686: checking size of short" >&5
1686 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1690 cat > conftest.$ac_ext <<EOF
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693 #include "confdefs.h"
1694 #include <sys/types.h>
1697 int main() {
1698 switch (0) case 0: case (sizeof (short) == $ac_size):;
1699 ; return 0; }
1701 if { (eval echo configure:1702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1702 rm -rf conftest*
1703 ac_cv_sizeof_short=$ac_size
1704 else
1705 echo "configure: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1708 rm -f conftest*
1709 if test x$ac_cv_sizeof_short != x ; then break; fi
1710 done
1714 if test x$ac_cv_sizeof_short = x ; then
1715 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1717 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1718 cat >> confdefs.h <<EOF
1719 #define SIZEOF_SHORT $ac_cv_sizeof_short
1723 echo $ac_n "checking size of int""... $ac_c" 1>&6
1724 echo "configure:1725: checking size of int" >&5
1725 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1726 echo $ac_n "(cached) $ac_c" 1>&6
1727 else
1728 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732 #include "confdefs.h"
1733 #include <sys/types.h>
1736 int main() {
1737 switch (0) case 0: case (sizeof (int) == $ac_size):;
1738 ; return 0; }
1740 if { (eval echo configure:1741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1741 rm -rf conftest*
1742 ac_cv_sizeof_int=$ac_size
1743 else
1744 echo "configure: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1747 rm -f conftest*
1748 if test x$ac_cv_sizeof_int != x ; then break; fi
1749 done
1753 if test x$ac_cv_sizeof_int = x ; then
1754 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1756 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1757 cat >> confdefs.h <<EOF
1758 #define SIZEOF_INT $ac_cv_sizeof_int
1762 echo $ac_n "checking size of long""... $ac_c" 1>&6
1763 echo "configure:1764: checking size of long" >&5
1764 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766 else
1767 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771 #include "confdefs.h"
1772 #include <sys/types.h>
1775 int main() {
1776 switch (0) case 0: case (sizeof (long) == $ac_size):;
1777 ; return 0; }
1779 if { (eval echo configure:1780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1780 rm -rf conftest*
1781 ac_cv_sizeof_long=$ac_size
1782 else
1783 echo "configure: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1786 rm -f conftest*
1787 if test x$ac_cv_sizeof_long != x ; then break; fi
1788 done
1792 if test x$ac_cv_sizeof_long = x ; then
1793 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1795 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1796 cat >> confdefs.h <<EOF
1797 #define SIZEOF_LONG $ac_cv_sizeof_long
1801 if test $ac_cv_c_long_long = yes; then
1802 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1803 echo "configure:1804: checking size of long long" >&5
1804 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1805 echo $ac_n "(cached) $ac_c" 1>&6
1806 else
1807 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 #include "confdefs.h"
1812 #include <sys/types.h>
1815 int main() {
1816 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1817 ; return 0; }
1819 if { (eval echo configure:1820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1820 rm -rf conftest*
1821 ac_cv_sizeof_long_long=$ac_size
1822 else
1823 echo "configure: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1826 rm -f conftest*
1827 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1828 done
1832 if test x$ac_cv_sizeof_long_long = x ; then
1833 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1835 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1836 cat >> confdefs.h <<EOF
1837 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1842 if test $ac_cv_c___int64 = yes; then
1843 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1844 echo "configure:1845: checking size of __int64" >&5
1845 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1847 else
1848 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include "confdefs.h"
1853 #include <sys/types.h>
1856 int main() {
1857 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1858 ; return 0; }
1860 if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1861 rm -rf conftest*
1862 ac_cv_sizeof___int64=$ac_size
1863 else
1864 echo "configure: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1867 rm -f conftest*
1868 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1869 done
1873 if test x$ac_cv_sizeof___int64 = x ; then
1874 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1876 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1877 cat >> confdefs.h <<EOF
1878 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1884 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1885 echo "configure:1886: checking execution character set" >&5
1886 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1887 echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1893 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1894 ASCII
1895 #endif
1897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1898 egrep "ASCII" >/dev/null 2>&1; then
1899 rm -rf conftest*
1900 ac_cv_c_charset=ASCII
1902 rm -f conftest*
1904 if test x${ac_cv_c_charset+set} != xset; then
1905 cat > conftest.$ac_ext <<EOF
1906 #line 1907 "configure"
1907 #include "confdefs.h"
1908 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1909 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1910 EBCDIC
1911 #endif
1913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1914 egrep "EBCDIC" >/dev/null 2>&1; then
1915 rm -rf conftest*
1916 ac_cv_c_charset=EBCDIC
1918 rm -f conftest*
1921 if test x${ac_cv_c_charset+set} != xset; then
1922 ac_cv_c_charset=unknown
1926 echo "$ac_t""$ac_cv_c_charset" 1>&6
1927 if test $ac_cv_c_charset = unknown; then
1928 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1929 elif test $ac_cv_c_charset = EBCDIC; then
1930 cat >> confdefs.h <<\EOF
1931 #define HOST_EBCDIC 1
1936 # If the native compiler is GCC, we can enable warnings even in stage1.
1937 # That's useful for people building cross-compilers, or just running a
1938 # quick `make'.
1939 warn_cflags=
1940 if test "x$GCC" = "xyes"; then
1941 warn_cflags='$(GCC_WARN_CFLAGS)'
1945 # Determine whether or not multilibs are enabled.
1946 # Check whether --enable-multilib or --disable-multilib was given.
1947 if test "${enable_multilib+set}" = set; then
1948 enableval="$enable_multilib"
1950 else
1951 enable_multilib=yes
1956 # Enable -Werror in bootstrap stage2 and later.
1957 # Change the default to "no" on release branches.
1958 # Check whether --enable-werror or --disable-werror was given.
1959 if test "${enable_werror+set}" = set; then
1960 enableval="$enable_werror"
1962 else
1963 enable_werror=yes
1966 if test x$enable_werror = xyes ; then
1967 WERROR=-Werror
1971 # Enable expensive internal checks
1972 # Check whether --enable-checking or --disable-checking was given.
1973 if test "${enable_checking+set}" = set; then
1974 enableval="$enable_checking"
1975 ac_checking=
1976 ac_tree_checking=
1977 ac_rtl_checking=
1978 ac_rtlflag_checking=
1979 ac_gc_checking=
1980 ac_gc_always_collect=
1981 case "${enableval}" in
1982 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1983 ac_rtlflag_checking=1 ;;
1984 no) ;;
1985 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1986 set fnord $enableval; shift
1987 IFS="$ac_save_IFS"
1988 for check
1990 case $check in
1991 misc) ac_checking=1 ;;
1992 tree) ac_tree_checking=1 ;;
1993 rtlflag) ac_rtlflag_checking=1 ;;
1994 rtl) ac_rtl_checking=1 ;;
1995 gc) ac_gc_checking=1 ;;
1996 gcac) ac_gc_always_collect=1 ;;
1997 valgrind) ac_checking_valgrind=1 ;;
1998 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1999 esac
2000 done
2002 esac
2004 else
2005 # Enable some checks by default for development versions of GCC
2006 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
2009 nocommon_flag=""
2010 if test x$ac_checking != x ; then
2011 cat >> confdefs.h <<\EOF
2012 #define ENABLE_CHECKING 1
2015 nocommon_flag=-fno-common
2018 if test x$ac_tree_checking != x ; then
2019 cat >> confdefs.h <<\EOF
2020 #define ENABLE_TREE_CHECKING 1
2024 if test x$ac_rtl_checking != x ; then
2025 cat >> confdefs.h <<\EOF
2026 #define ENABLE_RTL_CHECKING 1
2030 if test x$ac_rtlflag_checking != x ; then
2031 cat >> confdefs.h <<\EOF
2032 #define ENABLE_RTL_FLAG_CHECKING 1
2036 if test x$ac_gc_checking != x ; then
2037 cat >> confdefs.h <<\EOF
2038 #define ENABLE_GC_CHECKING 1
2042 if test x$ac_gc_always_collect != x ; then
2043 cat >> confdefs.h <<\EOF
2044 #define ENABLE_GC_ALWAYS_COLLECT 1
2048 valgrind_path_defines=
2049 valgrind_command=
2050 if test x$ac_checking_valgrind != x ; then
2051 # It is certainly possible that there's valgrind but no valgrind.h.
2052 # GCC relies on making annotations so we must have both.
2053 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2054 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2055 echo "configure:2056: checking for valgrind.h" >&5
2056 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2057 echo $ac_n "(cached) $ac_c" 1>&6
2058 else
2059 cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2062 #include <valgrind.h>
2064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2065 { (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2067 if test -z "$ac_err"; then
2068 rm -rf conftest*
2069 eval "ac_cv_header_$ac_safe=yes"
2070 else
2071 echo "$ac_err" >&5
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 rm -rf conftest*
2075 eval "ac_cv_header_$ac_safe=no"
2077 rm -f conftest*
2079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2080 echo "$ac_t""yes" 1>&6
2081 have_valgrind_h=yes
2082 else
2083 echo "$ac_t""no" 1>&6
2084 have_valgrind_h=no
2087 # Extract the first word of "valgrind", so it can be a program name with args.
2088 set dummy valgrind; ac_word=$2
2089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2090 echo "configure:2091: checking for $ac_word" >&5
2091 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093 else
2094 case "$valgrind_path" in
2096 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2100 for ac_dir in $PATH; do
2101 test -z "$ac_dir" && ac_dir=.
2102 if test -f $ac_dir/$ac_word; then
2103 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2104 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2105 break
2108 done
2109 IFS="$ac_save_ifs"
2111 esac
2113 valgrind_path="$ac_cv_path_valgrind_path"
2114 if test -n "$valgrind_path"; then
2115 echo "$ac_t""$valgrind_path" 1>&6
2116 else
2117 echo "$ac_t""no" 1>&6
2120 if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
2121 { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
2123 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2124 valgrind_command="$valgrind_path -q"
2125 cat >> confdefs.h <<\EOF
2126 #define ENABLE_VALGRIND_CHECKING 1
2133 # Enable code coverage collection
2134 # Check whether --enable-coverage or --disable-coverage was given.
2135 if test "${enable_coverage+set}" = set; then
2136 enableval="$enable_coverage"
2137 case "${enableval}" in
2138 yes|noopt)
2139 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2141 opt)
2142 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2145 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2147 esac
2148 else
2149 coverage_flags=""
2154 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
2155 if test "${with_cpp_install_dir+set}" = set; then
2156 withval="$with_cpp_install_dir"
2157 if test x$withval = xyes; then
2158 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
2159 elif test x$withval != xno; then
2160 cpp_install_dir=$withval
2165 # Enable __cxa_atexit for C++.
2166 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2167 if test "${enable___cxa_atexit+set}" = set; then
2168 enableval="$enable___cxa_atexit"
2172 if test x$enable___cxa_atexit = xyes; then
2173 cat >> confdefs.h <<\EOF
2174 #define DEFAULT_USE_CXA_ATEXIT 1
2179 # Enable Multibyte Characters for C/C++
2180 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2181 if test "${enable_c_mbchar+set}" = set; then
2182 enableval="$enable_c_mbchar"
2183 if test x$enable_c_mbchar != xno; then
2184 cat >> confdefs.h <<\EOF
2185 #define MULTIBYTE_CHARS 1
2192 # Enable threads
2193 # Pass with no value to take the default
2194 # Pass with a value to specify a thread package
2195 # Check whether --enable-threads or --disable-threads was given.
2196 if test "${enable_threads+set}" = set; then
2197 enableval="$enable_threads"
2199 else
2200 enable_threads=''
2204 enable_threads_flag=$enable_threads
2205 # Check if a valid thread package
2206 case x${enable_threads_flag} in
2207 x | xno)
2208 # No threads
2209 target_thread_file='single'
2211 xyes)
2212 # default
2213 target_thread_file=''
2215 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2216 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
2217 target_thread_file=$enable_threads_flag
2220 echo "$enable_threads is an unknown thread package" 1>&2
2221 exit 1
2223 esac
2225 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2226 if test "${enable_objc_gc+set}" = set; then
2227 enableval="$enable_objc_gc"
2228 if test x$enable_objc_gc = xno; then
2229 objc_boehm_gc=''
2230 else
2231 objc_boehm_gc=1
2233 else
2234 objc_boehm_gc=''
2238 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2239 if test "${with_dwarf2+set}" = set; then
2240 withval="$with_dwarf2"
2241 dwarf2="$with_dwarf2"
2242 else
2243 dwarf2=no
2247 # Check whether --enable-shared or --disable-shared was given.
2248 if test "${enable_shared+set}" = set; then
2249 enableval="$enable_shared"
2251 case $enable_shared in
2252 yes | no) ;;
2254 enable_shared=no
2255 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2256 for pkg in $enableval; do
2257 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2258 enable_shared=yes
2260 done
2261 IFS="$ac_save_ifs"
2263 esac
2265 else
2266 enable_shared=yes
2271 # Check whether --with-sysroot or --without-sysroot was given.
2272 if test "${with_sysroot+set}" = set; then
2273 withval="$with_sysroot"
2275 case ${with_sysroot} in
2276 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2277 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2278 esac
2280 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2281 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2283 if test "x$exec_prefix" = xNONE; then
2284 if test "x$prefix" = xNONE; then
2285 test_prefix=/usr/local
2286 else
2287 test_prefix=$prefix
2289 else
2290 test_prefix=$exec_prefix
2292 case ${TARGET_SYSTEM_ROOT} in
2293 "${test_prefix}"|"${test_prefix}/"*|\
2294 '${exec_prefix}'|'${exec_prefix}/'*)
2295 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2296 TARGET_SYSTEM_ROOT_DEFINE="$t"
2298 esac
2300 else
2302 TARGET_SYSTEM_ROOT=
2303 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
2304 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2312 # Stage specific cflags for build.
2313 stage1_cflags=
2314 case $build in
2315 vax-*-*)
2316 if test x$GCC = xyes
2317 then
2318 stage1_cflags="-Wa,-J"
2319 else
2320 stage1_cflags="-J"
2323 powerpc-*-darwin*)
2324 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2325 # sources; use -no-cpp-precomp to get to GNU cpp.
2326 # Apple's GCC has bugs in designated initializer handling, so disable
2327 # that too.
2328 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2330 esac
2333 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2334 echo "configure:2335: checking whether ${MAKE-make} sets \${MAKE}" >&5
2335 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2336 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2338 else
2339 cat > conftestmake <<\EOF
2340 all:
2341 @echo 'ac_maketemp="${MAKE}"'
2343 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2344 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2345 if test -n "$ac_maketemp"; then
2346 eval ac_cv_prog_make_${ac_make}_set=yes
2347 else
2348 eval ac_cv_prog_make_${ac_make}_set=no
2350 rm -f conftestmake
2352 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2353 echo "$ac_t""yes" 1>&6
2354 SET_MAKE=
2355 else
2356 echo "$ac_t""no" 1>&6
2357 SET_MAKE="MAKE=${MAKE-make}"
2361 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2362 echo "configure:2363: checking whether a default assembler was specified" >&5
2363 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2364 if test x"$gas_flag" = x"no"; then
2365 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2366 else
2367 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2369 else
2370 echo "$ac_t""no" 1>&6
2373 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2374 echo "configure:2375: checking whether a default linker was specified" >&5
2375 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2376 if test x"$gnu_ld_flag" = x"no"; then
2377 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2378 else
2379 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2381 else
2382 echo "$ac_t""no" 1>&6
2385 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2386 echo "configure:2387: checking for GNU C library" >&5
2387 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2388 echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include <features.h>
2394 int main() {
2396 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2397 #error Not a GNU C library system
2398 #endif
2399 ; return 0; }
2401 if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2402 rm -rf conftest*
2403 gcc_cv_glibc=yes
2404 else
2405 echo "configure: failed program was:" >&5
2406 cat conftest.$ac_ext >&5
2407 rm -rf conftest*
2408 gcc_cv_glibc=no
2410 rm -f conftest*
2413 echo "$ac_t""$gcc_cv_glibc" 1>&6
2414 if test $gcc_cv_glibc = yes; then
2415 cat >> confdefs.h <<\EOF
2416 #define _GNU_SOURCE 1
2421 # Find some useful tools
2422 for ac_prog in gawk mawk nawk awk
2424 # Extract the first word of "$ac_prog", so it can be a program name with args.
2425 set dummy $ac_prog; ac_word=$2
2426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2427 echo "configure:2428: checking for $ac_word" >&5
2428 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2429 echo $ac_n "(cached) $ac_c" 1>&6
2430 else
2431 if test -n "$AWK"; then
2432 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2433 else
2434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2435 ac_dummy="$PATH"
2436 for ac_dir in $ac_dummy; do
2437 test -z "$ac_dir" && ac_dir=.
2438 if test -f $ac_dir/$ac_word; then
2439 ac_cv_prog_AWK="$ac_prog"
2440 break
2442 done
2443 IFS="$ac_save_ifs"
2446 AWK="$ac_cv_prog_AWK"
2447 if test -n "$AWK"; then
2448 echo "$ac_t""$AWK" 1>&6
2449 else
2450 echo "$ac_t""no" 1>&6
2453 test -n "$AWK" && break
2454 done
2456 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2457 echo "configure:2458: checking whether ln works" >&5
2458 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461 rm -f conftestdata_t
2462 echo >conftestdata_f
2463 if ln conftestdata_f conftestdata_t 2>/dev/null
2464 then
2465 gcc_cv_prog_LN="ln"
2466 else
2467 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2468 then
2469 gcc_cv_prog_LN="ln -s"
2470 else
2471 gcc_cv_prog_LN=cp
2474 rm -f conftestdata_f conftestdata_t
2477 LN="$gcc_cv_prog_LN"
2478 if test "$gcc_cv_prog_LN" = "ln"; then
2479 echo "$ac_t""yes" 1>&6
2480 else
2481 if test "$gcc_cv_prog_LN" = "ln -s"; then
2482 echo "$ac_t""no, using ln -s" 1>&6
2483 else
2484 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2488 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2489 echo "configure:2490: checking whether ln -s works" >&5
2490 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493 rm -f conftestdata_t
2494 echo >conftestdata_f
2495 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2496 then
2497 gcc_cv_prog_LN_S="ln -s"
2498 else
2499 if ln conftestdata_f conftestdata_t 2>/dev/null
2500 then
2501 gcc_cv_prog_LN_S=ln
2502 else
2503 gcc_cv_prog_LN_S=cp
2506 rm -f conftestdata_f conftestdata_t
2509 LN_S="$gcc_cv_prog_LN_S"
2510 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2511 echo "$ac_t""yes" 1>&6
2512 else
2513 if test "$gcc_cv_prog_LN_S" = "ln"; then
2514 echo "$ac_t""no, using ln" 1>&6
2515 else
2516 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2520 # Extract the first word of "ranlib", so it can be a program name with args.
2521 set dummy ranlib; ac_word=$2
2522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2523 echo "configure:2524: checking for $ac_word" >&5
2524 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527 if test -n "$RANLIB"; then
2528 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2529 else
2530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2531 ac_dummy="$PATH"
2532 for ac_dir in $ac_dummy; do
2533 test -z "$ac_dir" && ac_dir=.
2534 if test -f $ac_dir/$ac_word; then
2535 ac_cv_prog_RANLIB="ranlib"
2536 break
2538 done
2539 IFS="$ac_save_ifs"
2540 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2543 RANLIB="$ac_cv_prog_RANLIB"
2544 if test -n "$RANLIB"; then
2545 echo "$ac_t""$RANLIB" 1>&6
2546 else
2547 echo "$ac_t""no" 1>&6
2550 # Find a good install program. We prefer a C program (faster),
2551 # so one script is as good as another. But avoid the broken or
2552 # incompatible versions:
2553 # SysV /etc/install, /usr/sbin/install
2554 # SunOS /usr/etc/install
2555 # IRIX /sbin/install
2556 # AIX /bin/install
2557 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2558 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2559 # ./install, which can be erroneously created by make from ./install.sh.
2560 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2561 echo "configure:2562: checking for a BSD compatible install" >&5
2562 if test -z "$INSTALL"; then
2563 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2567 for ac_dir in $PATH; do
2568 # Account for people who put trailing slashes in PATH elements.
2569 case "$ac_dir/" in
2570 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2572 # OSF1 and SCO ODT 3.0 have their own names for install.
2573 for ac_prog in ginstall scoinst install; do
2574 if test -f $ac_dir/$ac_prog; then
2575 if test $ac_prog = install &&
2576 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2577 # AIX install. It has an incompatible calling convention.
2578 # OSF/1 installbsd also uses dspmsg, but is usable.
2580 else
2581 ac_cv_path_install="$ac_dir/$ac_prog -c"
2582 break 2
2585 done
2587 esac
2588 done
2589 IFS="$ac_save_IFS"
2592 if test "${ac_cv_path_install+set}" = set; then
2593 INSTALL="$ac_cv_path_install"
2594 else
2595 # As a last resort, use the slow shell script. We don't cache a
2596 # path for INSTALL within a source directory, because that will
2597 # break other packages using the cache if that directory is
2598 # removed, or if the path is relative.
2599 INSTALL="$ac_install_sh"
2602 echo "$ac_t""$INSTALL" 1>&6
2604 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2605 # It thinks the first close brace ends the variable substitution.
2606 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2608 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2611 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2612 echo "configure:2613: checking for ANSI C header files" >&5
2613 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <stdlib.h>
2620 #include <stdarg.h>
2621 #include <string.h>
2622 #include <float.h>
2624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2625 { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2627 if test -z "$ac_err"; then
2628 rm -rf conftest*
2629 ac_cv_header_stdc=yes
2630 else
2631 echo "$ac_err" >&5
2632 echo "configure: failed program was:" >&5
2633 cat conftest.$ac_ext >&5
2634 rm -rf conftest*
2635 ac_cv_header_stdc=no
2637 rm -f conftest*
2639 if test $ac_cv_header_stdc = yes; then
2640 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2641 cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <string.h>
2646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2647 egrep "memchr" >/dev/null 2>&1; then
2649 else
2650 rm -rf conftest*
2651 ac_cv_header_stdc=no
2653 rm -f conftest*
2657 if test $ac_cv_header_stdc = yes; then
2658 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2659 cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <stdlib.h>
2664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2665 egrep "free" >/dev/null 2>&1; then
2667 else
2668 rm -rf conftest*
2669 ac_cv_header_stdc=no
2671 rm -f conftest*
2675 if test $ac_cv_header_stdc = yes; then
2676 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2677 if test "$cross_compiling" = yes; then
2679 else
2680 cat > conftest.$ac_ext <<EOF
2681 #line 2682 "configure"
2682 #include "confdefs.h"
2683 #include <ctype.h>
2684 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2685 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2686 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2687 int main () { int i; for (i = 0; i < 256; i++)
2688 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2689 exit (0); }
2692 if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2693 then
2695 else
2696 echo "configure: failed program was:" >&5
2697 cat conftest.$ac_ext >&5
2698 rm -fr conftest*
2699 ac_cv_header_stdc=no
2701 rm -fr conftest*
2707 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2708 if test $ac_cv_header_stdc = yes; then
2709 cat >> confdefs.h <<\EOF
2710 #define STDC_HEADERS 1
2715 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2716 echo "configure:2717: checking whether time.h and sys/time.h may both be included" >&5
2717 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2718 echo $ac_n "(cached) $ac_c" 1>&6
2719 else
2720 cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723 #include <sys/types.h>
2724 #include <sys/time.h>
2725 #include <time.h>
2726 int main() {
2727 struct tm *tp;
2728 ; return 0; }
2730 if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731 rm -rf conftest*
2732 ac_cv_header_time=yes
2733 else
2734 echo "configure: failed program was:" >&5
2735 cat conftest.$ac_ext >&5
2736 rm -rf conftest*
2737 ac_cv_header_time=no
2739 rm -f conftest*
2742 echo "$ac_t""$ac_cv_header_time" 1>&6
2743 if test $ac_cv_header_time = yes; then
2744 cat >> confdefs.h <<\EOF
2745 #define TIME_WITH_SYS_TIME 1
2750 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2751 echo "configure:2752: checking for working stdbool.h" >&5
2752 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2753 echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755 cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758 #include <stdbool.h>
2759 int main() {
2760 bool foo = false;
2761 ; return 0; }
2763 if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2764 rm -rf conftest*
2765 ac_cv_header_stdbool_h=yes
2766 else
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2769 rm -rf conftest*
2770 ac_cv_header_stdbool_h=no
2772 rm -f conftest*
2775 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2776 if test $ac_cv_header_stdbool_h = yes; then
2777 cat >> confdefs.h <<\EOF
2778 #define HAVE_STDBOOL_H 1
2783 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2784 echo "configure:2785: checking whether string.h and strings.h may both be included" >&5
2785 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2786 echo $ac_n "(cached) $ac_c" 1>&6
2787 else
2788 cat > conftest.$ac_ext <<EOF
2789 #line 2790 "configure"
2790 #include "confdefs.h"
2791 #include <string.h>
2792 #include <strings.h>
2793 int main() {
2795 ; return 0; }
2797 if { (eval echo configure:2798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2798 rm -rf conftest*
2799 gcc_cv_header_string=yes
2800 else
2801 echo "configure: failed program was:" >&5
2802 cat conftest.$ac_ext >&5
2803 rm -rf conftest*
2804 gcc_cv_header_string=no
2806 rm -f conftest*
2809 echo "$ac_t""$gcc_cv_header_string" 1>&6
2810 if test $gcc_cv_header_string = yes; then
2811 cat >> confdefs.h <<\EOF
2812 #define STRING_WITH_STRINGS 1
2817 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2818 echo "configure:2819: checking for sys/wait.h that is POSIX.1 compatible" >&5
2819 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822 cat > conftest.$ac_ext <<EOF
2823 #line 2824 "configure"
2824 #include "confdefs.h"
2825 #include <sys/types.h>
2826 #include <sys/wait.h>
2827 #ifndef WEXITSTATUS
2828 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2829 #endif
2830 #ifndef WIFEXITED
2831 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2832 #endif
2833 int main() {
2834 int s;
2835 wait (&s);
2836 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2837 ; return 0; }
2839 if { (eval echo configure:2840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2840 rm -rf conftest*
2841 ac_cv_header_sys_wait_h=yes
2842 else
2843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -rf conftest*
2846 ac_cv_header_sys_wait_h=no
2848 rm -f conftest*
2851 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2852 if test $ac_cv_header_sys_wait_h = yes; then
2853 cat >> confdefs.h <<\EOF
2854 #define HAVE_SYS_WAIT_H 1
2859 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2860 fcntl.h unistd.h sys/file.h sys/time.h \
2861 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2862 direct.h malloc.h langinfo.h ldfcn.h
2864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2866 echo "configure:2867: checking for $ac_hdr" >&5
2867 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2868 echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870 cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 #include <$ac_hdr>
2875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2876 { (eval echo configure:2877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2878 if test -z "$ac_err"; then
2879 rm -rf conftest*
2880 eval "ac_cv_header_$ac_safe=yes"
2881 else
2882 echo "$ac_err" >&5
2883 echo "configure: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2885 rm -rf conftest*
2886 eval "ac_cv_header_$ac_safe=no"
2888 rm -f conftest*
2890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2891 echo "$ac_t""yes" 1>&6
2892 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2893 cat >> confdefs.h <<EOF
2894 #define $ac_tr_hdr 1
2897 else
2898 echo "$ac_t""no" 1>&6
2900 done
2903 # Check for thread headers.
2904 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2905 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2906 echo "configure:2907: checking for thread.h" >&5
2907 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2908 echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910 cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2913 #include <thread.h>
2915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2916 { (eval echo configure:2917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2918 if test -z "$ac_err"; then
2919 rm -rf conftest*
2920 eval "ac_cv_header_$ac_safe=yes"
2921 else
2922 echo "$ac_err" >&5
2923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
2925 rm -rf conftest*
2926 eval "ac_cv_header_$ac_safe=no"
2928 rm -f conftest*
2930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2931 echo "$ac_t""yes" 1>&6
2932 have_thread_h=yes
2933 else
2934 echo "$ac_t""no" 1>&6
2935 have_thread_h=
2938 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2939 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2940 echo "configure:2941: checking for pthread.h" >&5
2941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #include <pthread.h>
2949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2950 { (eval echo configure:2951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2952 if test -z "$ac_err"; then
2953 rm -rf conftest*
2954 eval "ac_cv_header_$ac_safe=yes"
2955 else
2956 echo "$ac_err" >&5
2957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 rm -rf conftest*
2960 eval "ac_cv_header_$ac_safe=no"
2962 rm -f conftest*
2964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2965 echo "$ac_t""yes" 1>&6
2966 have_pthread_h=yes
2967 else
2968 echo "$ac_t""no" 1>&6
2969 have_pthread_h=
2973 # These tests can't be done till we know if we have limits.h.
2974 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2975 echo "configure:2976: checking for CHAR_BIT" >&5
2976 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2977 echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979 cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #ifdef HAVE_LIMITS_H
2983 #include <limits.h>
2984 #endif
2985 #ifdef CHAR_BIT
2986 found
2987 #endif
2989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2990 egrep "found" >/dev/null 2>&1; then
2991 rm -rf conftest*
2992 gcc_cv_decl_char_bit=yes
2993 else
2994 rm -rf conftest*
2995 gcc_cv_decl_char_bit=no
2997 rm -f conftest*
3002 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3003 if test $gcc_cv_decl_char_bit = no; then
3004 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3005 echo "configure:3006: checking number of bits in a byte" >&5
3006 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3007 echo $ac_n "(cached) $ac_c" 1>&6
3008 else
3010 gcc_cv_c_nbby=
3011 while test $i -lt 65; do
3012 cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3016 int main() {
3017 switch(0) {
3018 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3019 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3021 ; return 0; }
3023 if { (eval echo configure:3024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3024 rm -rf conftest*
3025 gcc_cv_c_nbby=$i; break
3026 else
3027 echo "configure: failed program was:" >&5
3028 cat conftest.$ac_ext >&5
3030 rm -f conftest*
3031 i=`expr $i + 1`
3032 done
3033 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3037 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3038 if test $gcc_cv_c_nbby = failed; then
3039 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3040 else
3041 cat >> confdefs.h <<EOF
3042 #define CHAR_BIT $gcc_cv_c_nbby
3047 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3048 echo "configure:3049: checking whether byte ordering is bigendian" >&5
3049 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3051 else
3052 ac_cv_c_bigendian=unknown
3053 # See if sys/param.h defines the BYTE_ORDER macro.
3054 cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 #include <sys/types.h>
3058 #include <sys/param.h>
3059 int main() {
3061 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3062 bogus endian macros
3063 #endif
3064 ; return 0; }
3066 if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3067 rm -rf conftest*
3068 # It does; now see whether it defined to BIG_ENDIAN or not.
3069 cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 #include <sys/types.h>
3073 #include <sys/param.h>
3074 int main() {
3076 #if BYTE_ORDER != BIG_ENDIAN
3077 not big endian
3078 #endif
3079 ; return 0; }
3081 if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3082 rm -rf conftest*
3083 ac_cv_c_bigendian=yes
3084 else
3085 echo "configure: failed program was:" >&5
3086 cat conftest.$ac_ext >&5
3087 rm -rf conftest*
3088 ac_cv_c_bigendian=no
3090 rm -f conftest*
3091 else
3092 echo "configure: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3095 rm -f conftest*
3096 if test $ac_cv_c_bigendian = unknown; then
3097 if test "$cross_compiling" = yes; then
3098 echo $ac_n "cross-compiling... " 2>&6
3099 else
3100 cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 main () {
3104 /* Are we little or big endian? From Harbison&Steele. */
3105 union
3107 long l;
3108 char c[sizeof (long)];
3109 } u;
3110 u.l = 1;
3111 exit (u.c[sizeof (long) - 1] == 1);
3114 if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3115 then
3116 ac_cv_c_bigendian=no
3117 else
3118 echo "configure: failed program was:" >&5
3119 cat conftest.$ac_ext >&5
3120 rm -fr conftest*
3121 ac_cv_c_bigendian=yes
3123 rm -fr conftest*
3129 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3130 if test $ac_cv_c_bigendian = unknown; then
3131 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3132 echo "configure:3133: checking to probe for byte ordering" >&5
3134 cat >conftest.c <<EOF
3135 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3136 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3137 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3138 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3139 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3140 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3141 int main() { _ascii (); _ebcdic (); return 0; }
3143 if test -f conftest.c ; then
3144 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3145 if test `grep -l BIGenDianSyS conftest.o` ; then
3146 echo $ac_n ' big endian probe OK, ' 1>&6
3147 ac_cv_c_bigendian=yes
3149 if test `grep -l LiTTleEnDian conftest.o` ; then
3150 echo $ac_n ' little endian probe OK, ' 1>&6
3151 if test $ac_cv_c_bigendian = yes ; then
3152 ac_cv_c_bigendian=unknown;
3153 else
3154 ac_cv_c_bigendian=no
3157 echo $ac_n 'guessing bigendian ... ' >&6
3160 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3162 if test $ac_cv_c_bigendian = yes; then
3163 cat >> confdefs.h <<\EOF
3164 #define WORDS_BIGENDIAN 1
3167 cat >> confdefs.h <<\EOF
3168 #define HOST_WORDS_BIG_ENDIAN 1
3171 BYTEORDER=4321
3172 else
3173 BYTEORDER=1234
3175 cat >> confdefs.h <<EOF
3176 #define BYTEORDER $BYTEORDER
3179 if test $ac_cv_c_bigendian = unknown; then
3180 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3183 echo $ac_n "checking floating point format""... $ac_c" 1>&6
3184 echo "configure:3185: checking floating point format" >&5
3185 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
3186 echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3189 ac_ext=c
3190 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3191 ac_cpp='$CPP $CPPFLAGS'
3192 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3193 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3194 cross_compiling=$ac_cv_prog_cc_cross
3196 cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 /* This will not work unless sizeof(double) == 8. */
3200 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
3202 /* This structure must have no internal padding. */
3203 struct possibility {
3204 char prefix[8];
3205 double candidate;
3206 char postfix[8];
3209 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3210 struct possibility table [] =
3212 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3213 C( 3.53802595280598432000e+18), /* D__float - VAX */
3214 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3215 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3216 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3219 if { (eval echo configure:3220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3220 od -c conftest.o |
3221 sed 's/^[0-7]*[ ]*/ /
3222 s/\*/./g
3223 s/ \\n/*/g
3224 s/ [0-9][0-9][0-9]/./g
3225 s/ \\[^ ]/./g' |
3226 tr -d '
3227 ' | tr -s '*' '
3228 ' | fold | sed '$a\
3229 ' > conftest.dmp
3230 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3231 ac_cv_c_float_format='IEEE (big-endian)'
3232 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3233 ac_cv_c_float_format='IEEE (big-endian)'
3234 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3235 ac_cv_c_float_format='IEEE (little-endian)'
3236 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3237 ac_cv_c_float_format='IEEE (little-endian)'
3238 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3239 ac_cv_c_float_format='VAX D-float'
3240 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3241 ac_cv_c_float_format='PDP-10'
3242 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3243 ac_cv_c_float_format='IBM 370 hex'
3244 else
3245 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3247 else
3248 { echo "configure: error: compile failed" 1>&2; exit 1; }
3250 rm -rf conftest*
3251 ac_ext=c
3252 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3253 ac_cpp='$CPP $CPPFLAGS'
3254 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3255 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3256 cross_compiling=$ac_cv_prog_cc_cross
3261 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3262 # IEEE is the default format. If the float endianness isn't the same
3263 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3264 # (which is a tristate: yes, no, default). This is only an issue with
3265 # IEEE; the other formats are only supported by a few machines each,
3266 # all with the same endianness.
3267 format=
3268 fbigend=
3269 case $ac_cv_c_float_format in
3270 'IEEE (big-endian)' )
3271 if test $ac_cv_c_bigendian = no; then
3272 fbigend=1
3275 'IEEE (little-endian)' )
3276 if test $ac_cv_c_bigendian = yes; then
3277 fbigend=0
3280 'VAX D-float' )
3281 format=VAX_FLOAT_FORMAT
3283 'PDP-10' )
3284 format=PDP10_FLOAT_FORMAT
3286 'IBM 370 hex' )
3287 format=IBM_FLOAT_FORMAT
3289 esac
3290 if test -n "$format"; then
3291 cat >> confdefs.h <<EOF
3292 #define HOST_FLOAT_FORMAT $format
3296 if test -n "$fbigend"; then
3297 cat >> confdefs.h <<EOF
3298 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3304 # See if we have the mktemp command.
3305 # Extract the first word of "mktemp", so it can be a program name with args.
3306 set dummy mktemp; ac_word=$2
3307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3308 echo "configure:3309: checking for $ac_word" >&5
3309 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3310 echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312 if test -n "$have_mktemp_command"; then
3313 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3314 else
3315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3316 ac_dummy="$PATH"
3317 for ac_dir in $ac_dummy; do
3318 test -z "$ac_dir" && ac_dir=.
3319 if test -f $ac_dir/$ac_word; then
3320 ac_cv_prog_have_mktemp_command="yes"
3321 break
3323 done
3324 IFS="$ac_save_ifs"
3325 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3328 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3329 if test -n "$have_mktemp_command"; then
3330 echo "$ac_t""$have_mktemp_command" 1>&6
3331 else
3332 echo "$ac_t""no" 1>&6
3336 # Do we have a single-tree copy of texinfo?
3337 if test -f $srcdir/../texinfo/Makefile.in; then
3338 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3339 gcc_cv_prog_makeinfo_modern=yes
3340 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3341 else
3342 # See if makeinfo has been installed and is modern enough
3343 # that we can use it.
3344 # Extract the first word of "makeinfo", so it can be a program name with args.
3345 set dummy makeinfo; ac_word=$2
3346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3347 echo "configure:3348: checking for $ac_word" >&5
3348 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3349 echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351 if test -n "$MAKEINFO"; then
3352 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3353 else
3354 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357 test -z "$ac_dir" && ac_dir=.
3358 if test -f $ac_dir/$ac_word; then
3359 ac_cv_prog_MAKEINFO="makeinfo"
3360 break
3362 done
3363 IFS="$ac_save_ifs"
3366 MAKEINFO="$ac_cv_prog_MAKEINFO"
3367 if test -n "$MAKEINFO"; then
3368 echo "$ac_t""$MAKEINFO" 1>&6
3369 else
3370 echo "$ac_t""no" 1>&6
3373 if test -n "$MAKEINFO"; then
3374 # Found it, now check the version.
3375 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3376 echo "configure:3377: checking for modern makeinfo" >&5
3377 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380 ac_prog_version=`$MAKEINFO --version 2>&1 |
3381 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3382 echo "configure:3383: version of makeinfo is $ac_prog_version" >&5
3383 case $ac_prog_version in
3384 '') gcc_cv_prog_makeinfo_modern=no;;
3385 4.[2-9]*)
3386 gcc_cv_prog_makeinfo_modern=yes;;
3387 *) gcc_cv_prog_makeinfo_modern=no;;
3388 esac
3392 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3393 else
3394 gcc_cv_prog_makeinfo_modern=no
3399 if test $gcc_cv_prog_makeinfo_modern = no; then
3400 echo "configure: warning:
3401 *** Makeinfo is missing or too old.
3402 *** Info documentation will not be built." 1>&2
3403 BUILD_INFO=
3404 else
3405 BUILD_INFO=info
3408 # Is pod2man recent enough to regenerate manpages?
3409 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3410 echo "configure:3411: checking for recent Pod::Man" >&5
3411 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3412 echo "$ac_t""yes" 1>&6
3413 GENERATED_MANPAGES=generated-manpages
3414 else
3415 echo "$ac_t""no" 1>&6
3416 GENERATED_MANPAGES=
3419 # How about lex?
3420 if test -f $srcdir/../flex/skel.c; then
3421 FLEX='$(objdir)/../flex/flex'
3422 else
3423 # Extract the first word of "flex", so it can be a program name with args.
3424 set dummy flex; ac_word=$2
3425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3426 echo "configure:3427: checking for $ac_word" >&5
3427 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3428 echo $ac_n "(cached) $ac_c" 1>&6
3429 else
3430 if test -n "$FLEX"; then
3431 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3432 else
3433 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3434 ac_dummy="$PATH"
3435 for ac_dir in $ac_dummy; do
3436 test -z "$ac_dir" && ac_dir=.
3437 if test -f $ac_dir/$ac_word; then
3438 ac_cv_prog_FLEX="flex"
3439 break
3441 done
3442 IFS="$ac_save_ifs"
3443 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
3446 FLEX="$ac_cv_prog_FLEX"
3447 if test -n "$FLEX"; then
3448 echo "$ac_t""$FLEX" 1>&6
3449 else
3450 echo "$ac_t""no" 1>&6
3455 # Bison?
3456 # The -L switch is so bison can find its skeleton file.
3457 if test -f $srcdir/../bison/bison.simple; then
3458 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3459 else
3460 # Extract the first word of "bison", so it can be a program name with args.
3461 set dummy bison; ac_word=$2
3462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3463 echo "configure:3464: checking for $ac_word" >&5
3464 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3465 echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467 if test -n "$BISON"; then
3468 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3469 else
3470 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3471 ac_dummy="$PATH"
3472 for ac_dir in $ac_dummy; do
3473 test -z "$ac_dir" && ac_dir=.
3474 if test -f $ac_dir/$ac_word; then
3475 ac_cv_prog_BISON="bison"
3476 break
3478 done
3479 IFS="$ac_save_ifs"
3480 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
3483 BISON="$ac_cv_prog_BISON"
3484 if test -n "$BISON"; then
3485 echo "$ac_t""$BISON" 1>&6
3486 else
3487 echo "$ac_t""no" 1>&6
3492 # These libraries may be used by collect2.
3493 # We may need a special search path to get them linked.
3494 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3495 echo "configure:3496: checking for collect2 libraries" >&5
3496 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3497 echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499 save_LIBS="$LIBS"
3500 for libs in '' -lld -lmld \
3501 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3502 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3504 LIBS="$libs"
3505 cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3508 /* Override any gcc2 internal prototype to avoid an error. */
3509 /* We use char because int might match the return type of a gcc2
3510 builtin and then its argument prototype would still apply. */
3511 char ldopen();
3513 int main() {
3514 ldopen()
3515 ; return 0; }
3517 if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3518 rm -rf conftest*
3519 gcc_cv_collect2_libs="$libs"; break
3520 else
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3524 rm -f conftest*
3525 done
3526 LIBS="$save_LIBS"
3527 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3530 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3531 case $gcc_cv_collect2_libs in
3532 "none required") ;;
3533 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3534 esac
3537 # When building Ada code on Alpha, we need exc_resume which is usually in
3538 # -lexc. So test for it.
3539 save_LIBS="$LIBS"
3540 LIBS=
3542 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3543 echo "configure:3544: checking for library containing exc_resume" >&5
3544 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3545 echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547 ac_func_search_save_LIBS="$LIBS"
3548 ac_cv_search_exc_resume="no"
3549 cat > conftest.$ac_ext <<EOF
3550 #line 3551 "configure"
3551 #include "confdefs.h"
3552 /* Override any gcc2 internal prototype to avoid an error. */
3553 /* We use char because int might match the return type of a gcc2
3554 builtin and then its argument prototype would still apply. */
3555 char exc_resume();
3557 int main() {
3558 exc_resume()
3559 ; return 0; }
3561 if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3562 rm -rf conftest*
3563 ac_cv_search_exc_resume="none required"
3564 else
3565 echo "configure: failed program was:" >&5
3566 cat conftest.$ac_ext >&5
3568 rm -f conftest*
3569 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3570 LIBS="-l$i $ac_func_search_save_LIBS"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574 /* Override any gcc2 internal prototype to avoid an error. */
3575 /* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3577 char exc_resume();
3579 int main() {
3580 exc_resume()
3581 ; return 0; }
3583 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3584 rm -rf conftest*
3585 ac_cv_search_exc_resume="-l$i"
3586 break
3587 else
3588 echo "configure: failed program was:" >&5
3589 cat conftest.$ac_ext >&5
3591 rm -f conftest*
3592 done
3593 LIBS="$ac_func_search_save_LIBS"
3596 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3597 if test "$ac_cv_search_exc_resume" != "no"; then
3598 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3600 else :
3603 GNAT_LIBEXC="$LIBS"
3604 LIBS="$save_LIBS"
3607 # See if the stage1 system preprocessor understands the ANSI C
3608 # preprocessor stringification operator. (Used by symcat.h.)
3611 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3612 echo "configure:3613: checking for preprocessor stringizing operator" >&5
3613 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3614 echo $ac_n "(cached) $ac_c" 1>&6
3615 else
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3620 #define x(y) #y
3622 char *s = x(teststring);
3625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3626 egrep "#teststring" >/dev/null 2>&1; then
3627 rm -rf conftest*
3628 ac_cv_c_stringize=no
3629 else
3630 rm -rf conftest*
3631 ac_cv_c_stringize=yes
3633 rm -f conftest*
3637 if test "${ac_cv_c_stringize}" = yes
3638 then
3639 cat >> confdefs.h <<\EOF
3640 #define HAVE_STRINGIZE 1
3644 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3647 # Use <inttypes.h> only if it exists,
3648 # doesn't clash with <sys/types.h>, and declares intmax_t.
3649 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3650 echo "configure:3651: checking for inttypes.h" >&5
3651 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654 cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 #include <sys/types.h>
3658 #include <inttypes.h>
3659 int main() {
3660 intmax_t i = -1;
3661 ; return 0; }
3663 if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3664 rm -rf conftest*
3665 gcc_cv_header_inttypes_h=yes
3666 else
3667 echo "configure: failed program was:" >&5
3668 cat conftest.$ac_ext >&5
3669 rm -rf conftest*
3670 gcc_cv_header_inttypes_h=no
3672 rm -f conftest*
3675 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3676 if test $gcc_cv_header_inttypes_h = yes; then
3677 cat >> confdefs.h <<\EOF
3678 #define HAVE_INTTYPES_H 1
3684 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3685 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3686 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3687 scandir alphasort
3689 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3690 echo "configure:3691: checking for $ac_func" >&5
3691 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3692 echo $ac_n "(cached) $ac_c" 1>&6
3693 else
3694 cat > conftest.$ac_ext <<EOF
3695 #line 3696 "configure"
3696 #include "confdefs.h"
3697 /* System header to define __stub macros and hopefully few prototypes,
3698 which can conflict with char $ac_func(); below. */
3699 #include <assert.h>
3700 /* Override any gcc2 internal prototype to avoid an error. */
3701 /* We use char because int might match the return type of a gcc2
3702 builtin and then its argument prototype would still apply. */
3703 char $ac_func();
3705 int main() {
3707 /* The GNU C library defines this for functions which it implements
3708 to always fail with ENOSYS. Some functions are actually named
3709 something starting with __ and the normal name is an alias. */
3710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3711 choke me
3712 #else
3713 $ac_func();
3714 #endif
3716 ; return 0; }
3718 if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3719 rm -rf conftest*
3720 eval "ac_cv_func_$ac_func=yes"
3721 else
3722 echo "configure: failed program was:" >&5
3723 cat conftest.$ac_ext >&5
3724 rm -rf conftest*
3725 eval "ac_cv_func_$ac_func=no"
3727 rm -f conftest*
3730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3731 echo "$ac_t""yes" 1>&6
3732 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3733 cat >> confdefs.h <<EOF
3734 #define $ac_tr_func 1
3737 else
3738 echo "$ac_t""no" 1>&6
3740 done
3743 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3744 echo "configure:3745: checking for ssize_t" >&5
3745 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748 cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 #include <sys/types.h>
3752 #if STDC_HEADERS
3753 #include <stdlib.h>
3754 #include <stddef.h>
3755 #endif
3757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3759 rm -rf conftest*
3760 ac_cv_type_ssize_t=yes
3761 else
3762 rm -rf conftest*
3763 ac_cv_type_ssize_t=no
3765 rm -f conftest*
3768 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3769 if test $ac_cv_type_ssize_t = no; then
3770 cat >> confdefs.h <<\EOF
3771 #define ssize_t int
3777 # Try to determine the array type of the second argument of getgroups
3778 # for the target system (int or gid_t).
3779 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3780 echo "configure:3781: checking for uid_t in sys/types.h" >&5
3781 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3782 echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784 cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 #include <sys/types.h>
3789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3790 egrep "uid_t" >/dev/null 2>&1; then
3791 rm -rf conftest*
3792 ac_cv_type_uid_t=yes
3793 else
3794 rm -rf conftest*
3795 ac_cv_type_uid_t=no
3797 rm -f conftest*
3801 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3802 if test $ac_cv_type_uid_t = no; then
3803 cat >> confdefs.h <<\EOF
3804 #define uid_t int
3807 cat >> confdefs.h <<\EOF
3808 #define gid_t int
3813 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3814 echo "configure:3815: checking type of array argument to getgroups" >&5
3815 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3816 echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818 if test "$cross_compiling" = yes; then
3819 ac_cv_type_getgroups=cross
3820 else
3821 cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3825 /* Thanks to Mike Rendell for this test. */
3826 #include <sys/types.h>
3827 #define NGID 256
3828 #undef MAX
3829 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3830 main()
3832 gid_t gidset[NGID];
3833 int i, n;
3834 union { gid_t gval; long lval; } val;
3836 val.lval = -1;
3837 for (i = 0; i < NGID; i++)
3838 gidset[i] = val.gval;
3839 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3840 gidset);
3841 /* Exit non-zero if getgroups seems to require an array of ints. This
3842 happens when gid_t is short but getgroups modifies an array of ints. */
3843 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3847 if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3848 then
3849 ac_cv_type_getgroups=gid_t
3850 else
3851 echo "configure: failed program was:" >&5
3852 cat conftest.$ac_ext >&5
3853 rm -fr conftest*
3854 ac_cv_type_getgroups=int
3856 rm -fr conftest*
3859 if test $ac_cv_type_getgroups = cross; then
3860 cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 #include <unistd.h>
3865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3866 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3867 rm -rf conftest*
3868 ac_cv_type_getgroups=gid_t
3869 else
3870 rm -rf conftest*
3871 ac_cv_type_getgroups=int
3873 rm -f conftest*
3878 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3879 cat >> confdefs.h <<EOF
3880 #define GETGROUPS_T $ac_cv_type_getgroups
3884 if test "${target}" = "${build}"; then
3885 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3886 else
3887 case "${target}" in
3888 # This condition may need some tweaking. It should include all
3889 # targets where the array type of the second argument of getgroups
3890 # is int and the type of gid_t is not equivalent to int.
3891 *-*-sunos* | *-*-ultrix*)
3892 TARGET_GETGROUPS_T=int
3895 TARGET_GETGROUPS_T=gid_t
3897 esac
3901 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3902 echo "configure:3903: checking whether the printf functions support %p" >&5
3903 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3904 echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906 if test "$cross_compiling" = yes; then
3907 gcc_cv_func_printf_ptr=no
3908 else
3909 cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <stdio.h>
3914 int main()
3916 char buf[64];
3917 char *p = buf, *q = NULL;
3918 sprintf(buf, "%p", p);
3919 sscanf(buf, "%p", &q);
3920 return (p != q);
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3924 then
3925 gcc_cv_func_printf_ptr=yes
3926 else
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -fr conftest*
3930 gcc_cv_func_printf_ptr=no
3932 rm -fr conftest*
3935 rm -f core core.* *.core
3938 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3939 if test $gcc_cv_func_printf_ptr = yes ; then
3940 cat >> confdefs.h <<\EOF
3941 #define HAVE_PRINTF_PTR 1
3947 case "${host}" in
3948 *-*-uwin*)
3949 { echo "configure: error:
3950 *** UWIN may not be used as a host platform because
3951 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3953 *-*-*vms*)
3954 # Under VMS, vfork works very different than on Unix. The standard test
3955 # won't work, and it isn't easily adaptable. It makes more sense to
3956 # just force it.
3957 ac_cv_func_vfork_works=yes
3959 esac
3960 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3961 echo "configure:3962: checking for pid_t" >&5
3962 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3963 echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 #include <sys/types.h>
3969 #if STDC_HEADERS
3970 #include <stdlib.h>
3971 #include <stddef.h>
3972 #endif
3974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3975 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3976 rm -rf conftest*
3977 ac_cv_type_pid_t=yes
3978 else
3979 rm -rf conftest*
3980 ac_cv_type_pid_t=no
3982 rm -f conftest*
3985 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3986 if test $ac_cv_type_pid_t = no; then
3987 cat >> confdefs.h <<\EOF
3988 #define pid_t int
3993 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3994 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3995 echo "configure:3996: checking for vfork.h" >&5
3996 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3997 echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999 cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002 #include <vfork.h>
4004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4005 { (eval echo configure:4006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4007 if test -z "$ac_err"; then
4008 rm -rf conftest*
4009 eval "ac_cv_header_$ac_safe=yes"
4010 else
4011 echo "$ac_err" >&5
4012 echo "configure: failed program was:" >&5
4013 cat conftest.$ac_ext >&5
4014 rm -rf conftest*
4015 eval "ac_cv_header_$ac_safe=no"
4017 rm -f conftest*
4019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4020 echo "$ac_t""yes" 1>&6
4021 cat >> confdefs.h <<\EOF
4022 #define HAVE_VFORK_H 1
4025 else
4026 echo "$ac_t""no" 1>&6
4029 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4030 echo "configure:4031: checking for working vfork" >&5
4031 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4032 echo $ac_n "(cached) $ac_c" 1>&6
4033 else
4034 if test "$cross_compiling" = yes; then
4035 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4036 echo "configure:4037: checking for vfork" >&5
4037 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040 cat > conftest.$ac_ext <<EOF
4041 #line 4042 "configure"
4042 #include "confdefs.h"
4043 /* System header to define __stub macros and hopefully few prototypes,
4044 which can conflict with char vfork(); below. */
4045 #include <assert.h>
4046 /* Override any gcc2 internal prototype to avoid an error. */
4047 /* We use char because int might match the return type of a gcc2
4048 builtin and then its argument prototype would still apply. */
4049 char vfork();
4051 int main() {
4053 /* The GNU C library defines this for functions which it implements
4054 to always fail with ENOSYS. Some functions are actually named
4055 something starting with __ and the normal name is an alias. */
4056 #if defined (__stub_vfork) || defined (__stub___vfork)
4057 choke me
4058 #else
4059 vfork();
4060 #endif
4062 ; return 0; }
4064 if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4065 rm -rf conftest*
4066 eval "ac_cv_func_vfork=yes"
4067 else
4068 echo "configure: failed program was:" >&5
4069 cat conftest.$ac_ext >&5
4070 rm -rf conftest*
4071 eval "ac_cv_func_vfork=no"
4073 rm -f conftest*
4076 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4077 echo "$ac_t""yes" 1>&6
4079 else
4080 echo "$ac_t""no" 1>&6
4083 ac_cv_func_vfork_works=$ac_cv_func_vfork
4084 else
4085 cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 /* Thanks to Paul Eggert for this test. */
4089 #include <stdio.h>
4090 #include <sys/types.h>
4091 #include <sys/stat.h>
4092 #ifdef HAVE_UNISTD_H
4093 #include <unistd.h>
4094 #endif
4095 #ifdef HAVE_VFORK_H
4096 #include <vfork.h>
4097 #endif
4098 /* On some sparc systems, changes by the child to local and incoming
4099 argument registers are propagated back to the parent.
4100 The compiler is told about this with #include <vfork.h>,
4101 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4102 Test for this by using a static variable whose address
4103 is put into a register that is clobbered by the vfork. */
4104 static
4105 #ifdef __cplusplus
4106 sparc_address_test (int arg)
4107 #else
4108 sparc_address_test (arg) int arg;
4109 #endif
4111 static pid_t child;
4112 if (!child) {
4113 child = vfork ();
4114 if (child < 0) {
4115 perror ("vfork");
4116 _exit(2);
4118 if (!child) {
4119 arg = getpid();
4120 write(-1, "", 0);
4121 _exit (arg);
4125 main() {
4126 pid_t parent = getpid ();
4127 pid_t child;
4129 sparc_address_test ();
4131 child = vfork ();
4133 if (child == 0) {
4134 /* Here is another test for sparc vfork register problems.
4135 This test uses lots of local variables, at least
4136 as many local variables as main has allocated so far
4137 including compiler temporaries. 4 locals are enough for
4138 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4139 A buggy compiler should reuse the register of parent
4140 for one of the local variables, since it will think that
4141 parent can't possibly be used any more in this routine.
4142 Assigning to the local variable will thus munge parent
4143 in the parent process. */
4144 pid_t
4145 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4146 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4147 /* Convince the compiler that p..p7 are live; otherwise, it might
4148 use the same hardware register for all 8 local variables. */
4149 if (p != p1 || p != p2 || p != p3 || p != p4
4150 || p != p5 || p != p6 || p != p7)
4151 _exit(1);
4153 /* On some systems (e.g. IRIX 3.3),
4154 vfork doesn't separate parent from child file descriptors.
4155 If the child closes a descriptor before it execs or exits,
4156 this munges the parent's descriptor as well.
4157 Test for this by closing stdout in the child. */
4158 _exit(close(fileno(stdout)) != 0);
4159 } else {
4160 int status;
4161 struct stat st;
4163 while (wait(&status) != child)
4165 exit(
4166 /* Was there some problem with vforking? */
4167 child < 0
4169 /* Did the child fail? (This shouldn't happen.) */
4170 || status
4172 /* Did the vfork/compiler bug occur? */
4173 || parent != getpid()
4175 /* Did the file descriptor bug occur? */
4176 || fstat(fileno(stdout), &st) != 0
4181 if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4182 then
4183 ac_cv_func_vfork_works=yes
4184 else
4185 echo "configure: failed program was:" >&5
4186 cat conftest.$ac_ext >&5
4187 rm -fr conftest*
4188 ac_cv_func_vfork_works=no
4190 rm -fr conftest*
4195 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4196 if test $ac_cv_func_vfork_works = no; then
4197 cat >> confdefs.h <<\EOF
4198 #define vfork fork
4203 for ac_func in getpagesize
4205 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4206 echo "configure:4207: checking for $ac_func" >&5
4207 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210 cat > conftest.$ac_ext <<EOF
4211 #line 4212 "configure"
4212 #include "confdefs.h"
4213 /* System header to define __stub macros and hopefully few prototypes,
4214 which can conflict with char $ac_func(); below. */
4215 #include <assert.h>
4216 /* Override any gcc2 internal prototype to avoid an error. */
4217 /* We use char because int might match the return type of a gcc2
4218 builtin and then its argument prototype would still apply. */
4219 char $ac_func();
4221 int main() {
4223 /* The GNU C library defines this for functions which it implements
4224 to always fail with ENOSYS. Some functions are actually named
4225 something starting with __ and the normal name is an alias. */
4226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4227 choke me
4228 #else
4229 $ac_func();
4230 #endif
4232 ; return 0; }
4234 if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4235 rm -rf conftest*
4236 eval "ac_cv_func_$ac_func=yes"
4237 else
4238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 rm -rf conftest*
4241 eval "ac_cv_func_$ac_func=no"
4243 rm -f conftest*
4246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4247 echo "$ac_t""yes" 1>&6
4248 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4249 cat >> confdefs.h <<EOF
4250 #define $ac_tr_func 1
4253 else
4254 echo "$ac_t""no" 1>&6
4256 done
4258 # The test program for the next two tests is the same except for one
4259 # set of ifdefs.
4260 cat >ct-mmap.inc <<'EOF'
4261 #include <sys/types.h>
4262 #include <sys/mman.h>
4263 #include <fcntl.h>
4264 #include <signal.h>
4265 #include <setjmp.h>
4266 #include <stdio.h>
4268 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4269 # define MAP_ANONYMOUS MAP_ANON
4270 #endif
4272 /* This mess was copied from the GNU getpagesize.h. */
4273 #ifndef HAVE_GETPAGESIZE
4274 # ifdef HAVE_UNISTD_H
4275 # include <unistd.h>
4276 # endif
4278 /* Assume that all systems that can run configure have sys/param.h. */
4279 # ifndef HAVE_SYS_PARAM_H
4280 # define HAVE_SYS_PARAM_H 1
4281 # endif
4283 # ifdef _SC_PAGESIZE
4284 # define getpagesize() sysconf(_SC_PAGESIZE)
4285 # else /* no _SC_PAGESIZE */
4286 # ifdef HAVE_SYS_PARAM_H
4287 # include <sys/param.h>
4288 # ifdef EXEC_PAGESIZE
4289 # define getpagesize() EXEC_PAGESIZE
4290 # else /* no EXEC_PAGESIZE */
4291 # ifdef NBPG
4292 # define getpagesize() NBPG * CLSIZE
4293 # ifndef CLSIZE
4294 # define CLSIZE 1
4295 # endif /* no CLSIZE */
4296 # else /* no NBPG */
4297 # ifdef NBPC
4298 # define getpagesize() NBPC
4299 # else /* no NBPC */
4300 # ifdef PAGESIZE
4301 # define getpagesize() PAGESIZE
4302 # endif /* PAGESIZE */
4303 # endif /* no NBPC */
4304 # endif /* no NBPG */
4305 # endif /* no EXEC_PAGESIZE */
4306 # else /* no HAVE_SYS_PARAM_H */
4307 # define getpagesize() 8192 /* punt totally */
4308 # endif /* no HAVE_SYS_PARAM_H */
4309 # endif /* no _SC_PAGESIZE */
4311 #endif /* no HAVE_GETPAGESIZE */
4313 #ifndef MAP_FAILED
4314 # define MAP_FAILED -1
4315 #endif
4317 #undef perror_exit
4318 #define perror_exit(str, val) \
4319 do { perror(str); exit(val); } while (0)
4321 /* Some versions of cygwin mmap require that munmap is called with the
4322 same parameters as mmap. GCC expects that this is not the case.
4323 Test for various forms of this problem. Warning - icky signal games. */
4325 static sigset_t unblock_sigsegv;
4326 static jmp_buf r;
4327 static size_t pg;
4328 static int devzero;
4330 static char *
4331 anonmap (size)
4332 size_t size;
4334 #ifdef USE_MAP_ANON
4335 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4336 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4337 #else
4338 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4339 MAP_PRIVATE, devzero, 0);
4340 #endif
4343 static void
4344 sigsegv (unused)
4345 int unused;
4347 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4348 longjmp (r, 1);
4351 /* Basic functionality test. */
4352 void
4353 test_0 ()
4355 char *x = anonmap (pg);
4356 if (x == (char *) MAP_FAILED)
4357 perror_exit("test 0 mmap", 2);
4359 *(int *)x += 1;
4361 if (munmap(x, pg) < 0)
4362 perror_exit("test 0 munmap", 3);
4365 /* 1. If we map a 2-page region and unmap its second page, the first page
4366 must remain. */
4367 static void
4368 test_1 ()
4370 char *x = anonmap (pg * 2);
4371 if (x == (char *)MAP_FAILED)
4372 perror_exit ("test 1 mmap", 4);
4374 signal (SIGSEGV, sigsegv);
4375 if (setjmp (r))
4376 perror_exit ("test 1 fault", 5);
4378 x[0] = 1;
4379 x[pg] = 1;
4381 if (munmap (x + pg, pg) < 0)
4382 perror_exit ("test 1 munmap 1", 6);
4383 x[0] = 2;
4385 if (setjmp (r) == 0)
4387 x[pg] = 1;
4388 perror_exit ("test 1 no fault", 7);
4390 if (munmap (x, pg) < 0)
4391 perror_exit ("test 1 munmap 2", 8);
4394 /* 2. If we map a 2-page region and unmap its first page, the second
4395 page must remain. */
4396 static void
4397 test_2 ()
4399 char *x = anonmap (pg * 2);
4400 if (x == (char *)MAP_FAILED)
4401 perror_exit ("test 2 mmap", 9);
4403 signal (SIGSEGV, sigsegv);
4404 if (setjmp (r))
4405 perror_exit ("test 2 fault", 10);
4407 x[0] = 1;
4408 x[pg] = 1;
4410 if (munmap (x, pg) < 0)
4411 perror_exit ("test 2 munmap 1", 11);
4413 x[pg] = 2;
4415 if (setjmp (r) == 0)
4417 x[0] = 1;
4418 perror_exit ("test 2 no fault", 12);
4421 if (munmap (x+pg, pg) < 0)
4422 perror_exit ("test 2 munmap 2", 13);
4425 /* 3. If we map two adjacent 1-page regions and unmap them both with
4426 one munmap, both must go away.
4428 Getting two adjacent 1-page regions with two mmap calls is slightly
4429 tricky. All OS's tested skip over already-allocated blocks; therefore
4430 we have been careful to unmap all allocated regions in previous tests.
4431 HP/UX allocates pages backward in memory. No OS has yet been observed
4432 to be so perverse as to leave unmapped space between consecutive calls
4433 to mmap. */
4435 static void
4436 test_3 ()
4438 char *x, *y, *z;
4440 x = anonmap (pg);
4441 if (x == (char *)MAP_FAILED)
4442 perror_exit ("test 3 mmap 1", 14);
4443 y = anonmap (pg);
4444 if (y == (char *)MAP_FAILED)
4445 perror_exit ("test 3 mmap 2", 15);
4447 if (y != x + pg)
4449 if (y == x - pg)
4450 z = y, y = x, x = z;
4451 else
4453 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4454 (unsigned long)x, (unsigned long)y);
4455 exit (16);
4459 signal (SIGSEGV, sigsegv);
4460 if (setjmp (r))
4461 perror_exit ("test 3 fault", 17);
4463 x[0] = 1;
4464 y[0] = 1;
4466 if (munmap (x, pg*2) < 0)
4467 perror_exit ("test 3 munmap", 18);
4469 if (setjmp (r) == 0)
4471 x[0] = 1;
4472 perror_exit ("test 3 no fault 1", 19);
4475 signal (SIGSEGV, sigsegv);
4476 if (setjmp (r) == 0)
4478 y[0] = 1;
4479 perror_exit ("test 3 no fault 2", 20);
4484 main ()
4486 sigemptyset (&unblock_sigsegv);
4487 sigaddset (&unblock_sigsegv, SIGSEGV);
4488 pg = getpagesize ();
4489 #ifndef USE_MAP_ANON
4490 devzero = open ("/dev/zero", O_RDWR);
4491 if (devzero < 0)
4492 perror_exit ("open /dev/zero", 1);
4493 #endif
4495 test_0();
4496 test_1();
4497 test_2();
4498 test_3();
4500 exit(0);
4504 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4505 echo "configure:4506: checking for working mmap from /dev/zero" >&5
4506 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4507 echo $ac_n "(cached) $ac_c" 1>&6
4508 else
4509 if test "$cross_compiling" = yes; then
4510 # When cross-building, assume that this works, unless we know it
4511 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4512 # on the host, let alone whether mmap will work on it.
4513 case "$host_os" in
4514 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4515 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4516 * ) ac_cv_func_mmap_dev_zero=yes ;;
4517 esac
4518 else
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 #include "ct-mmap.inc"
4524 if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4525 then
4526 ac_cv_func_mmap_dev_zero=yes
4527 else
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 rm -fr conftest*
4531 if test $? -lt 4
4532 then ac_cv_func_mmap_dev_zero=no
4533 else ac_cv_func_mmap_dev_zero=buggy
4536 rm -fr conftest*
4542 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4543 if test $ac_cv_func_mmap_dev_zero = yes; then
4544 cat >> confdefs.h <<\EOF
4545 #define HAVE_MMAP_DEV_ZERO 1
4550 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4551 echo "configure:4552: checking for working mmap with MAP_ANON(YMOUS)" >&5
4552 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4553 echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555 if test "$cross_compiling" = yes; then
4556 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4557 # just because it's there. Some SCO Un*xen define it but don't implement it.
4558 case "$host_os" in
4559 darwin* ) ac_cv_func_mmap_anon=yes ;;
4560 * ) ac_cv_func_mmap_anon=no ;;
4561 esac
4562 else
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4566 #define USE_MAP_ANON
4567 #include "ct-mmap.inc"
4569 if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4570 then
4571 ac_cv_func_mmap_anon=yes
4572 else
4573 echo "configure: failed program was:" >&5
4574 cat conftest.$ac_ext >&5
4575 rm -fr conftest*
4576 if test $? -lt 4
4577 then ac_cv_func_mmap_anon=no
4578 else ac_cv_func_mmap_anon=buggy
4581 rm -fr conftest*
4587 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4588 if test $ac_cv_func_mmap_anon = yes; then
4589 cat >> confdefs.h <<\EOF
4590 #define HAVE_MMAP_ANON 1
4594 rm -f ct-mmap.inc
4596 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4597 echo "configure:4598: checking for working mmap of a file" >&5
4598 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4599 echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601 # Create a file one thousand bytes long.
4602 for i in 1 2 3 4 5 6 7 8 9 0
4603 do for j in 1 2 3 4 5 6 7 8 9 0
4604 do echo $i $j xxxxx
4605 done
4606 done > conftestdata$$
4608 if test "$cross_compiling" = yes; then
4609 case "$host_os" in
4610 darwin* ) ac_cv_func_mmap_file=yes ;;
4611 * ) ac_cv_func_mmap_file=no ;;
4612 esac
4613 else
4614 cat > conftest.$ac_ext <<EOF
4615 #line 4616 "configure"
4616 #include "confdefs.h"
4618 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4619 Richard Henderson and Alexandre Oliva.
4620 Check whether read-only mmap of a plain file works. */
4621 #include <sys/types.h>
4622 #include <sys/stat.h>
4623 #include <fcntl.h>
4624 #include <sys/mman.h>
4626 int main()
4628 char *x;
4629 int fd;
4630 struct stat st;
4632 fd = open("conftestdata$$", O_RDONLY);
4633 if (fd < 0)
4634 exit(1);
4636 if (fstat (fd, &st))
4637 exit(2);
4639 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4640 if (x == (char *) -1)
4641 exit(3);
4643 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4644 exit(4);
4646 if (munmap(x, st.st_size) < 0)
4647 exit(5);
4649 exit(0);
4652 if { (eval echo configure:4653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4653 then
4654 ac_cv_func_mmap_file=yes
4655 else
4656 echo "configure: failed program was:" >&5
4657 cat conftest.$ac_ext >&5
4658 rm -fr conftest*
4659 ac_cv_func_mmap_file=no
4661 rm -fr conftest*
4666 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4667 if test $ac_cv_func_mmap_file = yes; then
4668 cat >> confdefs.h <<\EOF
4669 #define HAVE_MMAP_FILE 1
4677 am_cv_lib_iconv_ldpath=
4678 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4679 if test "${with_libiconv_prefix+set}" = set; then
4680 withval="$with_libiconv_prefix"
4682 for dir in `echo "$withval" | tr : ' '`; do
4683 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4684 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4685 done
4690 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4691 echo "configure:4692: checking for iconv" >&5
4692 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4693 echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4696 am_cv_func_iconv="no, consider installing GNU libiconv"
4697 am_cv_lib_iconv=no
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 #include <stdlib.h>
4702 #include <iconv.h>
4703 int main() {
4704 iconv_t cd = iconv_open("","");
4705 iconv(cd,NULL,NULL,NULL,NULL);
4706 iconv_close(cd);
4707 ; return 0; }
4709 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4710 rm -rf conftest*
4711 am_cv_func_iconv=yes
4712 else
4713 echo "configure: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4716 rm -f conftest*
4717 if test "$am_cv_func_iconv" != yes; then
4718 am_save_LIBS="$LIBS"
4719 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4720 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 #include <stdlib.h>
4724 #include <iconv.h>
4725 int main() {
4726 iconv_t cd = iconv_open("","");
4727 iconv(cd,NULL,NULL,NULL,NULL);
4728 iconv_close(cd);
4729 ; return 0; }
4731 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732 rm -rf conftest*
4733 am_cv_lib_iconv=yes
4734 am_cv_func_iconv=yes
4735 else
4736 echo "configure: failed program was:" >&5
4737 cat conftest.$ac_ext >&5
4739 rm -f conftest*
4740 LIBS="$am_save_LIBS"
4745 echo "$ac_t""$am_cv_func_iconv" 1>&6
4746 if test "$am_cv_func_iconv" = yes; then
4747 cat >> confdefs.h <<\EOF
4748 #define HAVE_ICONV 1
4751 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4752 echo "configure:4753: checking for iconv declaration" >&5
4753 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4754 echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4757 cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4761 #include <stdlib.h>
4762 #include <iconv.h>
4763 extern
4764 #ifdef __cplusplus
4766 #endif
4767 #if defined(__STDC__) || defined(__cplusplus)
4768 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4769 #else
4770 size_t iconv();
4771 #endif
4773 int main() {
4775 ; return 0; }
4777 if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4778 rm -rf conftest*
4779 am_cv_proto_iconv_arg1=""
4780 else
4781 echo "configure: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 rm -rf conftest*
4784 am_cv_proto_iconv_arg1="const"
4786 rm -f conftest*
4787 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);"
4790 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4791 echo "$ac_t""${ac_t:-
4792 }$am_cv_proto_iconv" 1>&6
4793 cat >> confdefs.h <<EOF
4794 #define ICONV_CONST $am_cv_proto_iconv_arg1
4798 LIBICONV=
4799 if test "$am_cv_lib_iconv" = yes; then
4800 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4805 # We will need to find libiberty.h and ansidecl.h
4806 saved_CFLAGS="$CFLAGS"
4807 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4808 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4809 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4810 fprintf_unlocked strstr errno vasprintf \
4811 malloc realloc calloc free basename getopt clock
4813 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4814 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4815 echo "configure:4816: checking whether $ac_func is declared" >&5
4816 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4817 echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #undef $ac_tr_decl
4823 #define $ac_tr_decl 1
4825 #include "ansidecl.h"
4826 #include "system.h"
4828 int main() {
4829 #ifndef $ac_func
4830 char *(*pfn) = (char *(*)) $ac_func ;
4831 #endif
4832 ; return 0; }
4834 if { (eval echo configure:4835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4835 rm -rf conftest*
4836 eval "gcc_cv_have_decl_$ac_func=yes"
4837 else
4838 echo "configure: failed program was:" >&5
4839 cat conftest.$ac_ext >&5
4840 rm -rf conftest*
4841 eval "gcc_cv_have_decl_$ac_func=no"
4843 rm -f conftest*
4846 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4847 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4848 #define $ac_tr_decl 1
4851 else
4852 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4853 #define $ac_tr_decl 0
4858 done
4859 if test x = y ; then
4860 cat >> confdefs.h <<\EOF
4861 #define HAVE_DECL_GETENV 1
4863 cat >> confdefs.h <<\EOF
4864 #define HAVE_DECL_ATOL 1
4866 cat >> confdefs.h <<\EOF
4867 #define HAVE_DECL_SBRK 1
4869 cat >> confdefs.h <<\EOF
4870 #define HAVE_DECL_ABORT 1
4872 cat >> confdefs.h <<\EOF
4873 #define HAVE_DECL_ATOF 1
4875 cat >> confdefs.h <<\EOF
4876 #define HAVE_DECL_GETCWD 1
4878 cat >> confdefs.h <<\EOF
4879 #define HAVE_DECL_GETWD 1
4882 cat >> confdefs.h <<\EOF
4883 #define HAVE_DECL_STRSIGNAL 1
4885 cat >> confdefs.h <<\EOF
4886 #define HAVE_DECL_PUTC_UNLOCKED 1
4888 cat >> confdefs.h <<\EOF
4889 #define HAVE_DECL_FPUTS_UNLOCKED 1
4891 cat >> confdefs.h <<\EOF
4892 #define HAVE_DECL_FWRITE_UNLOCKED 1
4895 cat >> confdefs.h <<\EOF
4896 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4898 cat >> confdefs.h <<\EOF
4899 #define HAVE_DECL_STRSTR 1
4901 cat >> confdefs.h <<\EOF
4902 #define HAVE_DECL_ERRNO 1
4904 cat >> confdefs.h <<\EOF
4905 #define HAVE_DECL_VASPRINTF 1
4908 cat >> confdefs.h <<\EOF
4909 #define HAVE_DECL_MALLOC 1
4911 cat >> confdefs.h <<\EOF
4912 #define HAVE_DECL_REALLOC 1
4914 cat >> confdefs.h <<\EOF
4915 #define HAVE_DECL_CALLOC 1
4917 cat >> confdefs.h <<\EOF
4918 #define HAVE_DECL_FREE 1
4920 cat >> confdefs.h <<\EOF
4921 #define HAVE_DECL_BASENAME 1
4923 cat >> confdefs.h <<\EOF
4924 #define HAVE_DECL_GETOPT 1
4926 cat >> confdefs.h <<\EOF
4927 #define HAVE_DECL_CLOCK 1
4932 for ac_func in getrlimit setrlimit getrusage
4934 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4935 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4936 echo "configure:4937: checking whether $ac_func is declared" >&5
4937 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4938 echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940 cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943 #undef $ac_tr_decl
4944 #define $ac_tr_decl 1
4946 #include "ansidecl.h"
4947 #include "system.h"
4948 #ifdef HAVE_SYS_RESOURCE_H
4949 #include <sys/resource.h>
4950 #endif
4953 int main() {
4954 #ifndef $ac_func
4955 char *(*pfn) = (char *(*)) $ac_func ;
4956 #endif
4957 ; return 0; }
4959 if { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4960 rm -rf conftest*
4961 eval "gcc_cv_have_decl_$ac_func=yes"
4962 else
4963 echo "configure: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 rm -rf conftest*
4966 eval "gcc_cv_have_decl_$ac_func=no"
4968 rm -f conftest*
4971 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4972 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4973 #define $ac_tr_decl 1
4976 else
4977 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4978 #define $ac_tr_decl 0
4983 done
4984 if test x = y ; then
4985 cat >> confdefs.h <<\EOF
4986 #define HAVE_DECL_GETRLIMIT 1
4988 cat >> confdefs.h <<\EOF
4989 #define HAVE_DECL_SETRLIMIT 1
4991 cat >> confdefs.h <<\EOF
4992 #define HAVE_DECL_GETRUSAGE 1
4997 for ac_func in ldgetname
4999 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5000 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5001 echo "configure:5002: checking whether $ac_func is declared" >&5
5002 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5003 echo $ac_n "(cached) $ac_c" 1>&6
5004 else
5005 cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 #undef $ac_tr_decl
5009 #define $ac_tr_decl 1
5011 #include "ansidecl.h"
5012 #include "system.h"
5013 #ifdef HAVE_LDFCN_H
5014 #include <ldfcn.h>
5015 #endif
5018 int main() {
5019 #ifndef $ac_func
5020 char *(*pfn) = (char *(*)) $ac_func ;
5021 #endif
5022 ; return 0; }
5024 if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5025 rm -rf conftest*
5026 eval "gcc_cv_have_decl_$ac_func=yes"
5027 else
5028 echo "configure: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5030 rm -rf conftest*
5031 eval "gcc_cv_have_decl_$ac_func=no"
5033 rm -f conftest*
5036 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5037 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5038 #define $ac_tr_decl 1
5041 else
5042 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5043 #define $ac_tr_decl 0
5048 done
5049 if test x = y ; then
5050 cat >> confdefs.h <<\EOF
5051 #define HAVE_DECL_LDGETNAME 1
5056 for ac_func in times
5058 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5059 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5060 echo "configure:5061: checking whether $ac_func is declared" >&5
5061 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5062 echo $ac_n "(cached) $ac_c" 1>&6
5063 else
5064 cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 #undef $ac_tr_decl
5068 #define $ac_tr_decl 1
5070 #include "ansidecl.h"
5071 #include "system.h"
5072 #ifdef HAVE_SYS_TIMES_H
5073 #include <sys/times.h>
5074 #endif
5077 int main() {
5078 #ifndef $ac_func
5079 char *(*pfn) = (char *(*)) $ac_func ;
5080 #endif
5081 ; return 0; }
5083 if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5084 rm -rf conftest*
5085 eval "gcc_cv_have_decl_$ac_func=yes"
5086 else
5087 echo "configure: failed program was:" >&5
5088 cat conftest.$ac_ext >&5
5089 rm -rf conftest*
5090 eval "gcc_cv_have_decl_$ac_func=no"
5092 rm -f conftest*
5095 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5096 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5097 #define $ac_tr_decl 1
5100 else
5101 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5102 #define $ac_tr_decl 0
5107 done
5108 if test x = y ; then
5109 cat >> confdefs.h <<\EOF
5110 #define HAVE_DECL_TIMES 1
5115 # More time-related stuff.
5116 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5117 echo "configure:5118: checking for struct tms" >&5
5118 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5126 #include "ansidecl.h"
5127 #include "system.h"
5128 #ifdef HAVE_SYS_TIMES_H
5129 #include <sys/times.h>
5130 #endif
5132 int main() {
5133 struct tms tms;
5134 ; return 0; }
5136 if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5137 rm -rf conftest*
5138 ac_cv_struct_tms=yes
5139 else
5140 echo "configure: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 rm -rf conftest*
5143 ac_cv_struct_tms=no
5145 rm -f conftest*
5148 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5149 if test $ac_cv_struct_tms = yes; then
5150 cat >> confdefs.h <<\EOF
5151 #define HAVE_STRUCT_TMS 1
5156 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5157 # revisit after autoconf 2.50.
5158 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5159 echo "configure:5160: checking for clock_t" >&5
5160 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5164 cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5168 #include "ansidecl.h"
5169 #include "system.h"
5171 int main() {
5172 clock_t x;
5173 ; return 0; }
5175 if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5176 rm -rf conftest*
5177 gcc_cv_type_clock_t=yes
5178 else
5179 echo "configure: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5181 rm -rf conftest*
5182 gcc_cv_type_clock_t=no
5184 rm -f conftest*
5187 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5188 if test $gcc_cv_type_clock_t = yes; then
5189 cat >> confdefs.h <<\EOF
5190 #define HAVE_CLOCK_T 1
5195 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5196 echo "configure:5197: checking for uchar" >&5
5197 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5198 echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200 cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5204 #include "ansidecl.h"
5205 #include "system.h"
5207 int main() {
5208 if ((uchar *)0) return 0;
5209 if (sizeof(uchar)) return 0;
5210 ; return 0; }
5212 if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5213 rm -rf conftest*
5214 ac_cv_type_uchar=yes
5215 else
5216 echo "configure: failed program was:" >&5
5217 cat conftest.$ac_ext >&5
5218 rm -rf conftest*
5219 ac_cv_type_uchar=no
5221 rm -f conftest*
5224 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5225 if test $ac_cv_type_uchar = yes; then
5226 cat >> confdefs.h <<\EOF
5227 #define HAVE_UCHAR 1
5232 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5233 CFLAGS="$saved_CFLAGS"
5235 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5236 if test "${enable_initfini_array+set}" = set; then
5237 enableval="$enable_initfini_array"
5239 else
5241 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5242 echo "configure:5243: checking for .preinit_array/.init_array/.fini_array support" >&5
5243 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5244 echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246 if test "$cross_compiling" = yes; then
5247 gcc_cv_initfini_array=no
5248 else
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5253 static int x = -1;
5254 int main (void) { return x; }
5255 int foo (void) { x = 0; }
5256 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5259 then
5260 gcc_cv_initfini_array=yes
5261 else
5262 echo "configure: failed program was:" >&5
5263 cat conftest.$ac_ext >&5
5264 rm -fr conftest*
5265 gcc_cv_initfini_array=no
5267 rm -fr conftest*
5272 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5273 enable_initfini_array=$gcc_cv_initfini_array
5277 if test $enable_initfini_array = yes; then
5278 cat >> confdefs.h <<\EOF
5279 #define HAVE_INITFINI_ARRAY 1
5284 # mkdir takes a single argument on some systems.
5285 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5286 echo "configure:5287: checking if mkdir takes one argument" >&5
5287 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5288 echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290 cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5294 #include <sys/types.h>
5295 #ifdef HAVE_SYS_STAT_H
5296 # include <sys/stat.h>
5297 #endif
5298 #ifdef HAVE_UNISTD_H
5299 # include <unistd.h>
5300 #endif
5301 #ifdef HAVE_DIRECT_H
5302 # include <direct.h>
5303 #endif
5304 int main() {
5305 mkdir ("foo", 0);
5306 ; return 0; }
5308 if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5309 rm -rf conftest*
5310 gcc_cv_mkdir_takes_one_arg=no
5311 else
5312 echo "configure: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 rm -rf conftest*
5315 gcc_cv_mkdir_takes_one_arg=yes
5317 rm -f conftest*
5320 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5321 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5322 cat >> confdefs.h <<\EOF
5323 #define MKDIR_TAKES_ONE_ARG 1
5329 # File extensions
5330 manext='.1'
5331 objext='.o'
5335 # With Setjmp/Longjmp based exception handling.
5336 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5337 if test "${enable_sjlj_exceptions+set}" = set; then
5338 enableval="$enable_sjlj_exceptions"
5339 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5340 cat >> confdefs.h <<EOF
5341 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5347 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5348 echo "configure:5349: checking for main in -lunwind" >&5
5349 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5351 echo $ac_n "(cached) $ac_c" 1>&6
5352 else
5353 ac_save_LIBS="$LIBS"
5354 LIBS="-lunwind $LIBS"
5355 cat > conftest.$ac_ext <<EOF
5356 #line 5357 "configure"
5357 #include "confdefs.h"
5359 int main() {
5360 main()
5361 ; return 0; }
5363 if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5364 rm -rf conftest*
5365 eval "ac_cv_lib_$ac_lib_var=yes"
5366 else
5367 echo "configure: failed program was:" >&5
5368 cat conftest.$ac_ext >&5
5369 rm -rf conftest*
5370 eval "ac_cv_lib_$ac_lib_var=no"
5372 rm -f conftest*
5373 LIBS="$ac_save_LIBS"
5376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5377 echo "$ac_t""yes" 1>&6
5378 use_libunwind_default=yes
5379 else
5380 echo "$ac_t""no" 1>&6
5381 use_libunwind_default=no
5384 # Use libunwind based exception handling.
5385 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5386 if test "${enable_libunwind_exceptions+set}" = set; then
5387 enableval="$enable_libunwind_exceptions"
5388 use_libunwind_exceptions=$enableval
5389 else
5390 use_libunwind_exceptions=$use_libunwind_default
5393 if test x"$use_libunwind_exceptions" = xyes; then
5394 cat >> confdefs.h <<\EOF
5395 #define USE_LIBUNWIND_EXCEPTIONS 1
5400 target_gtfiles=
5401 build_xm_file=
5402 build_xm_defines=
5403 build_install_headers_dir=install-headers-tar
5404 build_exeext=
5405 host_xm_file=
5406 host_xm_defines=
5407 host_xmake_file=
5408 host_truncate_target=
5409 host_exeext=
5411 # Decode the host machine, then the target machine.
5412 # For the host machine, we save the xm_file variable as host_xm_file;
5413 # then we decode the target machine and forget everything else
5414 # that came from the host machine.
5415 for machine in $build $host $target; do
5416 . ${srcdir}/config.gcc
5417 done
5419 extra_objs="${host_extra_objs} ${extra_objs}"
5421 # Default the target-machine variables that were not explicitly set.
5422 if test x"$tm_file" = x
5423 then tm_file=$cpu_type/$cpu_type.h; fi
5425 if test x"$extra_headers" = x
5426 then extra_headers=; fi
5428 if test x$md_file = x
5429 then md_file=$cpu_type/$cpu_type.md; fi
5431 if test x$out_file = x
5432 then out_file=$cpu_type/$cpu_type.c; fi
5434 if test x"$tmake_file" = x
5435 then tmake_file=$cpu_type/t-$cpu_type
5438 if test x"$dwarf2" = xyes
5439 then tm_file="$tm_file tm-dwarf2.h"
5442 # Say what files are being used for the output code and MD file.
5443 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5444 echo "Using \`$srcdir/config/$md_file' as machine description file."
5446 # If any of the xm_file variables contain nonexistent files, warn
5447 # about them and drop them.
5450 for x in $build_xm_file; do
5451 if test -f $srcdir/config/$x
5452 then bx="$bx $x"
5453 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5455 done
5456 build_xm_file="$bx"
5459 for x in $host_xm_file; do
5460 if test -f $srcdir/config/$x
5461 then hx="$hx $x"
5462 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5464 done
5465 host_xm_file="$hx"
5468 for x in $xm_file; do
5469 if test -f $srcdir/config/$x
5470 then tx="$tx $x"
5471 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5473 done
5474 xm_file="$tx"
5476 count=a
5477 for f in $tm_file; do
5478 count=${count}x
5479 done
5480 if test $count = ax; then
5481 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5482 else
5483 echo "Using the following target machine macro files:"
5484 for f in $tm_file; do
5485 echo " $srcdir/config/$f"
5486 done
5489 if test x$need_64bit_hwint = xyes; then
5490 cat >> confdefs.h <<\EOF
5491 #define NEED_64BIT_HOST_WIDE_INT 1
5496 count=a
5497 for f in $host_xm_file; do
5498 count=${count}x
5499 done
5500 if test $count = a; then
5502 elif test $count = ax; then
5503 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5504 else
5505 echo "Using the following host machine macro files:"
5506 for f in $host_xm_file; do
5507 echo " $srcdir/config/$f"
5508 done
5510 echo "Using ${out_host_hook_obj} for host machine hooks."
5512 if test "$host_xm_file" != "$build_xm_file"; then
5513 count=a
5514 for f in $build_xm_file; do
5515 count=${count}x
5516 done
5517 if test $count = a; then
5519 elif test $count = ax; then
5520 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5521 else
5522 echo "Using the following build machine macro files:"
5523 for f in $build_xm_file; do
5524 echo " $srcdir/config/$f"
5525 done
5529 if test x$thread_file = x; then
5530 if test x$target_thread_file != x; then
5531 thread_file=$target_thread_file
5532 else
5533 thread_file='single'
5537 # Look for a file containing extra machine modes.
5538 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5539 extra_modes_file='$(srcdir)'/config/${extra_modes}
5541 cat >> confdefs.h <<EOF
5542 #define EXTRA_MODES_FILE "$extra_modes"
5545 cat >> confdefs.h <<\EOF
5546 #define EXTRA_CC_MODES 1
5551 # auto-host.h is the file containing items generated by autoconf and is
5552 # the first file included by config.h.
5553 # If host=build, it is correct to have bconfig include auto-host.h
5554 # as well. If host!=build, we are in error and need to do more
5555 # work to find out the build config parameters.
5556 if test x$host = x$build
5557 then
5558 build_auto=auto-host.h
5559 FORBUILD=..
5560 else
5561 # We create a subdir, then run autoconf in the subdir.
5562 # To prevent recursion we set host and build for the new
5563 # invocation of configure to the build for this invocation
5564 # of configure.
5565 tempdir=build.$$
5566 rm -rf $tempdir
5567 mkdir $tempdir
5568 cd $tempdir
5569 case ${srcdir} in
5570 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5571 *) realsrcdir=../${srcdir};;
5572 esac
5573 saved_CFLAGS="${CFLAGS}"
5574 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5575 ${realsrcdir}/configure \
5576 --target=$target_alias --host=$build_alias --build=$build_alias
5577 CFLAGS="${saved_CFLAGS}"
5579 # We just finished tests for the build machine, so rename
5580 # the file auto-build.h in the gcc directory.
5581 mv auto-host.h ../auto-build.h
5582 cd ..
5583 rm -rf $tempdir
5584 build_auto=auto-build.h
5585 FORBUILD=../build-$build_alias
5589 tm_file="${tm_file} defaults.h"
5590 tm_p_file="${tm_p_file} tm-preds.h"
5591 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5592 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5593 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5594 # put this back in temporarily.
5595 xm_file="ansidecl.h ${xm_file}"
5597 # Truncate the target if necessary
5598 if test x$host_truncate_target != x; then
5599 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5602 # Get the version trigger filename from the toplevel
5603 if test "${with_gcc_version_trigger+set}" = set; then
5604 gcc_version_trigger=$with_gcc_version_trigger
5605 else
5606 gcc_version_trigger=${srcdir}/version.c
5608 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5609 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5611 # Compile in configure arguments.
5612 if test -f configargs.h ; then
5613 # Being re-configured.
5614 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5615 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5616 else
5617 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5619 cat > configargs.h <<EOF
5620 /* Generated automatically. */
5621 static const char configuration_arguments[] = "$gcc_config_arguments";
5622 static const char thread_model[] = "$thread_file";
5625 # Internationalization
5626 PACKAGE=gcc
5627 VERSION="$gcc_version"
5631 # Enable NLS support by default
5632 # Check whether --enable-nls or --disable-nls was given.
5633 if test "${enable_nls+set}" = set; then
5634 enableval="$enable_nls"
5636 else
5637 enable_nls=yes
5641 # if cross compiling, disable NLS support.
5642 # It's not worth the trouble, at least for now.
5644 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5645 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5646 enable_nls=no
5651 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5652 echo "configure:5653: checking for library containing strerror" >&5
5653 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5654 echo $ac_n "(cached) $ac_c" 1>&6
5655 else
5656 ac_func_search_save_LIBS="$LIBS"
5657 ac_cv_search_strerror="no"
5658 cat > conftest.$ac_ext <<EOF
5659 #line 5660 "configure"
5660 #include "confdefs.h"
5661 /* Override any gcc2 internal prototype to avoid an error. */
5662 /* We use char because int might match the return type of a gcc2
5663 builtin and then its argument prototype would still apply. */
5664 char strerror();
5666 int main() {
5667 strerror()
5668 ; return 0; }
5670 if { (eval echo configure:5671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5671 rm -rf conftest*
5672 ac_cv_search_strerror="none required"
5673 else
5674 echo "configure: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5677 rm -f conftest*
5678 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5679 LIBS="-l$i $ac_func_search_save_LIBS"
5680 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 /* Override any gcc2 internal prototype to avoid an error. */
5684 /* We use char because int might match the return type of a gcc2
5685 builtin and then its argument prototype would still apply. */
5686 char strerror();
5688 int main() {
5689 strerror()
5690 ; return 0; }
5692 if { (eval echo configure:5693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5693 rm -rf conftest*
5694 ac_cv_search_strerror="-l$i"
5695 break
5696 else
5697 echo "configure: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5700 rm -f conftest*
5701 done
5702 LIBS="$ac_func_search_save_LIBS"
5705 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5706 if test "$ac_cv_search_strerror" != "no"; then
5707 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5709 else :
5714 echo $ac_n "checking for working const""... $ac_c" 1>&6
5715 echo "configure:5716: checking for working const" >&5
5716 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5717 echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719 cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5723 int main() {
5725 /* Ultrix mips cc rejects this. */
5726 typedef int charset[2]; const charset x;
5727 /* SunOS 4.1.1 cc rejects this. */
5728 char const *const *ccp;
5729 char **p;
5730 /* NEC SVR4.0.2 mips cc rejects this. */
5731 struct point {int x, y;};
5732 static struct point const zero = {0,0};
5733 /* AIX XL C 1.02.0.0 rejects this.
5734 It does not let you subtract one const X* pointer from another in an arm
5735 of an if-expression whose if-part is not a constant expression */
5736 const char *g = "string";
5737 ccp = &g + (g ? g-g : 0);
5738 /* HPUX 7.0 cc rejects these. */
5739 ++ccp;
5740 p = (char**) ccp;
5741 ccp = (char const *const *) p;
5742 { /* SCO 3.2v4 cc rejects this. */
5743 char *t;
5744 char const *s = 0 ? (char *) 0 : (char const *) 0;
5746 *t++ = 0;
5748 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5749 int x[] = {25, 17};
5750 const int *foo = &x[0];
5751 ++foo;
5753 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5754 typedef const int *iptr;
5755 iptr p = 0;
5756 ++p;
5758 { /* AIX XL C 1.02.0.0 rejects this saying
5759 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5760 struct s { int j; const int *ap[3]; };
5761 struct s *b; b->j = 5;
5763 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5764 const int foo = 10;
5767 ; return 0; }
5769 if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5770 rm -rf conftest*
5771 ac_cv_c_const=yes
5772 else
5773 echo "configure: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
5775 rm -rf conftest*
5776 ac_cv_c_const=no
5778 rm -f conftest*
5781 echo "$ac_t""$ac_cv_c_const" 1>&6
5782 if test $ac_cv_c_const = no; then
5783 cat >> confdefs.h <<\EOF
5784 #define const
5789 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5790 echo "configure:5791: checking for off_t" >&5
5791 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5792 echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794 cat > conftest.$ac_ext <<EOF
5795 #line 5796 "configure"
5796 #include "confdefs.h"
5797 #include <sys/types.h>
5798 #if STDC_HEADERS
5799 #include <stdlib.h>
5800 #include <stddef.h>
5801 #endif
5803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5804 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5805 rm -rf conftest*
5806 ac_cv_type_off_t=yes
5807 else
5808 rm -rf conftest*
5809 ac_cv_type_off_t=no
5811 rm -f conftest*
5814 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5815 if test $ac_cv_type_off_t = no; then
5816 cat >> confdefs.h <<\EOF
5817 #define off_t long
5822 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5823 echo "configure:5824: checking for size_t" >&5
5824 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5825 echo $ac_n "(cached) $ac_c" 1>&6
5826 else
5827 cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 #include <sys/types.h>
5831 #if STDC_HEADERS
5832 #include <stdlib.h>
5833 #include <stddef.h>
5834 #endif
5836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5837 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5838 rm -rf conftest*
5839 ac_cv_type_size_t=yes
5840 else
5841 rm -rf conftest*
5842 ac_cv_type_size_t=no
5844 rm -f conftest*
5847 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5848 if test $ac_cv_type_size_t = no; then
5849 cat >> confdefs.h <<\EOF
5850 #define size_t unsigned
5855 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5856 # for constant arguments. Useless!
5857 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5858 echo "configure:5859: checking for working alloca.h" >&5
5859 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5860 echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862 cat > conftest.$ac_ext <<EOF
5863 #line 5864 "configure"
5864 #include "confdefs.h"
5865 #include <alloca.h>
5866 int main() {
5867 char *p = alloca(2 * sizeof(int));
5868 ; return 0; }
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871 rm -rf conftest*
5872 ac_cv_header_alloca_h=yes
5873 else
5874 echo "configure: failed program was:" >&5
5875 cat conftest.$ac_ext >&5
5876 rm -rf conftest*
5877 ac_cv_header_alloca_h=no
5879 rm -f conftest*
5882 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5883 if test $ac_cv_header_alloca_h = yes; then
5884 cat >> confdefs.h <<\EOF
5885 #define HAVE_ALLOCA_H 1
5890 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5891 echo "configure:5892: checking for alloca" >&5
5892 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5893 echo $ac_n "(cached) $ac_c" 1>&6
5894 else
5895 cat > conftest.$ac_ext <<EOF
5896 #line 5897 "configure"
5897 #include "confdefs.h"
5899 #ifdef __GNUC__
5900 # define alloca __builtin_alloca
5901 #else
5902 # ifdef _MSC_VER
5903 # include <malloc.h>
5904 # define alloca _alloca
5905 # else
5906 # if HAVE_ALLOCA_H
5907 # include <alloca.h>
5908 # else
5909 # ifdef _AIX
5910 #pragma alloca
5911 # else
5912 # ifndef alloca /* predefined by HP cc +Olibcalls */
5913 char *alloca ();
5914 # endif
5915 # endif
5916 # endif
5917 # endif
5918 #endif
5920 int main() {
5921 char *p = (char *) alloca(1);
5922 ; return 0; }
5924 if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5925 rm -rf conftest*
5926 ac_cv_func_alloca_works=yes
5927 else
5928 echo "configure: failed program was:" >&5
5929 cat conftest.$ac_ext >&5
5930 rm -rf conftest*
5931 ac_cv_func_alloca_works=no
5933 rm -f conftest*
5936 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5937 if test $ac_cv_func_alloca_works = yes; then
5938 cat >> confdefs.h <<\EOF
5939 #define HAVE_ALLOCA 1
5944 if test $ac_cv_func_alloca_works = no; then
5945 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5946 # that cause trouble. Some versions do not even contain alloca or
5947 # contain a buggy version. If you still want to use their alloca,
5948 # use ar to extract alloca.o from them instead of compiling alloca.c.
5949 ALLOCA=alloca.${ac_objext}
5950 cat >> confdefs.h <<\EOF
5951 #define C_ALLOCA 1
5955 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5956 echo "configure:5957: checking whether alloca needs Cray hooks" >&5
5957 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5958 echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960 cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963 #if defined(CRAY) && ! defined(CRAY2)
5964 webecray
5965 #else
5966 wenotbecray
5967 #endif
5970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5971 egrep "webecray" >/dev/null 2>&1; then
5972 rm -rf conftest*
5973 ac_cv_os_cray=yes
5974 else
5975 rm -rf conftest*
5976 ac_cv_os_cray=no
5978 rm -f conftest*
5982 echo "$ac_t""$ac_cv_os_cray" 1>&6
5983 if test $ac_cv_os_cray = yes; then
5984 for ac_func in _getb67 GETB67 getb67; do
5985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5986 echo "configure:5987: checking for $ac_func" >&5
5987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 /* System header to define __stub macros and hopefully few prototypes,
5994 which can conflict with char $ac_func(); below. */
5995 #include <assert.h>
5996 /* Override any gcc2 internal prototype to avoid an error. */
5997 /* We use char because int might match the return type of a gcc2
5998 builtin and then its argument prototype would still apply. */
5999 char $ac_func();
6001 int main() {
6003 /* The GNU C library defines this for functions which it implements
6004 to always fail with ENOSYS. Some functions are actually named
6005 something starting with __ and the normal name is an alias. */
6006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6007 choke me
6008 #else
6009 $ac_func();
6010 #endif
6012 ; return 0; }
6014 if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015 rm -rf conftest*
6016 eval "ac_cv_func_$ac_func=yes"
6017 else
6018 echo "configure: failed program was:" >&5
6019 cat conftest.$ac_ext >&5
6020 rm -rf conftest*
6021 eval "ac_cv_func_$ac_func=no"
6023 rm -f conftest*
6026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6027 echo "$ac_t""yes" 1>&6
6028 cat >> confdefs.h <<EOF
6029 #define CRAY_STACKSEG_END $ac_func
6032 break
6033 else
6034 echo "$ac_t""no" 1>&6
6037 done
6040 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6041 echo "configure:6042: checking stack direction for C alloca" >&5
6042 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6043 echo $ac_n "(cached) $ac_c" 1>&6
6044 else
6045 if test "$cross_compiling" = yes; then
6046 ac_cv_c_stack_direction=0
6047 else
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 find_stack_direction ()
6053 static char *addr = 0;
6054 auto char dummy;
6055 if (addr == 0)
6057 addr = &dummy;
6058 return find_stack_direction ();
6060 else
6061 return (&dummy > addr) ? 1 : -1;
6063 main ()
6065 exit (find_stack_direction() < 0);
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6069 then
6070 ac_cv_c_stack_direction=1
6071 else
6072 echo "configure: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 rm -fr conftest*
6075 ac_cv_c_stack_direction=-1
6077 rm -fr conftest*
6082 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6083 cat >> confdefs.h <<EOF
6084 #define STACK_DIRECTION $ac_cv_c_stack_direction
6090 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6091 echo "configure:6092: checking whether we are using the GNU C Library 2.1 or newer" >&5
6092 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6093 echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6099 #include <features.h>
6100 #ifdef __GNU_LIBRARY__
6101 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6102 Lucky GNU user
6103 #endif
6104 #endif
6107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6108 egrep "Lucky GNU user" >/dev/null 2>&1; then
6109 rm -rf conftest*
6110 ac_cv_gnu_library_2_1=yes
6111 else
6112 rm -rf conftest*
6113 ac_cv_gnu_library_2_1=no
6115 rm -f conftest*
6121 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6123 GLIBC21="$ac_cv_gnu_library_2_1"
6127 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6128 stdlib.h string.h unistd.h sys/param.h
6130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6132 echo "configure:6133: checking for $ac_hdr" >&5
6133 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6134 echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136 cat > conftest.$ac_ext <<EOF
6137 #line 6138 "configure"
6138 #include "confdefs.h"
6139 #include <$ac_hdr>
6141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6142 { (eval echo configure:6143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6144 if test -z "$ac_err"; then
6145 rm -rf conftest*
6146 eval "ac_cv_header_$ac_safe=yes"
6147 else
6148 echo "$ac_err" >&5
6149 echo "configure: failed program was:" >&5
6150 cat conftest.$ac_ext >&5
6151 rm -rf conftest*
6152 eval "ac_cv_header_$ac_safe=no"
6154 rm -f conftest*
6156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6157 echo "$ac_t""yes" 1>&6
6158 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6159 cat >> confdefs.h <<EOF
6160 #define $ac_tr_hdr 1
6163 else
6164 echo "$ac_t""no" 1>&6
6166 done
6168 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6169 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6170 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6173 echo "configure:6174: checking for $ac_func" >&5
6174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6175 echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177 cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 /* System header to define __stub macros and hopefully few prototypes,
6181 which can conflict with char $ac_func(); below. */
6182 #include <assert.h>
6183 /* Override any gcc2 internal prototype to avoid an error. */
6184 /* We use char because int might match the return type of a gcc2
6185 builtin and then its argument prototype would still apply. */
6186 char $ac_func();
6188 int main() {
6190 /* The GNU C library defines this for functions which it implements
6191 to always fail with ENOSYS. Some functions are actually named
6192 something starting with __ and the normal name is an alias. */
6193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6194 choke me
6195 #else
6196 $ac_func();
6197 #endif
6199 ; return 0; }
6201 if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6202 rm -rf conftest*
6203 eval "ac_cv_func_$ac_func=yes"
6204 else
6205 echo "configure: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 rm -rf conftest*
6208 eval "ac_cv_func_$ac_func=no"
6210 rm -f conftest*
6213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6214 echo "$ac_t""yes" 1>&6
6215 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6216 cat >> confdefs.h <<EOF
6217 #define $ac_tr_func 1
6220 else
6221 echo "$ac_t""no" 1>&6
6223 done
6228 am_cv_lib_iconv_ldpath=
6229 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6230 if test "${with_libiconv_prefix+set}" = set; then
6231 withval="$with_libiconv_prefix"
6233 for dir in `echo "$withval" | tr : ' '`; do
6234 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6235 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6236 done
6241 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6242 echo "configure:6243: checking for iconv" >&5
6243 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6244 echo $ac_n "(cached) $ac_c" 1>&6
6245 else
6247 am_cv_func_iconv="no, consider installing GNU libiconv"
6248 am_cv_lib_iconv=no
6249 cat > conftest.$ac_ext <<EOF
6250 #line 6251 "configure"
6251 #include "confdefs.h"
6252 #include <stdlib.h>
6253 #include <iconv.h>
6254 int main() {
6255 iconv_t cd = iconv_open("","");
6256 iconv(cd,NULL,NULL,NULL,NULL);
6257 iconv_close(cd);
6258 ; return 0; }
6260 if { (eval echo configure:6261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6261 rm -rf conftest*
6262 am_cv_func_iconv=yes
6263 else
6264 echo "configure: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6267 rm -f conftest*
6268 if test "$am_cv_func_iconv" != yes; then
6269 am_save_LIBS="$LIBS"
6270 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6271 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 #include <stdlib.h>
6275 #include <iconv.h>
6276 int main() {
6277 iconv_t cd = iconv_open("","");
6278 iconv(cd,NULL,NULL,NULL,NULL);
6279 iconv_close(cd);
6280 ; return 0; }
6282 if { (eval echo configure:6283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6283 rm -rf conftest*
6284 am_cv_lib_iconv=yes
6285 am_cv_func_iconv=yes
6286 else
6287 echo "configure: failed program was:" >&5
6288 cat conftest.$ac_ext >&5
6290 rm -f conftest*
6291 LIBS="$am_save_LIBS"
6296 echo "$ac_t""$am_cv_func_iconv" 1>&6
6297 if test "$am_cv_func_iconv" = yes; then
6298 cat >> confdefs.h <<\EOF
6299 #define HAVE_ICONV 1
6302 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6303 echo "configure:6304: checking for iconv declaration" >&5
6304 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6305 echo $ac_n "(cached) $ac_c" 1>&6
6306 else
6308 cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6312 #include <stdlib.h>
6313 #include <iconv.h>
6314 extern
6315 #ifdef __cplusplus
6317 #endif
6318 #if defined(__STDC__) || defined(__cplusplus)
6319 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6320 #else
6321 size_t iconv();
6322 #endif
6324 int main() {
6326 ; return 0; }
6328 if { (eval echo configure:6329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6329 rm -rf conftest*
6330 am_cv_proto_iconv_arg1=""
6331 else
6332 echo "configure: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 rm -rf conftest*
6335 am_cv_proto_iconv_arg1="const"
6337 rm -f conftest*
6338 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);"
6341 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6342 echo "$ac_t""${ac_t:-
6343 }$am_cv_proto_iconv" 1>&6
6344 cat >> confdefs.h <<EOF
6345 #define ICONV_CONST $am_cv_proto_iconv_arg1
6349 LIBICONV=
6350 if test "$am_cv_lib_iconv" = yes; then
6351 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6356 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6357 echo "configure:6358: checking for nl_langinfo and CODESET" >&5
6358 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6359 echo $ac_n "(cached) $ac_c" 1>&6
6360 else
6361 cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364 #include <langinfo.h>
6365 int main() {
6366 char* cs = nl_langinfo(CODESET);
6367 ; return 0; }
6369 if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6370 rm -rf conftest*
6371 am_cv_langinfo_codeset=yes
6372 else
6373 echo "configure: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
6375 rm -rf conftest*
6376 am_cv_langinfo_codeset=no
6378 rm -f conftest*
6382 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6383 if test $am_cv_langinfo_codeset = yes; then
6384 cat >> confdefs.h <<\EOF
6385 #define HAVE_LANGINFO_CODESET 1
6390 if test $ac_cv_header_locale_h = yes; then
6391 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6392 echo "configure:6393: checking for LC_MESSAGES" >&5
6393 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6394 echo $ac_n "(cached) $ac_c" 1>&6
6395 else
6396 cat > conftest.$ac_ext <<EOF
6397 #line 6398 "configure"
6398 #include "confdefs.h"
6399 #include <locale.h>
6400 int main() {
6401 return LC_MESSAGES
6402 ; return 0; }
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405 rm -rf conftest*
6406 am_cv_val_LC_MESSAGES=yes
6407 else
6408 echo "configure: failed program was:" >&5
6409 cat conftest.$ac_ext >&5
6410 rm -rf conftest*
6411 am_cv_val_LC_MESSAGES=no
6413 rm -f conftest*
6416 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6417 if test $am_cv_val_LC_MESSAGES = yes; then
6418 cat >> confdefs.h <<\EOF
6419 #define HAVE_LC_MESSAGES 1
6424 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6425 echo "configure:6426: checking whether NLS is requested" >&5
6426 # Check whether --enable-nls or --disable-nls was given.
6427 if test "${enable_nls+set}" = set; then
6428 enableval="$enable_nls"
6429 USE_NLS=$enableval
6430 else
6431 USE_NLS=yes
6434 echo "$ac_t""$USE_NLS" 1>&6
6437 BUILD_INCLUDED_LIBINTL=no
6438 USE_INCLUDED_LIBINTL=no
6439 INTLLIBS=
6440 INTLDEPS=
6442 if test "$USE_NLS" = "yes"; then
6443 cat >> confdefs.h <<\EOF
6444 #define ENABLE_NLS 1
6447 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6448 echo "configure:6449: checking whether included gettext is requested" >&5
6449 # Check whether --with-included-gettext or --without-included-gettext was given.
6450 if test "${with_included_gettext+set}" = set; then
6451 withval="$with_included_gettext"
6452 nls_cv_force_use_gnu_gettext=$withval
6453 else
6454 nls_cv_force_use_gnu_gettext=no
6457 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6459 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6460 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6461 CATOBJEXT=NONE
6466 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6467 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6468 echo "configure:6469: checking for libintl.h" >&5
6469 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6470 echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472 cat > conftest.$ac_ext <<EOF
6473 #line 6474 "configure"
6474 #include "confdefs.h"
6475 #include <libintl.h>
6477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6478 { (eval echo configure:6479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6480 if test -z "$ac_err"; then
6481 rm -rf conftest*
6482 eval "ac_cv_header_$ac_safe=yes"
6483 else
6484 echo "$ac_err" >&5
6485 echo "configure: failed program was:" >&5
6486 cat conftest.$ac_ext >&5
6487 rm -rf conftest*
6488 eval "ac_cv_header_$ac_safe=no"
6490 rm -f conftest*
6492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6493 echo "$ac_t""yes" 1>&6
6494 cat >> confdefs.h <<\EOF
6495 #define HAVE_LIBINTL_H 1
6498 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6499 echo "configure:6500: checking for GNU gettext in libc" >&5
6500 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6501 echo $ac_n "(cached) $ac_c" 1>&6
6502 else
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 #include <libintl.h>
6507 extern int _nl_msg_cat_cntr;
6508 int main() {
6509 bindtextdomain ("", "");
6510 return (int) gettext ("") + _nl_msg_cat_cntr
6511 ; return 0; }
6513 if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6514 rm -rf conftest*
6515 gt_cv_func_gnugettext1_libc=yes
6516 else
6517 echo "configure: failed program was:" >&5
6518 cat conftest.$ac_ext >&5
6519 rm -rf conftest*
6520 gt_cv_func_gnugettext1_libc=no
6522 rm -f conftest*
6525 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6527 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6528 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6529 echo "configure:6530: checking for GNU gettext in libintl" >&5
6530 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6531 echo $ac_n "(cached) $ac_c" 1>&6
6532 else
6533 gt_save_LIBS="$LIBS"
6534 LIBS="$LIBS -lintl $LIBICONV"
6535 cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 #include <libintl.h>
6539 extern int _nl_msg_cat_cntr;
6540 int main() {
6541 bindtextdomain ("", "");
6542 return (int) gettext ("") + _nl_msg_cat_cntr
6543 ; return 0; }
6545 if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6546 rm -rf conftest*
6547 gt_cv_func_gnugettext1_libintl=yes
6548 else
6549 echo "configure: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6551 rm -rf conftest*
6552 gt_cv_func_gnugettext1_libintl=no
6554 rm -f conftest*
6555 LIBS="$gt_save_LIBS"
6558 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6561 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6562 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6563 && test "$PACKAGE" != gettext; }; then
6564 cat >> confdefs.h <<\EOF
6565 #define HAVE_GETTEXT 1
6569 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6570 INTLLIBS="-lintl $LIBICONV"
6573 gt_save_LIBS="$LIBS"
6574 LIBS="$LIBS $INTLLIBS"
6575 for ac_func in dcgettext
6577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6578 echo "configure:6579: checking for $ac_func" >&5
6579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6580 echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582 cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* System header to define __stub macros and hopefully few prototypes,
6586 which can conflict with char $ac_func(); below. */
6587 #include <assert.h>
6588 /* Override any gcc2 internal prototype to avoid an error. */
6589 /* We use char because int might match the return type of a gcc2
6590 builtin and then its argument prototype would still apply. */
6591 char $ac_func();
6593 int main() {
6595 /* The GNU C library defines this for functions which it implements
6596 to always fail with ENOSYS. Some functions are actually named
6597 something starting with __ and the normal name is an alias. */
6598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6599 choke me
6600 #else
6601 $ac_func();
6602 #endif
6604 ; return 0; }
6606 if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6607 rm -rf conftest*
6608 eval "ac_cv_func_$ac_func=yes"
6609 else
6610 echo "configure: failed program was:" >&5
6611 cat conftest.$ac_ext >&5
6612 rm -rf conftest*
6613 eval "ac_cv_func_$ac_func=no"
6615 rm -f conftest*
6618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6619 echo "$ac_t""yes" 1>&6
6620 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6621 cat >> confdefs.h <<EOF
6622 #define $ac_tr_func 1
6625 else
6626 echo "$ac_t""no" 1>&6
6628 done
6630 LIBS="$gt_save_LIBS"
6632 # Extract the first word of "msgfmt", so it can be a program name with args.
6633 set dummy msgfmt; ac_word=$2
6634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6635 echo "configure:6636: checking for $ac_word" >&5
6636 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6637 echo $ac_n "(cached) $ac_c" 1>&6
6638 else
6639 case "$MSGFMT" in
6641 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6644 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6645 for ac_dir in $PATH; do
6646 test -z "$ac_dir" && ac_dir=.
6647 if test -f $ac_dir/$ac_word; then
6648 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6649 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6650 break
6653 done
6654 IFS="$ac_save_ifs"
6655 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6657 esac
6659 MSGFMT="$ac_cv_path_MSGFMT"
6660 if test "$MSGFMT" != ":"; then
6661 echo "$ac_t""$MSGFMT" 1>&6
6662 else
6663 echo "$ac_t""no" 1>&6
6666 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6667 set dummy gmsgfmt; ac_word=$2
6668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6669 echo "configure:6670: checking for $ac_word" >&5
6670 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6671 echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673 case "$GMSGFMT" in
6675 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6677 ?:/*)
6678 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6681 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6682 ac_dummy="$PATH"
6683 for ac_dir in $ac_dummy; do
6684 test -z "$ac_dir" && ac_dir=.
6685 if test -f $ac_dir/$ac_word; then
6686 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6687 break
6689 done
6690 IFS="$ac_save_ifs"
6691 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6693 esac
6695 GMSGFMT="$ac_cv_path_GMSGFMT"
6696 if test -n "$GMSGFMT"; then
6697 echo "$ac_t""$GMSGFMT" 1>&6
6698 else
6699 echo "$ac_t""no" 1>&6
6703 # Extract the first word of "xgettext", so it can be a program name with args.
6704 set dummy xgettext; ac_word=$2
6705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6706 echo "configure:6707: checking for $ac_word" >&5
6707 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6708 echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710 case "$XGETTEXT" in
6712 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6716 for ac_dir in $PATH; do
6717 test -z "$ac_dir" && ac_dir=.
6718 if test -f $ac_dir/$ac_word; then
6719 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6720 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6721 break
6724 done
6725 IFS="$ac_save_ifs"
6726 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6728 esac
6730 XGETTEXT="$ac_cv_path_XGETTEXT"
6731 if test "$XGETTEXT" != ":"; then
6732 echo "$ac_t""$XGETTEXT" 1>&6
6733 else
6734 echo "$ac_t""no" 1>&6
6738 CATOBJEXT=.gmo
6741 else
6742 echo "$ac_t""no" 1>&6
6746 if test "$CATOBJEXT" = "NONE"; then
6747 nls_cv_use_gnu_gettext=yes
6751 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6752 INTLOBJS="\$(GETTOBJS)"
6753 # Extract the first word of "msgfmt", so it can be a program name with args.
6754 set dummy msgfmt; ac_word=$2
6755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6756 echo "configure:6757: checking for $ac_word" >&5
6757 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6758 echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760 case "$MSGFMT" in
6762 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6766 for ac_dir in $PATH; do
6767 test -z "$ac_dir" && ac_dir=.
6768 if test -f $ac_dir/$ac_word; then
6769 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6770 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6771 break
6774 done
6775 IFS="$ac_save_ifs"
6776 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6778 esac
6780 MSGFMT="$ac_cv_path_MSGFMT"
6781 if test "$MSGFMT" != ":"; then
6782 echo "$ac_t""$MSGFMT" 1>&6
6783 else
6784 echo "$ac_t""no" 1>&6
6787 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6788 set dummy gmsgfmt; ac_word=$2
6789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6790 echo "configure:6791: checking for $ac_word" >&5
6791 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6792 echo $ac_n "(cached) $ac_c" 1>&6
6793 else
6794 case "$GMSGFMT" in
6796 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6798 ?:/*)
6799 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6803 ac_dummy="$PATH"
6804 for ac_dir in $ac_dummy; do
6805 test -z "$ac_dir" && ac_dir=.
6806 if test -f $ac_dir/$ac_word; then
6807 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6808 break
6810 done
6811 IFS="$ac_save_ifs"
6812 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6814 esac
6816 GMSGFMT="$ac_cv_path_GMSGFMT"
6817 if test -n "$GMSGFMT"; then
6818 echo "$ac_t""$GMSGFMT" 1>&6
6819 else
6820 echo "$ac_t""no" 1>&6
6823 # Extract the first word of "xgettext", so it can be a program name with args.
6824 set dummy xgettext; ac_word=$2
6825 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6826 echo "configure:6827: checking for $ac_word" >&5
6827 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6828 echo $ac_n "(cached) $ac_c" 1>&6
6829 else
6830 case "$XGETTEXT" in
6832 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6836 for ac_dir in $PATH; do
6837 test -z "$ac_dir" && ac_dir=.
6838 if test -f $ac_dir/$ac_word; then
6839 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6840 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6841 break
6844 done
6845 IFS="$ac_save_ifs"
6846 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6848 esac
6850 XGETTEXT="$ac_cv_path_XGETTEXT"
6851 if test "$XGETTEXT" != ":"; then
6852 echo "$ac_t""$XGETTEXT" 1>&6
6853 else
6854 echo "$ac_t""no" 1>&6
6858 BUILD_INCLUDED_LIBINTL=yes
6859 USE_INCLUDED_LIBINTL=yes
6860 CATOBJEXT=.gmo
6861 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6862 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6863 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6866 if test "$GMSGFMT" != ":"; then
6867 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6869 else
6870 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6871 GMSGFMT=":"
6875 if test "$XGETTEXT" != ":"; then
6876 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6878 else
6879 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6880 XGETTEXT=":"
6884 POSUB=po
6889 if test "$PACKAGE" = gettext; then
6890 BUILD_INCLUDED_LIBINTL=yes
6893 for ac_prog in bison
6895 # Extract the first word of "$ac_prog", so it can be a program name with args.
6896 set dummy $ac_prog; ac_word=$2
6897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6898 echo "configure:6899: checking for $ac_word" >&5
6899 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6900 echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902 if test -n "$INTLBISON"; then
6903 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6904 else
6905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6906 ac_dummy="$PATH"
6907 for ac_dir in $ac_dummy; do
6908 test -z "$ac_dir" && ac_dir=.
6909 if test -f $ac_dir/$ac_word; then
6910 ac_cv_prog_INTLBISON="$ac_prog"
6911 break
6913 done
6914 IFS="$ac_save_ifs"
6917 INTLBISON="$ac_cv_prog_INTLBISON"
6918 if test -n "$INTLBISON"; then
6919 echo "$ac_t""$INTLBISON" 1>&6
6920 else
6921 echo "$ac_t""no" 1>&6
6924 test -n "$INTLBISON" && break
6925 done
6927 if test -z "$INTLBISON"; then
6928 ac_verc_fail=yes
6929 else
6930 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6931 echo "configure:6932: checking version of bison" >&5
6932 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6933 case $ac_prog_version in
6934 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6935 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6936 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6937 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6938 esac
6939 echo "$ac_t""$ac_prog_version" 1>&6
6941 if test $ac_verc_fail = yes; then
6942 INTLBISON=:
6954 if test $USE_INCLUDED_LIBINTL = yes; then
6955 cat >> confdefs.h <<\EOF
6956 #define USE_INCLUDED_LIBINTL 1
6961 nls_cv_header_intl=
6962 nls_cv_header_libgt=
6964 DATADIRNAME=share
6967 INSTOBJEXT=.mo
6970 GENCAT=gencat
6974 if test "x$CATOBJEXT" != x; then
6975 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6976 echo "configure:6977: checking for catalogs to be installed" >&5
6977 # Look for .po and .gmo files in the source directory.
6978 CATALOGS=
6979 XLINGUAS=
6980 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6981 # If there aren't any .gmo files the shell will give us the
6982 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6983 # weeded out.
6984 case "$cat" in *\**)
6985 continue;;
6986 esac
6987 # The quadruple backslash is collapsed to a double backslash
6988 # by the backticks, then collapsed again by the double quotes,
6989 # leaving us with one backslash in the sed expression (right
6990 # before the dot that mustn't act as a wildcard). The dot to
6991 # be escaped in the second expression is hiding inside CATOBJEXT.
6992 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6993 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6994 # The user is allowed to set LINGUAS to a list of languages to
6995 # install catalogs for. If it's empty that means "all of them."
6996 if test "x$LINGUAS" = x; then
6997 CATALOGS="$CATALOGS $cat"
6998 XLINGUAS="$XLINGUAS $lang"
6999 else
7000 case "$LINGUAS" in *$lang*)
7001 CATALOGS="$CATALOGS $cat"
7002 XLINGUAS="$XLINGUAS $lang"
7004 esac
7006 done
7007 LINGUAS="$XLINGUAS"
7008 echo "$ac_t""$LINGUAS" 1>&6
7011 MKINSTALLDIRS=
7012 if test -n "$ac_aux_dir"; then
7013 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7015 if test -z "$MKINSTALLDIRS"; then
7016 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7020 INTL_LIBTOOL_SUFFIX_PREFIX=
7024 # Windows32 Registry support for specifying GCC installation paths.
7025 # Check whether --enable-win32-registry or --disable-win32-registry was given.
7026 if test "${enable_win32_registry+set}" = set; then
7027 enableval="$enable_win32_registry"
7031 case $host_os in
7032 win32 | pe | cygwin* | mingw32* | uwin*)
7033 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
7034 echo "configure:7035: checking whether windows registry support is requested" >&5
7035 if test "x$enable_win32_registry" != xno; then
7036 cat >> confdefs.h <<\EOF
7037 #define ENABLE_WIN32_REGISTRY 1
7040 echo "$ac_t""yes" 1>&6
7042 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7043 echo "configure:7044: checking for library containing RegOpenKeyExA" >&5
7044 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7045 echo $ac_n "(cached) $ac_c" 1>&6
7046 else
7047 ac_func_search_save_LIBS="$LIBS"
7048 ac_cv_search_RegOpenKeyExA="no"
7049 cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052 /* Override any gcc2 internal prototype to avoid an error. */
7053 /* We use char because int might match the return type of a gcc2
7054 builtin and then its argument prototype would still apply. */
7055 char RegOpenKeyExA();
7057 int main() {
7058 RegOpenKeyExA()
7059 ; return 0; }
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7062 rm -rf conftest*
7063 ac_cv_search_RegOpenKeyExA="none required"
7064 else
7065 echo "configure: failed program was:" >&5
7066 cat conftest.$ac_ext >&5
7068 rm -f conftest*
7069 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7070 LIBS="-l$i $ac_func_search_save_LIBS"
7071 cat > conftest.$ac_ext <<EOF
7072 #line 7073 "configure"
7073 #include "confdefs.h"
7074 /* Override any gcc2 internal prototype to avoid an error. */
7075 /* We use char because int might match the return type of a gcc2
7076 builtin and then its argument prototype would still apply. */
7077 char RegOpenKeyExA();
7079 int main() {
7080 RegOpenKeyExA()
7081 ; return 0; }
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084 rm -rf conftest*
7085 ac_cv_search_RegOpenKeyExA="-l$i"
7086 break
7087 else
7088 echo "configure: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7091 rm -f conftest*
7092 done
7093 LIBS="$ac_func_search_save_LIBS"
7096 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7097 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7098 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7100 else :
7103 else
7104 echo "$ac_t""no" 1>&6
7107 # Check if user specified a different registry key.
7108 case "x${enable_win32_registry}" in
7109 x | xyes)
7110 # default.
7111 gcc_cv_win32_registry_key="$VERSION"
7113 xno)
7114 # no registry lookup.
7115 gcc_cv_win32_registry_key=''
7118 # user-specified key.
7119 gcc_cv_win32_registry_key="$enable_win32_registry"
7121 esac
7123 if test "x$enable_win32_registry" != xno; then
7124 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7125 echo "configure:7126: checking registry key on windows hosts" >&5
7126 cat >> confdefs.h <<EOF
7127 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7130 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7133 esac
7135 # Get an absolute path to the GCC top-level source directory
7136 holddir=`${PWDCMD-pwd}`
7137 cd $srcdir
7138 topdir=`${PWDCMD-pwd}`
7139 cd $holddir
7141 # Conditionalize the makefile for this host machine.
7142 # Make-host contains the concatenation of all host makefile fragments
7143 # [there can be more than one]. This file is built by configure.frag.
7144 host_overrides=Make-host
7145 dep_host_xmake_file=
7146 for f in .. ${host_xmake_file}
7148 if test -f ${srcdir}/config/$f
7149 then
7150 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7152 done
7154 # Conditionalize the makefile for this target machine.
7155 # Make-target contains the concatenation of all host makefile fragments
7156 # [there can be more than one]. This file is built by configure.frag.
7157 target_overrides=Make-target
7158 dep_tmake_file=
7159 for f in .. ${tmake_file}
7161 if test -f ${srcdir}/config/$f
7162 then
7163 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7165 done
7167 # If the host doesn't support symlinks, modify CC in
7168 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7169 # Otherwise, we can use "CC=$(CC)".
7170 rm -f symtest.tem
7171 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7172 then
7173 cc_set_by_configure="\$(CC)"
7174 quoted_cc_set_by_configure="\$(CC)"
7175 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7176 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7177 else
7178 rm -f symtest.tem
7179 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7180 then
7181 symbolic_link="cp -p"
7182 else
7183 symbolic_link="cp"
7185 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7186 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7187 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7188 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7190 rm -f symtest.tem
7192 out_object_file=`basename $out_file .c`.o
7194 tm_file_list=
7195 for f in $tm_file; do
7196 case $f in
7197 ansidecl.h )
7198 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7199 defaults.h )
7200 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7201 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7202 esac
7203 done
7205 tm_p_file_list=
7206 for f in $tm_p_file; do
7207 case $f in
7208 tm-preds.h )
7209 tm_p_file_list="${tm_p_file_list} $f" ;;
7210 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7211 esac
7212 done
7214 host_xm_file_list=
7215 for f in $host_xm_file; do
7216 case $f in
7217 ansidecl.h )
7218 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7219 auto-host.h )
7220 host_xm_file_list="${host_xm_file_list} $f" ;;
7221 defaults.h )
7222 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7223 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7224 esac
7225 done
7227 build_xm_file_list=
7228 for f in $build_xm_file; do
7229 case $f in
7230 ansidecl.h )
7231 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7232 auto-build.h | auto-host.h )
7233 build_xm_file_list="${build_xm_file_list} $f" ;;
7234 defaults.h )
7235 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7236 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7237 esac
7238 done
7240 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7241 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7242 CROSS=
7243 ALL=all.internal
7244 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7245 if test x$host != x$target
7246 then
7247 CROSS="-DCROSS_COMPILE"
7248 ALL=all.cross
7249 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7250 case "$host","$target" in
7251 i?86-*-*,x86_64-*-* \
7252 | powerpc*-*-*,powerpc64*-*-*)
7253 CROSS="$CROSS -DNATIVE_CROSS" ;;
7254 esac
7257 # If this is a cross-compiler that does not
7258 # have its own set of headers then define
7259 # inhibit_libc
7261 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7262 # This prevents libgcc2 from containing any code which requires libc
7263 # support.
7264 inhibit_libc=
7265 if { test x$host != x$target && test "x$with_headers" = x &&
7266 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7267 inhibit_libc=-Dinhibit_libc
7271 # When building gcc with a cross-compiler, we need to adjust things so
7272 # that the generator programs are still built with the native compiler.
7273 # Also, we cannot run fixincludes or fix-header.
7275 # These are the normal (build=host) settings:
7276 BUILD_PREFIX=
7277 BUILD_PREFIX_1=ignore-
7278 BUILD_CC='$(CC)'
7279 BUILD_CFLAGS='$(ALL_CFLAGS)'
7281 STMP_FIXINC=stmp-fixinc
7282 STMP_FIXPROTO=stmp-fixproto
7284 # And these apply if build != host.
7285 if test x$build != x$host
7286 then
7287 BUILD_PREFIX=build-
7288 BUILD_PREFIX_1=build-
7289 BUILD_CC='$(CC_FOR_BUILD)'
7290 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7292 STMP_FIXINC=
7293 STMP_FIXPROTO=
7296 # Expand extra_headers to include complete path.
7297 # This substitutes for lots of t-* files.
7298 extra_headers_list=
7299 if test "x$extra_headers" = x
7300 then true
7301 else
7302 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7303 for file in $extra_headers;
7305 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7306 done
7309 if test x$use_collect2 = xno; then
7310 use_collect2=
7313 # Add a definition of USE_COLLECT2 if system wants one.
7314 if test x$use_collect2 != x
7315 then
7316 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7317 xm_defines="${xm_defines} USE_COLLECT2"
7320 # If we have gas in the build tree, make a link to it.
7321 if test -f ../gas/Makefile; then
7322 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7325 # If we have nm and objdump in the build tree, make a link to them.
7326 if test -f ../binutils/Makefile; then
7327 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7328 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
7331 # If we have ld in the build tree, make a link to it.
7332 if test -f ../ld/Makefile; then
7333 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7336 # Figure out what assembler we will be using.
7337 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7338 echo "configure:7339: checking what assembler to use" >&5
7339 gcc_cv_as=
7340 gcc_cv_gas_major_version=
7341 gcc_cv_gas_minor_version=
7342 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7343 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7344 if test -x "$DEFAULT_ASSEMBLER"; then
7345 gcc_cv_as="$DEFAULT_ASSEMBLER"
7346 elif test -x "$AS"; then
7347 gcc_cv_as="$AS"
7348 elif test -x as$host_exeext; then
7349 # Build using assembler in the current directory.
7350 gcc_cv_as=./as$host_exeext
7351 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
7352 # Single tree build which includes gas.
7353 for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
7355 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7356 if test x$gcc_cv_gas_version != x; then
7357 break
7359 done
7360 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7361 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7362 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7365 if test "x$gcc_cv_as" = x; then
7366 # Search the same directories that the installed compiler will
7367 # search. Else we may find the wrong assembler and lose. If we
7368 # do not find a suitable assembler binary, then try the user's
7369 # path.
7371 # Also note we have to check MD_EXEC_PREFIX before checking the
7372 # user's path. Unfortunately, there is no good way to get at the
7373 # value of MD_EXEC_PREFIX here. So we do a brute force search
7374 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7375 # to be fixed as part of the make/configure rewrite too.
7377 if test "x$exec_prefix" = xNONE; then
7378 if test "x$prefix" = xNONE; then
7379 test_prefix=/usr/local
7380 else
7381 test_prefix=$prefix
7383 else
7384 test_prefix=$exec_prefix
7387 # If the loop below does not find an assembler, then use whatever
7388 # one we can find in the users's path.
7389 # user's path.
7390 if test "x$program_prefix" != xNONE; then
7391 gcc_cv_as=${program_prefix}as$host_exeext
7392 else
7393 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7396 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7397 $test_prefix/lib/gcc-lib/$target_alias \
7398 /usr/lib/gcc/$target_alias/$gcc_version \
7399 /usr/lib/gcc/$target_alias \
7400 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7401 $test_prefix/$target_alias/bin"
7403 if test x$host = x$target; then
7404 test_dirs="$test_dirs \
7405 /usr/libexec \
7406 /usr/ccs/gcc \
7407 /usr/ccs/bin \
7408 /udk/usr/ccs/bin \
7409 /bsd43/usr/lib/cmplrs/cc \
7410 /usr/cross64/usr/bin \
7411 /usr/lib/cmplrs/cc \
7412 /sysv/usr/lib/cmplrs/cc \
7413 /svr4/usr/lib/cmplrs/cc \
7414 /usr/bin"
7417 for dir in $test_dirs; do
7418 if test -x $dir/as$host_exeext; then
7419 gcc_cv_as=$dir/as$host_exeext
7420 break;
7422 done
7424 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7425 echo "$ac_t"""newly built gas"" 1>&6
7426 else
7427 echo "$ac_t""$gcc_cv_as" 1>&6
7430 # Figure out what linker we will be using.
7431 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7432 echo "configure:7433: checking what linker to use" >&5
7433 gcc_cv_ld=
7434 gcc_cv_gld_major_version=
7435 gcc_cv_gld_minor_version=
7436 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7437 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7438 if test -x "$DEFAULT_LINKER"; then
7439 gcc_cv_ld="$DEFAULT_LINKER"
7440 elif test -x "$LD"; then
7441 gcc_cv_ld="$LD"
7442 elif test -x ld$host_exeext; then
7443 # Build using linker in the current directory.
7444 gcc_cv_ld=./ld$host_exeext
7445 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
7446 # Single tree build which includes ld.
7447 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
7449 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7450 if test x$gcc_cv_gld_version != x; then
7451 break
7453 done
7454 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7455 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7458 if test "x$gcc_cv_ld" = x; then
7459 # Search the same directories that the installed compiler will
7460 # search. Else we may find the wrong linker and lose. If we
7461 # do not find a suitable linker binary, then try the user's
7462 # path.
7464 # Also note we have to check MD_EXEC_PREFIX before checking the
7465 # user's path. Unfortunately, there is no good way to get at the
7466 # value of MD_EXEC_PREFIX here. So we do a brute force search
7467 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7468 # to be fixed as part of the make/configure rewrite too.
7470 if test "x$exec_prefix" = xNONE; then
7471 if test "x$prefix" = xNONE; then
7472 test_prefix=/usr/local
7473 else
7474 test_prefix=$prefix
7476 else
7477 test_prefix=$exec_prefix
7480 # If the loop below does not find an linker, then use whatever
7481 # one we can find in the users's path.
7482 # user's path.
7483 if test "x$program_prefix" != xNONE; then
7484 gcc_cv_ld=${program_prefix}ld$host_exeext
7485 else
7486 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7489 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7490 $test_prefix/lib/gcc-lib/$target_alias \
7491 /usr/lib/gcc/$target_alias/$gcc_version \
7492 /usr/lib/gcc/$target_alias \
7493 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7494 $test_prefix/$target_alias/bin"
7496 if test x$host = x$target; then
7497 test_dirs="$test_dirs \
7498 /usr/libexec \
7499 /usr/ccs/gcc \
7500 /usr/ccs/bin \
7501 /udk/usr/ccs/bin \
7502 /bsd43/usr/lib/cmplrs/cc \
7503 /usr/cross64/usr/bin \
7504 /usr/lib/cmplrs/cc \
7505 /sysv/usr/lib/cmplrs/cc \
7506 /svr4/usr/lib/cmplrs/cc \
7507 /usr/bin"
7510 for dir in $test_dirs; do
7511 if test -x $dir/ld$host_exeext; then
7512 gcc_cv_ld=$dir/ld$host_exeext
7513 break;
7515 done
7517 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7518 echo "$ac_t"""newly built ld"" 1>&6
7519 else
7520 echo "$ac_t""$gcc_cv_ld" 1>&6
7523 # Figure out what nm we will be using.
7524 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7525 echo "configure:7526: checking what nm to use" >&5
7526 if test -x nm$host_exeext; then
7527 gcc_cv_nm=./nm$host_exeext
7528 elif test "x$program_prefix" != xNONE; then
7529 gcc_cv_nm=${program_prefix}nm$host_exeext
7530 else
7531 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7533 echo "$ac_t""$gcc_cv_nm" 1>&6
7535 # Figure out what objdump we will be using.
7536 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7537 echo "configure:7538: checking what objdump to use" >&5
7538 if test -x objdump$host_exeext; then
7539 gcc_cv_objdump=./objdump$host_exeext
7540 elif test "x$program_prefix" != xNONE; then
7541 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7542 else
7543 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7545 echo "$ac_t""$gcc_cv_objdump" 1>&6
7547 # Figure out what assembler alignment features are present.
7548 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7549 echo "configure:7550: checking assembler alignment features" >&5
7550 gcc_cv_as_alignment_features=none
7551 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7552 # Gas version 2.6 and later support for .balign and .p2align.
7553 # bytes to skip when using .p2align.
7554 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
7555 gcc_cv_as_alignment_features=".balign and .p2align"
7556 cat >> confdefs.h <<\EOF
7557 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7561 # Gas version 2.8 and later support specifying the maximum
7562 # bytes to skip when using .p2align.
7563 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
7564 gcc_cv_as_alignment_features=".p2align including maximum skip"
7565 cat >> confdefs.h <<\EOF
7566 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7570 elif test x$gcc_cv_as != x; then
7571 # Check if we have .balign and .p2align
7572 echo ".balign 4" > conftest.s
7573 echo ".p2align 2" >> conftest.s
7574 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7575 gcc_cv_as_alignment_features=".balign and .p2align"
7576 cat >> confdefs.h <<\EOF
7577 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7581 rm -f conftest.s conftest.o
7582 # Check if specifying the maximum bytes to skip when
7583 # using .p2align is supported.
7584 echo ".p2align 4,,7" > conftest.s
7585 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7586 gcc_cv_as_alignment_features=".p2align including maximum skip"
7587 cat >> confdefs.h <<\EOF
7588 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7592 rm -f conftest.s conftest.o
7594 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7596 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7597 echo "configure:7598: checking assembler subsection support" >&5
7598 gcc_cv_as_subsections=no
7599 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7600 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7601 gcc_cv_as_subsections="working .subsection -1"
7603 elif test x$gcc_cv_as != x; then
7604 # Check if we have .subsection
7605 echo ".subsection 1" > conftest.s
7606 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7607 gcc_cv_as_subsections=".subsection"
7608 if test x$gcc_cv_nm != x; then
7609 cat > conftest.s <<EOF
7610 conftest_label1: .word 0
7611 .subsection -1
7612 conftest_label2: .word 0
7613 .previous
7615 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7616 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7617 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7618 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7620 else
7621 gcc_cv_as_subsections="working .subsection -1"
7626 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7628 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7629 cat >> confdefs.h <<\EOF
7630 #define HAVE_GAS_SUBSECTION_ORDERING 1
7634 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7636 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7637 echo "configure:7638: checking assembler weak support" >&5
7638 gcc_cv_as_weak=no
7639 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7640 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
7641 gcc_cv_as_weak="yes"
7643 elif test x$gcc_cv_as != x; then
7644 # Check if we have .weak
7645 echo " .weak foobar" > conftest.s
7646 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7647 gcc_cv_as_weak="yes"
7649 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7651 if test x"$gcc_cv_as_weak" = xyes; then
7652 cat >> confdefs.h <<\EOF
7653 #define HAVE_GAS_WEAK 1
7657 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7659 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7660 echo "configure:7661: checking assembler hidden support" >&5
7661 gcc_cv_as_hidden=no
7662 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7663 if test "$gcc_cv_gas_major_version" -eq 2 \
7664 -a "$gcc_cv_gas_minor_version" -eq 12 \
7665 -a "$gcc_cv_gas_patch_version" -ge 1 \
7666 -o "$gcc_cv_gas_major_version" -eq 2 \
7667 -a "$gcc_cv_gas_minor_version" -gt 12 \
7668 -o "$gcc_cv_gas_major_version" -gt 2 \
7669 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7670 gcc_cv_as_hidden="yes"
7672 elif test x$gcc_cv_as != x; then
7673 # Check if we have .hidden
7674 echo " .hidden foobar" > conftest.s
7675 echo "foobar:" >> conftest.s
7676 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7677 gcc_cv_as_hidden="yes"
7679 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7681 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7682 # This is irritatingly difficult to feature test for. Look for
7683 # the date string after the version number.
7684 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7685 if echo "$ld_ver" | grep GNU > /dev/null; then
7686 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7687 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'`
7688 if test 0"$ld_date" -lt 20020404; then
7689 if test -n "$ld_date"; then
7690 # If there was date string, but was earlier than 2002-04-04, fail
7691 gcc_cv_as_hidden="no"
7692 elif test -z "$ld_vers"; then
7693 # If there was no date string nor ld version number, something is wrong
7694 gcc_cv_as_hidden="no"
7695 else
7696 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7697 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7698 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7699 test -z "$ld_vers_patch" && ld_vers_patch=0
7700 if test "$ld_vers_major" -lt 2; then
7701 gcc_cv_as_hidden="no"
7702 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7703 gcc_cv_as_hidden="no"
7704 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7705 -a "$ld_vers_patch" -eq 0; then
7706 gcc_cv_as_hidden="no"
7712 if test x"$gcc_cv_as_hidden" = xyes; then
7713 cat >> confdefs.h <<\EOF
7714 #define HAVE_GAS_HIDDEN 1
7718 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7719 libgcc_visibility=$gcc_cv_as_hidden
7720 case "$target" in
7721 mips-sgi-irix6*)
7722 if test x"$gnu_ld_flag" = x"no"; then
7723 # Even if using gas with .hidden support, the resulting object files
7724 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7725 # N64 linkers, the problem is that the linker refuses to accept
7726 # -call_shared (passed by default to the linker) and -r (used to
7727 # link the object file generated without .hidden directives with
7728 # one that hides symbols), so we also lose.
7729 libgcc_visibility=no
7732 esac
7735 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7736 echo "configure:7737: checking assembler leb128 support" >&5
7737 gcc_cv_as_leb128=no
7738 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7739 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7740 gcc_cv_as_leb128="yes"
7742 elif test x$gcc_cv_as != x; then
7743 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7744 cat > conftest.s <<EOF
7745 .data
7746 .uleb128 L2 - L1
7748 .uleb128 1280
7749 .sleb128 -1010
7752 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7753 gcc_cv_as_leb128="yes"
7755 # GAS versions before 2.11 do not support uleb128,
7756 # despite appearing to.
7757 # ??? There exists an elf-specific test that will crash
7758 # the assembler. Perhaps it's better to figure out whether
7759 # arbitrary sections are supported and try the test.
7760 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7761 if echo "$as_ver" | grep GNU > /dev/null; then
7762 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7763 as_major=`echo $as_ver | sed 's/\..*//'`
7764 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7765 if test $as_major -eq 2 -a $as_minor -lt 11; then
7766 gcc_cv_as_leb128="no"
7770 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7772 if test x"$gcc_cv_as_leb128" = xyes; then
7773 cat >> confdefs.h <<\EOF
7774 #define HAVE_AS_LEB128 1
7778 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7780 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7781 echo "configure:7782: checking assembler eh_frame optimization" >&5
7782 gcc_cv_as_eh_frame=no
7783 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7784 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7785 gcc_cv_as_eh_frame="yes"
7787 elif test x$gcc_cv_as != x; then
7788 # Check if this is GAS.
7789 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7790 rm -f a.out 2> /dev/null
7791 if echo "$as_ver" | grep GNU > /dev/null; then
7792 # Versions up to and including 2.11.0 may mis-optimize
7793 # .eh_frame data. Try something.
7794 cat > conftest.s <<EOF
7795 .text
7796 .LFB1:
7797 .4byte 0
7798 .L1:
7799 .4byte 0
7800 .LFE1:
7801 .section .eh_frame,"aw",@progbits
7802 __FRAME_BEGIN__:
7803 .4byte .LECIE1-.LSCIE1
7804 .LSCIE1:
7805 .4byte 0x0
7806 .byte 0x1
7807 .ascii "z\0"
7808 .byte 0x1
7809 .byte 0x78
7810 .byte 0x1a
7811 .byte 0x0
7812 .byte 0x4
7813 .4byte 1
7814 .p2align 1
7815 .LECIE1:
7816 .LSFDE1:
7817 .4byte .LEFDE1-.LASFDE1
7818 .LASFDE1:
7819 .4byte .LASFDE1-__FRAME_BEGIN__
7820 .4byte .LFB1
7821 .4byte .LFE1-.LFB1
7822 .byte 0x4
7823 .4byte .LFE1-.LFB1
7824 .byte 0x4
7825 .4byte .L1-.LFB1
7826 .LEFDE1:
7828 cat > conftest.lit <<EOF
7829 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7830 0010 01000000 12000000 18000000 00000000 ................
7831 0020 08000000 04080000 0044 .........D
7833 cat > conftest.big <<EOF
7834 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7835 0010 00000001 00000012 00000018 00000000 ................
7836 0020 00000008 04000000 0844 .........D
7838 # If the assembler didn't choke, and we can objdump,
7839 # and we got the correct data, then succeed.
7840 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7841 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7842 | tail -3 > conftest.got \
7843 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7844 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7845 then
7846 gcc_cv_as_eh_frame="yes"
7847 else
7848 gcc_cv_as_eh_frame="bad"
7849 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7850 cat >> confdefs.h <<\EOF
7851 #define USE_AS_TRADITIONAL_FORMAT 1
7857 rm -f conftest.*
7859 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7861 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7862 echo "configure:7863: checking assembler section merging support" >&5
7863 gcc_cv_as_shf_merge=no
7864 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7865 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7866 gcc_cv_as_shf_merge=yes
7868 elif test x$gcc_cv_as != x; then
7869 # Check if we support SHF_MERGE sections
7870 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7871 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7872 gcc_cv_as_shf_merge=yes
7874 rm -f conftest.s conftest.o
7876 if test x"$gcc_cv_as_shf_merge" = xyes; then
7877 cat >> confdefs.h <<\EOF
7878 #define HAVE_GAS_SHF_MERGE 1
7882 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7884 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7885 echo "configure:7886: checking assembler thread-local storage support" >&5
7886 gcc_cv_as_tls=no
7887 conftest_s=
7888 tls_first_major=
7889 tls_first_minor=
7890 case "$target" in
7891 alpha*-*-*)
7892 conftest_s='
7893 .section ".tdata","awT",@progbits
7894 foo: .long 25
7895 .text
7896 ldq $27,__tls_get_addr($29) !literal!1
7897 lda $16,foo($29) !tlsgd!1
7898 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7899 ldq $27,__tls_get_addr($29) !literal!2
7900 lda $16,foo($29) !tlsldm!2
7901 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7902 ldq $1,foo($29) !gotdtprel
7903 ldah $2,foo($29) !dtprelhi
7904 lda $3,foo($2) !dtprello
7905 lda $4,foo($29) !dtprel
7906 ldq $1,foo($29) !gottprel
7907 ldah $2,foo($29) !tprelhi
7908 lda $3,foo($2) !tprello
7909 lda $4,foo($29) !tprel'
7910 tls_first_major=2
7911 tls_first_minor=13
7913 i[34567]86-*-*)
7914 conftest_s='
7915 .section ".tdata","awT",@progbits
7916 foo: .long 25
7917 .text
7918 movl %gs:0, %eax
7919 leal foo@TLSGD(,%ebx,1), %eax
7920 leal foo@TLSLDM(%ebx), %eax
7921 leal foo@DTPOFF(%eax), %edx
7922 movl foo@GOTTPOFF(%ebx), %eax
7923 subl foo@GOTTPOFF(%ebx), %eax
7924 addl foo@GOTNTPOFF(%ebx), %eax
7925 movl foo@INDNTPOFF, %eax
7926 movl $foo@TPOFF, %eax
7927 subl $foo@TPOFF, %eax
7928 leal foo@NTPOFF(%ecx), %eax'
7929 tls_first_major=2
7930 tls_first_minor=14
7932 x86_64-*-*)
7933 conftest_s='
7934 .section ".tdata","awT",@progbits
7935 foo: .long 25
7936 .text
7937 movq %fs:0, %rax
7938 leaq foo@TLSGD(%rip), %rdi
7939 leaq foo@TLSLD(%rip), %rdi
7940 leaq foo@DTPOFF(%rax), %rdx
7941 movq foo@GOTTPOFF(%rip), %rax
7942 movq $foo@TPOFF, %rax'
7943 tls_first_major=2
7944 tls_first_minor=14
7946 ia64-*-*)
7947 conftest_s='
7948 .section ".tdata","awT",@progbits
7949 foo: data8 25
7950 .text
7951 addl r16 = @ltoff(@dtpmod(foo#)), gp
7952 addl r17 = @ltoff(@dtprel(foo#)), gp
7953 addl r18 = @ltoff(@tprel(foo#)), gp
7954 addl r19 = @dtprel(foo#), gp
7955 adds r21 = @dtprel(foo#), r13
7956 movl r23 = @dtprel(foo#)
7957 addl r20 = @tprel(foo#), gp
7958 adds r22 = @tprel(foo#), r13
7959 movl r24 = @tprel(foo#)'
7960 tls_first_major=2
7961 tls_first_minor=13
7963 s390-*-*)
7964 conftest_s='
7965 .section ".tdata","awT",@progbits
7966 foo: .long 25
7967 .text
7968 .long foo@TLSGD
7969 .long foo@TLSLDM
7970 .long foo@DTPOFF
7971 .long foo@NTPOFF
7972 .long foo@GOTNTPOFF
7973 .long foo@INDNTPOFF
7974 l %r1,foo@GOTNTPOFF(%r12)
7975 l %r1,0(%r1):tls_load:foo
7976 bas %r14,0(%r1,%r13):tls_gdcall:foo
7977 bas %r14,0(%r1,%r13):tls_ldcall:foo'
7978 tls_first_major=2
7979 tls_first_minor=14
7981 s390x-*-*)
7982 conftest_s='
7983 .section ".tdata","awT",@progbits
7984 foo: .long 25
7985 .text
7986 .quad foo@TLSGD
7987 .quad foo@TLSLDM
7988 .quad foo@DTPOFF
7989 .quad foo@NTPOFF
7990 .quad foo@GOTNTPOFF
7991 lg %r1,foo@GOTNTPOFF(%r12)
7992 larl %r1,foo@INDNTPOFF
7993 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
7994 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
7995 tls_first_major=2
7996 tls_first_minor=14
7998 esac
7999 if test -z "$tls_first_major"; then
8001 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
8002 then
8003 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
8004 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
8005 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
8006 gcc_cv_as_tls=yes
8008 elif test x$gcc_cv_as != x; then
8009 echo "$conftest_s" > conftest.s
8010 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
8011 then
8012 gcc_cv_as_tls=yes
8014 rm -f conftest.s conftest.o
8016 if test "$gcc_cv_as_tls" = yes; then
8017 cat >> confdefs.h <<\EOF
8018 #define HAVE_AS_TLS 1
8022 echo "$ac_t""$gcc_cv_as_tls" 1>&6
8024 case "$target" in
8025 # All TARGET_ABI_OSF targets.
8026 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8027 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8028 echo "configure:8029: checking assembler supports explicit relocations" >&5
8029 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8030 echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8033 gcc_cv_as_explicit_relocs=unknown
8034 if test x$gcc_cv_gas_major_version != x \
8035 -a x$gcc_cv_gas_minor_version != x
8036 then
8037 if test "$gcc_cv_gas_major_version" -eq 2 \
8038 -a "$gcc_cv_gas_minor_version" -ge 12 \
8039 -o "$gcc_cv_gas_major_version" -gt 2; then
8040 gcc_cv_as_explicit_relocs=yes
8042 elif test x$gcc_cv_as != x; then
8043 cat > conftest.s << 'EOF'
8044 .set nomacro
8045 .text
8046 extbl $3, $2, $3 !lituse_bytoff!1
8047 ldq $2, a($29) !literal!1
8048 ldq $4, b($29) !literal!2
8049 ldq_u $3, 0($2) !lituse_base!1
8050 ldq $27, f($29) !literal!5
8051 jsr $26, ($27), f !lituse_jsr!5
8052 ldah $29, 0($26) !gpdisp!3
8053 lda $0, c($29) !gprel
8054 ldah $1, d($29) !gprelhigh
8055 lda $1, d($1) !gprellow
8056 lda $29, 0($29) !gpdisp!3
8058 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8059 gcc_cv_as_explicit_relocs=yes
8060 else
8061 gcc_cv_as_explicit_relocs=no
8063 rm -f conftest.s conftest.o
8068 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8069 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8070 cat >> confdefs.h <<\EOF
8071 #define HAVE_AS_EXPLICIT_RELOCS 1
8076 sparc*-*-*)
8077 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8078 echo "configure:8079: checking assembler .register pseudo-op support" >&5
8079 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8080 echo $ac_n "(cached) $ac_c" 1>&6
8081 else
8083 gcc_cv_as_register_pseudo_op=unknown
8084 if test x$gcc_cv_as != x; then
8085 # Check if we have .register
8086 echo ".register %g2, #scratch" > conftest.s
8087 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8088 gcc_cv_as_register_pseudo_op=yes
8089 else
8090 gcc_cv_as_register_pseudo_op=no
8092 rm -f conftest.s conftest.o
8097 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8098 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8099 cat >> confdefs.h <<\EOF
8100 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8105 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8106 echo "configure:8107: checking assembler supports -relax" >&5
8107 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8108 echo $ac_n "(cached) $ac_c" 1>&6
8109 else
8111 gcc_cv_as_relax_opt=unknown
8112 if test x$gcc_cv_as != x; then
8113 # Check if gas supports -relax
8114 echo ".text" > conftest.s
8115 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8116 gcc_cv_as_relax_opt=yes
8117 else
8118 gcc_cv_as_relax_opt=no
8120 rm -f conftest.s conftest.o
8125 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8126 if test "x$gcc_cv_as_relax_opt" = xyes; then
8127 cat >> confdefs.h <<\EOF
8128 #define HAVE_AS_RELAX_OPTION 1
8133 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8134 echo "configure:8135: checking assembler and linker support unaligned pc related relocs" >&5
8135 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8136 echo $ac_n "(cached) $ac_c" 1>&6
8137 else
8139 gcc_cv_as_sparc_ua_pcrel=unknown
8140 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8141 gcc_cv_as_sparc_ua_pcrel=no
8142 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8143 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8144 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8145 gcc_cv_as_sparc_ua_pcrel=yes
8147 rm -f conftest.s conftest.o conftest
8152 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8153 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8154 cat >> confdefs.h <<\EOF
8155 #define HAVE_AS_SPARC_UA_PCREL 1
8160 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8161 echo "configure:8162: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8162 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8163 echo $ac_n "(cached) $ac_c" 1>&6
8164 else
8166 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8167 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8168 if test x$gcc_cv_objdump != x; then
8169 gcc_cv_as_sparc_ua_pcrel_hidden=no
8170 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8171 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8172 echo "foo: .skip 4" >> conftest.s
8173 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8174 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8175 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8176 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8177 if $gcc_cv_objdump -R conftest 2> /dev/null \
8178 | grep 'DISP32' > /dev/null 2>&1; then
8180 else
8181 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8185 rm -f conftest.s conftest.o conftest
8186 else
8187 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8192 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8193 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8194 cat >> confdefs.h <<\EOF
8195 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8200 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8201 echo "configure:8202: checking for assembler offsetable %lo() support" >&5
8202 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8203 echo $ac_n "(cached) $ac_c" 1>&6
8204 else
8206 gcc_cv_as_offsetable_lo10=unknown
8207 if test "x$gcc_cv_as" != x; then
8208 # Check if assembler has offsetable %lo()
8209 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8210 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8211 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8212 > /dev/null 2>&1 &&
8213 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8214 > /dev/null 2>&1; then
8215 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8216 gcc_cv_as_offsetable_lo10=no
8217 else
8218 gcc_cv_as_offsetable_lo10=yes
8220 else
8221 gcc_cv_as_offsetable_lo10=no
8223 rm -f conftest.s conftest.o conftest1.s conftest1.o
8228 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8229 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8230 cat >> confdefs.h <<\EOF
8231 #define HAVE_AS_OFFSETABLE_LO10 1
8238 i[34567]86-*-* | x86_64-*-*)
8239 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8240 echo "configure:8241: checking assembler instructions" >&5
8241 gcc_cv_as_instructions=
8242 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
8243 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
8244 gcc_cv_as_instructions="filds fists"
8246 elif test x$gcc_cv_as != x; then
8247 set "filds fists" "filds mem; fists mem"
8248 while test $# -gt 0
8250 echo "$2" > conftest.s
8251 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8252 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8254 shift 2
8255 done
8256 rm -f conftest.s conftest.o
8258 if test x"$gcc_cv_as_instructions" != x; then
8259 cat >> confdefs.h <<EOF
8260 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8264 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8266 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8267 echo "configure:8268: checking assembler GOTOFF in data directives" >&5
8268 gcc_cv_as_gotoff_in_data=no
8269 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
8270 then
8271 if test "$gcc_cv_gas_major_version" -eq 2 \
8272 -a "$gcc_cv_gas_minor_version" -ge 11 \
8273 -o "$gcc_cv_gas_major_version" -gt 2; then
8274 gcc_cv_as_gotoff_in_data=yes
8276 elif test x$gcc_cv_as != x; then
8277 cat > conftest.s <<EOF
8278 .text
8279 .L0:
8281 .data
8282 .long .L0@GOTOFF
8284 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8285 gcc_cv_as_gotoff_in_data=yes
8288 cat >> confdefs.h <<EOF
8289 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8292 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8295 ia64*-*-*)
8296 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8297 echo "configure:8298: checking assembler supports ltoffx and ldxmov" >&5
8298 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8299 echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8302 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8303 if test x$gcc_cv_gas_major_version != x \
8304 -a x$gcc_cv_gas_minor_version != x
8305 then
8306 if test "$gcc_cv_gas_major_version" -eq 2 \
8307 -a "$gcc_cv_gas_minor_version" -ge 14 \
8308 -o "$gcc_cv_gas_major_version" -gt 2; then
8309 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8311 elif test x$gcc_cv_as != x; then
8312 cat > conftest.s << 'EOF'
8313 .text
8314 addl r15 = @ltoffx(x#), gp
8316 ld8.mov r16 = [r15], x#
8318 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8319 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8320 else
8321 gcc_cv_as_ltoffx_ldxmov_relocs=no
8323 rm -f conftest.s conftest.o
8328 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8329 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8330 cat >> confdefs.h <<\EOF
8331 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8336 esac
8338 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8339 echo "configure:8340: checking assembler dwarf2 debug_line support" >&5
8340 gcc_cv_as_dwarf2_debug_line=no
8341 # ??? Not all targets support dwarf2 debug_line, even within a version
8342 # of gas. Moreover, we need to emit a valid instruction to trigger any
8343 # info to the output file. So, as supported targets are added to gas 2.11,
8344 # add some instruction here to (also) show we expect this might work.
8345 # ??? Once 2.11 is released, probably need to add first known working
8346 # version to the per-target configury.
8347 case "$target" in
8348 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8349 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
8350 insn="nop"
8352 ia64*-*-*)
8353 insn="nop 0"
8355 esac
8356 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8357 then
8358 if test "$gcc_cv_gas_major_version" -eq 2 \
8359 -a "$gcc_cv_gas_minor_version" -ge 11 \
8360 -o "$gcc_cv_gas_major_version" -gt 2 \
8361 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8362 && test x"$insn" != x ; then
8363 gcc_cv_as_dwarf2_debug_line="yes"
8365 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8366 echo ' .file 1 "conftest.s"' > conftest.s
8367 echo ' .loc 1 3 0' >> conftest.s
8368 echo " $insn" >> conftest.s
8369 # ??? This fails with non-gnu grep.
8370 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8371 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8372 # The .debug_line file table must be in the exact order that
8373 # we specified the files, since these indices are also used
8374 # by DW_AT_decl_file. Approximate this test by testing if
8375 # the assembler bitches if the same index is assigned twice.
8376 echo ' .file 1 "foo.s"' > conftest.s
8377 echo ' .file 1 "bar.s"' >> conftest.s
8378 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8379 then
8380 gcc_cv_as_dwarf2_debug_line="no"
8381 else
8382 gcc_cv_as_dwarf2_debug_line="yes"
8385 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8387 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8388 cat >> confdefs.h <<\EOF
8389 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8393 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8395 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8396 echo "configure:8397: checking assembler --gdwarf2 support" >&5
8397 gcc_cv_as_gdwarf2_flag=no
8398 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8399 then
8400 if test "$gcc_cv_gas_major_version" -eq 2 \
8401 -a "$gcc_cv_gas_minor_version" -ge 11 \
8402 -o "$gcc_cv_gas_major_version" -gt 2 \
8403 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8404 && test x"$insn" != x ; then
8405 gcc_cv_as_gdwarf2_flag="yes"
8407 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8408 echo '' > conftest.s
8409 # ??? This fails with non-gnu grep.
8410 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8411 then
8412 gcc_cv_as_gdwarf2_flag="yes"
8414 rm -f conftest.s conftest.o
8416 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8417 cat >> confdefs.h <<\EOF
8418 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8422 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8424 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8425 echo "configure:8426: checking assembler --gstabs support" >&5
8426 gcc_cv_as_gstabs_flag=no
8427 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8428 then
8429 if test "$gcc_cv_gas_major_version" -eq 2 \
8430 -a "$gcc_cv_gas_minor_version" -ge 11 \
8431 -o "$gcc_cv_gas_major_version" -gt 2 \
8432 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8433 && test x"$insn" != x ; then
8434 gcc_cv_as_gstabs_flag="yes"
8436 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8437 echo '' > conftest.s
8438 # ??? This fails with non-gnu grep.
8439 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8440 gcc_cv_as_gstabs_flag="yes"
8442 rm -f conftest.s conftest.o
8444 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8445 cat >> confdefs.h <<\EOF
8446 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8450 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8452 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8453 echo "configure:8454: checking linker read-only and read-write section mixing" >&5
8454 gcc_cv_ld_ro_rw_mix=unknown
8455 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8456 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
8457 gcc_cv_ld_ro_rw_mix=read-write
8459 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8460 echo '.section "myfoosect", "a"' > conftest1.s
8461 echo '.section "myfoosect", "aw"' > conftest2.s
8462 echo '.byte 1' >> conftest2.s
8463 echo '.section "myfoosect", "a"' > conftest3.s
8464 echo '.byte 0' >> conftest3.s
8465 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8466 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8467 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8468 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8469 conftest2.o conftest3.o; then
8470 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8471 | grep -A1 myfoosect`
8472 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8473 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8474 gcc_cv_ld_ro_rw_mix=read-only
8475 else
8476 gcc_cv_ld_ro_rw_mix=read-write
8480 rm -f conftest.* conftest[123].*
8482 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8483 cat >> confdefs.h <<\EOF
8484 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8488 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8490 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8491 echo "configure:8492: checking linker PT_GNU_EH_FRAME support" >&5
8492 gcc_cv_ld_eh_frame_hdr=no
8493 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8494 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
8495 gcc_cv_ld_eh_frame_hdr=yes
8497 elif test x$gcc_cv_ld != x; then
8498 # Check if linker supports --eh-frame-hdr option
8499 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8500 gcc_cv_ld_eh_frame_hdr=yes
8503 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8504 cat >> confdefs.h <<\EOF
8505 #define HAVE_LD_EH_FRAME_HDR 1
8509 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8511 # Miscellaneous target-specific checks.
8512 case "$target" in
8513 mips*-*-*)
8514 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8515 echo "configure:8516: checking whether libgloss uses STARTUP directives consistently" >&5
8516 gcc_cv_mips_libgloss_startup=no
8517 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8518 if test "x$exec_prefix" = xNONE; then
8519 if test "x$prefix" = xNONE; then
8520 test_prefix=/usr/local
8521 else
8522 test_prefix=$prefix
8524 else
8525 test_prefix=$exec_prefix
8527 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8529 if grep '^STARTUP' $f > /dev/null 2>&1; then
8530 gcc_cv_mips_libgloss_startup=yes
8531 break
8533 done
8534 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8535 cat >> confdefs.h <<\EOF
8536 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8540 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8542 esac
8544 if test x$with_sysroot = x && test x$host = x$target \
8545 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8546 cat >> confdefs.h <<EOF
8547 #define PREFIX_INCLUDE_DIR "$prefix/include"
8552 # Figure out what language subdirectories are present.
8553 # Look if the user specified --enable-languages="..."; if not, use
8554 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8555 # go away some day.
8556 # NB: embedded tabs in this IF block -- do not untabify
8557 if test x"${enable_languages+set}" != xset; then
8558 if test x"${LANGUAGES+set}" = xset; then
8559 enable_languages="${LANGUAGES}"
8560 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8562 else
8563 enable_languages=all
8565 else
8566 if test x"${enable_languages}" = x \
8567 || test x"${enable_languages}" = xyes;
8568 then
8569 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8572 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8574 # First scan to see if an enabled language requires some other language.
8575 # We assume that a given config-lang.in will list all the language
8576 # front ends it requires, even if some are required indirectly.
8577 for lang in ${srcdir}/*/config-lang.in ..
8579 case $lang in
8582 # The odd quoting in the next line works around
8583 # an apparent bug in bash 1.12 on linux.
8584 ${srcdir}/[*]/config-lang.in)
8587 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8588 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8589 for other in $this_lang_requires
8591 case ,${enable_languages}, in
8592 *,$other,*)
8594 *,all,*)
8596 *,$lang_alias,*)
8597 enable_languages="$enable_languages,$other"
8599 esac
8600 done
8602 esac
8603 done
8605 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8606 found_languages=
8607 subdirs=
8608 for lang in ${srcdir}/*/config-lang.in ..
8610 case $lang in
8611 ..) ;;
8612 # The odd quoting in the next line works around
8613 # an apparent bug in bash 1.12 on linux.
8614 ${srcdir}/[*]/config-lang.in) ;;
8616 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8617 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8618 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8619 if test "x$lang_alias" = x
8620 then
8621 echo "$lang doesn't set \$language." 1>&2
8622 exit 1
8624 case ${build_by_default},${enable_languages}, in
8625 *,$lang_alias,*) add_this_lang=yes ;;
8626 no,*) add_this_lang=no ;;
8627 *,all,*) add_this_lang=yes ;;
8628 *) add_this_lang=no ;;
8629 esac
8630 found_languages="${found_languages} ${lang_alias}"
8631 if test x"${add_this_lang}" = xyes; then
8632 case $lang in
8633 ${srcdir}/ada/config-lang.in)
8634 if test x$have_gnat = xyes ; then
8635 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8639 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8641 esac
8644 esac
8645 done
8647 missing_languages=
8648 for expected_language in ${expected_languages} ..
8650 if test "${expected_language}" != ..; then
8651 missing_language="${expected_language}"
8652 if test "${expected_language}" = "c" \
8653 || test "${expected_language}" = "all"; then
8654 missing_language=
8656 for found_language in ${found_languages} ..
8658 if test "${found_language}" != ..; then
8659 if test "${expected_language}" = "${found_language}"; then
8660 missing_language=
8663 done
8664 if test "x${missing_language}" != x; then
8665 missing_languages="${missing_languages} ${missing_language}"
8668 done
8670 if test "x$missing_languages" != x; then
8671 { echo "configure: error:
8672 The following requested languages were not found:${missing_languages}
8673 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8676 # Make gthr-default.h if we have a thread file.
8677 gthread_flags=
8678 if test $thread_file != single; then
8679 rm -f gthr-default.h
8680 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8681 gthread_flags=-DHAVE_GTHR_DEFAULT
8685 # Find out what GC implementation we want, or may, use.
8686 # Check whether --with-gc or --without-gc was given.
8687 if test "${with_gc+set}" = set; then
8688 withval="$with_gc"
8689 case "$withval" in
8690 simple | page)
8691 GGC=ggc-$withval
8694 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8696 esac
8697 else
8698 GGC=ggc-page
8702 echo "Using $GGC for garbage collection."
8704 # Use the system's zlib library.
8705 zlibdir=-L../zlib
8706 zlibinc="-I\$(srcdir)/../zlib"
8707 # Check whether --with-system-zlib or --without-system-zlib was given.
8708 if test "${with_system_zlib+set}" = set; then
8709 withval="$with_system_zlib"
8710 zlibdir=
8711 zlibinc=
8719 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8720 echo "configure:8721: checking whether to enable maintainer-specific portions of Makefiles" >&5
8721 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8722 if test "${enable_maintainer_mode+set}" = set; then
8723 enableval="$enable_maintainer_mode"
8724 maintainer_mode=$enableval
8725 else
8726 maintainer_mode=no
8730 echo "$ac_t""$maintainer_mode" 1>&6
8732 if test "$maintainer_mode" = "yes"; then
8733 MAINT=''
8734 else
8735 MAINT='#'
8738 # Make empty files to contain the specs and options for each language.
8739 # Then add #include lines to for a compiler that has specs and/or options.
8741 lang_specs_files=
8742 lang_options_files=
8743 lang_tree_files=
8744 for subdir in . $subdirs
8746 if test -f $srcdir/$subdir/lang-specs.h; then
8747 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8749 if test -f $srcdir/$subdir/lang-options.h; then
8750 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8752 if test -f $srcdir/$subdir/$subdir-tree.def; then
8753 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8755 done
8757 # These (without "all_") are set in each config-lang.in.
8758 # `language' must be a single word so is spelled singularly.
8759 all_languages=
8760 all_boot_languages=
8761 all_compilers=
8762 all_stagestuff=
8763 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8764 # List of language makefile fragments.
8765 all_lang_makefiles=
8766 # Files for gengtype
8767 all_gtfiles="$target_gtfiles"
8768 # Files for gengtype with language
8769 all_gtfiles_files_langs=
8770 all_gtfiles_files_files=
8772 # Add the language fragments.
8773 # Languages are added via two mechanisms. Some information must be
8774 # recorded in makefile variables, these are defined in config-lang.in.
8775 # We accumulate them and plug them into the main Makefile.
8776 # The other mechanism is a set of hooks for each of the main targets
8777 # like `clean', `install', etc.
8779 language_fragments="Make-lang"
8780 language_hooks="Make-hooks"
8782 for s in .. $subdirs
8784 if test $s != ".."
8785 then
8786 language=
8787 boot_language=
8788 compilers=
8789 stagestuff=
8790 outputs=
8791 gtfiles=
8792 . ${srcdir}/$s/config-lang.in
8793 if test "x$language" = x
8794 then
8795 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8796 exit 1
8798 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8799 if test -f ${srcdir}/$s/Makefile.in
8800 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8802 all_languages="$all_languages $language"
8803 if test "x$boot_language" = xyes
8804 then
8805 all_boot_languages="$all_boot_languages $language"
8807 all_compilers="$all_compilers $compilers"
8808 all_stagestuff="$all_stagestuff $stagestuff"
8809 all_outputs="$all_outputs $outputs"
8810 all_gtfiles="$all_gtfiles $gtfiles"
8811 for f in .. $gtfiles
8813 if test $f != ".."
8814 then
8815 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8816 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8818 done
8820 done
8822 # Pick up gtfiles for c
8823 gtfiles=
8824 s="c"
8825 . ${srcdir}/c-config-lang.in
8826 all_gtfiles="$all_gtfiles $gtfiles"
8827 for f in .. $gtfiles
8829 if test $f != ".."
8830 then
8831 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8832 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8834 done
8836 check_languages=
8837 for language in .. $all_languages
8839 if test $language != ".."
8840 then
8841 check_languages="$check_languages check-$language"
8843 done
8845 # Since we can't use `::' targets, we link each language in
8846 # with a set of hooks, reached indirectly via lang.${target}.
8848 rm -f Make-hooks
8849 touch Make-hooks
8850 target_list="all.build all.cross start.encap rest.encap \
8851 info dvi generated-manpages \
8852 install-normal install-common install-info install-man \
8853 uninstall \
8854 mostlyclean clean distclean extraclean maintainer-clean \
8855 stage1 stage2 stage3 stage4"
8856 for t in $target_list
8859 for lang in .. $all_languages
8861 if test $lang != ".."; then
8862 x="$x $lang.$t"
8864 done
8865 echo "lang.$t: $x" >> Make-hooks
8866 done
8868 # Create .gdbinit.
8870 echo "dir ." > .gdbinit
8871 echo "dir ${srcdir}" >> .gdbinit
8872 if test x$gdb_needs_out_file_path = xyes
8873 then
8874 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8876 if test "x$subdirs" != x; then
8877 for s in $subdirs
8879 echo "dir ${srcdir}/$s" >> .gdbinit
8880 done
8882 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8884 # Define variables host_canonical and build_canonical
8885 # because some Cygnus local changes in the Makefile depend on them.
8886 build_canonical=${build}
8887 host_canonical=${host}
8888 target_subdir=
8889 if test "${host}" != "${target}" ; then
8890 target_subdir=${target_alias}/
8896 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8897 # absolute path for gcc_tooldir based on inserting the number of up-directory
8898 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8899 # $(libsubdir)/@(unlibsubdir) based path.
8900 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8901 # make and thus we'd get different behavior depending on where we built the
8902 # sources.
8903 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8904 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8905 else
8906 # An explanation of the sed strings:
8907 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8908 # -e 's|/$||' match a trailing forward slash and eliminates it
8909 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8910 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8912 # (*) Note this pattern overwrites the first character of the string
8913 # with a forward slash if one is not already present. This is not a
8914 # problem because the exact names of the sub-directories concerned is
8915 # unimportant, just the number of them matters.
8917 # The practical upshot of these patterns is like this:
8919 # prefix exec_prefix result
8920 # ------ ----------- ------
8921 # /foo /foo/bar ../
8922 # /foo/ /foo/bar ../
8923 # /foo /foo/bar/ ../
8924 # /foo/ /foo/bar/ ../
8925 # /foo /foo/bar/ugg ../../
8927 dollar='$$'
8928 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8933 # Find a directory in which to install a shared libgcc.
8935 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8936 if test "${enable_version_specific_runtime_libs+set}" = set; then
8937 enableval="$enable_version_specific_runtime_libs"
8942 # Check whether --with-slibdir or --without-slibdir was given.
8943 if test "${with_slibdir+set}" = set; then
8944 withval="$with_slibdir"
8945 slibdir="$with_slibdir"
8946 else
8947 if test "${enable_version_specific_runtime_libs+set}" = set; then
8948 slibdir='$(libsubdir)'
8949 elif test "$host" != "$target"; then
8950 slibdir='$(build_tooldir)/lib'
8951 else
8952 slibdir='$(libdir)'
8958 objdir=`${PWDCMD-pwd}`
8961 # Process the language and host/target makefile fragments.
8962 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8964 # Substitute configuration variables
9034 # Echo that links are built
9035 if test x$host = x$target
9036 then
9037 str1="native "
9038 else
9039 str1="cross-"
9040 str2=" from $host"
9043 if test x$host != x$build
9044 then
9045 str3=" on a $build system"
9048 if test "x$str2" != x || test "x$str3" != x
9049 then
9050 str4=
9053 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9055 if test "x$str2" != x || test "x$str3" != x
9056 then
9057 echo " ${str2}${str3}." 1>&2
9060 # Truncate the target if necessary
9061 if test x$host_truncate_target != x; then
9062 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9065 # Configure the subdirectories
9066 # AC_CONFIG_SUBDIRS($subdirs)
9068 # Create the Makefile
9069 # and configure language subdirectories
9070 trap '' 1 2 15
9071 cat > confcache <<\EOF
9072 # This file is a shell script that caches the results of configure
9073 # tests run on this system so they can be shared between configure
9074 # scripts and configure runs. It is not useful on other systems.
9075 # If it contains results you don't want to keep, you may remove or edit it.
9077 # By default, configure uses ./config.cache as the cache file,
9078 # creating it if it does not exist already. You can give configure
9079 # the --cache-file=FILE option to use a different cache file; that is
9080 # what configure does when it calls configure scripts in
9081 # subdirectories, so they share the cache.
9082 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9083 # config.status only pays attention to the cache file if you give it the
9084 # --recheck option to rerun configure.
9087 # The following way of writing the cache mishandles newlines in values,
9088 # but we know of no workaround that is simple, portable, and efficient.
9089 # So, don't put newlines in cache variables' values.
9090 # Ultrix sh set writes to stderr and can't be redirected directly,
9091 # and sets the high bit in the cache file unless we assign to the vars.
9092 (set) 2>&1 |
9093 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9094 *ac_space=\ *)
9095 # `set' does not quote correctly, so add quotes (double-quote substitution
9096 # turns \\\\ into \\, and sed turns \\ into \).
9097 sed -n \
9098 -e "s/'/'\\\\''/g" \
9099 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9102 # `set' quotes correctly as required by POSIX, so do not add quotes.
9103 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9105 esac >> confcache
9106 if cmp -s $cache_file confcache; then
9108 else
9109 if test -w $cache_file; then
9110 echo "updating cache $cache_file"
9111 cat confcache > $cache_file
9112 else
9113 echo "not updating unwritable cache $cache_file"
9116 rm -f confcache
9118 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9120 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9121 # Let make expand exec_prefix.
9122 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9124 # Any assignment to VPATH causes Sun make to only execute
9125 # the first set of double-colon rules, so remove it if not needed.
9126 # If there is a colon in the path, we need to keep it.
9127 if test "x$srcdir" = x.; then
9128 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9131 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9133 DEFS=-DHAVE_CONFIG_H
9135 # Without the "./", some shells look in PATH for config.status.
9136 : ${CONFIG_STATUS=./config.status}
9138 echo creating $CONFIG_STATUS
9139 rm -f $CONFIG_STATUS
9140 cat > $CONFIG_STATUS <<EOF
9141 #! /bin/sh
9142 # Generated automatically by configure.
9143 # Run this file to recreate the current configuration.
9144 # This directory was configured as follows,
9145 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9147 # $0 $ac_configure_args
9149 # Compiler output produced by configure, useful for debugging
9150 # configure, is in ./config.log if it exists.
9152 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9153 for ac_option
9155 case "\$ac_option" in
9156 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9157 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9158 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9159 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9160 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9161 exit 0 ;;
9162 -help | --help | --hel | --he | --h)
9163 echo "\$ac_cs_usage"; exit 0 ;;
9164 *) echo "\$ac_cs_usage"; exit 1 ;;
9165 esac
9166 done
9168 ac_given_srcdir=$srcdir
9170 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9172 cat >> $CONFIG_STATUS <<EOF
9174 # Protect against being on the right side of a sed subst in config.status.
9175 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9176 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9177 $ac_vpsub
9178 $extrasub
9179 s%@SHELL@%$SHELL%g
9180 s%@CFLAGS@%$CFLAGS%g
9181 s%@CPPFLAGS@%$CPPFLAGS%g
9182 s%@CXXFLAGS@%$CXXFLAGS%g
9183 s%@FFLAGS@%$FFLAGS%g
9184 s%@DEFS@%$DEFS%g
9185 s%@LDFLAGS@%$LDFLAGS%g
9186 s%@LIBS@%$LIBS%g
9187 s%@exec_prefix@%$exec_prefix%g
9188 s%@prefix@%$prefix%g
9189 s%@program_transform_name@%$program_transform_name%g
9190 s%@bindir@%$bindir%g
9191 s%@sbindir@%$sbindir%g
9192 s%@libexecdir@%$libexecdir%g
9193 s%@datadir@%$datadir%g
9194 s%@sysconfdir@%$sysconfdir%g
9195 s%@sharedstatedir@%$sharedstatedir%g
9196 s%@localstatedir@%$localstatedir%g
9197 s%@libdir@%$libdir%g
9198 s%@includedir@%$includedir%g
9199 s%@oldincludedir@%$oldincludedir%g
9200 s%@infodir@%$infodir%g
9201 s%@mandir@%$mandir%g
9202 s%@host@%$host%g
9203 s%@host_alias@%$host_alias%g
9204 s%@host_cpu@%$host_cpu%g
9205 s%@host_vendor@%$host_vendor%g
9206 s%@host_os@%$host_os%g
9207 s%@target@%$target%g
9208 s%@target_alias@%$target_alias%g
9209 s%@target_cpu@%$target_cpu%g
9210 s%@target_vendor@%$target_vendor%g
9211 s%@target_os@%$target_os%g
9212 s%@build@%$build%g
9213 s%@build_alias@%$build_alias%g
9214 s%@build_cpu@%$build_cpu%g
9215 s%@build_vendor@%$build_vendor%g
9216 s%@build_os@%$build_os%g
9217 s%@CC@%$CC%g
9218 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9219 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9220 s%@GNATBIND@%$GNATBIND%g
9221 s%@ADAC@%$ADAC%g
9222 s%@strict1_warn@%$strict1_warn%g
9223 s%@CPP@%$CPP%g
9224 s%@warn_cflags@%$warn_cflags%g
9225 s%@enable_multilib@%$enable_multilib%g
9226 s%@WERROR@%$WERROR%g
9227 s%@nocommon_flag@%$nocommon_flag%g
9228 s%@valgrind_path@%$valgrind_path%g
9229 s%@valgrind_path_defines@%$valgrind_path_defines%g
9230 s%@valgrind_command@%$valgrind_command%g
9231 s%@coverage_flags@%$coverage_flags%g
9232 s%@enable_shared@%$enable_shared%g
9233 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9234 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9235 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9236 s%@stage1_cflags@%$stage1_cflags%g
9237 s%@SET_MAKE@%$SET_MAKE%g
9238 s%@AWK@%$AWK%g
9239 s%@LN@%$LN%g
9240 s%@LN_S@%$LN_S%g
9241 s%@RANLIB@%$RANLIB%g
9242 s%@INSTALL@%$INSTALL%g
9243 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9244 s%@INSTALL_DATA@%$INSTALL_DATA%g
9245 s%@have_mktemp_command@%$have_mktemp_command%g
9246 s%@MAKEINFO@%$MAKEINFO%g
9247 s%@BUILD_INFO@%$BUILD_INFO%g
9248 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9249 s%@FLEX@%$FLEX%g
9250 s%@BISON@%$BISON%g
9251 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9252 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9253 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9254 s%@LIBICONV@%$LIBICONV%g
9255 s%@manext@%$manext%g
9256 s%@objext@%$objext%g
9257 s%@extra_modes_file@%$extra_modes_file%g
9258 s%@FORBUILD@%$FORBUILD%g
9259 s%@PACKAGE@%$PACKAGE%g
9260 s%@VERSION@%$VERSION%g
9261 s%@ALLOCA@%$ALLOCA%g
9262 s%@GLIBC21@%$GLIBC21%g
9263 s%@USE_NLS@%$USE_NLS%g
9264 s%@MSGFMT@%$MSGFMT%g
9265 s%@GMSGFMT@%$GMSGFMT%g
9266 s%@XGETTEXT@%$XGETTEXT%g
9267 s%@INTLBISON@%$INTLBISON%g
9268 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9269 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9270 s%@CATALOGS@%$CATALOGS%g
9271 s%@CATOBJEXT@%$CATOBJEXT%g
9272 s%@INTLLIBS@%$INTLLIBS%g
9273 s%@INTLDEPS@%$INTLDEPS%g
9274 s%@INTLOBJS@%$INTLOBJS%g
9275 s%@POSUB@%$POSUB%g
9276 s%@DATADIRNAME@%$DATADIRNAME%g
9277 s%@INSTOBJEXT@%$INSTOBJEXT%g
9278 s%@GENCAT@%$GENCAT%g
9279 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9280 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9281 s%@CROSS@%$CROSS%g
9282 s%@ALL@%$ALL%g
9283 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9284 s%@inhibit_libc@%$inhibit_libc%g
9285 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9286 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9287 s%@BUILD_CC@%$BUILD_CC%g
9288 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9289 s%@STMP_FIXINC@%$STMP_FIXINC%g
9290 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9291 s%@libgcc_visibility@%$libgcc_visibility%g
9292 s%@gthread_flags@%$gthread_flags%g
9293 s%@GGC@%$GGC%g
9294 s%@zlibdir@%$zlibdir%g
9295 s%@zlibinc@%$zlibinc%g
9296 s%@MAINT@%$MAINT%g
9297 s%@build_canonical@%$build_canonical%g
9298 s%@host_canonical@%$host_canonical%g
9299 s%@target_subdir@%$target_subdir%g
9300 s%@gcc_tooldir@%$gcc_tooldir%g
9301 s%@dollar@%$dollar%g
9302 s%@slibdir@%$slibdir%g
9303 s%@objdir@%$objdir%g
9304 s%@subdirs@%$subdirs%g
9305 s%@srcdir@%$srcdir%g
9306 s%@all_boot_languages@%$all_boot_languages%g
9307 s%@all_compilers@%$all_compilers%g
9308 s%@all_gtfiles@%$all_gtfiles%g
9309 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9310 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9311 s%@all_lang_makefiles@%$all_lang_makefiles%g
9312 s%@all_languages@%$all_languages%g
9313 s%@all_stagestuff@%$all_stagestuff%g
9314 s%@build_exeext@%$build_exeext%g
9315 s%@build_install_headers_dir@%$build_install_headers_dir%g
9316 s%@build_xm_file_list@%$build_xm_file_list%g
9317 s%@build_xm_file@%$build_xm_file%g
9318 s%@build_xm_defines@%$build_xm_defines%g
9319 s%@check_languages@%$check_languages%g
9320 s%@cc_set_by_configure@%$cc_set_by_configure%g
9321 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9322 s%@cpp_install_dir@%$cpp_install_dir%g
9323 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9324 s%@dep_tmake_file@%$dep_tmake_file%g
9325 s%@extra_headers_list@%$extra_headers_list%g
9326 s%@extra_objs@%$extra_objs%g
9327 s%@extra_parts@%$extra_parts%g
9328 s%@extra_passes@%$extra_passes%g
9329 s%@extra_programs@%$extra_programs%g
9330 s%@float_h_file@%$float_h_file%g
9331 s%@gcc_config_arguments@%$gcc_config_arguments%g
9332 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9333 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9334 s%@gcc_version@%$gcc_version%g
9335 s%@gcc_version_full@%$gcc_version_full%g
9336 s%@gcc_version_trigger@%$gcc_version_trigger%g
9337 s%@host_exeext@%$host_exeext%g
9338 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9339 s%@host_xm_file_list@%$host_xm_file_list%g
9340 s%@host_xm_file@%$host_xm_file%g
9341 s%@host_xm_defines@%$host_xm_defines%g
9342 s%@out_host_hook_obj@%$out_host_hook_obj%g
9343 s%@install@%$install%g
9344 s%@lang_options_files@%$lang_options_files%g
9345 s%@lang_specs_files@%$lang_specs_files%g
9346 s%@lang_tree_files@%$lang_tree_files%g
9347 s%@local_prefix@%$local_prefix%g
9348 s%@md_file@%$md_file%g
9349 s%@objc_boehm_gc@%$objc_boehm_gc%g
9350 s%@out_file@%$out_file%g
9351 s%@out_object_file@%$out_object_file%g
9352 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9353 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9354 s%@symbolic_link@%$symbolic_link%g
9355 s%@thread_file@%$thread_file%g
9356 s%@tm_file_list@%$tm_file_list%g
9357 s%@tm_file@%$tm_file%g
9358 s%@tm_defines@%$tm_defines%g
9359 s%@tm_p_file_list@%$tm_p_file_list%g
9360 s%@tm_p_file@%$tm_p_file%g
9361 s%@xm_file@%$xm_file%g
9362 s%@xm_defines@%$xm_defines%g
9363 s%@c_target_objs@%$c_target_objs%g
9364 s%@cxx_target_objs@%$cxx_target_objs%g
9365 s%@target_cpu_default@%$target_cpu_default%g
9366 /@target_overrides@/r $target_overrides
9367 s%@target_overrides@%%g
9368 /@host_overrides@/r $host_overrides
9369 s%@host_overrides@%%g
9370 /@language_fragments@/r $language_fragments
9371 s%@language_fragments@%%g
9372 /@language_hooks@/r $language_hooks
9373 s%@language_hooks@%%g
9375 CEOF
9378 cat >> $CONFIG_STATUS <<\EOF
9380 # Split the substitutions into bite-sized pieces for seds with
9381 # small command number limits, like on Digital OSF/1 and HP-UX.
9382 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9383 ac_file=1 # Number of current file.
9384 ac_beg=1 # First line for current file.
9385 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9386 ac_more_lines=:
9387 ac_sed_cmds=""
9388 while $ac_more_lines; do
9389 if test $ac_beg -gt 1; then
9390 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9391 else
9392 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9394 if test ! -s conftest.s$ac_file; then
9395 ac_more_lines=false
9396 rm -f conftest.s$ac_file
9397 else
9398 if test -z "$ac_sed_cmds"; then
9399 ac_sed_cmds="sed -f conftest.s$ac_file"
9400 else
9401 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9403 ac_file=`expr $ac_file + 1`
9404 ac_beg=$ac_end
9405 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9407 done
9408 if test -z "$ac_sed_cmds"; then
9409 ac_sed_cmds=cat
9413 cat >> $CONFIG_STATUS <<EOF
9415 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9417 cat >> $CONFIG_STATUS <<\EOF
9418 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9419 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9420 case "$ac_file" in
9421 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9422 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9423 *) ac_file_in="${ac_file}.in" ;;
9424 esac
9426 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9428 # Remove last slash and all that follows it. Not all systems have dirname.
9429 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9430 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9431 # The file is in a subdirectory.
9432 test ! -d "$ac_dir" && mkdir "$ac_dir"
9433 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9434 # A "../" for each directory in $ac_dir_suffix.
9435 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9436 else
9437 ac_dir_suffix= ac_dots=
9440 case "$ac_given_srcdir" in
9441 .) srcdir=.
9442 if test -z "$ac_dots"; then top_srcdir=.
9443 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9444 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9445 *) # Relative path.
9446 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9447 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9448 esac
9451 echo creating "$ac_file"
9452 rm -f "$ac_file"
9453 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9454 case "$ac_file" in
9455 *Makefile*) ac_comsub="1i\\
9456 # $configure_input" ;;
9457 *) ac_comsub= ;;
9458 esac
9460 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9461 sed -e "$ac_comsub
9462 s%@configure_input@%$configure_input%g
9463 s%@srcdir@%$srcdir%g
9464 s%@top_srcdir@%$top_srcdir%g
9465 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9466 fi; done
9467 rm -f conftest.s*
9469 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9470 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9472 # ac_d sets the value in "#define NAME VALUE" lines.
9473 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9474 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9475 ac_dC='\3'
9476 ac_dD='%g'
9477 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9478 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9479 ac_uB='\([ ]\)%\1#\2define\3'
9480 ac_uC=' '
9481 ac_uD='\4%g'
9482 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9483 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9484 ac_eB='$%\1#\2define\3'
9485 ac_eC=' '
9486 ac_eD='%g'
9488 if test "${CONFIG_HEADERS+set}" != set; then
9490 cat >> $CONFIG_STATUS <<EOF
9491 CONFIG_HEADERS="auto-host.h:config.in"
9493 cat >> $CONFIG_STATUS <<\EOF
9495 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9496 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9497 case "$ac_file" in
9498 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9499 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9500 *) ac_file_in="${ac_file}.in" ;;
9501 esac
9503 echo creating $ac_file
9505 rm -f conftest.frag conftest.in conftest.out
9506 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9507 cat $ac_file_inputs > conftest.in
9511 # Transform confdefs.h into a sed script conftest.vals that substitutes
9512 # the proper values into config.h.in to produce config.h. And first:
9513 # Protect against being on the right side of a sed subst in config.status.
9514 # Protect against being in an unquoted here document in config.status.
9515 rm -f conftest.vals
9516 cat > conftest.hdr <<\EOF
9517 s/[\\&%]/\\&/g
9518 s%[\\$`]%\\&%g
9519 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9520 s%ac_d%ac_u%gp
9521 s%ac_u%ac_e%gp
9523 sed -n -f conftest.hdr confdefs.h > conftest.vals
9524 rm -f conftest.hdr
9526 # This sed command replaces #undef with comments. This is necessary, for
9527 # example, in the case of _POSIX_SOURCE, which is predefined and required
9528 # on some systems where configure will not decide to define it.
9529 cat >> conftest.vals <<\EOF
9530 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9533 # Break up conftest.vals because some shells have a limit on
9534 # the size of here documents, and old seds have small limits too.
9536 rm -f conftest.tail
9537 while :
9539 ac_lines=`grep -c . conftest.vals`
9540 # grep -c gives empty output for an empty file on some AIX systems.
9541 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9542 # Write a limited-size here document to conftest.frag.
9543 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9544 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9545 echo 'CEOF
9546 sed -f conftest.frag conftest.in > conftest.out
9547 rm -f conftest.in
9548 mv conftest.out conftest.in
9549 ' >> $CONFIG_STATUS
9550 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9551 rm -f conftest.vals
9552 mv conftest.tail conftest.vals
9553 done
9554 rm -f conftest.vals
9556 cat >> $CONFIG_STATUS <<\EOF
9557 rm -f conftest.frag conftest.h
9558 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9559 cat conftest.in >> conftest.h
9560 rm -f conftest.in
9561 if cmp -s $ac_file conftest.h 2>/dev/null; then
9562 echo "$ac_file is unchanged"
9563 rm -f conftest.h
9564 else
9565 # Remove last slash and all that follows it. Not all systems have dirname.
9566 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9567 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9568 # The file is in a subdirectory.
9569 test ! -d "$ac_dir" && mkdir "$ac_dir"
9571 rm -f $ac_file
9572 mv conftest.h $ac_file
9574 fi; done
9577 cat >> $CONFIG_STATUS <<EOF
9579 subdirs='$subdirs'
9580 symbolic_link='$symbolic_link'
9583 cat >> $CONFIG_STATUS <<\EOF
9584 for ac_file in $CONFIG_FILES; do
9585 # Support "outfile[:infile[:infile...]]"
9586 case "$ac_file" in
9587 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9588 esac
9589 # PO directories have a Makefile.in generated from Makefile.in.in.
9590 case "$ac_file" in */Makefile.in)
9591 # Adjust a relative srcdir.
9592 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9593 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9594 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9595 # In autoconf-2.13 it is called $ac_given_srcdir.
9596 # In autoconf-2.50 it is called $srcdir.
9597 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9598 case "$ac_given_srcdir" in
9599 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9600 /*) top_srcdir="$ac_given_srcdir" ;;
9601 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9602 esac
9603 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9604 rm -f "$ac_dir/POTFILES"
9605 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9606 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9607 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9608 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9611 esac
9612 done
9614 case x$CONFIG_HEADERS in
9615 xauto-host.h:config.in)
9616 echo > cstamp-h ;;
9617 esac
9618 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9619 # bootstrapping and the installation procedure can still use
9620 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9621 # FLAGS_TO_PASS has been modified to solve the problem there.
9622 # This is virtually a duplicate of what happens in configure.lang; we do
9623 # an extra check to make sure this only happens if ln -s can be used.
9624 if test "$symbolic_link" = "ln -s"; then
9625 for d in .. ${subdirs} fixinc ; do
9626 if test $d != ..; then
9627 STARTDIR=`${PWDCMD-pwd}`
9628 cd $d
9629 for t in stage1 stage2 stage3 stage4 include
9631 rm -f $t
9632 $symbolic_link ../$t $t 2>/dev/null
9633 done
9634 cd $STARTDIR
9636 done
9637 else true ; fi
9638 # Avoid having to add intl to our include paths.
9639 if test -f intl/libintl.h; then
9640 echo creating libintl.h
9641 echo '#include "intl/libintl.h"' >libintl.h
9644 exit 0
9646 chmod +x $CONFIG_STATUS
9647 rm -fr confdefs* $ac_clean_files
9648 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1