* fpa.md: New file. Move all patterns relating to FPA co-processor
[official-gcc.git] / gcc / configure
blob6c9ffe2598c1dacc9fab368cd040a6c0402214f3
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-local-prefix=DIR specifies directory to put local include"
16 ac_help="$ac_help
17 --with-gxx-include-dir=DIR
18 specifies directory to put g++ header files"
19 ac_help="$ac_help
20 --with-cpp-install-dir=DIR
21 install the user visible C preprocessor in DIR
22 (relative to PREFIX) as well as PREFIX/bin"
23 ac_help="$ac_help
24 --with-gnu-ld arrange to work with GNU ld."
25 ac_help="$ac_help
26 --with-ld arrange to use the specified ld (full pathname)"
27 ac_help="$ac_help
28 --with-gnu-as arrange to work with GNU as"
29 ac_help="$ac_help
30 --with-as arrange to use the specified as (full pathname)"
31 ac_help="$ac_help
32 --enable-werror enable -Werror in bootstrap stage2 and later"
33 ac_help="$ac_help
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,rtlflag,gc,gcac;
38 default is misc,tree,gc,rtlflag"
39 ac_help="$ac_help
40 --enable-coverage[=LEVEL]
41 enable compiler\'s code coverage collection.
42 Use to measure compiler performance and locate
43 unused parts of the compiler. With LEVEL, specify
44 optimization. Values are opt, noopt,
45 default is noopt"
46 ac_help="$ac_help
47 --with-stabs arrange to use stabs instead of host debug format"
48 ac_help="$ac_help
49 --with-elf arrange to use ELF instead of host debug format"
50 ac_help="$ac_help
51 --enable-multilib enable library support for multiple ABIs"
52 ac_help="$ac_help
53 --enable-__cxa_atexit enable __cxa_atexit for C++"
54 ac_help="$ac_help
55 --enable-c-mbchar enable multibyte characters for C and C++"
56 ac_help="$ac_help
57 --enable-threads enable thread usage for target GCC
58 --enable-threads=LIB use LIB thread package for target GCC"
59 ac_help="$ac_help
60 --enable-objc-gc enable the use of Boehm's garbage collector with
61 the GNU Objective-C runtime"
62 ac_help="$ac_help
63 --with-dwarf2 force the default debug format to be DWARF 2"
64 ac_help="$ac_help
65 --disable-shared don't provide a shared libgcc"
66 ac_help="$ac_help
67 --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
68 ac_help="$ac_help
69 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
70 ac_help="$ac_help
71 --enable-initfini-array use .init_array/.fini_array sections"
72 ac_help="$ac_help
73 --enable-sjlj-exceptions
74 arrange to use setjmp/longjmp exception handling"
75 ac_help="$ac_help
76 --enable-libunwind-exceptions force use libunwind for exceptions"
77 ac_help="$ac_help
78 --enable-nls use Native Language Support (default)"
79 ac_help="$ac_help
80 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
81 ac_help="$ac_help
82 --disable-nls do not use Native Language Support"
83 ac_help="$ac_help
84 --with-included-gettext use the GNU gettext library included here"
85 ac_help="$ac_help
86 --disable-win32-registry
87 disable lookup of installation paths in the
88 Registry on Windows hosts
89 --enable-win32-registry enable registry lookup (default)
90 --enable-win32-registry=KEY
91 use KEY instead of GCC version as the last portion
92 of the registry key"
93 ac_help="$ac_help
94 --with-gc={simple,page} choose the garbage collection mechanism to use
95 with the compiler"
96 ac_help="$ac_help
97 --with-system-zlib use installed libz"
98 ac_help="$ac_help
99 --enable-maintainer-mode
100 enable make rules and dependencies not useful
101 (and sometimes confusing) to the casual installer"
102 ac_help="$ac_help
103 --enable-version-specific-runtime-libs
104 specify that runtime libraries should be
105 installed in a compiler-specific directory"
106 ac_help="$ac_help
107 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
109 # Initialize some variables set by options.
110 # The variables have the same names as the options, with
111 # dashes changed to underlines.
112 build=NONE
113 cache_file=./config.cache
114 exec_prefix=NONE
115 host=NONE
116 no_create=
117 nonopt=NONE
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 target=NONE
127 verbose=
128 x_includes=NONE
129 x_libraries=NONE
130 bindir='${exec_prefix}/bin'
131 sbindir='${exec_prefix}/sbin'
132 libexecdir='${exec_prefix}/libexec'
133 datadir='${prefix}/share'
134 sysconfdir='${prefix}/etc'
135 sharedstatedir='${prefix}/com'
136 localstatedir='${prefix}/var'
137 libdir='${exec_prefix}/lib'
138 includedir='${prefix}/include'
139 oldincludedir='/usr/include'
140 infodir='${prefix}/info'
141 mandir='${prefix}/man'
143 # Initialize some other variables.
144 subdirs=
145 MFLAGS= MAKEFLAGS=
146 SHELL=${CONFIG_SHELL-/bin/sh}
147 # Maximum number of lines to put in a shell here document.
148 ac_max_here_lines=12
150 ac_prev=
151 for ac_option
154 # If the previous option needs an argument, assign it.
155 if test -n "$ac_prev"; then
156 eval "$ac_prev=\$ac_option"
157 ac_prev=
158 continue
161 case "$ac_option" in
162 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
163 *) ac_optarg= ;;
164 esac
166 # Accept the important Cygnus configure options, so we can diagnose typos.
168 case "$ac_option" in
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
171 ac_prev=bindir ;;
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173 bindir="$ac_optarg" ;;
175 -build | --build | --buil | --bui | --bu)
176 ac_prev=build ;;
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build="$ac_optarg" ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file="$ac_optarg" ;;
187 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
188 ac_prev=datadir ;;
189 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
190 | --da=*)
191 datadir="$ac_optarg" ;;
193 -disable-* | --disable-*)
194 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
195 # Reject names that are not valid shell variable names.
196 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
197 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
199 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200 eval "enable_${ac_feature}=no" ;;
202 -enable-* | --enable-*)
203 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
204 # Reject names that are not valid shell variable names.
205 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
206 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
208 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
209 case "$ac_option" in
210 *=*) ;;
211 *) ac_optarg=yes ;;
212 esac
213 eval "enable_${ac_feature}='$ac_optarg'" ;;
215 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
216 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
217 | --exec | --exe | --ex)
218 ac_prev=exec_prefix ;;
219 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
220 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
221 | --exec=* | --exe=* | --ex=*)
222 exec_prefix="$ac_optarg" ;;
224 -gas | --gas | --ga | --g)
225 # Obsolete; use --with-gas.
226 with_gas=yes ;;
228 -help | --help | --hel | --he)
229 # Omit some internal or obsolete options to make the list less imposing.
230 # This message is too long to be a string in the A/UX 3.1 sh.
231 cat << EOF
232 Usage: configure [options] [host]
233 Options: [defaults in brackets after descriptions]
234 Configuration:
235 --cache-file=FILE cache test results in FILE
236 --help print this message
237 --no-create do not create output files
238 --quiet, --silent do not print \`checking...' messages
239 --version print the version of autoconf that created configure
240 Directory and file names:
241 --prefix=PREFIX install architecture-independent files in PREFIX
242 [$ac_default_prefix]
243 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
244 [same as prefix]
245 --bindir=DIR user executables in DIR [EPREFIX/bin]
246 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
247 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
248 --datadir=DIR read-only architecture-independent data in DIR
249 [PREFIX/share]
250 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
251 --sharedstatedir=DIR modifiable architecture-independent data in DIR
252 [PREFIX/com]
253 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
254 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
255 --includedir=DIR C header files in DIR [PREFIX/include]
256 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
257 --infodir=DIR info documentation in DIR [PREFIX/info]
258 --mandir=DIR man documentation in DIR [PREFIX/man]
259 --srcdir=DIR find the sources in DIR [configure dir or ..]
260 --program-prefix=PREFIX prepend PREFIX to installed program names
261 --program-suffix=SUFFIX append SUFFIX to installed program names
262 --program-transform-name=PROGRAM
263 run sed PROGRAM on installed program names
265 cat << EOF
266 Host type:
267 --build=BUILD configure for building on BUILD [BUILD=HOST]
268 --host=HOST configure for HOST [guessed]
269 --target=TARGET configure for TARGET [TARGET=HOST]
270 Features and packages:
271 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
272 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
273 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
274 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
275 --x-includes=DIR X include files are in DIR
276 --x-libraries=DIR X library files are in DIR
278 if test -n "$ac_help"; then
279 echo "--enable and --with options recognized:$ac_help"
281 exit 0 ;;
283 -host | --host | --hos | --ho)
284 ac_prev=host ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host="$ac_optarg" ;;
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir="$ac_optarg" ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
296 ac_prev=infodir ;;
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir="$ac_optarg" ;;
300 -libdir | --libdir | --libdi | --libd)
301 ac_prev=libdir ;;
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir="$ac_optarg" ;;
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir="$ac_optarg" ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir="$ac_optarg" ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322 ac_prev=mandir ;;
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir="$ac_optarg" ;;
326 -nfp | --nfp | --nf)
327 # Obsolete; use --without-fp.
328 with_fp=no ;;
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331 | --no-cr | --no-c)
332 no_create=yes ;;
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336 no_recursion=yes ;;
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir="$ac_optarg" ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348 ac_prev=prefix ;;
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix="$ac_optarg" ;;
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix="$ac_optarg" ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix="$ac_optarg" ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name="$ac_optarg" ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
385 silent=yes ;;
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388 ac_prev=sbindir ;;
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390 | --sbi=* | --sb=*)
391 sbindir="$ac_optarg" ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
396 | --sha | --sh)
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401 | --sha=* | --sh=*)
402 sharedstatedir="$ac_optarg" ;;
404 -site | --site | --sit)
405 ac_prev=site ;;
406 -site=* | --site=* | --sit=*)
407 site="$ac_optarg" ;;
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410 ac_prev=srcdir ;;
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir="$ac_optarg" ;;
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir="$ac_optarg" ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
422 ac_prev=target ;;
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target="$ac_optarg" ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
427 verbose=yes ;;
429 -version | --version | --versio | --versi | --vers)
430 echo "configure generated by autoconf version 2.13"
431 exit 0 ;;
433 -with-* | --with-*)
434 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
435 # Reject names that are not valid shell variable names.
436 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
437 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439 ac_package=`echo $ac_package| sed 's/-/_/g'`
440 case "$ac_option" in
441 *=*) ;;
442 *) ac_optarg=yes ;;
443 esac
444 eval "with_${ac_package}='$ac_optarg'" ;;
446 -without-* | --without-*)
447 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
448 # Reject names that are not valid shell variable names.
449 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
450 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452 ac_package=`echo $ac_package| sed 's/-/_/g'`
453 eval "with_${ac_package}=no" ;;
455 --x)
456 # Obsolete; use --with-x.
457 with_x=yes ;;
459 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
460 | --x-incl | --x-inc | --x-in | --x-i)
461 ac_prev=x_includes ;;
462 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
463 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
464 x_includes="$ac_optarg" ;;
466 -x-libraries | --x-libraries | --x-librarie | --x-librari \
467 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
468 ac_prev=x_libraries ;;
469 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
470 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
471 x_libraries="$ac_optarg" ;;
473 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
477 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
478 echo "configure: warning: $ac_option: invalid host type" 1>&2
480 if test "x$nonopt" != xNONE; then
481 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
483 nonopt="$ac_option"
486 esac
487 done
489 if test -n "$ac_prev"; then
490 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
493 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495 # File descriptor usage:
496 # 0 standard input
497 # 1 file creation
498 # 2 errors and warnings
499 # 3 some systems may open it to /dev/tty
500 # 4 used on the Kubota Titan
501 # 6 checking for... messages and results
502 # 5 compiler messages saved in config.log
503 if test "$silent" = yes; then
504 exec 6>/dev/null
505 else
506 exec 6>&1
508 exec 5>./config.log
510 echo "\
511 This file contains any messages produced by compilers while
512 running configure, to aid debugging if configure makes a mistake.
513 " 1>&5
515 # Strip out --no-create and --no-recursion so they do not pile up.
516 # Also quote any args containing shell metacharacters.
517 ac_configure_args=
518 for ac_arg
520 case "$ac_arg" in
521 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
522 | --no-cr | --no-c) ;;
523 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
524 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
525 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
526 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
527 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
528 esac
529 done
531 # NLS nuisances.
532 # Only set these to C if already set. These must not be set unconditionally
533 # because not all systems understand e.g. LANG=C (notably SCO).
534 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
535 # Non-C LC_CTYPE values break the ctype check.
536 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
537 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
538 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
539 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
541 # confdefs.h avoids OS command line length limits that DEFS can exceed.
542 rm -rf conftest* confdefs.h
543 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
544 echo > confdefs.h
546 # A filename unique to this package, relative to the directory that
547 # configure is in, which we can look for to find out if srcdir is correct.
548 ac_unique_file=tree.c
550 # Find the source files, if location was not specified.
551 if test -z "$srcdir"; then
552 ac_srcdir_defaulted=yes
553 # Try the directory containing this script, then its parent.
554 ac_prog=$0
555 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
556 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
557 srcdir=$ac_confdir
558 if test ! -r $srcdir/$ac_unique_file; then
559 srcdir=..
561 else
562 ac_srcdir_defaulted=no
564 if test ! -r $srcdir/$ac_unique_file; then
565 if test "$ac_srcdir_defaulted" = yes; then
566 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
567 else
568 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
571 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573 # Prefer explicitly selected file to automatically selected ones.
574 if test -z "$CONFIG_SITE"; then
575 if test "x$prefix" != xNONE; then
576 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
577 else
578 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
581 for ac_site_file in $CONFIG_SITE; do
582 if test -r "$ac_site_file"; then
583 echo "loading site script $ac_site_file"
584 . "$ac_site_file"
586 done
588 if test -r "$cache_file"; then
589 echo "loading cache $cache_file"
590 . $cache_file
591 else
592 echo "creating cache $cache_file"
593 > $cache_file
596 ac_ext=c
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
603 ac_exeext=
604 ac_objext=o
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
608 ac_n= ac_c='
609 ' ac_t=' '
610 else
611 ac_n=-n ac_c= ac_t=
613 else
614 ac_n= ac_c='\c' ac_t=
620 # Determine the host, build, and target systems
621 ac_aux_dir=
622 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
623 if test -f $ac_dir/install-sh; then
624 ac_aux_dir=$ac_dir
625 ac_install_sh="$ac_aux_dir/install-sh -c"
626 break
627 elif test -f $ac_dir/install.sh; then
628 ac_aux_dir=$ac_dir
629 ac_install_sh="$ac_aux_dir/install.sh -c"
630 break
632 done
633 if test -z "$ac_aux_dir"; then
634 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
636 ac_config_guess=$ac_aux_dir/config.guess
637 ac_config_sub=$ac_aux_dir/config.sub
638 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641 # Do some error checking and defaulting for the host and target type.
642 # The inputs are:
643 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
645 # The rules are:
646 # 1. You are not allowed to specify --host, --target, and nonopt at the
647 # same time.
648 # 2. Host defaults to nonopt.
649 # 3. If nonopt is not specified, then host defaults to the current host,
650 # as determined by config.guess.
651 # 4. Target and build default to nonopt.
652 # 5. If nonopt is not specified, then target and build default to host.
654 # The aliases save the names the user supplied, while $host etc.
655 # will get canonicalized.
656 case $host---$target---$nonopt in
657 NONE---*---* | *---NONE---* | *---*---NONE) ;;
658 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
659 esac
662 # Make sure we can run config.sub.
663 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
664 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
667 echo $ac_n "checking host system type""... $ac_c" 1>&6
668 echo "configure:669: checking host system type" >&5
670 host_alias=$host
671 case "$host_alias" in
672 NONE)
673 case $nonopt in
674 NONE)
675 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
676 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
677 fi ;;
678 *) host_alias=$nonopt ;;
679 esac ;;
680 esac
682 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
683 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
684 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
685 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
686 echo "$ac_t""$host" 1>&6
688 echo $ac_n "checking target system type""... $ac_c" 1>&6
689 echo "configure:690: checking target system type" >&5
691 target_alias=$target
692 case "$target_alias" in
693 NONE)
694 case $nonopt in
695 NONE) target_alias=$host_alias ;;
696 *) target_alias=$nonopt ;;
697 esac ;;
698 esac
700 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
701 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704 echo "$ac_t""$target" 1>&6
706 echo $ac_n "checking build system type""... $ac_c" 1>&6
707 echo "configure:708: checking build system type" >&5
709 build_alias=$build
710 case "$build_alias" in
711 NONE)
712 case $nonopt in
713 NONE) build_alias=$host_alias ;;
714 *) build_alias=$nonopt ;;
715 esac ;;
716 esac
718 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
719 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 echo "$ac_t""$build" 1>&6
724 test "$host_alias" != "$target_alias" &&
725 test "$program_prefix$program_suffix$program_transform_name" = \
726 NONENONEs,x,x, &&
727 program_prefix=${target_alias}-
730 # Set program_transform_name
731 if test "$program_transform_name" = s,x,x,; then
732 program_transform_name=
733 else
734 # Double any \ or $. echo might interpret backslashes.
735 cat <<\EOF_SED > conftestsed
736 s,\\,\\\\,g; s,\$,$$,g
737 EOF_SED
738 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
739 rm -f conftestsed
741 test "$program_prefix" != NONE &&
742 program_transform_name="s,^,${program_prefix},; $program_transform_name"
743 # Use a double $ so make ignores it.
744 test "$program_suffix" != NONE &&
745 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
747 # sed with no file args requires a program.
748 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
751 # Check for bogus environment variables.
752 # Test if LIBRARY_PATH contains the notation for the current directory
753 # since this would lead to problems installing/building glibc.
754 # LIBRARY_PATH contains the current directory if one of the following
755 # is true:
756 # - one of the terminals (":" and ";") is the first or last sign
757 # - two terminals occur directly after each other
758 # - the path contains an element with a dot in it
759 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
760 echo "configure:761: checking LIBRARY_PATH variable" >&5
761 case ${LIBRARY_PATH} in
762 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
763 library_path_setting="contains current directory"
766 library_path_setting="ok"
768 esac
769 echo "$ac_t""$library_path_setting" 1>&6
770 if test "$library_path_setting" != "ok"; then
771 { echo "configure: error:
772 *** LIBRARY_PATH shouldn't contain the current directory when
773 *** building gcc. Please change the environment variable
774 *** and run configure again." 1>&2; exit 1; }
777 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
778 # since this would lead to problems installing/building glibc.
779 # GCC_EXEC_PREFIX contains the current directory if one of the following
780 # is true:
781 # - one of the terminals (":" and ";") is the first or last sign
782 # - two terminals occur directly after each other
783 # - the path contains an element with a dot in it
784 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
785 echo "configure:786: checking GCC_EXEC_PREFIX variable" >&5
786 case ${GCC_EXEC_PREFIX} in
787 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
788 gcc_exec_prefix_setting="contains current directory"
791 gcc_exec_prefix_setting="ok"
793 esac
794 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
795 if test "$gcc_exec_prefix_setting" != "ok"; then
796 { echo "configure: error:
797 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
798 *** building gcc. Please change the environment variable
799 *** and run configure again." 1>&2; exit 1; }
802 # -----------
803 # Directories
804 # -----------
806 # Specify the local prefix
807 local_prefix=
808 # Check whether --with-local-prefix or --without-local-prefix was given.
809 if test "${with_local_prefix+set}" = set; then
810 withval="$with_local_prefix"
811 case "${withval}" in
812 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
813 no) ;;
814 *) local_prefix=$with_local_prefix ;;
815 esac
819 # Default local prefix if it is empty
820 if test x$local_prefix = x; then
821 local_prefix=/usr/local
824 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
825 # passed in by the toplevel make and thus we'd get different behavior
826 # depending on where we built the sources.
827 gcc_gxx_include_dir=
828 # Specify the g++ header file directory
829 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
830 if test "${with_gxx_include_dir+set}" = set; then
831 withval="$with_gxx_include_dir"
832 case "${withval}" in
833 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
834 no) ;;
835 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
836 esac
840 if test x${gcc_gxx_include_dir} = x; then
841 if test x${enable_version_specific_runtime_libs} = xyes; then
842 gcc_gxx_include_dir='${libsubdir}/include/c++'
843 else
844 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
845 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
849 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
850 if test "${with_cpp_install_dir+set}" = set; then
851 withval="$with_cpp_install_dir"
852 if test x$withval = xyes; then
853 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
854 elif test x$withval != xno; then
855 cpp_install_dir=$withval
860 # -------------------
861 # Find default linker
862 # -------------------
864 # With GNU ld
865 # Check whether --with-gnu-ld or --without-gnu-ld was given.
866 if test "${with_gnu_ld+set}" = set; then
867 withval="$with_gnu_ld"
868 gnu_ld_flag="$with_gnu_ld"
869 else
870 gnu_ld_flag=no
874 # With pre-defined ld
875 # Check whether --with-ld or --without-ld was given.
876 if test "${with_ld+set}" = set; then
877 withval="$with_ld"
878 DEFAULT_LINKER="$with_ld"
881 if test x"${DEFAULT_LINKER+set}" = x"set"; then
882 if test ! -x "$DEFAULT_LINKER"; then
883 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
884 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
885 gnu_ld_flag=yes
887 cat >> confdefs.h <<EOF
888 #define DEFAULT_LINKER "$DEFAULT_LINKER"
893 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
894 echo "configure:895: checking whether a default linker was specified" >&5
895 if test x"${DEFAULT_LINKER+set}" = x"set"; then
896 if test x"$gnu_ld_flag" = x"no"; then
897 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
898 else
899 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
901 else
902 echo "$ac_t""no" 1>&6
905 # ----------------------
906 # Find default assembler
907 # ----------------------
909 # With GNU as
910 # Check whether --with-gnu-as or --without-gnu-as was given.
911 if test "${with_gnu_as+set}" = set; then
912 withval="$with_gnu_as"
913 gas_flag="$with_gnu_as"
914 else
915 gas_flag=no
919 # Check whether --with-as or --without-as was given.
920 if test "${with_as+set}" = set; then
921 withval="$with_as"
922 DEFAULT_ASSEMBLER="$with_as"
925 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
926 if test ! -x "$DEFAULT_ASSEMBLER"; then
927 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
928 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
929 gas_flag=yes
931 cat >> confdefs.h <<EOF
932 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
937 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
938 echo "configure:939: checking whether a default assembler was specified" >&5
939 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
940 if test x"$gas_flag" = x"no"; then
941 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
942 else
943 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
945 else
946 echo "$ac_t""no" 1>&6
949 # ---------------
950 # Find C compiler
951 # ---------------
953 # Find the native compiler
954 # Extract the first word of "gcc", so it can be a program name with args.
955 set dummy gcc; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
959 echo $ac_n "(cached) $ac_c" 1>&6
960 else
961 if test -n "$CC"; then
962 ac_cv_prog_CC="$CC" # Let the user override the test.
963 else
964 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
965 ac_dummy="$PATH"
966 for ac_dir in $ac_dummy; do
967 test -z "$ac_dir" && ac_dir=.
968 if test -f $ac_dir/$ac_word; then
969 ac_cv_prog_CC="gcc"
970 break
972 done
973 IFS="$ac_save_ifs"
976 CC="$ac_cv_prog_CC"
977 if test -n "$CC"; then
978 echo "$ac_t""$CC" 1>&6
979 else
980 echo "$ac_t""no" 1>&6
983 if test -z "$CC"; then
984 # Extract the first word of "cc", so it can be a program name with args.
985 set dummy cc; ac_word=$2
986 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
987 echo "configure:988: checking for $ac_word" >&5
988 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
989 echo $ac_n "(cached) $ac_c" 1>&6
990 else
991 if test -n "$CC"; then
992 ac_cv_prog_CC="$CC" # Let the user override the test.
993 else
994 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
995 ac_prog_rejected=no
996 ac_dummy="$PATH"
997 for ac_dir in $ac_dummy; do
998 test -z "$ac_dir" && ac_dir=.
999 if test -f $ac_dir/$ac_word; then
1000 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1001 ac_prog_rejected=yes
1002 continue
1004 ac_cv_prog_CC="cc"
1005 break
1007 done
1008 IFS="$ac_save_ifs"
1009 if test $ac_prog_rejected = yes; then
1010 # We found a bogon in the path, so make sure we never use it.
1011 set dummy $ac_cv_prog_CC
1012 shift
1013 if test $# -gt 0; then
1014 # We chose a different compiler from the bogus one.
1015 # However, it has the same basename, so the bogon will be chosen
1016 # first if we set CC to just the basename; use the full file name.
1017 shift
1018 set dummy "$ac_dir/$ac_word" "$@"
1019 shift
1020 ac_cv_prog_CC="$@"
1025 CC="$ac_cv_prog_CC"
1026 if test -n "$CC"; then
1027 echo "$ac_t""$CC" 1>&6
1028 else
1029 echo "$ac_t""no" 1>&6
1032 if test -z "$CC"; then
1033 case "`uname -s`" in
1034 *win32* | *WIN32*)
1035 # Extract the first word of "cl", so it can be a program name with args.
1036 set dummy cl; ac_word=$2
1037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1038 echo "configure:1039: checking for $ac_word" >&5
1039 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1040 echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042 if test -n "$CC"; then
1043 ac_cv_prog_CC="$CC" # Let the user override the test.
1044 else
1045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1046 ac_dummy="$PATH"
1047 for ac_dir in $ac_dummy; do
1048 test -z "$ac_dir" && ac_dir=.
1049 if test -f $ac_dir/$ac_word; then
1050 ac_cv_prog_CC="cl"
1051 break
1053 done
1054 IFS="$ac_save_ifs"
1057 CC="$ac_cv_prog_CC"
1058 if test -n "$CC"; then
1059 echo "$ac_t""$CC" 1>&6
1060 else
1061 echo "$ac_t""no" 1>&6
1064 esac
1066 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1069 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1070 echo "configure:1071: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1072 ac_ext=c
1073 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1074 ac_cpp='$CPP $CPPFLAGS'
1075 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1076 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1077 cross_compiling=$ac_cv_prog_cc_cross
1079 cat > conftest.$ac_ext << EOF
1081 #line 1082 "configure"
1082 #include "confdefs.h"
1084 main(){return(0);}
1086 if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1087 ac_cv_prog_cc_works=yes
1088 # If we can't run a trivial program, we are probably using a cross compiler.
1089 if (./conftest; exit) 2>/dev/null; then
1090 ac_cv_prog_cc_cross=no
1091 else
1092 ac_cv_prog_cc_cross=yes
1094 else
1095 echo "configure: failed program was:" >&5
1096 cat conftest.$ac_ext >&5
1097 ac_cv_prog_cc_works=no
1099 rm -fr conftest*
1100 ac_ext=c
1101 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1102 ac_cpp='$CPP $CPPFLAGS'
1103 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1104 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1105 cross_compiling=$ac_cv_prog_cc_cross
1107 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1108 if test $ac_cv_prog_cc_works = no; then
1109 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1111 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1112 echo "configure:1113: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1113 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1114 cross_compiling=$ac_cv_prog_cc_cross
1116 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1117 echo "configure:1118: checking whether we are using GNU C" >&5
1118 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1119 echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121 cat > conftest.c <<EOF
1122 #ifdef __GNUC__
1123 yes;
1124 #endif
1126 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1127 ac_cv_prog_gcc=yes
1128 else
1129 ac_cv_prog_gcc=no
1133 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1135 if test $ac_cv_prog_gcc = yes; then
1136 GCC=yes
1137 else
1138 GCC=
1141 ac_test_CFLAGS="${CFLAGS+set}"
1142 ac_save_CFLAGS="$CFLAGS"
1143 CFLAGS=
1144 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1145 echo "configure:1146: checking whether ${CC-cc} accepts -g" >&5
1146 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1147 echo $ac_n "(cached) $ac_c" 1>&6
1148 else
1149 echo 'void f(){}' > conftest.c
1150 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1151 ac_cv_prog_cc_g=yes
1152 else
1153 ac_cv_prog_cc_g=no
1155 rm -f conftest*
1159 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1160 if test "$ac_test_CFLAGS" = set; then
1161 CFLAGS="$ac_save_CFLAGS"
1162 elif test $ac_cv_prog_cc_g = yes; then
1163 if test "$GCC" = yes; then
1164 CFLAGS="-g -O2"
1165 else
1166 CFLAGS="-g"
1168 else
1169 if test "$GCC" = yes; then
1170 CFLAGS="-O2"
1171 else
1172 CFLAGS=
1176 if test "x$CC" != xcc; then
1177 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1178 echo "configure:1179: checking whether $CC and cc understand -c and -o together" >&5
1179 else
1180 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1181 echo "configure:1182: checking whether cc understands -c and -o together" >&5
1183 set dummy $CC; ac_cc="`echo $2 |
1184 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1185 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188 echo 'foo(){}' > conftest.c
1189 # Make sure it works both with $CC and with simple cc.
1190 # We do the test twice because some compilers refuse to overwrite an
1191 # existing .o file with -o, though they will create one.
1192 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1193 if { (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1194 test -f conftest.o && { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1195 then
1196 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1197 if test "x$CC" != xcc; then
1198 # Test first that cc exists at all.
1199 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1200 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1201 if { (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1202 test -f conftest.o && { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1203 then
1204 # cc works too.
1206 else
1207 # cc exists but doesn't like -o.
1208 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1212 else
1213 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1215 rm -f conftest*
1218 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1219 echo "$ac_t""yes" 1>&6
1220 else
1221 echo "$ac_t""no" 1>&6
1222 cat >> confdefs.h <<\EOF
1223 #define NO_MINUS_C_MINUS_O 1
1228 # autoconf is lame and doesn't give us any substitution variable for this.
1229 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1230 NO_MINUS_C_MINUS_O=yes
1231 else
1232 OUTPUT_OPTION='-o $@'
1237 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1238 echo "configure:1239: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1239 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1240 echo $ac_n "(cached) $ac_c" 1>&6
1241 else
1242 save_CFLAGS="$CFLAGS"
1243 CFLAGS="-Wno-long-long"
1244 cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1248 int main() {
1250 ; return 0; }
1252 if { (eval echo configure:1253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1253 rm -rf conftest*
1254 ac_cv_prog_cc_no_long_long=yes
1255 else
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 ac_cv_prog_cc_no_long_long=no
1261 rm -f conftest*
1262 CFLAGS="$save_CFLAGS"
1265 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1267 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1268 echo "configure:1269: checking how to run the C preprocessor" >&5
1269 # On Suns, sometimes $CPP names a directory.
1270 if test -n "$CPP" && test -d "$CPP"; then
1271 CPP=
1273 if test -z "$CPP"; then
1274 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1276 else
1277 # This must be in double quotes, not single quotes, because CPP may get
1278 # substituted into the Makefile and "${CC-cc}" will confuse make.
1279 CPP="${CC-cc} -E"
1280 # On the NeXT, cc -E runs the code through the compiler's parser,
1281 # not just through cpp.
1282 cat > conftest.$ac_ext <<EOF
1283 #line 1284 "configure"
1284 #include "confdefs.h"
1285 #include <assert.h>
1286 Syntax Error
1288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1289 { (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1291 if test -z "$ac_err"; then
1293 else
1294 echo "$ac_err" >&5
1295 echo "configure: failed program was:" >&5
1296 cat conftest.$ac_ext >&5
1297 rm -rf conftest*
1298 CPP="${CC-cc} -E -traditional-cpp"
1299 cat > conftest.$ac_ext <<EOF
1300 #line 1301 "configure"
1301 #include "confdefs.h"
1302 #include <assert.h>
1303 Syntax Error
1305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1306 { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308 if test -z "$ac_err"; then
1310 else
1311 echo "$ac_err" >&5
1312 echo "configure: failed program was:" >&5
1313 cat conftest.$ac_ext >&5
1314 rm -rf conftest*
1315 CPP="${CC-cc} -nologo -E"
1316 cat > conftest.$ac_ext <<EOF
1317 #line 1318 "configure"
1318 #include "confdefs.h"
1319 #include <assert.h>
1320 Syntax Error
1322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1323 { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1325 if test -z "$ac_err"; then
1327 else
1328 echo "$ac_err" >&5
1329 echo "configure: failed program was:" >&5
1330 cat conftest.$ac_ext >&5
1331 rm -rf conftest*
1332 CPP=/lib/cpp
1334 rm -f conftest*
1336 rm -f conftest*
1338 rm -f conftest*
1339 ac_cv_prog_CPP="$CPP"
1341 CPP="$ac_cv_prog_CPP"
1342 else
1343 ac_cv_prog_CPP="$CPP"
1345 echo "$ac_t""$CPP" 1>&6
1347 echo $ac_n "checking for inline""... $ac_c" 1>&6
1348 echo "configure:1349: checking for inline" >&5
1349 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1350 echo $ac_n "(cached) $ac_c" 1>&6
1351 else
1352 ac_cv_c_inline=no
1353 for ac_kw in inline __inline__ __inline; do
1354 cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1358 int main() {
1359 } $ac_kw foo() {
1360 ; return 0; }
1362 if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1363 rm -rf conftest*
1364 ac_cv_c_inline=$ac_kw; break
1365 else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1369 rm -f conftest*
1370 done
1374 echo "$ac_t""$ac_cv_c_inline" 1>&6
1375 case "$ac_cv_c_inline" in
1376 inline | yes) ;;
1377 no) cat >> confdefs.h <<\EOF
1378 #define inline
1381 *) cat >> confdefs.h <<EOF
1382 #define inline $ac_cv_c_inline
1385 esac
1387 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1388 echo "configure:1389: checking for volatile" >&5
1389 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1391 else
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1396 int main() {
1397 volatile int foo;
1398 ; return 0; }
1400 if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1401 rm -rf conftest*
1402 gcc_cv_c_volatile=yes
1403 else
1404 echo "configure: failed program was:" >&5
1405 cat conftest.$ac_ext >&5
1406 rm -rf conftest*
1407 gcc_cv_c_volatile=no
1409 rm -f conftest*
1412 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1413 if test $gcc_cv_c_volatile = yes ; then
1414 cat >> confdefs.h <<\EOF
1415 #define HAVE_VOLATILE 1
1421 echo $ac_n "checking for long double""... $ac_c" 1>&6
1422 echo "configure:1423: checking for long double" >&5
1423 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 if test "$GCC" = yes; then
1427 gcc_cv_c_long_double=yes
1428 else
1429 cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1433 int main() {
1434 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1435 long double foo = 0.0;
1436 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1437 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1438 ; return 0; }
1440 if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1441 rm -rf conftest*
1442 gcc_cv_c_long_double=yes
1443 else
1444 echo "configure: failed program was:" >&5
1445 cat conftest.$ac_ext >&5
1446 rm -rf conftest*
1447 gcc_cv_c_long_double=no
1449 rm -f conftest*
1453 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1454 if test $gcc_cv_c_long_double = yes; then
1455 cat >> confdefs.h <<\EOF
1456 #define HAVE_LONG_DOUBLE 1
1461 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1462 echo "configure:1463: checking for long long int" >&5
1463 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1464 echo $ac_n "(cached) $ac_c" 1>&6
1465 else
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1470 int main() {
1471 long long int i;
1472 ; return 0; }
1474 if { (eval echo configure:1475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1475 rm -rf conftest*
1476 ac_cv_c_long_long=yes
1477 else
1478 echo "configure: failed program was:" >&5
1479 cat conftest.$ac_ext >&5
1480 rm -rf conftest*
1481 ac_cv_c_long_long=no
1483 rm -f conftest*
1486 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1487 if test $ac_cv_c_long_long = yes; then
1488 cat >> confdefs.h <<\EOF
1489 #define HAVE_LONG_LONG 1
1493 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1494 echo "configure:1495: checking for __int64" >&5
1495 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1496 echo $ac_n "(cached) $ac_c" 1>&6
1497 else
1498 cat > conftest.$ac_ext <<EOF
1499 #line 1500 "configure"
1500 #include "confdefs.h"
1502 int main() {
1503 __int64 i;
1504 ; return 0; }
1506 if { (eval echo configure:1507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1507 rm -rf conftest*
1508 ac_cv_c___int64=yes
1509 else
1510 echo "configure: failed program was:" >&5
1511 cat conftest.$ac_ext >&5
1512 rm -rf conftest*
1513 ac_cv_c___int64=no
1515 rm -f conftest*
1518 echo "$ac_t""$ac_cv_c___int64" 1>&6
1519 if test $ac_cv_c___int64 = yes; then
1520 cat >> confdefs.h <<\EOF
1521 #define HAVE___INT64 1
1526 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1527 echo "configure:1528: checking for built-in _Bool" >&5
1528 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1529 echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531 cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1535 int main() {
1536 _Bool foo;
1537 ; return 0; }
1539 if { (eval echo configure:1540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1540 rm -rf conftest*
1541 gcc_cv_c__bool=yes
1542 else
1543 echo "configure: failed program was:" >&5
1544 cat conftest.$ac_ext >&5
1545 rm -rf conftest*
1546 gcc_cv_c__bool=no
1548 rm -f conftest*
1552 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1553 if test $gcc_cv_c__bool = yes; then
1554 cat >> confdefs.h <<\EOF
1555 #define HAVE__BOOL 1
1561 # sizeof(char) is 1 by definition.
1562 echo $ac_n "checking size of short""... $ac_c" 1>&6
1563 echo "configure:1564: checking size of short" >&5
1564 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
1566 else
1567 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1568 cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 #include "confdefs.h"
1572 #include <sys/types.h>
1575 int main() {
1576 switch (0) case 0: case (sizeof (short) == $ac_size):;
1577 ; return 0; }
1579 if { (eval echo configure:1580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1580 rm -rf conftest*
1581 ac_cv_sizeof_short=$ac_size
1582 else
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1586 rm -f conftest*
1587 if test x$ac_cv_sizeof_short != x ; then break; fi
1588 done
1592 if test x$ac_cv_sizeof_short = x ; then
1593 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1595 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1596 cat >> confdefs.h <<EOF
1597 #define SIZEOF_SHORT $ac_cv_sizeof_short
1601 echo $ac_n "checking size of int""... $ac_c" 1>&6
1602 echo "configure:1603: checking size of int" >&5
1603 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include "confdefs.h"
1611 #include <sys/types.h>
1614 int main() {
1615 switch (0) case 0: case (sizeof (int) == $ac_size):;
1616 ; return 0; }
1618 if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1619 rm -rf conftest*
1620 ac_cv_sizeof_int=$ac_size
1621 else
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1625 rm -f conftest*
1626 if test x$ac_cv_sizeof_int != x ; then break; fi
1627 done
1631 if test x$ac_cv_sizeof_int = x ; then
1632 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1634 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1635 cat >> confdefs.h <<EOF
1636 #define SIZEOF_INT $ac_cv_sizeof_int
1640 echo $ac_n "checking size of long""... $ac_c" 1>&6
1641 echo "configure:1642: checking size of long" >&5
1642 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1643 echo $ac_n "(cached) $ac_c" 1>&6
1644 else
1645 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1646 cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649 #include "confdefs.h"
1650 #include <sys/types.h>
1653 int main() {
1654 switch (0) case 0: case (sizeof (long) == $ac_size):;
1655 ; return 0; }
1657 if { (eval echo configure:1658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1658 rm -rf conftest*
1659 ac_cv_sizeof_long=$ac_size
1660 else
1661 echo "configure: failed program was:" >&5
1662 cat conftest.$ac_ext >&5
1664 rm -f conftest*
1665 if test x$ac_cv_sizeof_long != x ; then break; fi
1666 done
1670 if test x$ac_cv_sizeof_long = x ; then
1671 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1673 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1674 cat >> confdefs.h <<EOF
1675 #define SIZEOF_LONG $ac_cv_sizeof_long
1679 if test $ac_cv_c_long_long = yes; then
1680 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1681 echo "configure:1682: checking size of long long" >&5
1682 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1683 echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1686 cat > conftest.$ac_ext <<EOF
1687 #line 1688 "configure"
1688 #include "confdefs.h"
1689 #include "confdefs.h"
1690 #include <sys/types.h>
1693 int main() {
1694 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1695 ; return 0; }
1697 if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1698 rm -rf conftest*
1699 ac_cv_sizeof_long_long=$ac_size
1700 else
1701 echo "configure: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
1704 rm -f conftest*
1705 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1706 done
1710 if test x$ac_cv_sizeof_long_long = x ; then
1711 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1713 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1714 cat >> confdefs.h <<EOF
1715 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1720 if test $ac_cv_c___int64 = yes; then
1721 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1722 echo "configure:1723: checking size of __int64" >&5
1723 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1725 else
1726 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 #include "confdefs.h"
1731 #include <sys/types.h>
1734 int main() {
1735 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1736 ; return 0; }
1738 if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1739 rm -rf conftest*
1740 ac_cv_sizeof___int64=$ac_size
1741 else
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1745 rm -f conftest*
1746 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1747 done
1751 if test x$ac_cv_sizeof___int64 = x ; then
1752 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1754 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1755 cat >> confdefs.h <<EOF
1756 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1762 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1763 echo "configure:1764: checking execution character set" >&5
1764 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766 else
1767 cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1771 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1772 ASCII
1773 #endif
1775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1776 egrep "ASCII" >/dev/null 2>&1; then
1777 rm -rf conftest*
1778 ac_cv_c_charset=ASCII
1780 rm -f conftest*
1782 if test x${ac_cv_c_charset+set} != xset; then
1783 cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1787 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1788 EBCDIC
1789 #endif
1791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1792 egrep "EBCDIC" >/dev/null 2>&1; then
1793 rm -rf conftest*
1794 ac_cv_c_charset=EBCDIC
1796 rm -f conftest*
1799 if test x${ac_cv_c_charset+set} != xset; then
1800 ac_cv_c_charset=unknown
1804 echo "$ac_t""$ac_cv_c_charset" 1>&6
1805 if test $ac_cv_c_charset = unknown; then
1806 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1807 elif test $ac_cv_c_charset = EBCDIC; then
1808 cat >> confdefs.h <<\EOF
1809 #define HOST_EBCDIC 1
1814 # -----------------
1815 # Find Ada compiler
1816 # -----------------
1818 # See if GNAT has been installed
1819 if test $host != $build; then
1820 ac_tool_prefix=${host_alias}-
1821 else
1822 ac_tool_prefix=
1826 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1827 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1829 echo "configure:1830: checking for $ac_word" >&5
1830 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1832 else
1833 if test -n "$GNATBIND"; then
1834 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1835 else
1836 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1837 ac_dummy="$PATH"
1838 for ac_dir in $ac_dummy; do
1839 test -z "$ac_dir" && ac_dir=.
1840 if test -f $ac_dir/$ac_word; then
1841 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1842 break
1844 done
1845 IFS="$ac_save_ifs"
1848 GNATBIND="$ac_cv_prog_GNATBIND"
1849 if test -n "$GNATBIND"; then
1850 echo "$ac_t""$GNATBIND" 1>&6
1851 else
1852 echo "$ac_t""no" 1>&6
1856 if test -z "$ac_cv_prog_GNATBIND"; then
1857 if test -n "$ac_tool_prefix"; then
1858 # Extract the first word of "gnatbind", so it can be a program name with args.
1859 set dummy gnatbind; ac_word=$2
1860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1861 echo "configure:1862: checking for $ac_word" >&5
1862 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1863 echo $ac_n "(cached) $ac_c" 1>&6
1864 else
1865 if test -n "$GNATBIND"; then
1866 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1867 else
1868 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1869 ac_dummy="$PATH"
1870 for ac_dir in $ac_dummy; do
1871 test -z "$ac_dir" && ac_dir=.
1872 if test -f $ac_dir/$ac_word; then
1873 ac_cv_prog_GNATBIND="gnatbind"
1874 break
1876 done
1877 IFS="$ac_save_ifs"
1878 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1881 GNATBIND="$ac_cv_prog_GNATBIND"
1882 if test -n "$GNATBIND"; then
1883 echo "$ac_t""$GNATBIND" 1>&6
1884 else
1885 echo "$ac_t""no" 1>&6
1888 else
1889 GNATBIND="no"
1893 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1894 echo "configure:1895: checking for compiler driver that understands Ada" >&5
1895 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1897 else
1898 cat >conftest.adb <<EOF
1899 procedure conftest is begin null; end conftest;
1901 gcc_cv_prog_adac=no
1902 # Have to do ac_tool_prefix and user overrides by hand.
1903 for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
1904 ${ac_tool_prefix}gcc gcc \
1905 ${ac_tool_prefix}cc cc \
1906 ${ac_tool_prefix}gnatgcc gnatgcc \
1907 ${ac_tool_prefix}gnatcc gnatcc \
1908 ${ac_tool_prefix}adagcc adagcc \
1909 ${ac_tool_prefix}adacc adacc ; do
1910 # There is a bug in all released versions of GCC which causes the
1911 # driver to exit successfully when the appropriate language module
1912 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1913 # Therefore we must check for the error message as well as an
1914 # unsuccessful exit.
1915 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1916 if test x"$errors" = x; then
1917 gcc_cv_prog_adac=$cand
1918 break
1920 done
1921 rm -f conftest.*
1924 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1925 ADAC=$gcc_cv_prog_adac
1928 if test x$GNATBIND != xno && test x$ADAC != xno; then
1929 have_gnat=yes
1930 else
1931 have_gnat=no
1935 if test x$have_gnat != xno ; then
1936 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1937 echo "configure:1938: checking whether ${ADAC} accepts -Wno-long-long" >&5
1938 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1939 echo $ac_n "(cached) $ac_c" 1>&6
1940 else
1941 cat >conftest.adb <<EOF
1942 procedure conftest is begin null; end conftest;
1944 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1945 ac_cv_prog_adac_no_long_long=yes
1946 else
1947 ac_cv_prog_adac_no_long_long=no
1949 rm -f conftest*
1952 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1953 else
1954 ac_cv_prog_adac_no_long_long=yes
1957 # ---------------------
1958 # Warnings and checking
1959 # ---------------------
1961 strict1_warn=
1962 if test $ac_cv_prog_cc_no_long_long = yes && \
1963 test $ac_cv_prog_adac_no_long_long = yes ; then
1964 strict1_warn="-pedantic -Wno-long-long"
1968 # If the native compiler is GCC, we can enable warnings even in stage1.
1969 # That's useful for people building cross-compilers, or just running a
1970 # quick `make'.
1971 warn_cflags=
1972 if test "x$GCC" = "xyes"; then
1973 warn_cflags='$(GCC_WARN_CFLAGS)'
1977 # Enable -Werror in bootstrap stage2 and later.
1978 # Change the default to "no" on release branches.
1979 # Check whether --enable-werror or --disable-werror was given.
1980 if test "${enable_werror+set}" = set; then
1981 enableval="$enable_werror"
1983 else
1984 enable_werror=yes
1987 if test x$enable_werror = xyes ; then
1988 WERROR=-Werror
1992 # Enable expensive internal checks
1993 # Check whether --enable-checking or --disable-checking was given.
1994 if test "${enable_checking+set}" = set; then
1995 enableval="$enable_checking"
1996 ac_checking=
1997 ac_tree_checking=
1998 ac_rtl_checking=
1999 ac_rtlflag_checking=
2000 ac_gc_checking=
2001 ac_gc_always_collect=
2002 case "${enableval}" in
2003 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
2004 ac_rtlflag_checking=1 ;;
2005 no) ;;
2006 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2007 set fnord $enableval; shift
2008 IFS="$ac_save_IFS"
2009 for check
2011 case $check in
2012 misc) ac_checking=1 ;;
2013 tree) ac_tree_checking=1 ;;
2014 rtlflag) ac_rtlflag_checking=1 ;;
2015 rtl) ac_rtl_checking=1 ;;
2016 gc) ac_gc_checking=1 ;;
2017 gcac) ac_gc_always_collect=1 ;;
2018 valgrind) ac_checking_valgrind=1 ;;
2019 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
2020 esac
2021 done
2023 esac
2025 else
2026 # Enable some checks by default for development versions of GCC
2027 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
2030 nocommon_flag=""
2031 if test x$ac_checking != x ; then
2032 cat >> confdefs.h <<\EOF
2033 #define ENABLE_CHECKING 1
2036 nocommon_flag=-fno-common
2039 if test x$ac_tree_checking != x ; then
2040 cat >> confdefs.h <<\EOF
2041 #define ENABLE_TREE_CHECKING 1
2045 if test x$ac_rtl_checking != x ; then
2046 cat >> confdefs.h <<\EOF
2047 #define ENABLE_RTL_CHECKING 1
2051 if test x$ac_rtlflag_checking != x ; then
2052 cat >> confdefs.h <<\EOF
2053 #define ENABLE_RTL_FLAG_CHECKING 1
2057 if test x$ac_gc_checking != x ; then
2058 cat >> confdefs.h <<\EOF
2059 #define ENABLE_GC_CHECKING 1
2063 if test x$ac_gc_always_collect != x ; then
2064 cat >> confdefs.h <<\EOF
2065 #define ENABLE_GC_ALWAYS_COLLECT 1
2069 valgrind_path_defines=
2070 valgrind_command=
2071 if test x$ac_checking_valgrind != x ; then
2072 # It is certainly possible that there's valgrind but no valgrind.h.
2073 # GCC relies on making annotations so we must have both.
2074 echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6
2075 echo "configure:2076: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <memcheck.h>
2080 #ifndef VALGRIND_DISCARD
2081 #error VALGRIND_DISCARD not defined
2082 #endif
2084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2085 { (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2087 if test -z "$ac_err"; then
2088 rm -rf conftest*
2089 gcc_cv_header_memcheck_h=yes
2090 else
2091 echo "$ac_err" >&5
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 gcc_cv_header_memcheck_h=no
2097 rm -f conftest*
2098 echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6
2099 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2100 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2101 echo "configure:2102: checking for valgrind.h" >&5
2102 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105 cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <valgrind.h>
2110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2111 { (eval echo configure:2112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2113 if test -z "$ac_err"; then
2114 rm -rf conftest*
2115 eval "ac_cv_header_$ac_safe=yes"
2116 else
2117 echo "$ac_err" >&5
2118 echo "configure: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2120 rm -rf conftest*
2121 eval "ac_cv_header_$ac_safe=no"
2123 rm -f conftest*
2125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2126 echo "$ac_t""yes" 1>&6
2127 have_valgrind_h=yes
2128 else
2129 echo "$ac_t""no" 1>&6
2130 have_valgrind_h=no
2133 # Extract the first word of "valgrind", so it can be a program name with args.
2134 set dummy valgrind; ac_word=$2
2135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2136 echo "configure:2137: checking for $ac_word" >&5
2137 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2138 echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140 case "$valgrind_path" in
2142 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2145 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2146 for ac_dir in $PATH; do
2147 test -z "$ac_dir" && ac_dir=.
2148 if test -f $ac_dir/$ac_word; then
2149 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2150 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2151 break
2154 done
2155 IFS="$ac_save_ifs"
2157 esac
2159 valgrind_path="$ac_cv_path_valgrind_path"
2160 if test -n "$valgrind_path"; then
2161 echo "$ac_t""$valgrind_path" 1>&6
2162 else
2163 echo "$ac_t""no" 1>&6
2166 if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
2167 { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
2169 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2170 valgrind_command="$valgrind_path -q"
2171 cat >> confdefs.h <<\EOF
2172 #define ENABLE_VALGRIND_CHECKING 1
2175 if test $gcc_cv_header_memcheck_h = yes; then
2176 cat >> confdefs.h <<\EOF
2177 #define HAVE_MEMCHECK_H 1
2185 # Enable code coverage collection
2186 # Check whether --enable-coverage or --disable-coverage was given.
2187 if test "${enable_coverage+set}" = set; then
2188 enableval="$enable_coverage"
2189 case "${enableval}" in
2190 yes|noopt)
2191 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2193 opt)
2194 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2197 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2199 esac
2200 else
2201 coverage_flags=""
2206 # --------
2207 # UNSORTED
2208 # --------
2210 # With stabs
2211 # Check whether --with-stabs or --without-stabs was given.
2212 if test "${with_stabs+set}" = set; then
2213 withval="$with_stabs"
2214 stabs="$with_stabs"
2215 else
2216 stabs=no
2220 # With ELF
2221 # Check whether --with-elf or --without-elf was given.
2222 if test "${with_elf+set}" = set; then
2223 withval="$with_elf"
2224 elf="$with_elf"
2225 else
2226 elf=no
2230 # Determine whether or not multilibs are enabled.
2231 # Check whether --enable-multilib or --disable-multilib was given.
2232 if test "${enable_multilib+set}" = set; then
2233 enableval="$enable_multilib"
2235 else
2236 enable_multilib=yes
2241 # Enable __cxa_atexit for C++.
2242 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2243 if test "${enable___cxa_atexit+set}" = set; then
2244 enableval="$enable___cxa_atexit"
2248 if test x$enable___cxa_atexit = xyes; then
2249 cat >> confdefs.h <<\EOF
2250 #define DEFAULT_USE_CXA_ATEXIT 1
2255 # Enable Multibyte Characters for C/C++
2256 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2257 if test "${enable_c_mbchar+set}" = set; then
2258 enableval="$enable_c_mbchar"
2259 if test x$enable_c_mbchar != xno; then
2260 cat >> confdefs.h <<\EOF
2261 #define MULTIBYTE_CHARS 1
2268 # Enable threads
2269 # Pass with no value to take the default
2270 # Pass with a value to specify a thread package
2271 # Check whether --enable-threads or --disable-threads was given.
2272 if test "${enable_threads+set}" = set; then
2273 enableval="$enable_threads"
2275 else
2276 enable_threads=''
2280 enable_threads_flag=$enable_threads
2281 # Check if a valid thread package
2282 case x${enable_threads_flag} in
2283 x | xno)
2284 # No threads
2285 target_thread_file='single'
2287 xyes)
2288 # default
2289 target_thread_file=''
2291 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2292 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
2293 target_thread_file=$enable_threads_flag
2296 echo "$enable_threads is an unknown thread package" 1>&2
2297 exit 1
2299 esac
2301 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2302 if test "${enable_objc_gc+set}" = set; then
2303 enableval="$enable_objc_gc"
2304 if test x$enable_objc_gc = xno; then
2305 objc_boehm_gc=''
2306 else
2307 objc_boehm_gc=1
2309 else
2310 objc_boehm_gc=''
2314 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2315 if test "${with_dwarf2+set}" = set; then
2316 withval="$with_dwarf2"
2317 dwarf2="$with_dwarf2"
2318 else
2319 dwarf2=no
2323 # Check whether --enable-shared or --disable-shared was given.
2324 if test "${enable_shared+set}" = set; then
2325 enableval="$enable_shared"
2327 case $enable_shared in
2328 yes | no) ;;
2330 enable_shared=no
2331 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2332 for pkg in $enableval; do
2333 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2334 enable_shared=yes
2336 done
2337 IFS="$ac_save_ifs"
2339 esac
2341 else
2342 enable_shared=yes
2347 # Check whether --with-sysroot or --without-sysroot was given.
2348 if test "${with_sysroot+set}" = set; then
2349 withval="$with_sysroot"
2351 case ${with_sysroot} in
2352 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
2353 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2354 esac
2356 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2357 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2359 if test "x$exec_prefix" = xNONE; then
2360 if test "x$prefix" = xNONE; then
2361 test_prefix=/usr/local
2362 else
2363 test_prefix=$prefix
2365 else
2366 test_prefix=$exec_prefix
2368 case ${TARGET_SYSTEM_ROOT} in
2369 "${test_prefix}"|"${test_prefix}/"*|\
2370 '${exec_prefix}'|'${exec_prefix}/'*)
2371 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
2372 TARGET_SYSTEM_ROOT_DEFINE="$t"
2374 esac
2376 else
2378 TARGET_SYSTEM_ROOT=
2379 TARGET_SYSTEM_ROOT_DEFINE=
2380 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2388 # Stage specific cflags for build.
2389 stage1_cflags=
2390 case $build in
2391 vax-*-*)
2392 if test x$GCC = xyes
2393 then
2394 stage1_cflags="-Wa,-J"
2395 else
2396 stage1_cflags="-J"
2399 powerpc-*-darwin*)
2400 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2401 # sources; use -no-cpp-precomp to get to GNU cpp.
2402 # Apple's GCC has bugs in designated initializer handling, so disable
2403 # that too.
2404 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2406 esac
2409 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2410 echo "configure:2411: checking whether ${MAKE-make} sets \${MAKE}" >&5
2411 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2412 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2413 echo $ac_n "(cached) $ac_c" 1>&6
2414 else
2415 cat > conftestmake <<\EOF
2416 all:
2417 @echo 'ac_maketemp="${MAKE}"'
2419 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2420 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2421 if test -n "$ac_maketemp"; then
2422 eval ac_cv_prog_make_${ac_make}_set=yes
2423 else
2424 eval ac_cv_prog_make_${ac_make}_set=no
2426 rm -f conftestmake
2428 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2429 echo "$ac_t""yes" 1>&6
2430 SET_MAKE=
2431 else
2432 echo "$ac_t""no" 1>&6
2433 SET_MAKE="MAKE=${MAKE-make}"
2437 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2438 echo "configure:2439: checking for GNU C library" >&5
2439 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2440 echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442 cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 #include <features.h>
2446 int main() {
2448 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2449 #error Not a GNU C library system
2450 #endif
2451 ; return 0; }
2453 if { (eval echo configure:2454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2454 rm -rf conftest*
2455 gcc_cv_glibc=yes
2456 else
2457 echo "configure: failed program was:" >&5
2458 cat conftest.$ac_ext >&5
2459 rm -rf conftest*
2460 gcc_cv_glibc=no
2462 rm -f conftest*
2465 echo "$ac_t""$gcc_cv_glibc" 1>&6
2466 if test $gcc_cv_glibc = yes; then
2467 cat >> confdefs.h <<\EOF
2468 #define _GNU_SOURCE 1
2473 # Find some useful tools
2474 for ac_prog in mawk gawk nawk awk
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477 set dummy $ac_prog; ac_word=$2
2478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2479 echo "configure:2480: checking for $ac_word" >&5
2480 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2481 echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483 if test -n "$AWK"; then
2484 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2485 else
2486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2487 ac_dummy="$PATH"
2488 for ac_dir in $ac_dummy; do
2489 test -z "$ac_dir" && ac_dir=.
2490 if test -f $ac_dir/$ac_word; then
2491 ac_cv_prog_AWK="$ac_prog"
2492 break
2494 done
2495 IFS="$ac_save_ifs"
2498 AWK="$ac_cv_prog_AWK"
2499 if test -n "$AWK"; then
2500 echo "$ac_t""$AWK" 1>&6
2501 else
2502 echo "$ac_t""no" 1>&6
2505 test -n "$AWK" && break
2506 done
2508 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2509 echo "configure:2510: checking whether ln works" >&5
2510 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2511 echo $ac_n "(cached) $ac_c" 1>&6
2512 else
2513 rm -f conftestdata_t
2514 echo >conftestdata_f
2515 if ln conftestdata_f conftestdata_t 2>/dev/null
2516 then
2517 gcc_cv_prog_LN="ln"
2518 else
2519 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2520 then
2521 gcc_cv_prog_LN="ln -s"
2522 else
2523 gcc_cv_prog_LN=cp
2526 rm -f conftestdata_f conftestdata_t
2529 LN="$gcc_cv_prog_LN"
2530 if test "$gcc_cv_prog_LN" = "ln"; then
2531 echo "$ac_t""yes" 1>&6
2532 else
2533 if test "$gcc_cv_prog_LN" = "ln -s"; then
2534 echo "$ac_t""no, using ln -s" 1>&6
2535 else
2536 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2540 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2541 echo "configure:2542: checking whether ln -s works" >&5
2542 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545 rm -f conftestdata_t
2546 echo >conftestdata_f
2547 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2548 then
2549 gcc_cv_prog_LN_S="ln -s"
2550 else
2551 if ln conftestdata_f conftestdata_t 2>/dev/null
2552 then
2553 gcc_cv_prog_LN_S=ln
2554 else
2555 gcc_cv_prog_LN_S=cp
2558 rm -f conftestdata_f conftestdata_t
2561 LN_S="$gcc_cv_prog_LN_S"
2562 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2563 echo "$ac_t""yes" 1>&6
2564 else
2565 if test "$gcc_cv_prog_LN_S" = "ln"; then
2566 echo "$ac_t""no, using ln" 1>&6
2567 else
2568 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2572 # Extract the first word of "ranlib", so it can be a program name with args.
2573 set dummy ranlib; ac_word=$2
2574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_word" >&5
2576 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2577 echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579 if test -n "$RANLIB"; then
2580 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2581 else
2582 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2583 ac_dummy="$PATH"
2584 for ac_dir in $ac_dummy; do
2585 test -z "$ac_dir" && ac_dir=.
2586 if test -f $ac_dir/$ac_word; then
2587 ac_cv_prog_RANLIB="ranlib"
2588 break
2590 done
2591 IFS="$ac_save_ifs"
2592 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2595 RANLIB="$ac_cv_prog_RANLIB"
2596 if test -n "$RANLIB"; then
2597 echo "$ac_t""$RANLIB" 1>&6
2598 else
2599 echo "$ac_t""no" 1>&6
2602 # Find a good install program. We prefer a C program (faster),
2603 # so one script is as good as another. But avoid the broken or
2604 # incompatible versions:
2605 # SysV /etc/install, /usr/sbin/install
2606 # SunOS /usr/etc/install
2607 # IRIX /sbin/install
2608 # AIX /bin/install
2609 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2610 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2611 # ./install, which can be erroneously created by make from ./install.sh.
2612 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2613 echo "configure:2614: checking for a BSD compatible install" >&5
2614 if test -z "$INSTALL"; then
2615 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2616 echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2619 for ac_dir in $PATH; do
2620 # Account for people who put trailing slashes in PATH elements.
2621 case "$ac_dir/" in
2622 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2624 # OSF1 and SCO ODT 3.0 have their own names for install.
2625 for ac_prog in ginstall scoinst install; do
2626 if test -f $ac_dir/$ac_prog; then
2627 if test $ac_prog = install &&
2628 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2629 # AIX install. It has an incompatible calling convention.
2630 # OSF/1 installbsd also uses dspmsg, but is usable.
2632 else
2633 ac_cv_path_install="$ac_dir/$ac_prog -c"
2634 break 2
2637 done
2639 esac
2640 done
2641 IFS="$ac_save_IFS"
2644 if test "${ac_cv_path_install+set}" = set; then
2645 INSTALL="$ac_cv_path_install"
2646 else
2647 # As a last resort, use the slow shell script. We don't cache a
2648 # path for INSTALL within a source directory, because that will
2649 # break other packages using the cache if that directory is
2650 # removed, or if the path is relative.
2651 INSTALL="$ac_install_sh"
2654 echo "$ac_t""$INSTALL" 1>&6
2656 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2657 # It thinks the first close brace ends the variable substitution.
2658 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2660 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2663 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2664 echo "configure:2665: checking for ANSI C header files" >&5
2665 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668 cat > conftest.$ac_ext <<EOF
2669 #line 2670 "configure"
2670 #include "confdefs.h"
2671 #include <stdlib.h>
2672 #include <stdarg.h>
2673 #include <string.h>
2674 #include <float.h>
2676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2677 { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2679 if test -z "$ac_err"; then
2680 rm -rf conftest*
2681 ac_cv_header_stdc=yes
2682 else
2683 echo "$ac_err" >&5
2684 echo "configure: failed program was:" >&5
2685 cat conftest.$ac_ext >&5
2686 rm -rf conftest*
2687 ac_cv_header_stdc=no
2689 rm -f conftest*
2691 if test $ac_cv_header_stdc = yes; then
2692 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2693 cat > conftest.$ac_ext <<EOF
2694 #line 2695 "configure"
2695 #include "confdefs.h"
2696 #include <string.h>
2698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2699 egrep "memchr" >/dev/null 2>&1; then
2701 else
2702 rm -rf conftest*
2703 ac_cv_header_stdc=no
2705 rm -f conftest*
2709 if test $ac_cv_header_stdc = yes; then
2710 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714 #include <stdlib.h>
2716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2717 egrep "free" >/dev/null 2>&1; then
2719 else
2720 rm -rf conftest*
2721 ac_cv_header_stdc=no
2723 rm -f conftest*
2727 if test $ac_cv_header_stdc = yes; then
2728 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2729 if test "$cross_compiling" = yes; then
2731 else
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <ctype.h>
2736 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2737 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2738 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2739 int main () { int i; for (i = 0; i < 256; i++)
2740 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2741 exit (0); }
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2745 then
2747 else
2748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750 rm -fr conftest*
2751 ac_cv_header_stdc=no
2753 rm -fr conftest*
2759 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2760 if test $ac_cv_header_stdc = yes; then
2761 cat >> confdefs.h <<\EOF
2762 #define STDC_HEADERS 1
2767 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2768 echo "configure:2769: checking whether time.h and sys/time.h may both be included" >&5
2769 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772 cat > conftest.$ac_ext <<EOF
2773 #line 2774 "configure"
2774 #include "confdefs.h"
2775 #include <sys/types.h>
2776 #include <sys/time.h>
2777 #include <time.h>
2778 int main() {
2779 struct tm *tp;
2780 ; return 0; }
2782 if { (eval echo configure:2783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2783 rm -rf conftest*
2784 ac_cv_header_time=yes
2785 else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -rf conftest*
2789 ac_cv_header_time=no
2791 rm -f conftest*
2794 echo "$ac_t""$ac_cv_header_time" 1>&6
2795 if test $ac_cv_header_time = yes; then
2796 cat >> confdefs.h <<\EOF
2797 #define TIME_WITH_SYS_TIME 1
2802 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2803 echo "configure:2804: checking for working stdbool.h" >&5
2804 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2805 echo $ac_n "(cached) $ac_c" 1>&6
2806 else
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810 #include <stdbool.h>
2811 int main() {
2812 bool foo = false;
2813 ; return 0; }
2815 if { (eval echo configure:2816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2816 rm -rf conftest*
2817 ac_cv_header_stdbool_h=yes
2818 else
2819 echo "configure: failed program was:" >&5
2820 cat conftest.$ac_ext >&5
2821 rm -rf conftest*
2822 ac_cv_header_stdbool_h=no
2824 rm -f conftest*
2827 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2828 if test $ac_cv_header_stdbool_h = yes; then
2829 cat >> confdefs.h <<\EOF
2830 #define HAVE_STDBOOL_H 1
2835 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2836 echo "configure:2837: checking whether string.h and strings.h may both be included" >&5
2837 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2838 echo $ac_n "(cached) $ac_c" 1>&6
2839 else
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2843 #include <string.h>
2844 #include <strings.h>
2845 int main() {
2847 ; return 0; }
2849 if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2850 rm -rf conftest*
2851 gcc_cv_header_string=yes
2852 else
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2855 rm -rf conftest*
2856 gcc_cv_header_string=no
2858 rm -f conftest*
2861 echo "$ac_t""$gcc_cv_header_string" 1>&6
2862 if test $gcc_cv_header_string = yes; then
2863 cat >> confdefs.h <<\EOF
2864 #define STRING_WITH_STRINGS 1
2869 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2870 echo "configure:2871: checking for sys/wait.h that is POSIX.1 compatible" >&5
2871 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2872 echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874 cat > conftest.$ac_ext <<EOF
2875 #line 2876 "configure"
2876 #include "confdefs.h"
2877 #include <sys/types.h>
2878 #include <sys/wait.h>
2879 #ifndef WEXITSTATUS
2880 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2881 #endif
2882 #ifndef WIFEXITED
2883 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2884 #endif
2885 int main() {
2886 int s;
2887 wait (&s);
2888 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2889 ; return 0; }
2891 if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2892 rm -rf conftest*
2893 ac_cv_header_sys_wait_h=yes
2894 else
2895 echo "configure: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2897 rm -rf conftest*
2898 ac_cv_header_sys_wait_h=no
2900 rm -f conftest*
2903 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2904 if test $ac_cv_header_sys_wait_h = yes; then
2905 cat >> confdefs.h <<\EOF
2906 #define HAVE_SYS_WAIT_H 1
2911 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2912 fcntl.h unistd.h sys/file.h sys/time.h \
2913 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2914 direct.h malloc.h langinfo.h ldfcn.h
2916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2918 echo "configure:2919: checking for $ac_hdr" >&5
2919 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2920 echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922 cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 #include <$ac_hdr>
2927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2928 { (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2930 if test -z "$ac_err"; then
2931 rm -rf conftest*
2932 eval "ac_cv_header_$ac_safe=yes"
2933 else
2934 echo "$ac_err" >&5
2935 echo "configure: failed program was:" >&5
2936 cat conftest.$ac_ext >&5
2937 rm -rf conftest*
2938 eval "ac_cv_header_$ac_safe=no"
2940 rm -f conftest*
2942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2943 echo "$ac_t""yes" 1>&6
2944 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2945 cat >> confdefs.h <<EOF
2946 #define $ac_tr_hdr 1
2949 else
2950 echo "$ac_t""no" 1>&6
2952 done
2955 # Check for thread headers.
2956 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2957 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2958 echo "configure:2959: checking for thread.h" >&5
2959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2960 echo $ac_n "(cached) $ac_c" 1>&6
2961 else
2962 cat > conftest.$ac_ext <<EOF
2963 #line 2964 "configure"
2964 #include "confdefs.h"
2965 #include <thread.h>
2967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2968 { (eval echo configure:2969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2970 if test -z "$ac_err"; then
2971 rm -rf conftest*
2972 eval "ac_cv_header_$ac_safe=yes"
2973 else
2974 echo "$ac_err" >&5
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977 rm -rf conftest*
2978 eval "ac_cv_header_$ac_safe=no"
2980 rm -f conftest*
2982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2983 echo "$ac_t""yes" 1>&6
2984 have_thread_h=yes
2985 else
2986 echo "$ac_t""no" 1>&6
2987 have_thread_h=
2990 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2991 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2992 echo "configure:2993: checking for pthread.h" >&5
2993 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2994 echo $ac_n "(cached) $ac_c" 1>&6
2995 else
2996 cat > conftest.$ac_ext <<EOF
2997 #line 2998 "configure"
2998 #include "confdefs.h"
2999 #include <pthread.h>
3001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3002 { (eval echo configure:3003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3004 if test -z "$ac_err"; then
3005 rm -rf conftest*
3006 eval "ac_cv_header_$ac_safe=yes"
3007 else
3008 echo "$ac_err" >&5
3009 echo "configure: failed program was:" >&5
3010 cat conftest.$ac_ext >&5
3011 rm -rf conftest*
3012 eval "ac_cv_header_$ac_safe=no"
3014 rm -f conftest*
3016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3017 echo "$ac_t""yes" 1>&6
3018 have_pthread_h=yes
3019 else
3020 echo "$ac_t""no" 1>&6
3021 have_pthread_h=
3025 # These tests can't be done till we know if we have limits.h.
3026 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
3027 echo "configure:3028: checking for CHAR_BIT" >&5
3028 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
3029 echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031 cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034 #ifdef HAVE_LIMITS_H
3035 #include <limits.h>
3036 #endif
3037 #ifdef CHAR_BIT
3038 found
3039 #endif
3041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3042 egrep "found" >/dev/null 2>&1; then
3043 rm -rf conftest*
3044 gcc_cv_decl_char_bit=yes
3045 else
3046 rm -rf conftest*
3047 gcc_cv_decl_char_bit=no
3049 rm -f conftest*
3054 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
3055 if test $gcc_cv_decl_char_bit = no; then
3056 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
3057 echo "configure:3058: checking number of bits in a byte" >&5
3058 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
3059 echo $ac_n "(cached) $ac_c" 1>&6
3060 else
3062 gcc_cv_c_nbby=
3063 while test $i -lt 65; do
3064 cat > conftest.$ac_ext <<EOF
3065 #line 3066 "configure"
3066 #include "confdefs.h"
3068 int main() {
3069 switch(0) {
3070 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
3071 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
3073 ; return 0; }
3075 if { (eval echo configure:3076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3076 rm -rf conftest*
3077 gcc_cv_c_nbby=$i; break
3078 else
3079 echo "configure: failed program was:" >&5
3080 cat conftest.$ac_ext >&5
3082 rm -f conftest*
3083 i=`expr $i + 1`
3084 done
3085 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3089 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3090 if test $gcc_cv_c_nbby = failed; then
3091 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3092 else
3093 cat >> confdefs.h <<EOF
3094 #define CHAR_BIT $gcc_cv_c_nbby
3099 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3100 echo "configure:3101: checking whether byte ordering is bigendian" >&5
3101 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3102 echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104 ac_cv_c_bigendian=unknown
3105 # See if sys/param.h defines the BYTE_ORDER macro.
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3108 "configure"
3108 #include "confdefs.h"
3109 #include <sys/types.h>
3110 #include <sys/param.h>
3111 int main() {
3113 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3114 bogus endian macros
3115 #endif
3116 ; return 0; }
3118 if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3119 rm -rf conftest*
3120 # It does; now see whether it defined to BIG_ENDIAN or not.
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <sys/types.h>
3125 #include <sys/param.h>
3126 int main() {
3128 #if BYTE_ORDER != BIG_ENDIAN
3129 not big endian
3130 #endif
3131 ; return 0; }
3133 if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3134 rm -rf conftest*
3135 ac_cv_c_bigendian=yes
3136 else
3137 echo "configure: failed program was:" >&5
3138 cat conftest.$ac_ext >&5
3139 rm -rf conftest*
3140 ac_cv_c_bigendian=no
3142 rm -f conftest*
3143 else
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3147 rm -f conftest*
3148 if test $ac_cv_c_bigendian = unknown; then
3149 if test "$cross_compiling" = yes; then
3150 echo $ac_n "cross-compiling... " 2>&6
3151 else
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 main () {
3156 /* Are we little or big endian? From Harbison&Steele. */
3157 union
3159 long l;
3160 char c[sizeof (long)];
3161 } u;
3162 u.l = 1;
3163 exit (u.c[sizeof (long) - 1] == 1);
3166 if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3167 then
3168 ac_cv_c_bigendian=no
3169 else
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -fr conftest*
3173 ac_cv_c_bigendian=yes
3175 rm -fr conftest*
3181 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3182 if test $ac_cv_c_bigendian = unknown; then
3183 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3184 echo "configure:3185: checking to probe for byte ordering" >&5
3186 cat >conftest.c <<EOF
3187 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3188 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3189 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3190 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3191 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3192 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3193 int main() { _ascii (); _ebcdic (); return 0; }
3195 if test -f conftest.c ; then
3196 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3197 if test `grep -l BIGenDianSyS conftest.o` ; then
3198 echo $ac_n ' big endian probe OK, ' 1>&6
3199 ac_cv_c_bigendian=yes
3201 if test `grep -l LiTTleEnDian conftest.o` ; then
3202 echo $ac_n ' little endian probe OK, ' 1>&6
3203 if test $ac_cv_c_bigendian = yes ; then
3204 ac_cv_c_bigendian=unknown;
3205 else
3206 ac_cv_c_bigendian=no
3209 echo $ac_n 'guessing bigendian ... ' >&6
3212 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3214 if test $ac_cv_c_bigendian = yes; then
3215 cat >> confdefs.h <<\EOF
3216 #define WORDS_BIGENDIAN 1
3219 cat >> confdefs.h <<\EOF
3220 #define HOST_WORDS_BIG_ENDIAN 1
3223 BYTEORDER=4321
3224 else
3225 BYTEORDER=1234
3227 cat >> confdefs.h <<EOF
3228 #define BYTEORDER $BYTEORDER
3231 if test $ac_cv_c_bigendian = unknown; then
3232 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3235 echo $ac_n "checking floating point format""... $ac_c" 1>&6
3236 echo "configure:3237: checking floating point format" >&5
3237 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
3238 echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3241 ac_ext=c
3242 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3243 ac_cpp='$CPP $CPPFLAGS'
3244 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3245 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3246 cross_compiling=$ac_cv_prog_cc_cross
3248 cat > conftest.$ac_ext <<EOF
3249 #line 3250 "configure"
3250 #include "confdefs.h"
3251 /* This will not work unless sizeof(double) == 8. */
3252 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
3254 /* This structure must have no internal padding. */
3255 struct possibility {
3256 char prefix[8];
3257 double candidate;
3258 char postfix[8];
3261 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3262 struct possibility table [] =
3264 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3265 C( 3.53802595280598432000e+18), /* D__float - VAX */
3266 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3267 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3268 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3271 if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3272 od -c conftest.o |
3273 sed 's/^[0-7]*[ ]*/ /
3274 s/\*/./g
3275 s/ \\n/*/g
3276 s/ [0-9][0-9][0-9]/./g
3277 s/ \\[^ ]/./g' |
3278 tr -d '
3279 ' | tr -s '*' '
3280 ' | fold | sed '$a\
3281 ' > conftest.dmp
3282 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3283 ac_cv_c_float_format='IEEE (big-endian)'
3284 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3285 ac_cv_c_float_format='IEEE (big-endian)'
3286 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3287 ac_cv_c_float_format='IEEE (little-endian)'
3288 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3289 ac_cv_c_float_format='IEEE (little-endian)'
3290 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3291 ac_cv_c_float_format='VAX D-float'
3292 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3293 ac_cv_c_float_format='PDP-10'
3294 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3295 ac_cv_c_float_format='IBM 370 hex'
3296 else
3297 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3299 else
3300 { echo "configure: error: compile failed" 1>&2; exit 1; }
3302 rm -rf conftest*
3303 ac_ext=c
3304 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3305 ac_cpp='$CPP $CPPFLAGS'
3306 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3307 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3308 cross_compiling=$ac_cv_prog_cc_cross
3313 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3314 # IEEE is the default format. If the float endianness isn't the same
3315 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3316 # (which is a tristate: yes, no, default). This is only an issue with
3317 # IEEE; the other formats are only supported by a few machines each,
3318 # all with the same endianness.
3319 format=
3320 fbigend=
3321 case $ac_cv_c_float_format in
3322 'IEEE (big-endian)' )
3323 if test $ac_cv_c_bigendian = no; then
3324 fbigend=1
3327 'IEEE (little-endian)' )
3328 if test $ac_cv_c_bigendian = yes; then
3329 fbigend=0
3332 'VAX D-float' )
3333 format=VAX_FLOAT_FORMAT
3335 'PDP-10' )
3336 format=PDP10_FLOAT_FORMAT
3338 'IBM 370 hex' )
3339 format=IBM_FLOAT_FORMAT
3341 esac
3342 if test -n "$format"; then
3343 cat >> confdefs.h <<EOF
3344 #define HOST_FLOAT_FORMAT $format
3348 if test -n "$fbigend"; then
3349 cat >> confdefs.h <<EOF
3350 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3356 # See if we have the mktemp command.
3357 # Extract the first word of "mktemp", so it can be a program name with args.
3358 set dummy mktemp; ac_word=$2
3359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3360 echo "configure:3361: checking for $ac_word" >&5
3361 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3362 echo $ac_n "(cached) $ac_c" 1>&6
3363 else
3364 if test -n "$have_mktemp_command"; then
3365 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3366 else
3367 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3368 ac_dummy="$PATH"
3369 for ac_dir in $ac_dummy; do
3370 test -z "$ac_dir" && ac_dir=.
3371 if test -f $ac_dir/$ac_word; then
3372 ac_cv_prog_have_mktemp_command="yes"
3373 break
3375 done
3376 IFS="$ac_save_ifs"
3377 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3380 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3381 if test -n "$have_mktemp_command"; then
3382 echo "$ac_t""$have_mktemp_command" 1>&6
3383 else
3384 echo "$ac_t""no" 1>&6
3388 # Do we have a single-tree copy of texinfo?
3389 if test -f $srcdir/../texinfo/Makefile.in; then
3390 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3391 gcc_cv_prog_makeinfo_modern=yes
3392 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3393 else
3394 # See if makeinfo has been installed and is modern enough
3395 # that we can use it.
3396 # Extract the first word of "makeinfo", so it can be a program name with args.
3397 set dummy makeinfo; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3401 echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403 if test -n "$MAKEINFO"; then
3404 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3405 else
3406 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3407 ac_dummy="$PATH"
3408 for ac_dir in $ac_dummy; do
3409 test -z "$ac_dir" && ac_dir=.
3410 if test -f $ac_dir/$ac_word; then
3411 ac_cv_prog_MAKEINFO="makeinfo"
3412 break
3414 done
3415 IFS="$ac_save_ifs"
3418 MAKEINFO="$ac_cv_prog_MAKEINFO"
3419 if test -n "$MAKEINFO"; then
3420 echo "$ac_t""$MAKEINFO" 1>&6
3421 else
3422 echo "$ac_t""no" 1>&6
3425 if test -n "$MAKEINFO"; then
3426 # Found it, now check the version.
3427 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3428 echo "configure:3429: checking for modern makeinfo" >&5
3429 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3430 echo $ac_n "(cached) $ac_c" 1>&6
3431 else
3432 ac_prog_version=`$MAKEINFO --version 2>&1 |
3433 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3434 echo "configure:3435: version of makeinfo is $ac_prog_version" >&5
3435 case $ac_prog_version in
3436 '') gcc_cv_prog_makeinfo_modern=no;;
3437 4.[2-9]*)
3438 gcc_cv_prog_makeinfo_modern=yes;;
3439 *) gcc_cv_prog_makeinfo_modern=no;;
3440 esac
3444 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3445 else
3446 gcc_cv_prog_makeinfo_modern=no
3451 if test $gcc_cv_prog_makeinfo_modern = no; then
3452 echo "configure: warning:
3453 *** Makeinfo is missing or too old.
3454 *** Info documentation will not be built." 1>&2
3455 BUILD_INFO=
3456 else
3457 BUILD_INFO=info
3460 # Is pod2man recent enough to regenerate manpages?
3461 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3462 echo "configure:3463: checking for recent Pod::Man" >&5
3463 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3464 echo "$ac_t""yes" 1>&6
3465 GENERATED_MANPAGES=generated-manpages
3466 else
3467 echo "$ac_t""no" 1>&6
3468 GENERATED_MANPAGES=
3471 # How about lex?
3472 if test -f $srcdir/../flex/skel.c; then
3473 FLEX='$(objdir)/../flex/flex'
3474 else
3475 # Extract the first word of "flex", so it can be a program name with args.
3476 set dummy flex; ac_word=$2
3477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_word" >&5
3479 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 if test -n "$FLEX"; then
3483 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3484 else
3485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3486 ac_dummy="$PATH"
3487 for ac_dir in $ac_dummy; do
3488 test -z "$ac_dir" && ac_dir=.
3489 if test -f $ac_dir/$ac_word; then
3490 ac_cv_prog_FLEX="flex"
3491 break
3493 done
3494 IFS="$ac_save_ifs"
3495 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
3498 FLEX="$ac_cv_prog_FLEX"
3499 if test -n "$FLEX"; then
3500 echo "$ac_t""$FLEX" 1>&6
3501 else
3502 echo "$ac_t""no" 1>&6
3507 # Bison?
3508 # The -L switch is so bison can find its skeleton file.
3509 if test -f $srcdir/../bison/bison.simple; then
3510 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3511 else
3512 # Extract the first word of "bison", so it can be a program name with args.
3513 set dummy bison; ac_word=$2
3514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3515 echo "configure:3516: checking for $ac_word" >&5
3516 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3517 echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519 if test -n "$BISON"; then
3520 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3521 else
3522 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3523 ac_dummy="$PATH"
3524 for ac_dir in $ac_dummy; do
3525 test -z "$ac_dir" && ac_dir=.
3526 if test -f $ac_dir/$ac_word; then
3527 ac_cv_prog_BISON="bison"
3528 break
3530 done
3531 IFS="$ac_save_ifs"
3532 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
3535 BISON="$ac_cv_prog_BISON"
3536 if test -n "$BISON"; then
3537 echo "$ac_t""$BISON" 1>&6
3538 else
3539 echo "$ac_t""no" 1>&6
3544 # These libraries may be used by collect2.
3545 # We may need a special search path to get them linked.
3546 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3547 echo "configure:3548: checking for collect2 libraries" >&5
3548 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3549 echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551 save_LIBS="$LIBS"
3552 for libs in '' -lld -lmld \
3553 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3554 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3556 LIBS="$libs"
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 /* Override any gcc2 internal prototype to avoid an error. */
3561 /* We use char because int might match the return type of a gcc2
3562 builtin and then its argument prototype would still apply. */
3563 char ldopen();
3565 int main() {
3566 ldopen()
3567 ; return 0; }
3569 if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3570 rm -rf conftest*
3571 gcc_cv_collect2_libs="$libs"; break
3572 else
3573 echo "configure: failed program was:" >&5
3574 cat conftest.$ac_ext >&5
3576 rm -f conftest*
3577 done
3578 LIBS="$save_LIBS"
3579 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3582 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3583 case $gcc_cv_collect2_libs in
3584 "none required") ;;
3585 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3586 esac
3589 # When building Ada code on Alpha, we need exc_resume which is usually in
3590 # -lexc. So test for it.
3591 save_LIBS="$LIBS"
3592 LIBS=
3594 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3595 echo "configure:3596: checking for library containing exc_resume" >&5
3596 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3597 echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599 ac_func_search_save_LIBS="$LIBS"
3600 ac_cv_search_exc_resume="no"
3601 cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604 /* Override any gcc2 internal prototype to avoid an error. */
3605 /* We use char because int might match the return type of a gcc2
3606 builtin and then its argument prototype would still apply. */
3607 char exc_resume();
3609 int main() {
3610 exc_resume()
3611 ; return 0; }
3613 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3614 rm -rf conftest*
3615 ac_cv_search_exc_resume="none required"
3616 else
3617 echo "configure: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3620 rm -f conftest*
3621 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3622 LIBS="-l$i $ac_func_search_save_LIBS"
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 /* Override any gcc2 internal prototype to avoid an error. */
3627 /* We use char because int might match the return type of a gcc2
3628 builtin and then its argument prototype would still apply. */
3629 char exc_resume();
3631 int main() {
3632 exc_resume()
3633 ; return 0; }
3635 if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3636 rm -rf conftest*
3637 ac_cv_search_exc_resume="-l$i"
3638 break
3639 else
3640 echo "configure: failed program was:" >&5
3641 cat conftest.$ac_ext >&5
3643 rm -f conftest*
3644 done
3645 LIBS="$ac_func_search_save_LIBS"
3648 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3649 if test "$ac_cv_search_exc_resume" != "no"; then
3650 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3652 else :
3655 GNAT_LIBEXC="$LIBS"
3656 LIBS="$save_LIBS"
3659 # See if the stage1 system preprocessor understands the ANSI C
3660 # preprocessor stringification operator. (Used by symcat.h.)
3663 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3664 echo "configure:3665: checking for preprocessor stringizing operator" >&5
3665 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668 cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3672 #define x(y) #y
3674 char *s = x(teststring);
3677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3678 egrep "#teststring" >/dev/null 2>&1; then
3679 rm -rf conftest*
3680 ac_cv_c_stringize=no
3681 else
3682 rm -rf conftest*
3683 ac_cv_c_stringize=yes
3685 rm -f conftest*
3689 if test "${ac_cv_c_stringize}" = yes
3690 then
3691 cat >> confdefs.h <<\EOF
3692 #define HAVE_STRINGIZE 1
3696 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3699 # Use <inttypes.h> only if it exists,
3700 # doesn't clash with <sys/types.h>, and declares intmax_t.
3701 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3702 echo "configure:3703: checking for inttypes.h" >&5
3703 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3704 echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706 cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709 #include <sys/types.h>
3710 #include <inttypes.h>
3711 int main() {
3712 intmax_t i = -1;
3713 ; return 0; }
3715 if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3716 rm -rf conftest*
3717 gcc_cv_header_inttypes_h=yes
3718 else
3719 echo "configure: failed program was:" >&5
3720 cat conftest.$ac_ext >&5
3721 rm -rf conftest*
3722 gcc_cv_header_inttypes_h=no
3724 rm -f conftest*
3727 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3728 if test $gcc_cv_header_inttypes_h = yes; then
3729 cat >> confdefs.h <<\EOF
3730 #define HAVE_INTTYPES_H 1
3736 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3737 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3738 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3739 scandir alphasort
3741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3742 echo "configure:3743: checking for $ac_func" >&5
3743 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3744 echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 /* System header to define __stub macros and hopefully few prototypes,
3750 which can conflict with char $ac_func(); below. */
3751 #include <assert.h>
3752 /* Override any gcc2 internal prototype to avoid an error. */
3753 /* We use char because int might match the return type of a gcc2
3754 builtin and then its argument prototype would still apply. */
3755 char $ac_func();
3757 int main() {
3759 /* The GNU C library defines this for functions which it implements
3760 to always fail with ENOSYS. Some functions are actually named
3761 something starting with __ and the normal name is an alias. */
3762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3763 choke me
3764 #else
3765 $ac_func();
3766 #endif
3768 ; return 0; }
3770 if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3771 rm -rf conftest*
3772 eval "ac_cv_func_$ac_func=yes"
3773 else
3774 echo "configure: failed program was:" >&5
3775 cat conftest.$ac_ext >&5
3776 rm -rf conftest*
3777 eval "ac_cv_func_$ac_func=no"
3779 rm -f conftest*
3782 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3783 echo "$ac_t""yes" 1>&6
3784 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3785 cat >> confdefs.h <<EOF
3786 #define $ac_tr_func 1
3789 else
3790 echo "$ac_t""no" 1>&6
3792 done
3795 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3796 echo "configure:3797: checking for ssize_t" >&5
3797 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <sys/types.h>
3804 #if STDC_HEADERS
3805 #include <stdlib.h>
3806 #include <stddef.h>
3807 #endif
3809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3810 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3811 rm -rf conftest*
3812 ac_cv_type_ssize_t=yes
3813 else
3814 rm -rf conftest*
3815 ac_cv_type_ssize_t=no
3817 rm -f conftest*
3820 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3821 if test $ac_cv_type_ssize_t = no; then
3822 cat >> confdefs.h <<\EOF
3823 #define ssize_t int
3829 # Try to determine the array type of the second argument of getgroups
3830 # for the target system (int or gid_t).
3831 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3832 echo "configure:3833: checking for uid_t in sys/types.h" >&5
3833 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3834 echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836 cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <sys/types.h>
3841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3842 egrep "uid_t" >/dev/null 2>&1; then
3843 rm -rf conftest*
3844 ac_cv_type_uid_t=yes
3845 else
3846 rm -rf conftest*
3847 ac_cv_type_uid_t=no
3849 rm -f conftest*
3853 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3854 if test $ac_cv_type_uid_t = no; then
3855 cat >> confdefs.h <<\EOF
3856 #define uid_t int
3859 cat >> confdefs.h <<\EOF
3860 #define gid_t int
3865 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3866 echo "configure:3867: checking type of array argument to getgroups" >&5
3867 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3868 echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870 if test "$cross_compiling" = yes; then
3871 ac_cv_type_getgroups=cross
3872 else
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3877 /* Thanks to Mike Rendell for this test. */
3878 #include <sys/types.h>
3879 #define NGID 256
3880 #undef MAX
3881 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3882 main()
3884 gid_t gidset[NGID];
3885 int i, n;
3886 union { gid_t gval; long lval; } val;
3888 val.lval = -1;
3889 for (i = 0; i < NGID; i++)
3890 gidset[i] = val.gval;
3891 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3892 gidset);
3893 /* Exit non-zero if getgroups seems to require an array of ints. This
3894 happens when gid_t is short but getgroups modifies an array of ints. */
3895 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3899 if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3900 then
3901 ac_cv_type_getgroups=gid_t
3902 else
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905 rm -fr conftest*
3906 ac_cv_type_getgroups=int
3908 rm -fr conftest*
3911 if test $ac_cv_type_getgroups = cross; then
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <unistd.h>
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3919 rm -rf conftest*
3920 ac_cv_type_getgroups=gid_t
3921 else
3922 rm -rf conftest*
3923 ac_cv_type_getgroups=int
3925 rm -f conftest*
3930 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3931 cat >> confdefs.h <<EOF
3932 #define GETGROUPS_T $ac_cv_type_getgroups
3936 if test "${target}" = "${build}"; then
3937 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3938 else
3939 case "${target}" in
3940 # This condition may need some tweaking. It should include all
3941 # targets where the array type of the second argument of getgroups
3942 # is int and the type of gid_t is not equivalent to int.
3943 *-*-sunos* | *-*-ultrix*)
3944 TARGET_GETGROUPS_T=int
3947 TARGET_GETGROUPS_T=gid_t
3949 esac
3953 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3954 echo "configure:3955: checking whether the printf functions support %p" >&5
3955 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3956 echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958 if test "$cross_compiling" = yes; then
3959 gcc_cv_func_printf_ptr=no
3960 else
3961 cat > conftest.$ac_ext <<EOF
3962 #line 3963 "configure"
3963 #include "confdefs.h"
3964 #include <stdio.h>
3966 int main()
3968 char buf[64];
3969 char *p = buf, *q = NULL;
3970 sprintf(buf, "%p", p);
3971 sscanf(buf, "%p", &q);
3972 return (p != q);
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3976 then
3977 gcc_cv_func_printf_ptr=yes
3978 else
3979 echo "configure: failed program was:" >&5
3980 cat conftest.$ac_ext >&5
3981 rm -fr conftest*
3982 gcc_cv_func_printf_ptr=no
3984 rm -fr conftest*
3987 rm -f core core.* *.core
3990 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3991 if test $gcc_cv_func_printf_ptr = yes ; then
3992 cat >> confdefs.h <<\EOF
3993 #define HAVE_PRINTF_PTR 1
3999 case "${host}" in
4000 *-*-uwin*)
4001 { echo "configure: error:
4002 *** UWIN may not be used as a host platform because
4003 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
4005 *-*-*vms*)
4006 # Under VMS, vfork works very different than on Unix. The standard test
4007 # won't work, and it isn't easily adaptable. It makes more sense to
4008 # just force it.
4009 ac_cv_func_vfork_works=yes
4011 esac
4012 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4013 echo "configure:4014: checking for pid_t" >&5
4014 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4015 echo $ac_n "(cached) $ac_c" 1>&6
4016 else
4017 cat > conftest.$ac_ext <<EOF
4018 #line 4019 "configure"
4019 #include "confdefs.h"
4020 #include <sys/types.h>
4021 #if STDC_HEADERS
4022 #include <stdlib.h>
4023 #include <stddef.h>
4024 #endif
4026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4027 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4028 rm -rf conftest*
4029 ac_cv_type_pid_t=yes
4030 else
4031 rm -rf conftest*
4032 ac_cv_type_pid_t=no
4034 rm -f conftest*
4037 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4038 if test $ac_cv_type_pid_t = no; then
4039 cat >> confdefs.h <<\EOF
4040 #define pid_t int
4045 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4046 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4047 echo "configure:4048: checking for vfork.h" >&5
4048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4049 echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051 cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 #include <vfork.h>
4056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4057 { (eval echo configure:4058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4059 if test -z "$ac_err"; then
4060 rm -rf conftest*
4061 eval "ac_cv_header_$ac_safe=yes"
4062 else
4063 echo "$ac_err" >&5
4064 echo "configure: failed program was:" >&5
4065 cat conftest.$ac_ext >&5
4066 rm -rf conftest*
4067 eval "ac_cv_header_$ac_safe=no"
4069 rm -f conftest*
4071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4072 echo "$ac_t""yes" 1>&6
4073 cat >> confdefs.h <<\EOF
4074 #define HAVE_VFORK_H 1
4077 else
4078 echo "$ac_t""no" 1>&6
4081 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4082 echo "configure:4083: checking for working vfork" >&5
4083 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4084 echo $ac_n "(cached) $ac_c" 1>&6
4085 else
4086 if test "$cross_compiling" = yes; then
4087 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4088 echo "configure:4089: checking for vfork" >&5
4089 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095 /* System header to define __stub macros and hopefully few prototypes,
4096 which can conflict with char vfork(); below. */
4097 #include <assert.h>
4098 /* Override any gcc2 internal prototype to avoid an error. */
4099 /* We use char because int might match the return type of a gcc2
4100 builtin and then its argument prototype would still apply. */
4101 char vfork();
4103 int main() {
4105 /* The GNU C library defines this for functions which it implements
4106 to always fail with ENOSYS. Some functions are actually named
4107 something starting with __ and the normal name is an alias. */
4108 #if defined (__stub_vfork) || defined (__stub___vfork)
4109 choke me
4110 #else
4111 vfork();
4112 #endif
4114 ; return 0; }
4116 if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4117 rm -rf conftest*
4118 eval "ac_cv_func_vfork=yes"
4119 else
4120 echo "configure: failed program was:" >&5
4121 cat conftest.$ac_ext >&5
4122 rm -rf conftest*
4123 eval "ac_cv_func_vfork=no"
4125 rm -f conftest*
4128 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4129 echo "$ac_t""yes" 1>&6
4131 else
4132 echo "$ac_t""no" 1>&6
4135 ac_cv_func_vfork_works=$ac_cv_func_vfork
4136 else
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 /* Thanks to Paul Eggert for this test. */
4141 #include <stdio.h>
4142 #include <sys/types.h>
4143 #include <sys/stat.h>
4144 #ifdef HAVE_UNISTD_H
4145 #include <unistd.h>
4146 #endif
4147 #ifdef HAVE_VFORK_H
4148 #include <vfork.h>
4149 #endif
4150 /* On some sparc systems, changes by the child to local and incoming
4151 argument registers are propagated back to the parent.
4152 The compiler is told about this with #include <vfork.h>,
4153 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4154 Test for this by using a static variable whose address
4155 is put into a register that is clobbered by the vfork. */
4156 static
4157 #ifdef __cplusplus
4158 sparc_address_test (int arg)
4159 #else
4160 sparc_address_test (arg) int arg;
4161 #endif
4163 static pid_t child;
4164 if (!child) {
4165 child = vfork ();
4166 if (child < 0) {
4167 perror ("vfork");
4168 _exit(2);
4170 if (!child) {
4171 arg = getpid();
4172 write(-1, "", 0);
4173 _exit (arg);
4177 main() {
4178 pid_t parent = getpid ();
4179 pid_t child;
4181 sparc_address_test ();
4183 child = vfork ();
4185 if (child == 0) {
4186 /* Here is another test for sparc vfork register problems.
4187 This test uses lots of local variables, at least
4188 as many local variables as main has allocated so far
4189 including compiler temporaries. 4 locals are enough for
4190 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4191 A buggy compiler should reuse the register of parent
4192 for one of the local variables, since it will think that
4193 parent can't possibly be used any more in this routine.
4194 Assigning to the local variable will thus munge parent
4195 in the parent process. */
4196 pid_t
4197 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4198 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4199 /* Convince the compiler that p..p7 are live; otherwise, it might
4200 use the same hardware register for all 8 local variables. */
4201 if (p != p1 || p != p2 || p != p3 || p != p4
4202 || p != p5 || p != p6 || p != p7)
4203 _exit(1);
4205 /* On some systems (e.g. IRIX 3.3),
4206 vfork doesn't separate parent from child file descriptors.
4207 If the child closes a descriptor before it execs or exits,
4208 this munges the parent's descriptor as well.
4209 Test for this by closing stdout in the child. */
4210 _exit(close(fileno(stdout)) != 0);
4211 } else {
4212 int status;
4213 struct stat st;
4215 while (wait(&status) != child)
4217 exit(
4218 /* Was there some problem with vforking? */
4219 child < 0
4221 /* Did the child fail? (This shouldn't happen.) */
4222 || status
4224 /* Did the vfork/compiler bug occur? */
4225 || parent != getpid()
4227 /* Did the file descriptor bug occur? */
4228 || fstat(fileno(stdout), &st) != 0
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4234 then
4235 ac_cv_func_vfork_works=yes
4236 else
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 rm -fr conftest*
4240 ac_cv_func_vfork_works=no
4242 rm -fr conftest*
4247 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4248 if test $ac_cv_func_vfork_works = no; then
4249 cat >> confdefs.h <<\EOF
4250 #define vfork fork
4255 for ac_func in getpagesize
4257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4258 echo "configure:4259: checking for $ac_func" >&5
4259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4260 echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 /* System header to define __stub macros and hopefully few prototypes,
4266 which can conflict with char $ac_func(); below. */
4267 #include <assert.h>
4268 /* Override any gcc2 internal prototype to avoid an error. */
4269 /* We use char because int might match the return type of a gcc2
4270 builtin and then its argument prototype would still apply. */
4271 char $ac_func();
4273 int main() {
4275 /* The GNU C library defines this for functions which it implements
4276 to always fail with ENOSYS. Some functions are actually named
4277 something starting with __ and the normal name is an alias. */
4278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4279 choke me
4280 #else
4281 $ac_func();
4282 #endif
4284 ; return 0; }
4286 if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4287 rm -rf conftest*
4288 eval "ac_cv_func_$ac_func=yes"
4289 else
4290 echo "configure: failed program was:" >&5
4291 cat conftest.$ac_ext >&5
4292 rm -rf conftest*
4293 eval "ac_cv_func_$ac_func=no"
4295 rm -f conftest*
4298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4299 echo "$ac_t""yes" 1>&6
4300 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4301 cat >> confdefs.h <<EOF
4302 #define $ac_tr_func 1
4305 else
4306 echo "$ac_t""no" 1>&6
4308 done
4310 # The test program for the next two tests is the same except for one
4311 # set of ifdefs.
4312 cat >ct-mmap.inc <<'EOF'
4313 #include <sys/types.h>
4314 #include <sys/mman.h>
4315 #include <fcntl.h>
4316 #include <signal.h>
4317 #include <setjmp.h>
4318 #include <stdio.h>
4320 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4321 # define MAP_ANONYMOUS MAP_ANON
4322 #endif
4324 /* This mess was copied from the GNU getpagesize.h. */
4325 #ifndef HAVE_GETPAGESIZE
4326 # ifdef HAVE_UNISTD_H
4327 # include <unistd.h>
4328 # endif
4330 /* Assume that all systems that can run configure have sys/param.h. */
4331 # ifndef HAVE_SYS_PARAM_H
4332 # define HAVE_SYS_PARAM_H 1
4333 # endif
4335 # ifdef _SC_PAGESIZE
4336 # define getpagesize() sysconf(_SC_PAGESIZE)
4337 # else /* no _SC_PAGESIZE */
4338 # ifdef HAVE_SYS_PARAM_H
4339 # include <sys/param.h>
4340 # ifdef EXEC_PAGESIZE
4341 # define getpagesize() EXEC_PAGESIZE
4342 # else /* no EXEC_PAGESIZE */
4343 # ifdef NBPG
4344 # define getpagesize() NBPG * CLSIZE
4345 # ifndef CLSIZE
4346 # define CLSIZE 1
4347 # endif /* no CLSIZE */
4348 # else /* no NBPG */
4349 # ifdef NBPC
4350 # define getpagesize() NBPC
4351 # else /* no NBPC */
4352 # ifdef PAGESIZE
4353 # define getpagesize() PAGESIZE
4354 # endif /* PAGESIZE */
4355 # endif /* no NBPC */
4356 # endif /* no NBPG */
4357 # endif /* no EXEC_PAGESIZE */
4358 # else /* no HAVE_SYS_PARAM_H */
4359 # define getpagesize() 8192 /* punt totally */
4360 # endif /* no HAVE_SYS_PARAM_H */
4361 # endif /* no _SC_PAGESIZE */
4363 #endif /* no HAVE_GETPAGESIZE */
4365 #ifndef MAP_FAILED
4366 # define MAP_FAILED -1
4367 #endif
4369 #undef perror_exit
4370 #define perror_exit(str, val) \
4371 do { perror(str); exit(val); } while (0)
4373 /* Some versions of cygwin mmap require that munmap is called with the
4374 same parameters as mmap. GCC expects that this is not the case.
4375 Test for various forms of this problem. Warning - icky signal games. */
4377 static sigset_t unblock_sigsegv;
4378 static jmp_buf r;
4379 static size_t pg;
4380 static int devzero;
4382 static char *
4383 anonmap (size)
4384 size_t size;
4386 #ifdef USE_MAP_ANON
4387 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4388 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4389 #else
4390 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4391 MAP_PRIVATE, devzero, 0);
4392 #endif
4395 static void
4396 sigsegv (unused)
4397 int unused;
4399 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4400 longjmp (r, 1);
4403 /* Basic functionality test. */
4404 void
4405 test_0 ()
4407 char *x = anonmap (pg);
4408 if (x == (char *) MAP_FAILED)
4409 perror_exit("test 0 mmap", 2);
4411 *(int *)x += 1;
4413 if (munmap(x, pg) < 0)
4414 perror_exit("test 0 munmap", 3);
4417 /* 1. If we map a 2-page region and unmap its second page, the first page
4418 must remain. */
4419 static void
4420 test_1 ()
4422 char *x = anonmap (pg * 2);
4423 if (x == (char *)MAP_FAILED)
4424 perror_exit ("test 1 mmap", 4);
4426 signal (SIGSEGV, sigsegv);
4427 if (setjmp (r))
4428 perror_exit ("test 1 fault", 5);
4430 x[0] = 1;
4431 x[pg] = 1;
4433 if (munmap (x + pg, pg) < 0)
4434 perror_exit ("test 1 munmap 1", 6);
4435 x[0] = 2;
4437 if (setjmp (r) == 0)
4439 x[pg] = 1;
4440 perror_exit ("test 1 no fault", 7);
4442 if (munmap (x, pg) < 0)
4443 perror_exit ("test 1 munmap 2", 8);
4446 /* 2. If we map a 2-page region and unmap its first page, the second
4447 page must remain. */
4448 static void
4449 test_2 ()
4451 char *x = anonmap (pg * 2);
4452 if (x == (char *)MAP_FAILED)
4453 perror_exit ("test 2 mmap", 9);
4455 signal (SIGSEGV, sigsegv);
4456 if (setjmp (r))
4457 perror_exit ("test 2 fault", 10);
4459 x[0] = 1;
4460 x[pg] = 1;
4462 if (munmap (x, pg) < 0)
4463 perror_exit ("test 2 munmap 1", 11);
4465 x[pg] = 2;
4467 if (setjmp (r) == 0)
4469 x[0] = 1;
4470 perror_exit ("test 2 no fault", 12);
4473 if (munmap (x+pg, pg) < 0)
4474 perror_exit ("test 2 munmap 2", 13);
4477 /* 3. If we map two adjacent 1-page regions and unmap them both with
4478 one munmap, both must go away.
4480 Getting two adjacent 1-page regions with two mmap calls is slightly
4481 tricky. All OS's tested skip over already-allocated blocks; therefore
4482 we have been careful to unmap all allocated regions in previous tests.
4483 HP/UX allocates pages backward in memory. No OS has yet been observed
4484 to be so perverse as to leave unmapped space between consecutive calls
4485 to mmap. */
4487 static void
4488 test_3 ()
4490 char *x, *y, *z;
4492 x = anonmap (pg);
4493 if (x == (char *)MAP_FAILED)
4494 perror_exit ("test 3 mmap 1", 14);
4495 y = anonmap (pg);
4496 if (y == (char *)MAP_FAILED)
4497 perror_exit ("test 3 mmap 2", 15);
4499 if (y != x + pg)
4501 if (y == x - pg)
4502 z = y, y = x, x = z;
4503 else
4505 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4506 (unsigned long)x, (unsigned long)y);
4507 exit (16);
4511 signal (SIGSEGV, sigsegv);
4512 if (setjmp (r))
4513 perror_exit ("test 3 fault", 17);
4515 x[0] = 1;
4516 y[0] = 1;
4518 if (munmap (x, pg*2) < 0)
4519 perror_exit ("test 3 munmap", 18);
4521 if (setjmp (r) == 0)
4523 x[0] = 1;
4524 perror_exit ("test 3 no fault 1", 19);
4527 signal (SIGSEGV, sigsegv);
4528 if (setjmp (r) == 0)
4530 y[0] = 1;
4531 perror_exit ("test 3 no fault 2", 20);
4536 main ()
4538 sigemptyset (&unblock_sigsegv);
4539 sigaddset (&unblock_sigsegv, SIGSEGV);
4540 pg = getpagesize ();
4541 #ifndef USE_MAP_ANON
4542 devzero = open ("/dev/zero", O_RDWR);
4543 if (devzero < 0)
4544 perror_exit ("open /dev/zero", 1);
4545 #endif
4547 test_0();
4548 test_1();
4549 test_2();
4550 test_3();
4552 exit(0);
4556 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4557 echo "configure:4558: checking for working mmap from /dev/zero" >&5
4558 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561 if test "$cross_compiling" = yes; then
4562 # When cross-building, assume that this works, unless we know it
4563 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4564 # on the host, let alone whether mmap will work on it.
4565 case "$host_os" in
4566 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4567 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4568 * ) ac_cv_func_mmap_dev_zero=yes ;;
4569 esac
4570 else
4571 cat > conftest.$ac_ext <<EOF
4572 #line 4573 "configure"
4573 #include "confdefs.h"
4574 #include "ct-mmap.inc"
4576 if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4577 then
4578 ac_cv_func_mmap_dev_zero=yes
4579 else
4580 echo "configure: failed program was:" >&5
4581 cat conftest.$ac_ext >&5
4582 rm -fr conftest*
4583 if test $? -lt 4
4584 then ac_cv_func_mmap_dev_zero=no
4585 else ac_cv_func_mmap_dev_zero=buggy
4588 rm -fr conftest*
4594 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4595 if test $ac_cv_func_mmap_dev_zero = yes; then
4596 cat >> confdefs.h <<\EOF
4597 #define HAVE_MMAP_DEV_ZERO 1
4602 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4603 echo "configure:4604: checking for working mmap with MAP_ANON(YMOUS)" >&5
4604 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4605 echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607 if test "$cross_compiling" = yes; then
4608 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4609 # just because it's there. Some SCO Un*xen define it but don't implement it.
4610 case "$host_os" in
4611 darwin* ) ac_cv_func_mmap_anon=yes ;;
4612 * ) ac_cv_func_mmap_anon=no ;;
4613 esac
4614 else
4615 cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 #define USE_MAP_ANON
4619 #include "ct-mmap.inc"
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4622 then
4623 ac_cv_func_mmap_anon=yes
4624 else
4625 echo "configure: failed program was:" >&5
4626 cat conftest.$ac_ext >&5
4627 rm -fr conftest*
4628 if test $? -lt 4
4629 then ac_cv_func_mmap_anon=no
4630 else ac_cv_func_mmap_anon=buggy
4633 rm -fr conftest*
4639 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4640 if test $ac_cv_func_mmap_anon = yes; then
4641 cat >> confdefs.h <<\EOF
4642 #define HAVE_MMAP_ANON 1
4646 rm -f ct-mmap.inc
4648 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4649 echo "configure:4650: checking for working mmap of a file" >&5
4650 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4651 echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653 # Create a file one thousand bytes long.
4654 for i in 1 2 3 4 5 6 7 8 9 0
4655 do for j in 1 2 3 4 5 6 7 8 9 0
4656 do echo $i $j xxxxx
4657 done
4658 done > conftestdata$$
4660 if test "$cross_compiling" = yes; then
4661 case "$host_os" in
4662 darwin* ) ac_cv_func_mmap_file=yes ;;
4663 * ) ac_cv_func_mmap_file=no ;;
4664 esac
4665 else
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4670 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4671 Richard Henderson and Alexandre Oliva.
4672 Check whether read-only mmap of a plain file works. */
4673 #include <sys/types.h>
4674 #include <sys/stat.h>
4675 #include <fcntl.h>
4676 #include <sys/mman.h>
4678 int main()
4680 char *x;
4681 int fd;
4682 struct stat st;
4684 fd = open("conftestdata$$", O_RDONLY);
4685 if (fd < 0)
4686 exit(1);
4688 if (fstat (fd, &st))
4689 exit(2);
4691 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4692 if (x == (char *) -1)
4693 exit(3);
4695 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4696 exit(4);
4698 if (munmap(x, st.st_size) < 0)
4699 exit(5);
4701 exit(0);
4704 if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4705 then
4706 ac_cv_func_mmap_file=yes
4707 else
4708 echo "configure: failed program was:" >&5
4709 cat conftest.$ac_ext >&5
4710 rm -fr conftest*
4711 ac_cv_func_mmap_file=no
4713 rm -fr conftest*
4718 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4719 if test $ac_cv_func_mmap_file = yes; then
4720 cat >> confdefs.h <<\EOF
4721 #define HAVE_MMAP_FILE 1
4729 am_cv_lib_iconv_ldpath=
4730 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4731 if test "${with_libiconv_prefix+set}" = set; then
4732 withval="$with_libiconv_prefix"
4734 for dir in `echo "$withval" | tr : ' '`; do
4735 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4736 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4737 done
4742 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4743 echo "configure:4744: checking for iconv" >&5
4744 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4745 echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4748 am_cv_func_iconv="no, consider installing GNU libiconv"
4749 am_cv_lib_iconv=no
4750 cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 #include <stdlib.h>
4754 #include <iconv.h>
4755 int main() {
4756 iconv_t cd = iconv_open("","");
4757 iconv(cd,NULL,NULL,NULL,NULL);
4758 iconv_close(cd);
4759 ; return 0; }
4761 if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762 rm -rf conftest*
4763 am_cv_func_iconv=yes
4764 else
4765 echo "configure: failed program was:" >&5
4766 cat conftest.$ac_ext >&5
4768 rm -f conftest*
4769 if test "$am_cv_func_iconv" != yes; then
4770 am_save_LIBS="$LIBS"
4771 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4772 cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775 #include <stdlib.h>
4776 #include <iconv.h>
4777 int main() {
4778 iconv_t cd = iconv_open("","");
4779 iconv(cd,NULL,NULL,NULL,NULL);
4780 iconv_close(cd);
4781 ; return 0; }
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784 rm -rf conftest*
4785 am_cv_lib_iconv=yes
4786 am_cv_func_iconv=yes
4787 else
4788 echo "configure: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4791 rm -f conftest*
4792 LIBS="$am_save_LIBS"
4797 echo "$ac_t""$am_cv_func_iconv" 1>&6
4798 if test "$am_cv_func_iconv" = yes; then
4799 cat >> confdefs.h <<\EOF
4800 #define HAVE_ICONV 1
4803 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4804 echo "configure:4805: checking for iconv declaration" >&5
4805 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4809 cat > conftest.$ac_ext <<EOF
4810 #line 4811 "configure"
4811 #include "confdefs.h"
4813 #include <stdlib.h>
4814 #include <iconv.h>
4815 extern
4816 #ifdef __cplusplus
4818 #endif
4819 #if defined(__STDC__) || defined(__cplusplus)
4820 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4821 #else
4822 size_t iconv();
4823 #endif
4825 int main() {
4827 ; return 0; }
4829 if { (eval echo configure:4830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4830 rm -rf conftest*
4831 am_cv_proto_iconv_arg1=""
4832 else
4833 echo "configure: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4835 rm -rf conftest*
4836 am_cv_proto_iconv_arg1="const"
4838 rm -f conftest*
4839 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);"
4842 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4843 echo "$ac_t""${ac_t:-
4844 }$am_cv_proto_iconv" 1>&6
4845 cat >> confdefs.h <<EOF
4846 #define ICONV_CONST $am_cv_proto_iconv_arg1
4850 LIBICONV=
4851 if test "$am_cv_lib_iconv" = yes; then
4852 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4857 # We will need to find libiberty.h and ansidecl.h
4858 saved_CFLAGS="$CFLAGS"
4859 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4860 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4861 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4862 fprintf_unlocked strstr errno vasprintf \
4863 malloc realloc calloc free basename getopt clock
4865 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4866 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4867 echo "configure:4868: checking whether $ac_func is declared" >&5
4868 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871 cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874 #undef $ac_tr_decl
4875 #define $ac_tr_decl 1
4877 #include "ansidecl.h"
4878 #include "system.h"
4880 int main() {
4881 #ifndef $ac_func
4882 char *(*pfn) = (char *(*)) $ac_func ;
4883 #endif
4884 ; return 0; }
4886 if { (eval echo configure:4887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4887 rm -rf conftest*
4888 eval "gcc_cv_have_decl_$ac_func=yes"
4889 else
4890 echo "configure: failed program was:" >&5
4891 cat conftest.$ac_ext >&5
4892 rm -rf conftest*
4893 eval "gcc_cv_have_decl_$ac_func=no"
4895 rm -f conftest*
4898 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4899 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4900 #define $ac_tr_decl 1
4903 else
4904 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4905 #define $ac_tr_decl 0
4910 done
4911 if test x = y ; then
4912 cat >> confdefs.h <<\EOF
4913 #define HAVE_DECL_GETENV 1
4915 cat >> confdefs.h <<\EOF
4916 #define HAVE_DECL_ATOL 1
4918 cat >> confdefs.h <<\EOF
4919 #define HAVE_DECL_SBRK 1
4921 cat >> confdefs.h <<\EOF
4922 #define HAVE_DECL_ABORT 1
4924 cat >> confdefs.h <<\EOF
4925 #define HAVE_DECL_ATOF 1
4927 cat >> confdefs.h <<\EOF
4928 #define HAVE_DECL_GETCWD 1
4930 cat >> confdefs.h <<\EOF
4931 #define HAVE_DECL_GETWD 1
4934 cat >> confdefs.h <<\EOF
4935 #define HAVE_DECL_STRSIGNAL 1
4937 cat >> confdefs.h <<\EOF
4938 #define HAVE_DECL_PUTC_UNLOCKED 1
4940 cat >> confdefs.h <<\EOF
4941 #define HAVE_DECL_FPUTS_UNLOCKED 1
4943 cat >> confdefs.h <<\EOF
4944 #define HAVE_DECL_FWRITE_UNLOCKED 1
4947 cat >> confdefs.h <<\EOF
4948 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4950 cat >> confdefs.h <<\EOF
4951 #define HAVE_DECL_STRSTR 1
4953 cat >> confdefs.h <<\EOF
4954 #define HAVE_DECL_ERRNO 1
4956 cat >> confdefs.h <<\EOF
4957 #define HAVE_DECL_VASPRINTF 1
4960 cat >> confdefs.h <<\EOF
4961 #define HAVE_DECL_MALLOC 1
4963 cat >> confdefs.h <<\EOF
4964 #define HAVE_DECL_REALLOC 1
4966 cat >> confdefs.h <<\EOF
4967 #define HAVE_DECL_CALLOC 1
4969 cat >> confdefs.h <<\EOF
4970 #define HAVE_DECL_FREE 1
4972 cat >> confdefs.h <<\EOF
4973 #define HAVE_DECL_BASENAME 1
4975 cat >> confdefs.h <<\EOF
4976 #define HAVE_DECL_GETOPT 1
4978 cat >> confdefs.h <<\EOF
4979 #define HAVE_DECL_CLOCK 1
4984 for ac_func in getrlimit setrlimit getrusage
4986 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4987 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4988 echo "configure:4989: checking whether $ac_func is declared" >&5
4989 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995 #undef $ac_tr_decl
4996 #define $ac_tr_decl 1
4998 #include "ansidecl.h"
4999 #include "system.h"
5000 #ifdef HAVE_SYS_RESOURCE_H
5001 #include <sys/resource.h>
5002 #endif
5005 int main() {
5006 #ifndef $ac_func
5007 char *(*pfn) = (char *(*)) $ac_func ;
5008 #endif
5009 ; return 0; }
5011 if { (eval echo configure:5012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5012 rm -rf conftest*
5013 eval "gcc_cv_have_decl_$ac_func=yes"
5014 else
5015 echo "configure: failed program was:" >&5
5016 cat conftest.$ac_ext >&5
5017 rm -rf conftest*
5018 eval "gcc_cv_have_decl_$ac_func=no"
5020 rm -f conftest*
5023 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5024 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5025 #define $ac_tr_decl 1
5028 else
5029 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5030 #define $ac_tr_decl 0
5035 done
5036 if test x = y ; then
5037 cat >> confdefs.h <<\EOF
5038 #define HAVE_DECL_GETRLIMIT 1
5040 cat >> confdefs.h <<\EOF
5041 #define HAVE_DECL_SETRLIMIT 1
5043 cat >> confdefs.h <<\EOF
5044 #define HAVE_DECL_GETRUSAGE 1
5049 for ac_func in ldgetname
5051 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5052 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5053 echo "configure:5054: checking whether $ac_func is declared" >&5
5054 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5055 echo $ac_n "(cached) $ac_c" 1>&6
5056 else
5057 cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 #undef $ac_tr_decl
5061 #define $ac_tr_decl 1
5063 #include "ansidecl.h"
5064 #include "system.h"
5065 #ifdef HAVE_LDFCN_H
5066 #include <ldfcn.h>
5067 #endif
5070 int main() {
5071 #ifndef $ac_func
5072 char *(*pfn) = (char *(*)) $ac_func ;
5073 #endif
5074 ; return 0; }
5076 if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5077 rm -rf conftest*
5078 eval "gcc_cv_have_decl_$ac_func=yes"
5079 else
5080 echo "configure: failed program was:" >&5
5081 cat conftest.$ac_ext >&5
5082 rm -rf conftest*
5083 eval "gcc_cv_have_decl_$ac_func=no"
5085 rm -f conftest*
5088 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5089 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5090 #define $ac_tr_decl 1
5093 else
5094 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5095 #define $ac_tr_decl 0
5100 done
5101 if test x = y ; then
5102 cat >> confdefs.h <<\EOF
5103 #define HAVE_DECL_LDGETNAME 1
5108 for ac_func in times
5110 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5111 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5112 echo "configure:5113: checking whether $ac_func is declared" >&5
5113 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5114 echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116 cat > conftest.$ac_ext <<EOF
5117 #line 5118 "configure"
5118 #include "confdefs.h"
5119 #undef $ac_tr_decl
5120 #define $ac_tr_decl 1
5122 #include "ansidecl.h"
5123 #include "system.h"
5124 #ifdef HAVE_SYS_TIMES_H
5125 #include <sys/times.h>
5126 #endif
5129 int main() {
5130 #ifndef $ac_func
5131 char *(*pfn) = (char *(*)) $ac_func ;
5132 #endif
5133 ; return 0; }
5135 if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5136 rm -rf conftest*
5137 eval "gcc_cv_have_decl_$ac_func=yes"
5138 else
5139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 rm -rf conftest*
5142 eval "gcc_cv_have_decl_$ac_func=no"
5144 rm -f conftest*
5147 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5148 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5149 #define $ac_tr_decl 1
5152 else
5153 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5154 #define $ac_tr_decl 0
5159 done
5160 if test x = y ; then
5161 cat >> confdefs.h <<\EOF
5162 #define HAVE_DECL_TIMES 1
5167 # More time-related stuff.
5168 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5169 echo "configure:5170: checking for struct tms" >&5
5170 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5171 echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5174 cat > conftest.$ac_ext <<EOF
5175 #line 5176 "configure"
5176 #include "confdefs.h"
5178 #include "ansidecl.h"
5179 #include "system.h"
5180 #ifdef HAVE_SYS_TIMES_H
5181 #include <sys/times.h>
5182 #endif
5184 int main() {
5185 struct tms tms;
5186 ; return 0; }
5188 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5189 rm -rf conftest*
5190 ac_cv_struct_tms=yes
5191 else
5192 echo "configure: failed program was:" >&5
5193 cat conftest.$ac_ext >&5
5194 rm -rf conftest*
5195 ac_cv_struct_tms=no
5197 rm -f conftest*
5200 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5201 if test $ac_cv_struct_tms = yes; then
5202 cat >> confdefs.h <<\EOF
5203 #define HAVE_STRUCT_TMS 1
5208 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5209 # revisit after autoconf 2.50.
5210 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5211 echo "configure:5212: checking for clock_t" >&5
5212 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5213 echo $ac_n "(cached) $ac_c" 1>&6
5214 else
5216 cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5220 #include "ansidecl.h"
5221 #include "system.h"
5223 int main() {
5224 clock_t x;
5225 ; return 0; }
5227 if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5228 rm -rf conftest*
5229 gcc_cv_type_clock_t=yes
5230 else
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233 rm -rf conftest*
5234 gcc_cv_type_clock_t=no
5236 rm -f conftest*
5239 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5240 if test $gcc_cv_type_clock_t = yes; then
5241 cat >> confdefs.h <<\EOF
5242 #define HAVE_CLOCK_T 1
5247 echo $ac_n "checking for uchar""... $ac_c" 1>&6
5248 echo "configure:5249: checking for uchar" >&5
5249 if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then
5250 echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252 cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5256 #include "ansidecl.h"
5257 #include "system.h"
5259 int main() {
5260 if ((uchar *)0) return 0;
5261 if (sizeof(uchar)) return 0;
5262 ; return 0; }
5264 if { (eval echo configure:5265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5265 rm -rf conftest*
5266 ac_cv_type_uchar=yes
5267 else
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5270 rm -rf conftest*
5271 ac_cv_type_uchar=no
5273 rm -f conftest*
5276 echo "$ac_t""$gcc_cv_type_uchar" 1>&6
5277 if test $ac_cv_type_uchar = yes; then
5278 cat >> confdefs.h <<\EOF
5279 #define HAVE_UCHAR 1
5284 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5285 CFLAGS="$saved_CFLAGS"
5287 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5288 if test "${enable_initfini_array+set}" = set; then
5289 enableval="$enable_initfini_array"
5291 else
5293 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5294 echo "configure:5295: checking for .preinit_array/.init_array/.fini_array support" >&5
5295 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5296 echo $ac_n "(cached) $ac_c" 1>&6
5297 else
5298 if test "$cross_compiling" = yes; then
5299 gcc_cv_initfini_array=no
5300 else
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5305 static int x = -1;
5306 int main (void) { return x; }
5307 int foo (void) { x = 0; }
5308 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5311 then
5312 gcc_cv_initfini_array=yes
5313 else
5314 echo "configure: failed program was:" >&5
5315 cat conftest.$ac_ext >&5
5316 rm -fr conftest*
5317 gcc_cv_initfini_array=no
5319 rm -fr conftest*
5324 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5325 enable_initfini_array=$gcc_cv_initfini_array
5329 if test $enable_initfini_array = yes; then
5330 cat >> confdefs.h <<\EOF
5331 #define HAVE_INITFINI_ARRAY 1
5336 # mkdir takes a single argument on some systems.
5337 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5338 echo "configure:5339: checking if mkdir takes one argument" >&5
5339 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342 cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5346 #include <sys/types.h>
5347 #ifdef HAVE_SYS_STAT_H
5348 # include <sys/stat.h>
5349 #endif
5350 #ifdef HAVE_UNISTD_H
5351 # include <unistd.h>
5352 #endif
5353 #ifdef HAVE_DIRECT_H
5354 # include <direct.h>
5355 #endif
5356 int main() {
5357 mkdir ("foo", 0);
5358 ; return 0; }
5360 if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5361 rm -rf conftest*
5362 gcc_cv_mkdir_takes_one_arg=no
5363 else
5364 echo "configure: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 rm -rf conftest*
5367 gcc_cv_mkdir_takes_one_arg=yes
5369 rm -f conftest*
5372 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5373 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5374 cat >> confdefs.h <<\EOF
5375 #define MKDIR_TAKES_ONE_ARG 1
5381 # File extensions
5382 manext='.1'
5383 objext='.o'
5387 # With Setjmp/Longjmp based exception handling.
5388 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5389 if test "${enable_sjlj_exceptions+set}" = set; then
5390 enableval="$enable_sjlj_exceptions"
5391 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5392 cat >> confdefs.h <<EOF
5393 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5399 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5400 echo "configure:5401: checking for main in -lunwind" >&5
5401 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5402 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5403 echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405 ac_save_LIBS="$LIBS"
5406 LIBS="-lunwind $LIBS"
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5411 int main() {
5412 main()
5413 ; return 0; }
5415 if { (eval echo configure:5416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5416 rm -rf conftest*
5417 eval "ac_cv_lib_$ac_lib_var=yes"
5418 else
5419 echo "configure: failed program was:" >&5
5420 cat conftest.$ac_ext >&5
5421 rm -rf conftest*
5422 eval "ac_cv_lib_$ac_lib_var=no"
5424 rm -f conftest*
5425 LIBS="$ac_save_LIBS"
5428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5429 echo "$ac_t""yes" 1>&6
5430 use_libunwind_default=yes
5431 else
5432 echo "$ac_t""no" 1>&6
5433 use_libunwind_default=no
5436 # Use libunwind based exception handling.
5437 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5438 if test "${enable_libunwind_exceptions+set}" = set; then
5439 enableval="$enable_libunwind_exceptions"
5440 use_libunwind_exceptions=$enableval
5441 else
5442 use_libunwind_exceptions=$use_libunwind_default
5445 if test x"$use_libunwind_exceptions" = xyes; then
5446 cat >> confdefs.h <<\EOF
5447 #define USE_LIBUNWIND_EXCEPTIONS 1
5452 # --------------------------------------------------------
5453 # Build, host, and target specific configuration fragments
5454 # --------------------------------------------------------
5456 target_gtfiles=
5457 build_xm_file=
5458 build_xm_defines=
5459 build_install_headers_dir=install-headers-tar
5460 build_exeext=
5461 host_xm_file=
5462 host_xm_defines=
5463 host_xmake_file=
5464 host_truncate_target=
5465 host_exeext=
5467 # Decode the host machine, then the target machine.
5468 # For the host machine, we save the xm_file variable as host_xm_file;
5469 # then we decode the target machine and forget everything else
5470 # that came from the host machine.
5471 for machine in $build $host $target; do
5472 . ${srcdir}/config.gcc
5473 done
5475 extra_objs="${host_extra_objs} ${extra_objs}"
5477 # Default the target-machine variables that were not explicitly set.
5478 if test x"$tm_file" = x
5479 then tm_file=$cpu_type/$cpu_type.h; fi
5481 if test x"$extra_headers" = x
5482 then extra_headers=; fi
5484 if test x$md_file = x
5485 then md_file=$cpu_type/$cpu_type.md; fi
5487 if test x$out_file = x
5488 then out_file=$cpu_type/$cpu_type.c; fi
5490 if test x"$tmake_file" = x
5491 then tmake_file=$cpu_type/t-$cpu_type
5494 if test x"$dwarf2" = xyes
5495 then tm_file="$tm_file tm-dwarf2.h"
5498 # Say what files are being used for the output code and MD file.
5499 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5500 echo "Using \`$srcdir/config/$md_file' as machine description file."
5502 # If any of the xm_file variables contain nonexistent files, warn
5503 # about them and drop them.
5506 for x in $build_xm_file; do
5507 if test -f $srcdir/config/$x
5508 then bx="$bx $x"
5509 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5511 done
5512 build_xm_file="$bx"
5515 for x in $host_xm_file; do
5516 if test -f $srcdir/config/$x
5517 then hx="$hx $x"
5518 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5520 done
5521 host_xm_file="$hx"
5524 for x in $xm_file; do
5525 if test -f $srcdir/config/$x
5526 then tx="$tx $x"
5527 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5529 done
5530 xm_file="$tx"
5532 count=a
5533 for f in $tm_file; do
5534 count=${count}x
5535 done
5536 if test $count = ax; then
5537 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5538 else
5539 echo "Using the following target machine macro files:"
5540 for f in $tm_file; do
5541 echo " $srcdir/config/$f"
5542 done
5545 if test x$need_64bit_hwint = xyes; then
5546 cat >> confdefs.h <<\EOF
5547 #define NEED_64BIT_HOST_WIDE_INT 1
5552 count=a
5553 for f in $host_xm_file; do
5554 count=${count}x
5555 done
5556 if test $count = a; then
5558 elif test $count = ax; then
5559 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5560 else
5561 echo "Using the following host machine macro files:"
5562 for f in $host_xm_file; do
5563 echo " $srcdir/config/$f"
5564 done
5566 echo "Using ${out_host_hook_obj} for host machine hooks."
5568 if test "$host_xm_file" != "$build_xm_file"; then
5569 count=a
5570 for f in $build_xm_file; do
5571 count=${count}x
5572 done
5573 if test $count = a; then
5575 elif test $count = ax; then
5576 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5577 else
5578 echo "Using the following build machine macro files:"
5579 for f in $build_xm_file; do
5580 echo " $srcdir/config/$f"
5581 done
5585 if test x$thread_file = x; then
5586 if test x$target_thread_file != x; then
5587 thread_file=$target_thread_file
5588 else
5589 thread_file='single'
5593 # Look for a file containing extra machine modes.
5594 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5595 extra_modes_file='$(srcdir)'/config/${extra_modes}
5597 cat >> confdefs.h <<EOF
5598 #define EXTRA_MODES_FILE "$extra_modes"
5601 cat >> confdefs.h <<\EOF
5602 #define EXTRA_CC_MODES 1
5607 # auto-host.h is the file containing items generated by autoconf and is
5608 # the first file included by config.h.
5609 # If host=build, it is correct to have bconfig include auto-host.h
5610 # as well. If host!=build, we are in error and need to do more
5611 # work to find out the build config parameters.
5612 if test x$host = x$build
5613 then
5614 build_auto=auto-host.h
5615 FORBUILD=..
5616 else
5617 # We create a subdir, then run autoconf in the subdir.
5618 # To prevent recursion we set host and build for the new
5619 # invocation of configure to the build for this invocation
5620 # of configure.
5621 tempdir=build.$$
5622 rm -rf $tempdir
5623 mkdir $tempdir
5624 cd $tempdir
5625 case ${srcdir} in
5626 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5627 *) realsrcdir=../${srcdir};;
5628 esac
5629 saved_CFLAGS="${CFLAGS}"
5630 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5631 ${realsrcdir}/configure \
5632 --target=$target_alias --host=$build_alias --build=$build_alias
5633 CFLAGS="${saved_CFLAGS}"
5635 # We just finished tests for the build machine, so rename
5636 # the file auto-build.h in the gcc directory.
5637 mv auto-host.h ../auto-build.h
5638 cd ..
5639 rm -rf $tempdir
5640 build_auto=auto-build.h
5641 FORBUILD=../build-$build_alias
5645 tm_file="${tm_file} defaults.h"
5646 tm_p_file="${tm_p_file} tm-preds.h"
5647 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5648 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5649 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
5650 # put this back in temporarily.
5651 xm_file="ansidecl.h ${xm_file}"
5653 # --------
5654 # UNSORTED
5655 # --------
5657 # Truncate the target if necessary
5658 if test x$host_truncate_target != x; then
5659 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5662 # Get the version trigger filename from the toplevel
5663 if test "${with_gcc_version_trigger+set}" = set; then
5664 gcc_version_trigger=$with_gcc_version_trigger
5665 else
5666 gcc_version_trigger=${srcdir}/version.c
5668 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5669 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5671 # Compile in configure arguments.
5672 if test -f configargs.h ; then
5673 # Being re-configured.
5674 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5675 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5676 else
5677 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5679 cat > configargs.h <<EOF
5680 /* Generated automatically. */
5681 static const char configuration_arguments[] = "$gcc_config_arguments";
5682 static const char thread_model[] = "$thread_file";
5685 # Internationalization
5686 PACKAGE=gcc
5687 VERSION="$gcc_version"
5691 # Enable NLS support by default
5692 # Check whether --enable-nls or --disable-nls was given.
5693 if test "${enable_nls+set}" = set; then
5694 enableval="$enable_nls"
5696 else
5697 enable_nls=yes
5701 # if cross compiling, disable NLS support.
5702 # It's not worth the trouble, at least for now.
5704 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5705 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5706 enable_nls=no
5711 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5712 echo "configure:5713: checking for library containing strerror" >&5
5713 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5714 echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716 ac_func_search_save_LIBS="$LIBS"
5717 ac_cv_search_strerror="no"
5718 cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721 /* Override any gcc2 internal prototype to avoid an error. */
5722 /* We use char because int might match the return type of a gcc2
5723 builtin and then its argument prototype would still apply. */
5724 char strerror();
5726 int main() {
5727 strerror()
5728 ; return 0; }
5730 if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5731 rm -rf conftest*
5732 ac_cv_search_strerror="none required"
5733 else
5734 echo "configure: failed program was:" >&5
5735 cat conftest.$ac_ext >&5
5737 rm -f conftest*
5738 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5739 LIBS="-l$i $ac_func_search_save_LIBS"
5740 cat > conftest.$ac_ext <<EOF
5741 #line 5742 "configure"
5742 #include "confdefs.h"
5743 /* Override any gcc2 internal prototype to avoid an error. */
5744 /* We use char because int might match the return type of a gcc2
5745 builtin and then its argument prototype would still apply. */
5746 char strerror();
5748 int main() {
5749 strerror()
5750 ; return 0; }
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753 rm -rf conftest*
5754 ac_cv_search_strerror="-l$i"
5755 break
5756 else
5757 echo "configure: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5760 rm -f conftest*
5761 done
5762 LIBS="$ac_func_search_save_LIBS"
5765 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5766 if test "$ac_cv_search_strerror" != "no"; then
5767 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5769 else :
5774 echo $ac_n "checking for working const""... $ac_c" 1>&6
5775 echo "configure:5776: checking for working const" >&5
5776 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779 cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5783 int main() {
5785 /* Ultrix mips cc rejects this. */
5786 typedef int charset[2]; const charset x;
5787 /* SunOS 4.1.1 cc rejects this. */
5788 char const *const *ccp;
5789 char **p;
5790 /* NEC SVR4.0.2 mips cc rejects this. */
5791 struct point {int x, y;};
5792 static struct point const zero = {0,0};
5793 /* AIX XL C 1.02.0.0 rejects this.
5794 It does not let you subtract one const X* pointer from another in an arm
5795 of an if-expression whose if-part is not a constant expression */
5796 const char *g = "string";
5797 ccp = &g + (g ? g-g : 0);
5798 /* HPUX 7.0 cc rejects these. */
5799 ++ccp;
5800 p = (char**) ccp;
5801 ccp = (char const *const *) p;
5802 { /* SCO 3.2v4 cc rejects this. */
5803 char *t;
5804 char const *s = 0 ? (char *) 0 : (char const *) 0;
5806 *t++ = 0;
5808 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5809 int x[] = {25, 17};
5810 const int *foo = &x[0];
5811 ++foo;
5813 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5814 typedef const int *iptr;
5815 iptr p = 0;
5816 ++p;
5818 { /* AIX XL C 1.02.0.0 rejects this saying
5819 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5820 struct s { int j; const int *ap[3]; };
5821 struct s *b; b->j = 5;
5823 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5824 const int foo = 10;
5827 ; return 0; }
5829 if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5830 rm -rf conftest*
5831 ac_cv_c_const=yes
5832 else
5833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
5835 rm -rf conftest*
5836 ac_cv_c_const=no
5838 rm -f conftest*
5841 echo "$ac_t""$ac_cv_c_const" 1>&6
5842 if test $ac_cv_c_const = no; then
5843 cat >> confdefs.h <<\EOF
5844 #define const
5849 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5850 echo "configure:5851: checking for off_t" >&5
5851 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5852 echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 #include <sys/types.h>
5858 #if STDC_HEADERS
5859 #include <stdlib.h>
5860 #include <stddef.h>
5861 #endif
5863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5864 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5865 rm -rf conftest*
5866 ac_cv_type_off_t=yes
5867 else
5868 rm -rf conftest*
5869 ac_cv_type_off_t=no
5871 rm -f conftest*
5874 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5875 if test $ac_cv_type_off_t = no; then
5876 cat >> confdefs.h <<\EOF
5877 #define off_t long
5882 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5883 echo "configure:5884: checking for size_t" >&5
5884 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
5886 else
5887 cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 #include <sys/types.h>
5891 #if STDC_HEADERS
5892 #include <stdlib.h>
5893 #include <stddef.h>
5894 #endif
5896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5897 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5898 rm -rf conftest*
5899 ac_cv_type_size_t=yes
5900 else
5901 rm -rf conftest*
5902 ac_cv_type_size_t=no
5904 rm -f conftest*
5907 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5908 if test $ac_cv_type_size_t = no; then
5909 cat >> confdefs.h <<\EOF
5910 #define size_t unsigned
5915 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5916 # for constant arguments. Useless!
5917 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5918 echo "configure:5919: checking for working alloca.h" >&5
5919 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5920 echo $ac_n "(cached) $ac_c" 1>&6
5921 else
5922 cat > conftest.$ac_ext <<EOF
5923 #line 5924 "configure"
5924 #include "confdefs.h"
5925 #include <alloca.h>
5926 int main() {
5927 char *p = alloca(2 * sizeof(int));
5928 ; return 0; }
5930 if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5931 rm -rf conftest*
5932 ac_cv_header_alloca_h=yes
5933 else
5934 echo "configure: failed program was:" >&5
5935 cat conftest.$ac_ext >&5
5936 rm -rf conftest*
5937 ac_cv_header_alloca_h=no
5939 rm -f conftest*
5942 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5943 if test $ac_cv_header_alloca_h = yes; then
5944 cat >> confdefs.h <<\EOF
5945 #define HAVE_ALLOCA_H 1
5950 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5951 echo "configure:5952: checking for alloca" >&5
5952 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5953 echo $ac_n "(cached) $ac_c" 1>&6
5954 else
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5959 #ifdef __GNUC__
5960 # define alloca __builtin_alloca
5961 #else
5962 # ifdef _MSC_VER
5963 # include <malloc.h>
5964 # define alloca _alloca
5965 # else
5966 # if HAVE_ALLOCA_H
5967 # include <alloca.h>
5968 # else
5969 # ifdef _AIX
5970 #pragma alloca
5971 # else
5972 # ifndef alloca /* predefined by HP cc +Olibcalls */
5973 char *alloca ();
5974 # endif
5975 # endif
5976 # endif
5977 # endif
5978 #endif
5980 int main() {
5981 char *p = (char *) alloca(1);
5982 ; return 0; }
5984 if { (eval echo configure:5985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5985 rm -rf conftest*
5986 ac_cv_func_alloca_works=yes
5987 else
5988 echo "configure: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
5990 rm -rf conftest*
5991 ac_cv_func_alloca_works=no
5993 rm -f conftest*
5996 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5997 if test $ac_cv_func_alloca_works = yes; then
5998 cat >> confdefs.h <<\EOF
5999 #define HAVE_ALLOCA 1
6004 if test $ac_cv_func_alloca_works = no; then
6005 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6006 # that cause trouble. Some versions do not even contain alloca or
6007 # contain a buggy version. If you still want to use their alloca,
6008 # use ar to extract alloca.o from them instead of compiling alloca.c.
6009 ALLOCA=alloca.${ac_objext}
6010 cat >> confdefs.h <<\EOF
6011 #define C_ALLOCA 1
6015 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6016 echo "configure:6017: checking whether alloca needs Cray hooks" >&5
6017 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6018 echo $ac_n "(cached) $ac_c" 1>&6
6019 else
6020 cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6023 #if defined(CRAY) && ! defined(CRAY2)
6024 webecray
6025 #else
6026 wenotbecray
6027 #endif
6030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6031 egrep "webecray" >/dev/null 2>&1; then
6032 rm -rf conftest*
6033 ac_cv_os_cray=yes
6034 else
6035 rm -rf conftest*
6036 ac_cv_os_cray=no
6038 rm -f conftest*
6042 echo "$ac_t""$ac_cv_os_cray" 1>&6
6043 if test $ac_cv_os_cray = yes; then
6044 for ac_func in _getb67 GETB67 getb67; do
6045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6046 echo "configure:6047: checking for $ac_func" >&5
6047 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6048 echo $ac_n "(cached) $ac_c" 1>&6
6049 else
6050 cat > conftest.$ac_ext <<EOF
6051 #line 6052 "configure"
6052 #include "confdefs.h"
6053 /* System header to define __stub macros and hopefully few prototypes,
6054 which can conflict with char $ac_func(); below. */
6055 #include <assert.h>
6056 /* Override any gcc2 internal prototype to avoid an error. */
6057 /* We use char because int might match the return type of a gcc2
6058 builtin and then its argument prototype would still apply. */
6059 char $ac_func();
6061 int main() {
6063 /* The GNU C library defines this for functions which it implements
6064 to always fail with ENOSYS. Some functions are actually named
6065 something starting with __ and the normal name is an alias. */
6066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6067 choke me
6068 #else
6069 $ac_func();
6070 #endif
6072 ; return 0; }
6074 if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6075 rm -rf conftest*
6076 eval "ac_cv_func_$ac_func=yes"
6077 else
6078 echo "configure: failed program was:" >&5
6079 cat conftest.$ac_ext >&5
6080 rm -rf conftest*
6081 eval "ac_cv_func_$ac_func=no"
6083 rm -f conftest*
6086 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6087 echo "$ac_t""yes" 1>&6
6088 cat >> confdefs.h <<EOF
6089 #define CRAY_STACKSEG_END $ac_func
6092 break
6093 else
6094 echo "$ac_t""no" 1>&6
6097 done
6100 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6101 echo "configure:6102: checking stack direction for C alloca" >&5
6102 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6103 echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6105 if test "$cross_compiling" = yes; then
6106 ac_cv_c_stack_direction=0
6107 else
6108 cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 find_stack_direction ()
6113 static char *addr = 0;
6114 auto char dummy;
6115 if (addr == 0)
6117 addr = &dummy;
6118 return find_stack_direction ();
6120 else
6121 return (&dummy > addr) ? 1 : -1;
6123 main ()
6125 exit (find_stack_direction() < 0);
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6129 then
6130 ac_cv_c_stack_direction=1
6131 else
6132 echo "configure: failed program was:" >&5
6133 cat conftest.$ac_ext >&5
6134 rm -fr conftest*
6135 ac_cv_c_stack_direction=-1
6137 rm -fr conftest*
6142 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6143 cat >> confdefs.h <<EOF
6144 #define STACK_DIRECTION $ac_cv_c_stack_direction
6150 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
6151 echo "configure:6152: checking whether we are using the GNU C Library 2.1 or newer" >&5
6152 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
6153 echo $ac_n "(cached) $ac_c" 1>&6
6154 else
6155 cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6159 #include <features.h>
6160 #ifdef __GNU_LIBRARY__
6161 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6162 Lucky GNU user
6163 #endif
6164 #endif
6167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6168 egrep "Lucky GNU user" >/dev/null 2>&1; then
6169 rm -rf conftest*
6170 ac_cv_gnu_library_2_1=yes
6171 else
6172 rm -rf conftest*
6173 ac_cv_gnu_library_2_1=no
6175 rm -f conftest*
6181 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
6183 GLIBC21="$ac_cv_gnu_library_2_1"
6187 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6188 stdlib.h string.h unistd.h sys/param.h
6190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6192 echo "configure:6193: checking for $ac_hdr" >&5
6193 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6194 echo $ac_n "(cached) $ac_c" 1>&6
6195 else
6196 cat > conftest.$ac_ext <<EOF
6197 #line 6198 "configure"
6198 #include "confdefs.h"
6199 #include <$ac_hdr>
6201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6202 { (eval echo configure:6203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6204 if test -z "$ac_err"; then
6205 rm -rf conftest*
6206 eval "ac_cv_header_$ac_safe=yes"
6207 else
6208 echo "$ac_err" >&5
6209 echo "configure: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6211 rm -rf conftest*
6212 eval "ac_cv_header_$ac_safe=no"
6214 rm -f conftest*
6216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6217 echo "$ac_t""yes" 1>&6
6218 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6219 cat >> confdefs.h <<EOF
6220 #define $ac_tr_hdr 1
6223 else
6224 echo "$ac_t""no" 1>&6
6226 done
6228 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6229 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6230 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6233 echo "configure:6234: checking for $ac_func" >&5
6234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6235 echo $ac_n "(cached) $ac_c" 1>&6
6236 else
6237 cat > conftest.$ac_ext <<EOF
6238 #line 6239 "configure"
6239 #include "confdefs.h"
6240 /* System header to define __stub macros and hopefully few prototypes,
6241 which can conflict with char $ac_func(); below. */
6242 #include <assert.h>
6243 /* Override any gcc2 internal prototype to avoid an error. */
6244 /* We use char because int might match the return type of a gcc2
6245 builtin and then its argument prototype would still apply. */
6246 char $ac_func();
6248 int main() {
6250 /* The GNU C library defines this for functions which it implements
6251 to always fail with ENOSYS. Some functions are actually named
6252 something starting with __ and the normal name is an alias. */
6253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6254 choke me
6255 #else
6256 $ac_func();
6257 #endif
6259 ; return 0; }
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262 rm -rf conftest*
6263 eval "ac_cv_func_$ac_func=yes"
6264 else
6265 echo "configure: failed program was:" >&5
6266 cat conftest.$ac_ext >&5
6267 rm -rf conftest*
6268 eval "ac_cv_func_$ac_func=no"
6270 rm -f conftest*
6273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6274 echo "$ac_t""yes" 1>&6
6275 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6276 cat >> confdefs.h <<EOF
6277 #define $ac_tr_func 1
6280 else
6281 echo "$ac_t""no" 1>&6
6283 done
6288 am_cv_lib_iconv_ldpath=
6289 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6290 if test "${with_libiconv_prefix+set}" = set; then
6291 withval="$with_libiconv_prefix"
6293 for dir in `echo "$withval" | tr : ' '`; do
6294 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6295 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6296 done
6301 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6302 echo "configure:6303: checking for iconv" >&5
6303 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6304 echo $ac_n "(cached) $ac_c" 1>&6
6305 else
6307 am_cv_func_iconv="no, consider installing GNU libiconv"
6308 am_cv_lib_iconv=no
6309 cat > conftest.$ac_ext <<EOF
6310 #line 6311 "configure"
6311 #include "confdefs.h"
6312 #include <stdlib.h>
6313 #include <iconv.h>
6314 int main() {
6315 iconv_t cd = iconv_open("","");
6316 iconv(cd,NULL,NULL,NULL,NULL);
6317 iconv_close(cd);
6318 ; return 0; }
6320 if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6321 rm -rf conftest*
6322 am_cv_func_iconv=yes
6323 else
6324 echo "configure: failed program was:" >&5
6325 cat conftest.$ac_ext >&5
6327 rm -f conftest*
6328 if test "$am_cv_func_iconv" != yes; then
6329 am_save_LIBS="$LIBS"
6330 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 #include <stdlib.h>
6335 #include <iconv.h>
6336 int main() {
6337 iconv_t cd = iconv_open("","");
6338 iconv(cd,NULL,NULL,NULL,NULL);
6339 iconv_close(cd);
6340 ; return 0; }
6342 if { (eval echo configure:6343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6343 rm -rf conftest*
6344 am_cv_lib_iconv=yes
6345 am_cv_func_iconv=yes
6346 else
6347 echo "configure: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6350 rm -f conftest*
6351 LIBS="$am_save_LIBS"
6356 echo "$ac_t""$am_cv_func_iconv" 1>&6
6357 if test "$am_cv_func_iconv" = yes; then
6358 cat >> confdefs.h <<\EOF
6359 #define HAVE_ICONV 1
6362 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6363 echo "configure:6364: checking for iconv declaration" >&5
6364 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6365 echo $ac_n "(cached) $ac_c" 1>&6
6366 else
6368 cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6372 #include <stdlib.h>
6373 #include <iconv.h>
6374 extern
6375 #ifdef __cplusplus
6377 #endif
6378 #if defined(__STDC__) || defined(__cplusplus)
6379 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6380 #else
6381 size_t iconv();
6382 #endif
6384 int main() {
6386 ; return 0; }
6388 if { (eval echo configure:6389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6389 rm -rf conftest*
6390 am_cv_proto_iconv_arg1=""
6391 else
6392 echo "configure: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
6394 rm -rf conftest*
6395 am_cv_proto_iconv_arg1="const"
6397 rm -f conftest*
6398 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);"
6401 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6402 echo "$ac_t""${ac_t:-
6403 }$am_cv_proto_iconv" 1>&6
6404 cat >> confdefs.h <<EOF
6405 #define ICONV_CONST $am_cv_proto_iconv_arg1
6409 LIBICONV=
6410 if test "$am_cv_lib_iconv" = yes; then
6411 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6416 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6417 echo "configure:6418: checking for nl_langinfo and CODESET" >&5
6418 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6419 echo $ac_n "(cached) $ac_c" 1>&6
6420 else
6421 cat > conftest.$ac_ext <<EOF
6422 #line 6423 "configure"
6423 #include "confdefs.h"
6424 #include <langinfo.h>
6425 int main() {
6426 char* cs = nl_langinfo(CODESET);
6427 ; return 0; }
6429 if { (eval echo configure:6430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6430 rm -rf conftest*
6431 am_cv_langinfo_codeset=yes
6432 else
6433 echo "configure: failed program was:" >&5
6434 cat conftest.$ac_ext >&5
6435 rm -rf conftest*
6436 am_cv_langinfo_codeset=no
6438 rm -f conftest*
6442 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6443 if test $am_cv_langinfo_codeset = yes; then
6444 cat >> confdefs.h <<\EOF
6445 #define HAVE_LANGINFO_CODESET 1
6450 if test $ac_cv_header_locale_h = yes; then
6451 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6452 echo "configure:6453: checking for LC_MESSAGES" >&5
6453 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6454 echo $ac_n "(cached) $ac_c" 1>&6
6455 else
6456 cat > conftest.$ac_ext <<EOF
6457 #line 6458 "configure"
6458 #include "confdefs.h"
6459 #include <locale.h>
6460 int main() {
6461 return LC_MESSAGES
6462 ; return 0; }
6464 if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465 rm -rf conftest*
6466 am_cv_val_LC_MESSAGES=yes
6467 else
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
6470 rm -rf conftest*
6471 am_cv_val_LC_MESSAGES=no
6473 rm -f conftest*
6476 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6477 if test $am_cv_val_LC_MESSAGES = yes; then
6478 cat >> confdefs.h <<\EOF
6479 #define HAVE_LC_MESSAGES 1
6484 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6485 echo "configure:6486: checking whether NLS is requested" >&5
6486 # Check whether --enable-nls or --disable-nls was given.
6487 if test "${enable_nls+set}" = set; then
6488 enableval="$enable_nls"
6489 USE_NLS=$enableval
6490 else
6491 USE_NLS=yes
6494 echo "$ac_t""$USE_NLS" 1>&6
6497 BUILD_INCLUDED_LIBINTL=no
6498 USE_INCLUDED_LIBINTL=no
6499 INTLLIBS=
6500 INTLDEPS=
6502 if test "$USE_NLS" = "yes"; then
6503 cat >> confdefs.h <<\EOF
6504 #define ENABLE_NLS 1
6507 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6508 echo "configure:6509: checking whether included gettext is requested" >&5
6509 # Check whether --with-included-gettext or --without-included-gettext was given.
6510 if test "${with_included_gettext+set}" = set; then
6511 withval="$with_included_gettext"
6512 nls_cv_force_use_gnu_gettext=$withval
6513 else
6514 nls_cv_force_use_gnu_gettext=no
6517 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6519 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6520 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6521 CATOBJEXT=NONE
6526 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6527 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6528 echo "configure:6529: checking for libintl.h" >&5
6529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6530 echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532 cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 #include <libintl.h>
6537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6538 { (eval echo configure:6539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6540 if test -z "$ac_err"; then
6541 rm -rf conftest*
6542 eval "ac_cv_header_$ac_safe=yes"
6543 else
6544 echo "$ac_err" >&5
6545 echo "configure: failed program was:" >&5
6546 cat conftest.$ac_ext >&5
6547 rm -rf conftest*
6548 eval "ac_cv_header_$ac_safe=no"
6550 rm -f conftest*
6552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6553 echo "$ac_t""yes" 1>&6
6554 cat >> confdefs.h <<\EOF
6555 #define HAVE_LIBINTL_H 1
6558 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6559 echo "configure:6560: checking for GNU gettext in libc" >&5
6560 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6561 echo $ac_n "(cached) $ac_c" 1>&6
6562 else
6563 cat > conftest.$ac_ext <<EOF
6564 #line 6565 "configure"
6565 #include "confdefs.h"
6566 #include <libintl.h>
6567 extern int _nl_msg_cat_cntr;
6568 int main() {
6569 bindtextdomain ("", "");
6570 return (int) gettext ("") + _nl_msg_cat_cntr
6571 ; return 0; }
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574 rm -rf conftest*
6575 gt_cv_func_gnugettext1_libc=yes
6576 else
6577 echo "configure: failed program was:" >&5
6578 cat conftest.$ac_ext >&5
6579 rm -rf conftest*
6580 gt_cv_func_gnugettext1_libc=no
6582 rm -f conftest*
6585 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6587 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6588 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6589 echo "configure:6590: checking for GNU gettext in libintl" >&5
6590 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6591 echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593 gt_save_LIBS="$LIBS"
6594 LIBS="$LIBS -lintl $LIBICONV"
6595 cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 #include <libintl.h>
6599 extern int _nl_msg_cat_cntr;
6600 int main() {
6601 bindtextdomain ("", "");
6602 return (int) gettext ("") + _nl_msg_cat_cntr
6603 ; return 0; }
6605 if { (eval echo configure:6606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6606 rm -rf conftest*
6607 gt_cv_func_gnugettext1_libintl=yes
6608 else
6609 echo "configure: failed program was:" >&5
6610 cat conftest.$ac_ext >&5
6611 rm -rf conftest*
6612 gt_cv_func_gnugettext1_libintl=no
6614 rm -f conftest*
6615 LIBS="$gt_save_LIBS"
6618 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6621 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6622 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6623 && test "$PACKAGE" != gettext; }; then
6624 cat >> confdefs.h <<\EOF
6625 #define HAVE_GETTEXT 1
6629 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6630 INTLLIBS="-lintl $LIBICONV"
6633 gt_save_LIBS="$LIBS"
6634 LIBS="$LIBS $INTLLIBS"
6635 for ac_func in dcgettext
6637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6638 echo "configure:6639: checking for $ac_func" >&5
6639 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6640 echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642 cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645 /* System header to define __stub macros and hopefully few prototypes,
6646 which can conflict with char $ac_func(); below. */
6647 #include <assert.h>
6648 /* Override any gcc2 internal prototype to avoid an error. */
6649 /* We use char because int might match the return type of a gcc2
6650 builtin and then its argument prototype would still apply. */
6651 char $ac_func();
6653 int main() {
6655 /* The GNU C library defines this for functions which it implements
6656 to always fail with ENOSYS. Some functions are actually named
6657 something starting with __ and the normal name is an alias. */
6658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6659 choke me
6660 #else
6661 $ac_func();
6662 #endif
6664 ; return 0; }
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667 rm -rf conftest*
6668 eval "ac_cv_func_$ac_func=yes"
6669 else
6670 echo "configure: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 rm -rf conftest*
6673 eval "ac_cv_func_$ac_func=no"
6675 rm -f conftest*
6678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6679 echo "$ac_t""yes" 1>&6
6680 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6681 cat >> confdefs.h <<EOF
6682 #define $ac_tr_func 1
6685 else
6686 echo "$ac_t""no" 1>&6
6688 done
6690 LIBS="$gt_save_LIBS"
6692 # Extract the first word of "msgfmt", so it can be a program name with args.
6693 set dummy msgfmt; ac_word=$2
6694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6695 echo "configure:6696: checking for $ac_word" >&5
6696 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6697 echo $ac_n "(cached) $ac_c" 1>&6
6698 else
6699 case "$MSGFMT" in
6701 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6704 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6705 for ac_dir in $PATH; do
6706 test -z "$ac_dir" && ac_dir=.
6707 if test -f $ac_dir/$ac_word; then
6708 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6709 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6710 break
6713 done
6714 IFS="$ac_save_ifs"
6715 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6717 esac
6719 MSGFMT="$ac_cv_path_MSGFMT"
6720 if test "$MSGFMT" != ":"; then
6721 echo "$ac_t""$MSGFMT" 1>&6
6722 else
6723 echo "$ac_t""no" 1>&6
6726 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6727 set dummy gmsgfmt; ac_word=$2
6728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6729 echo "configure:6730: checking for $ac_word" >&5
6730 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6731 echo $ac_n "(cached) $ac_c" 1>&6
6732 else
6733 case "$GMSGFMT" in
6735 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6737 ?:/*)
6738 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6742 ac_dummy="$PATH"
6743 for ac_dir in $ac_dummy; do
6744 test -z "$ac_dir" && ac_dir=.
6745 if test -f $ac_dir/$ac_word; then
6746 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6747 break
6749 done
6750 IFS="$ac_save_ifs"
6751 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6753 esac
6755 GMSGFMT="$ac_cv_path_GMSGFMT"
6756 if test -n "$GMSGFMT"; then
6757 echo "$ac_t""$GMSGFMT" 1>&6
6758 else
6759 echo "$ac_t""no" 1>&6
6763 # Extract the first word of "xgettext", so it can be a program name with args.
6764 set dummy xgettext; ac_word=$2
6765 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_word" >&5
6767 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6768 echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770 case "$XGETTEXT" in
6772 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6775 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6776 for ac_dir in $PATH; do
6777 test -z "$ac_dir" && ac_dir=.
6778 if test -f $ac_dir/$ac_word; then
6779 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6780 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6781 break
6784 done
6785 IFS="$ac_save_ifs"
6786 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6788 esac
6790 XGETTEXT="$ac_cv_path_XGETTEXT"
6791 if test "$XGETTEXT" != ":"; then
6792 echo "$ac_t""$XGETTEXT" 1>&6
6793 else
6794 echo "$ac_t""no" 1>&6
6798 CATOBJEXT=.gmo
6801 else
6802 echo "$ac_t""no" 1>&6
6806 if test "$CATOBJEXT" = "NONE"; then
6807 nls_cv_use_gnu_gettext=yes
6811 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6812 INTLOBJS="\$(GETTOBJS)"
6813 # Extract the first word of "msgfmt", so it can be a program name with args.
6814 set dummy msgfmt; ac_word=$2
6815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6816 echo "configure:6817: checking for $ac_word" >&5
6817 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6818 echo $ac_n "(cached) $ac_c" 1>&6
6819 else
6820 case "$MSGFMT" in
6822 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6826 for ac_dir in $PATH; do
6827 test -z "$ac_dir" && ac_dir=.
6828 if test -f $ac_dir/$ac_word; then
6829 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6830 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6831 break
6834 done
6835 IFS="$ac_save_ifs"
6836 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6838 esac
6840 MSGFMT="$ac_cv_path_MSGFMT"
6841 if test "$MSGFMT" != ":"; then
6842 echo "$ac_t""$MSGFMT" 1>&6
6843 else
6844 echo "$ac_t""no" 1>&6
6847 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6848 set dummy gmsgfmt; ac_word=$2
6849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6850 echo "configure:6851: checking for $ac_word" >&5
6851 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6852 echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854 case "$GMSGFMT" in
6856 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6858 ?:/*)
6859 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6862 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6863 ac_dummy="$PATH"
6864 for ac_dir in $ac_dummy; do
6865 test -z "$ac_dir" && ac_dir=.
6866 if test -f $ac_dir/$ac_word; then
6867 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6868 break
6870 done
6871 IFS="$ac_save_ifs"
6872 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6874 esac
6876 GMSGFMT="$ac_cv_path_GMSGFMT"
6877 if test -n "$GMSGFMT"; then
6878 echo "$ac_t""$GMSGFMT" 1>&6
6879 else
6880 echo "$ac_t""no" 1>&6
6883 # Extract the first word of "xgettext", so it can be a program name with args.
6884 set dummy xgettext; ac_word=$2
6885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6886 echo "configure:6887: checking for $ac_word" >&5
6887 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6888 echo $ac_n "(cached) $ac_c" 1>&6
6889 else
6890 case "$XGETTEXT" in
6892 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6895 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6896 for ac_dir in $PATH; do
6897 test -z "$ac_dir" && ac_dir=.
6898 if test -f $ac_dir/$ac_word; then
6899 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6900 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6901 break
6904 done
6905 IFS="$ac_save_ifs"
6906 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6908 esac
6910 XGETTEXT="$ac_cv_path_XGETTEXT"
6911 if test "$XGETTEXT" != ":"; then
6912 echo "$ac_t""$XGETTEXT" 1>&6
6913 else
6914 echo "$ac_t""no" 1>&6
6918 BUILD_INCLUDED_LIBINTL=yes
6919 USE_INCLUDED_LIBINTL=yes
6920 CATOBJEXT=.gmo
6921 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6922 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6923 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6926 if test "$GMSGFMT" != ":"; then
6927 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6929 else
6930 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6931 GMSGFMT=":"
6935 if test "$XGETTEXT" != ":"; then
6936 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6938 else
6939 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6940 XGETTEXT=":"
6944 POSUB=po
6949 if test "$PACKAGE" = gettext; then
6950 BUILD_INCLUDED_LIBINTL=yes
6953 for ac_prog in bison
6955 # Extract the first word of "$ac_prog", so it can be a program name with args.
6956 set dummy $ac_prog; ac_word=$2
6957 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6958 echo "configure:6959: checking for $ac_word" >&5
6959 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6960 echo $ac_n "(cached) $ac_c" 1>&6
6961 else
6962 if test -n "$INTLBISON"; then
6963 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6964 else
6965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6966 ac_dummy="$PATH"
6967 for ac_dir in $ac_dummy; do
6968 test -z "$ac_dir" && ac_dir=.
6969 if test -f $ac_dir/$ac_word; then
6970 ac_cv_prog_INTLBISON="$ac_prog"
6971 break
6973 done
6974 IFS="$ac_save_ifs"
6977 INTLBISON="$ac_cv_prog_INTLBISON"
6978 if test -n "$INTLBISON"; then
6979 echo "$ac_t""$INTLBISON" 1>&6
6980 else
6981 echo "$ac_t""no" 1>&6
6984 test -n "$INTLBISON" && break
6985 done
6987 if test -z "$INTLBISON"; then
6988 ac_verc_fail=yes
6989 else
6990 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6991 echo "configure:6992: checking version of bison" >&5
6992 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6993 case $ac_prog_version in
6994 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6995 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6996 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6997 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6998 esac
6999 echo "$ac_t""$ac_prog_version" 1>&6
7001 if test $ac_verc_fail = yes; then
7002 INTLBISON=:
7014 if test $USE_INCLUDED_LIBINTL = yes; then
7015 cat >> confdefs.h <<\EOF
7016 #define USE_INCLUDED_LIBINTL 1
7021 nls_cv_header_intl=
7022 nls_cv_header_libgt=
7024 DATADIRNAME=share
7027 INSTOBJEXT=.mo
7030 GENCAT=gencat
7034 if test "x$CATOBJEXT" != x; then
7035 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
7036 echo "configure:7037: checking for catalogs to be installed" >&5
7037 # Look for .po and .gmo files in the source directory.
7038 CATALOGS=
7039 XLINGUAS=
7040 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
7041 # If there aren't any .gmo files the shell will give us the
7042 # literal string "../path/to/srcdir/po/*.gmo" which has to be
7043 # weeded out.
7044 case "$cat" in *\**)
7045 continue;;
7046 esac
7047 # The quadruple backslash is collapsed to a double backslash
7048 # by the backticks, then collapsed again by the double quotes,
7049 # leaving us with one backslash in the sed expression (right
7050 # before the dot that mustn't act as a wildcard). The dot to
7051 # be escaped in the second expression is hiding inside CATOBJEXT.
7052 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
7053 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
7054 # The user is allowed to set LINGUAS to a list of languages to
7055 # install catalogs for. If it's empty that means "all of them."
7056 if test "x$LINGUAS" = x; then
7057 CATALOGS="$CATALOGS $cat"
7058 XLINGUAS="$XLINGUAS $lang"
7059 else
7060 case "$LINGUAS" in *$lang*)
7061 CATALOGS="$CATALOGS $cat"
7062 XLINGUAS="$XLINGUAS $lang"
7064 esac
7066 done
7067 LINGUAS="$XLINGUAS"
7068 echo "$ac_t""$LINGUAS" 1>&6
7071 MKINSTALLDIRS=
7072 if test -n "$ac_aux_dir"; then
7073 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7075 if test -z "$MKINSTALLDIRS"; then
7076 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7080 INTL_LIBTOOL_SUFFIX_PREFIX=
7084 # Windows32 Registry support for specifying GCC installation paths.
7085 # Check whether --enable-win32-registry or --disable-win32-registry was given.
7086 if test "${enable_win32_registry+set}" = set; then
7087 enableval="$enable_win32_registry"
7091 case $host_os in
7092 win32 | pe | cygwin* | mingw32* | uwin*)
7093 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
7094 echo "configure:7095: checking whether windows registry support is requested" >&5
7095 if test "x$enable_win32_registry" != xno; then
7096 cat >> confdefs.h <<\EOF
7097 #define ENABLE_WIN32_REGISTRY 1
7100 echo "$ac_t""yes" 1>&6
7102 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
7103 echo "configure:7104: checking for library containing RegOpenKeyExA" >&5
7104 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
7105 echo $ac_n "(cached) $ac_c" 1>&6
7106 else
7107 ac_func_search_save_LIBS="$LIBS"
7108 ac_cv_search_RegOpenKeyExA="no"
7109 cat > conftest.$ac_ext <<EOF
7110 #line 7111 "configure"
7111 #include "confdefs.h"
7112 /* Override any gcc2 internal prototype to avoid an error. */
7113 /* We use char because int might match the return type of a gcc2
7114 builtin and then its argument prototype would still apply. */
7115 char RegOpenKeyExA();
7117 int main() {
7118 RegOpenKeyExA()
7119 ; return 0; }
7121 if { (eval echo configure:7122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7122 rm -rf conftest*
7123 ac_cv_search_RegOpenKeyExA="none required"
7124 else
7125 echo "configure: failed program was:" >&5
7126 cat conftest.$ac_ext >&5
7128 rm -f conftest*
7129 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
7130 LIBS="-l$i $ac_func_search_save_LIBS"
7131 cat > conftest.$ac_ext <<EOF
7132 #line 7133 "configure"
7133 #include "confdefs.h"
7134 /* Override any gcc2 internal prototype to avoid an error. */
7135 /* We use char because int might match the return type of a gcc2
7136 builtin and then its argument prototype would still apply. */
7137 char RegOpenKeyExA();
7139 int main() {
7140 RegOpenKeyExA()
7141 ; return 0; }
7143 if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7144 rm -rf conftest*
7145 ac_cv_search_RegOpenKeyExA="-l$i"
7146 break
7147 else
7148 echo "configure: failed program was:" >&5
7149 cat conftest.$ac_ext >&5
7151 rm -f conftest*
7152 done
7153 LIBS="$ac_func_search_save_LIBS"
7156 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
7157 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
7158 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
7160 else :
7163 else
7164 echo "$ac_t""no" 1>&6
7167 # Check if user specified a different registry key.
7168 case "x${enable_win32_registry}" in
7169 x | xyes)
7170 # default.
7171 gcc_cv_win32_registry_key="$VERSION"
7173 xno)
7174 # no registry lookup.
7175 gcc_cv_win32_registry_key=''
7178 # user-specified key.
7179 gcc_cv_win32_registry_key="$enable_win32_registry"
7181 esac
7183 if test "x$enable_win32_registry" != xno; then
7184 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
7185 echo "configure:7186: checking registry key on windows hosts" >&5
7186 cat >> confdefs.h <<EOF
7187 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7190 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7193 esac
7195 # Get an absolute path to the GCC top-level source directory
7196 holddir=`${PWDCMD-pwd}`
7197 cd $srcdir
7198 topdir=`${PWDCMD-pwd}`
7199 cd $holddir
7201 # Conditionalize the makefile for this host machine.
7202 # Make-host contains the concatenation of all host makefile fragments
7203 # [there can be more than one]. This file is built by configure.frag.
7204 host_overrides=Make-host
7205 dep_host_xmake_file=
7206 for f in .. ${host_xmake_file}
7208 if test -f ${srcdir}/config/$f
7209 then
7210 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7212 done
7214 # Conditionalize the makefile for this target machine.
7215 # Make-target contains the concatenation of all host makefile fragments
7216 # [there can be more than one]. This file is built by configure.frag.
7217 target_overrides=Make-target
7218 dep_tmake_file=
7219 for f in .. ${tmake_file}
7221 if test -f ${srcdir}/config/$f
7222 then
7223 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7225 done
7227 symbolic_link='ln -s'
7229 # If the host doesn't support symlinks, modify CC in
7230 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7231 # Otherwise, we can use "CC=$(CC)".
7232 rm -f symtest.tem
7233 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7234 then
7235 cc_set_by_configure="\$(CC)"
7236 quoted_cc_set_by_configure="\$(CC)"
7237 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7238 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7239 else
7240 rm -f symtest.tem
7241 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7242 then
7243 symbolic_link="cp -p"
7244 else
7245 symbolic_link="cp"
7247 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7248 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7249 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7250 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7252 rm -f symtest.tem
7254 out_object_file=`basename $out_file .c`.o
7256 tm_file_list=
7257 for f in $tm_file; do
7258 case $f in
7259 ansidecl.h )
7260 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7261 defaults.h )
7262 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7263 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7264 esac
7265 done
7267 tm_p_file_list=
7268 for f in $tm_p_file; do
7269 case $f in
7270 tm-preds.h )
7271 tm_p_file_list="${tm_p_file_list} $f" ;;
7272 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7273 esac
7274 done
7276 host_xm_file_list=
7277 for f in $host_xm_file; do
7278 case $f in
7279 ansidecl.h )
7280 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7281 auto-host.h )
7282 host_xm_file_list="${host_xm_file_list} $f" ;;
7283 defaults.h )
7284 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7285 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7286 esac
7287 done
7289 build_xm_file_list=
7290 for f in $build_xm_file; do
7291 case $f in
7292 ansidecl.h )
7293 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7294 auto-build.h | auto-host.h )
7295 build_xm_file_list="${build_xm_file_list} $f" ;;
7296 defaults.h )
7297 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7298 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7299 esac
7300 done
7302 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7303 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7304 CROSS=
7305 ALL=all.internal
7306 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7307 if test x$host != x$target
7308 then
7309 CROSS="-DCROSS_COMPILE"
7310 ALL=all.cross
7311 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7312 case "$host","$target" in
7313 i?86-*-*,x86_64-*-* \
7314 | powerpc*-*-*,powerpc64*-*-*)
7315 CROSS="$CROSS -DNATIVE_CROSS" ;;
7316 esac
7319 # If this is a cross-compiler that does not
7320 # have its own set of headers then define
7321 # inhibit_libc
7323 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7324 # This prevents libgcc2 from containing any code which requires libc
7325 # support.
7326 inhibit_libc=
7327 if { test x$host != x$target && test "x$with_headers" = x &&
7328 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7329 inhibit_libc=-Dinhibit_libc
7333 # When building gcc with a cross-compiler, we need to adjust things so
7334 # that the generator programs are still built with the native compiler.
7335 # Also, we cannot run fixincludes or fix-header.
7337 # These are the normal (build=host) settings:
7338 BUILD_PREFIX=
7339 BUILD_PREFIX_1=ignore-
7340 BUILD_CC='$(CC)'
7341 BUILD_CFLAGS='$(ALL_CFLAGS)'
7343 STMP_FIXINC=stmp-fixinc
7344 STMP_FIXPROTO=stmp-fixproto
7346 # And these apply if build != host.
7347 if test x$build != x$host
7348 then
7349 BUILD_PREFIX=build-
7350 BUILD_PREFIX_1=build-
7351 BUILD_CC='$(CC_FOR_BUILD)'
7352 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7354 STMP_FIXINC=
7355 STMP_FIXPROTO=
7358 # Expand extra_headers to include complete path.
7359 # This substitutes for lots of t-* files.
7360 extra_headers_list=
7361 if test "x$extra_headers" = x
7362 then true
7363 else
7364 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7365 for file in $extra_headers;
7367 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7368 done
7371 # Add a definition of USE_COLLECT2 if system wants one.
7372 case $use_collect2 in
7373 no) use_collect2= ;;
7374 "") ;;
7376 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7377 xm_defines="${xm_defines} USE_COLLECT2"
7379 esac
7381 # If we have gas in the build tree, make a link to it.
7382 if test -f ../gas/Makefile; then
7383 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7386 # If we have nm and objdump in the build tree, make a link to them.
7387 if test -f ../binutils/Makefile; then
7388 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7389 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
7392 # If we have ld in the build tree, make a link to it.
7393 if test -f ../ld/Makefile; then
7394 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7397 # Figure out what assembler we will be using.
7398 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7399 echo "configure:7400: checking what assembler to use" >&5
7400 in_tree_gas=no
7401 gcc_cv_as=
7402 gcc_cv_gas_major_version=
7403 gcc_cv_gas_minor_version=
7404 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7405 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7406 if test -x "$DEFAULT_ASSEMBLER"; then
7407 gcc_cv_as="$DEFAULT_ASSEMBLER"
7408 elif test -x "$AS"; then
7409 gcc_cv_as="$AS"
7410 elif test -x as$host_exeext; then
7411 # Build using assembler in the current directory.
7412 gcc_cv_as=./as$host_exeext
7413 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
7414 && test -f ../gas/Makefile; then
7415 # Single tree build which includes gas.
7416 in_tree_gas=yes
7417 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
7419 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7420 if test x$gcc_cv_gas_version != x; then
7421 break
7423 done
7424 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7425 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7426 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7429 if test "x$gcc_cv_as" = x; then
7430 # Search the same directories that the installed compiler will
7431 # search. Else we may find the wrong assembler and lose. If we
7432 # do not find a suitable assembler binary, then try the user's
7433 # path.
7435 # Also note we have to check MD_EXEC_PREFIX before checking the
7436 # user's path. Unfortunately, there is no good way to get at the
7437 # value of MD_EXEC_PREFIX here. So we do a brute force search
7438 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7439 # to be fixed as part of the make/configure rewrite too.
7441 if test "x$exec_prefix" = xNONE; then
7442 if test "x$prefix" = xNONE; then
7443 test_prefix=/usr/local
7444 else
7445 test_prefix=$prefix
7447 else
7448 test_prefix=$exec_prefix
7451 # If the loop below does not find an assembler, then use whatever
7452 # one we can find in the users's path.
7453 # user's path.
7454 if test "x$program_prefix" != xNONE; then
7455 gcc_cv_as=${program_prefix}as$host_exeext
7456 else
7457 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7460 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7461 $test_prefix/lib/gcc-lib/$target_alias \
7462 /usr/lib/gcc/$target_alias/$gcc_version \
7463 /usr/lib/gcc/$target_alias \
7464 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7465 $test_prefix/$target_alias/bin"
7467 if test x$host = x$target; then
7468 test_dirs="$test_dirs \
7469 /usr/libexec \
7470 /usr/ccs/gcc \
7471 /usr/ccs/bin \
7472 /udk/usr/ccs/bin \
7473 /bsd43/usr/lib/cmplrs/cc \
7474 /usr/cross64/usr/bin \
7475 /usr/lib/cmplrs/cc \
7476 /sysv/usr/lib/cmplrs/cc \
7477 /svr4/usr/lib/cmplrs/cc \
7478 /usr/bin"
7481 for dir in $test_dirs; do
7482 if test -x $dir/as$host_exeext; then
7483 gcc_cv_as=$dir/as$host_exeext
7484 break;
7486 done
7488 case $in_tree_gas in
7489 yes)
7490 echo "$ac_t"""newly built gas"" 1>&6
7493 echo "$ac_t""$gcc_cv_as" 1>&6
7495 esac
7497 # Figure out what linker we will be using.
7498 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7499 echo "configure:7500: checking what linker to use" >&5
7500 in_tree_ld=no
7501 gcc_cv_ld=
7502 gcc_cv_gld_major_version=
7503 gcc_cv_gld_minor_version=
7504 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7505 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7506 if test -x "$DEFAULT_LINKER"; then
7507 gcc_cv_ld="$DEFAULT_LINKER"
7508 elif test -x "$LD"; then
7509 gcc_cv_ld="$LD"
7510 elif test -x ld$host_exeext; then
7511 # Build using linker in the current directory.
7512 gcc_cv_ld=./ld$host_exeext
7513 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
7514 && test -f ../ld/Makefile; then
7515 # Single tree build which includes ld.
7516 in_tree_ld=yes
7517 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
7519 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7520 if test x$gcc_cv_gld_version != x; then
7521 break
7523 done
7524 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7525 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7528 if test "x$gcc_cv_ld" = x; then
7529 # Search the same directories that the installed compiler will
7530 # search. Else we may find the wrong linker and lose. If we
7531 # do not find a suitable linker binary, then try the user's
7532 # path.
7534 # Also note we have to check MD_EXEC_PREFIX before checking the
7535 # user's path. Unfortunately, there is no good way to get at the
7536 # value of MD_EXEC_PREFIX here. So we do a brute force search
7537 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7538 # to be fixed as part of the make/configure rewrite too.
7540 if test "x$exec_prefix" = xNONE; then
7541 if test "x$prefix" = xNONE; then
7542 test_prefix=/usr/local
7543 else
7544 test_prefix=$prefix
7546 else
7547 test_prefix=$exec_prefix
7550 # If the loop below does not find an linker, then use whatever
7551 # one we can find in the users's path.
7552 # user's path.
7553 if test "x$program_prefix" != xNONE; then
7554 gcc_cv_ld=${program_prefix}ld$host_exeext
7555 else
7556 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7559 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7560 $test_prefix/lib/gcc-lib/$target_alias \
7561 /usr/lib/gcc/$target_alias/$gcc_version \
7562 /usr/lib/gcc/$target_alias \
7563 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7564 $test_prefix/$target_alias/bin"
7566 if test x$host = x$target; then
7567 test_dirs="$test_dirs \
7568 /usr/libexec \
7569 /usr/ccs/gcc \
7570 /usr/ccs/bin \
7571 /udk/usr/ccs/bin \
7572 /bsd43/usr/lib/cmplrs/cc \
7573 /usr/cross64/usr/bin \
7574 /usr/lib/cmplrs/cc \
7575 /sysv/usr/lib/cmplrs/cc \
7576 /svr4/usr/lib/cmplrs/cc \
7577 /usr/bin"
7580 for dir in $test_dirs; do
7581 if test -x $dir/ld$host_exeext; then
7582 gcc_cv_ld=$dir/ld$host_exeext
7583 break;
7585 done
7587 case $in_tree_ld in
7588 yes)
7589 echo "$ac_t"""newly built ld"" 1>&6
7592 echo "$ac_t""$gcc_cv_ld" 1>&6
7594 esac
7596 # Figure out what nm we will be using.
7597 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7598 echo "configure:7599: checking what nm to use" >&5
7599 if test -x nm$host_exeext; then
7600 gcc_cv_nm=./nm$host_exeext
7601 elif test "x$program_prefix" != xNONE; then
7602 gcc_cv_nm=${program_prefix}nm$host_exeext
7603 else
7604 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7606 echo "$ac_t""$gcc_cv_nm" 1>&6
7608 # Figure out what objdump we will be using.
7609 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7610 echo "configure:7611: checking what objdump to use" >&5
7611 if test -x objdump$host_exeext; then
7612 gcc_cv_objdump=./objdump$host_exeext
7613 elif test "x$program_prefix" != xNONE; then
7614 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7615 else
7616 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7618 echo "$ac_t""$gcc_cv_objdump" 1>&6
7620 # Figure out what assembler alignment features are present.
7621 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7622 echo "configure:7623: checking assembler alignment features" >&5
7623 gcc_cv_as_alignment_features=none
7624 if test $in_tree_gas = yes; then
7625 # Gas version 2.6 and later support for .balign and .p2align.
7626 # bytes to skip when using .p2align.
7627 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
7628 gcc_cv_as_alignment_features=".balign and .p2align"
7629 cat >> confdefs.h <<\EOF
7630 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7634 # Gas version 2.8 and later support specifying the maximum
7635 # bytes to skip when using .p2align.
7636 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
7637 gcc_cv_as_alignment_features=".p2align including maximum skip"
7638 cat >> confdefs.h <<\EOF
7639 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7643 elif test x$gcc_cv_as != x; then
7644 # Check if we have .balign and .p2align
7645 echo ".balign 4" > conftest.s
7646 echo ".p2align 2" >> conftest.s
7647 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7648 gcc_cv_as_alignment_features=".balign and .p2align"
7649 cat >> confdefs.h <<\EOF
7650 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7654 rm -f conftest.s conftest.o
7655 # Check if specifying the maximum bytes to skip when
7656 # using .p2align is supported.
7657 echo ".p2align 4,,7" > conftest.s
7658 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7659 gcc_cv_as_alignment_features=".p2align including maximum skip"
7660 cat >> confdefs.h <<\EOF
7661 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7665 rm -f conftest.s conftest.o
7667 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7669 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7670 echo "configure:7671: checking assembler subsection support" >&5
7671 gcc_cv_as_subsections=no
7672 if test $in_tree_gas = yes ; then
7673 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
7674 gcc_cv_as_subsections="working .subsection -1"
7676 elif test x$gcc_cv_as != x; then
7677 # Check if we have .subsection
7678 echo ".subsection 1" > conftest.s
7679 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7680 gcc_cv_as_subsections=".subsection"
7681 if test x$gcc_cv_nm != x; then
7682 cat > conftest.s <<EOF
7683 conftest_label1: .word 0
7684 .subsection -1
7685 conftest_label2: .word 0
7686 .previous
7688 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7689 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7690 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7691 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7693 else
7694 gcc_cv_as_subsections="working .subsection -1"
7699 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7701 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7702 cat >> confdefs.h <<\EOF
7703 #define HAVE_GAS_SUBSECTION_ORDERING 1
7707 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7709 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7710 echo "configure:7711: checking assembler weak support" >&5
7711 gcc_cv_as_weak=no
7712 if test $in_tree_gas = yes ; then
7713 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
7714 gcc_cv_as_weak="yes"
7716 elif test x$gcc_cv_as != x; then
7717 # Check if we have .weak
7718 echo " .weak foobar" > conftest.s
7719 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7720 gcc_cv_as_weak="yes"
7722 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7724 if test x"$gcc_cv_as_weak" = xyes; then
7725 cat >> confdefs.h <<\EOF
7726 #define HAVE_GAS_WEAK 1
7730 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7732 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7733 echo "configure:7734: checking assembler hidden support" >&5
7734 gcc_cv_as_hidden=no
7735 if test $in_tree_gas = yes ; then
7736 if test "$gcc_cv_gas_major_version" -eq 2 \
7737 -a "$gcc_cv_gas_minor_version" -eq 12 \
7738 -a "$gcc_cv_gas_patch_version" -ge 1 \
7739 -o "$gcc_cv_gas_major_version" -eq 2 \
7740 -a "$gcc_cv_gas_minor_version" -gt 12 \
7741 -o "$gcc_cv_gas_major_version" -gt 2 \
7742 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7743 gcc_cv_as_hidden="yes"
7745 elif test x$gcc_cv_as != x; then
7746 # Check if we have .hidden
7747 echo " .hidden foobar" > conftest.s
7748 echo "foobar:" >> conftest.s
7749 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7750 gcc_cv_as_hidden="yes"
7752 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7754 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7755 # This is irritatingly difficult to feature test for. Look for
7756 # the date string after the version number.
7757 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7758 if echo "$ld_ver" | grep GNU > /dev/null; then
7759 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7760 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'`
7761 if test 0"$ld_date" -lt 20020404; then
7762 if test -n "$ld_date"; then
7763 # If there was date string, but was earlier than 2002-04-04, fail
7764 gcc_cv_as_hidden="no"
7765 elif test -z "$ld_vers"; then
7766 # If there was no date string nor ld version number, something is wrong
7767 gcc_cv_as_hidden="no"
7768 else
7769 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7770 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7771 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7772 test -z "$ld_vers_patch" && ld_vers_patch=0
7773 if test "$ld_vers_major" -lt 2; then
7774 gcc_cv_as_hidden="no"
7775 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7776 gcc_cv_as_hidden="no"
7777 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7778 -a "$ld_vers_patch" -eq 0; then
7779 gcc_cv_as_hidden="no"
7785 if test x"$gcc_cv_as_hidden" = xyes; then
7786 cat >> confdefs.h <<\EOF
7787 #define HAVE_GAS_HIDDEN 1
7791 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7792 libgcc_visibility=$gcc_cv_as_hidden
7793 case "$target" in
7794 mips-sgi-irix6*)
7795 if test x"$gnu_ld_flag" = x"no"; then
7796 # Even if using gas with .hidden support, the resulting object files
7797 # cannot be linked with the IRIX 6 O32 linker. With the N32 and
7798 # N64 linkers, the problem is that the linker refuses to accept
7799 # -call_shared (passed by default to the linker) and -r (used to
7800 # link the object file generated without .hidden directives with
7801 # one that hides symbols), so we also lose.
7802 libgcc_visibility=no
7805 esac
7808 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7809 echo "configure:7810: checking assembler leb128 support" >&5
7810 gcc_cv_as_leb128=no
7811 if test $in_tree_gas = yes ; then
7812 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
7813 gcc_cv_as_leb128="yes"
7815 elif test x$gcc_cv_as != x; then
7816 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7817 cat > conftest.s <<EOF
7818 .data
7819 .uleb128 L2 - L1
7821 .uleb128 1280
7822 .sleb128 -1010
7825 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7826 gcc_cv_as_leb128="yes"
7828 # GAS versions before 2.11 do not support uleb128,
7829 # despite appearing to.
7830 # ??? There exists an elf-specific test that will crash
7831 # the assembler. Perhaps it's better to figure out whether
7832 # arbitrary sections are supported and try the test.
7833 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7834 if echo "$as_ver" | grep GNU > /dev/null; then
7835 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7836 as_major=`echo $as_ver | sed 's/\..*//'`
7837 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7838 if test $as_major -eq 2 -a $as_minor -lt 11; then
7839 gcc_cv_as_leb128="no"
7843 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7845 if test x"$gcc_cv_as_leb128" = xyes; then
7846 cat >> confdefs.h <<\EOF
7847 #define HAVE_AS_LEB128 1
7851 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7853 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7854 echo "configure:7855: checking assembler eh_frame optimization" >&5
7855 gcc_cv_as_eh_frame=no
7856 if test $in_tree_gas = yes ; then
7857 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
7858 gcc_cv_as_eh_frame="yes"
7860 elif test x$gcc_cv_as != x; then
7861 # Check if this is GAS.
7862 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7863 rm -f a.out 2> /dev/null
7864 if echo "$as_ver" | grep GNU > /dev/null; then
7865 # Versions up to and including 2.11.0 may mis-optimize
7866 # .eh_frame data. Try something.
7867 cat > conftest.s <<EOF
7868 .text
7869 .LFB1:
7870 .4byte 0
7871 .L1:
7872 .4byte 0
7873 .LFE1:
7874 .section .eh_frame,"aw",@progbits
7875 __FRAME_BEGIN__:
7876 .4byte .LECIE1-.LSCIE1
7877 .LSCIE1:
7878 .4byte 0x0
7879 .byte 0x1
7880 .ascii "z\0"
7881 .byte 0x1
7882 .byte 0x78
7883 .byte 0x1a
7884 .byte 0x0
7885 .byte 0x4
7886 .4byte 1
7887 .p2align 1
7888 .LECIE1:
7889 .LSFDE1:
7890 .4byte .LEFDE1-.LASFDE1
7891 .LASFDE1:
7892 .4byte .LASFDE1-__FRAME_BEGIN__
7893 .4byte .LFB1
7894 .4byte .LFE1-.LFB1
7895 .byte 0x4
7896 .4byte .LFE1-.LFB1
7897 .byte 0x4
7898 .4byte .L1-.LFB1
7899 .LEFDE1:
7901 cat > conftest.lit <<EOF
7902 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7903 0010 01000000 12000000 18000000 00000000 ................
7904 0020 08000000 04080000 0044 .........D
7906 cat > conftest.big <<EOF
7907 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7908 0010 00000001 00000012 00000018 00000000 ................
7909 0020 00000008 04000000 0844 .........D
7911 # If the assembler didn't choke, and we can objdump,
7912 # and we got the correct data, then succeed.
7913 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7914 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7915 | tail -3 > conftest.got \
7916 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7917 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7918 then
7919 gcc_cv_as_eh_frame="yes"
7920 else
7921 gcc_cv_as_eh_frame="bad"
7922 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7923 cat >> confdefs.h <<\EOF
7924 #define USE_AS_TRADITIONAL_FORMAT 1
7930 rm -f conftest.*
7932 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7934 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7935 echo "configure:7936: checking assembler section merging support" >&5
7936 gcc_cv_as_shf_merge=no
7937 if test $in_tree_gas = yes ; then
7938 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
7939 gcc_cv_as_shf_merge=yes
7941 elif test x$gcc_cv_as != x; then
7942 # Check if we support SHF_MERGE sections
7943 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7944 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7945 gcc_cv_as_shf_merge=yes
7947 rm -f conftest.s conftest.o
7949 if test x"$gcc_cv_as_shf_merge" = xyes; then
7950 cat >> confdefs.h <<\EOF
7951 #define HAVE_GAS_SHF_MERGE 1
7955 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7957 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7958 echo "configure:7959: checking assembler thread-local storage support" >&5
7959 gcc_cv_as_tls=no
7960 conftest_s=
7961 tls_first_major=
7962 tls_first_minor=
7963 case "$target" in
7964 alpha*-*-*)
7965 conftest_s='
7966 .section ".tdata","awT",@progbits
7967 foo: .long 25
7968 .text
7969 ldq $27,__tls_get_addr($29) !literal!1
7970 lda $16,foo($29) !tlsgd!1
7971 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7972 ldq $27,__tls_get_addr($29) !literal!2
7973 lda $16,foo($29) !tlsldm!2
7974 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7975 ldq $1,foo($29) !gotdtprel
7976 ldah $2,foo($29) !dtprelhi
7977 lda $3,foo($2) !dtprello
7978 lda $4,foo($29) !dtprel
7979 ldq $1,foo($29) !gottprel
7980 ldah $2,foo($29) !tprelhi
7981 lda $3,foo($2) !tprello
7982 lda $4,foo($29) !tprel'
7983 tls_first_major=2
7984 tls_first_minor=13
7986 i[34567]86-*-*)
7987 conftest_s='
7988 .section ".tdata","awT",@progbits
7989 foo: .long 25
7990 .text
7991 movl %gs:0, %eax
7992 leal foo@TLSGD(,%ebx,1), %eax
7993 leal foo@TLSLDM(%ebx), %eax
7994 leal foo@DTPOFF(%eax), %edx
7995 movl foo@GOTTPOFF(%ebx), %eax
7996 subl foo@GOTTPOFF(%ebx), %eax
7997 addl foo@GOTNTPOFF(%ebx), %eax
7998 movl foo@INDNTPOFF, %eax
7999 movl $foo@TPOFF, %eax
8000 subl $foo@TPOFF, %eax
8001 leal foo@NTPOFF(%ecx), %eax'
8002 tls_first_major=2
8003 tls_first_minor=14
8005 x86_64-*-*)
8006 conftest_s='
8007 .section ".tdata","awT",@progbits
8008 foo: .long 25
8009 .text
8010 movq %fs:0, %rax
8011 leaq foo@TLSGD(%rip), %rdi
8012 leaq foo@TLSLD(%rip), %rdi
8013 leaq foo@DTPOFF(%rax), %rdx
8014 movq foo@GOTTPOFF(%rip), %rax
8015 movq $foo@TPOFF, %rax'
8016 tls_first_major=2
8017 tls_first_minor=14
8019 ia64-*-*)
8020 conftest_s='
8021 .section ".tdata","awT",@progbits
8022 foo: data8 25
8023 .text
8024 addl r16 = @ltoff(@dtpmod(foo#)), gp
8025 addl r17 = @ltoff(@dtprel(foo#)), gp
8026 addl r18 = @ltoff(@tprel(foo#)), gp
8027 addl r19 = @dtprel(foo#), gp
8028 adds r21 = @dtprel(foo#), r13
8029 movl r23 = @dtprel(foo#)
8030 addl r20 = @tprel(foo#), gp
8031 adds r22 = @tprel(foo#), r13
8032 movl r24 = @tprel(foo#)'
8033 tls_first_major=2
8034 tls_first_minor=13
8036 s390-*-*)
8037 conftest_s='
8038 .section ".tdata","awT",@progbits
8039 foo: .long 25
8040 .text
8041 .long foo@TLSGD
8042 .long foo@TLSLDM
8043 .long foo@DTPOFF
8044 .long foo@NTPOFF
8045 .long foo@GOTNTPOFF
8046 .long foo@INDNTPOFF
8047 l %r1,foo@GOTNTPOFF(%r12)
8048 l %r1,0(%r1):tls_load:foo
8049 bas %r14,0(%r1,%r13):tls_gdcall:foo
8050 bas %r14,0(%r1,%r13):tls_ldcall:foo'
8051 tls_first_major=2
8052 tls_first_minor=14
8054 s390x-*-*)
8055 conftest_s='
8056 .section ".tdata","awT",@progbits
8057 foo: .long 25
8058 .text
8059 .quad foo@TLSGD
8060 .quad foo@TLSLDM
8061 .quad foo@DTPOFF
8062 .quad foo@NTPOFF
8063 .quad foo@GOTNTPOFF
8064 lg %r1,foo@GOTNTPOFF(%r12)
8065 larl %r1,foo@INDNTPOFF
8066 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
8067 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
8068 tls_first_major=2
8069 tls_first_minor=14
8071 esac
8072 if test -z "$tls_first_major"; then
8074 elif test $in_tree_gas = yes ; then
8075 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
8076 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
8077 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
8078 gcc_cv_as_tls=yes
8080 elif test x$gcc_cv_as != x; then
8081 echo "$conftest_s" > conftest.s
8082 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
8083 then
8084 gcc_cv_as_tls=yes
8086 rm -f conftest.s conftest.o
8088 if test "$gcc_cv_as_tls" = yes; then
8089 cat >> confdefs.h <<\EOF
8090 #define HAVE_AS_TLS 1
8094 echo "$ac_t""$gcc_cv_as_tls" 1>&6
8096 case "$target" in
8097 # All TARGET_ABI_OSF targets.
8098 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
8099 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
8100 echo "configure:8101: checking assembler supports explicit relocations" >&5
8101 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
8102 echo $ac_n "(cached) $ac_c" 1>&6
8103 else
8105 gcc_cv_as_explicit_relocs=unknown
8106 if test $in_tree_gas = yes ; then
8107 if test "$gcc_cv_gas_major_version" -eq 2 \
8108 -a "$gcc_cv_gas_minor_version" -ge 12 \
8109 -o "$gcc_cv_gas_major_version" -gt 2; then
8110 gcc_cv_as_explicit_relocs=yes
8112 elif test x$gcc_cv_as != x; then
8113 cat > conftest.s << 'EOF'
8114 .set nomacro
8115 .text
8116 extbl $3, $2, $3 !lituse_bytoff!1
8117 ldq $2, a($29) !literal!1
8118 ldq $4, b($29) !literal!2
8119 ldq_u $3, 0($2) !lituse_base!1
8120 ldq $27, f($29) !literal!5
8121 jsr $26, ($27), f !lituse_jsr!5
8122 ldah $29, 0($26) !gpdisp!3
8123 lda $0, c($29) !gprel
8124 ldah $1, d($29) !gprelhigh
8125 lda $1, d($1) !gprellow
8126 lda $29, 0($29) !gpdisp!3
8128 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8129 gcc_cv_as_explicit_relocs=yes
8130 else
8131 gcc_cv_as_explicit_relocs=no
8133 rm -f conftest.s conftest.o
8138 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
8139 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
8140 cat >> confdefs.h <<\EOF
8141 #define HAVE_AS_EXPLICIT_RELOCS 1
8146 sparc*-*-*)
8147 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
8148 echo "configure:8149: checking assembler .register pseudo-op support" >&5
8149 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
8150 echo $ac_n "(cached) $ac_c" 1>&6
8151 else
8153 gcc_cv_as_register_pseudo_op=unknown
8154 if test x$gcc_cv_as != x; then
8155 # Check if we have .register
8156 echo ".register %g2, #scratch" > conftest.s
8157 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8158 gcc_cv_as_register_pseudo_op=yes
8159 else
8160 gcc_cv_as_register_pseudo_op=no
8162 rm -f conftest.s conftest.o
8167 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
8168 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
8169 cat >> confdefs.h <<\EOF
8170 #define HAVE_AS_REGISTER_PSEUDO_OP 1
8175 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
8176 echo "configure:8177: checking assembler supports -relax" >&5
8177 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
8178 echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8181 gcc_cv_as_relax_opt=unknown
8182 if test x$gcc_cv_as != x; then
8183 # Check if gas supports -relax
8184 echo ".text" > conftest.s
8185 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
8186 gcc_cv_as_relax_opt=yes
8187 else
8188 gcc_cv_as_relax_opt=no
8190 rm -f conftest.s conftest.o
8195 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
8196 if test "x$gcc_cv_as_relax_opt" = xyes; then
8197 cat >> confdefs.h <<\EOF
8198 #define HAVE_AS_RELAX_OPTION 1
8203 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
8204 echo "configure:8205: checking assembler and linker support unaligned pc related relocs" >&5
8205 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
8206 echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8209 gcc_cv_as_sparc_ua_pcrel=unknown
8210 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
8211 gcc_cv_as_sparc_ua_pcrel=no
8212 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
8213 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8214 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
8215 gcc_cv_as_sparc_ua_pcrel=yes
8217 rm -f conftest.s conftest.o conftest
8222 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
8223 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8224 cat >> confdefs.h <<\EOF
8225 #define HAVE_AS_SPARC_UA_PCREL 1
8230 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
8231 echo "configure:8232: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
8232 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
8233 echo $ac_n "(cached) $ac_c" 1>&6
8234 else
8236 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
8237 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
8238 if test x$gcc_cv_objdump != x; then
8239 gcc_cv_as_sparc_ua_pcrel_hidden=no
8240 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8241 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8242 echo "foo: .skip 4" >> conftest.s
8243 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8244 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8245 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8246 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8247 if $gcc_cv_objdump -R conftest 2> /dev/null \
8248 | grep 'DISP32' > /dev/null 2>&1; then
8250 else
8251 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8255 rm -f conftest.s conftest.o conftest
8256 else
8257 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8262 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8263 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8264 cat >> confdefs.h <<\EOF
8265 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8270 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8271 echo "configure:8272: checking for assembler offsetable %lo() support" >&5
8272 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8273 echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8276 gcc_cv_as_offsetable_lo10=unknown
8277 if test "x$gcc_cv_as" != x; then
8278 # Check if assembler has offsetable %lo()
8279 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8280 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8281 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8282 > /dev/null 2>&1 &&
8283 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8284 > /dev/null 2>&1; then
8285 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8286 gcc_cv_as_offsetable_lo10=no
8287 else
8288 gcc_cv_as_offsetable_lo10=yes
8290 else
8291 gcc_cv_as_offsetable_lo10=no
8293 rm -f conftest.s conftest.o conftest1.s conftest1.o
8298 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8299 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8300 cat >> confdefs.h <<\EOF
8301 #define HAVE_AS_OFFSETABLE_LO10 1
8308 i[34567]86-*-* | x86_64-*-*)
8309 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8310 echo "configure:8311: checking assembler instructions" >&5
8311 gcc_cv_as_instructions=
8312 if test $in_tree_gas = yes ; then
8313 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
8314 gcc_cv_as_instructions="filds fists"
8316 elif test x$gcc_cv_as != x; then
8317 set "filds fists" "filds mem; fists mem"
8318 while test $# -gt 0
8320 echo "$2" > conftest.s
8321 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8322 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8324 shift 2
8325 done
8326 rm -f conftest.s conftest.o
8328 if test x"$gcc_cv_as_instructions" != x; then
8329 cat >> confdefs.h <<EOF
8330 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8334 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8336 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8337 echo "configure:8338: checking assembler GOTOFF in data directives" >&5
8338 gcc_cv_as_gotoff_in_data=no
8339 if test $in_tree_gas = yes ; then
8340 if test "$gcc_cv_gas_major_version" -eq 2 \
8341 -a "$gcc_cv_gas_minor_version" -ge 11 \
8342 -o "$gcc_cv_gas_major_version" -gt 2; then
8343 gcc_cv_as_gotoff_in_data=yes
8345 elif test x$gcc_cv_as != x; then
8346 cat > conftest.s <<EOF
8347 .text
8348 .L0:
8350 .data
8351 .long .L0@GOTOFF
8353 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8354 gcc_cv_as_gotoff_in_data=yes
8357 cat >> confdefs.h <<EOF
8358 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8361 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8364 ia64*-*-*)
8365 echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6
8366 echo "configure:8367: checking assembler supports ltoffx and ldxmov" >&5
8367 if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
8368 echo $ac_n "(cached) $ac_c" 1>&6
8369 else
8371 gcc_cv_as_ltoffx_ldxmov_relocs=unknown
8372 if test x$gcc_cv_gas_major_version != x \
8373 -a x$gcc_cv_gas_minor_version != x
8374 then
8375 if test "$gcc_cv_gas_major_version" -eq 2 \
8376 -a "$gcc_cv_gas_minor_version" -ge 14 \
8377 -o "$gcc_cv_gas_major_version" -gt 2; then
8378 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8380 elif test x$gcc_cv_as != x; then
8381 cat > conftest.s << 'EOF'
8382 .text
8383 addl r15 = @ltoffx(x#), gp
8385 ld8.mov r16 = [r15], x#
8387 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8388 gcc_cv_as_ltoffx_ldxmov_relocs=yes
8389 else
8390 gcc_cv_as_ltoffx_ldxmov_relocs=no
8392 rm -f conftest.s conftest.o
8397 echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
8398 if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
8399 cat >> confdefs.h <<\EOF
8400 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
8405 esac
8407 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8408 echo "configure:8409: checking assembler dwarf2 debug_line support" >&5
8409 gcc_cv_as_dwarf2_debug_line=no
8410 # ??? Not all targets support dwarf2 debug_line, even within a version
8411 # of gas. Moreover, we need to emit a valid instruction to trigger any
8412 # info to the output file. So, as supported targets are added to gas 2.11,
8413 # add some instruction here to (also) show we expect this might work.
8414 # ??? Once 2.11 is released, probably need to add first known working
8415 # version to the per-target configury.
8416 case "$target" in
8417 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8418 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
8419 insn="nop"
8421 ia64*-*-*)
8422 insn="nop 0"
8424 esac
8425 if test $in_tree_gas = yes ; then
8426 if test "$gcc_cv_gas_major_version" -eq 2 \
8427 -a "$gcc_cv_gas_minor_version" -ge 11 \
8428 -o "$gcc_cv_gas_major_version" -gt 2 \
8429 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8430 && test x"$insn" != x ; then
8431 gcc_cv_as_dwarf2_debug_line="yes"
8433 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8434 echo ' .file 1 "conftest.s"' > conftest.s
8435 echo ' .loc 1 3 0' >> conftest.s
8436 echo " $insn" >> conftest.s
8437 # ??? This fails with non-gnu grep.
8438 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8439 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8440 # The .debug_line file table must be in the exact order that
8441 # we specified the files, since these indices are also used
8442 # by DW_AT_decl_file. Approximate this test by testing if
8443 # the assembler bitches if the same index is assigned twice.
8444 echo ' .file 1 "foo.s"' > conftest.s
8445 echo ' .file 1 "bar.s"' >> conftest.s
8446 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8447 then
8448 gcc_cv_as_dwarf2_debug_line="no"
8449 else
8450 gcc_cv_as_dwarf2_debug_line="yes"
8453 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8455 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8456 cat >> confdefs.h <<\EOF
8457 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8461 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8463 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8464 echo "configure:8465: checking assembler --gdwarf2 support" >&5
8465 gcc_cv_as_gdwarf2_flag=no
8466 if test $in_tree_gas = yes ; then
8467 if test "$gcc_cv_gas_major_version" -eq 2 \
8468 -a "$gcc_cv_gas_minor_version" -ge 11 \
8469 -o "$gcc_cv_gas_major_version" -gt 2 \
8470 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8471 && test x"$insn" != x ; then
8472 gcc_cv_as_gdwarf2_flag="yes"
8474 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8475 echo '' > conftest.s
8476 # ??? This fails with non-gnu grep.
8477 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8478 then
8479 gcc_cv_as_gdwarf2_flag="yes"
8481 rm -f conftest.s conftest.o
8483 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8484 cat >> confdefs.h <<\EOF
8485 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8489 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8491 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8492 echo "configure:8493: checking assembler --gstabs support" >&5
8493 gcc_cv_as_gstabs_flag=no
8494 if test $in_tree_gas = yes ; then
8495 if test "$gcc_cv_gas_major_version" -eq 2 \
8496 -a "$gcc_cv_gas_minor_version" -ge 11 \
8497 -o "$gcc_cv_gas_major_version" -gt 2 \
8498 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8499 && test x"$insn" != x ; then
8500 gcc_cv_as_gstabs_flag="yes"
8502 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8503 echo '' > conftest.s
8504 # ??? This fails with non-gnu grep.
8505 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8506 gcc_cv_as_gstabs_flag="yes"
8508 rm -f conftest.s conftest.o
8510 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8511 cat >> confdefs.h <<\EOF
8512 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8516 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8518 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8519 echo "configure:8520: checking linker read-only and read-write section mixing" >&5
8520 gcc_cv_ld_ro_rw_mix=unknown
8521 if test $in_tree_ld = yes ; then
8522 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
8523 gcc_cv_ld_ro_rw_mix=read-write
8525 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8526 echo '.section "myfoosect", "a"' > conftest1.s
8527 echo '.section "myfoosect", "aw"' > conftest2.s
8528 echo '.byte 1' >> conftest2.s
8529 echo '.section "myfoosect", "a"' > conftest3.s
8530 echo '.byte 0' >> conftest3.s
8531 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
8532 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
8533 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
8534 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8535 conftest2.o conftest3.o; then
8536 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8537 | grep -A1 myfoosect`
8538 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8539 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8540 gcc_cv_ld_ro_rw_mix=read-only
8541 else
8542 gcc_cv_ld_ro_rw_mix=read-write
8546 rm -f conftest.* conftest[123].*
8548 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8549 cat >> confdefs.h <<\EOF
8550 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8554 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8556 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8557 echo "configure:8558: checking linker PT_GNU_EH_FRAME support" >&5
8558 gcc_cv_ld_eh_frame_hdr=no
8559 if test $in_tree_ld = yes ; then
8560 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
8561 gcc_cv_ld_eh_frame_hdr=yes
8563 elif test x$gcc_cv_ld != x; then
8564 # Check if linker supports --eh-frame-hdr option
8565 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8566 gcc_cv_ld_eh_frame_hdr=yes
8569 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8570 cat >> confdefs.h <<\EOF
8571 #define HAVE_LD_EH_FRAME_HDR 1
8575 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8577 # Miscellaneous target-specific checks.
8578 case "$target" in
8579 mips*-*-*)
8580 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8581 echo "configure:8582: checking whether libgloss uses STARTUP directives consistently" >&5
8582 gcc_cv_mips_libgloss_startup=no
8583 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8584 if test "x$exec_prefix" = xNONE; then
8585 if test "x$prefix" = xNONE; then
8586 test_prefix=/usr/local
8587 else
8588 test_prefix=$prefix
8590 else
8591 test_prefix=$exec_prefix
8593 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8595 if grep '^STARTUP' $f > /dev/null 2>&1; then
8596 gcc_cv_mips_libgloss_startup=yes
8597 break
8599 done
8600 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8601 cat >> confdefs.h <<\EOF
8602 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8606 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8608 esac
8610 if test x$with_sysroot = x && test x$host = x$target \
8611 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8612 cat >> confdefs.h <<EOF
8613 #define PREFIX_INCLUDE_DIR "$prefix/include"
8618 # Figure out what language subdirectories are present.
8619 # Look if the user specified --enable-languages="..."; if not, use
8620 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8621 # go away some day.
8622 # NB: embedded tabs in this IF block -- do not untabify
8623 if test x"${enable_languages+set}" != xset; then
8624 if test x"${LANGUAGES+set}" = xset; then
8625 enable_languages="${LANGUAGES}"
8626 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8628 else
8629 enable_languages=all
8631 else
8632 if test x"${enable_languages}" = x \
8633 || test x"${enable_languages}" = xyes;
8634 then
8635 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8638 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8640 # First scan to see if an enabled language requires some other language.
8641 # We assume that a given config-lang.in will list all the language
8642 # front ends it requires, even if some are required indirectly.
8643 for lang in ${srcdir}/*/config-lang.in ..
8645 case $lang in
8648 # The odd quoting in the next line works around
8649 # an apparent bug in bash 1.12 on linux.
8650 ${srcdir}/[*]/config-lang.in)
8653 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8654 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8655 for other in $this_lang_requires
8657 case ,${enable_languages}, in
8658 *,$other,*)
8660 *,all,*)
8662 *,$lang_alias,*)
8663 enable_languages="$enable_languages,$other"
8665 esac
8666 done
8668 esac
8669 done
8671 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8672 found_languages=
8673 subdirs=
8674 for lang in ${srcdir}/*/config-lang.in ..
8676 case $lang in
8677 ..) ;;
8678 # The odd quoting in the next line works around
8679 # an apparent bug in bash 1.12 on linux.
8680 ${srcdir}/[*]/config-lang.in) ;;
8682 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8683 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8684 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8685 if test "x$lang_alias" = x
8686 then
8687 echo "$lang doesn't set \$language." 1>&2
8688 exit 1
8690 case ${build_by_default},${enable_languages}, in
8691 *,$lang_alias,*) add_this_lang=yes ;;
8692 no,*) add_this_lang=no ;;
8693 *,all,*) add_this_lang=yes ;;
8694 *) add_this_lang=no ;;
8695 esac
8696 found_languages="${found_languages} ${lang_alias}"
8697 if test x"${add_this_lang}" = xyes; then
8698 case $lang in
8699 ${srcdir}/ada/config-lang.in)
8700 if test x$have_gnat = xyes ; then
8701 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8705 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8707 esac
8710 esac
8711 done
8713 missing_languages=
8714 for expected_language in ${expected_languages} ..
8716 if test "${expected_language}" != ..; then
8717 missing_language="${expected_language}"
8718 if test "${expected_language}" = "c" \
8719 || test "${expected_language}" = "all"; then
8720 missing_language=
8722 for found_language in ${found_languages} ..
8724 if test "${found_language}" != ..; then
8725 if test "${expected_language}" = "${found_language}"; then
8726 missing_language=
8729 done
8730 if test "x${missing_language}" != x; then
8731 missing_languages="${missing_languages} ${missing_language}"
8734 done
8736 if test "x$missing_languages" != x; then
8737 { echo "configure: error:
8738 The following requested languages were not found:${missing_languages}
8739 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8742 # Make gthr-default.h if we have a thread file.
8743 gthread_flags=
8744 if test $thread_file != single; then
8745 rm -f gthr-default.h
8746 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8747 gthread_flags=-DHAVE_GTHR_DEFAULT
8751 # Find out what GC implementation we want, or may, use.
8752 # Check whether --with-gc or --without-gc was given.
8753 if test "${with_gc+set}" = set; then
8754 withval="$with_gc"
8755 case "$withval" in
8756 simple | page)
8757 GGC=ggc-$withval
8760 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8762 esac
8763 else
8764 GGC=ggc-page
8768 echo "Using $GGC for garbage collection."
8770 # Use the system's zlib library.
8771 zlibdir=-L../zlib
8772 zlibinc="-I\$(srcdir)/../zlib"
8773 # Check whether --with-system-zlib or --without-system-zlib was given.
8774 if test "${with_system_zlib+set}" = set; then
8775 withval="$with_system_zlib"
8776 zlibdir=
8777 zlibinc=
8785 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8786 echo "configure:8787: checking whether to enable maintainer-specific portions of Makefiles" >&5
8787 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8788 if test "${enable_maintainer_mode+set}" = set; then
8789 enableval="$enable_maintainer_mode"
8790 maintainer_mode=$enableval
8791 else
8792 maintainer_mode=no
8796 echo "$ac_t""$maintainer_mode" 1>&6
8798 if test "$maintainer_mode" = "yes"; then
8799 MAINT=''
8800 else
8801 MAINT='#'
8804 # Make empty files to contain the specs and options for each language.
8805 # Then add #include lines to for a compiler that has specs and/or options.
8807 lang_specs_files=
8808 lang_options_files=
8809 lang_tree_files=
8810 for subdir in . $subdirs
8812 if test -f $srcdir/$subdir/lang-specs.h; then
8813 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8815 if test -f $srcdir/$subdir/lang-options.h; then
8816 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8818 if test -f $srcdir/$subdir/$subdir-tree.def; then
8819 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8821 done
8823 # These (without "all_") are set in each config-lang.in.
8824 # `language' must be a single word so is spelled singularly.
8825 all_languages=
8826 all_boot_languages=
8827 all_compilers=
8828 all_stagestuff=
8829 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8830 # List of language makefile fragments.
8831 all_lang_makefiles=
8832 # Files for gengtype
8833 all_gtfiles="$target_gtfiles"
8834 # Files for gengtype with language
8835 all_gtfiles_files_langs=
8836 all_gtfiles_files_files=
8838 # Add the language fragments.
8839 # Languages are added via two mechanisms. Some information must be
8840 # recorded in makefile variables, these are defined in config-lang.in.
8841 # We accumulate them and plug them into the main Makefile.
8842 # The other mechanism is a set of hooks for each of the main targets
8843 # like `clean', `install', etc.
8845 language_fragments="Make-lang"
8846 language_hooks="Make-hooks"
8848 for s in .. $subdirs
8850 if test $s != ".."
8851 then
8852 language=
8853 boot_language=
8854 compilers=
8855 stagestuff=
8856 outputs=
8857 gtfiles=
8858 . ${srcdir}/$s/config-lang.in
8859 if test "x$language" = x
8860 then
8861 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8862 exit 1
8864 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8865 if test -f ${srcdir}/$s/Makefile.in
8866 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8868 all_languages="$all_languages $language"
8869 if test "x$boot_language" = xyes
8870 then
8871 all_boot_languages="$all_boot_languages $language"
8873 all_compilers="$all_compilers $compilers"
8874 all_stagestuff="$all_stagestuff $stagestuff"
8875 all_outputs="$all_outputs $outputs"
8876 all_gtfiles="$all_gtfiles $gtfiles"
8877 for f in .. $gtfiles
8879 if test $f != ".."
8880 then
8881 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8882 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8884 done
8886 done
8888 # Pick up gtfiles for c
8889 gtfiles=
8890 s="c"
8891 . ${srcdir}/c-config-lang.in
8892 all_gtfiles="$all_gtfiles $gtfiles"
8893 for f in .. $gtfiles
8895 if test $f != ".."
8896 then
8897 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8898 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8900 done
8902 check_languages=
8903 for language in .. $all_languages
8905 if test $language != ".."
8906 then
8907 check_languages="$check_languages check-$language"
8909 done
8911 # Since we can't use `::' targets, we link each language in
8912 # with a set of hooks, reached indirectly via lang.${target}.
8914 rm -f Make-hooks
8915 touch Make-hooks
8916 target_list="all.build all.cross start.encap rest.encap tags \
8917 info dvi generated-manpages \
8918 install-normal install-common install-info install-man \
8919 uninstall \
8920 mostlyclean clean distclean extraclean maintainer-clean \
8921 stage1 stage2 stage3 stage4"
8922 for t in $target_list
8925 for lang in .. $all_languages
8927 if test $lang != ".."; then
8928 x="$x $lang.$t"
8930 done
8931 echo "lang.$t: $x" >> Make-hooks
8932 done
8934 # Create .gdbinit.
8936 echo "dir ." > .gdbinit
8937 echo "dir ${srcdir}" >> .gdbinit
8938 if test x$gdb_needs_out_file_path = xyes
8939 then
8940 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8942 if test "x$subdirs" != x; then
8943 for s in $subdirs
8945 echo "dir ${srcdir}/$s" >> .gdbinit
8946 done
8948 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8950 # Define variables host_canonical and build_canonical
8951 # because some Cygnus local changes in the Makefile depend on them.
8952 build_canonical=${build}
8953 host_canonical=${host}
8954 target_subdir=
8955 if test "${host}" != "${target}" ; then
8956 target_subdir=${target_alias}/
8962 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8963 # absolute path for gcc_tooldir based on inserting the number of up-directory
8964 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8965 # $(libsubdir)/@(unlibsubdir) based path.
8966 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8967 # make and thus we'd get different behavior depending on where we built the
8968 # sources.
8969 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8970 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8971 else
8972 # An explanation of the sed strings:
8973 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8974 # -e 's|/$||' match a trailing forward slash and eliminates it
8975 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8976 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8978 # (*) Note this pattern overwrites the first character of the string
8979 # with a forward slash if one is not already present. This is not a
8980 # problem because the exact names of the sub-directories concerned is
8981 # unimportant, just the number of them matters.
8983 # The practical upshot of these patterns is like this:
8985 # prefix exec_prefix result
8986 # ------ ----------- ------
8987 # /foo /foo/bar ../
8988 # /foo/ /foo/bar ../
8989 # /foo /foo/bar/ ../
8990 # /foo/ /foo/bar/ ../
8991 # /foo /foo/bar/ugg ../../
8993 dollar='$$'
8994 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8999 # Find a directory in which to install a shared libgcc.
9001 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
9002 if test "${enable_version_specific_runtime_libs+set}" = set; then
9003 enableval="$enable_version_specific_runtime_libs"
9008 # Check whether --with-slibdir or --without-slibdir was given.
9009 if test "${with_slibdir+set}" = set; then
9010 withval="$with_slibdir"
9011 slibdir="$with_slibdir"
9012 else
9013 if test "${enable_version_specific_runtime_libs+set}" = set; then
9014 slibdir='$(libsubdir)'
9015 elif test "$host" != "$target"; then
9016 slibdir='$(build_tooldir)/lib'
9017 else
9018 slibdir='$(libdir)'
9024 objdir=`${PWDCMD-pwd}`
9027 # Process the language and host/target makefile fragments.
9028 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
9030 # Substitute configuration variables
9100 # Echo that links are built
9101 if test x$host = x$target
9102 then
9103 str1="native "
9104 else
9105 str1="cross-"
9106 str2=" from $host"
9109 if test x$host != x$build
9110 then
9111 str3=" on a $build system"
9114 if test "x$str2" != x || test "x$str3" != x
9115 then
9116 str4=
9119 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
9121 if test "x$str2" != x || test "x$str3" != x
9122 then
9123 echo " ${str2}${str3}." 1>&2
9126 # Truncate the target if necessary
9127 if test x$host_truncate_target != x; then
9128 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
9131 # Configure the subdirectories
9132 # AC_CONFIG_SUBDIRS($subdirs)
9134 # Create the Makefile
9135 # and configure language subdirectories
9136 trap '' 1 2 15
9137 cat > confcache <<\EOF
9138 # This file is a shell script that caches the results of configure
9139 # tests run on this system so they can be shared between configure
9140 # scripts and configure runs. It is not useful on other systems.
9141 # If it contains results you don't want to keep, you may remove or edit it.
9143 # By default, configure uses ./config.cache as the cache file,
9144 # creating it if it does not exist already. You can give configure
9145 # the --cache-file=FILE option to use a different cache file; that is
9146 # what configure does when it calls configure scripts in
9147 # subdirectories, so they share the cache.
9148 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9149 # config.status only pays attention to the cache file if you give it the
9150 # --recheck option to rerun configure.
9153 # The following way of writing the cache mishandles newlines in values,
9154 # but we know of no workaround that is simple, portable, and efficient.
9155 # So, don't put newlines in cache variables' values.
9156 # Ultrix sh set writes to stderr and can't be redirected directly,
9157 # and sets the high bit in the cache file unless we assign to the vars.
9158 (set) 2>&1 |
9159 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9160 *ac_space=\ *)
9161 # `set' does not quote correctly, so add quotes (double-quote substitution
9162 # turns \\\\ into \\, and sed turns \\ into \).
9163 sed -n \
9164 -e "s/'/'\\\\''/g" \
9165 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9168 # `set' quotes correctly as required by POSIX, so do not add quotes.
9169 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9171 esac >> confcache
9172 if cmp -s $cache_file confcache; then
9174 else
9175 if test -w $cache_file; then
9176 echo "updating cache $cache_file"
9177 cat confcache > $cache_file
9178 else
9179 echo "not updating unwritable cache $cache_file"
9182 rm -f confcache
9184 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9186 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9187 # Let make expand exec_prefix.
9188 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9190 # Any assignment to VPATH causes Sun make to only execute
9191 # the first set of double-colon rules, so remove it if not needed.
9192 # If there is a colon in the path, we need to keep it.
9193 if test "x$srcdir" = x.; then
9194 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9197 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9199 DEFS=-DHAVE_CONFIG_H
9201 # Without the "./", some shells look in PATH for config.status.
9202 : ${CONFIG_STATUS=./config.status}
9204 echo creating $CONFIG_STATUS
9205 rm -f $CONFIG_STATUS
9206 cat > $CONFIG_STATUS <<EOF
9207 #! /bin/sh
9208 # Generated automatically by configure.
9209 # Run this file to recreate the current configuration.
9210 # This directory was configured as follows,
9211 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9213 # $0 $ac_configure_args
9215 # Compiler output produced by configure, useful for debugging
9216 # configure, is in ./config.log if it exists.
9218 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9219 for ac_option
9221 case "\$ac_option" in
9222 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9223 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9224 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9225 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9226 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9227 exit 0 ;;
9228 -help | --help | --hel | --he | --h)
9229 echo "\$ac_cs_usage"; exit 0 ;;
9230 *) echo "\$ac_cs_usage"; exit 1 ;;
9231 esac
9232 done
9234 ac_given_srcdir=$srcdir
9236 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9238 cat >> $CONFIG_STATUS <<EOF
9240 # Protect against being on the right side of a sed subst in config.status.
9241 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9242 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9243 $ac_vpsub
9244 $extrasub
9245 s%@SHELL@%$SHELL%g
9246 s%@CFLAGS@%$CFLAGS%g
9247 s%@CPPFLAGS@%$CPPFLAGS%g
9248 s%@CXXFLAGS@%$CXXFLAGS%g
9249 s%@FFLAGS@%$FFLAGS%g
9250 s%@DEFS@%$DEFS%g
9251 s%@LDFLAGS@%$LDFLAGS%g
9252 s%@LIBS@%$LIBS%g
9253 s%@exec_prefix@%$exec_prefix%g
9254 s%@prefix@%$prefix%g
9255 s%@program_transform_name@%$program_transform_name%g
9256 s%@bindir@%$bindir%g
9257 s%@sbindir@%$sbindir%g
9258 s%@libexecdir@%$libexecdir%g
9259 s%@datadir@%$datadir%g
9260 s%@sysconfdir@%$sysconfdir%g
9261 s%@sharedstatedir@%$sharedstatedir%g
9262 s%@localstatedir@%$localstatedir%g
9263 s%@libdir@%$libdir%g
9264 s%@includedir@%$includedir%g
9265 s%@oldincludedir@%$oldincludedir%g
9266 s%@infodir@%$infodir%g
9267 s%@mandir@%$mandir%g
9268 s%@host@%$host%g
9269 s%@host_alias@%$host_alias%g
9270 s%@host_cpu@%$host_cpu%g
9271 s%@host_vendor@%$host_vendor%g
9272 s%@host_os@%$host_os%g
9273 s%@target@%$target%g
9274 s%@target_alias@%$target_alias%g
9275 s%@target_cpu@%$target_cpu%g
9276 s%@target_vendor@%$target_vendor%g
9277 s%@target_os@%$target_os%g
9278 s%@build@%$build%g
9279 s%@build_alias@%$build_alias%g
9280 s%@build_cpu@%$build_cpu%g
9281 s%@build_vendor@%$build_vendor%g
9282 s%@build_os@%$build_os%g
9283 s%@CC@%$CC%g
9284 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9285 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9286 s%@CPP@%$CPP%g
9287 s%@GNATBIND@%$GNATBIND%g
9288 s%@ADAC@%$ADAC%g
9289 s%@strict1_warn@%$strict1_warn%g
9290 s%@warn_cflags@%$warn_cflags%g
9291 s%@WERROR@%$WERROR%g
9292 s%@nocommon_flag@%$nocommon_flag%g
9293 s%@valgrind_path@%$valgrind_path%g
9294 s%@valgrind_path_defines@%$valgrind_path_defines%g
9295 s%@valgrind_command@%$valgrind_command%g
9296 s%@coverage_flags@%$coverage_flags%g
9297 s%@enable_multilib@%$enable_multilib%g
9298 s%@enable_shared@%$enable_shared%g
9299 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9300 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9301 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9302 s%@stage1_cflags@%$stage1_cflags%g
9303 s%@SET_MAKE@%$SET_MAKE%g
9304 s%@AWK@%$AWK%g
9305 s%@LN@%$LN%g
9306 s%@LN_S@%$LN_S%g
9307 s%@RANLIB@%$RANLIB%g
9308 s%@INSTALL@%$INSTALL%g
9309 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9310 s%@INSTALL_DATA@%$INSTALL_DATA%g
9311 s%@have_mktemp_command@%$have_mktemp_command%g
9312 s%@MAKEINFO@%$MAKEINFO%g
9313 s%@BUILD_INFO@%$BUILD_INFO%g
9314 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9315 s%@FLEX@%$FLEX%g
9316 s%@BISON@%$BISON%g
9317 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9318 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9319 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9320 s%@LIBICONV@%$LIBICONV%g
9321 s%@manext@%$manext%g
9322 s%@objext@%$objext%g
9323 s%@extra_modes_file@%$extra_modes_file%g
9324 s%@FORBUILD@%$FORBUILD%g
9325 s%@PACKAGE@%$PACKAGE%g
9326 s%@VERSION@%$VERSION%g
9327 s%@ALLOCA@%$ALLOCA%g
9328 s%@GLIBC21@%$GLIBC21%g
9329 s%@USE_NLS@%$USE_NLS%g
9330 s%@MSGFMT@%$MSGFMT%g
9331 s%@GMSGFMT@%$GMSGFMT%g
9332 s%@XGETTEXT@%$XGETTEXT%g
9333 s%@INTLBISON@%$INTLBISON%g
9334 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9335 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9336 s%@CATALOGS@%$CATALOGS%g
9337 s%@CATOBJEXT@%$CATOBJEXT%g
9338 s%@INTLLIBS@%$INTLLIBS%g
9339 s%@INTLDEPS@%$INTLDEPS%g
9340 s%@INTLOBJS@%$INTLOBJS%g
9341 s%@POSUB@%$POSUB%g
9342 s%@DATADIRNAME@%$DATADIRNAME%g
9343 s%@INSTOBJEXT@%$INSTOBJEXT%g
9344 s%@GENCAT@%$GENCAT%g
9345 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9346 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9347 s%@CROSS@%$CROSS%g
9348 s%@ALL@%$ALL%g
9349 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9350 s%@inhibit_libc@%$inhibit_libc%g
9351 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9352 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9353 s%@BUILD_CC@%$BUILD_CC%g
9354 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9355 s%@STMP_FIXINC@%$STMP_FIXINC%g
9356 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9357 s%@libgcc_visibility@%$libgcc_visibility%g
9358 s%@gthread_flags@%$gthread_flags%g
9359 s%@GGC@%$GGC%g
9360 s%@zlibdir@%$zlibdir%g
9361 s%@zlibinc@%$zlibinc%g
9362 s%@MAINT@%$MAINT%g
9363 s%@build_canonical@%$build_canonical%g
9364 s%@host_canonical@%$host_canonical%g
9365 s%@target_subdir@%$target_subdir%g
9366 s%@gcc_tooldir@%$gcc_tooldir%g
9367 s%@dollar@%$dollar%g
9368 s%@slibdir@%$slibdir%g
9369 s%@objdir@%$objdir%g
9370 s%@subdirs@%$subdirs%g
9371 s%@srcdir@%$srcdir%g
9372 s%@all_boot_languages@%$all_boot_languages%g
9373 s%@all_compilers@%$all_compilers%g
9374 s%@all_gtfiles@%$all_gtfiles%g
9375 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9376 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9377 s%@all_lang_makefiles@%$all_lang_makefiles%g
9378 s%@all_languages@%$all_languages%g
9379 s%@all_stagestuff@%$all_stagestuff%g
9380 s%@build_exeext@%$build_exeext%g
9381 s%@build_install_headers_dir@%$build_install_headers_dir%g
9382 s%@build_xm_file_list@%$build_xm_file_list%g
9383 s%@build_xm_file@%$build_xm_file%g
9384 s%@build_xm_defines@%$build_xm_defines%g
9385 s%@check_languages@%$check_languages%g
9386 s%@cc_set_by_configure@%$cc_set_by_configure%g
9387 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9388 s%@cpp_install_dir@%$cpp_install_dir%g
9389 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9390 s%@dep_tmake_file@%$dep_tmake_file%g
9391 s%@extra_headers_list@%$extra_headers_list%g
9392 s%@extra_objs@%$extra_objs%g
9393 s%@extra_parts@%$extra_parts%g
9394 s%@extra_passes@%$extra_passes%g
9395 s%@extra_programs@%$extra_programs%g
9396 s%@float_h_file@%$float_h_file%g
9397 s%@gcc_config_arguments@%$gcc_config_arguments%g
9398 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9399 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9400 s%@gcc_version@%$gcc_version%g
9401 s%@gcc_version_full@%$gcc_version_full%g
9402 s%@gcc_version_trigger@%$gcc_version_trigger%g
9403 s%@host_exeext@%$host_exeext%g
9404 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9405 s%@host_xm_file_list@%$host_xm_file_list%g
9406 s%@host_xm_file@%$host_xm_file%g
9407 s%@host_xm_defines@%$host_xm_defines%g
9408 s%@out_host_hook_obj@%$out_host_hook_obj%g
9409 s%@install@%$install%g
9410 s%@lang_options_files@%$lang_options_files%g
9411 s%@lang_specs_files@%$lang_specs_files%g
9412 s%@lang_tree_files@%$lang_tree_files%g
9413 s%@local_prefix@%$local_prefix%g
9414 s%@md_file@%$md_file%g
9415 s%@objc_boehm_gc@%$objc_boehm_gc%g
9416 s%@out_file@%$out_file%g
9417 s%@out_object_file@%$out_object_file%g
9418 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9419 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9420 s%@symbolic_link@%$symbolic_link%g
9421 s%@thread_file@%$thread_file%g
9422 s%@tm_file_list@%$tm_file_list%g
9423 s%@tm_file@%$tm_file%g
9424 s%@tm_defines@%$tm_defines%g
9425 s%@tm_p_file_list@%$tm_p_file_list%g
9426 s%@tm_p_file@%$tm_p_file%g
9427 s%@xm_file@%$xm_file%g
9428 s%@xm_defines@%$xm_defines%g
9429 s%@c_target_objs@%$c_target_objs%g
9430 s%@cxx_target_objs@%$cxx_target_objs%g
9431 s%@target_cpu_default@%$target_cpu_default%g
9432 /@target_overrides@/r $target_overrides
9433 s%@target_overrides@%%g
9434 /@host_overrides@/r $host_overrides
9435 s%@host_overrides@%%g
9436 /@language_fragments@/r $language_fragments
9437 s%@language_fragments@%%g
9438 /@language_hooks@/r $language_hooks
9439 s%@language_hooks@%%g
9441 CEOF
9444 cat >> $CONFIG_STATUS <<\EOF
9446 # Split the substitutions into bite-sized pieces for seds with
9447 # small command number limits, like on Digital OSF/1 and HP-UX.
9448 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9449 ac_file=1 # Number of current file.
9450 ac_beg=1 # First line for current file.
9451 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9452 ac_more_lines=:
9453 ac_sed_cmds=""
9454 while $ac_more_lines; do
9455 if test $ac_beg -gt 1; then
9456 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9457 else
9458 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9460 if test ! -s conftest.s$ac_file; then
9461 ac_more_lines=false
9462 rm -f conftest.s$ac_file
9463 else
9464 if test -z "$ac_sed_cmds"; then
9465 ac_sed_cmds="sed -f conftest.s$ac_file"
9466 else
9467 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9469 ac_file=`expr $ac_file + 1`
9470 ac_beg=$ac_end
9471 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9473 done
9474 if test -z "$ac_sed_cmds"; then
9475 ac_sed_cmds=cat
9479 cat >> $CONFIG_STATUS <<EOF
9481 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9483 cat >> $CONFIG_STATUS <<\EOF
9484 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9485 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9486 case "$ac_file" in
9487 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9488 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9489 *) ac_file_in="${ac_file}.in" ;;
9490 esac
9492 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9494 # Remove last slash and all that follows it. Not all systems have dirname.
9495 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9496 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9497 # The file is in a subdirectory.
9498 test ! -d "$ac_dir" && mkdir "$ac_dir"
9499 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9500 # A "../" for each directory in $ac_dir_suffix.
9501 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9502 else
9503 ac_dir_suffix= ac_dots=
9506 case "$ac_given_srcdir" in
9507 .) srcdir=.
9508 if test -z "$ac_dots"; then top_srcdir=.
9509 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9510 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9511 *) # Relative path.
9512 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9513 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9514 esac
9517 echo creating "$ac_file"
9518 rm -f "$ac_file"
9519 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9520 case "$ac_file" in
9521 *Makefile*) ac_comsub="1i\\
9522 # $configure_input" ;;
9523 *) ac_comsub= ;;
9524 esac
9526 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9527 sed -e "$ac_comsub
9528 s%@configure_input@%$configure_input%g
9529 s%@srcdir@%$srcdir%g
9530 s%@top_srcdir@%$top_srcdir%g
9531 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9532 fi; done
9533 rm -f conftest.s*
9535 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9536 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9538 # ac_d sets the value in "#define NAME VALUE" lines.
9539 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9540 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9541 ac_dC='\3'
9542 ac_dD='%g'
9543 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9544 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9545 ac_uB='\([ ]\)%\1#\2define\3'
9546 ac_uC=' '
9547 ac_uD='\4%g'
9548 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9549 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9550 ac_eB='$%\1#\2define\3'
9551 ac_eC=' '
9552 ac_eD='%g'
9554 if test "${CONFIG_HEADERS+set}" != set; then
9556 cat >> $CONFIG_STATUS <<EOF
9557 CONFIG_HEADERS="auto-host.h:config.in"
9559 cat >> $CONFIG_STATUS <<\EOF
9561 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9562 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9563 case "$ac_file" in
9564 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9565 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9566 *) ac_file_in="${ac_file}.in" ;;
9567 esac
9569 echo creating $ac_file
9571 rm -f conftest.frag conftest.in conftest.out
9572 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9573 cat $ac_file_inputs > conftest.in
9577 # Transform confdefs.h into a sed script conftest.vals that substitutes
9578 # the proper values into config.h.in to produce config.h. And first:
9579 # Protect against being on the right side of a sed subst in config.status.
9580 # Protect against being in an unquoted here document in config.status.
9581 rm -f conftest.vals
9582 cat > conftest.hdr <<\EOF
9583 s/[\\&%]/\\&/g
9584 s%[\\$`]%\\&%g
9585 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9586 s%ac_d%ac_u%gp
9587 s%ac_u%ac_e%gp
9589 sed -n -f conftest.hdr confdefs.h > conftest.vals
9590 rm -f conftest.hdr
9592 # This sed command replaces #undef with comments. This is necessary, for
9593 # example, in the case of _POSIX_SOURCE, which is predefined and required
9594 # on some systems where configure will not decide to define it.
9595 cat >> conftest.vals <<\EOF
9596 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9599 # Break up conftest.vals because some shells have a limit on
9600 # the size of here documents, and old seds have small limits too.
9602 rm -f conftest.tail
9603 while :
9605 ac_lines=`grep -c . conftest.vals`
9606 # grep -c gives empty output for an empty file on some AIX systems.
9607 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9608 # Write a limited-size here document to conftest.frag.
9609 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9610 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9611 echo 'CEOF
9612 sed -f conftest.frag conftest.in > conftest.out
9613 rm -f conftest.in
9614 mv conftest.out conftest.in
9615 ' >> $CONFIG_STATUS
9616 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9617 rm -f conftest.vals
9618 mv conftest.tail conftest.vals
9619 done
9620 rm -f conftest.vals
9622 cat >> $CONFIG_STATUS <<\EOF
9623 rm -f conftest.frag conftest.h
9624 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9625 cat conftest.in >> conftest.h
9626 rm -f conftest.in
9627 if cmp -s $ac_file conftest.h 2>/dev/null; then
9628 echo "$ac_file is unchanged"
9629 rm -f conftest.h
9630 else
9631 # Remove last slash and all that follows it. Not all systems have dirname.
9632 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9633 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9634 # The file is in a subdirectory.
9635 test ! -d "$ac_dir" && mkdir "$ac_dir"
9637 rm -f $ac_file
9638 mv conftest.h $ac_file
9640 fi; done
9643 cat >> $CONFIG_STATUS <<EOF
9645 subdirs='$subdirs'
9646 symbolic_link='$symbolic_link'
9649 cat >> $CONFIG_STATUS <<\EOF
9650 for ac_file in $CONFIG_FILES; do
9651 # Support "outfile[:infile[:infile...]]"
9652 case "$ac_file" in
9653 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9654 esac
9655 # PO directories have a Makefile.in generated from Makefile.in.in.
9656 case "$ac_file" in */Makefile.in)
9657 # Adjust a relative srcdir.
9658 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9659 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9660 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9661 # In autoconf-2.13 it is called $ac_given_srcdir.
9662 # In autoconf-2.50 it is called $srcdir.
9663 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9664 case "$ac_given_srcdir" in
9665 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9666 /*) top_srcdir="$ac_given_srcdir" ;;
9667 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9668 esac
9669 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9670 rm -f "$ac_dir/POTFILES"
9671 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9672 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9673 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9674 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9677 esac
9678 done
9680 case x$CONFIG_HEADERS in
9681 xauto-host.h:config.in)
9682 echo > cstamp-h ;;
9683 esac
9684 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9685 # bootstrapping and the installation procedure can still use
9686 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9687 # FLAGS_TO_PASS has been modified to solve the problem there.
9688 # This is virtually a duplicate of what happens in configure.lang; we do
9689 # an extra check to make sure this only happens if ln -s can be used.
9690 if test "$symbolic_link" = "ln -s"; then
9691 for d in .. ${subdirs} fixinc ; do
9692 if test $d != ..; then
9693 STARTDIR=`${PWDCMD-pwd}`
9694 cd $d
9695 for t in stage1 stage2 stage3 stage4 include
9697 rm -f $t
9698 $symbolic_link ../$t $t 2>/dev/null
9699 done
9700 cd $STARTDIR
9702 done
9703 else true ; fi
9704 # Avoid having to add intl to our include paths.
9705 if test -f intl/libintl.h; then
9706 echo creating libintl.h
9707 echo '#include "intl/libintl.h"' >libintl.h
9710 exit 0
9712 chmod +x $CONFIG_STATUS
9713 rm -fr confdefs* $ac_clean_files
9714 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1