Merge from mainline
[official-gcc.git] / gcc / configure
blobc414fcf82d159537e7ced6d32eaa4da698b79a13
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-gnu-ld arrange to work with GNU ld."
16 ac_help="$ac_help
17 --with-ld arrange to use the specified ld (full pathname)"
18 ac_help="$ac_help
19 --with-gnu-as arrange to work with GNU as"
20 ac_help="$ac_help
21 --with-as arrange to use the specified as (full pathname)"
22 ac_help="$ac_help
23 --with-stabs arrange to use stabs instead of host debug format"
24 ac_help="$ac_help
25 --with-elf arrange to use ELF instead of host debug format"
26 ac_help="$ac_help
27 --with-local-prefix=DIR specifies directory to put local include"
28 ac_help="$ac_help
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files"
31 ac_help="$ac_help
32 --enable-multilib enable library support for multiple ABIs"
33 ac_help="$ac_help
34 --enable-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 --with-cpp-install-dir=DIR
41 install the user visible C preprocessor in DIR
42 (relative to PREFIX) as well as PREFIX/bin"
43 ac_help="$ac_help
44 --enable-__cxa_atexit enable __cxa_atexit for C++"
45 ac_help="$ac_help
46 --enable-c-mbchar enable multibyte characters for C and C++"
47 ac_help="$ac_help
48 --enable-threads enable thread usage for target GCC
49 --enable-threads=LIB use LIB thread package for target GCC"
50 ac_help="$ac_help
51 --enable-objc-gc enable the use of Boehm's garbage collector with
52 the GNU Objective-C runtime"
53 ac_help="$ac_help
54 --with-dwarf2 force the default debug format to be DWARF 2"
55 ac_help="$ac_help
56 --disable-shared don't provide a shared libgcc"
57 ac_help="$ac_help
58 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
59 ac_help="$ac_help
60 --enable-nls use Native Language Support (default)"
61 ac_help="$ac_help
62 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
63 ac_help="$ac_help
64 --disable-nls do not use Native Language Support"
65 ac_help="$ac_help
66 --with-included-gettext use the GNU gettext library included here"
67 ac_help="$ac_help
68 --disable-win32-registry
69 disable lookup of installation paths in the
70 Registry on Windows hosts
71 --enable-win32-registry enable registry lookup (default)
72 --enable-win32-registry=KEY
73 use KEY instead of GCC version as the last portion
74 of the registry key"
75 ac_help="$ac_help
76 --with-gc={simple,page} choose the garbage collection mechanism to use
77 with the compiler"
78 ac_help="$ac_help
79 --with-system-zlib use installed libz"
80 ac_help="$ac_help
81 --enable-maintainer-mode
82 enable make rules and dependencies not useful
83 (and sometimes confusing) to the casual installer"
84 ac_help="$ac_help
85 --enable-sjlj-exceptions
86 arrange to use setjmp/longjmp exception handling"
87 ac_help="$ac_help
88 --enable-libunwind-exceptions force use libunwind for exceptions"
89 ac_help="$ac_help
90 --enable-version-specific-runtime-libs
91 specify that runtime libraries should be
92 installed in a compiler-specific directory"
93 ac_help="$ac_help
94 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
96 # Initialize some variables set by options.
97 # The variables have the same names as the options, with
98 # dashes changed to underlines.
99 build=NONE
100 cache_file=./config.cache
101 exec_prefix=NONE
102 host=NONE
103 no_create=
104 nonopt=NONE
105 no_recursion=
106 prefix=NONE
107 program_prefix=NONE
108 program_suffix=NONE
109 program_transform_name=s,x,x,
110 silent=
111 site=
112 srcdir=
113 target=NONE
114 verbose=
115 x_includes=NONE
116 x_libraries=NONE
117 bindir='${exec_prefix}/bin'
118 sbindir='${exec_prefix}/sbin'
119 libexecdir='${exec_prefix}/libexec'
120 datadir='${prefix}/share'
121 sysconfdir='${prefix}/etc'
122 sharedstatedir='${prefix}/com'
123 localstatedir='${prefix}/var'
124 libdir='${exec_prefix}/lib'
125 includedir='${prefix}/include'
126 oldincludedir='/usr/include'
127 infodir='${prefix}/info'
128 mandir='${prefix}/man'
130 # Initialize some other variables.
131 subdirs=
132 MFLAGS= MAKEFLAGS=
133 SHELL=${CONFIG_SHELL-/bin/sh}
134 # Maximum number of lines to put in a shell here document.
135 ac_max_here_lines=12
137 ac_prev=
138 for ac_option
141 # If the previous option needs an argument, assign it.
142 if test -n "$ac_prev"; then
143 eval "$ac_prev=\$ac_option"
144 ac_prev=
145 continue
148 case "$ac_option" in
149 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
150 *) ac_optarg= ;;
151 esac
153 # Accept the important Cygnus configure options, so we can diagnose typos.
155 case "$ac_option" in
157 -bindir | --bindir | --bindi | --bind | --bin | --bi)
158 ac_prev=bindir ;;
159 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
160 bindir="$ac_optarg" ;;
162 -build | --build | --buil | --bui | --bu)
163 ac_prev=build ;;
164 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
165 build="$ac_optarg" ;;
167 -cache-file | --cache-file | --cache-fil | --cache-fi \
168 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
169 ac_prev=cache_file ;;
170 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
171 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
172 cache_file="$ac_optarg" ;;
174 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
175 ac_prev=datadir ;;
176 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
177 | --da=*)
178 datadir="$ac_optarg" ;;
180 -disable-* | --disable-*)
181 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
182 # Reject names that are not valid shell variable names.
183 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
184 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
186 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187 eval "enable_${ac_feature}=no" ;;
189 -enable-* | --enable-*)
190 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
191 # Reject names that are not valid shell variable names.
192 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
193 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
195 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196 case "$ac_option" in
197 *=*) ;;
198 *) ac_optarg=yes ;;
199 esac
200 eval "enable_${ac_feature}='$ac_optarg'" ;;
202 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
203 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
204 | --exec | --exe | --ex)
205 ac_prev=exec_prefix ;;
206 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
207 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
208 | --exec=* | --exe=* | --ex=*)
209 exec_prefix="$ac_optarg" ;;
211 -gas | --gas | --ga | --g)
212 # Obsolete; use --with-gas.
213 with_gas=yes ;;
215 -help | --help | --hel | --he)
216 # Omit some internal or obsolete options to make the list less imposing.
217 # This message is too long to be a string in the A/UX 3.1 sh.
218 cat << EOF
219 Usage: configure [options] [host]
220 Options: [defaults in brackets after descriptions]
221 Configuration:
222 --cache-file=FILE cache test results in FILE
223 --help print this message
224 --no-create do not create output files
225 --quiet, --silent do not print \`checking...' messages
226 --version print the version of autoconf that created configure
227 Directory and file names:
228 --prefix=PREFIX install architecture-independent files in PREFIX
229 [$ac_default_prefix]
230 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
231 [same as prefix]
232 --bindir=DIR user executables in DIR [EPREFIX/bin]
233 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
234 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
235 --datadir=DIR read-only architecture-independent data in DIR
236 [PREFIX/share]
237 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
238 --sharedstatedir=DIR modifiable architecture-independent data in DIR
239 [PREFIX/com]
240 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
241 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
242 --includedir=DIR C header files in DIR [PREFIX/include]
243 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
244 --infodir=DIR info documentation in DIR [PREFIX/info]
245 --mandir=DIR man documentation in DIR [PREFIX/man]
246 --srcdir=DIR find the sources in DIR [configure dir or ..]
247 --program-prefix=PREFIX prepend PREFIX to installed program names
248 --program-suffix=SUFFIX append SUFFIX to installed program names
249 --program-transform-name=PROGRAM
250 run sed PROGRAM on installed program names
252 cat << EOF
253 Host type:
254 --build=BUILD configure for building on BUILD [BUILD=HOST]
255 --host=HOST configure for HOST [guessed]
256 --target=TARGET configure for TARGET [TARGET=HOST]
257 Features and packages:
258 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
259 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
260 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
261 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
262 --x-includes=DIR X include files are in DIR
263 --x-libraries=DIR X library files are in DIR
265 if test -n "$ac_help"; then
266 echo "--enable and --with options recognized:$ac_help"
268 exit 0 ;;
270 -host | --host | --hos | --ho)
271 ac_prev=host ;;
272 -host=* | --host=* | --hos=* | --ho=*)
273 host="$ac_optarg" ;;
275 -includedir | --includedir | --includedi | --included | --include \
276 | --includ | --inclu | --incl | --inc)
277 ac_prev=includedir ;;
278 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
279 | --includ=* | --inclu=* | --incl=* | --inc=*)
280 includedir="$ac_optarg" ;;
282 -infodir | --infodir | --infodi | --infod | --info | --inf)
283 ac_prev=infodir ;;
284 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
285 infodir="$ac_optarg" ;;
287 -libdir | --libdir | --libdi | --libd)
288 ac_prev=libdir ;;
289 -libdir=* | --libdir=* | --libdi=* | --libd=*)
290 libdir="$ac_optarg" ;;
292 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
293 | --libexe | --libex | --libe)
294 ac_prev=libexecdir ;;
295 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
296 | --libexe=* | --libex=* | --libe=*)
297 libexecdir="$ac_optarg" ;;
299 -localstatedir | --localstatedir | --localstatedi | --localstated \
300 | --localstate | --localstat | --localsta | --localst \
301 | --locals | --local | --loca | --loc | --lo)
302 ac_prev=localstatedir ;;
303 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
304 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
305 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
306 localstatedir="$ac_optarg" ;;
308 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
309 ac_prev=mandir ;;
310 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
311 mandir="$ac_optarg" ;;
313 -nfp | --nfp | --nf)
314 # Obsolete; use --without-fp.
315 with_fp=no ;;
317 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
318 | --no-cr | --no-c)
319 no_create=yes ;;
321 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
322 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
323 no_recursion=yes ;;
325 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
326 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
327 | --oldin | --oldi | --old | --ol | --o)
328 ac_prev=oldincludedir ;;
329 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
330 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
331 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
332 oldincludedir="$ac_optarg" ;;
334 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
335 ac_prev=prefix ;;
336 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
337 prefix="$ac_optarg" ;;
339 -program-prefix | --program-prefix | --program-prefi | --program-pref \
340 | --program-pre | --program-pr | --program-p)
341 ac_prev=program_prefix ;;
342 -program-prefix=* | --program-prefix=* | --program-prefi=* \
343 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
344 program_prefix="$ac_optarg" ;;
346 -program-suffix | --program-suffix | --program-suffi | --program-suff \
347 | --program-suf | --program-su | --program-s)
348 ac_prev=program_suffix ;;
349 -program-suffix=* | --program-suffix=* | --program-suffi=* \
350 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
351 program_suffix="$ac_optarg" ;;
353 -program-transform-name | --program-transform-name \
354 | --program-transform-nam | --program-transform-na \
355 | --program-transform-n | --program-transform- \
356 | --program-transform | --program-transfor \
357 | --program-transfo | --program-transf \
358 | --program-trans | --program-tran \
359 | --progr-tra | --program-tr | --program-t)
360 ac_prev=program_transform_name ;;
361 -program-transform-name=* | --program-transform-name=* \
362 | --program-transform-nam=* | --program-transform-na=* \
363 | --program-transform-n=* | --program-transform-=* \
364 | --program-transform=* | --program-transfor=* \
365 | --program-transfo=* | --program-transf=* \
366 | --program-trans=* | --program-tran=* \
367 | --progr-tra=* | --program-tr=* | --program-t=*)
368 program_transform_name="$ac_optarg" ;;
370 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
371 | -silent | --silent | --silen | --sile | --sil)
372 silent=yes ;;
374 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
375 ac_prev=sbindir ;;
376 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
377 | --sbi=* | --sb=*)
378 sbindir="$ac_optarg" ;;
380 -sharedstatedir | --sharedstatedir | --sharedstatedi \
381 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
382 | --sharedst | --shareds | --shared | --share | --shar \
383 | --sha | --sh)
384 ac_prev=sharedstatedir ;;
385 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
386 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
387 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
388 | --sha=* | --sh=*)
389 sharedstatedir="$ac_optarg" ;;
391 -site | --site | --sit)
392 ac_prev=site ;;
393 -site=* | --site=* | --sit=*)
394 site="$ac_optarg" ;;
396 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
397 ac_prev=srcdir ;;
398 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
399 srcdir="$ac_optarg" ;;
401 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
402 | --syscon | --sysco | --sysc | --sys | --sy)
403 ac_prev=sysconfdir ;;
404 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
405 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
406 sysconfdir="$ac_optarg" ;;
408 -target | --target | --targe | --targ | --tar | --ta | --t)
409 ac_prev=target ;;
410 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
411 target="$ac_optarg" ;;
413 -v | -verbose | --verbose | --verbos | --verbo | --verb)
414 verbose=yes ;;
416 -version | --version | --versio | --versi | --vers)
417 echo "configure generated by autoconf version 2.13"
418 exit 0 ;;
420 -with-* | --with-*)
421 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
422 # Reject names that are not valid shell variable names.
423 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
424 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
426 ac_package=`echo $ac_package| sed 's/-/_/g'`
427 case "$ac_option" in
428 *=*) ;;
429 *) ac_optarg=yes ;;
430 esac
431 eval "with_${ac_package}='$ac_optarg'" ;;
433 -without-* | --without-*)
434 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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 eval "with_${ac_package}=no" ;;
442 --x)
443 # Obsolete; use --with-x.
444 with_x=yes ;;
446 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
447 | --x-incl | --x-inc | --x-in | --x-i)
448 ac_prev=x_includes ;;
449 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
450 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
451 x_includes="$ac_optarg" ;;
453 -x-libraries | --x-libraries | --x-librarie | --x-librari \
454 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
455 ac_prev=x_libraries ;;
456 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
457 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
458 x_libraries="$ac_optarg" ;;
460 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
464 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
465 echo "configure: warning: $ac_option: invalid host type" 1>&2
467 if test "x$nonopt" != xNONE; then
468 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
470 nonopt="$ac_option"
473 esac
474 done
476 if test -n "$ac_prev"; then
477 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
482 # File descriptor usage:
483 # 0 standard input
484 # 1 file creation
485 # 2 errors and warnings
486 # 3 some systems may open it to /dev/tty
487 # 4 used on the Kubota Titan
488 # 6 checking for... messages and results
489 # 5 compiler messages saved in config.log
490 if test "$silent" = yes; then
491 exec 6>/dev/null
492 else
493 exec 6>&1
495 exec 5>./config.log
497 echo "\
498 This file contains any messages produced by compilers while
499 running configure, to aid debugging if configure makes a mistake.
500 " 1>&5
502 # Strip out --no-create and --no-recursion so they do not pile up.
503 # Also quote any args containing shell metacharacters.
504 ac_configure_args=
505 for ac_arg
507 case "$ac_arg" in
508 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
509 | --no-cr | --no-c) ;;
510 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
511 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
512 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
513 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
514 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
515 esac
516 done
518 # NLS nuisances.
519 # Only set these to C if already set. These must not be set unconditionally
520 # because not all systems understand e.g. LANG=C (notably SCO).
521 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
522 # Non-C LC_CTYPE values break the ctype check.
523 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
524 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
525 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
526 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
528 # confdefs.h avoids OS command line length limits that DEFS can exceed.
529 rm -rf conftest* confdefs.h
530 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
531 echo > confdefs.h
533 # A filename unique to this package, relative to the directory that
534 # configure is in, which we can look for to find out if srcdir is correct.
535 ac_unique_file=tree.c
537 # Find the source files, if location was not specified.
538 if test -z "$srcdir"; then
539 ac_srcdir_defaulted=yes
540 # Try the directory containing this script, then its parent.
541 ac_prog=$0
542 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
543 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
544 srcdir=$ac_confdir
545 if test ! -r $srcdir/$ac_unique_file; then
546 srcdir=..
548 else
549 ac_srcdir_defaulted=no
551 if test ! -r $srcdir/$ac_unique_file; then
552 if test "$ac_srcdir_defaulted" = yes; then
553 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
554 else
555 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
558 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
560 # Prefer explicitly selected file to automatically selected ones.
561 if test -z "$CONFIG_SITE"; then
562 if test "x$prefix" != xNONE; then
563 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
564 else
565 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
568 for ac_site_file in $CONFIG_SITE; do
569 if test -r "$ac_site_file"; then
570 echo "loading site script $ac_site_file"
571 . "$ac_site_file"
573 done
575 if test -r "$cache_file"; then
576 echo "loading cache $cache_file"
577 . $cache_file
578 else
579 echo "creating cache $cache_file"
580 > $cache_file
583 ac_ext=c
584 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CPP $CPPFLAGS'
586 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cc_cross
590 ac_exeext=
591 ac_objext=o
592 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
593 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
594 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
595 ac_n= ac_c='
596 ' ac_t=' '
597 else
598 ac_n=-n ac_c= ac_t=
600 else
601 ac_n= ac_c='\c' ac_t=
607 remove=rm
608 hard_link=ln
609 symbolic_link='ln -s'
610 copy=cp
612 # Check for bogus environment variables.
613 # Test if LIBRARY_PATH contains the notation for the current directory
614 # since this would lead to problems installing/building glibc.
615 # LIBRARY_PATH contains the current directory if one of the following
616 # is true:
617 # - one of the terminals (":" and ";") is the first or last sign
618 # - two terminals occur directly after each other
619 # - the path contains an element with a dot in it
620 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
621 echo "configure:622: checking LIBRARY_PATH variable" >&5
622 case ${LIBRARY_PATH} in
623 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
624 library_path_setting="contains current directory"
627 library_path_setting="ok"
629 esac
630 echo "$ac_t""$library_path_setting" 1>&6
631 if test "$library_path_setting" != "ok"; then
632 { echo "configure: error:
633 *** LIBRARY_PATH shouldn't contain the current directory when
634 *** building gcc. Please change the environment variable
635 *** and run configure again." 1>&2; exit 1; }
638 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
639 # since this would lead to problems installing/building glibc.
640 # GCC_EXEC_PREFIX contains the current directory if one of the following
641 # is true:
642 # - one of the terminals (":" and ";") is the first or last sign
643 # - two terminals occur directly after each other
644 # - the path contains an element with a dot in it
645 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
646 echo "configure:647: checking GCC_EXEC_PREFIX variable" >&5
647 case ${GCC_EXEC_PREFIX} in
648 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
649 gcc_exec_prefix_setting="contains current directory"
652 gcc_exec_prefix_setting="ok"
654 esac
655 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
656 if test "$gcc_exec_prefix_setting" != "ok"; then
657 { echo "configure: error:
658 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
659 *** building gcc. Please change the environment variable
660 *** and run configure again." 1>&2; exit 1; }
663 # Check for additional parameters
665 # With GNU ld
666 # Check whether --with-gnu-ld or --without-gnu-ld was given.
667 if test "${with_gnu_ld+set}" = set; then
668 withval="$with_gnu_ld"
669 gnu_ld_flag="$with_gnu_ld"
670 else
671 gnu_ld_flag=no
675 # With pre-defined ld
676 # Check whether --with-ld or --without-ld was given.
677 if test "${with_ld+set}" = set; then
678 withval="$with_ld"
679 DEFAULT_LINKER="$with_ld"
682 if test x"${DEFAULT_LINKER+set}" = x"set"; then
683 if test ! -x "$DEFAULT_LINKER"; then
684 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
685 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
686 gnu_ld_flag=yes
688 cat >> confdefs.h <<EOF
689 #define DEFAULT_LINKER "$DEFAULT_LINKER"
694 # With GNU as
695 # Check whether --with-gnu-as or --without-gnu-as was given.
696 if test "${with_gnu_as+set}" = set; then
697 withval="$with_gnu_as"
698 gas_flag="$with_gnu_as"
699 else
700 gas_flag=no
704 # Check whether --with-as or --without-as was given.
705 if test "${with_as+set}" = set; then
706 withval="$with_as"
707 DEFAULT_ASSEMBLER="$with_as"
710 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
711 if test ! -x "$DEFAULT_ASSEMBLER"; then
712 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
713 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
714 gas_flag=yes
716 cat >> confdefs.h <<EOF
717 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
722 # With stabs
723 # Check whether --with-stabs or --without-stabs was given.
724 if test "${with_stabs+set}" = set; then
725 withval="$with_stabs"
726 stabs="$with_stabs"
727 else
728 stabs=no
732 # With ELF
733 # Check whether --with-elf or --without-elf was given.
734 if test "${with_elf+set}" = set; then
735 withval="$with_elf"
736 elf="$with_elf"
737 else
738 elf=no
742 # Specify the local prefix
743 local_prefix=
744 # Check whether --with-local-prefix or --without-local-prefix was given.
745 if test "${with_local_prefix+set}" = set; then
746 withval="$with_local_prefix"
747 case "${withval}" in
748 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
749 no) ;;
750 *) local_prefix=$with_local_prefix ;;
751 esac
755 # Default local prefix if it is empty
756 if test x$local_prefix = x; then
757 local_prefix=/usr/local
760 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
761 # passed in by the toplevel make and thus we'd get different behavior
762 # depending on where we built the sources.
763 gcc_gxx_include_dir=
764 # Specify the g++ header file directory
765 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
766 if test "${with_gxx_include_dir+set}" = set; then
767 withval="$with_gxx_include_dir"
768 case "${withval}" in
769 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
770 no) ;;
771 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
772 esac
776 if test x${gcc_gxx_include_dir} = x; then
777 if test x${enable_version_specific_runtime_libs} = xyes; then
778 gcc_gxx_include_dir='${libsubdir}/include/g++'
779 else
780 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
781 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
785 # Determine whether or not multilibs are enabled.
786 # Check whether --enable-multilib or --disable-multilib was given.
787 if test "${enable_multilib+set}" = set; then
788 enableval="$enable_multilib"
790 else
791 enable_multilib=yes
796 # Enable expensive internal checks
797 # Check whether --enable-checking or --disable-checking was given.
798 if test "${enable_checking+set}" = set; then
799 enableval="$enable_checking"
800 ac_checking=
801 ac_tree_checking=
802 ac_rtl_checking=
803 ac_rtlflag_checking=
804 ac_gc_checking=
805 ac_gc_always_collect=
806 case "${enableval}" in
807 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
808 ac_rtlflag_checking=1 ;;
809 no) ;;
810 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
811 set fnord $enableval; shift
812 IFS="$ac_save_IFS"
813 for check
815 case $check in
816 misc) ac_checking=1 ;;
817 tree) ac_tree_checking=1 ;;
818 rtlflag) ac_rtlflag_checking=1 ;;
819 rtl) ac_rtl_checking=1 ;;
820 gc) ac_gc_checking=1 ;;
821 gcac) ac_gc_always_collect=1 ;;
822 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
823 esac
824 done
826 esac
828 else
829 # Enable some checks by default for development versions of GCC
830 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
833 if test x$ac_checking != x ; then
834 cat >> confdefs.h <<\EOF
835 #define ENABLE_CHECKING 1
839 if test x$ac_tree_checking != x ; then
840 cat >> confdefs.h <<\EOF
841 #define ENABLE_TREE_CHECKING 1
845 if test x$ac_rtl_checking != x ; then
846 cat >> confdefs.h <<\EOF
847 #define ENABLE_RTL_CHECKING 1
851 if test x$ac_rtlflag_checking != x ; then
852 cat >> confdefs.h <<\EOF
853 #define ENABLE_RTL_FLAG_CHECKING 1
857 if test x$ac_gc_checking != x ; then
858 cat >> confdefs.h <<\EOF
859 #define ENABLE_GC_CHECKING 1
863 if test x$ac_gc_always_collect != x ; then
864 cat >> confdefs.h <<\EOF
865 #define ENABLE_GC_ALWAYS_COLLECT 1
870 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
871 if test "${with_cpp_install_dir+set}" = set; then
872 withval="$with_cpp_install_dir"
873 if test x$withval = xyes; then
874 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
875 elif test x$withval != xno; then
876 cpp_install_dir=$withval
881 # Enable __cxa_atexit for C++.
882 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
883 if test "${enable___cxa_atexit+set}" = set; then
884 enableval="$enable___cxa_atexit"
888 if test x$enable___cxa_atexit = xyes; then
889 cat >> confdefs.h <<\EOF
890 #define DEFAULT_USE_CXA_ATEXIT 1
895 # Enable Multibyte Characters for C/C++
896 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
897 if test "${enable_c_mbchar+set}" = set; then
898 enableval="$enable_c_mbchar"
899 if test x$enable_c_mbchar != xno; then
900 cat >> confdefs.h <<\EOF
901 #define MULTIBYTE_CHARS 1
908 # Enable threads
909 # Pass with no value to take the default
910 # Pass with a value to specify a thread package
911 # Check whether --enable-threads or --disable-threads was given.
912 if test "${enable_threads+set}" = set; then
913 enableval="$enable_threads"
915 else
916 enable_threads=''
920 enable_threads_flag=$enable_threads
921 # Check if a valid thread package
922 case x${enable_threads_flag} in
923 x | xno)
924 # No threads
925 target_thread_file='single'
927 xyes)
928 # default
929 target_thread_file=''
931 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
932 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
933 target_thread_file=$enable_threads_flag
936 echo "$enable_threads is an unknown thread package" 1>&2
937 exit 1
939 esac
941 # Check whether --enable-objc-gc or --disable-objc-gc was given.
942 if test "${enable_objc_gc+set}" = set; then
943 enableval="$enable_objc_gc"
944 if test x$enable_objc_gc = xno; then
945 objc_boehm_gc=''
946 else
947 objc_boehm_gc=1
949 else
950 objc_boehm_gc=''
954 # Check whether --with-dwarf2 or --without-dwarf2 was given.
955 if test "${with_dwarf2+set}" = set; then
956 withval="$with_dwarf2"
957 dwarf2="$with_dwarf2"
958 else
959 dwarf2=no
963 # Check whether --enable-shared or --disable-shared was given.
964 if test "${enable_shared+set}" = set; then
965 enableval="$enable_shared"
967 case $enable_shared in
968 yes | no) ;;
970 enable_shared=no
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
972 for pkg in $enableval; do
973 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
974 enable_shared=yes
976 done
977 IFS="$ac_save_ifs"
979 esac
981 else
982 enable_shared=yes
987 # Determine the host, build, and target systems
988 ac_aux_dir=
989 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
990 if test -f $ac_dir/install-sh; then
991 ac_aux_dir=$ac_dir
992 ac_install_sh="$ac_aux_dir/install-sh -c"
993 break
994 elif test -f $ac_dir/install.sh; then
995 ac_aux_dir=$ac_dir
996 ac_install_sh="$ac_aux_dir/install.sh -c"
997 break
999 done
1000 if test -z "$ac_aux_dir"; then
1001 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1003 ac_config_guess=$ac_aux_dir/config.guess
1004 ac_config_sub=$ac_aux_dir/config.sub
1005 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1008 # Do some error checking and defaulting for the host and target type.
1009 # The inputs are:
1010 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1012 # The rules are:
1013 # 1. You are not allowed to specify --host, --target, and nonopt at the
1014 # same time.
1015 # 2. Host defaults to nonopt.
1016 # 3. If nonopt is not specified, then host defaults to the current host,
1017 # as determined by config.guess.
1018 # 4. Target and build default to nonopt.
1019 # 5. If nonopt is not specified, then target and build default to host.
1021 # The aliases save the names the user supplied, while $host etc.
1022 # will get canonicalized.
1023 case $host---$target---$nonopt in
1024 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1025 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1026 esac
1029 # Make sure we can run config.sub.
1030 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1031 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1034 echo $ac_n "checking host system type""... $ac_c" 1>&6
1035 echo "configure:1036: checking host system type" >&5
1037 host_alias=$host
1038 case "$host_alias" in
1039 NONE)
1040 case $nonopt in
1041 NONE)
1042 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1043 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1044 fi ;;
1045 *) host_alias=$nonopt ;;
1046 esac ;;
1047 esac
1049 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1050 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1051 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1052 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1053 echo "$ac_t""$host" 1>&6
1055 echo $ac_n "checking target system type""... $ac_c" 1>&6
1056 echo "configure:1057: checking target system type" >&5
1058 target_alias=$target
1059 case "$target_alias" in
1060 NONE)
1061 case $nonopt in
1062 NONE) target_alias=$host_alias ;;
1063 *) target_alias=$nonopt ;;
1064 esac ;;
1065 esac
1067 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1068 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1071 echo "$ac_t""$target" 1>&6
1073 echo $ac_n "checking build system type""... $ac_c" 1>&6
1074 echo "configure:1075: checking build system type" >&5
1076 build_alias=$build
1077 case "$build_alias" in
1078 NONE)
1079 case $nonopt in
1080 NONE) build_alias=$host_alias ;;
1081 *) build_alias=$nonopt ;;
1082 esac ;;
1083 esac
1085 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1086 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089 echo "$ac_t""$build" 1>&6
1091 test "$host_alias" != "$target_alias" &&
1092 test "$program_prefix$program_suffix$program_transform_name" = \
1093 NONENONEs,x,x, &&
1094 program_prefix=${target_alias}-
1097 # Set program_transform_name
1098 if test "$program_transform_name" = s,x,x,; then
1099 program_transform_name=
1100 else
1101 # Double any \ or $. echo might interpret backslashes.
1102 cat <<\EOF_SED > conftestsed
1103 s,\\,\\\\,g; s,\$,$$,g
1104 EOF_SED
1105 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1106 rm -f conftestsed
1108 test "$program_prefix" != NONE &&
1109 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1110 # Use a double $ so make ignores it.
1111 test "$program_suffix" != NONE &&
1112 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1114 # sed with no file args requires a program.
1115 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1118 # Find the native compiler
1119 # Extract the first word of "gcc", so it can be a program name with args.
1120 set dummy gcc; ac_word=$2
1121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1122 echo "configure:1123: checking for $ac_word" >&5
1123 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1124 echo $ac_n "(cached) $ac_c" 1>&6
1125 else
1126 if test -n "$CC"; then
1127 ac_cv_prog_CC="$CC" # Let the user override the test.
1128 else
1129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1130 ac_dummy="$PATH"
1131 for ac_dir in $ac_dummy; do
1132 test -z "$ac_dir" && ac_dir=.
1133 if test -f $ac_dir/$ac_word; then
1134 ac_cv_prog_CC="gcc"
1135 break
1137 done
1138 IFS="$ac_save_ifs"
1141 CC="$ac_cv_prog_CC"
1142 if test -n "$CC"; then
1143 echo "$ac_t""$CC" 1>&6
1144 else
1145 echo "$ac_t""no" 1>&6
1148 if test -z "$CC"; then
1149 # Extract the first word of "cc", so it can be a program name with args.
1150 set dummy cc; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156 if test -n "$CC"; then
1157 ac_cv_prog_CC="$CC" # Let the user override the test.
1158 else
1159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1160 ac_prog_rejected=no
1161 ac_dummy="$PATH"
1162 for ac_dir in $ac_dummy; do
1163 test -z "$ac_dir" && ac_dir=.
1164 if test -f $ac_dir/$ac_word; then
1165 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1166 ac_prog_rejected=yes
1167 continue
1169 ac_cv_prog_CC="cc"
1170 break
1172 done
1173 IFS="$ac_save_ifs"
1174 if test $ac_prog_rejected = yes; then
1175 # We found a bogon in the path, so make sure we never use it.
1176 set dummy $ac_cv_prog_CC
1177 shift
1178 if test $# -gt 0; then
1179 # We chose a different compiler from the bogus one.
1180 # However, it has the same basename, so the bogon will be chosen
1181 # first if we set CC to just the basename; use the full file name.
1182 shift
1183 set dummy "$ac_dir/$ac_word" "$@"
1184 shift
1185 ac_cv_prog_CC="$@"
1190 CC="$ac_cv_prog_CC"
1191 if test -n "$CC"; then
1192 echo "$ac_t""$CC" 1>&6
1193 else
1194 echo "$ac_t""no" 1>&6
1197 if test -z "$CC"; then
1198 case "`uname -s`" in
1199 *win32* | *WIN32*)
1200 # Extract the first word of "cl", so it can be a program name with args.
1201 set dummy cl; ac_word=$2
1202 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1203 echo "configure:1204: checking for $ac_word" >&5
1204 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1205 echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207 if test -n "$CC"; then
1208 ac_cv_prog_CC="$CC" # Let the user override the test.
1209 else
1210 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1211 ac_dummy="$PATH"
1212 for ac_dir in $ac_dummy; do
1213 test -z "$ac_dir" && ac_dir=.
1214 if test -f $ac_dir/$ac_word; then
1215 ac_cv_prog_CC="cl"
1216 break
1218 done
1219 IFS="$ac_save_ifs"
1222 CC="$ac_cv_prog_CC"
1223 if test -n "$CC"; then
1224 echo "$ac_t""$CC" 1>&6
1225 else
1226 echo "$ac_t""no" 1>&6
1229 esac
1231 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1234 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1235 echo "configure:1236: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1237 ac_ext=c
1238 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1239 ac_cpp='$CPP $CPPFLAGS'
1240 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1241 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1242 cross_compiling=$ac_cv_prog_cc_cross
1244 cat > conftest.$ac_ext << EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1249 main(){return(0);}
1251 if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1252 ac_cv_prog_cc_works=yes
1253 # If we can't run a trivial program, we are probably using a cross compiler.
1254 if (./conftest; exit) 2>/dev/null; then
1255 ac_cv_prog_cc_cross=no
1256 else
1257 ac_cv_prog_cc_cross=yes
1259 else
1260 echo "configure: failed program was:" >&5
1261 cat conftest.$ac_ext >&5
1262 ac_cv_prog_cc_works=no
1264 rm -fr conftest*
1265 ac_ext=c
1266 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1267 ac_cpp='$CPP $CPPFLAGS'
1268 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1269 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1270 cross_compiling=$ac_cv_prog_cc_cross
1272 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1273 if test $ac_cv_prog_cc_works = no; then
1274 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1276 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1277 echo "configure:1278: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1278 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1279 cross_compiling=$ac_cv_prog_cc_cross
1281 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1282 echo "configure:1283: checking whether we are using GNU C" >&5
1283 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286 cat > conftest.c <<EOF
1287 #ifdef __GNUC__
1288 yes;
1289 #endif
1291 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1292 ac_cv_prog_gcc=yes
1293 else
1294 ac_cv_prog_gcc=no
1298 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1300 if test $ac_cv_prog_gcc = yes; then
1301 GCC=yes
1302 else
1303 GCC=
1306 ac_test_CFLAGS="${CFLAGS+set}"
1307 ac_save_CFLAGS="$CFLAGS"
1308 CFLAGS=
1309 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1310 echo "configure:1311: checking whether ${CC-cc} accepts -g" >&5
1311 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314 echo 'void f(){}' > conftest.c
1315 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1316 ac_cv_prog_cc_g=yes
1317 else
1318 ac_cv_prog_cc_g=no
1320 rm -f conftest*
1324 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1325 if test "$ac_test_CFLAGS" = set; then
1326 CFLAGS="$ac_save_CFLAGS"
1327 elif test $ac_cv_prog_cc_g = yes; then
1328 if test "$GCC" = yes; then
1329 CFLAGS="-g -O2"
1330 else
1331 CFLAGS="-g"
1333 else
1334 if test "$GCC" = yes; then
1335 CFLAGS="-O2"
1336 else
1337 CFLAGS=
1341 if test "x$CC" != xcc; then
1342 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1343 echo "configure:1344: checking whether $CC and cc understand -c and -o together" >&5
1344 else
1345 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1346 echo "configure:1347: checking whether cc understands -c and -o together" >&5
1348 set dummy $CC; ac_cc="`echo $2 |
1349 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1350 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1351 echo $ac_n "(cached) $ac_c" 1>&6
1352 else
1353 echo 'foo(){}' > conftest.c
1354 # Make sure it works both with $CC and with simple cc.
1355 # We do the test twice because some compilers refuse to overwrite an
1356 # existing .o file with -o, though they will create one.
1357 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1358 if { (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1359 test -f conftest.o && { (eval echo configure:1360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1360 then
1361 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1362 if test "x$CC" != xcc; then
1363 # Test first that cc exists at all.
1364 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1365 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1366 if { (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1367 test -f conftest.o && { (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1368 then
1369 # cc works too.
1371 else
1372 # cc exists but doesn't like -o.
1373 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1377 else
1378 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1380 rm -f conftest*
1383 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1384 echo "$ac_t""yes" 1>&6
1385 else
1386 echo "$ac_t""no" 1>&6
1387 cat >> confdefs.h <<\EOF
1388 #define NO_MINUS_C_MINUS_O 1
1393 # autoconf is lame and doesn't give us any substitution variable for this.
1394 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1395 NO_MINUS_C_MINUS_O=yes
1396 else
1397 OUTPUT_OPTION='-o $@'
1402 # See if GNAT has been installed
1403 if test $host != $build; then
1404 ac_tool_prefix=${host_alias}-
1405 else
1406 ac_tool_prefix=
1410 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1411 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1413 echo "configure:1414: checking for $ac_word" >&5
1414 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1415 echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417 if test -n "$GNATBIND"; then
1418 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1419 else
1420 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1421 ac_dummy="$PATH"
1422 for ac_dir in $ac_dummy; do
1423 test -z "$ac_dir" && ac_dir=.
1424 if test -f $ac_dir/$ac_word; then
1425 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1426 break
1428 done
1429 IFS="$ac_save_ifs"
1432 GNATBIND="$ac_cv_prog_GNATBIND"
1433 if test -n "$GNATBIND"; then
1434 echo "$ac_t""$GNATBIND" 1>&6
1435 else
1436 echo "$ac_t""no" 1>&6
1440 if test -z "$ac_cv_prog_GNATBIND"; then
1441 if test -n "$ac_tool_prefix"; then
1442 # Extract the first word of "gnatbind", so it can be a program name with args.
1443 set dummy gnatbind; ac_word=$2
1444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1445 echo "configure:1446: checking for $ac_word" >&5
1446 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1447 echo $ac_n "(cached) $ac_c" 1>&6
1448 else
1449 if test -n "$GNATBIND"; then
1450 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1451 else
1452 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1453 ac_dummy="$PATH"
1454 for ac_dir in $ac_dummy; do
1455 test -z "$ac_dir" && ac_dir=.
1456 if test -f $ac_dir/$ac_word; then
1457 ac_cv_prog_GNATBIND="gnatbind"
1458 break
1460 done
1461 IFS="$ac_save_ifs"
1462 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1465 GNATBIND="$ac_cv_prog_GNATBIND"
1466 if test -n "$GNATBIND"; then
1467 echo "$ac_t""$GNATBIND" 1>&6
1468 else
1469 echo "$ac_t""no" 1>&6
1472 else
1473 GNATBIND="no"
1477 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1478 echo "configure:1479: checking for compiler driver that understands Ada" >&5
1479 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482 cat >conftest.adb <<EOF
1483 procedure conftest is begin null; end conftest;
1485 gcc_cv_prog_adac=no
1486 # Have to do ac_tool_prefix and user overrides by hand.
1487 user_adac=$ADAC
1488 user_cc=$CC
1489 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1490 ${ac_tool_prefix}$user_cc $user_cc \
1491 ${ac_tool_prefix}gcc gcc \
1492 ${ac_tool_prefix}cc cc \
1493 ${ac_tool_prefix}gnatgcc gnatgcc \
1494 ${ac_tool_prefix}gnatcc gnatcc \
1495 ${ac_tool_prefix}adagcc adagcc \
1496 ${ac_tool_prefix}adacc adacc ; do
1497 # There is a bug in all released versions of GCC which causes the
1498 # driver to exit successfully when the appropriate language module
1499 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1500 # Therefore we must check for the error message as well as an
1501 # unsuccessful exit.
1502 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1503 if test x"$errors" = x; then
1504 gcc_cv_prog_adac=$cand
1505 break
1507 done
1508 rm -f conftest.*
1511 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1512 ADAC=$gcc_cv_prog_adac
1515 if test x$GNATBIND != xno && test x$ADAC != xno; then
1516 have_gnat=yes
1517 else
1518 have_gnat=no
1522 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1523 echo "configure:1524: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1524 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527 save_CFLAGS="$CFLAGS"
1528 CFLAGS="-Wno-long-long"
1529 cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1533 int main() {
1535 ; return 0; }
1537 if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1538 rm -rf conftest*
1539 ac_cv_prog_cc_no_long_long=yes
1540 else
1541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1543 rm -rf conftest*
1544 ac_cv_prog_cc_no_long_long=no
1546 rm -f conftest*
1547 CFLAGS="$save_CFLAGS"
1550 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1552 if test x$have_gnat != xno ; then
1553 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1554 echo "configure:1555: checking whether ${ADAC} accepts -Wno-long-long" >&5
1555 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558 cat >conftest.adb <<EOF
1559 procedure conftest is begin null; end conftest;
1561 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1562 ac_cv_prog_adac_no_long_long=yes
1563 else
1564 ac_cv_prog_adac_no_long_long=no
1566 rm -f conftest*
1569 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1570 else
1571 ac_cv_prog_adac_no_long_long=yes
1574 strict1_warn=
1575 if test $ac_cv_prog_cc_no_long_long = yes && \
1576 test $ac_cv_prog_adac_no_long_long = yes ; then
1577 strict1_warn="-pedantic -Wno-long-long"
1581 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1582 echo "configure:1583: checking how to run the C preprocessor" >&5
1583 # On Suns, sometimes $CPP names a directory.
1584 if test -n "$CPP" && test -d "$CPP"; then
1585 CPP=
1587 if test -z "$CPP"; then
1588 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1589 echo $ac_n "(cached) $ac_c" 1>&6
1590 else
1591 # This must be in double quotes, not single quotes, because CPP may get
1592 # substituted into the Makefile and "${CC-cc}" will confuse make.
1593 CPP="${CC-cc} -E"
1594 # On the NeXT, cc -E runs the code through the compiler's parser,
1595 # not just through cpp.
1596 cat > conftest.$ac_ext <<EOF
1597 #line 1598 "configure"
1598 #include "confdefs.h"
1599 #include <assert.h>
1600 Syntax Error
1602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1603 { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1605 if test -z "$ac_err"; then
1607 else
1608 echo "$ac_err" >&5
1609 echo "configure: failed program was:" >&5
1610 cat conftest.$ac_ext >&5
1611 rm -rf conftest*
1612 CPP="${CC-cc} -E -traditional-cpp"
1613 cat > conftest.$ac_ext <<EOF
1614 #line 1615 "configure"
1615 #include "confdefs.h"
1616 #include <assert.h>
1617 Syntax Error
1619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1620 { (eval echo configure:1621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1622 if test -z "$ac_err"; then
1624 else
1625 echo "$ac_err" >&5
1626 echo "configure: failed program was:" >&5
1627 cat conftest.$ac_ext >&5
1628 rm -rf conftest*
1629 CPP="${CC-cc} -nologo -E"
1630 cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 #include <assert.h>
1634 Syntax Error
1636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1637 { (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1639 if test -z "$ac_err"; then
1641 else
1642 echo "$ac_err" >&5
1643 echo "configure: failed program was:" >&5
1644 cat conftest.$ac_ext >&5
1645 rm -rf conftest*
1646 CPP=/lib/cpp
1648 rm -f conftest*
1650 rm -f conftest*
1652 rm -f conftest*
1653 ac_cv_prog_CPP="$CPP"
1655 CPP="$ac_cv_prog_CPP"
1656 else
1657 ac_cv_prog_CPP="$CPP"
1659 echo "$ac_t""$CPP" 1>&6
1661 echo $ac_n "checking for inline""... $ac_c" 1>&6
1662 echo "configure:1663: checking for inline" >&5
1663 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1665 else
1666 ac_cv_c_inline=no
1667 for ac_kw in inline __inline__ __inline; do
1668 cat > conftest.$ac_ext <<EOF
1669 #line 1670 "configure"
1670 #include "confdefs.h"
1672 int main() {
1673 } $ac_kw foo() {
1674 ; return 0; }
1676 if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1677 rm -rf conftest*
1678 ac_cv_c_inline=$ac_kw; break
1679 else
1680 echo "configure: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1683 rm -f conftest*
1684 done
1688 echo "$ac_t""$ac_cv_c_inline" 1>&6
1689 case "$ac_cv_c_inline" in
1690 inline | yes) ;;
1691 no) cat >> confdefs.h <<\EOF
1692 #define inline
1695 *) cat >> confdefs.h <<EOF
1696 #define inline $ac_cv_c_inline
1699 esac
1701 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1702 echo "configure:1703: checking for volatile" >&5
1703 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706 cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1710 int main() {
1711 volatile int foo;
1712 ; return 0; }
1714 if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1715 rm -rf conftest*
1716 gcc_cv_c_volatile=yes
1717 else
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1720 rm -rf conftest*
1721 gcc_cv_c_volatile=no
1723 rm -f conftest*
1726 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1727 if test $gcc_cv_c_volatile = yes ; then
1728 cat >> confdefs.h <<\EOF
1729 #define HAVE_VOLATILE 1
1735 echo $ac_n "checking for long double""... $ac_c" 1>&6
1736 echo "configure:1737: checking for long double" >&5
1737 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1739 else
1740 if test "$GCC" = yes; then
1741 gcc_cv_c_long_double=yes
1742 else
1743 cat > conftest.$ac_ext <<EOF
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1747 int main() {
1748 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1749 long double foo = 0.0;
1750 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1751 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1752 ; return 0; }
1754 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1755 rm -rf conftest*
1756 gcc_cv_c_long_double=yes
1757 else
1758 echo "configure: failed program was:" >&5
1759 cat conftest.$ac_ext >&5
1760 rm -rf conftest*
1761 gcc_cv_c_long_double=no
1763 rm -f conftest*
1767 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1768 if test $gcc_cv_c_long_double = yes; then
1769 cat >> confdefs.h <<\EOF
1770 #define HAVE_LONG_DOUBLE 1
1775 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1776 echo "configure:1777: checking for long long int" >&5
1777 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1778 echo $ac_n "(cached) $ac_c" 1>&6
1779 else
1780 cat > conftest.$ac_ext <<EOF
1781 #line 1782 "configure"
1782 #include "confdefs.h"
1784 int main() {
1785 long long int i;
1786 ; return 0; }
1788 if { (eval echo configure:1789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1789 rm -rf conftest*
1790 ac_cv_c_long_long=yes
1791 else
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 rm -rf conftest*
1795 ac_cv_c_long_long=no
1797 rm -f conftest*
1800 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1801 if test $ac_cv_c_long_long = yes; then
1802 cat >> confdefs.h <<\EOF
1803 #define HAVE_LONG_LONG 1
1807 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1808 echo "configure:1809: checking for __int64" >&5
1809 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812 cat > conftest.$ac_ext <<EOF
1813 #line 1814 "configure"
1814 #include "confdefs.h"
1816 int main() {
1817 __int64 i;
1818 ; return 0; }
1820 if { (eval echo configure:1821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1821 rm -rf conftest*
1822 ac_cv_c___int64=yes
1823 else
1824 echo "configure: failed program was:" >&5
1825 cat conftest.$ac_ext >&5
1826 rm -rf conftest*
1827 ac_cv_c___int64=no
1829 rm -f conftest*
1832 echo "$ac_t""$ac_cv_c___int64" 1>&6
1833 if test $ac_cv_c___int64 = yes; then
1834 cat >> confdefs.h <<\EOF
1835 #define HAVE___INT64 1
1840 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1841 echo "configure:1842: checking for built-in _Bool" >&5
1842 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1843 echo $ac_n "(cached) $ac_c" 1>&6
1844 else
1845 cat > conftest.$ac_ext <<EOF
1846 #line 1847 "configure"
1847 #include "confdefs.h"
1849 int main() {
1850 _Bool foo;
1851 ; return 0; }
1853 if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1854 rm -rf conftest*
1855 gcc_cv_c__bool=yes
1856 else
1857 echo "configure: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 rm -rf conftest*
1860 gcc_cv_c__bool=no
1862 rm -f conftest*
1866 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1867 if test $gcc_cv_c__bool = yes; then
1868 cat >> confdefs.h <<\EOF
1869 #define HAVE__BOOL 1
1875 # sizeof(char) is 1 by definition.
1876 echo $ac_n "checking size of short""... $ac_c" 1>&6
1877 echo "configure:1878: checking size of short" >&5
1878 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1882 cat > conftest.$ac_ext <<EOF
1883 #line 1884 "configure"
1884 #include "confdefs.h"
1885 #include "confdefs.h"
1886 #include <sys/types.h>
1889 int main() {
1890 switch (0) case 0: case (sizeof (short) == $ac_size):;
1891 ; return 0; }
1893 if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1894 rm -rf conftest*
1895 ac_cv_sizeof_short=$ac_size
1896 else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1900 rm -f conftest*
1901 if test x$ac_cv_sizeof_short != x ; then break; fi
1902 done
1906 if test x$ac_cv_sizeof_short = x ; then
1907 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1909 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1910 cat >> confdefs.h <<EOF
1911 #define SIZEOF_SHORT $ac_cv_sizeof_short
1915 echo $ac_n "checking size of int""... $ac_c" 1>&6
1916 echo "configure:1917: checking size of int" >&5
1917 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1918 echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 #include "confdefs.h"
1925 #include <sys/types.h>
1928 int main() {
1929 switch (0) case 0: case (sizeof (int) == $ac_size):;
1930 ; return 0; }
1932 if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1933 rm -rf conftest*
1934 ac_cv_sizeof_int=$ac_size
1935 else
1936 echo "configure: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1939 rm -f conftest*
1940 if test x$ac_cv_sizeof_int != x ; then break; fi
1941 done
1945 if test x$ac_cv_sizeof_int = x ; then
1946 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1948 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1949 cat >> confdefs.h <<EOF
1950 #define SIZEOF_INT $ac_cv_sizeof_int
1954 echo $ac_n "checking size of long""... $ac_c" 1>&6
1955 echo "configure:1956: checking size of long" >&5
1956 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1957 echo $ac_n "(cached) $ac_c" 1>&6
1958 else
1959 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1960 cat > conftest.$ac_ext <<EOF
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963 #include "confdefs.h"
1964 #include <sys/types.h>
1967 int main() {
1968 switch (0) case 0: case (sizeof (long) == $ac_size):;
1969 ; return 0; }
1971 if { (eval echo configure:1972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1972 rm -rf conftest*
1973 ac_cv_sizeof_long=$ac_size
1974 else
1975 echo "configure: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1978 rm -f conftest*
1979 if test x$ac_cv_sizeof_long != x ; then break; fi
1980 done
1984 if test x$ac_cv_sizeof_long = x ; then
1985 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1987 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1988 cat >> confdefs.h <<EOF
1989 #define SIZEOF_LONG $ac_cv_sizeof_long
1993 if test $ac_cv_c_long_long = yes; then
1994 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1995 echo "configure:1996: checking size of long long" >&5
1996 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998 else
1999 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2000 cat > conftest.$ac_ext <<EOF
2001 #line 2002 "configure"
2002 #include "confdefs.h"
2003 #include "confdefs.h"
2004 #include <sys/types.h>
2007 int main() {
2008 switch (0) case 0: case (sizeof (long long) == $ac_size):;
2009 ; return 0; }
2011 if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2012 rm -rf conftest*
2013 ac_cv_sizeof_long_long=$ac_size
2014 else
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2018 rm -f conftest*
2019 if test x$ac_cv_sizeof_long_long != x ; then break; fi
2020 done
2024 if test x$ac_cv_sizeof_long_long = x ; then
2025 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
2027 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2028 cat >> confdefs.h <<EOF
2029 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2034 if test $ac_cv_c___int64 = yes; then
2035 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
2036 echo "configure:2037: checking size of __int64" >&5
2037 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
2038 echo $ac_n "(cached) $ac_c" 1>&6
2039 else
2040 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2041 cat > conftest.$ac_ext <<EOF
2042 #line 2043 "configure"
2043 #include "confdefs.h"
2044 #include "confdefs.h"
2045 #include <sys/types.h>
2048 int main() {
2049 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
2050 ; return 0; }
2052 if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2053 rm -rf conftest*
2054 ac_cv_sizeof___int64=$ac_size
2055 else
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2059 rm -f conftest*
2060 if test x$ac_cv_sizeof___int64 != x ; then break; fi
2061 done
2065 if test x$ac_cv_sizeof___int64 = x ; then
2066 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
2068 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
2069 cat >> confdefs.h <<EOF
2070 #define SIZEOF___INT64 $ac_cv_sizeof___int64
2076 echo $ac_n "checking execution character set""... $ac_c" 1>&6
2077 echo "configure:2078: checking execution character set" >&5
2078 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080 else
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
2085 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
2086 ASCII
2087 #endif
2089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2090 egrep "ASCII" >/dev/null 2>&1; then
2091 rm -rf conftest*
2092 ac_cv_c_charset=ASCII
2094 rm -f conftest*
2096 if test x${ac_cv_c_charset+set} != xset; then
2097 cat > conftest.$ac_ext <<EOF
2098 #line 2099 "configure"
2099 #include "confdefs.h"
2100 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
2101 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
2102 EBCDIC
2103 #endif
2105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2106 egrep "EBCDIC" >/dev/null 2>&1; then
2107 rm -rf conftest*
2108 ac_cv_c_charset=EBCDIC
2110 rm -f conftest*
2113 if test x${ac_cv_c_charset+set} != xset; then
2114 ac_cv_c_charset=unknown
2118 echo "$ac_t""$ac_cv_c_charset" 1>&6
2119 if test $ac_cv_c_charset = unknown; then
2120 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
2121 elif test $ac_cv_c_charset = EBCDIC; then
2122 cat >> confdefs.h <<\EOF
2123 #define HOST_EBCDIC 1
2128 # If the native compiler is GCC, we can enable warnings even in stage1.
2129 # That's useful for people building cross-compilers, or just running a
2130 # quick `make'.
2131 warn_cflags=
2132 if test "x$GCC" = "xyes"; then
2133 warn_cflags='$(GCC_WARN_CFLAGS)'
2137 # Stage specific cflags for build.
2138 stage1_cflags=
2139 case $build in
2140 vax-*-*)
2141 if test x$GCC = xyes
2142 then
2143 stage1_cflags="-Wa,-J"
2144 else
2145 stage1_cflags="-J"
2148 powerpc-*-darwin*)
2149 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2150 # sources; use -no-cpp-precomp to get to GNU cpp.
2151 # Apple's GCC has bugs in designated initializer handling, so disable
2152 # that too.
2153 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2155 esac
2158 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2159 echo "configure:2160: checking whether ${MAKE-make} sets \${MAKE}" >&5
2160 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2161 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2162 echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164 cat > conftestmake <<\EOF
2165 all:
2166 @echo 'ac_maketemp="${MAKE}"'
2168 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2169 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2170 if test -n "$ac_maketemp"; then
2171 eval ac_cv_prog_make_${ac_make}_set=yes
2172 else
2173 eval ac_cv_prog_make_${ac_make}_set=no
2175 rm -f conftestmake
2177 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2178 echo "$ac_t""yes" 1>&6
2179 SET_MAKE=
2180 else
2181 echo "$ac_t""no" 1>&6
2182 SET_MAKE="MAKE=${MAKE-make}"
2186 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether a default assembler was specified" >&5
2188 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2189 if test x"$gas_flag" = x"no"; then
2190 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2191 else
2192 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2194 else
2195 echo "$ac_t""no" 1>&6
2198 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2199 echo "configure:2200: checking whether a default linker was specified" >&5
2200 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2201 if test x"$gnu_ld_flag" = x"no"; then
2202 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2203 else
2204 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2206 else
2207 echo "$ac_t""no" 1>&6
2210 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2211 echo "configure:2212: checking for GNU C library" >&5
2212 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2213 echo $ac_n "(cached) $ac_c" 1>&6
2214 else
2215 cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <features.h>
2219 int main() {
2221 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2222 #error Not a GNU C library system
2223 #endif
2224 ; return 0; }
2226 if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2227 rm -rf conftest*
2228 gcc_cv_glibc=yes
2229 else
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2232 rm -rf conftest*
2233 gcc_cv_glibc=no
2235 rm -f conftest*
2238 echo "$ac_t""$gcc_cv_glibc" 1>&6
2239 if test $gcc_cv_glibc = yes; then
2240 cat >> confdefs.h <<\EOF
2241 #define _GNU_SOURCE 1
2246 # Find some useful tools
2247 for ac_prog in mawk gawk nawk awk
2249 # Extract the first word of "$ac_prog", so it can be a program name with args.
2250 set dummy $ac_prog; ac_word=$2
2251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2252 echo "configure:2253: checking for $ac_word" >&5
2253 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2254 echo $ac_n "(cached) $ac_c" 1>&6
2255 else
2256 if test -n "$AWK"; then
2257 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2258 else
2259 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2260 ac_dummy="$PATH"
2261 for ac_dir in $ac_dummy; do
2262 test -z "$ac_dir" && ac_dir=.
2263 if test -f $ac_dir/$ac_word; then
2264 ac_cv_prog_AWK="$ac_prog"
2265 break
2267 done
2268 IFS="$ac_save_ifs"
2271 AWK="$ac_cv_prog_AWK"
2272 if test -n "$AWK"; then
2273 echo "$ac_t""$AWK" 1>&6
2274 else
2275 echo "$ac_t""no" 1>&6
2278 test -n "$AWK" && break
2279 done
2281 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2282 echo "configure:2283: checking whether ln works" >&5
2283 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2284 echo $ac_n "(cached) $ac_c" 1>&6
2285 else
2286 rm -f conftestdata_t
2287 echo >conftestdata_f
2288 if ln conftestdata_f conftestdata_t 2>/dev/null
2289 then
2290 gcc_cv_prog_LN="ln"
2291 else
2292 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2293 then
2294 gcc_cv_prog_LN="ln -s"
2295 else
2296 gcc_cv_prog_LN=cp
2299 rm -f conftestdata_f conftestdata_t
2302 LN="$gcc_cv_prog_LN"
2303 if test "$gcc_cv_prog_LN" = "ln"; then
2304 echo "$ac_t""yes" 1>&6
2305 else
2306 if test "$gcc_cv_prog_LN" = "ln -s"; then
2307 echo "$ac_t""no, using ln -s" 1>&6
2308 else
2309 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2313 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2314 echo "configure:2315: checking whether ln -s works" >&5
2315 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318 rm -f conftestdata_t
2319 echo >conftestdata_f
2320 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2321 then
2322 gcc_cv_prog_LN_S="ln -s"
2323 else
2324 if ln conftestdata_f conftestdata_t 2>/dev/null
2325 then
2326 gcc_cv_prog_LN_S=ln
2327 else
2328 gcc_cv_prog_LN_S=cp
2331 rm -f conftestdata_f conftestdata_t
2334 LN_S="$gcc_cv_prog_LN_S"
2335 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2336 echo "$ac_t""yes" 1>&6
2337 else
2338 if test "$gcc_cv_prog_LN_S" = "ln"; then
2339 echo "$ac_t""no, using ln" 1>&6
2340 else
2341 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2345 # Extract the first word of "ranlib", so it can be a program name with args.
2346 set dummy ranlib; ac_word=$2
2347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2348 echo "configure:2349: checking for $ac_word" >&5
2349 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352 if test -n "$RANLIB"; then
2353 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2354 else
2355 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2356 ac_dummy="$PATH"
2357 for ac_dir in $ac_dummy; do
2358 test -z "$ac_dir" && ac_dir=.
2359 if test -f $ac_dir/$ac_word; then
2360 ac_cv_prog_RANLIB="ranlib"
2361 break
2363 done
2364 IFS="$ac_save_ifs"
2365 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2368 RANLIB="$ac_cv_prog_RANLIB"
2369 if test -n "$RANLIB"; then
2370 echo "$ac_t""$RANLIB" 1>&6
2371 else
2372 echo "$ac_t""no" 1>&6
2375 # Find a good install program. We prefer a C program (faster),
2376 # so one script is as good as another. But avoid the broken or
2377 # incompatible versions:
2378 # SysV /etc/install, /usr/sbin/install
2379 # SunOS /usr/etc/install
2380 # IRIX /sbin/install
2381 # AIX /bin/install
2382 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2383 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2384 # ./install, which can be erroneously created by make from ./install.sh.
2385 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2386 echo "configure:2387: checking for a BSD compatible install" >&5
2387 if test -z "$INSTALL"; then
2388 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2389 echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2392 for ac_dir in $PATH; do
2393 # Account for people who put trailing slashes in PATH elements.
2394 case "$ac_dir/" in
2395 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2397 # OSF1 and SCO ODT 3.0 have their own names for install.
2398 for ac_prog in ginstall scoinst install; do
2399 if test -f $ac_dir/$ac_prog; then
2400 if test $ac_prog = install &&
2401 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2402 # AIX install. It has an incompatible calling convention.
2403 # OSF/1 installbsd also uses dspmsg, but is usable.
2405 else
2406 ac_cv_path_install="$ac_dir/$ac_prog -c"
2407 break 2
2410 done
2412 esac
2413 done
2414 IFS="$ac_save_IFS"
2417 if test "${ac_cv_path_install+set}" = set; then
2418 INSTALL="$ac_cv_path_install"
2419 else
2420 # As a last resort, use the slow shell script. We don't cache a
2421 # path for INSTALL within a source directory, because that will
2422 # break other packages using the cache if that directory is
2423 # removed, or if the path is relative.
2424 INSTALL="$ac_install_sh"
2427 echo "$ac_t""$INSTALL" 1>&6
2429 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2430 # It thinks the first close brace ends the variable substitution.
2431 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2433 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2436 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2437 echo "configure:2438: checking for ANSI C header files" >&5
2438 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2441 cat > conftest.$ac_ext <<EOF
2442 #line 2443 "configure"
2443 #include "confdefs.h"
2444 #include <stdlib.h>
2445 #include <stdarg.h>
2446 #include <string.h>
2447 #include <float.h>
2449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2450 { (eval echo configure:2451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2452 if test -z "$ac_err"; then
2453 rm -rf conftest*
2454 ac_cv_header_stdc=yes
2455 else
2456 echo "$ac_err" >&5
2457 echo "configure: failed program was:" >&5
2458 cat conftest.$ac_ext >&5
2459 rm -rf conftest*
2460 ac_cv_header_stdc=no
2462 rm -f conftest*
2464 if test $ac_cv_header_stdc = yes; then
2465 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <string.h>
2471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2472 egrep "memchr" >/dev/null 2>&1; then
2474 else
2475 rm -rf conftest*
2476 ac_cv_header_stdc=no
2478 rm -f conftest*
2482 if test $ac_cv_header_stdc = yes; then
2483 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <stdlib.h>
2489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2490 egrep "free" >/dev/null 2>&1; then
2492 else
2493 rm -rf conftest*
2494 ac_cv_header_stdc=no
2496 rm -f conftest*
2500 if test $ac_cv_header_stdc = yes; then
2501 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2502 if test "$cross_compiling" = yes; then
2504 else
2505 cat > conftest.$ac_ext <<EOF
2506 #line 2507 "configure"
2507 #include "confdefs.h"
2508 #include <ctype.h>
2509 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2510 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2511 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2512 int main () { int i; for (i = 0; i < 256; i++)
2513 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2514 exit (0); }
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2518 then
2520 else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -fr conftest*
2524 ac_cv_header_stdc=no
2526 rm -fr conftest*
2532 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2533 if test $ac_cv_header_stdc = yes; then
2534 cat >> confdefs.h <<\EOF
2535 #define STDC_HEADERS 1
2540 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2541 echo "configure:2542: checking whether time.h and sys/time.h may both be included" >&5
2542 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545 cat > conftest.$ac_ext <<EOF
2546 #line 2547 "configure"
2547 #include "confdefs.h"
2548 #include <sys/types.h>
2549 #include <sys/time.h>
2550 #include <time.h>
2551 int main() {
2552 struct tm *tp;
2553 ; return 0; }
2555 if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2556 rm -rf conftest*
2557 ac_cv_header_time=yes
2558 else
2559 echo "configure: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 rm -rf conftest*
2562 ac_cv_header_time=no
2564 rm -f conftest*
2567 echo "$ac_t""$ac_cv_header_time" 1>&6
2568 if test $ac_cv_header_time = yes; then
2569 cat >> confdefs.h <<\EOF
2570 #define TIME_WITH_SYS_TIME 1
2575 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2576 echo "configure:2577: checking for working stdbool.h" >&5
2577 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580 cat > conftest.$ac_ext <<EOF
2581 #line 2582 "configure"
2582 #include "confdefs.h"
2583 #include <stdbool.h>
2584 int main() {
2585 bool foo = false;
2586 ; return 0; }
2588 if { (eval echo configure:2589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2589 rm -rf conftest*
2590 ac_cv_header_stdbool_h=yes
2591 else
2592 echo "configure: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 rm -rf conftest*
2595 ac_cv_header_stdbool_h=no
2597 rm -f conftest*
2600 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2601 if test $ac_cv_header_stdbool_h = yes; then
2602 cat >> confdefs.h <<\EOF
2603 #define HAVE_STDBOOL_H 1
2608 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2609 echo "configure:2610: checking whether string.h and strings.h may both be included" >&5
2610 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2611 echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613 cat > conftest.$ac_ext <<EOF
2614 #line 2615 "configure"
2615 #include "confdefs.h"
2616 #include <string.h>
2617 #include <strings.h>
2618 int main() {
2620 ; return 0; }
2622 if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2623 rm -rf conftest*
2624 gcc_cv_header_string=yes
2625 else
2626 echo "configure: failed program was:" >&5
2627 cat conftest.$ac_ext >&5
2628 rm -rf conftest*
2629 gcc_cv_header_string=no
2631 rm -f conftest*
2634 echo "$ac_t""$gcc_cv_header_string" 1>&6
2635 if test $gcc_cv_header_string = yes; then
2636 cat >> confdefs.h <<\EOF
2637 #define STRING_WITH_STRINGS 1
2642 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2643 echo "configure:2644: checking for sys/wait.h that is POSIX.1 compatible" >&5
2644 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2645 echo $ac_n "(cached) $ac_c" 1>&6
2646 else
2647 cat > conftest.$ac_ext <<EOF
2648 #line 2649 "configure"
2649 #include "confdefs.h"
2650 #include <sys/types.h>
2651 #include <sys/wait.h>
2652 #ifndef WEXITSTATUS
2653 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2654 #endif
2655 #ifndef WIFEXITED
2656 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2657 #endif
2658 int main() {
2659 int s;
2660 wait (&s);
2661 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2662 ; return 0; }
2664 if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2665 rm -rf conftest*
2666 ac_cv_header_sys_wait_h=yes
2667 else
2668 echo "configure: failed program was:" >&5
2669 cat conftest.$ac_ext >&5
2670 rm -rf conftest*
2671 ac_cv_header_sys_wait_h=no
2673 rm -f conftest*
2676 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2677 if test $ac_cv_header_sys_wait_h = yes; then
2678 cat >> confdefs.h <<\EOF
2679 #define HAVE_SYS_WAIT_H 1
2684 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2685 fcntl.h unistd.h sys/file.h sys/time.h \
2686 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2687 direct.h malloc.h langinfo.h
2689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2691 echo "configure:2692: checking for $ac_hdr" >&5
2692 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695 cat > conftest.$ac_ext <<EOF
2696 #line 2697 "configure"
2697 #include "confdefs.h"
2698 #include <$ac_hdr>
2700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2701 { (eval echo configure:2702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2703 if test -z "$ac_err"; then
2704 rm -rf conftest*
2705 eval "ac_cv_header_$ac_safe=yes"
2706 else
2707 echo "$ac_err" >&5
2708 echo "configure: failed program was:" >&5
2709 cat conftest.$ac_ext >&5
2710 rm -rf conftest*
2711 eval "ac_cv_header_$ac_safe=no"
2713 rm -f conftest*
2715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2716 echo "$ac_t""yes" 1>&6
2717 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2718 cat >> confdefs.h <<EOF
2719 #define $ac_tr_hdr 1
2722 else
2723 echo "$ac_t""no" 1>&6
2725 done
2728 # Check for thread headers.
2729 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2730 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2731 echo "configure:2732: checking for thread.h" >&5
2732 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2733 echo $ac_n "(cached) $ac_c" 1>&6
2734 else
2735 cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738 #include <thread.h>
2740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2741 { (eval echo configure:2742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2743 if test -z "$ac_err"; then
2744 rm -rf conftest*
2745 eval "ac_cv_header_$ac_safe=yes"
2746 else
2747 echo "$ac_err" >&5
2748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750 rm -rf conftest*
2751 eval "ac_cv_header_$ac_safe=no"
2753 rm -f conftest*
2755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2756 echo "$ac_t""yes" 1>&6
2757 have_thread_h=yes
2758 else
2759 echo "$ac_t""no" 1>&6
2760 have_thread_h=
2763 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2764 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2765 echo "configure:2766: checking for pthread.h" >&5
2766 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2767 echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772 #include <pthread.h>
2774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2775 { (eval echo configure:2776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2777 if test -z "$ac_err"; then
2778 rm -rf conftest*
2779 eval "ac_cv_header_$ac_safe=yes"
2780 else
2781 echo "$ac_err" >&5
2782 echo "configure: failed program was:" >&5
2783 cat conftest.$ac_ext >&5
2784 rm -rf conftest*
2785 eval "ac_cv_header_$ac_safe=no"
2787 rm -f conftest*
2789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2790 echo "$ac_t""yes" 1>&6
2791 have_pthread_h=yes
2792 else
2793 echo "$ac_t""no" 1>&6
2794 have_pthread_h=
2798 # These tests can't be done till we know if we have limits.h.
2799 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2800 echo "configure:2801: checking for CHAR_BIT" >&5
2801 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2803 else
2804 cat > conftest.$ac_ext <<EOF
2805 #line 2806 "configure"
2806 #include "confdefs.h"
2807 #ifdef HAVE_LIMITS_H
2808 #include <limits.h>
2809 #endif
2810 #ifdef CHAR_BIT
2811 found
2812 #endif
2814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2815 egrep "found" >/dev/null 2>&1; then
2816 rm -rf conftest*
2817 gcc_cv_decl_char_bit=yes
2818 else
2819 rm -rf conftest*
2820 gcc_cv_decl_char_bit=no
2822 rm -f conftest*
2827 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2828 if test $gcc_cv_decl_char_bit = no; then
2829 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2830 echo "configure:2831: checking number of bits in a byte" >&5
2831 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2832 echo $ac_n "(cached) $ac_c" 1>&6
2833 else
2835 gcc_cv_c_nbby=
2836 while test $i -lt 65; do
2837 cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2841 int main() {
2842 switch(0) {
2843 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2844 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2846 ; return 0; }
2848 if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2849 rm -rf conftest*
2850 gcc_cv_c_nbby=$i; break
2851 else
2852 echo "configure: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2855 rm -f conftest*
2856 i=`expr $i + 1`
2857 done
2858 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2862 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2863 if test $gcc_cv_c_nbby = failed; then
2864 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2865 else
2866 cat >> confdefs.h <<EOF
2867 #define CHAR_BIT $gcc_cv_c_nbby
2872 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2873 echo "configure:2874: checking byte ordering" >&5
2874 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2875 echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877 ac_cv_c_compile_endian=unknown
2879 ac_ext=c
2880 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2881 ac_cpp='$CPP $CPPFLAGS'
2882 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2883 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2884 cross_compiling=$ac_cv_prog_cc_cross
2886 cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2890 #ifdef HAVE_LIMITS_H
2891 # include <limits.h>
2892 #endif
2893 /* This structure must have no internal padding. */
2894 struct {
2895 char prefix[sizeof "\nendian:" - 1];
2896 short word;
2897 char postfix[2];
2898 } tester = {
2899 "\nendian:",
2900 #if SIZEOF_SHORT == 4
2901 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2902 #endif
2903 ('A' << CHAR_BIT) | 'B',
2904 'X', '\n'
2907 if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2908 od -c conftest.o |
2909 sed 's/^[0-7]*[ ]*/ /
2910 s/\*/./g
2911 s/ \\n/*/g
2912 s/ [0-9][0-9][0-9]/./g
2913 s/ \\[^ ]/./g' |
2914 tr -d '
2915 ' | tr -s '*' '
2916 ' | fold | sed '$a\
2917 ' > conftest.dmp
2918 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2919 ac_cv_c_compile_endian=big-endian
2920 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2921 ac_cv_c_compile_endian=little-endian
2924 rm -rf conftest*
2925 ac_ext=c
2926 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2927 ac_cpp='$CPP $CPPFLAGS'
2928 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2929 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2930 cross_compiling=$ac_cv_prog_cc_cross
2935 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2936 if test $ac_cv_c_compile_endian = unknown; then
2937 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2938 elif test $ac_cv_c_compile_endian = big-endian; then
2939 cat >> confdefs.h <<\EOF
2940 #define HOST_WORDS_BIG_ENDIAN 1
2945 echo $ac_n "checking floating point format""... $ac_c" 1>&6
2946 echo "configure:2947: checking floating point format" >&5
2947 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2948 echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2951 ac_ext=c
2952 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2953 ac_cpp='$CPP $CPPFLAGS'
2954 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2955 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2956 cross_compiling=$ac_cv_prog_cc_cross
2958 cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 /* This will not work unless sizeof(double) == 8. */
2962 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2964 /* This structure must have no internal padding. */
2965 struct possibility {
2966 char prefix[8];
2967 double candidate;
2968 char postfix[8];
2971 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
2972 struct possibility table [] =
2974 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
2975 C( 3.53802595280598432000e+18), /* D__float - VAX */
2976 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
2977 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
2978 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
2981 if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2982 od -c conftest.o |
2983 sed 's/^[0-7]*[ ]*/ /
2984 s/\*/./g
2985 s/ \\n/*/g
2986 s/ [0-9][0-9][0-9]/./g
2987 s/ \\[^ ]/./g' |
2988 tr -d '
2989 ' | tr -s '*' '
2990 ' | fold | sed '$a\
2991 ' > conftest.dmp
2992 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2993 ac_cv_c_float_format='IEEE (big-endian)'
2994 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
2995 ac_cv_c_float_format='IEEE (big-endian)'
2996 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
2997 ac_cv_c_float_format='IEEE (little-endian)'
2998 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
2999 ac_cv_c_float_format='IEEE (little-endian)'
3000 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3001 ac_cv_c_float_format='VAX D-float'
3002 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3003 ac_cv_c_float_format='PDP-10'
3004 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3005 ac_cv_c_float_format='IBM 370 hex'
3006 else
3007 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3009 else
3010 { echo "configure: error: compile failed" 1>&2; exit 1; }
3012 rm -rf conftest*
3013 ac_ext=c
3014 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3017 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3018 cross_compiling=$ac_cv_prog_cc_cross
3023 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3024 # IEEE is the default format. If the float endianness isn't the same
3025 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3026 # (which is a tristate: yes, no, default). This is only an issue with
3027 # IEEE; the other formats are only supported by a few machines each,
3028 # all with the same endianness.
3029 format=
3030 fbigend=
3031 case $ac_cv_c_float_format in
3032 'IEEE (big-endian)' )
3033 if test $ac_cv_c_compile_endian = little-endian; then
3034 fbigend=1
3037 'IEEE (little-endian)' )
3038 if test $ac_cv_c_compile_endian = big-endian; then
3039 fbigend=0
3042 'VAX D-float' )
3043 format=VAX_FLOAT_FORMAT
3045 'PDP-10' )
3046 format=PDP10_FLOAT_FORMAT
3048 'IBM 370 hex' )
3049 format=IBM_FLOAT_FORMAT
3051 esac
3052 if test -n "$format"; then
3053 cat >> confdefs.h <<EOF
3054 #define HOST_FLOAT_FORMAT $format
3058 if test -n "$fbigend"; then
3059 cat >> confdefs.h <<EOF
3060 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3066 # See if we have the mktemp command.
3067 # Extract the first word of "mktemp", so it can be a program name with args.
3068 set dummy mktemp; ac_word=$2
3069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3070 echo "configure:3071: checking for $ac_word" >&5
3071 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073 else
3074 if test -n "$have_mktemp_command"; then
3075 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3076 else
3077 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3078 ac_dummy="$PATH"
3079 for ac_dir in $ac_dummy; do
3080 test -z "$ac_dir" && ac_dir=.
3081 if test -f $ac_dir/$ac_word; then
3082 ac_cv_prog_have_mktemp_command="yes"
3083 break
3085 done
3086 IFS="$ac_save_ifs"
3087 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3090 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3091 if test -n "$have_mktemp_command"; then
3092 echo "$ac_t""$have_mktemp_command" 1>&6
3093 else
3094 echo "$ac_t""no" 1>&6
3098 # Do we have a single-tree copy of texinfo?
3099 if test -f $srcdir/../texinfo/Makefile.in; then
3100 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3101 gcc_cv_prog_makeinfo_modern=yes
3102 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3103 else
3104 # See if makeinfo has been installed and is modern enough
3105 # that we can use it.
3106 # Extract the first word of "makeinfo", so it can be a program name with args.
3107 set dummy makeinfo; ac_word=$2
3108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3109 echo "configure:3110: checking for $ac_word" >&5
3110 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113 if test -n "$MAKEINFO"; then
3114 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3115 else
3116 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3117 ac_dummy="$PATH"
3118 for ac_dir in $ac_dummy; do
3119 test -z "$ac_dir" && ac_dir=.
3120 if test -f $ac_dir/$ac_word; then
3121 ac_cv_prog_MAKEINFO="makeinfo"
3122 break
3124 done
3125 IFS="$ac_save_ifs"
3128 MAKEINFO="$ac_cv_prog_MAKEINFO"
3129 if test -n "$MAKEINFO"; then
3130 echo "$ac_t""$MAKEINFO" 1>&6
3131 else
3132 echo "$ac_t""no" 1>&6
3135 if test -n "$MAKEINFO"; then
3136 # Found it, now check the version.
3137 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3138 echo "configure:3139: checking for modern makeinfo" >&5
3139 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3140 echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142 ac_prog_version=`$MAKEINFO --version 2>&1 |
3143 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3144 echo "configure:3145: version of makeinfo is $ac_prog_version" >&5
3145 case $ac_prog_version in
3146 '') gcc_cv_prog_makeinfo_modern=no;;
3147 4.[1-9]*)
3148 gcc_cv_prog_makeinfo_modern=yes;;
3149 *) gcc_cv_prog_makeinfo_modern=no;;
3150 esac
3154 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3155 else
3156 gcc_cv_prog_makeinfo_modern=no
3161 if test $gcc_cv_prog_makeinfo_modern = no; then
3162 echo "configure: warning:
3163 *** Makeinfo is missing or too old.
3164 *** Info documentation will not be built." 1>&2
3165 BUILD_INFO=
3166 else
3167 BUILD_INFO=info
3170 # Is pod2man recent enough to regenerate manpages?
3171 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3172 echo "configure:3173: checking for recent Pod::Man" >&5
3173 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3174 echo "$ac_t""yes" 1>&6
3175 GENERATED_MANPAGES=generated-manpages
3176 else
3177 echo "$ac_t""no" 1>&6
3178 GENERATED_MANPAGES=
3181 # How about lex?
3182 if test -f $srcdir/../flex/skel.c; then
3183 FLEX='$(objdir)/../flex/flex'
3184 else
3185 # Extract the first word of "flex", so it can be a program name with args.
3186 set dummy flex; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_word" >&5
3189 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3190 echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192 if test -n "$FLEX"; then
3193 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3194 else
3195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3196 ac_dummy="$PATH"
3197 for ac_dir in $ac_dummy; do
3198 test -z "$ac_dir" && ac_dir=.
3199 if test -f $ac_dir/$ac_word; then
3200 ac_cv_prog_FLEX="flex"
3201 break
3203 done
3204 IFS="$ac_save_ifs"
3205 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3208 FLEX="$ac_cv_prog_FLEX"
3209 if test -n "$FLEX"; then
3210 echo "$ac_t""$FLEX" 1>&6
3211 else
3212 echo "$ac_t""no" 1>&6
3217 # Bison?
3218 # The -L switch is so bison can find its skeleton file.
3219 if test -f $srcdir/../bison/bison.simple; then
3220 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3221 else
3222 # Extract the first word of "bison", so it can be a program name with args.
3223 set dummy bison; ac_word=$2
3224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_word" >&5
3226 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3227 echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229 if test -n "$BISON"; then
3230 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3231 else
3232 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3233 ac_dummy="$PATH"
3234 for ac_dir in $ac_dummy; do
3235 test -z "$ac_dir" && ac_dir=.
3236 if test -f $ac_dir/$ac_word; then
3237 ac_cv_prog_BISON="bison"
3238 break
3240 done
3241 IFS="$ac_save_ifs"
3242 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3245 BISON="$ac_cv_prog_BISON"
3246 if test -n "$BISON"; then
3247 echo "$ac_t""$BISON" 1>&6
3248 else
3249 echo "$ac_t""no" 1>&6
3254 # These libraries may be used by collect2.
3255 # We may need a special search path to get them linked.
3256 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3257 echo "configure:3258: checking for collect2 libraries" >&5
3258 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3259 echo $ac_n "(cached) $ac_c" 1>&6
3260 else
3261 save_LIBS="$LIBS"
3262 for libs in '' -lld -lmld \
3263 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3264 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3266 LIBS="$libs"
3267 cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 /* Override any gcc2 internal prototype to avoid an error. */
3271 /* We use char because int might match the return type of a gcc2
3272 builtin and then its argument prototype would still apply. */
3273 char ldopen();
3275 int main() {
3276 ldopen()
3277 ; return 0; }
3279 if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3280 rm -rf conftest*
3281 gcc_cv_collect2_libs="$libs"; break
3282 else
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3286 rm -f conftest*
3287 done
3288 LIBS="$save_LIBS"
3289 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3292 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3293 case $gcc_cv_collect2_libs in
3294 "none required") ;;
3295 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3296 esac
3299 # When building Ada code on Alpha, we need exc_resume which is usually in
3300 # -lexc. So test for it.
3301 save_LIBS="$LIBS"
3302 LIBS=
3304 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3305 echo "configure:3306: checking for library containing exc_resume" >&5
3306 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3307 echo $ac_n "(cached) $ac_c" 1>&6
3308 else
3309 ac_func_search_save_LIBS="$LIBS"
3310 ac_cv_search_exc_resume="no"
3311 cat > conftest.$ac_ext <<EOF
3312 #line 3313 "configure"
3313 #include "confdefs.h"
3314 /* Override any gcc2 internal prototype to avoid an error. */
3315 /* We use char because int might match the return type of a gcc2
3316 builtin and then its argument prototype would still apply. */
3317 char exc_resume();
3319 int main() {
3320 exc_resume()
3321 ; return 0; }
3323 if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324 rm -rf conftest*
3325 ac_cv_search_exc_resume="none required"
3326 else
3327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3330 rm -f conftest*
3331 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3332 LIBS="-l$i $ac_func_search_save_LIBS"
3333 cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 /* Override any gcc2 internal prototype to avoid an error. */
3337 /* We use char because int might match the return type of a gcc2
3338 builtin and then its argument prototype would still apply. */
3339 char exc_resume();
3341 int main() {
3342 exc_resume()
3343 ; return 0; }
3345 if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3346 rm -rf conftest*
3347 ac_cv_search_exc_resume="-l$i"
3348 break
3349 else
3350 echo "configure: failed program was:" >&5
3351 cat conftest.$ac_ext >&5
3353 rm -f conftest*
3354 done
3355 LIBS="$ac_func_search_save_LIBS"
3358 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3359 if test "$ac_cv_search_exc_resume" != "no"; then
3360 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3362 else :
3365 GNAT_LIBEXC="$LIBS"
3366 LIBS="$save_LIBS"
3369 # See if the stage1 system preprocessor understands the ANSI C
3370 # preprocessor stringification operator. (Used by symcat.h.)
3373 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3374 echo "configure:3375: checking for preprocessor stringizing operator" >&5
3375 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3376 echo $ac_n "(cached) $ac_c" 1>&6
3377 else
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3382 #define x(y) #y
3384 char *s = x(teststring);
3387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3388 egrep "#teststring" >/dev/null 2>&1; then
3389 rm -rf conftest*
3390 ac_cv_c_stringize=no
3391 else
3392 rm -rf conftest*
3393 ac_cv_c_stringize=yes
3395 rm -f conftest*
3399 if test "${ac_cv_c_stringize}" = yes
3400 then
3401 cat >> confdefs.h <<\EOF
3402 #define HAVE_STRINGIZE 1
3406 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3409 # Use <inttypes.h> only if it exists,
3410 # doesn't clash with <sys/types.h>, and declares intmax_t.
3411 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3412 echo "configure:3413: checking for inttypes.h" >&5
3413 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3414 echo $ac_n "(cached) $ac_c" 1>&6
3415 else
3416 cat > conftest.$ac_ext <<EOF
3417 #line 3418 "configure"
3418 #include "confdefs.h"
3419 #include <sys/types.h>
3420 #include <inttypes.h>
3421 int main() {
3422 intmax_t i = -1;
3423 ; return 0; }
3425 if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3426 rm -rf conftest*
3427 gcc_cv_header_inttypes_h=yes
3428 else
3429 echo "configure: failed program was:" >&5
3430 cat conftest.$ac_ext >&5
3431 rm -rf conftest*
3432 gcc_cv_header_inttypes_h=no
3434 rm -f conftest*
3437 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3438 if test $gcc_cv_header_inttypes_h = yes; then
3439 cat >> confdefs.h <<\EOF
3440 #define HAVE_INTTYPES_H 1
3446 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3447 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3448 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3449 scandir alphasort
3451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3452 echo "configure:3453: checking for $ac_func" >&5
3453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3454 echo $ac_n "(cached) $ac_c" 1>&6
3455 else
3456 cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459 /* System header to define __stub macros and hopefully few prototypes,
3460 which can conflict with char $ac_func(); below. */
3461 #include <assert.h>
3462 /* Override any gcc2 internal prototype to avoid an error. */
3463 /* We use char because int might match the return type of a gcc2
3464 builtin and then its argument prototype would still apply. */
3465 char $ac_func();
3467 int main() {
3469 /* The GNU C library defines this for functions which it implements
3470 to always fail with ENOSYS. Some functions are actually named
3471 something starting with __ and the normal name is an alias. */
3472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3473 choke me
3474 #else
3475 $ac_func();
3476 #endif
3478 ; return 0; }
3480 if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481 rm -rf conftest*
3482 eval "ac_cv_func_$ac_func=yes"
3483 else
3484 echo "configure: failed program was:" >&5
3485 cat conftest.$ac_ext >&5
3486 rm -rf conftest*
3487 eval "ac_cv_func_$ac_func=no"
3489 rm -f conftest*
3492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3494 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3495 cat >> confdefs.h <<EOF
3496 #define $ac_tr_func 1
3499 else
3500 echo "$ac_t""no" 1>&6
3502 done
3505 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3506 echo "configure:3507: checking for ssize_t" >&5
3507 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3508 echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513 #include <sys/types.h>
3514 #if STDC_HEADERS
3515 #include <stdlib.h>
3516 #include <stddef.h>
3517 #endif
3519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3520 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3521 rm -rf conftest*
3522 ac_cv_type_ssize_t=yes
3523 else
3524 rm -rf conftest*
3525 ac_cv_type_ssize_t=no
3527 rm -f conftest*
3530 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3531 if test $ac_cv_type_ssize_t = no; then
3532 cat >> confdefs.h <<\EOF
3533 #define ssize_t int
3539 # Try to determine the array type of the second argument of getgroups
3540 # for the target system (int or gid_t).
3541 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3542 echo "configure:3543: checking for uid_t in sys/types.h" >&5
3543 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3544 echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546 cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 #include <sys/types.h>
3551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3552 egrep "uid_t" >/dev/null 2>&1; then
3553 rm -rf conftest*
3554 ac_cv_type_uid_t=yes
3555 else
3556 rm -rf conftest*
3557 ac_cv_type_uid_t=no
3559 rm -f conftest*
3563 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3564 if test $ac_cv_type_uid_t = no; then
3565 cat >> confdefs.h <<\EOF
3566 #define uid_t int
3569 cat >> confdefs.h <<\EOF
3570 #define gid_t int
3575 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3576 echo "configure:3577: checking type of array argument to getgroups" >&5
3577 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3578 echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580 if test "$cross_compiling" = yes; then
3581 ac_cv_type_getgroups=cross
3582 else
3583 cat > conftest.$ac_ext <<EOF
3584 #line 3585 "configure"
3585 #include "confdefs.h"
3587 /* Thanks to Mike Rendell for this test. */
3588 #include <sys/types.h>
3589 #define NGID 256
3590 #undef MAX
3591 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3592 main()
3594 gid_t gidset[NGID];
3595 int i, n;
3596 union { gid_t gval; long lval; } val;
3598 val.lval = -1;
3599 for (i = 0; i < NGID; i++)
3600 gidset[i] = val.gval;
3601 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3602 gidset);
3603 /* Exit non-zero if getgroups seems to require an array of ints. This
3604 happens when gid_t is short but getgroups modifies an array of ints. */
3605 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3609 if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3610 then
3611 ac_cv_type_getgroups=gid_t
3612 else
3613 echo "configure: failed program was:" >&5
3614 cat conftest.$ac_ext >&5
3615 rm -fr conftest*
3616 ac_cv_type_getgroups=int
3618 rm -fr conftest*
3621 if test $ac_cv_type_getgroups = cross; then
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 #include <unistd.h>
3627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3628 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3629 rm -rf conftest*
3630 ac_cv_type_getgroups=gid_t
3631 else
3632 rm -rf conftest*
3633 ac_cv_type_getgroups=int
3635 rm -f conftest*
3640 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3641 cat >> confdefs.h <<EOF
3642 #define GETGROUPS_T $ac_cv_type_getgroups
3646 if test "${target}" = "${build}"; then
3647 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3648 else
3649 case "${target}" in
3650 # This condition may need some tweaking. It should include all
3651 # targets where the array type of the second argument of getgroups
3652 # is int and the type of gid_t is not equivalent to int.
3653 *-*-sunos* | *-*-ultrix*)
3654 TARGET_GETGROUPS_T=int
3657 TARGET_GETGROUPS_T=gid_t
3659 esac
3663 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3664 echo "configure:3665: checking whether the printf functions support %p" >&5
3665 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668 if test "$cross_compiling" = yes; then
3669 gcc_cv_func_printf_ptr=no
3670 else
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #include <stdio.h>
3676 int main()
3678 char buf[64];
3679 char *p = buf, *q = NULL;
3680 sprintf(buf, "%p", p);
3681 sscanf(buf, "%p", &q);
3682 return (p != q);
3685 if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3686 then
3687 gcc_cv_func_printf_ptr=yes
3688 else
3689 echo "configure: failed program was:" >&5
3690 cat conftest.$ac_ext >&5
3691 rm -fr conftest*
3692 gcc_cv_func_printf_ptr=no
3694 rm -fr conftest*
3697 rm -f core core.* *.core
3700 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3701 if test $gcc_cv_func_printf_ptr = yes ; then
3702 cat >> confdefs.h <<\EOF
3703 #define HAVE_PRINTF_PTR 1
3709 case "${host}" in
3710 *-*-uwin*)
3711 { echo "configure: error:
3712 *** UWIN may not be used as a host platform because
3713 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3715 *-*-*vms*)
3716 # Under VMS, vfork works very different than on Unix. The standard test
3717 # won't work, and it isn't easily adaptable. It makes more sense to
3718 # just force it.
3719 ac_cv_func_vfork_works=yes
3721 esac
3722 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3723 echo "configure:3724: checking for pid_t" >&5
3724 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3725 echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727 cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 #if STDC_HEADERS
3732 #include <stdlib.h>
3733 #include <stddef.h>
3734 #endif
3736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3737 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3738 rm -rf conftest*
3739 ac_cv_type_pid_t=yes
3740 else
3741 rm -rf conftest*
3742 ac_cv_type_pid_t=no
3744 rm -f conftest*
3747 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3748 if test $ac_cv_type_pid_t = no; then
3749 cat >> confdefs.h <<\EOF
3750 #define pid_t int
3755 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3756 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3757 echo "configure:3758: checking for vfork.h" >&5
3758 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3759 echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761 cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 #include <vfork.h>
3766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3767 { (eval echo configure:3768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3769 if test -z "$ac_err"; then
3770 rm -rf conftest*
3771 eval "ac_cv_header_$ac_safe=yes"
3772 else
3773 echo "$ac_err" >&5
3774 echo "configure: failed program was:" >&5
3775 cat conftest.$ac_ext >&5
3776 rm -rf conftest*
3777 eval "ac_cv_header_$ac_safe=no"
3779 rm -f conftest*
3781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3782 echo "$ac_t""yes" 1>&6
3783 cat >> confdefs.h <<\EOF
3784 #define HAVE_VFORK_H 1
3787 else
3788 echo "$ac_t""no" 1>&6
3791 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3792 echo "configure:3793: checking for working vfork" >&5
3793 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796 if test "$cross_compiling" = yes; then
3797 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3798 echo "configure:3799: checking for vfork" >&5
3799 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3800 echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 /* System header to define __stub macros and hopefully few prototypes,
3806 which can conflict with char vfork(); below. */
3807 #include <assert.h>
3808 /* Override any gcc2 internal prototype to avoid an error. */
3809 /* We use char because int might match the return type of a gcc2
3810 builtin and then its argument prototype would still apply. */
3811 char vfork();
3813 int main() {
3815 /* The GNU C library defines this for functions which it implements
3816 to always fail with ENOSYS. Some functions are actually named
3817 something starting with __ and the normal name is an alias. */
3818 #if defined (__stub_vfork) || defined (__stub___vfork)
3819 choke me
3820 #else
3821 vfork();
3822 #endif
3824 ; return 0; }
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827 rm -rf conftest*
3828 eval "ac_cv_func_vfork=yes"
3829 else
3830 echo "configure: failed program was:" >&5
3831 cat conftest.$ac_ext >&5
3832 rm -rf conftest*
3833 eval "ac_cv_func_vfork=no"
3835 rm -f conftest*
3838 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3839 echo "$ac_t""yes" 1>&6
3841 else
3842 echo "$ac_t""no" 1>&6
3845 ac_cv_func_vfork_works=$ac_cv_func_vfork
3846 else
3847 cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 /* Thanks to Paul Eggert for this test. */
3851 #include <stdio.h>
3852 #include <sys/types.h>
3853 #include <sys/stat.h>
3854 #ifdef HAVE_UNISTD_H
3855 #include <unistd.h>
3856 #endif
3857 #ifdef HAVE_VFORK_H
3858 #include <vfork.h>
3859 #endif
3860 /* On some sparc systems, changes by the child to local and incoming
3861 argument registers are propagated back to the parent.
3862 The compiler is told about this with #include <vfork.h>,
3863 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3864 Test for this by using a static variable whose address
3865 is put into a register that is clobbered by the vfork. */
3866 static
3867 #ifdef __cplusplus
3868 sparc_address_test (int arg)
3869 #else
3870 sparc_address_test (arg) int arg;
3871 #endif
3873 static pid_t child;
3874 if (!child) {
3875 child = vfork ();
3876 if (child < 0) {
3877 perror ("vfork");
3878 _exit(2);
3880 if (!child) {
3881 arg = getpid();
3882 write(-1, "", 0);
3883 _exit (arg);
3887 main() {
3888 pid_t parent = getpid ();
3889 pid_t child;
3891 sparc_address_test ();
3893 child = vfork ();
3895 if (child == 0) {
3896 /* Here is another test for sparc vfork register problems.
3897 This test uses lots of local variables, at least
3898 as many local variables as main has allocated so far
3899 including compiler temporaries. 4 locals are enough for
3900 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3901 A buggy compiler should reuse the register of parent
3902 for one of the local variables, since it will think that
3903 parent can't possibly be used any more in this routine.
3904 Assigning to the local variable will thus munge parent
3905 in the parent process. */
3906 pid_t
3907 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3908 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3909 /* Convince the compiler that p..p7 are live; otherwise, it might
3910 use the same hardware register for all 8 local variables. */
3911 if (p != p1 || p != p2 || p != p3 || p != p4
3912 || p != p5 || p != p6 || p != p7)
3913 _exit(1);
3915 /* On some systems (e.g. IRIX 3.3),
3916 vfork doesn't separate parent from child file descriptors.
3917 If the child closes a descriptor before it execs or exits,
3918 this munges the parent's descriptor as well.
3919 Test for this by closing stdout in the child. */
3920 _exit(close(fileno(stdout)) != 0);
3921 } else {
3922 int status;
3923 struct stat st;
3925 while (wait(&status) != child)
3927 exit(
3928 /* Was there some problem with vforking? */
3929 child < 0
3931 /* Did the child fail? (This shouldn't happen.) */
3932 || status
3934 /* Did the vfork/compiler bug occur? */
3935 || parent != getpid()
3937 /* Did the file descriptor bug occur? */
3938 || fstat(fileno(stdout), &st) != 0
3943 if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3944 then
3945 ac_cv_func_vfork_works=yes
3946 else
3947 echo "configure: failed program was:" >&5
3948 cat conftest.$ac_ext >&5
3949 rm -fr conftest*
3950 ac_cv_func_vfork_works=no
3952 rm -fr conftest*
3957 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3958 if test $ac_cv_func_vfork_works = no; then
3959 cat >> confdefs.h <<\EOF
3960 #define vfork fork
3965 for ac_func in getpagesize
3967 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3968 echo "configure:3969: checking for $ac_func" >&5
3969 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3970 echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972 cat > conftest.$ac_ext <<EOF
3973 #line 3974 "configure"
3974 #include "confdefs.h"
3975 /* System header to define __stub macros and hopefully few prototypes,
3976 which can conflict with char $ac_func(); below. */
3977 #include <assert.h>
3978 /* Override any gcc2 internal prototype to avoid an error. */
3979 /* We use char because int might match the return type of a gcc2
3980 builtin and then its argument prototype would still apply. */
3981 char $ac_func();
3983 int main() {
3985 /* The GNU C library defines this for functions which it implements
3986 to always fail with ENOSYS. Some functions are actually named
3987 something starting with __ and the normal name is an alias. */
3988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3989 choke me
3990 #else
3991 $ac_func();
3992 #endif
3994 ; return 0; }
3996 if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3997 rm -rf conftest*
3998 eval "ac_cv_func_$ac_func=yes"
3999 else
4000 echo "configure: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4002 rm -rf conftest*
4003 eval "ac_cv_func_$ac_func=no"
4005 rm -f conftest*
4008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4009 echo "$ac_t""yes" 1>&6
4010 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4011 cat >> confdefs.h <<EOF
4012 #define $ac_tr_func 1
4015 else
4016 echo "$ac_t""no" 1>&6
4018 done
4020 # The test program for the next two tests is the same except for one
4021 # set of ifdefs.
4022 cat >ct-mmap.inc <<'EOF'
4023 #include <sys/types.h>
4024 #include <sys/mman.h>
4025 #include <fcntl.h>
4026 #include <signal.h>
4027 #include <setjmp.h>
4028 #include <stdio.h>
4030 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4031 # define MAP_ANONYMOUS MAP_ANON
4032 #endif
4034 /* This mess was copied from the GNU getpagesize.h. */
4035 #ifndef HAVE_GETPAGESIZE
4036 # ifdef HAVE_UNISTD_H
4037 # include <unistd.h>
4038 # endif
4040 /* Assume that all systems that can run configure have sys/param.h. */
4041 # ifndef HAVE_SYS_PARAM_H
4042 # define HAVE_SYS_PARAM_H 1
4043 # endif
4045 # ifdef _SC_PAGESIZE
4046 # define getpagesize() sysconf(_SC_PAGESIZE)
4047 # else /* no _SC_PAGESIZE */
4048 # ifdef HAVE_SYS_PARAM_H
4049 # include <sys/param.h>
4050 # ifdef EXEC_PAGESIZE
4051 # define getpagesize() EXEC_PAGESIZE
4052 # else /* no EXEC_PAGESIZE */
4053 # ifdef NBPG
4054 # define getpagesize() NBPG * CLSIZE
4055 # ifndef CLSIZE
4056 # define CLSIZE 1
4057 # endif /* no CLSIZE */
4058 # else /* no NBPG */
4059 # ifdef NBPC
4060 # define getpagesize() NBPC
4061 # else /* no NBPC */
4062 # ifdef PAGESIZE
4063 # define getpagesize() PAGESIZE
4064 # endif /* PAGESIZE */
4065 # endif /* no NBPC */
4066 # endif /* no NBPG */
4067 # endif /* no EXEC_PAGESIZE */
4068 # else /* no HAVE_SYS_PARAM_H */
4069 # define getpagesize() 8192 /* punt totally */
4070 # endif /* no HAVE_SYS_PARAM_H */
4071 # endif /* no _SC_PAGESIZE */
4073 #endif /* no HAVE_GETPAGESIZE */
4075 #ifndef MAP_FAILED
4076 # define MAP_FAILED -1
4077 #endif
4079 #undef perror_exit
4080 #define perror_exit(str, val) \
4081 do { perror(str); exit(val); } while (0)
4083 /* Some versions of cygwin mmap require that munmap is called with the
4084 same parameters as mmap. GCC expects that this is not the case.
4085 Test for various forms of this problem. Warning - icky signal games. */
4087 static sigset_t unblock_sigsegv;
4088 static jmp_buf r;
4089 static size_t pg;
4090 static int devzero;
4092 static char *
4093 anonmap (size)
4094 size_t size;
4096 #ifdef USE_MAP_ANON
4097 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4098 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4099 #else
4100 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4101 MAP_PRIVATE, devzero, 0);
4102 #endif
4105 static void
4106 sigsegv (unused)
4107 int unused;
4109 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4110 longjmp (r, 1);
4113 /* Basic functionality test. */
4114 void
4115 test_0 ()
4117 char *x = anonmap (pg);
4118 if (x == (char *) MAP_FAILED)
4119 perror_exit("test 0 mmap", 2);
4121 *(int *)x += 1;
4123 if (munmap(x, pg) < 0)
4124 perror_exit("test 0 munmap", 3);
4127 /* 1. If we map a 2-page region and unmap its second page, the first page
4128 must remain. */
4129 static void
4130 test_1 ()
4132 char *x = anonmap (pg * 2);
4133 if (x == (char *)MAP_FAILED)
4134 perror_exit ("test 1 mmap", 4);
4136 signal (SIGSEGV, sigsegv);
4137 if (setjmp (r))
4138 perror_exit ("test 1 fault", 5);
4140 x[0] = 1;
4141 x[pg] = 1;
4143 if (munmap (x + pg, pg) < 0)
4144 perror_exit ("test 1 munmap 1", 6);
4145 x[0] = 2;
4147 if (setjmp (r) == 0)
4149 x[pg] = 1;
4150 perror_exit ("test 1 no fault", 7);
4152 if (munmap (x, pg) < 0)
4153 perror_exit ("test 1 munmap 2", 8);
4156 /* 2. If we map a 2-page region and unmap its first page, the second
4157 page must remain. */
4158 static void
4159 test_2 ()
4161 char *x = anonmap (pg * 2);
4162 if (x == (char *)MAP_FAILED)
4163 perror_exit ("test 2 mmap", 9);
4165 signal (SIGSEGV, sigsegv);
4166 if (setjmp (r))
4167 perror_exit ("test 2 fault", 10);
4169 x[0] = 1;
4170 x[pg] = 1;
4172 if (munmap (x, pg) < 0)
4173 perror_exit ("test 2 munmap 1", 11);
4175 x[pg] = 2;
4177 if (setjmp (r) == 0)
4179 x[0] = 1;
4180 perror_exit ("test 2 no fault", 12);
4183 if (munmap (x+pg, pg) < 0)
4184 perror_exit ("test 2 munmap 2", 13);
4187 /* 3. If we map two adjacent 1-page regions and unmap them both with
4188 one munmap, both must go away.
4190 Getting two adjacent 1-page regions with two mmap calls is slightly
4191 tricky. All OS's tested skip over already-allocated blocks; therefore
4192 we have been careful to unmap all allocated regions in previous tests.
4193 HP/UX allocates pages backward in memory. No OS has yet been observed
4194 to be so perverse as to leave unmapped space between consecutive calls
4195 to mmap. */
4197 static void
4198 test_3 ()
4200 char *x, *y, *z;
4202 x = anonmap (pg);
4203 if (x == (char *)MAP_FAILED)
4204 perror_exit ("test 3 mmap 1", 14);
4205 y = anonmap (pg);
4206 if (y == (char *)MAP_FAILED)
4207 perror_exit ("test 3 mmap 2", 15);
4209 if (y != x + pg)
4211 if (y == x - pg)
4212 z = y, y = x, x = z;
4213 else
4215 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4216 (unsigned long)x, (unsigned long)y);
4217 exit (16);
4221 signal (SIGSEGV, sigsegv);
4222 if (setjmp (r))
4223 perror_exit ("test 3 fault", 17);
4225 x[0] = 1;
4226 y[0] = 1;
4228 if (munmap (x, pg*2) < 0)
4229 perror_exit ("test 3 munmap", 18);
4231 if (setjmp (r) == 0)
4233 x[0] = 1;
4234 perror_exit ("test 3 no fault 1", 19);
4237 signal (SIGSEGV, sigsegv);
4238 if (setjmp (r) == 0)
4240 y[0] = 1;
4241 perror_exit ("test 3 no fault 2", 20);
4246 main ()
4248 sigemptyset (&unblock_sigsegv);
4249 sigaddset (&unblock_sigsegv, SIGSEGV);
4250 pg = getpagesize ();
4251 #ifndef USE_MAP_ANON
4252 devzero = open ("/dev/zero", O_RDWR);
4253 if (devzero < 0)
4254 perror_exit ("open /dev/zero", 1);
4255 #endif
4257 test_0();
4258 test_1();
4259 test_2();
4260 test_3();
4262 exit(0);
4266 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4267 echo "configure:4268: checking for working mmap from /dev/zero" >&5
4268 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4269 echo $ac_n "(cached) $ac_c" 1>&6
4270 else
4271 if test "$cross_compiling" = yes; then
4272 # If this is not cygwin, and /dev/zero is a character device, it's probably
4273 # safe to assume it works.
4274 case "$host_os" in
4275 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4276 * ) if test -c /dev/zero
4277 then ac_cv_func_mmap_dev_zero=yes
4278 else ac_cv_func_mmap_dev_zero=no
4279 fi ;;
4280 esac
4281 else
4282 cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4285 #include "ct-mmap.inc"
4287 if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4288 then
4289 ac_cv_func_mmap_dev_zero=yes
4290 else
4291 echo "configure: failed program was:" >&5
4292 cat conftest.$ac_ext >&5
4293 rm -fr conftest*
4294 if test $? -lt 4
4295 then ac_cv_func_mmap_dev_zero=no
4296 else ac_cv_func_mmap_dev_zero=buggy
4299 rm -fr conftest*
4305 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4306 if test $ac_cv_func_mmap_dev_zero = yes; then
4307 cat >> confdefs.h <<\EOF
4308 #define HAVE_MMAP_DEV_ZERO 1
4313 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4314 echo "configure:4315: checking for working mmap with MAP_ANON(YMOUS)" >&5
4315 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4316 echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318 if test "$cross_compiling" = yes; then
4319 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4320 # just because it's there. Some SCO Un*xen define it but don't implement it.
4321 ac_cv_func_mmap_anon=no
4322 else
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #define USE_MAP_ANON
4327 #include "ct-mmap.inc"
4329 if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4330 then
4331 ac_cv_func_mmap_anon=yes
4332 else
4333 echo "configure: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
4335 rm -fr conftest*
4336 if test $? -lt 4
4337 then ac_cv_func_mmap_anon=no
4338 else ac_cv_func_mmap_anon=buggy
4341 rm -fr conftest*
4347 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4348 if test $ac_cv_func_mmap_anon = yes; then
4349 cat >> confdefs.h <<\EOF
4350 #define HAVE_MMAP_ANON 1
4354 rm -f ct-mmap.inc
4356 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4357 echo "configure:4358: checking for working mmap of a file" >&5
4358 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4359 echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361 # Create a file one thousand bytes long.
4362 for i in 1 2 3 4 5 6 7 8 9 0
4363 do for j in 1 2 3 4 5 6 7 8 9 0
4364 do echo $i $j xxxxx
4365 done
4366 done > conftestdata$$
4368 if test "$cross_compiling" = yes; then
4369 ac_cv_func_mmap_file=no
4370 else
4371 cat > conftest.$ac_ext <<EOF
4372 #line 4373 "configure"
4373 #include "confdefs.h"
4375 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4376 Richard Henderson and Alexandre Oliva.
4377 Check whether read-only mmap of a plain file works. */
4378 #include <sys/types.h>
4379 #include <sys/stat.h>
4380 #include <fcntl.h>
4381 #include <sys/mman.h>
4383 int main()
4385 char *x;
4386 int fd;
4387 struct stat st;
4389 fd = open("conftestdata$$", O_RDONLY);
4390 if (fd < 0)
4391 exit(1);
4393 if (fstat (fd, &st))
4394 exit(2);
4396 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4397 if (x == (char *) -1)
4398 exit(3);
4400 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4401 exit(4);
4403 if (munmap(x, st.st_size) < 0)
4404 exit(5);
4406 exit(0);
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4410 then
4411 ac_cv_func_mmap_file=yes
4412 else
4413 echo "configure: failed program was:" >&5
4414 cat conftest.$ac_ext >&5
4415 rm -fr conftest*
4416 ac_cv_func_mmap_file=no
4418 rm -fr conftest*
4423 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4424 if test $ac_cv_func_mmap_file = yes; then
4425 cat >> confdefs.h <<\EOF
4426 #define HAVE_MMAP_FILE 1
4434 am_cv_lib_iconv_ldpath=
4435 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4436 if test "${with_libiconv_prefix+set}" = set; then
4437 withval="$with_libiconv_prefix"
4439 for dir in `echo "$withval" | tr : ' '`; do
4440 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4441 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4442 done
4447 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4448 echo "configure:4449: checking for iconv" >&5
4449 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
4451 else
4453 am_cv_func_iconv="no, consider installing GNU libiconv"
4454 am_cv_lib_iconv=no
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <stdlib.h>
4459 #include <iconv.h>
4460 int main() {
4461 iconv_t cd = iconv_open("","");
4462 iconv(cd,NULL,NULL,NULL,NULL);
4463 iconv_close(cd);
4464 ; return 0; }
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467 rm -rf conftest*
4468 am_cv_func_iconv=yes
4469 else
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4473 rm -f conftest*
4474 if test "$am_cv_func_iconv" != yes; then
4475 am_save_LIBS="$LIBS"
4476 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4477 cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480 #include <stdlib.h>
4481 #include <iconv.h>
4482 int main() {
4483 iconv_t cd = iconv_open("","");
4484 iconv(cd,NULL,NULL,NULL,NULL);
4485 iconv_close(cd);
4486 ; return 0; }
4488 if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4489 rm -rf conftest*
4490 am_cv_lib_iconv=yes
4491 am_cv_func_iconv=yes
4492 else
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4496 rm -f conftest*
4497 LIBS="$am_save_LIBS"
4502 echo "$ac_t""$am_cv_func_iconv" 1>&6
4503 if test "$am_cv_func_iconv" = yes; then
4504 cat >> confdefs.h <<\EOF
4505 #define HAVE_ICONV 1
4508 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4509 echo "configure:4510: checking for iconv declaration" >&5
4510 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4514 cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4518 #include <stdlib.h>
4519 #include <iconv.h>
4520 extern
4521 #ifdef __cplusplus
4523 #endif
4524 #if defined(__STDC__) || defined(__cplusplus)
4525 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4526 #else
4527 size_t iconv();
4528 #endif
4530 int main() {
4532 ; return 0; }
4534 if { (eval echo configure:4535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4535 rm -rf conftest*
4536 am_cv_proto_iconv_arg1=""
4537 else
4538 echo "configure: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 rm -rf conftest*
4541 am_cv_proto_iconv_arg1="const"
4543 rm -f conftest*
4544 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);"
4547 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4548 echo "$ac_t""${ac_t:-
4549 }$am_cv_proto_iconv" 1>&6
4550 cat >> confdefs.h <<EOF
4551 #define ICONV_CONST $am_cv_proto_iconv_arg1
4555 LIBICONV=
4556 if test "$am_cv_lib_iconv" = yes; then
4557 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4562 # We will need to find libiberty.h and ansidecl.h
4563 saved_CFLAGS="$CFLAGS"
4564 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4565 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4566 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4567 fprintf_unlocked strstr errno \
4568 malloc realloc calloc free basename getopt clock
4570 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4571 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4572 echo "configure:4573: checking whether $ac_func is declared" >&5
4573 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 #undef $ac_tr_decl
4580 #define $ac_tr_decl 1
4582 #include "ansidecl.h"
4583 #include "system.h"
4585 int main() {
4586 #ifndef $ac_func
4587 char *(*pfn) = (char *(*)) $ac_func ;
4588 #endif
4589 ; return 0; }
4591 if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4592 rm -rf conftest*
4593 eval "gcc_cv_have_decl_$ac_func=yes"
4594 else
4595 echo "configure: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 rm -rf conftest*
4598 eval "gcc_cv_have_decl_$ac_func=no"
4600 rm -f conftest*
4603 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4604 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4605 #define $ac_tr_decl 1
4608 else
4609 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4610 #define $ac_tr_decl 0
4615 done
4616 if test x = y ; then
4617 cat >> confdefs.h <<\EOF
4618 #define HAVE_DECL_GETENV 1
4620 cat >> confdefs.h <<\EOF
4621 #define HAVE_DECL_ATOL 1
4623 cat >> confdefs.h <<\EOF
4624 #define HAVE_DECL_SBRK 1
4626 cat >> confdefs.h <<\EOF
4627 #define HAVE_DECL_ABORT 1
4629 cat >> confdefs.h <<\EOF
4630 #define HAVE_DECL_ATOF 1
4632 cat >> confdefs.h <<\EOF
4633 #define HAVE_DECL_GETCWD 1
4635 cat >> confdefs.h <<\EOF
4636 #define HAVE_DECL_GETWD 1
4639 cat >> confdefs.h <<\EOF
4640 #define HAVE_DECL_STRSIGNAL 1
4642 cat >> confdefs.h <<\EOF
4643 #define HAVE_DECL_PUTC_UNLOCKED 1
4645 cat >> confdefs.h <<\EOF
4646 #define HAVE_DECL_FPUTS_UNLOCKED 1
4648 cat >> confdefs.h <<\EOF
4649 #define HAVE_DECL_FWRITE_UNLOCKED 1
4652 cat >> confdefs.h <<\EOF
4653 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4655 cat >> confdefs.h <<\EOF
4656 #define HAVE_DECL_STRSTR 1
4658 cat >> confdefs.h <<\EOF
4659 #define HAVE_DECL_ERRNO 1
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_DECL_MALLOC 1
4665 cat >> confdefs.h <<\EOF
4666 #define HAVE_DECL_REALLOC 1
4668 cat >> confdefs.h <<\EOF
4669 #define HAVE_DECL_CALLOC 1
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_DECL_FREE 1
4674 cat >> confdefs.h <<\EOF
4675 #define HAVE_DECL_BASENAME 1
4677 cat >> confdefs.h <<\EOF
4678 #define HAVE_DECL_GETOPT 1
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_DECL_CLOCK 1
4686 for ac_func in getrlimit setrlimit getrusage
4688 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4689 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4690 echo "configure:4691: checking whether $ac_func is declared" >&5
4691 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4692 echo $ac_n "(cached) $ac_c" 1>&6
4693 else
4694 cat > conftest.$ac_ext <<EOF
4695 #line 4696 "configure"
4696 #include "confdefs.h"
4697 #undef $ac_tr_decl
4698 #define $ac_tr_decl 1
4700 #include "ansidecl.h"
4701 #include "system.h"
4702 #ifdef HAVE_SYS_RESOURCE_H
4703 #include <sys/resource.h>
4704 #endif
4707 int main() {
4708 #ifndef $ac_func
4709 char *(*pfn) = (char *(*)) $ac_func ;
4710 #endif
4711 ; return 0; }
4713 if { (eval echo configure:4714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4714 rm -rf conftest*
4715 eval "gcc_cv_have_decl_$ac_func=yes"
4716 else
4717 echo "configure: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4719 rm -rf conftest*
4720 eval "gcc_cv_have_decl_$ac_func=no"
4722 rm -f conftest*
4725 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4726 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4727 #define $ac_tr_decl 1
4730 else
4731 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4732 #define $ac_tr_decl 0
4737 done
4738 if test x = y ; then
4739 cat >> confdefs.h <<\EOF
4740 #define HAVE_DECL_GETRLIMIT 1
4742 cat >> confdefs.h <<\EOF
4743 #define HAVE_DECL_SETRLIMIT 1
4745 cat >> confdefs.h <<\EOF
4746 #define HAVE_DECL_GETRUSAGE 1
4751 for ac_func in times
4753 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4754 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4755 echo "configure:4756: checking whether $ac_func is declared" >&5
4756 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 #undef $ac_tr_decl
4763 #define $ac_tr_decl 1
4765 #include "ansidecl.h"
4766 #include "system.h"
4767 #ifdef HAVE_SYS_TIMES_H
4768 #include <sys/times.h>
4769 #endif
4772 int main() {
4773 #ifndef $ac_func
4774 char *(*pfn) = (char *(*)) $ac_func ;
4775 #endif
4776 ; return 0; }
4778 if { (eval echo configure:4779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4779 rm -rf conftest*
4780 eval "gcc_cv_have_decl_$ac_func=yes"
4781 else
4782 echo "configure: failed program was:" >&5
4783 cat conftest.$ac_ext >&5
4784 rm -rf conftest*
4785 eval "gcc_cv_have_decl_$ac_func=no"
4787 rm -f conftest*
4790 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4791 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4792 #define $ac_tr_decl 1
4795 else
4796 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4797 #define $ac_tr_decl 0
4802 done
4803 if test x = y ; then
4804 cat >> confdefs.h <<\EOF
4805 #define HAVE_DECL_TIMES 1
4810 # More time-related stuff.
4811 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4812 echo "configure:4813: checking for struct tms" >&5
4813 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4817 cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4821 #include "ansidecl.h"
4822 #include "system.h"
4823 #ifdef HAVE_SYS_TIMES_H
4824 #include <sys/times.h>
4825 #endif
4827 int main() {
4828 struct tms tms;
4829 ; return 0; }
4831 if { (eval echo configure:4832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4832 rm -rf conftest*
4833 ac_cv_struct_tms=yes
4834 else
4835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 rm -rf conftest*
4838 ac_cv_struct_tms=no
4840 rm -f conftest*
4843 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4844 if test $ac_cv_struct_tms = yes; then
4845 cat >> confdefs.h <<\EOF
4846 #define HAVE_STRUCT_TMS 1
4851 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4852 # revisit after autoconf 2.50.
4853 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4854 echo "configure:4855: checking for clock_t" >&5
4855 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4863 #include "ansidecl.h"
4864 #include "system.h"
4866 int main() {
4867 clock_t x;
4868 ; return 0; }
4870 if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4871 rm -rf conftest*
4872 gcc_cv_type_clock_t=yes
4873 else
4874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
4876 rm -rf conftest*
4877 gcc_cv_type_clock_t=no
4879 rm -f conftest*
4882 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4883 if test $gcc_cv_type_clock_t = yes; then
4884 cat >> confdefs.h <<\EOF
4885 #define HAVE_CLOCK_T 1
4890 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4891 CFLAGS="$saved_CFLAGS"
4893 # mkdir takes a single argument on some systems.
4894 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4895 echo "configure:4896: checking if mkdir takes one argument" >&5
4896 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4897 echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899 cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4903 #include <sys/types.h>
4904 #ifdef HAVE_SYS_STAT_H
4905 # include <sys/stat.h>
4906 #endif
4907 #ifdef HAVE_UNISTD_H
4908 # include <unistd.h>
4909 #endif
4910 #ifdef HAVE_DIRECT_H
4911 # include <direct.h>
4912 #endif
4913 int main() {
4914 mkdir ("foo", 0);
4915 ; return 0; }
4917 if { (eval echo configure:4918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4918 rm -rf conftest*
4919 gcc_cv_mkdir_takes_one_arg=no
4920 else
4921 echo "configure: failed program was:" >&5
4922 cat conftest.$ac_ext >&5
4923 rm -rf conftest*
4924 gcc_cv_mkdir_takes_one_arg=yes
4926 rm -f conftest*
4929 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4930 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4931 cat >> confdefs.h <<\EOF
4932 #define MKDIR_TAKES_ONE_ARG 1
4938 # File extensions
4939 manext='.1'
4940 objext='.o'
4944 config_gtfiles=
4945 build_xm_file=
4946 build_xm_defines=
4947 build_install_headers_dir=install-headers-tar
4948 build_exeext=
4949 host_xm_file=
4950 host_xm_defines=
4951 host_xmake_file=
4952 host_truncate_target=
4953 host_exeext=
4955 # Decode the host machine, then the target machine.
4956 # For the host machine, we save the xm_file variable as host_xm_file;
4957 # then we decode the target machine and forget everything else
4958 # that came from the host machine.
4959 for machine in $build $host $target; do
4960 . ${srcdir}/config.gcc
4961 done
4963 extra_objs="${host_extra_objs} ${extra_objs}"
4965 # Default the target-machine variables that were not explicitly set.
4966 if test x"$tm_file" = x
4967 then tm_file=$cpu_type/$cpu_type.h; fi
4969 if test x"$extra_headers" = x
4970 then extra_headers=; fi
4972 if test x$md_file = x
4973 then md_file=$cpu_type/$cpu_type.md; fi
4975 if test x$out_file = x
4976 then out_file=$cpu_type/$cpu_type.c; fi
4978 if test x"$tmake_file" = x
4979 then tmake_file=$cpu_type/t-$cpu_type
4982 if test x"$dwarf2" = xyes
4983 then tm_file="$tm_file tm-dwarf2.h"
4986 if test x$float_format = x
4987 then float_format=i64
4990 if test $float_format = none
4991 then float_h_file=Makefile.in
4992 else float_h_file=float-$float_format.h
4995 # Say what files are being used for the output code and MD file.
4996 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4997 echo "Using \`$srcdir/config/$md_file' as machine description file."
4999 # If any of the xm_file variables contain nonexistent files, warn
5000 # about them and drop them.
5003 for x in $build_xm_file; do
5004 if test -f $srcdir/config/$x
5005 then bx="$bx $x"
5006 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5008 done
5009 build_xm_file="$bx"
5012 for x in $host_xm_file; do
5013 if test -f $srcdir/config/$x
5014 then hx="$hx $x"
5015 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5017 done
5018 host_xm_file="$hx"
5021 for x in $xm_file; do
5022 if test -f $srcdir/config/$x
5023 then tx="$tx $x"
5024 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5026 done
5027 xm_file="$tx"
5029 count=a
5030 for f in $tm_file; do
5031 count=${count}x
5032 done
5033 if test $count = ax; then
5034 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5035 else
5036 echo "Using the following target machine macro files:"
5037 for f in $tm_file; do
5038 echo " $srcdir/config/$f"
5039 done
5042 count=a
5043 for f in $host_xm_file; do
5044 count=${count}x
5045 done
5046 if test $count = a; then
5048 elif test $count = ax; then
5049 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5050 else
5051 echo "Using the following host machine macro files:"
5052 for f in $host_xm_file; do
5053 echo " $srcdir/config/$f"
5054 done
5057 if test "$host_xm_file" != "$build_xm_file"; then
5058 count=a
5059 for f in $build_xm_file; do
5060 count=${count}x
5061 done
5062 if test $count = a; then
5064 elif test $count = ax; then
5065 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5066 else
5067 echo "Using the following build machine macro files:"
5068 for f in $build_xm_file; do
5069 echo " $srcdir/config/$f"
5070 done
5074 if test x$thread_file = x; then
5075 if test x$target_thread_file != x; then
5076 thread_file=$target_thread_file
5077 else
5078 thread_file='single'
5082 # Look for a file containing extra machine modes.
5083 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5084 extra_modes_file='$(srcdir)'/config/${extra_modes}
5086 cat >> confdefs.h <<EOF
5087 #define EXTRA_MODES_FILE "$extra_modes"
5090 cat >> confdefs.h <<\EOF
5091 #define EXTRA_CC_MODES 1
5096 # auto-host.h is the file containing items generated by autoconf and is
5097 # the first file included by config.h.
5098 # If host=build, it is correct to have hconfig include auto-host.h
5099 # as well. If host!=build, we are in error and need to do more
5100 # work to find out the build config parameters.
5101 if test x$host = x$build
5102 then
5103 build_auto=auto-host.h
5104 FORBUILD=..
5105 else
5106 # We create a subdir, then run autoconf in the subdir.
5107 # To prevent recursion we set host and build for the new
5108 # invocation of configure to the build for this invocation
5109 # of configure.
5110 tempdir=build.$$
5111 rm -rf $tempdir
5112 mkdir $tempdir
5113 cd $tempdir
5114 case ${srcdir} in
5115 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5116 *) realsrcdir=../${srcdir};;
5117 esac
5118 saved_CFLAGS="${CFLAGS}"
5119 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5120 ${realsrcdir}/configure \
5121 --target=$target_alias --host=$build_alias --build=$build_alias
5122 CFLAGS="${saved_CFLAGS}"
5124 # We just finished tests for the build machine, so rename
5125 # the file auto-build.h in the gcc directory.
5126 mv auto-host.h ../auto-build.h
5127 cd ..
5128 rm -rf $tempdir
5129 build_auto=auto-build.h
5130 FORBUILD=../$build
5134 tm_file="${tm_file} defaults.h"
5135 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5136 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5137 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5139 # Truncate the target if necessary
5140 if test x$host_truncate_target != x; then
5141 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5144 # Get the version trigger filename from the toplevel
5145 if test "${with_gcc_version_trigger+set}" = set; then
5146 gcc_version_trigger=$with_gcc_version_trigger
5147 else
5148 gcc_version_trigger=${srcdir}/version.c
5150 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5151 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5153 # Compile in configure arguments.
5154 if test -f configargs.h ; then
5155 # Being re-configured.
5156 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5157 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5158 else
5159 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5161 cat > configargs.h <<EOF
5162 /* Generated automatically. */
5163 static const char configuration_arguments[] = "$gcc_config_arguments";
5164 static const char thread_model[] = "$thread_file";
5167 # Internationalization
5168 PACKAGE=gcc
5169 VERSION="$gcc_version"
5173 # Enable NLS support by default
5174 # Check whether --enable-nls or --disable-nls was given.
5175 if test "${enable_nls+set}" = set; then
5176 enableval="$enable_nls"
5178 else
5179 enable_nls=yes
5183 # if cross compiling, disable NLS support.
5184 # It's not worth the trouble, at least for now.
5186 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5187 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5188 enable_nls=no
5193 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5194 echo "configure:5195: checking for library containing strerror" >&5
5195 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5196 echo $ac_n "(cached) $ac_c" 1>&6
5197 else
5198 ac_func_search_save_LIBS="$LIBS"
5199 ac_cv_search_strerror="no"
5200 cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5203 /* Override any gcc2 internal prototype to avoid an error. */
5204 /* We use char because int might match the return type of a gcc2
5205 builtin and then its argument prototype would still apply. */
5206 char strerror();
5208 int main() {
5209 strerror()
5210 ; return 0; }
5212 if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5213 rm -rf conftest*
5214 ac_cv_search_strerror="none required"
5215 else
5216 echo "configure: failed program was:" >&5
5217 cat conftest.$ac_ext >&5
5219 rm -f conftest*
5220 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5221 LIBS="-l$i $ac_func_search_save_LIBS"
5222 cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225 /* Override any gcc2 internal prototype to avoid an error. */
5226 /* We use char because int might match the return type of a gcc2
5227 builtin and then its argument prototype would still apply. */
5228 char strerror();
5230 int main() {
5231 strerror()
5232 ; return 0; }
5234 if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5235 rm -rf conftest*
5236 ac_cv_search_strerror="-l$i"
5237 break
5238 else
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5242 rm -f conftest*
5243 done
5244 LIBS="$ac_func_search_save_LIBS"
5247 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5248 if test "$ac_cv_search_strerror" != "no"; then
5249 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5251 else :
5256 echo $ac_n "checking for working const""... $ac_c" 1>&6
5257 echo "configure:5258: checking for working const" >&5
5258 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5259 echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261 cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5265 int main() {
5267 /* Ultrix mips cc rejects this. */
5268 typedef int charset[2]; const charset x;
5269 /* SunOS 4.1.1 cc rejects this. */
5270 char const *const *ccp;
5271 char **p;
5272 /* NEC SVR4.0.2 mips cc rejects this. */
5273 struct point {int x, y;};
5274 static struct point const zero = {0,0};
5275 /* AIX XL C 1.02.0.0 rejects this.
5276 It does not let you subtract one const X* pointer from another in an arm
5277 of an if-expression whose if-part is not a constant expression */
5278 const char *g = "string";
5279 ccp = &g + (g ? g-g : 0);
5280 /* HPUX 7.0 cc rejects these. */
5281 ++ccp;
5282 p = (char**) ccp;
5283 ccp = (char const *const *) p;
5284 { /* SCO 3.2v4 cc rejects this. */
5285 char *t;
5286 char const *s = 0 ? (char *) 0 : (char const *) 0;
5288 *t++ = 0;
5290 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5291 int x[] = {25, 17};
5292 const int *foo = &x[0];
5293 ++foo;
5295 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5296 typedef const int *iptr;
5297 iptr p = 0;
5298 ++p;
5300 { /* AIX XL C 1.02.0.0 rejects this saying
5301 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5302 struct s { int j; const int *ap[3]; };
5303 struct s *b; b->j = 5;
5305 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5306 const int foo = 10;
5309 ; return 0; }
5311 if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312 rm -rf conftest*
5313 ac_cv_c_const=yes
5314 else
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
5318 ac_cv_c_const=no
5320 rm -f conftest*
5323 echo "$ac_t""$ac_cv_c_const" 1>&6
5324 if test $ac_cv_c_const = no; then
5325 cat >> confdefs.h <<\EOF
5326 #define const
5331 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5332 echo "configure:5333: checking for off_t" >&5
5333 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5334 echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 #include <sys/types.h>
5340 #if STDC_HEADERS
5341 #include <stdlib.h>
5342 #include <stddef.h>
5343 #endif
5345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5346 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5347 rm -rf conftest*
5348 ac_cv_type_off_t=yes
5349 else
5350 rm -rf conftest*
5351 ac_cv_type_off_t=no
5353 rm -f conftest*
5356 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5357 if test $ac_cv_type_off_t = no; then
5358 cat >> confdefs.h <<\EOF
5359 #define off_t long
5364 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5365 echo "configure:5366: checking for size_t" >&5
5366 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5367 echo $ac_n "(cached) $ac_c" 1>&6
5368 else
5369 cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5372 #include <sys/types.h>
5373 #if STDC_HEADERS
5374 #include <stdlib.h>
5375 #include <stddef.h>
5376 #endif
5378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5379 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5380 rm -rf conftest*
5381 ac_cv_type_size_t=yes
5382 else
5383 rm -rf conftest*
5384 ac_cv_type_size_t=no
5386 rm -f conftest*
5389 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5390 if test $ac_cv_type_size_t = no; then
5391 cat >> confdefs.h <<\EOF
5392 #define size_t unsigned
5397 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5398 # for constant arguments. Useless!
5399 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5400 echo "configure:5401: checking for working alloca.h" >&5
5401 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5402 echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407 #include <alloca.h>
5408 int main() {
5409 char *p = alloca(2 * sizeof(int));
5410 ; return 0; }
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413 rm -rf conftest*
5414 ac_cv_header_alloca_h=yes
5415 else
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 ac_cv_header_alloca_h=no
5421 rm -f conftest*
5424 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5425 if test $ac_cv_header_alloca_h = yes; then
5426 cat >> confdefs.h <<\EOF
5427 #define HAVE_ALLOCA_H 1
5432 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5433 echo "configure:5434: checking for alloca" >&5
5434 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5435 echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437 cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5441 #ifdef __GNUC__
5442 # define alloca __builtin_alloca
5443 #else
5444 # ifdef _MSC_VER
5445 # include <malloc.h>
5446 # define alloca _alloca
5447 # else
5448 # if HAVE_ALLOCA_H
5449 # include <alloca.h>
5450 # else
5451 # ifdef _AIX
5452 #pragma alloca
5453 # else
5454 # ifndef alloca /* predefined by HP cc +Olibcalls */
5455 char *alloca ();
5456 # endif
5457 # endif
5458 # endif
5459 # endif
5460 #endif
5462 int main() {
5463 char *p = (char *) alloca(1);
5464 ; return 0; }
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467 rm -rf conftest*
5468 ac_cv_func_alloca_works=yes
5469 else
5470 echo "configure: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5472 rm -rf conftest*
5473 ac_cv_func_alloca_works=no
5475 rm -f conftest*
5478 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5479 if test $ac_cv_func_alloca_works = yes; then
5480 cat >> confdefs.h <<\EOF
5481 #define HAVE_ALLOCA 1
5486 if test $ac_cv_func_alloca_works = no; then
5487 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5488 # that cause trouble. Some versions do not even contain alloca or
5489 # contain a buggy version. If you still want to use their alloca,
5490 # use ar to extract alloca.o from them instead of compiling alloca.c.
5491 ALLOCA=alloca.${ac_objext}
5492 cat >> confdefs.h <<\EOF
5493 #define C_ALLOCA 1
5497 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5498 echo "configure:5499: checking whether alloca needs Cray hooks" >&5
5499 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502 cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 #if defined(CRAY) && ! defined(CRAY2)
5506 webecray
5507 #else
5508 wenotbecray
5509 #endif
5512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 egrep "webecray" >/dev/null 2>&1; then
5514 rm -rf conftest*
5515 ac_cv_os_cray=yes
5516 else
5517 rm -rf conftest*
5518 ac_cv_os_cray=no
5520 rm -f conftest*
5524 echo "$ac_t""$ac_cv_os_cray" 1>&6
5525 if test $ac_cv_os_cray = yes; then
5526 for ac_func in _getb67 GETB67 getb67; do
5527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5528 echo "configure:5529: checking for $ac_func" >&5
5529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5530 echo $ac_n "(cached) $ac_c" 1>&6
5531 else
5532 cat > conftest.$ac_ext <<EOF
5533 #line 5534 "configure"
5534 #include "confdefs.h"
5535 /* System header to define __stub macros and hopefully few prototypes,
5536 which can conflict with char $ac_func(); below. */
5537 #include <assert.h>
5538 /* Override any gcc2 internal prototype to avoid an error. */
5539 /* We use char because int might match the return type of a gcc2
5540 builtin and then its argument prototype would still apply. */
5541 char $ac_func();
5543 int main() {
5545 /* The GNU C library defines this for functions which it implements
5546 to always fail with ENOSYS. Some functions are actually named
5547 something starting with __ and the normal name is an alias. */
5548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5549 choke me
5550 #else
5551 $ac_func();
5552 #endif
5554 ; return 0; }
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5557 rm -rf conftest*
5558 eval "ac_cv_func_$ac_func=yes"
5559 else
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 rm -rf conftest*
5563 eval "ac_cv_func_$ac_func=no"
5565 rm -f conftest*
5568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5569 echo "$ac_t""yes" 1>&6
5570 cat >> confdefs.h <<EOF
5571 #define CRAY_STACKSEG_END $ac_func
5574 break
5575 else
5576 echo "$ac_t""no" 1>&6
5579 done
5582 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5583 echo "configure:5584: checking stack direction for C alloca" >&5
5584 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5585 echo $ac_n "(cached) $ac_c" 1>&6
5586 else
5587 if test "$cross_compiling" = yes; then
5588 ac_cv_c_stack_direction=0
5589 else
5590 cat > conftest.$ac_ext <<EOF
5591 #line 5592 "configure"
5592 #include "confdefs.h"
5593 find_stack_direction ()
5595 static char *addr = 0;
5596 auto char dummy;
5597 if (addr == 0)
5599 addr = &dummy;
5600 return find_stack_direction ();
5602 else
5603 return (&dummy > addr) ? 1 : -1;
5605 main ()
5607 exit (find_stack_direction() < 0);
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5611 then
5612 ac_cv_c_stack_direction=1
5613 else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -fr conftest*
5617 ac_cv_c_stack_direction=-1
5619 rm -fr conftest*
5624 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5625 cat >> confdefs.h <<EOF
5626 #define STACK_DIRECTION $ac_cv_c_stack_direction
5632 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5633 echo "configure:5634: checking whether we are using the GNU C Library 2.1 or newer" >&5
5634 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5635 echo $ac_n "(cached) $ac_c" 1>&6
5636 else
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5641 #include <features.h>
5642 #ifdef __GNU_LIBRARY__
5643 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5644 Lucky GNU user
5645 #endif
5646 #endif
5649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5650 egrep "Lucky GNU user" >/dev/null 2>&1; then
5651 rm -rf conftest*
5652 ac_cv_gnu_library_2_1=yes
5653 else
5654 rm -rf conftest*
5655 ac_cv_gnu_library_2_1=no
5657 rm -f conftest*
5663 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5665 GLIBC21="$ac_cv_gnu_library_2_1"
5669 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5670 stdlib.h string.h unistd.h sys/param.h
5672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5674 echo "configure:5675: checking for $ac_hdr" >&5
5675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5676 echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678 cat > conftest.$ac_ext <<EOF
5679 #line 5680 "configure"
5680 #include "confdefs.h"
5681 #include <$ac_hdr>
5683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5684 { (eval echo configure:5685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5686 if test -z "$ac_err"; then
5687 rm -rf conftest*
5688 eval "ac_cv_header_$ac_safe=yes"
5689 else
5690 echo "$ac_err" >&5
5691 echo "configure: failed program was:" >&5
5692 cat conftest.$ac_ext >&5
5693 rm -rf conftest*
5694 eval "ac_cv_header_$ac_safe=no"
5696 rm -f conftest*
5698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5699 echo "$ac_t""yes" 1>&6
5700 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5701 cat >> confdefs.h <<EOF
5702 #define $ac_tr_hdr 1
5705 else
5706 echo "$ac_t""no" 1>&6
5708 done
5710 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5711 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5712 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5715 echo "configure:5716: checking for $ac_func" >&5
5716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5717 echo $ac_n "(cached) $ac_c" 1>&6
5718 else
5719 cat > conftest.$ac_ext <<EOF
5720 #line 5721 "configure"
5721 #include "confdefs.h"
5722 /* System header to define __stub macros and hopefully few prototypes,
5723 which can conflict with char $ac_func(); below. */
5724 #include <assert.h>
5725 /* Override any gcc2 internal prototype to avoid an error. */
5726 /* We use char because int might match the return type of a gcc2
5727 builtin and then its argument prototype would still apply. */
5728 char $ac_func();
5730 int main() {
5732 /* The GNU C library defines this for functions which it implements
5733 to always fail with ENOSYS. Some functions are actually named
5734 something starting with __ and the normal name is an alias. */
5735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5736 choke me
5737 #else
5738 $ac_func();
5739 #endif
5741 ; return 0; }
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744 rm -rf conftest*
5745 eval "ac_cv_func_$ac_func=yes"
5746 else
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5749 rm -rf conftest*
5750 eval "ac_cv_func_$ac_func=no"
5752 rm -f conftest*
5755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5756 echo "$ac_t""yes" 1>&6
5757 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5758 cat >> confdefs.h <<EOF
5759 #define $ac_tr_func 1
5762 else
5763 echo "$ac_t""no" 1>&6
5765 done
5770 am_cv_lib_iconv_ldpath=
5771 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5772 if test "${with_libiconv_prefix+set}" = set; then
5773 withval="$with_libiconv_prefix"
5775 for dir in `echo "$withval" | tr : ' '`; do
5776 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5777 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5778 done
5783 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5784 echo "configure:5785: checking for iconv" >&5
5785 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5786 echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5789 am_cv_func_iconv="no, consider installing GNU libiconv"
5790 am_cv_lib_iconv=no
5791 cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 #include <stdlib.h>
5795 #include <iconv.h>
5796 int main() {
5797 iconv_t cd = iconv_open("","");
5798 iconv(cd,NULL,NULL,NULL,NULL);
5799 iconv_close(cd);
5800 ; return 0; }
5802 if { (eval echo configure:5803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5803 rm -rf conftest*
5804 am_cv_func_iconv=yes
5805 else
5806 echo "configure: failed program was:" >&5
5807 cat conftest.$ac_ext >&5
5809 rm -f conftest*
5810 if test "$am_cv_func_iconv" != yes; then
5811 am_save_LIBS="$LIBS"
5812 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5813 cat > conftest.$ac_ext <<EOF
5814 #line 5815 "configure"
5815 #include "confdefs.h"
5816 #include <stdlib.h>
5817 #include <iconv.h>
5818 int main() {
5819 iconv_t cd = iconv_open("","");
5820 iconv(cd,NULL,NULL,NULL,NULL);
5821 iconv_close(cd);
5822 ; return 0; }
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825 rm -rf conftest*
5826 am_cv_lib_iconv=yes
5827 am_cv_func_iconv=yes
5828 else
5829 echo "configure: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5832 rm -f conftest*
5833 LIBS="$am_save_LIBS"
5838 echo "$ac_t""$am_cv_func_iconv" 1>&6
5839 if test "$am_cv_func_iconv" = yes; then
5840 cat >> confdefs.h <<\EOF
5841 #define HAVE_ICONV 1
5844 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5845 echo "configure:5846: checking for iconv declaration" >&5
5846 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5847 echo $ac_n "(cached) $ac_c" 1>&6
5848 else
5850 cat > conftest.$ac_ext <<EOF
5851 #line 5852 "configure"
5852 #include "confdefs.h"
5854 #include <stdlib.h>
5855 #include <iconv.h>
5856 extern
5857 #ifdef __cplusplus
5859 #endif
5860 #if defined(__STDC__) || defined(__cplusplus)
5861 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5862 #else
5863 size_t iconv();
5864 #endif
5866 int main() {
5868 ; return 0; }
5870 if { (eval echo configure:5871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5871 rm -rf conftest*
5872 am_cv_proto_iconv_arg1=""
5873 else
5874 echo "configure: failed program was:" >&5
5875 cat conftest.$ac_ext >&5
5876 rm -rf conftest*
5877 am_cv_proto_iconv_arg1="const"
5879 rm -f conftest*
5880 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);"
5883 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5884 echo "$ac_t""${ac_t:-
5885 }$am_cv_proto_iconv" 1>&6
5886 cat >> confdefs.h <<EOF
5887 #define ICONV_CONST $am_cv_proto_iconv_arg1
5891 LIBICONV=
5892 if test "$am_cv_lib_iconv" = yes; then
5893 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5898 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
5899 echo "configure:5900: checking for nl_langinfo and CODESET" >&5
5900 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
5901 echo $ac_n "(cached) $ac_c" 1>&6
5902 else
5903 cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 #include <langinfo.h>
5907 int main() {
5908 char* cs = nl_langinfo(CODESET);
5909 ; return 0; }
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912 rm -rf conftest*
5913 am_cv_langinfo_codeset=yes
5914 else
5915 echo "configure: failed program was:" >&5
5916 cat conftest.$ac_ext >&5
5917 rm -rf conftest*
5918 am_cv_langinfo_codeset=no
5920 rm -f conftest*
5924 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5925 if test $am_cv_langinfo_codeset = yes; then
5926 cat >> confdefs.h <<\EOF
5927 #define HAVE_LANGINFO_CODESET 1
5932 if test $ac_cv_header_locale_h = yes; then
5933 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5934 echo "configure:5935: checking for LC_MESSAGES" >&5
5935 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5936 echo $ac_n "(cached) $ac_c" 1>&6
5937 else
5938 cat > conftest.$ac_ext <<EOF
5939 #line 5940 "configure"
5940 #include "confdefs.h"
5941 #include <locale.h>
5942 int main() {
5943 return LC_MESSAGES
5944 ; return 0; }
5946 if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5947 rm -rf conftest*
5948 am_cv_val_LC_MESSAGES=yes
5949 else
5950 echo "configure: failed program was:" >&5
5951 cat conftest.$ac_ext >&5
5952 rm -rf conftest*
5953 am_cv_val_LC_MESSAGES=no
5955 rm -f conftest*
5958 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5959 if test $am_cv_val_LC_MESSAGES = yes; then
5960 cat >> confdefs.h <<\EOF
5961 #define HAVE_LC_MESSAGES 1
5966 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5967 echo "configure:5968: checking whether NLS is requested" >&5
5968 # Check whether --enable-nls or --disable-nls was given.
5969 if test "${enable_nls+set}" = set; then
5970 enableval="$enable_nls"
5971 USE_NLS=$enableval
5972 else
5973 USE_NLS=yes
5976 echo "$ac_t""$USE_NLS" 1>&6
5979 BUILD_INCLUDED_LIBINTL=no
5980 USE_INCLUDED_LIBINTL=no
5981 INTLLIBS=
5982 INTLDEPS=
5984 if test "$USE_NLS" = "yes"; then
5985 cat >> confdefs.h <<\EOF
5986 #define ENABLE_NLS 1
5989 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5990 echo "configure:5991: checking whether included gettext is requested" >&5
5991 # Check whether --with-included-gettext or --without-included-gettext was given.
5992 if test "${with_included_gettext+set}" = set; then
5993 withval="$with_included_gettext"
5994 nls_cv_force_use_gnu_gettext=$withval
5995 else
5996 nls_cv_force_use_gnu_gettext=no
5999 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6001 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6002 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6003 CATOBJEXT=NONE
6008 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6009 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6010 echo "configure:6011: checking for libintl.h" >&5
6011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6012 echo $ac_n "(cached) $ac_c" 1>&6
6013 else
6014 cat > conftest.$ac_ext <<EOF
6015 #line 6016 "configure"
6016 #include "confdefs.h"
6017 #include <libintl.h>
6019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6020 { (eval echo configure:6021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6022 if test -z "$ac_err"; then
6023 rm -rf conftest*
6024 eval "ac_cv_header_$ac_safe=yes"
6025 else
6026 echo "$ac_err" >&5
6027 echo "configure: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
6029 rm -rf conftest*
6030 eval "ac_cv_header_$ac_safe=no"
6032 rm -f conftest*
6034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6035 echo "$ac_t""yes" 1>&6
6036 cat >> confdefs.h <<\EOF
6037 #define HAVE_LIBINTL_H 1
6040 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6041 echo "configure:6042: checking for GNU gettext in libc" >&5
6042 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6043 echo $ac_n "(cached) $ac_c" 1>&6
6044 else
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 #include <libintl.h>
6049 extern int _nl_msg_cat_cntr;
6050 int main() {
6051 bindtextdomain ("", "");
6052 return (int) gettext ("") + _nl_msg_cat_cntr
6053 ; return 0; }
6055 if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6056 rm -rf conftest*
6057 gt_cv_func_gnugettext1_libc=yes
6058 else
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 rm -rf conftest*
6062 gt_cv_func_gnugettext1_libc=no
6064 rm -f conftest*
6067 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6069 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6070 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6071 echo "configure:6072: checking for GNU gettext in libintl" >&5
6072 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6073 echo $ac_n "(cached) $ac_c" 1>&6
6074 else
6075 gt_save_LIBS="$LIBS"
6076 LIBS="$LIBS -lintl $LIBICONV"
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6079 "configure"
6079 #include "confdefs.h"
6080 #include <libintl.h>
6081 extern int _nl_msg_cat_cntr;
6082 int main() {
6083 bindtextdomain ("", "");
6084 return (int) gettext ("") + _nl_msg_cat_cntr
6085 ; return 0; }
6087 if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6088 rm -rf conftest*
6089 gt_cv_func_gnugettext1_libintl=yes
6090 else
6091 echo "configure: failed program was:" >&5
6092 cat conftest.$ac_ext >&5
6093 rm -rf conftest*
6094 gt_cv_func_gnugettext1_libintl=no
6096 rm -f conftest*
6097 LIBS="$gt_save_LIBS"
6100 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6103 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6104 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6105 && test "$PACKAGE" != gettext; }; then
6106 cat >> confdefs.h <<\EOF
6107 #define HAVE_GETTEXT 1
6111 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6112 INTLLIBS="-lintl $LIBICONV"
6115 gt_save_LIBS="$LIBS"
6116 LIBS="$LIBS $INTLLIBS"
6117 for ac_func in dcgettext
6119 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6120 echo "configure:6121: checking for $ac_func" >&5
6121 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6122 echo $ac_n "(cached) $ac_c" 1>&6
6123 else
6124 cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6127 /* System header to define __stub macros and hopefully few prototypes,
6128 which can conflict with char $ac_func(); below. */
6129 #include <assert.h>
6130 /* Override any gcc2 internal prototype to avoid an error. */
6131 /* We use char because int might match the return type of a gcc2
6132 builtin and then its argument prototype would still apply. */
6133 char $ac_func();
6135 int main() {
6137 /* The GNU C library defines this for functions which it implements
6138 to always fail with ENOSYS. Some functions are actually named
6139 something starting with __ and the normal name is an alias. */
6140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6141 choke me
6142 #else
6143 $ac_func();
6144 #endif
6146 ; return 0; }
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149 rm -rf conftest*
6150 eval "ac_cv_func_$ac_func=yes"
6151 else
6152 echo "configure: failed program was:" >&5
6153 cat conftest.$ac_ext >&5
6154 rm -rf conftest*
6155 eval "ac_cv_func_$ac_func=no"
6157 rm -f conftest*
6160 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6161 echo "$ac_t""yes" 1>&6
6162 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6163 cat >> confdefs.h <<EOF
6164 #define $ac_tr_func 1
6167 else
6168 echo "$ac_t""no" 1>&6
6170 done
6172 LIBS="$gt_save_LIBS"
6174 # Extract the first word of "msgfmt", so it can be a program name with args.
6175 set dummy msgfmt; ac_word=$2
6176 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6177 echo "configure:6178: checking for $ac_word" >&5
6178 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6179 echo $ac_n "(cached) $ac_c" 1>&6
6180 else
6181 case "$MSGFMT" in
6183 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6187 for ac_dir in $PATH; do
6188 test -z "$ac_dir" && ac_dir=.
6189 if test -f $ac_dir/$ac_word; then
6190 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6191 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6192 break
6195 done
6196 IFS="$ac_save_ifs"
6197 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6199 esac
6201 MSGFMT="$ac_cv_path_MSGFMT"
6202 if test "$MSGFMT" != ":"; then
6203 echo "$ac_t""$MSGFMT" 1>&6
6204 else
6205 echo "$ac_t""no" 1>&6
6208 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6209 set dummy gmsgfmt; ac_word=$2
6210 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6211 echo "configure:6212: checking for $ac_word" >&5
6212 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6213 echo $ac_n "(cached) $ac_c" 1>&6
6214 else
6215 case "$GMSGFMT" in
6217 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6219 ?:/*)
6220 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6223 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6224 ac_dummy="$PATH"
6225 for ac_dir in $ac_dummy; do
6226 test -z "$ac_dir" && ac_dir=.
6227 if test -f $ac_dir/$ac_word; then
6228 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6229 break
6231 done
6232 IFS="$ac_save_ifs"
6233 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6235 esac
6237 GMSGFMT="$ac_cv_path_GMSGFMT"
6238 if test -n "$GMSGFMT"; then
6239 echo "$ac_t""$GMSGFMT" 1>&6
6240 else
6241 echo "$ac_t""no" 1>&6
6245 # Extract the first word of "xgettext", so it can be a program name with args.
6246 set dummy xgettext; ac_word=$2
6247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6248 echo "configure:6249: checking for $ac_word" >&5
6249 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6250 echo $ac_n "(cached) $ac_c" 1>&6
6251 else
6252 case "$XGETTEXT" in
6254 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6257 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6258 for ac_dir in $PATH; do
6259 test -z "$ac_dir" && ac_dir=.
6260 if test -f $ac_dir/$ac_word; then
6261 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6262 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6263 break
6266 done
6267 IFS="$ac_save_ifs"
6268 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6270 esac
6272 XGETTEXT="$ac_cv_path_XGETTEXT"
6273 if test "$XGETTEXT" != ":"; then
6274 echo "$ac_t""$XGETTEXT" 1>&6
6275 else
6276 echo "$ac_t""no" 1>&6
6280 CATOBJEXT=.gmo
6283 else
6284 echo "$ac_t""no" 1>&6
6288 if test "$CATOBJEXT" = "NONE"; then
6289 nls_cv_use_gnu_gettext=yes
6293 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6294 INTLOBJS="\$(GETTOBJS)"
6295 # Extract the first word of "msgfmt", so it can be a program name with args.
6296 set dummy msgfmt; ac_word=$2
6297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6298 echo "configure:6299: checking for $ac_word" >&5
6299 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6300 echo $ac_n "(cached) $ac_c" 1>&6
6301 else
6302 case "$MSGFMT" in
6304 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6307 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6308 for ac_dir in $PATH; do
6309 test -z "$ac_dir" && ac_dir=.
6310 if test -f $ac_dir/$ac_word; then
6311 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6312 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6313 break
6316 done
6317 IFS="$ac_save_ifs"
6318 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6320 esac
6322 MSGFMT="$ac_cv_path_MSGFMT"
6323 if test "$MSGFMT" != ":"; then
6324 echo "$ac_t""$MSGFMT" 1>&6
6325 else
6326 echo "$ac_t""no" 1>&6
6329 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6330 set dummy gmsgfmt; ac_word=$2
6331 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6332 echo "configure:6333: checking for $ac_word" >&5
6333 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6334 echo $ac_n "(cached) $ac_c" 1>&6
6335 else
6336 case "$GMSGFMT" in
6338 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6340 ?:/*)
6341 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6344 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6345 ac_dummy="$PATH"
6346 for ac_dir in $ac_dummy; do
6347 test -z "$ac_dir" && ac_dir=.
6348 if test -f $ac_dir/$ac_word; then
6349 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6350 break
6352 done
6353 IFS="$ac_save_ifs"
6354 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6356 esac
6358 GMSGFMT="$ac_cv_path_GMSGFMT"
6359 if test -n "$GMSGFMT"; then
6360 echo "$ac_t""$GMSGFMT" 1>&6
6361 else
6362 echo "$ac_t""no" 1>&6
6365 # Extract the first word of "xgettext", so it can be a program name with args.
6366 set dummy xgettext; ac_word=$2
6367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6368 echo "configure:6369: checking for $ac_word" >&5
6369 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6370 echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372 case "$XGETTEXT" in
6374 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6378 for ac_dir in $PATH; do
6379 test -z "$ac_dir" && ac_dir=.
6380 if test -f $ac_dir/$ac_word; then
6381 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6382 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6383 break
6386 done
6387 IFS="$ac_save_ifs"
6388 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6390 esac
6392 XGETTEXT="$ac_cv_path_XGETTEXT"
6393 if test "$XGETTEXT" != ":"; then
6394 echo "$ac_t""$XGETTEXT" 1>&6
6395 else
6396 echo "$ac_t""no" 1>&6
6400 BUILD_INCLUDED_LIBINTL=yes
6401 USE_INCLUDED_LIBINTL=yes
6402 CATOBJEXT=.gmo
6403 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6404 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6405 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6408 if test "$GMSGFMT" != ":"; then
6409 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6411 else
6412 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6413 GMSGFMT=":"
6417 if test "$XGETTEXT" != ":"; then
6418 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6420 else
6421 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6422 XGETTEXT=":"
6426 POSUB=po
6431 if test "$PACKAGE" = gettext; then
6432 BUILD_INCLUDED_LIBINTL=yes
6435 for ac_prog in bison
6437 # Extract the first word of "$ac_prog", so it can be a program name with args.
6438 set dummy $ac_prog; ac_word=$2
6439 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_word" >&5
6441 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6442 echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444 if test -n "$INTLBISON"; then
6445 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6446 else
6447 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6448 ac_dummy="$PATH"
6449 for ac_dir in $ac_dummy; do
6450 test -z "$ac_dir" && ac_dir=.
6451 if test -f $ac_dir/$ac_word; then
6452 ac_cv_prog_INTLBISON="$ac_prog"
6453 break
6455 done
6456 IFS="$ac_save_ifs"
6459 INTLBISON="$ac_cv_prog_INTLBISON"
6460 if test -n "$INTLBISON"; then
6461 echo "$ac_t""$INTLBISON" 1>&6
6462 else
6463 echo "$ac_t""no" 1>&6
6466 test -n "$INTLBISON" && break
6467 done
6469 if test -z "$INTLBISON"; then
6470 ac_verc_fail=yes
6471 else
6472 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6473 echo "configure:6474: checking version of bison" >&5
6474 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6475 case $ac_prog_version in
6476 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6477 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6478 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6479 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6480 esac
6481 echo "$ac_t""$ac_prog_version" 1>&6
6483 if test $ac_verc_fail = yes; then
6484 INTLBISON=:
6496 if test $USE_INCLUDED_LIBINTL = yes; then
6497 cat >> confdefs.h <<\EOF
6498 #define USE_INCLUDED_LIBINTL 1
6503 nls_cv_header_intl=
6504 nls_cv_header_libgt=
6506 DATADIRNAME=share
6509 INSTOBJEXT=.mo
6512 GENCAT=gencat
6516 if test "x$CATOBJEXT" != x; then
6517 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6518 echo "configure:6519: checking for catalogs to be installed" >&5
6519 # Look for .po and .gmo files in the source directory.
6520 CATALOGS=
6521 XLINGUAS=
6522 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6523 # If there aren't any .gmo files the shell will give us the
6524 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6525 # weeded out.
6526 case "$cat" in *\**)
6527 continue;;
6528 esac
6529 # The quadruple backslash is collapsed to a double backslash
6530 # by the backticks, then collapsed again by the double quotes,
6531 # leaving us with one backslash in the sed expression (right
6532 # before the dot that mustn't act as a wildcard). The dot to
6533 # be escaped in the second expression is hiding inside CATOBJEXT.
6534 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6535 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6536 # The user is allowed to set LINGUAS to a list of languages to
6537 # install catalogs for. If it's empty that means "all of them."
6538 if test "x$LINGUAS" = x; then
6539 CATALOGS="$CATALOGS $cat"
6540 XLINGUAS="$XLINGUAS $lang"
6541 else
6542 case "$LINGUAS" in *$lang*)
6543 CATALOGS="$CATALOGS $cat"
6544 XLINGUAS="$XLINGUAS $lang"
6546 esac
6548 done
6549 LINGUAS="$XLINGUAS"
6550 echo "$ac_t""$LINGUAS" 1>&6
6553 MKINSTALLDIRS=
6554 if test -n "$ac_aux_dir"; then
6555 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6557 if test -z "$MKINSTALLDIRS"; then
6558 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6562 INTL_LIBTOOL_SUFFIX_PREFIX=
6566 # Windows32 Registry support for specifying GCC installation paths.
6567 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6568 if test "${enable_win32_registry+set}" = set; then
6569 enableval="$enable_win32_registry"
6573 case $host_os in
6574 win32 | pe | cygwin* | mingw32* | uwin*)
6575 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6576 echo "configure:6577: checking whether windows registry support is requested" >&5
6577 if test "x$enable_win32_registry" != xno; then
6578 cat >> confdefs.h <<\EOF
6579 #define ENABLE_WIN32_REGISTRY 1
6582 echo "$ac_t""yes" 1>&6
6584 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6585 echo "configure:6586: checking for library containing RegOpenKeyExA" >&5
6586 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6587 echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589 ac_func_search_save_LIBS="$LIBS"
6590 ac_cv_search_RegOpenKeyExA="no"
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 /* Override any gcc2 internal prototype to avoid an error. */
6595 /* We use char because int might match the return type of a gcc2
6596 builtin and then its argument prototype would still apply. */
6597 char RegOpenKeyExA();
6599 int main() {
6600 RegOpenKeyExA()
6601 ; return 0; }
6603 if { (eval echo configure:6604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6604 rm -rf conftest*
6605 ac_cv_search_RegOpenKeyExA="none required"
6606 else
6607 echo "configure: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6610 rm -f conftest*
6611 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6612 LIBS="-l$i $ac_func_search_save_LIBS"
6613 cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 /* Override any gcc2 internal prototype to avoid an error. */
6617 /* We use char because int might match the return type of a gcc2
6618 builtin and then its argument prototype would still apply. */
6619 char RegOpenKeyExA();
6621 int main() {
6622 RegOpenKeyExA()
6623 ; return 0; }
6625 if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6626 rm -rf conftest*
6627 ac_cv_search_RegOpenKeyExA="-l$i"
6628 break
6629 else
6630 echo "configure: failed program was:" >&5
6631 cat conftest.$ac_ext >&5
6633 rm -f conftest*
6634 done
6635 LIBS="$ac_func_search_save_LIBS"
6638 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6639 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6640 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6642 else :
6645 else
6646 echo "$ac_t""no" 1>&6
6649 # Check if user specified a different registry key.
6650 case "x${enable_win32_registry}" in
6651 x | xyes)
6652 # default.
6653 gcc_cv_win32_registry_key="$VERSION"
6655 xno)
6656 # no registry lookup.
6657 gcc_cv_win32_registry_key=''
6660 # user-specified key.
6661 gcc_cv_win32_registry_key="$enable_win32_registry"
6663 esac
6665 if test "x$enable_win32_registry" != xno; then
6666 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6667 echo "configure:6668: checking registry key on windows hosts" >&5
6668 cat >> confdefs.h <<EOF
6669 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6672 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6675 esac
6677 # Get an absolute path to the GCC top-level source directory
6678 holddir=`${PWDCMD-pwd}`
6679 cd $srcdir
6680 topdir=`${PWDCMD-pwd}`
6681 cd $holddir
6683 # Conditionalize the makefile for this host machine.
6684 # Make-host contains the concatenation of all host makefile fragments
6685 # [there can be more than one]. This file is built by configure.frag.
6686 host_overrides=Make-host
6687 dep_host_xmake_file=
6688 for f in .. ${host_xmake_file}
6690 if test -f ${srcdir}/config/$f
6691 then
6692 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6694 done
6696 # Conditionalize the makefile for this target machine.
6697 # Make-target contains the concatenation of all host makefile fragments
6698 # [there can be more than one]. This file is built by configure.frag.
6699 target_overrides=Make-target
6700 dep_tmake_file=
6701 for f in .. ${tmake_file}
6703 if test -f ${srcdir}/config/$f
6704 then
6705 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6707 done
6709 # If the host doesn't support symlinks, modify CC in
6710 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6711 # Otherwise, we can use "CC=$(CC)".
6712 rm -f symtest.tem
6713 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6714 then
6715 cc_set_by_configure="\$(CC)"
6716 quoted_cc_set_by_configure="\$(CC)"
6717 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6718 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6719 else
6720 rm -f symtest.tem
6721 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6722 then
6723 symbolic_link="cp -p"
6724 else
6725 symbolic_link="cp"
6727 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6728 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6729 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6730 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6732 rm -f symtest.tem
6734 out_object_file=`basename $out_file .c`.o
6736 tm_file_list=
6737 for f in $tm_file; do
6738 case $f in
6739 ansidecl.h )
6740 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6741 defaults.h )
6742 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6743 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6744 esac
6745 done
6747 tm_p_file_list=
6748 for f in $tm_p_file; do
6749 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6750 done
6752 host_xm_file_list=
6753 for f in $host_xm_file; do
6754 case $f in
6755 ansidecl.h )
6756 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6757 auto-host.h )
6758 host_xm_file_list="${host_xm_file_list} $f" ;;
6759 defaults.h )
6760 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6761 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6762 esac
6763 done
6765 build_xm_file_list=
6766 for f in $build_xm_file; do
6767 case $f in
6768 ansidecl.h )
6769 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6770 auto-build.h | auto-host.h )
6771 build_xm_file_list="${build_xm_file_list} $f" ;;
6772 defaults.h )
6773 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6774 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6775 esac
6776 done
6778 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6779 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6780 CROSS=
6781 ALL=all.internal
6782 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6783 if test x$host != x$target
6784 then
6785 CROSS="-DCROSS_COMPILE"
6786 ALL=all.cross
6787 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6788 case "$host","$target" in
6789 i?86-*-*,x86_64-*-* \
6790 | powerpc*-*-*,powerpc64*-*-*)
6791 CROSS="$CROSS -DNATIVE_CROSS" ;;
6792 esac
6795 # If this is a cross-compiler that does not
6796 # have its own set of headers then define
6797 # inhibit_libc
6799 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6800 # This prevents libgcc2 from containing any code which requires libc
6801 # support.
6802 inhibit_libc=
6803 if test x$host != x$target && test x$with_headers = x; then
6804 inhibit_libc=-Dinhibit_libc
6805 else
6806 if test x$with_newlib = xyes; then
6807 inhibit_libc=-Dinhibit_libc
6812 # When building gcc with a cross-compiler, we need to adjust things so
6813 # that the generator programs are still built with the native compiler.
6814 # Also, we cannot run fixincludes or fix-header.
6815 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6816 # FIXME.
6818 # These are the normal (build=host) settings:
6819 BUILD_PREFIX=
6820 BUILD_PREFIX_1=ignore-
6821 HOST_CC='$(CC)'
6822 HOST_CFLAGS='$(ALL_CFLAGS)'
6824 STMP_FIXINC=stmp-fixinc
6825 STMP_FIXPROTO=stmp-fixproto
6827 # And these apply if build != host.
6828 if test x$build != x$host
6829 then
6830 BUILD_PREFIX=build-
6831 BUILD_PREFIX_1=build-
6832 HOST_CC='$(CC_FOR_BUILD)'
6833 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6835 STMP_FIXINC=
6836 STMP_FIXPROTO=
6839 # Expand extra_headers to include complete path.
6840 # This substitutes for lots of t-* files.
6841 extra_headers_list=
6842 if test "x$extra_headers" = x
6843 then true
6844 else
6845 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6846 for file in $extra_headers;
6848 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6849 done
6852 if test x$use_collect2 = xno; then
6853 use_collect2=
6856 # Add a definition of USE_COLLECT2 if system wants one.
6857 if test x$use_collect2 != x
6858 then
6859 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6860 xm_defines="${xm_defines} USE_COLLECT2"
6863 # If we have gas in the build tree, make a link to it.
6864 if test -f ../gas/Makefile; then
6865 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6868 # If we have nm and objdump in the build tree, make a link to them.
6869 if test -f ../binutils/Makefile; then
6870 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6871 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6874 # If we have ld in the build tree, make a link to it.
6875 if test -f ../ld/Makefile; then
6876 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6879 # Figure out what assembler we will be using.
6880 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6881 echo "configure:6882: checking what assembler to use" >&5
6882 gcc_cv_as=
6883 gcc_cv_gas_major_version=
6884 gcc_cv_gas_minor_version=
6885 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6886 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6887 if test -x "$DEFAULT_ASSEMBLER"; then
6888 gcc_cv_as="$DEFAULT_ASSEMBLER"
6889 elif test -x "$AS"; then
6890 gcc_cv_as="$AS"
6891 elif test -x as$host_exeext; then
6892 # Build using assembler in the current directory.
6893 gcc_cv_as=./as$host_exeext
6894 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6895 # Single tree build which includes gas.
6896 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
6898 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6899 if test x$gcc_cv_gas_version != x; then
6900 break
6902 done
6903 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6904 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6905 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
6908 if test "x$gcc_cv_as" = x; then
6909 # Search the same directories that the installed compiler will
6910 # search. Else we may find the wrong assembler and lose. If we
6911 # do not find a suitable assembler binary, then try the user's
6912 # path.
6914 # Also note we have to check MD_EXEC_PREFIX before checking the
6915 # user's path. Unfortunately, there is no good way to get at the
6916 # value of MD_EXEC_PREFIX here. So we do a brute force search
6917 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6918 # to be fixed as part of the make/configure rewrite too.
6920 if test "x$exec_prefix" = xNONE; then
6921 if test "x$prefix" = xNONE; then
6922 test_prefix=/usr/local
6923 else
6924 test_prefix=$prefix
6926 else
6927 test_prefix=$exec_prefix
6930 # If the loop below does not find an assembler, then use whatever
6931 # one we can find in the users's path.
6932 # user's path.
6933 if test "x$program_prefix" != xNONE; then
6934 gcc_cv_as=${program_prefix}as$host_exeext
6935 else
6936 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
6939 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6940 $test_prefix/lib/gcc-lib/$target_alias \
6941 /usr/lib/gcc/$target_alias/$gcc_version \
6942 /usr/lib/gcc/$target_alias \
6943 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6944 $test_prefix/$target_alias/bin"
6946 if test x$host = x$target; then
6947 test_dirs="$test_dirs \
6948 /usr/libexec \
6949 /usr/ccs/gcc \
6950 /usr/ccs/bin \
6951 /udk/usr/ccs/bin \
6952 /bsd43/usr/lib/cmplrs/cc \
6953 /usr/cross64/usr/bin \
6954 /usr/lib/cmplrs/cc \
6955 /sysv/usr/lib/cmplrs/cc \
6956 /svr4/usr/lib/cmplrs/cc \
6957 /usr/bin"
6960 for dir in $test_dirs; do
6961 if test -x $dir/as$host_exeext; then
6962 gcc_cv_as=$dir/as$host_exeext
6963 break;
6965 done
6967 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6968 echo "$ac_t"""newly built gas"" 1>&6
6969 else
6970 echo "$ac_t""$gcc_cv_as" 1>&6
6973 # Figure out what linker we will be using.
6974 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
6975 echo "configure:6976: checking what linker to use" >&5
6976 gcc_cv_ld=
6977 gcc_cv_gld_major_version=
6978 gcc_cv_gld_minor_version=
6979 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
6980 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6981 if test -x "$DEFAULT_LINKER"; then
6982 gcc_cv_ld="$DEFAULT_LINKER"
6983 elif test -x "$LD"; then
6984 gcc_cv_ld="$LD"
6985 elif test -x ld$host_exeext; then
6986 # Build using linker in the current directory.
6987 gcc_cv_ld=./ld$host_exeext
6988 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
6989 # Single tree build which includes ld.
6990 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
6992 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6993 if test x$gcc_cv_gld_version != x; then
6994 break
6996 done
6997 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
6998 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7001 if test "x$gcc_cv_ld" = x; then
7002 # Search the same directories that the installed compiler will
7003 # search. Else we may find the wrong linker and lose. If we
7004 # do not find a suitable linker binary, then try the user's
7005 # path.
7007 # Also note we have to check MD_EXEC_PREFIX before checking the
7008 # user's path. Unfortunately, there is no good way to get at the
7009 # value of MD_EXEC_PREFIX here. So we do a brute force search
7010 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7011 # to be fixed as part of the make/configure rewrite too.
7013 if test "x$exec_prefix" = xNONE; then
7014 if test "x$prefix" = xNONE; then
7015 test_prefix=/usr/local
7016 else
7017 test_prefix=$prefix
7019 else
7020 test_prefix=$exec_prefix
7023 # If the loop below does not find an linker, then use whatever
7024 # one we can find in the users's path.
7025 # user's path.
7026 if test "x$program_prefix" != xNONE; then
7027 gcc_cv_ld=${program_prefix}ld$host_exeext
7028 else
7029 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7032 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7033 $test_prefix/lib/gcc-lib/$target_alias \
7034 /usr/lib/gcc/$target_alias/$gcc_version \
7035 /usr/lib/gcc/$target_alias \
7036 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7037 $test_prefix/$target_alias/bin"
7039 if test x$host = x$target; then
7040 test_dirs="$test_dirs \
7041 /usr/libexec \
7042 /usr/ccs/gcc \
7043 /usr/ccs/bin \
7044 /udk/usr/ccs/bin \
7045 /bsd43/usr/lib/cmplrs/cc \
7046 /usr/cross64/usr/bin \
7047 /usr/lib/cmplrs/cc \
7048 /sysv/usr/lib/cmplrs/cc \
7049 /svr4/usr/lib/cmplrs/cc \
7050 /usr/bin"
7053 for dir in $test_dirs; do
7054 if test -x $dir/ld$host_exeext; then
7055 gcc_cv_ld=$dir/ld$host_exeext
7056 break;
7058 done
7060 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7061 echo "$ac_t"""newly built ld"" 1>&6
7062 else
7063 echo "$ac_t""$gcc_cv_ld" 1>&6
7066 # Figure out what nm we will be using.
7067 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7068 echo "configure:7069: checking what nm to use" >&5
7069 if test -x nm$host_exeext; then
7070 gcc_cv_nm=./nm$host_exeext
7071 elif test "x$program_prefix" != xNONE; then
7072 gcc_cv_nm=${program_prefix}nm$host_exeext
7073 else
7074 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7076 echo "$ac_t""$gcc_cv_nm" 1>&6
7078 # Figure out what objdump we will be using.
7079 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7080 echo "configure:7081: checking what objdump to use" >&5
7081 if test -x objdump$host_exeext; then
7082 gcc_cv_objdump=./objdump$host_exeext
7083 elif test "x$program_prefix" != xNONE; then
7084 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7085 else
7086 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7088 echo "$ac_t""$gcc_cv_objdump" 1>&6
7090 # Figure out what assembler alignment features are present.
7091 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7092 echo "configure:7093: checking assembler alignment features" >&5
7093 gcc_cv_as_alignment_features=none
7094 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7095 # Gas version 2.6 and later support for .balign and .p2align.
7096 # bytes to skip when using .p2align.
7097 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
7098 gcc_cv_as_alignment_features=".balign and .p2align"
7099 cat >> confdefs.h <<\EOF
7100 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7104 # Gas version 2.8 and later support specifying the maximum
7105 # bytes to skip when using .p2align.
7106 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
7107 gcc_cv_as_alignment_features=".p2align including maximum skip"
7108 cat >> confdefs.h <<\EOF
7109 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7113 elif test x$gcc_cv_as != x; then
7114 # Check if we have .balign and .p2align
7115 echo ".balign 4" > conftest.s
7116 echo ".p2align 2" >> conftest.s
7117 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7118 gcc_cv_as_alignment_features=".balign and .p2align"
7119 cat >> confdefs.h <<\EOF
7120 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7124 rm -f conftest.s conftest.o
7125 # Check if specifying the maximum bytes to skip when
7126 # using .p2align is supported.
7127 echo ".p2align 4,,7" > conftest.s
7128 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7129 gcc_cv_as_alignment_features=".p2align including maximum skip"
7130 cat >> confdefs.h <<\EOF
7131 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7135 rm -f conftest.s conftest.o
7137 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7139 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7140 echo "configure:7141: checking assembler subsection support" >&5
7141 gcc_cv_as_subsections=no
7142 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7143 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
7144 gcc_cv_as_subsections="working .subsection -1"
7146 elif test x$gcc_cv_as != x; then
7147 # Check if we have .subsection
7148 echo ".subsection 1" > conftest.s
7149 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7150 gcc_cv_as_subsections=".subsection"
7151 if test x$gcc_cv_nm != x; then
7152 cat > conftest.s <<EOF
7153 conftest_label1: .word 0
7154 .subsection -1
7155 conftest_label2: .word 0
7156 .previous
7158 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7159 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7160 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7161 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7163 else
7164 gcc_cv_as_subsections="working .subsection -1"
7169 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7171 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7172 cat >> confdefs.h <<\EOF
7173 #define HAVE_GAS_SUBSECTION_ORDERING 1
7177 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7179 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7180 echo "configure:7181: checking assembler weak support" >&5
7181 gcc_cv_as_weak=no
7182 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7183 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
7184 gcc_cv_as_weak="yes"
7186 elif test x$gcc_cv_as != x; then
7187 # Check if we have .weak
7188 echo " .weak foobar" > conftest.s
7189 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7190 gcc_cv_as_weak="yes"
7192 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7194 if test x"$gcc_cv_as_weak" = xyes; then
7195 cat >> confdefs.h <<\EOF
7196 #define HAVE_GAS_WEAK 1
7200 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7202 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7203 echo "configure:7204: checking assembler hidden support" >&5
7204 gcc_cv_as_hidden=no
7205 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7206 if test "$gcc_cv_gas_major_version" -eq 2 \
7207 -a "$gcc_cv_gas_minor_version" -eq 12 \
7208 -a "$gcc_cv_gas_patch_version" -ge 1 \
7209 -o "$gcc_cv_gas_major_version" -eq 2 \
7210 -a "$gcc_cv_gas_minor_version" -gt 12 \
7211 -o "$gcc_cv_gas_major_version" -gt 2 \
7212 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7213 gcc_cv_as_hidden="yes"
7215 elif test x$gcc_cv_as != x; then
7216 # Check if we have .hidden
7217 echo " .hidden foobar" > conftest.s
7218 echo "foobar:" >> conftest.s
7219 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7220 gcc_cv_as_hidden="yes"
7222 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7224 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7225 # This is irritatingly difficult to feature test for. Look for
7226 # the date string after the version number.
7227 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7228 if echo "$ld_ver" | grep GNU > /dev/null; then
7229 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7230 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'`
7231 if test 0"$ld_date" -lt 20020404; then
7232 if test -n "$ld_date"; then
7233 # If there was date string, but was earlier than 2002-04-04, fail
7234 gcc_cv_as_hidden="no"
7235 elif test -z "$ld_vers"; then
7236 # If there was no date string nor ld version number, something is wrong
7237 gcc_cv_as_hidden="no"
7238 else
7239 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7240 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7241 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7242 test -z "$ld_vers_patch" && ld_vers_patch=0
7243 if test "$ld_vers_major" -lt 2; then
7244 gcc_cv_as_hidden="no"
7245 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7246 gcc_cv_as_hidden="no"
7247 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7248 -a "$ld_vers_patch" -eq 0; then
7249 gcc_cv_as_hidden="no"
7255 if test x"$gcc_cv_as_hidden" = xyes; then
7256 cat >> confdefs.h <<\EOF
7257 #define HAVE_GAS_HIDDEN 1
7261 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7262 libgcc_visibility=$gcc_cv_as_hidden
7265 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7266 echo "configure:7267: checking assembler leb128 support" >&5
7267 gcc_cv_as_leb128=no
7268 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7269 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
7270 gcc_cv_as_leb128="yes"
7272 elif test x$gcc_cv_as != x; then
7273 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7274 cat > conftest.s <<EOF
7275 .data
7276 .uleb128 L2 - L1
7278 .uleb128 1280
7279 .sleb128 -1010
7282 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7283 gcc_cv_as_leb128="yes"
7285 # GAS versions before 2.11 do not support uleb128,
7286 # despite appearing to.
7287 # ??? There exists an elf-specific test that will crash
7288 # the assembler. Perhaps it's better to figure out whether
7289 # arbitrary sections are supported and try the test.
7290 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7291 if echo "$as_ver" | grep GNU > /dev/null; then
7292 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7293 as_major=`echo $as_ver | sed 's/\..*//'`
7294 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7295 if test $as_major -eq 2 -a $as_minor -lt 11; then
7296 gcc_cv_as_leb128="no"
7300 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7302 if test x"$gcc_cv_as_leb128" = xyes; then
7303 cat >> confdefs.h <<\EOF
7304 #define HAVE_AS_LEB128 1
7308 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7310 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7311 echo "configure:7312: checking assembler eh_frame optimization" >&5
7312 gcc_cv_as_eh_frame=no
7313 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7314 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
7315 gcc_cv_as_eh_frame="yes"
7317 elif test x$gcc_cv_as != x; then
7318 # Check if this is GAS.
7319 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7320 rm -f a.out 2> /dev/null
7321 if echo "$as_ver" | grep GNU > /dev/null; then
7322 # Versions up to and including 2.11.0 may mis-optimize
7323 # .eh_frame data. Try something.
7324 cat > conftest.s <<EOF
7325 .text
7326 .LFB1:
7327 .4byte 0
7328 .L1:
7329 .4byte 0
7330 .LFE1:
7331 .section .eh_frame,"aw",@progbits
7332 __FRAME_BEGIN__:
7333 .4byte .LECIE1-.LSCIE1
7334 .LSCIE1:
7335 .4byte 0x0
7336 .byte 0x1
7337 .ascii "z\0"
7338 .byte 0x1
7339 .byte 0x78
7340 .byte 0x1a
7341 .byte 0x0
7342 .byte 0x4
7343 .4byte 1
7344 .p2align 1
7345 .LECIE1:
7346 .LSFDE1:
7347 .4byte .LEFDE1-.LASFDE1
7348 .LASFDE1:
7349 .4byte .LASFDE1-__FRAME_BEGIN__
7350 .4byte .LFB1
7351 .4byte .LFE1-.LFB1
7352 .byte 0x4
7353 .4byte .LFE1-.LFB1
7354 .byte 0x4
7355 .4byte .L1-.LFB1
7356 .LEFDE1:
7358 cat > conftest.lit <<EOF
7359 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7360 0010 01000000 12000000 18000000 00000000 ................
7361 0020 08000000 04080000 0044 .........D
7363 cat > conftest.big <<EOF
7364 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7365 0010 00000001 00000012 00000018 00000000 ................
7366 0020 00000008 04000000 0844 .........D
7368 # If the assembler didn't choke, and we can objdump,
7369 # and we got the correct data, then succeed.
7370 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7371 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7372 | tail -3 > conftest.got \
7373 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7374 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7375 then
7376 gcc_cv_as_eh_frame="yes"
7377 else
7378 gcc_cv_as_eh_frame="bad"
7379 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7380 cat >> confdefs.h <<\EOF
7381 #define USE_AS_TRADITIONAL_FORMAT 1
7387 rm -f conftest.*
7389 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7391 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7392 echo "configure:7393: checking assembler section merging support" >&5
7393 gcc_cv_as_shf_merge=no
7394 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7395 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
7396 gcc_cv_as_shf_merge=yes
7398 elif test x$gcc_cv_as != x; then
7399 # Check if we support SHF_MERGE sections
7400 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7401 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7402 gcc_cv_as_shf_merge=yes
7404 rm -f conftest.s conftest.o
7406 if test x"$gcc_cv_as_shf_merge" = xyes; then
7407 cat >> confdefs.h <<\EOF
7408 #define HAVE_GAS_SHF_MERGE 1
7412 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7414 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7415 echo "configure:7416: checking assembler thread-local storage support" >&5
7416 gcc_cv_as_tls=no
7417 conftest_s=
7418 tls_first_major=
7419 tls_first_minor=
7420 case "$target" in
7421 alpha*-*-*)
7422 conftest_s='
7423 .section ".tdata","awT",@progbits
7424 foo: .long 25
7425 .text
7426 ldq $27,__tls_get_addr($29) !literal!1
7427 lda $16,foo($29) !tlsgd!1
7428 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7429 ldq $27,__tls_get_addr($29) !literal!2
7430 lda $16,foo($29) !tlsldm!2
7431 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7432 ldq $1,foo($29) !gotdtprel
7433 ldah $2,foo($29) !dtprelhi
7434 lda $3,foo($2) !dtprello
7435 lda $4,foo($29) !dtprel
7436 ldq $1,foo($29) !gottprel
7437 ldah $2,foo($29) !tprelhi
7438 lda $3,foo($2) !tprello
7439 lda $4,foo($29) !tprel'
7440 tls_first_major=2
7441 tls_first_minor=13
7443 i[34567]86-*-*)
7444 conftest_s='
7445 .section ".tdata","awT",@progbits
7446 foo: .long 25
7447 .text
7448 movl %gs:0, %eax
7449 leal foo@TLSGD(,%ebx,1), %eax
7450 leal foo@TLSLDM(%ebx), %eax
7451 leal foo@DTPOFF(%eax), %edx
7452 movl foo@GOTTPOFF(%ebx), %eax
7453 subl foo@GOTTPOFF(%ebx), %eax
7454 movl $foo@TPOFF, %eax
7455 subl $foo@TPOFF, %eax
7456 leal foo@NTPOFF(%ecx), %eax'
7457 tls_first_major=2
7458 tls_first_minor=13
7460 ia64-*-*)
7461 conftest_s='
7462 .section ".tdata","awT",@progbits
7463 foo: data8 25
7464 .text
7465 addl r16 = @ltoff(@dtpmod(foo#)), gp
7466 addl r17 = @ltoff(@dtprel(foo#)), gp
7467 addl r18 = @ltoff(@tprel(foo#)), gp
7468 addl r19 = @dtprel(foo#), gp
7469 adds r21 = @dtprel(foo#), r13
7470 movl r23 = @dtprel(foo#)
7471 addl r20 = @tprel(foo#), gp
7472 adds r22 = @tprel(foo#), r13
7473 movl r24 = @tprel(foo#)'
7474 tls_first_major=2
7475 tls_first_minor=13
7477 esac
7478 if test -z "$tls_first_major"; then
7480 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7481 then
7482 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7483 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7484 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7485 gcc_cv_as_tls=yes
7487 elif test x$gcc_cv_as != x; then
7488 echo "$conftest_s" > conftest.s
7489 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7490 then
7491 gcc_cv_as_tls=yes
7493 rm -f conftest.s conftest.o
7495 if test "$gcc_cv_as_tls" = yes; then
7496 cat >> confdefs.h <<\EOF
7497 #define HAVE_AS_TLS 1
7501 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7503 case "$target" in
7504 # All TARGET_ABI_OSF targets.
7505 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7506 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7507 echo "configure:7508: checking assembler supports explicit relocations" >&5
7508 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7509 echo $ac_n "(cached) $ac_c" 1>&6
7510 else
7512 gcc_cv_as_explicit_relocs=unknown
7513 if test x$gcc_cv_gas_major_version != x \
7514 -a x$gcc_cv_gas_minor_version != x
7515 then
7516 if test "$gcc_cv_gas_major_version" -eq 2 \
7517 -a "$gcc_cv_gas_minor_version" -ge 12 \
7518 -o "$gcc_cv_gas_major_version" -gt 2; then
7519 gcc_cv_as_explicit_relocs=yes
7521 elif test x$gcc_cv_as != x; then
7522 cat > conftest.s << 'EOF'
7523 .set nomacro
7524 .text
7525 extbl $3, $2, $3 !lituse_bytoff!1
7526 ldq $2, a($29) !literal!1
7527 ldq $4, b($29) !literal!2
7528 ldq_u $3, 0($2) !lituse_base!1
7529 ldq $27, f($29) !literal!5
7530 jsr $26, ($27), f !lituse_jsr!5
7531 ldah $29, 0($26) !gpdisp!3
7532 lda $0, c($29) !gprel
7533 ldah $1, d($29) !gprelhigh
7534 lda $1, d($1) !gprellow
7535 lda $29, 0($29) !gpdisp!3
7537 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7538 gcc_cv_as_explicit_relocs=yes
7539 else
7540 gcc_cv_as_explicit_relocs=no
7542 rm -f conftest.s conftest.o
7547 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7548 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7549 cat >> confdefs.h <<\EOF
7550 #define HAVE_AS_EXPLICIT_RELOCS 1
7555 sparc*-*-*)
7556 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7557 echo "configure:7558: checking assembler .register pseudo-op support" >&5
7558 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7559 echo $ac_n "(cached) $ac_c" 1>&6
7560 else
7562 gcc_cv_as_register_pseudo_op=unknown
7563 if test x$gcc_cv_as != x; then
7564 # Check if we have .register
7565 echo ".register %g2, #scratch" > conftest.s
7566 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7567 gcc_cv_as_register_pseudo_op=yes
7568 else
7569 gcc_cv_as_register_pseudo_op=no
7571 rm -f conftest.s conftest.o
7576 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7577 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7578 cat >> confdefs.h <<\EOF
7579 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7584 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7585 echo "configure:7586: checking assembler supports -relax" >&5
7586 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7587 echo $ac_n "(cached) $ac_c" 1>&6
7588 else
7590 gcc_cv_as_relax_opt=unknown
7591 if test x$gcc_cv_as != x; then
7592 # Check if gas supports -relax
7593 echo ".text" > conftest.s
7594 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7595 gcc_cv_as_relax_opt=yes
7596 else
7597 gcc_cv_as_relax_opt=no
7599 rm -f conftest.s conftest.o
7604 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7605 if test "x$gcc_cv_as_relax_opt" = xyes; then
7606 cat >> confdefs.h <<\EOF
7607 #define HAVE_AS_RELAX_OPTION 1
7612 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7613 echo "configure:7614: checking assembler and linker support unaligned pc related relocs" >&5
7614 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7615 echo $ac_n "(cached) $ac_c" 1>&6
7616 else
7618 gcc_cv_as_sparc_ua_pcrel=unknown
7619 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7620 gcc_cv_as_sparc_ua_pcrel=no
7621 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7622 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7623 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7624 gcc_cv_as_sparc_ua_pcrel=yes
7626 rm -f conftest.s conftest.o conftest
7631 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7632 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7633 cat >> confdefs.h <<\EOF
7634 #define HAVE_AS_SPARC_UA_PCREL 1
7639 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7640 echo "configure:7641: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7641 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7642 echo $ac_n "(cached) $ac_c" 1>&6
7643 else
7645 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7646 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7647 if test x$gcc_cv_objdump != x; then
7648 gcc_cv_as_sparc_ua_pcrel_hidden=no
7649 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7650 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7651 echo "foo: .skip 4" >> conftest.s
7652 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7653 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7654 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7655 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7656 if $gcc_cv_objdump -R conftest 2> /dev/null \
7657 | grep 'DISP32' > /dev/null 2>&1; then
7659 else
7660 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7664 rm -f conftest.s conftest.o conftest
7665 else
7666 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7671 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7672 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7673 cat >> confdefs.h <<\EOF
7674 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7679 if test "x$gcc_cv_as_flags64" != xno; then
7680 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7681 echo "configure:7682: checking for assembler offsetable %lo() support" >&5
7682 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7683 echo $ac_n "(cached) $ac_c" 1>&6
7684 else
7686 gcc_cv_as_offsetable_lo10=unknown
7687 if test "x$gcc_cv_as" != x; then
7688 # Check if assembler has offsetable %lo()
7689 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7690 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7691 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7692 > /dev/null 2>&1 &&
7693 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7694 > /dev/null 2>&1; then
7695 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7696 gcc_cv_as_offsetable_lo10=no
7697 else
7698 gcc_cv_as_offsetable_lo10=yes
7700 else
7701 gcc_cv_as_offsetable_lo10=no
7703 rm -f conftest.s conftest.o conftest1.s conftest1.o
7708 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7709 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7710 cat >> confdefs.h <<\EOF
7711 #define HAVE_AS_OFFSETABLE_LO10 1
7719 i[34567]86-*-* | x86_64-*-*)
7720 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7721 echo "configure:7722: checking assembler instructions" >&5
7722 gcc_cv_as_instructions=
7723 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7724 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
7725 gcc_cv_as_instructions="filds fists"
7727 elif test x$gcc_cv_as != x; then
7728 set "filds fists" "filds mem; fists mem"
7729 while test $# -gt 0
7731 echo "$2" > conftest.s
7732 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7733 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7735 shift 2
7736 done
7737 rm -f conftest.s conftest.o
7739 if test x"$gcc_cv_as_instructions" != x; then
7740 cat >> confdefs.h <<EOF
7741 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7745 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7747 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7748 echo "configure:7749: checking assembler GOTOFF in data directives" >&5
7749 gcc_cv_as_gotoff_in_data=no
7750 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7751 then
7752 if test "$gcc_cv_gas_major_version" -eq 2 \
7753 -a "$gcc_cv_gas_minor_version" -ge 11 \
7754 -o "$gcc_cv_gas_major_version" -gt 2; then
7755 gcc_cv_as_gotoff_in_data=yes
7757 elif test x$gcc_cv_as != x; then
7758 cat > conftest.s <<EOF
7759 .text
7760 .L0:
7762 .data
7763 .long .L0@GOTOFF
7765 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7766 gcc_cv_as_gotoff_in_data=yes
7769 cat >> confdefs.h <<EOF
7770 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7773 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7775 esac
7777 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7778 echo "configure:7779: checking assembler dwarf2 debug_line support" >&5
7779 gcc_cv_as_dwarf2_debug_line=no
7780 # ??? Not all targets support dwarf2 debug_line, even within a version
7781 # of gas. Moreover, we need to emit a valid instruction to trigger any
7782 # info to the output file. So, as supported targets are added to gas 2.11,
7783 # add some instruction here to (also) show we expect this might work.
7784 # ??? Once 2.11 is released, probably need to add first known working
7785 # version to the per-target configury.
7786 case "$target" in
7787 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
7788 insn="nop"
7790 ia64*-*-*)
7791 insn="nop 0"
7793 esac
7794 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7795 then
7796 if test "$gcc_cv_gas_major_version" -eq 2 \
7797 -a "$gcc_cv_gas_minor_version" -ge 11 \
7798 -o "$gcc_cv_gas_major_version" -gt 2 \
7799 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7800 && test x"$insn" != x ; then
7801 gcc_cv_as_dwarf2_debug_line="yes"
7803 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7804 echo ' .file 1 "conftest.s"' > conftest.s
7805 echo ' .loc 1 3 0' >> conftest.s
7806 echo " $insn" >> conftest.s
7807 # ??? This fails with non-gnu grep.
7808 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7809 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7810 # The .debug_line file table must be in the exact order that
7811 # we specified the files, since these indices are also used
7812 # by DW_AT_decl_file. Approximate this test by testing if
7813 # the assembler bitches if the same index is assigned twice.
7814 echo ' .file 1 "foo.s"' > conftest.s
7815 echo ' .file 1 "bar.s"' >> conftest.s
7816 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7817 then
7818 gcc_cv_as_dwarf2_debug_line="no"
7819 else
7820 gcc_cv_as_dwarf2_debug_line="yes"
7823 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7825 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7826 cat >> confdefs.h <<\EOF
7827 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7831 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7833 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7834 echo "configure:7835: checking assembler --gdwarf2 support" >&5
7835 gcc_cv_as_gdwarf2_flag=no
7836 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7837 then
7838 if test "$gcc_cv_gas_major_version" -eq 2 \
7839 -a "$gcc_cv_gas_minor_version" -ge 11 \
7840 -o "$gcc_cv_gas_major_version" -gt 2 \
7841 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7842 && test x"$insn" != x ; then
7843 gcc_cv_as_gdwarf2_debug_flag="yes"
7845 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7846 echo '' > conftest.s
7847 # ??? This fails with non-gnu grep.
7848 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7849 then
7850 gcc_cv_as_gdwarf2_flag="yes"
7852 rm -f conftest.s conftest.o
7854 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7855 cat >> confdefs.h <<\EOF
7856 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7860 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7862 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7863 echo "configure:7864: checking assembler --gstabs support" >&5
7864 gcc_cv_as_gstabs_flag=no
7865 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7866 then
7867 if test "$gcc_cv_gas_major_version" -eq 2 \
7868 -a "$gcc_cv_gas_minor_version" -ge 11 \
7869 -o "$gcc_cv_gas_major_version" -gt 2 \
7870 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7871 && test x"$insn" != x ; then
7872 gcc_cv_as_gstabs_debug_flag="yes"
7874 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7875 echo '' > conftest.s
7876 # ??? This fails with non-gnu grep.
7877 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7878 gcc_cv_as_gstabs_flag="yes"
7880 rm -f conftest.s conftest.o
7882 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7883 cat >> confdefs.h <<\EOF
7884 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7888 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7890 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7891 echo "configure:7892: checking linker PT_GNU_EH_FRAME support" >&5
7892 gcc_cv_ld_eh_frame_hdr=no
7893 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7894 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
7895 gcc_cv_ld_eh_frame_hdr=yes
7897 elif test x$gcc_cv_ld != x; then
7898 # Check if linker supports --eh-frame-hdr option
7899 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7900 gcc_cv_ld_eh_frame_hdr=yes
7903 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7904 cat >> confdefs.h <<\EOF
7905 #define HAVE_LD_EH_FRAME_HDR 1
7909 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7911 if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7912 cat >> confdefs.h <<EOF
7913 #define PREFIX_INCLUDE_DIR "$prefix/include"
7918 # Figure out what language subdirectories are present.
7919 # Look if the user specified --enable-languages="..."; if not, use
7920 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7921 # go away some day.
7922 # NB: embedded tabs in this IF block -- do not untabify
7923 if test x"${enable_languages+set}" != xset; then
7924 if test x"${LANGUAGES+set}" = xset; then
7925 enable_languages="${LANGUAGES}"
7926 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7928 else
7929 enable_languages=all
7931 else
7932 if test x"${enable_languages}" = x;
7933 then
7934 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7937 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
7939 # First scan to see if an enabled language requires some other language.
7940 # We assume that a given config-lang.in will list all the language
7941 # front ends it requires, even if some are required indirectly.
7942 for lang in ${srcdir}/*/config-lang.in ..
7944 case $lang in
7947 # The odd quoting in the next line works around
7948 # an apparent bug in bash 1.12 on linux.
7949 ${srcdir}/[*]/config-lang.in)
7952 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7953 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
7954 for other in $this_lang_requires
7956 case ,${enable_languages}, in
7957 *,$other,*)
7959 *,all,*)
7961 *,$lang_alias,*)
7962 enable_languages="$enable_languages,$other"
7964 esac
7965 done
7967 esac
7968 done
7970 remaining_languages=${enable_languages}
7971 subdirs=
7972 for lang in ${srcdir}/*/config-lang.in ..
7974 case $lang in
7975 ..) ;;
7976 # The odd quoting in the next line works around
7977 # an apparent bug in bash 1.12 on linux.
7978 ${srcdir}/[*]/config-lang.in) ;;
7980 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7981 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
7982 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
7983 if test "x$lang_alias" = x
7984 then
7985 echo "$lang doesn't set \$language." 1>&2
7986 exit 1
7988 case ${build_by_default},${enable_languages}, in
7989 *,$lang_alias,*) add_this_lang=yes ;;
7990 no,*) add_this_lang=no ;;
7991 *,all,*) add_this_lang=yes ;;
7992 *) add_this_lang=no ;;
7993 esac
7994 if test x"${add_this_lang}" = xyes; then
7995 remaining_languages=`echo $remaining_languages | sed -e s/${lang_alias}//g`
7996 case $lang in
7997 ${srcdir}/ada/config-lang.in)
7998 if test x$have_gnat = xyes ; then
7999 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8003 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8005 esac
8008 esac
8009 done
8011 remaining_languages_check=`echo $remaining_languages | sed -e 's/,//g' -e 's/^c$//'g`
8012 if test "xxx$remaining_languages_check" != "xxx" -a "xxx$remaining_languages_check" != "xxxall" ; then
8013 remaining_languages_clean=`echo $remaining_languages | sed -e 's/^c,//' -e 's/,c,/,/' -e 's/,c$//' -e 's/^c$//' -e 's/,,*/,/g' -e 's/^,//g' -e 's/,$//g' `
8014 echo "Language alias(es) not found: $remaining_languages_clean"
8015 echo "Refer to the configure instructions in the doc directory"
8016 exit 1
8019 # Make gthr-default.h if we have a thread file.
8020 gthread_flags=
8021 if test $thread_file != single; then
8022 rm -f gthr-default.h
8023 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8024 gthread_flags=-DHAVE_GTHR_DEFAULT
8028 # Find out what GC implementation we want, or may, use.
8029 # Check whether --with-gc or --without-gc was given.
8030 if test "${with_gc+set}" = set; then
8031 withval="$with_gc"
8032 case "$withval" in
8033 simple | page)
8034 GGC=ggc-$withval
8037 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8039 esac
8040 else
8041 GGC=ggc-page
8045 echo "Using $GGC for garbage collection."
8047 # Use the system's zlib library.
8048 zlibdir=-L../zlib
8049 zlibinc="-I\$(srcdir)/../zlib"
8050 # Check whether --with-system-zlib or --without-system-zlib was given.
8051 if test "${with_system_zlib+set}" = set; then
8052 withval="$with_system_zlib"
8053 zlibdir=
8054 zlibinc=
8062 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8063 echo "configure:8064: checking whether to enable maintainer-specific portions of Makefiles" >&5
8064 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8065 if test "${enable_maintainer_mode+set}" = set; then
8066 enableval="$enable_maintainer_mode"
8067 maintainer_mode=$enableval
8068 else
8069 maintainer_mode=no
8073 echo "$ac_t""$maintainer_mode" 1>&6
8075 if test "$maintainer_mode" = "yes"; then
8076 MAINT=''
8077 else
8078 MAINT='#'
8081 # With Setjmp/Longjmp based exception handling.
8082 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8083 if test "${enable_sjlj_exceptions+set}" = set; then
8084 enableval="$enable_sjlj_exceptions"
8085 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
8086 cat >> confdefs.h <<EOF
8087 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
8093 # Use libunwind based exception handling.
8094 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8095 if test "${enable_libunwind_exceptions+set}" = set; then
8096 enableval="$enable_libunwind_exceptions"
8097 use_libunwind_exceptions=$enableval
8098 else
8099 use_libunwind_exceptions=no
8102 if test x"$use_libunwind_exceptions" = xyes; then
8103 cat >> confdefs.h <<\EOF
8104 #define USE_LIBUNWIND_EXCEPTIONS 1
8109 # Make empty files to contain the specs and options for each language.
8110 # Then add #include lines to for a compiler that has specs and/or options.
8112 lang_specs_files=
8113 lang_options_files=
8114 lang_tree_files=
8115 for subdir in . $subdirs
8117 if test -f $srcdir/$subdir/lang-specs.h; then
8118 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8120 if test -f $srcdir/$subdir/lang-options.h; then
8121 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8123 if test -f $srcdir/$subdir/$subdir-tree.def; then
8124 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8126 done
8128 # These (without "all_") are set in each config-lang.in.
8129 # `language' must be a single word so is spelled singularly.
8130 all_languages=
8131 all_boot_languages=
8132 all_compilers=
8133 all_stagestuff=
8134 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8135 # List of language makefile fragments.
8136 all_lang_makefiles=
8137 # Files for gengtype
8138 all_gtfiles="$config_gtfiles"
8140 # Add the language fragments.
8141 # Languages are added via two mechanisms. Some information must be
8142 # recorded in makefile variables, these are defined in config-lang.in.
8143 # We accumulate them and plug them into the main Makefile.
8144 # The other mechanism is a set of hooks for each of the main targets
8145 # like `clean', `install', etc.
8147 language_fragments="Make-lang"
8148 language_hooks="Make-hooks"
8150 for s in .. $subdirs
8152 if test $s != ".."
8153 then
8154 language=
8155 boot_language=
8156 compilers=
8157 stagestuff=
8158 outputs=
8159 gtfiles=
8160 . ${srcdir}/$s/config-lang.in
8161 if test "x$language" = x
8162 then
8163 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8164 exit 1
8166 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8167 if test -f ${srcdir}/$s/Makefile.in
8168 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8170 all_languages="$all_languages $language"
8171 if test "x$boot_language" = xyes
8172 then
8173 all_boot_languages="$all_boot_languages $language"
8175 all_compilers="$all_compilers $compilers"
8176 all_stagestuff="$all_stagestuff $stagestuff"
8177 all_outputs="$all_outputs $outputs"
8178 all_gtfiles="$all_gtfiles $gtfiles"
8180 done
8182 check_languages=
8183 for language in .. $all_languages
8185 if test $language != ".."
8186 then
8187 check_languages="$check_languages check-$language"
8189 done
8191 # Since we can't use `::' targets, we link each language in
8192 # with a set of hooks, reached indirectly via lang.${target}.
8194 rm -f Make-hooks
8195 touch Make-hooks
8196 target_list="all.build all.cross start.encap rest.encap \
8197 info dvi generated-manpages \
8198 install-normal install-common install-info install-man \
8199 uninstall \
8200 mostlyclean clean distclean extraclean maintainer-clean \
8201 stage1 stage2 stage3 stage4"
8202 for t in $target_list
8205 for lang in .. $all_languages
8207 if test $lang != ".."; then
8208 x="$x $lang.$t"
8210 done
8211 echo "lang.$t: $x" >> Make-hooks
8212 done
8214 # Create .gdbinit.
8216 echo "dir ." > .gdbinit
8217 echo "dir ${srcdir}" >> .gdbinit
8218 if test x$gdb_needs_out_file_path = xyes
8219 then
8220 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8222 if test "x$subdirs" != x; then
8223 for s in $subdirs
8225 echo "dir ${srcdir}/$s" >> .gdbinit
8226 done
8228 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8230 # Define variables host_canonical and build_canonical
8231 # because some Cygnus local changes in the Makefile depend on them.
8232 build_canonical=${build}
8233 host_canonical=${host}
8234 target_subdir=
8235 if test "${host}" != "${target}" ; then
8236 target_subdir=${target_alias}/
8242 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8243 # absolute path for gcc_tooldir based on inserting the number of up-directory
8244 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8245 # $(libsubdir)/@(unlibsubdir) based path.
8246 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8247 # make and thus we'd get different behavior depending on where we built the
8248 # sources.
8249 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8250 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8251 else
8252 # An explanation of the sed strings:
8253 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8254 # -e 's|/$||' match a trailing forward slash and eliminates it
8255 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8256 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8258 # (*) Note this pattern overwrites the first character of the string
8259 # with a forward slash if one is not already present. This is not a
8260 # problem because the exact names of the sub-directories concerned is
8261 # unimportant, just the number of them matters.
8263 # The practical upshot of these patterns is like this:
8265 # prefix exec_prefix result
8266 # ------ ----------- ------
8267 # /foo /foo/bar ../
8268 # /foo/ /foo/bar ../
8269 # /foo /foo/bar/ ../
8270 # /foo/ /foo/bar/ ../
8271 # /foo /foo/bar/ugg ../../
8273 dollar='$$'
8274 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8279 # Find a directory in which to install a shared libgcc.
8281 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8282 if test "${enable_version_specific_runtime_libs+set}" = set; then
8283 enableval="$enable_version_specific_runtime_libs"
8288 # Check whether --with-slibdir or --without-slibdir was given.
8289 if test "${with_slibdir+set}" = set; then
8290 withval="$with_slibdir"
8291 slibdir="$with_slibdir"
8292 else
8293 if test "${enable_version_specific_runtime_libs+set}" = set; then
8294 slibdir='$(libsubdir)'
8295 elif test "$host" != "$target"; then
8296 slibdir='$(build_tooldir)/lib'
8297 else
8298 slibdir='$(libdir)'
8304 # Nothing to do for FLOAT_H, float_format already handled.
8305 objdir=`${PWDCMD-pwd}`
8308 # Process the language and host/target makefile fragments.
8309 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8311 # Substitute configuration variables
8377 # Echo that links are built
8378 if test x$host = x$target
8379 then
8380 str1="native "
8381 else
8382 str1="cross-"
8383 str2=" from $host"
8386 if test x$host != x$build
8387 then
8388 str3=" on a $build system"
8391 if test "x$str2" != x || test "x$str3" != x
8392 then
8393 str4=
8396 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8398 if test "x$str2" != x || test "x$str3" != x
8399 then
8400 echo " ${str2}${str3}." 1>&2
8403 # Truncate the target if necessary
8404 if test x$host_truncate_target != x; then
8405 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8408 # Configure the subdirectories
8409 # AC_CONFIG_SUBDIRS($subdirs)
8411 # Create the Makefile
8412 # and configure language subdirectories
8413 trap '' 1 2 15
8414 cat > confcache <<\EOF
8415 # This file is a shell script that caches the results of configure
8416 # tests run on this system so they can be shared between configure
8417 # scripts and configure runs. It is not useful on other systems.
8418 # If it contains results you don't want to keep, you may remove or edit it.
8420 # By default, configure uses ./config.cache as the cache file,
8421 # creating it if it does not exist already. You can give configure
8422 # the --cache-file=FILE option to use a different cache file; that is
8423 # what configure does when it calls configure scripts in
8424 # subdirectories, so they share the cache.
8425 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8426 # config.status only pays attention to the cache file if you give it the
8427 # --recheck option to rerun configure.
8430 # The following way of writing the cache mishandles newlines in values,
8431 # but we know of no workaround that is simple, portable, and efficient.
8432 # So, don't put newlines in cache variables' values.
8433 # Ultrix sh set writes to stderr and can't be redirected directly,
8434 # and sets the high bit in the cache file unless we assign to the vars.
8435 (set) 2>&1 |
8436 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8437 *ac_space=\ *)
8438 # `set' does not quote correctly, so add quotes (double-quote substitution
8439 # turns \\\\ into \\, and sed turns \\ into \).
8440 sed -n \
8441 -e "s/'/'\\\\''/g" \
8442 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8445 # `set' quotes correctly as required by POSIX, so do not add quotes.
8446 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8448 esac >> confcache
8449 if cmp -s $cache_file confcache; then
8451 else
8452 if test -w $cache_file; then
8453 echo "updating cache $cache_file"
8454 cat confcache > $cache_file
8455 else
8456 echo "not updating unwritable cache $cache_file"
8459 rm -f confcache
8461 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8463 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8464 # Let make expand exec_prefix.
8465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8467 # Any assignment to VPATH causes Sun make to only execute
8468 # the first set of double-colon rules, so remove it if not needed.
8469 # If there is a colon in the path, we need to keep it.
8470 if test "x$srcdir" = x.; then
8471 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8474 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8476 DEFS=-DHAVE_CONFIG_H
8478 # Without the "./", some shells look in PATH for config.status.
8479 : ${CONFIG_STATUS=./config.status}
8481 echo creating $CONFIG_STATUS
8482 rm -f $CONFIG_STATUS
8483 cat > $CONFIG_STATUS <<EOF
8484 #! /bin/sh
8485 # Generated automatically by configure.
8486 # Run this file to recreate the current configuration.
8487 # This directory was configured as follows,
8488 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8490 # $0 $ac_configure_args
8492 # Compiler output produced by configure, useful for debugging
8493 # configure, is in ./config.log if it exists.
8495 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8496 for ac_option
8498 case "\$ac_option" in
8499 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8500 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8501 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8502 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8503 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8504 exit 0 ;;
8505 -help | --help | --hel | --he | --h)
8506 echo "\$ac_cs_usage"; exit 0 ;;
8507 *) echo "\$ac_cs_usage"; exit 1 ;;
8508 esac
8509 done
8511 ac_given_srcdir=$srcdir
8513 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8515 cat >> $CONFIG_STATUS <<EOF
8517 # Protect against being on the right side of a sed subst in config.status.
8518 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8519 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8520 $ac_vpsub
8521 $extrasub
8522 s%@SHELL@%$SHELL%g
8523 s%@CFLAGS@%$CFLAGS%g
8524 s%@CPPFLAGS@%$CPPFLAGS%g
8525 s%@CXXFLAGS@%$CXXFLAGS%g
8526 s%@FFLAGS@%$FFLAGS%g
8527 s%@DEFS@%$DEFS%g
8528 s%@LDFLAGS@%$LDFLAGS%g
8529 s%@LIBS@%$LIBS%g
8530 s%@exec_prefix@%$exec_prefix%g
8531 s%@prefix@%$prefix%g
8532 s%@program_transform_name@%$program_transform_name%g
8533 s%@bindir@%$bindir%g
8534 s%@sbindir@%$sbindir%g
8535 s%@libexecdir@%$libexecdir%g
8536 s%@datadir@%$datadir%g
8537 s%@sysconfdir@%$sysconfdir%g
8538 s%@sharedstatedir@%$sharedstatedir%g
8539 s%@localstatedir@%$localstatedir%g
8540 s%@libdir@%$libdir%g
8541 s%@includedir@%$includedir%g
8542 s%@oldincludedir@%$oldincludedir%g
8543 s%@infodir@%$infodir%g
8544 s%@mandir@%$mandir%g
8545 s%@enable_multilib@%$enable_multilib%g
8546 s%@enable_shared@%$enable_shared%g
8547 s%@host@%$host%g
8548 s%@host_alias@%$host_alias%g
8549 s%@host_cpu@%$host_cpu%g
8550 s%@host_vendor@%$host_vendor%g
8551 s%@host_os@%$host_os%g
8552 s%@target@%$target%g
8553 s%@target_alias@%$target_alias%g
8554 s%@target_cpu@%$target_cpu%g
8555 s%@target_vendor@%$target_vendor%g
8556 s%@target_os@%$target_os%g
8557 s%@build@%$build%g
8558 s%@build_alias@%$build_alias%g
8559 s%@build_cpu@%$build_cpu%g
8560 s%@build_vendor@%$build_vendor%g
8561 s%@build_os@%$build_os%g
8562 s%@CC@%$CC%g
8563 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8564 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8565 s%@GNATBIND@%$GNATBIND%g
8566 s%@ADAC@%$ADAC%g
8567 s%@strict1_warn@%$strict1_warn%g
8568 s%@CPP@%$CPP%g
8569 s%@warn_cflags@%$warn_cflags%g
8570 s%@stage1_cflags@%$stage1_cflags%g
8571 s%@SET_MAKE@%$SET_MAKE%g
8572 s%@AWK@%$AWK%g
8573 s%@LN@%$LN%g
8574 s%@LN_S@%$LN_S%g
8575 s%@RANLIB@%$RANLIB%g
8576 s%@INSTALL@%$INSTALL%g
8577 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8578 s%@INSTALL_DATA@%$INSTALL_DATA%g
8579 s%@have_mktemp_command@%$have_mktemp_command%g
8580 s%@MAKEINFO@%$MAKEINFO%g
8581 s%@BUILD_INFO@%$BUILD_INFO%g
8582 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8583 s%@FLEX@%$FLEX%g
8584 s%@BISON@%$BISON%g
8585 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8586 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8587 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8588 s%@LIBICONV@%$LIBICONV%g
8589 s%@manext@%$manext%g
8590 s%@objext@%$objext%g
8591 s%@extra_modes_file@%$extra_modes_file%g
8592 s%@FORBUILD@%$FORBUILD%g
8593 s%@PACKAGE@%$PACKAGE%g
8594 s%@VERSION@%$VERSION%g
8595 s%@ALLOCA@%$ALLOCA%g
8596 s%@GLIBC21@%$GLIBC21%g
8597 s%@USE_NLS@%$USE_NLS%g
8598 s%@MSGFMT@%$MSGFMT%g
8599 s%@GMSGFMT@%$GMSGFMT%g
8600 s%@XGETTEXT@%$XGETTEXT%g
8601 s%@INTLBISON@%$INTLBISON%g
8602 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8603 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8604 s%@CATALOGS@%$CATALOGS%g
8605 s%@CATOBJEXT@%$CATOBJEXT%g
8606 s%@INTLLIBS@%$INTLLIBS%g
8607 s%@INTLDEPS@%$INTLDEPS%g
8608 s%@INTLOBJS@%$INTLOBJS%g
8609 s%@POSUB@%$POSUB%g
8610 s%@DATADIRNAME@%$DATADIRNAME%g
8611 s%@INSTOBJEXT@%$INSTOBJEXT%g
8612 s%@GENCAT@%$GENCAT%g
8613 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8614 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8615 s%@CROSS@%$CROSS%g
8616 s%@ALL@%$ALL%g
8617 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8618 s%@inhibit_libc@%$inhibit_libc%g
8619 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8620 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8621 s%@HOST_CC@%$HOST_CC%g
8622 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8623 s%@STMP_FIXINC@%$STMP_FIXINC%g
8624 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8625 s%@libgcc_visibility@%$libgcc_visibility%g
8626 s%@gthread_flags@%$gthread_flags%g
8627 s%@GGC@%$GGC%g
8628 s%@zlibdir@%$zlibdir%g
8629 s%@zlibinc@%$zlibinc%g
8630 s%@MAINT@%$MAINT%g
8631 s%@build_canonical@%$build_canonical%g
8632 s%@host_canonical@%$host_canonical%g
8633 s%@target_subdir@%$target_subdir%g
8634 s%@gcc_tooldir@%$gcc_tooldir%g
8635 s%@dollar@%$dollar%g
8636 s%@slibdir@%$slibdir%g
8637 s%@objdir@%$objdir%g
8638 s%@subdirs@%$subdirs%g
8639 s%@all_boot_languages@%$all_boot_languages%g
8640 s%@all_compilers@%$all_compilers%g
8641 s%@all_gtfiles@%$all_gtfiles%g
8642 s%@all_lang_makefiles@%$all_lang_makefiles%g
8643 s%@all_languages@%$all_languages%g
8644 s%@all_stagestuff@%$all_stagestuff%g
8645 s%@build_exeext@%$build_exeext%g
8646 s%@build_install_headers_dir@%$build_install_headers_dir%g
8647 s%@build_xm_file_list@%$build_xm_file_list%g
8648 s%@build_xm_file@%$build_xm_file%g
8649 s%@build_xm_defines@%$build_xm_defines%g
8650 s%@check_languages@%$check_languages%g
8651 s%@cc_set_by_configure@%$cc_set_by_configure%g
8652 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8653 s%@cpp_install_dir@%$cpp_install_dir%g
8654 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8655 s%@dep_tmake_file@%$dep_tmake_file%g
8656 s%@extra_headers_list@%$extra_headers_list%g
8657 s%@extra_objs@%$extra_objs%g
8658 s%@extra_parts@%$extra_parts%g
8659 s%@extra_passes@%$extra_passes%g
8660 s%@extra_programs@%$extra_programs%g
8661 s%@float_h_file@%$float_h_file%g
8662 s%@gcc_config_arguments@%$gcc_config_arguments%g
8663 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8664 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8665 s%@gcc_version@%$gcc_version%g
8666 s%@gcc_version_full@%$gcc_version_full%g
8667 s%@gcc_version_trigger@%$gcc_version_trigger%g
8668 s%@host_exeext@%$host_exeext%g
8669 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8670 s%@host_xm_file_list@%$host_xm_file_list%g
8671 s%@host_xm_file@%$host_xm_file%g
8672 s%@host_xm_defines@%$host_xm_defines%g
8673 s%@install@%$install%g
8674 s%@lang_options_files@%$lang_options_files%g
8675 s%@lang_specs_files@%$lang_specs_files%g
8676 s%@lang_tree_files@%$lang_tree_files%g
8677 s%@local_prefix@%$local_prefix%g
8678 s%@md_file@%$md_file%g
8679 s%@objc_boehm_gc@%$objc_boehm_gc%g
8680 s%@out_file@%$out_file%g
8681 s%@out_object_file@%$out_object_file%g
8682 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8683 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8684 s%@symbolic_link@%$symbolic_link%g
8685 s%@thread_file@%$thread_file%g
8686 s%@tm_file_list@%$tm_file_list%g
8687 s%@tm_file@%$tm_file%g
8688 s%@tm_defines@%$tm_defines%g
8689 s%@tm_p_file_list@%$tm_p_file_list%g
8690 s%@tm_p_file@%$tm_p_file%g
8691 s%@xm_file@%$xm_file%g
8692 s%@xm_defines@%$xm_defines%g
8693 s%@c_target_objs@%$c_target_objs%g
8694 s%@cxx_target_objs@%$cxx_target_objs%g
8695 s%@target_cpu_default@%$target_cpu_default%g
8696 /@target_overrides@/r $target_overrides
8697 s%@target_overrides@%%g
8698 /@host_overrides@/r $host_overrides
8699 s%@host_overrides@%%g
8700 /@language_fragments@/r $language_fragments
8701 s%@language_fragments@%%g
8702 /@language_hooks@/r $language_hooks
8703 s%@language_hooks@%%g
8705 CEOF
8708 cat >> $CONFIG_STATUS <<\EOF
8710 # Split the substitutions into bite-sized pieces for seds with
8711 # small command number limits, like on Digital OSF/1 and HP-UX.
8712 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8713 ac_file=1 # Number of current file.
8714 ac_beg=1 # First line for current file.
8715 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8716 ac_more_lines=:
8717 ac_sed_cmds=""
8718 while $ac_more_lines; do
8719 if test $ac_beg -gt 1; then
8720 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8721 else
8722 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8724 if test ! -s conftest.s$ac_file; then
8725 ac_more_lines=false
8726 rm -f conftest.s$ac_file
8727 else
8728 if test -z "$ac_sed_cmds"; then
8729 ac_sed_cmds="sed -f conftest.s$ac_file"
8730 else
8731 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8733 ac_file=`expr $ac_file + 1`
8734 ac_beg=$ac_end
8735 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8737 done
8738 if test -z "$ac_sed_cmds"; then
8739 ac_sed_cmds=cat
8743 cat >> $CONFIG_STATUS <<EOF
8745 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8747 cat >> $CONFIG_STATUS <<\EOF
8748 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8749 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8750 case "$ac_file" in
8751 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8752 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8753 *) ac_file_in="${ac_file}.in" ;;
8754 esac
8756 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8758 # Remove last slash and all that follows it. Not all systems have dirname.
8759 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8760 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8761 # The file is in a subdirectory.
8762 test ! -d "$ac_dir" && mkdir "$ac_dir"
8763 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8764 # A "../" for each directory in $ac_dir_suffix.
8765 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8766 else
8767 ac_dir_suffix= ac_dots=
8770 case "$ac_given_srcdir" in
8771 .) srcdir=.
8772 if test -z "$ac_dots"; then top_srcdir=.
8773 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8774 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8775 *) # Relative path.
8776 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8777 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8778 esac
8781 echo creating "$ac_file"
8782 rm -f "$ac_file"
8783 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8784 case "$ac_file" in
8785 *Makefile*) ac_comsub="1i\\
8786 # $configure_input" ;;
8787 *) ac_comsub= ;;
8788 esac
8790 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8791 sed -e "$ac_comsub
8792 s%@configure_input@%$configure_input%g
8793 s%@srcdir@%$srcdir%g
8794 s%@top_srcdir@%$top_srcdir%g
8795 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8796 fi; done
8797 rm -f conftest.s*
8799 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8800 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8802 # ac_d sets the value in "#define NAME VALUE" lines.
8803 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8804 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8805 ac_dC='\3'
8806 ac_dD='%g'
8807 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8808 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8809 ac_uB='\([ ]\)%\1#\2define\3'
8810 ac_uC=' '
8811 ac_uD='\4%g'
8812 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8813 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8814 ac_eB='$%\1#\2define\3'
8815 ac_eC=' '
8816 ac_eD='%g'
8818 if test "${CONFIG_HEADERS+set}" != set; then
8820 cat >> $CONFIG_STATUS <<EOF
8821 CONFIG_HEADERS="auto-host.h:config.in"
8823 cat >> $CONFIG_STATUS <<\EOF
8825 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8826 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8827 case "$ac_file" in
8828 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8829 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8830 *) ac_file_in="${ac_file}.in" ;;
8831 esac
8833 echo creating $ac_file
8835 rm -f conftest.frag conftest.in conftest.out
8836 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8837 cat $ac_file_inputs > conftest.in
8841 # Transform confdefs.h into a sed script conftest.vals that substitutes
8842 # the proper values into config.h.in to produce config.h. And first:
8843 # Protect against being on the right side of a sed subst in config.status.
8844 # Protect against being in an unquoted here document in config.status.
8845 rm -f conftest.vals
8846 cat > conftest.hdr <<\EOF
8847 s/[\\&%]/\\&/g
8848 s%[\\$`]%\\&%g
8849 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8850 s%ac_d%ac_u%gp
8851 s%ac_u%ac_e%gp
8853 sed -n -f conftest.hdr confdefs.h > conftest.vals
8854 rm -f conftest.hdr
8856 # This sed command replaces #undef with comments. This is necessary, for
8857 # example, in the case of _POSIX_SOURCE, which is predefined and required
8858 # on some systems where configure will not decide to define it.
8859 cat >> conftest.vals <<\EOF
8860 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8863 # Break up conftest.vals because some shells have a limit on
8864 # the size of here documents, and old seds have small limits too.
8866 rm -f conftest.tail
8867 while :
8869 ac_lines=`grep -c . conftest.vals`
8870 # grep -c gives empty output for an empty file on some AIX systems.
8871 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8872 # Write a limited-size here document to conftest.frag.
8873 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8874 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8875 echo 'CEOF
8876 sed -f conftest.frag conftest.in > conftest.out
8877 rm -f conftest.in
8878 mv conftest.out conftest.in
8879 ' >> $CONFIG_STATUS
8880 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8881 rm -f conftest.vals
8882 mv conftest.tail conftest.vals
8883 done
8884 rm -f conftest.vals
8886 cat >> $CONFIG_STATUS <<\EOF
8887 rm -f conftest.frag conftest.h
8888 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8889 cat conftest.in >> conftest.h
8890 rm -f conftest.in
8891 if cmp -s $ac_file conftest.h 2>/dev/null; then
8892 echo "$ac_file is unchanged"
8893 rm -f conftest.h
8894 else
8895 # Remove last slash and all that follows it. Not all systems have dirname.
8896 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8897 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8898 # The file is in a subdirectory.
8899 test ! -d "$ac_dir" && mkdir "$ac_dir"
8901 rm -f $ac_file
8902 mv conftest.h $ac_file
8904 fi; done
8907 cat >> $CONFIG_STATUS <<EOF
8909 subdirs='$subdirs'
8910 symbolic_link='$symbolic_link'
8913 cat >> $CONFIG_STATUS <<\EOF
8914 for ac_file in $CONFIG_FILES; do
8915 # Support "outfile[:infile[:infile...]]"
8916 case "$ac_file" in
8917 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8918 esac
8919 # PO directories have a Makefile.in generated from Makefile.in.in.
8920 case "$ac_file" in */Makefile.in)
8921 # Adjust a relative srcdir.
8922 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8923 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8924 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8925 # In autoconf-2.13 it is called $ac_given_srcdir.
8926 # In autoconf-2.50 it is called $srcdir.
8927 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8928 case "$ac_given_srcdir" in
8929 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8930 /*) top_srcdir="$ac_given_srcdir" ;;
8931 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8932 esac
8933 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8934 rm -f "$ac_dir/POTFILES"
8935 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8936 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8937 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8938 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8941 esac
8942 done
8944 case x$CONFIG_HEADERS in
8945 xauto-host.h:config.in)
8946 echo > cstamp-h ;;
8947 esac
8948 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8949 # bootstrapping and the installation procedure can still use
8950 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
8951 # FLAGS_TO_PASS has been modified to solve the problem there.
8952 # This is virtually a duplicate of what happens in configure.lang; we do
8953 # an extra check to make sure this only happens if ln -s can be used.
8954 if test "$symbolic_link" = "ln -s"; then
8955 for d in .. ${subdirs} fixinc ; do
8956 if test $d != ..; then
8957 STARTDIR=`${PWDCMD-pwd}`
8958 cd $d
8959 for t in stage1 stage2 stage3 stage4 include
8961 rm -f $t
8962 $symbolic_link ../$t $t 2>/dev/null
8963 done
8964 cd $STARTDIR
8966 done
8967 else true ; fi
8968 # Avoid having to add intl to our include paths.
8969 if test -f intl/libintl.h; then
8970 echo creating libintl.h
8971 echo '#include "intl/libintl.h"' >libintl.h
8974 exit 0
8976 chmod +x $CONFIG_STATUS
8977 rm -fr confdefs* $ac_clean_files
8978 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1