* config/xtensa/xtensa.c (xtensa_build_va_list): Use
[official-gcc.git] / gcc / configure
blob4a6cbe0198e4c128f25090f844ca7f3bac4ec0ee
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-c-mbchar enable multibyte characters for C and C++"
45 ac_help="$ac_help
46 --enable-threads enable thread usage for target GCC
47 --enable-threads=LIB use LIB thread package for target GCC"
48 ac_help="$ac_help
49 --enable-objc-gc enable the use of Boehm's garbage collector with
50 the GNU Objective-C runtime"
51 ac_help="$ac_help
52 --with-dwarf2 force the default debug format to be DWARF 2"
53 ac_help="$ac_help
54 --disable-shared don't provide a shared libgcc"
55 ac_help="$ac_help
56 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
57 ac_help="$ac_help
58 --enable-nls use Native Language Support (default)"
59 ac_help="$ac_help
60 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
61 ac_help="$ac_help
62 --disable-nls do not use Native Language Support"
63 ac_help="$ac_help
64 --with-included-gettext use the GNU gettext library included here"
65 ac_help="$ac_help
66 --disable-win32-registry
67 disable lookup of installation paths in the
68 Registry on Windows hosts
69 --enable-win32-registry enable registry lookup (default)
70 --enable-win32-registry=KEY
71 use KEY instead of GCC version as the last portion
72 of the registry key"
73 ac_help="$ac_help
74 --with-gc={simple,page} choose the garbage collection mechanism to use
75 with the compiler"
76 ac_help="$ac_help
77 --with-system-zlib use installed libz"
78 ac_help="$ac_help
79 --enable-maintainer-mode
80 enable make rules and dependencies not useful
81 (and sometimes confusing) to the casual installer"
82 ac_help="$ac_help
83 --enable-sjlj-exceptions
84 arrange to use setjmp/longjmp exception handling"
85 ac_help="$ac_help
86 --enable-version-specific-runtime-libs
87 specify that runtime libraries should be
88 installed in a compiler-specific directory"
89 ac_help="$ac_help
90 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
92 # Initialize some variables set by options.
93 # The variables have the same names as the options, with
94 # dashes changed to underlines.
95 build=NONE
96 cache_file=./config.cache
97 exec_prefix=NONE
98 host=NONE
99 no_create=
100 nonopt=NONE
101 no_recursion=
102 prefix=NONE
103 program_prefix=NONE
104 program_suffix=NONE
105 program_transform_name=s,x,x,
106 silent=
107 site=
108 srcdir=
109 target=NONE
110 verbose=
111 x_includes=NONE
112 x_libraries=NONE
113 bindir='${exec_prefix}/bin'
114 sbindir='${exec_prefix}/sbin'
115 libexecdir='${exec_prefix}/libexec'
116 datadir='${prefix}/share'
117 sysconfdir='${prefix}/etc'
118 sharedstatedir='${prefix}/com'
119 localstatedir='${prefix}/var'
120 libdir='${exec_prefix}/lib'
121 includedir='${prefix}/include'
122 oldincludedir='/usr/include'
123 infodir='${prefix}/info'
124 mandir='${prefix}/man'
126 # Initialize some other variables.
127 subdirs=
128 MFLAGS= MAKEFLAGS=
129 SHELL=${CONFIG_SHELL-/bin/sh}
130 # Maximum number of lines to put in a shell here document.
131 ac_max_here_lines=12
133 ac_prev=
134 for ac_option
137 # If the previous option needs an argument, assign it.
138 if test -n "$ac_prev"; then
139 eval "$ac_prev=\$ac_option"
140 ac_prev=
141 continue
144 case "$ac_option" in
145 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
146 *) ac_optarg= ;;
147 esac
149 # Accept the important Cygnus configure options, so we can diagnose typos.
151 case "$ac_option" in
153 -bindir | --bindir | --bindi | --bind | --bin | --bi)
154 ac_prev=bindir ;;
155 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
156 bindir="$ac_optarg" ;;
158 -build | --build | --buil | --bui | --bu)
159 ac_prev=build ;;
160 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
161 build="$ac_optarg" ;;
163 -cache-file | --cache-file | --cache-fil | --cache-fi \
164 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
165 ac_prev=cache_file ;;
166 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
167 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
168 cache_file="$ac_optarg" ;;
170 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
171 ac_prev=datadir ;;
172 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
173 | --da=*)
174 datadir="$ac_optarg" ;;
176 -disable-* | --disable-*)
177 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
178 # Reject names that are not valid shell variable names.
179 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
180 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
182 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183 eval "enable_${ac_feature}=no" ;;
185 -enable-* | --enable-*)
186 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
187 # Reject names that are not valid shell variable names.
188 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
189 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
191 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
192 case "$ac_option" in
193 *=*) ;;
194 *) ac_optarg=yes ;;
195 esac
196 eval "enable_${ac_feature}='$ac_optarg'" ;;
198 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
199 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
200 | --exec | --exe | --ex)
201 ac_prev=exec_prefix ;;
202 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
203 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
204 | --exec=* | --exe=* | --ex=*)
205 exec_prefix="$ac_optarg" ;;
207 -gas | --gas | --ga | --g)
208 # Obsolete; use --with-gas.
209 with_gas=yes ;;
211 -help | --help | --hel | --he)
212 # Omit some internal or obsolete options to make the list less imposing.
213 # This message is too long to be a string in the A/UX 3.1 sh.
214 cat << EOF
215 Usage: configure [options] [host]
216 Options: [defaults in brackets after descriptions]
217 Configuration:
218 --cache-file=FILE cache test results in FILE
219 --help print this message
220 --no-create do not create output files
221 --quiet, --silent do not print \`checking...' messages
222 --version print the version of autoconf that created configure
223 Directory and file names:
224 --prefix=PREFIX install architecture-independent files in PREFIX
225 [$ac_default_prefix]
226 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
227 [same as prefix]
228 --bindir=DIR user executables in DIR [EPREFIX/bin]
229 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
230 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
231 --datadir=DIR read-only architecture-independent data in DIR
232 [PREFIX/share]
233 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
234 --sharedstatedir=DIR modifiable architecture-independent data in DIR
235 [PREFIX/com]
236 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
237 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
238 --includedir=DIR C header files in DIR [PREFIX/include]
239 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
240 --infodir=DIR info documentation in DIR [PREFIX/info]
241 --mandir=DIR man documentation in DIR [PREFIX/man]
242 --srcdir=DIR find the sources in DIR [configure dir or ..]
243 --program-prefix=PREFIX prepend PREFIX to installed program names
244 --program-suffix=SUFFIX append SUFFIX to installed program names
245 --program-transform-name=PROGRAM
246 run sed PROGRAM on installed program names
248 cat << EOF
249 Host type:
250 --build=BUILD configure for building on BUILD [BUILD=HOST]
251 --host=HOST configure for HOST [guessed]
252 --target=TARGET configure for TARGET [TARGET=HOST]
253 Features and packages:
254 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
255 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
256 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
257 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
258 --x-includes=DIR X include files are in DIR
259 --x-libraries=DIR X library files are in DIR
261 if test -n "$ac_help"; then
262 echo "--enable and --with options recognized:$ac_help"
264 exit 0 ;;
266 -host | --host | --hos | --ho)
267 ac_prev=host ;;
268 -host=* | --host=* | --hos=* | --ho=*)
269 host="$ac_optarg" ;;
271 -includedir | --includedir | --includedi | --included | --include \
272 | --includ | --inclu | --incl | --inc)
273 ac_prev=includedir ;;
274 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
275 | --includ=* | --inclu=* | --incl=* | --inc=*)
276 includedir="$ac_optarg" ;;
278 -infodir | --infodir | --infodi | --infod | --info | --inf)
279 ac_prev=infodir ;;
280 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
281 infodir="$ac_optarg" ;;
283 -libdir | --libdir | --libdi | --libd)
284 ac_prev=libdir ;;
285 -libdir=* | --libdir=* | --libdi=* | --libd=*)
286 libdir="$ac_optarg" ;;
288 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
289 | --libexe | --libex | --libe)
290 ac_prev=libexecdir ;;
291 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
292 | --libexe=* | --libex=* | --libe=*)
293 libexecdir="$ac_optarg" ;;
295 -localstatedir | --localstatedir | --localstatedi | --localstated \
296 | --localstate | --localstat | --localsta | --localst \
297 | --locals | --local | --loca | --loc | --lo)
298 ac_prev=localstatedir ;;
299 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
300 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
301 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
302 localstatedir="$ac_optarg" ;;
304 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
305 ac_prev=mandir ;;
306 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
307 mandir="$ac_optarg" ;;
309 -nfp | --nfp | --nf)
310 # Obsolete; use --without-fp.
311 with_fp=no ;;
313 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314 | --no-cr | --no-c)
315 no_create=yes ;;
317 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
318 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
319 no_recursion=yes ;;
321 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
322 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
323 | --oldin | --oldi | --old | --ol | --o)
324 ac_prev=oldincludedir ;;
325 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
326 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
327 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
328 oldincludedir="$ac_optarg" ;;
330 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
331 ac_prev=prefix ;;
332 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
333 prefix="$ac_optarg" ;;
335 -program-prefix | --program-prefix | --program-prefi | --program-pref \
336 | --program-pre | --program-pr | --program-p)
337 ac_prev=program_prefix ;;
338 -program-prefix=* | --program-prefix=* | --program-prefi=* \
339 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
340 program_prefix="$ac_optarg" ;;
342 -program-suffix | --program-suffix | --program-suffi | --program-suff \
343 | --program-suf | --program-su | --program-s)
344 ac_prev=program_suffix ;;
345 -program-suffix=* | --program-suffix=* | --program-suffi=* \
346 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
347 program_suffix="$ac_optarg" ;;
349 -program-transform-name | --program-transform-name \
350 | --program-transform-nam | --program-transform-na \
351 | --program-transform-n | --program-transform- \
352 | --program-transform | --program-transfor \
353 | --program-transfo | --program-transf \
354 | --program-trans | --program-tran \
355 | --progr-tra | --program-tr | --program-t)
356 ac_prev=program_transform_name ;;
357 -program-transform-name=* | --program-transform-name=* \
358 | --program-transform-nam=* | --program-transform-na=* \
359 | --program-transform-n=* | --program-transform-=* \
360 | --program-transform=* | --program-transfor=* \
361 | --program-transfo=* | --program-transf=* \
362 | --program-trans=* | --program-tran=* \
363 | --progr-tra=* | --program-tr=* | --program-t=*)
364 program_transform_name="$ac_optarg" ;;
366 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
367 | -silent | --silent | --silen | --sile | --sil)
368 silent=yes ;;
370 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
371 ac_prev=sbindir ;;
372 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
373 | --sbi=* | --sb=*)
374 sbindir="$ac_optarg" ;;
376 -sharedstatedir | --sharedstatedir | --sharedstatedi \
377 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
378 | --sharedst | --shareds | --shared | --share | --shar \
379 | --sha | --sh)
380 ac_prev=sharedstatedir ;;
381 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
382 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
383 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
384 | --sha=* | --sh=*)
385 sharedstatedir="$ac_optarg" ;;
387 -site | --site | --sit)
388 ac_prev=site ;;
389 -site=* | --site=* | --sit=*)
390 site="$ac_optarg" ;;
392 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
393 ac_prev=srcdir ;;
394 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
395 srcdir="$ac_optarg" ;;
397 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
398 | --syscon | --sysco | --sysc | --sys | --sy)
399 ac_prev=sysconfdir ;;
400 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
401 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
402 sysconfdir="$ac_optarg" ;;
404 -target | --target | --targe | --targ | --tar | --ta | --t)
405 ac_prev=target ;;
406 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
407 target="$ac_optarg" ;;
409 -v | -verbose | --verbose | --verbos | --verbo | --verb)
410 verbose=yes ;;
412 -version | --version | --versio | --versi | --vers)
413 echo "configure generated by autoconf version 2.13"
414 exit 0 ;;
416 -with-* | --with-*)
417 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
418 # Reject names that are not valid shell variable names.
419 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
420 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422 ac_package=`echo $ac_package| sed 's/-/_/g'`
423 case "$ac_option" in
424 *=*) ;;
425 *) ac_optarg=yes ;;
426 esac
427 eval "with_${ac_package}='$ac_optarg'" ;;
429 -without-* | --without-*)
430 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
431 # Reject names that are not valid shell variable names.
432 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
433 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
435 ac_package=`echo $ac_package| sed 's/-/_/g'`
436 eval "with_${ac_package}=no" ;;
438 --x)
439 # Obsolete; use --with-x.
440 with_x=yes ;;
442 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
443 | --x-incl | --x-inc | --x-in | --x-i)
444 ac_prev=x_includes ;;
445 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
446 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
447 x_includes="$ac_optarg" ;;
449 -x-libraries | --x-libraries | --x-librarie | --x-librari \
450 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
451 ac_prev=x_libraries ;;
452 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
453 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
454 x_libraries="$ac_optarg" ;;
456 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
460 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
461 echo "configure: warning: $ac_option: invalid host type" 1>&2
463 if test "x$nonopt" != xNONE; then
464 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
466 nonopt="$ac_option"
469 esac
470 done
472 if test -n "$ac_prev"; then
473 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
476 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
478 # File descriptor usage:
479 # 0 standard input
480 # 1 file creation
481 # 2 errors and warnings
482 # 3 some systems may open it to /dev/tty
483 # 4 used on the Kubota Titan
484 # 6 checking for... messages and results
485 # 5 compiler messages saved in config.log
486 if test "$silent" = yes; then
487 exec 6>/dev/null
488 else
489 exec 6>&1
491 exec 5>./config.log
493 echo "\
494 This file contains any messages produced by compilers while
495 running configure, to aid debugging if configure makes a mistake.
496 " 1>&5
498 # Strip out --no-create and --no-recursion so they do not pile up.
499 # Also quote any args containing shell metacharacters.
500 ac_configure_args=
501 for ac_arg
503 case "$ac_arg" in
504 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
505 | --no-cr | --no-c) ;;
506 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
507 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
508 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
509 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
510 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
511 esac
512 done
514 # NLS nuisances.
515 # Only set these to C if already set. These must not be set unconditionally
516 # because not all systems understand e.g. LANG=C (notably SCO).
517 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
518 # Non-C LC_CTYPE values break the ctype check.
519 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
520 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
521 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
522 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
524 # confdefs.h avoids OS command line length limits that DEFS can exceed.
525 rm -rf conftest* confdefs.h
526 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
527 echo > confdefs.h
529 # A filename unique to this package, relative to the directory that
530 # configure is in, which we can look for to find out if srcdir is correct.
531 ac_unique_file=tree.c
533 # Find the source files, if location was not specified.
534 if test -z "$srcdir"; then
535 ac_srcdir_defaulted=yes
536 # Try the directory containing this script, then its parent.
537 ac_prog=$0
538 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
539 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
540 srcdir=$ac_confdir
541 if test ! -r $srcdir/$ac_unique_file; then
542 srcdir=..
544 else
545 ac_srcdir_defaulted=no
547 if test ! -r $srcdir/$ac_unique_file; then
548 if test "$ac_srcdir_defaulted" = yes; then
549 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
550 else
551 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
554 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
556 # Prefer explicitly selected file to automatically selected ones.
557 if test -z "$CONFIG_SITE"; then
558 if test "x$prefix" != xNONE; then
559 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
560 else
561 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
564 for ac_site_file in $CONFIG_SITE; do
565 if test -r "$ac_site_file"; then
566 echo "loading site script $ac_site_file"
567 . "$ac_site_file"
569 done
571 if test -r "$cache_file"; then
572 echo "loading cache $cache_file"
573 . $cache_file
574 else
575 echo "creating cache $cache_file"
576 > $cache_file
579 ac_ext=c
580 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
581 ac_cpp='$CPP $CPPFLAGS'
582 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
583 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
584 cross_compiling=$ac_cv_prog_cc_cross
586 ac_exeext=
587 ac_objext=o
588 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
589 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
590 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
591 ac_n= ac_c='
592 ' ac_t=' '
593 else
594 ac_n=-n ac_c= ac_t=
596 else
597 ac_n= ac_c='\c' ac_t=
603 remove=rm
604 hard_link=ln
605 symbolic_link='ln -s'
606 copy=cp
608 # Check for bogus environment variables.
609 # Test if LIBRARY_PATH contains the notation for the current directory
610 # since this would lead to problems installing/building glibc.
611 # LIBRARY_PATH contains the current directory if one of the following
612 # is true:
613 # - one of the terminals (":" and ";") is the first or last sign
614 # - two terminals occur directly after each other
615 # - the path contains an element with a dot in it
616 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
617 echo "configure:618: checking LIBRARY_PATH variable" >&5
618 case ${LIBRARY_PATH} in
619 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
620 library_path_setting="contains current directory"
623 library_path_setting="ok"
625 esac
626 echo "$ac_t""$library_path_setting" 1>&6
627 if test "$library_path_setting" != "ok"; then
628 { echo "configure: error:
629 *** LIBRARY_PATH shouldn't contain the current directory when
630 *** building gcc. Please change the environment variable
631 *** and run configure again." 1>&2; exit 1; }
634 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
635 # since this would lead to problems installing/building glibc.
636 # GCC_EXEC_PREFIX contains the current directory if one of the following
637 # is true:
638 # - one of the terminals (":" and ";") is the first or last sign
639 # - two terminals occur directly after each other
640 # - the path contains an element with a dot in it
641 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
642 echo "configure:643: checking GCC_EXEC_PREFIX variable" >&5
643 case ${GCC_EXEC_PREFIX} in
644 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
645 gcc_exec_prefix_setting="contains current directory"
648 gcc_exec_prefix_setting="ok"
650 esac
651 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
652 if test "$gcc_exec_prefix_setting" != "ok"; then
653 { echo "configure: error:
654 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
655 *** building gcc. Please change the environment variable
656 *** and run configure again." 1>&2; exit 1; }
659 # Check for additional parameters
661 # With GNU ld
662 # Check whether --with-gnu-ld or --without-gnu-ld was given.
663 if test "${with_gnu_ld+set}" = set; then
664 withval="$with_gnu_ld"
665 gnu_ld_flag="$with_gnu_ld"
666 else
667 gnu_ld_flag=no
671 # With pre-defined ld
672 # Check whether --with-ld or --without-ld was given.
673 if test "${with_ld+set}" = set; then
674 withval="$with_ld"
675 DEFAULT_LINKER="$with_ld"
678 if test x"${DEFAULT_LINKER+set}" = x"set"; then
679 if test ! -x "$DEFAULT_LINKER"; then
680 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
681 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
682 gnu_ld_flag=yes
684 cat >> confdefs.h <<EOF
685 #define DEFAULT_LINKER "$DEFAULT_LINKER"
690 # With GNU as
691 # Check whether --with-gnu-as or --without-gnu-as was given.
692 if test "${with_gnu_as+set}" = set; then
693 withval="$with_gnu_as"
694 gas_flag="$with_gnu_as"
695 else
696 gas_flag=no
700 # Check whether --with-as or --without-as was given.
701 if test "${with_as+set}" = set; then
702 withval="$with_as"
703 DEFAULT_ASSEMBLER="$with_as"
706 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
707 if test ! -x "$DEFAULT_ASSEMBLER"; then
708 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
709 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
710 gas_flag=yes
712 cat >> confdefs.h <<EOF
713 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
718 # With stabs
719 # Check whether --with-stabs or --without-stabs was given.
720 if test "${with_stabs+set}" = set; then
721 withval="$with_stabs"
722 stabs="$with_stabs"
723 else
724 stabs=no
728 # With ELF
729 # Check whether --with-elf or --without-elf was given.
730 if test "${with_elf+set}" = set; then
731 withval="$with_elf"
732 elf="$with_elf"
733 else
734 elf=no
738 # Specify the local prefix
739 local_prefix=
740 # Check whether --with-local-prefix or --without-local-prefix was given.
741 if test "${with_local_prefix+set}" = set; then
742 withval="$with_local_prefix"
743 case "${withval}" in
744 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
745 no) ;;
746 *) local_prefix=$with_local_prefix ;;
747 esac
751 # Default local prefix if it is empty
752 if test x$local_prefix = x; then
753 local_prefix=/usr/local
756 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
757 # passed in by the toplevel make and thus we'd get different behavior
758 # depending on where we built the sources.
759 gcc_gxx_include_dir=
760 # Specify the g++ header file directory
761 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
762 if test "${with_gxx_include_dir+set}" = set; then
763 withval="$with_gxx_include_dir"
764 case "${withval}" in
765 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
766 no) ;;
767 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
768 esac
772 if test x${gcc_gxx_include_dir} = x; then
773 if test x${enable_version_specific_runtime_libs} = xyes; then
774 gcc_gxx_include_dir='${libsubdir}/include/g++'
775 else
776 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
777 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
781 # Determine whether or not multilibs are enabled.
782 # Check whether --enable-multilib or --disable-multilib was given.
783 if test "${enable_multilib+set}" = set; then
784 enableval="$enable_multilib"
786 else
787 enable_multilib=yes
792 # Enable expensive internal checks
793 # Check whether --enable-checking or --disable-checking was given.
794 if test "${enable_checking+set}" = set; then
795 enableval="$enable_checking"
796 ac_checking=
797 ac_tree_checking=
798 ac_rtl_checking=
799 ac_rtlflag_checking=
800 ac_gc_checking=
801 ac_gc_always_collect=
802 case "${enableval}" in
803 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
804 ac_rtlflag_checking=1 ;;
805 no) ;;
806 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
807 set fnord $enableval; shift
808 IFS="$ac_save_IFS"
809 for check
811 case $check in
812 misc) ac_checking=1 ;;
813 tree) ac_tree_checking=1 ;;
814 rtlflag) ac_rtlflag_checking=1 ;;
815 rtl) ac_rtl_checking=1 ;;
816 gc) ac_gc_checking=1 ;;
817 gcac) ac_gc_always_collect=1 ;;
818 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
819 esac
820 done
822 esac
824 else
825 # Enable some checks by default for development versions of GCC
826 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
829 if test x$ac_checking != x ; then
830 cat >> confdefs.h <<\EOF
831 #define ENABLE_CHECKING 1
835 if test x$ac_tree_checking != x ; then
836 cat >> confdefs.h <<\EOF
837 #define ENABLE_TREE_CHECKING 1
841 if test x$ac_rtl_checking != x ; then
842 cat >> confdefs.h <<\EOF
843 #define ENABLE_RTL_CHECKING 1
847 if test x$ac_rtlflag_checking != x ; then
848 cat >> confdefs.h <<\EOF
849 #define ENABLE_RTL_FLAG_CHECKING 1
853 if test x$ac_gc_checking != x ; then
854 cat >> confdefs.h <<\EOF
855 #define ENABLE_GC_CHECKING 1
859 if test x$ac_gc_always_collect != x ; then
860 cat >> confdefs.h <<\EOF
861 #define ENABLE_GC_ALWAYS_COLLECT 1
866 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
867 if test "${with_cpp_install_dir+set}" = set; then
868 withval="$with_cpp_install_dir"
869 if test x$withval = xyes; then
870 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
871 elif test x$withval != xno; then
872 cpp_install_dir=$withval
877 # Enable Multibyte Characters for C/C++
878 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
879 if test "${enable_c_mbchar+set}" = set; then
880 enableval="$enable_c_mbchar"
881 if test x$enable_c_mbchar != xno; then
882 cat >> confdefs.h <<\EOF
883 #define MULTIBYTE_CHARS 1
890 # Enable threads
891 # Pass with no value to take the default
892 # Pass with a value to specify a thread package
893 # Check whether --enable-threads or --disable-threads was given.
894 if test "${enable_threads+set}" = set; then
895 enableval="$enable_threads"
897 else
898 enable_threads=''
902 enable_threads_flag=$enable_threads
903 # Check if a valid thread package
904 case x${enable_threads_flag} in
905 x | xno)
906 # No threads
907 target_thread_file='single'
909 xyes)
910 # default
911 target_thread_file=''
913 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
914 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
915 target_thread_file=$enable_threads_flag
918 echo "$enable_threads is an unknown thread package" 1>&2
919 exit 1
921 esac
923 # Check whether --enable-objc-gc or --disable-objc-gc was given.
924 if test "${enable_objc_gc+set}" = set; then
925 enableval="$enable_objc_gc"
926 if test x$enable_objc_gc = xno; then
927 objc_boehm_gc=''
928 else
929 objc_boehm_gc=1
931 else
932 objc_boehm_gc=''
936 # Check whether --with-dwarf2 or --without-dwarf2 was given.
937 if test "${with_dwarf2+set}" = set; then
938 withval="$with_dwarf2"
939 dwarf2="$with_dwarf2"
940 else
941 dwarf2=no
945 # Check whether --enable-shared or --disable-shared was given.
946 if test "${enable_shared+set}" = set; then
947 enableval="$enable_shared"
949 case $enable_shared in
950 yes | no) ;;
952 enable_shared=no
953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
954 for pkg in $enableval; do
955 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
956 enable_shared=yes
958 done
959 IFS="$ac_save_ifs"
961 esac
963 else
964 enable_shared=yes
969 # Determine the host, build, and target systems
970 ac_aux_dir=
971 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
972 if test -f $ac_dir/install-sh; then
973 ac_aux_dir=$ac_dir
974 ac_install_sh="$ac_aux_dir/install-sh -c"
975 break
976 elif test -f $ac_dir/install.sh; then
977 ac_aux_dir=$ac_dir
978 ac_install_sh="$ac_aux_dir/install.sh -c"
979 break
981 done
982 if test -z "$ac_aux_dir"; then
983 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
985 ac_config_guess=$ac_aux_dir/config.guess
986 ac_config_sub=$ac_aux_dir/config.sub
987 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
990 # Do some error checking and defaulting for the host and target type.
991 # The inputs are:
992 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
994 # The rules are:
995 # 1. You are not allowed to specify --host, --target, and nonopt at the
996 # same time.
997 # 2. Host defaults to nonopt.
998 # 3. If nonopt is not specified, then host defaults to the current host,
999 # as determined by config.guess.
1000 # 4. Target and build default to nonopt.
1001 # 5. If nonopt is not specified, then target and build default to host.
1003 # The aliases save the names the user supplied, while $host etc.
1004 # will get canonicalized.
1005 case $host---$target---$nonopt in
1006 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1007 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1008 esac
1011 # Make sure we can run config.sub.
1012 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1013 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1016 echo $ac_n "checking host system type""... $ac_c" 1>&6
1017 echo "configure:1018: checking host system type" >&5
1019 host_alias=$host
1020 case "$host_alias" in
1021 NONE)
1022 case $nonopt in
1023 NONE)
1024 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1025 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1026 fi ;;
1027 *) host_alias=$nonopt ;;
1028 esac ;;
1029 esac
1031 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1032 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1033 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1034 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1035 echo "$ac_t""$host" 1>&6
1037 echo $ac_n "checking target system type""... $ac_c" 1>&6
1038 echo "configure:1039: checking target system type" >&5
1040 target_alias=$target
1041 case "$target_alias" in
1042 NONE)
1043 case $nonopt in
1044 NONE) target_alias=$host_alias ;;
1045 *) target_alias=$nonopt ;;
1046 esac ;;
1047 esac
1049 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1050 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1051 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1052 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1053 echo "$ac_t""$target" 1>&6
1055 echo $ac_n "checking build system type""... $ac_c" 1>&6
1056 echo "configure:1057: checking build system type" >&5
1058 build_alias=$build
1059 case "$build_alias" in
1060 NONE)
1061 case $nonopt in
1062 NONE) build_alias=$host_alias ;;
1063 *) build_alias=$nonopt ;;
1064 esac ;;
1065 esac
1067 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1068 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1071 echo "$ac_t""$build" 1>&6
1073 test "$host_alias" != "$target_alias" &&
1074 test "$program_prefix$program_suffix$program_transform_name" = \
1075 NONENONEs,x,x, &&
1076 program_prefix=${target_alias}-
1079 # Set program_transform_name
1080 if test "$program_transform_name" = s,x,x,; then
1081 program_transform_name=
1082 else
1083 # Double any \ or $. echo might interpret backslashes.
1084 cat <<\EOF_SED > conftestsed
1085 s,\\,\\\\,g; s,\$,$$,g
1086 EOF_SED
1087 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1088 rm -f conftestsed
1090 test "$program_prefix" != NONE &&
1091 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1092 # Use a double $ so make ignores it.
1093 test "$program_suffix" != NONE &&
1094 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1096 # sed with no file args requires a program.
1097 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1100 # Find the native compiler
1101 # Extract the first word of "gcc", so it can be a program name with args.
1102 set dummy gcc; ac_word=$2
1103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1104 echo "configure:1105: checking for $ac_word" >&5
1105 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1106 echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108 if test -n "$CC"; then
1109 ac_cv_prog_CC="$CC" # Let the user override the test.
1110 else
1111 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1112 ac_dummy="$PATH"
1113 for ac_dir in $ac_dummy; do
1114 test -z "$ac_dir" && ac_dir=.
1115 if test -f $ac_dir/$ac_word; then
1116 ac_cv_prog_CC="gcc"
1117 break
1119 done
1120 IFS="$ac_save_ifs"
1123 CC="$ac_cv_prog_CC"
1124 if test -n "$CC"; then
1125 echo "$ac_t""$CC" 1>&6
1126 else
1127 echo "$ac_t""no" 1>&6
1130 if test -z "$CC"; then
1131 # Extract the first word of "cc", so it can be a program name with args.
1132 set dummy cc; ac_word=$2
1133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1134 echo "configure:1135: checking for $ac_word" >&5
1135 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1136 echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138 if test -n "$CC"; then
1139 ac_cv_prog_CC="$CC" # Let the user override the test.
1140 else
1141 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1142 ac_prog_rejected=no
1143 ac_dummy="$PATH"
1144 for ac_dir in $ac_dummy; do
1145 test -z "$ac_dir" && ac_dir=.
1146 if test -f $ac_dir/$ac_word; then
1147 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1148 ac_prog_rejected=yes
1149 continue
1151 ac_cv_prog_CC="cc"
1152 break
1154 done
1155 IFS="$ac_save_ifs"
1156 if test $ac_prog_rejected = yes; then
1157 # We found a bogon in the path, so make sure we never use it.
1158 set dummy $ac_cv_prog_CC
1159 shift
1160 if test $# -gt 0; then
1161 # We chose a different compiler from the bogus one.
1162 # However, it has the same basename, so the bogon will be chosen
1163 # first if we set CC to just the basename; use the full file name.
1164 shift
1165 set dummy "$ac_dir/$ac_word" "$@"
1166 shift
1167 ac_cv_prog_CC="$@"
1172 CC="$ac_cv_prog_CC"
1173 if test -n "$CC"; then
1174 echo "$ac_t""$CC" 1>&6
1175 else
1176 echo "$ac_t""no" 1>&6
1179 if test -z "$CC"; then
1180 case "`uname -s`" in
1181 *win32* | *WIN32*)
1182 # Extract the first word of "cl", so it can be a program name with args.
1183 set dummy cl; ac_word=$2
1184 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1185 echo "configure:1186: checking for $ac_word" >&5
1186 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1187 echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189 if test -n "$CC"; then
1190 ac_cv_prog_CC="$CC" # Let the user override the test.
1191 else
1192 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1193 ac_dummy="$PATH"
1194 for ac_dir in $ac_dummy; do
1195 test -z "$ac_dir" && ac_dir=.
1196 if test -f $ac_dir/$ac_word; then
1197 ac_cv_prog_CC="cl"
1198 break
1200 done
1201 IFS="$ac_save_ifs"
1204 CC="$ac_cv_prog_CC"
1205 if test -n "$CC"; then
1206 echo "$ac_t""$CC" 1>&6
1207 else
1208 echo "$ac_t""no" 1>&6
1211 esac
1213 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1216 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1217 echo "configure:1218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1219 ac_ext=c
1220 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1221 ac_cpp='$CPP $CPPFLAGS'
1222 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1223 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1224 cross_compiling=$ac_cv_prog_cc_cross
1226 cat > conftest.$ac_ext << EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1231 main(){return(0);}
1233 if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1234 ac_cv_prog_cc_works=yes
1235 # If we can't run a trivial program, we are probably using a cross compiler.
1236 if (./conftest; exit) 2>/dev/null; then
1237 ac_cv_prog_cc_cross=no
1238 else
1239 ac_cv_prog_cc_cross=yes
1241 else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 ac_cv_prog_cc_works=no
1246 rm -fr conftest*
1247 ac_ext=c
1248 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1249 ac_cpp='$CPP $CPPFLAGS'
1250 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1251 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1252 cross_compiling=$ac_cv_prog_cc_cross
1254 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1255 if test $ac_cv_prog_cc_works = no; then
1256 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1258 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1259 echo "configure:1260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1260 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1261 cross_compiling=$ac_cv_prog_cc_cross
1263 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1264 echo "configure:1265: checking whether we are using GNU C" >&5
1265 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1266 echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268 cat > conftest.c <<EOF
1269 #ifdef __GNUC__
1270 yes;
1271 #endif
1273 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1274 ac_cv_prog_gcc=yes
1275 else
1276 ac_cv_prog_gcc=no
1280 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1282 if test $ac_cv_prog_gcc = yes; then
1283 GCC=yes
1284 else
1285 GCC=
1288 ac_test_CFLAGS="${CFLAGS+set}"
1289 ac_save_CFLAGS="$CFLAGS"
1290 CFLAGS=
1291 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1292 echo "configure:1293: checking whether ${CC-cc} accepts -g" >&5
1293 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296 echo 'void f(){}' > conftest.c
1297 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1298 ac_cv_prog_cc_g=yes
1299 else
1300 ac_cv_prog_cc_g=no
1302 rm -f conftest*
1306 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1307 if test "$ac_test_CFLAGS" = set; then
1308 CFLAGS="$ac_save_CFLAGS"
1309 elif test $ac_cv_prog_cc_g = yes; then
1310 if test "$GCC" = yes; then
1311 CFLAGS="-g -O2"
1312 else
1313 CFLAGS="-g"
1315 else
1316 if test "$GCC" = yes; then
1317 CFLAGS="-O2"
1318 else
1319 CFLAGS=
1323 if test "x$CC" != xcc; then
1324 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1325 echo "configure:1326: checking whether $CC and cc understand -c and -o together" >&5
1326 else
1327 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1328 echo "configure:1329: checking whether cc understands -c and -o together" >&5
1330 set dummy $CC; ac_cc="`echo $2 |
1331 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1332 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 echo 'foo(){}' > conftest.c
1336 # Make sure it works both with $CC and with simple cc.
1337 # We do the test twice because some compilers refuse to overwrite an
1338 # existing .o file with -o, though they will create one.
1339 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1340 if { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1341 test -f conftest.o && { (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1342 then
1343 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1344 if test "x$CC" != xcc; then
1345 # Test first that cc exists at all.
1346 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1347 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1348 if { (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1349 test -f conftest.o && { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1350 then
1351 # cc works too.
1353 else
1354 # cc exists but doesn't like -o.
1355 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1359 else
1360 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1362 rm -f conftest*
1365 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1366 echo "$ac_t""yes" 1>&6
1367 else
1368 echo "$ac_t""no" 1>&6
1369 cat >> confdefs.h <<\EOF
1370 #define NO_MINUS_C_MINUS_O 1
1375 # autoconf is lame and doesn't give us any substitution variable for this.
1376 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1377 NO_MINUS_C_MINUS_O=yes
1378 else
1379 OUTPUT_OPTION='-o $@'
1384 # See if GNAT has been installed
1385 if test $host != $build; then
1386 ac_tool_prefix=${host_alias}-
1387 else
1388 ac_tool_prefix=
1392 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1393 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1395 echo "configure:1396: checking for $ac_word" >&5
1396 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398 else
1399 if test -n "$GNATBIND"; then
1400 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1401 else
1402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1403 ac_dummy="$PATH"
1404 for ac_dir in $ac_dummy; do
1405 test -z "$ac_dir" && ac_dir=.
1406 if test -f $ac_dir/$ac_word; then
1407 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1408 break
1410 done
1411 IFS="$ac_save_ifs"
1414 GNATBIND="$ac_cv_prog_GNATBIND"
1415 if test -n "$GNATBIND"; then
1416 echo "$ac_t""$GNATBIND" 1>&6
1417 else
1418 echo "$ac_t""no" 1>&6
1422 if test -z "$ac_cv_prog_GNATBIND"; then
1423 if test -n "$ac_tool_prefix"; then
1424 # Extract the first word of "gnatbind", so it can be a program name with args.
1425 set dummy gnatbind; ac_word=$2
1426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1427 echo "configure:1428: checking for $ac_word" >&5
1428 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1429 echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431 if test -n "$GNATBIND"; then
1432 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1433 else
1434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1435 ac_dummy="$PATH"
1436 for ac_dir in $ac_dummy; do
1437 test -z "$ac_dir" && ac_dir=.
1438 if test -f $ac_dir/$ac_word; then
1439 ac_cv_prog_GNATBIND="gnatbind"
1440 break
1442 done
1443 IFS="$ac_save_ifs"
1444 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1447 GNATBIND="$ac_cv_prog_GNATBIND"
1448 if test -n "$GNATBIND"; then
1449 echo "$ac_t""$GNATBIND" 1>&6
1450 else
1451 echo "$ac_t""no" 1>&6
1454 else
1455 GNATBIND="no"
1459 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1460 echo "configure:1461: checking for compiler driver that understands Ada" >&5
1461 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464 cat >conftest.adb <<EOF
1465 procedure conftest is begin null; end conftest;
1467 gcc_cv_prog_adac=no
1468 # Have to do ac_tool_prefix and user overrides by hand.
1469 user_adac=$ADAC
1470 user_cc=$CC
1471 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1472 ${ac_tool_prefix}$user_cc $user_cc \
1473 ${ac_tool_prefix}gcc gcc \
1474 ${ac_tool_prefix}cc cc \
1475 ${ac_tool_prefix}gnatgcc gnatgcc \
1476 ${ac_tool_prefix}gnatcc gnatcc \
1477 ${ac_tool_prefix}adagcc adagcc \
1478 ${ac_tool_prefix}adacc adacc ; do
1479 # There is a bug in all released versions of GCC which causes the
1480 # driver to exit successfully when the appropriate language module
1481 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1482 # Therefore we must check for the error message as well as an
1483 # unsuccessful exit.
1484 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1485 if test x"$errors" = x; then
1486 gcc_cv_prog_adac=$cand
1487 break
1489 done
1490 rm -f conftest.*
1493 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1494 ADAC=$gcc_cv_prog_adac
1497 if test x$GNATBIND != xno && test x$ADAC != xno; then
1498 have_gnat=yes
1499 else
1500 have_gnat=no
1504 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1505 echo "configure:1506: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1506 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508 else
1509 save_CFLAGS="$CFLAGS"
1510 CFLAGS="-Wno-long-long"
1511 cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1515 int main() {
1517 ; return 0; }
1519 if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1520 rm -rf conftest*
1521 ac_cv_prog_cc_no_long_long=yes
1522 else
1523 echo "configure: failed program was:" >&5
1524 cat conftest.$ac_ext >&5
1525 rm -rf conftest*
1526 ac_cv_prog_cc_no_long_long=no
1528 rm -f conftest*
1529 CFLAGS="$save_CFLAGS"
1532 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1534 if test x$have_gnat != xno ; then
1535 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1536 echo "configure:1537: checking whether ${ADAC} accepts -Wno-long-long" >&5
1537 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1538 echo $ac_n "(cached) $ac_c" 1>&6
1539 else
1540 cat >conftest.adb <<EOF
1541 procedure conftest is begin null; end conftest;
1543 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1544 ac_cv_prog_adac_no_long_long=yes
1545 else
1546 ac_cv_prog_adac_no_long_long=no
1548 rm -f conftest*
1551 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1552 else
1553 ac_cv_prog_adac_no_long_long=yes
1556 strict1_warn=
1557 if test $ac_cv_prog_cc_no_long_long = yes && \
1558 test $ac_cv_prog_adac_no_long_long = yes ; then
1559 strict1_warn="-pedantic -Wno-long-long"
1563 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1564 echo "configure:1565: checking how to run the C preprocessor" >&5
1565 # On Suns, sometimes $CPP names a directory.
1566 if test -n "$CPP" && test -d "$CPP"; then
1567 CPP=
1569 if test -z "$CPP"; then
1570 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573 # This must be in double quotes, not single quotes, because CPP may get
1574 # substituted into the Makefile and "${CC-cc}" will confuse make.
1575 CPP="${CC-cc} -E"
1576 # On the NeXT, cc -E runs the code through the compiler's parser,
1577 # not just through cpp.
1578 cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1581 #include <assert.h>
1582 Syntax Error
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1589 else
1590 echo "$ac_err" >&5
1591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
1593 rm -rf conftest*
1594 CPP="${CC-cc} -E -traditional-cpp"
1595 cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598 #include <assert.h>
1599 Syntax Error
1601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1602 { (eval echo configure:1603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1604 if test -z "$ac_err"; then
1606 else
1607 echo "$ac_err" >&5
1608 echo "configure: failed program was:" >&5
1609 cat conftest.$ac_ext >&5
1610 rm -rf conftest*
1611 CPP="${CC-cc} -nologo -E"
1612 cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615 #include <assert.h>
1616 Syntax Error
1618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1619 { (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1621 if test -z "$ac_err"; then
1623 else
1624 echo "$ac_err" >&5
1625 echo "configure: failed program was:" >&5
1626 cat conftest.$ac_ext >&5
1627 rm -rf conftest*
1628 CPP=/lib/cpp
1630 rm -f conftest*
1632 rm -f conftest*
1634 rm -f conftest*
1635 ac_cv_prog_CPP="$CPP"
1637 CPP="$ac_cv_prog_CPP"
1638 else
1639 ac_cv_prog_CPP="$CPP"
1641 echo "$ac_t""$CPP" 1>&6
1643 echo $ac_n "checking for inline""... $ac_c" 1>&6
1644 echo "configure:1645: checking for inline" >&5
1645 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1646 echo $ac_n "(cached) $ac_c" 1>&6
1647 else
1648 ac_cv_c_inline=no
1649 for ac_kw in inline __inline__ __inline; do
1650 cat > conftest.$ac_ext <<EOF
1651 #line 1652 "configure"
1652 #include "confdefs.h"
1654 int main() {
1655 } $ac_kw foo() {
1656 ; return 0; }
1658 if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1659 rm -rf conftest*
1660 ac_cv_c_inline=$ac_kw; break
1661 else
1662 echo "configure: failed program was:" >&5
1663 cat conftest.$ac_ext >&5
1665 rm -f conftest*
1666 done
1670 echo "$ac_t""$ac_cv_c_inline" 1>&6
1671 case "$ac_cv_c_inline" in
1672 inline | yes) ;;
1673 no) cat >> confdefs.h <<\EOF
1674 #define inline
1677 *) cat >> confdefs.h <<EOF
1678 #define inline $ac_cv_c_inline
1681 esac
1683 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1684 echo "configure:1685: checking for volatile" >&5
1685 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1686 echo $ac_n "(cached) $ac_c" 1>&6
1687 else
1688 cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1692 int main() {
1693 volatile int foo;
1694 ; return 0; }
1696 if { (eval echo configure:1697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1697 rm -rf conftest*
1698 gcc_cv_c_volatile=yes
1699 else
1700 echo "configure: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 rm -rf conftest*
1703 gcc_cv_c_volatile=no
1705 rm -f conftest*
1708 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1709 if test $gcc_cv_c_volatile = yes ; then
1710 cat >> confdefs.h <<\EOF
1711 #define HAVE_VOLATILE 1
1717 echo $ac_n "checking for long double""... $ac_c" 1>&6
1718 echo "configure:1719: checking for long double" >&5
1719 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722 if test "$GCC" = yes; then
1723 gcc_cv_c_long_double=yes
1724 else
1725 cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1729 int main() {
1730 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1731 long double foo = 0.0;
1732 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1733 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1734 ; return 0; }
1736 if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1737 rm -rf conftest*
1738 gcc_cv_c_long_double=yes
1739 else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 gcc_cv_c_long_double=no
1745 rm -f conftest*
1749 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1750 if test $gcc_cv_c_long_double = yes; then
1751 cat >> confdefs.h <<\EOF
1752 #define HAVE_LONG_DOUBLE 1
1757 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1758 echo "configure:1759: checking for long long int" >&5
1759 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1760 echo $ac_n "(cached) $ac_c" 1>&6
1761 else
1762 cat > conftest.$ac_ext <<EOF
1763 #line 1764 "configure"
1764 #include "confdefs.h"
1766 int main() {
1767 long long int i;
1768 ; return 0; }
1770 if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1771 rm -rf conftest*
1772 ac_cv_c_long_long=yes
1773 else
1774 echo "configure: failed program was:" >&5
1775 cat conftest.$ac_ext >&5
1776 rm -rf conftest*
1777 ac_cv_c_long_long=no
1779 rm -f conftest*
1782 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1783 if test $ac_cv_c_long_long = yes; then
1784 cat >> confdefs.h <<\EOF
1785 #define HAVE_LONG_LONG 1
1789 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1790 echo "configure:1791: checking for __int64" >&5
1791 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1792 echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794 cat > conftest.$ac_ext <<EOF
1795 #line 1796 "configure"
1796 #include "confdefs.h"
1798 int main() {
1799 __int64 i;
1800 ; return 0; }
1802 if { (eval echo configure:1803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1803 rm -rf conftest*
1804 ac_cv_c___int64=yes
1805 else
1806 echo "configure: failed program was:" >&5
1807 cat conftest.$ac_ext >&5
1808 rm -rf conftest*
1809 ac_cv_c___int64=no
1811 rm -f conftest*
1814 echo "$ac_t""$ac_cv_c___int64" 1>&6
1815 if test $ac_cv_c___int64 = yes; then
1816 cat >> confdefs.h <<\EOF
1817 #define HAVE___INT64 1
1822 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1823 echo "configure:1824: checking for built-in _Bool" >&5
1824 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1825 echo $ac_n "(cached) $ac_c" 1>&6
1826 else
1827 cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1831 int main() {
1832 _Bool foo;
1833 ; return 0; }
1835 if { (eval echo configure:1836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1836 rm -rf conftest*
1837 gcc_cv_c__bool=yes
1838 else
1839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 rm -rf conftest*
1842 gcc_cv_c__bool=no
1844 rm -f conftest*
1848 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1849 if test $gcc_cv_c__bool = yes; then
1850 cat >> confdefs.h <<\EOF
1851 #define HAVE__BOOL 1
1857 # sizeof(char) is 1 by definition.
1858 echo $ac_n "checking size of short""... $ac_c" 1>&6
1859 echo "configure:1860: checking size of short" >&5
1860 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1861 echo $ac_n "(cached) $ac_c" 1>&6
1862 else
1863 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1864 cat > conftest.$ac_ext <<EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867 #include "confdefs.h"
1868 #include <sys/types.h>
1871 int main() {
1872 switch (0) case 0: case (sizeof (short) == $ac_size):;
1873 ; return 0; }
1875 if { (eval echo configure:1876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1876 rm -rf conftest*
1877 ac_cv_sizeof_short=$ac_size
1878 else
1879 echo "configure: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1882 rm -f conftest*
1883 if test x$ac_cv_sizeof_short != x ; then break; fi
1884 done
1888 if test x$ac_cv_sizeof_short = x ; then
1889 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1891 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1892 cat >> confdefs.h <<EOF
1893 #define SIZEOF_SHORT $ac_cv_sizeof_short
1897 echo $ac_n "checking size of int""... $ac_c" 1>&6
1898 echo "configure:1899: checking size of int" >&5
1899 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1903 cat > conftest.$ac_ext <<EOF
1904 #line 1905 "configure"
1905 #include "confdefs.h"
1906 #include "confdefs.h"
1907 #include <sys/types.h>
1910 int main() {
1911 switch (0) case 0: case (sizeof (int) == $ac_size):;
1912 ; return 0; }
1914 if { (eval echo configure:1915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1915 rm -rf conftest*
1916 ac_cv_sizeof_int=$ac_size
1917 else
1918 echo "configure: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1921 rm -f conftest*
1922 if test x$ac_cv_sizeof_int != x ; then break; fi
1923 done
1927 if test x$ac_cv_sizeof_int = x ; then
1928 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1930 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1931 cat >> confdefs.h <<EOF
1932 #define SIZEOF_INT $ac_cv_sizeof_int
1936 echo $ac_n "checking size of long""... $ac_c" 1>&6
1937 echo "configure:1938: checking size of long" >&5
1938 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1939 echo $ac_n "(cached) $ac_c" 1>&6
1940 else
1941 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 #include "confdefs.h"
1946 #include <sys/types.h>
1949 int main() {
1950 switch (0) case 0: case (sizeof (long) == $ac_size):;
1951 ; return 0; }
1953 if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1954 rm -rf conftest*
1955 ac_cv_sizeof_long=$ac_size
1956 else
1957 echo "configure: failed program was:" >&5
1958 cat conftest.$ac_ext >&5
1960 rm -f conftest*
1961 if test x$ac_cv_sizeof_long != x ; then break; fi
1962 done
1966 if test x$ac_cv_sizeof_long = x ; then
1967 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1969 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1970 cat >> confdefs.h <<EOF
1971 #define SIZEOF_LONG $ac_cv_sizeof_long
1975 if test $ac_cv_c_long_long = yes; then
1976 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1977 echo "configure:1978: checking size of long long" >&5
1978 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985 #include "confdefs.h"
1986 #include <sys/types.h>
1989 int main() {
1990 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1991 ; return 0; }
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1994 rm -rf conftest*
1995 ac_cv_sizeof_long_long=$ac_size
1996 else
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
2000 rm -f conftest*
2001 if test x$ac_cv_sizeof_long_long != x ; then break; fi
2002 done
2006 if test x$ac_cv_sizeof_long_long = x ; then
2007 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
2009 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2010 cat >> confdefs.h <<EOF
2011 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2016 if test $ac_cv_c___int64 = yes; then
2017 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
2018 echo "configure:2019: checking size of __int64" >&5
2019 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
2020 echo $ac_n "(cached) $ac_c" 1>&6
2021 else
2022 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2023 cat > conftest.$ac_ext <<EOF
2024 #line 2025 "configure"
2025 #include "confdefs.h"
2026 #include "confdefs.h"
2027 #include <sys/types.h>
2030 int main() {
2031 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
2032 ; return 0; }
2034 if { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2035 rm -rf conftest*
2036 ac_cv_sizeof___int64=$ac_size
2037 else
2038 echo "configure: failed program was:" >&5
2039 cat conftest.$ac_ext >&5
2041 rm -f conftest*
2042 if test x$ac_cv_sizeof___int64 != x ; then break; fi
2043 done
2047 if test x$ac_cv_sizeof___int64 = x ; then
2048 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
2050 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
2051 cat >> confdefs.h <<EOF
2052 #define SIZEOF___INT64 $ac_cv_sizeof___int64
2058 echo $ac_n "checking execution character set""... $ac_c" 1>&6
2059 echo "configure:2060: checking execution character set" >&5
2060 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
2061 echo $ac_n "(cached) $ac_c" 1>&6
2062 else
2063 cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
2067 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
2068 ASCII
2069 #endif
2071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2072 egrep "ASCII" >/dev/null 2>&1; then
2073 rm -rf conftest*
2074 ac_cv_c_charset=ASCII
2076 rm -f conftest*
2078 if test x${ac_cv_c_charset+set} != xset; then
2079 cat > conftest.$ac_ext <<EOF
2080 #line 2081 "configure"
2081 #include "confdefs.h"
2082 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
2083 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
2084 EBCDIC
2085 #endif
2087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2088 egrep "EBCDIC" >/dev/null 2>&1; then
2089 rm -rf conftest*
2090 ac_cv_c_charset=EBCDIC
2092 rm -f conftest*
2095 if test x${ac_cv_c_charset+set} != xset; then
2096 ac_cv_c_charset=unknown
2100 echo "$ac_t""$ac_cv_c_charset" 1>&6
2101 if test $ac_cv_c_charset = unknown; then
2102 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
2103 elif test $ac_cv_c_charset = EBCDIC; then
2104 cat >> confdefs.h <<\EOF
2105 #define HOST_EBCDIC 1
2110 # If the native compiler is GCC, we can enable warnings even in stage1.
2111 # That's useful for people building cross-compilers, or just running a
2112 # quick `make'.
2113 warn_cflags=
2114 if test "x$GCC" = "xyes"; then
2115 warn_cflags='$(GCC_WARN_CFLAGS)'
2119 # Stage specific cflags for build.
2120 stage1_cflags=
2121 case $build in
2122 vax-*-*)
2123 if test x$GCC = xyes
2124 then
2125 stage1_cflags="-Wa,-J"
2126 else
2127 stage1_cflags="-J"
2130 powerpc-*-darwin*)
2131 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2132 # sources; use -no-cpp-precomp to get to GNU cpp.
2133 # Apple's GCC has bugs in designated initializer handling, so disable
2134 # that too.
2135 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2137 esac
2140 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2141 echo "configure:2142: checking whether ${MAKE-make} sets \${MAKE}" >&5
2142 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2143 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2144 echo $ac_n "(cached) $ac_c" 1>&6
2145 else
2146 cat > conftestmake <<\EOF
2147 all:
2148 @echo 'ac_maketemp="${MAKE}"'
2150 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2151 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2152 if test -n "$ac_maketemp"; then
2153 eval ac_cv_prog_make_${ac_make}_set=yes
2154 else
2155 eval ac_cv_prog_make_${ac_make}_set=no
2157 rm -f conftestmake
2159 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2160 echo "$ac_t""yes" 1>&6
2161 SET_MAKE=
2162 else
2163 echo "$ac_t""no" 1>&6
2164 SET_MAKE="MAKE=${MAKE-make}"
2168 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2169 echo "configure:2170: checking whether a default assembler was specified" >&5
2170 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2171 if test x"$gas_flag" = x"no"; then
2172 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2173 else
2174 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2176 else
2177 echo "$ac_t""no" 1>&6
2180 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2181 echo "configure:2182: checking whether a default linker was specified" >&5
2182 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2183 if test x"$gnu_ld_flag" = x"no"; then
2184 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2185 else
2186 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2188 else
2189 echo "$ac_t""no" 1>&6
2192 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2193 echo "configure:2194: checking for GNU C library" >&5
2194 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2196 else
2197 cat > conftest.$ac_ext <<EOF
2198 #line 2199 "configure"
2199 #include "confdefs.h"
2200 #include <features.h>
2201 int main() {
2203 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2204 #error Not a GNU C library system
2205 #endif
2206 ; return 0; }
2208 if { (eval echo configure:2209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2209 rm -rf conftest*
2210 gcc_cv_glibc=yes
2211 else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 gcc_cv_glibc=no
2217 rm -f conftest*
2220 echo "$ac_t""$gcc_cv_glibc" 1>&6
2221 if test $gcc_cv_glibc = yes; then
2222 cat >> confdefs.h <<\EOF
2223 #define _GNU_SOURCE 1
2228 # Find some useful tools
2229 for ac_prog in gawk mawk nawk awk
2231 # Extract the first word of "$ac_prog", so it can be a program name with args.
2232 set dummy $ac_prog; ac_word=$2
2233 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2234 echo "configure:2235: checking for $ac_word" >&5
2235 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2236 echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238 if test -n "$AWK"; then
2239 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2240 else
2241 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2242 ac_dummy="$PATH"
2243 for ac_dir in $ac_dummy; do
2244 test -z "$ac_dir" && ac_dir=.
2245 if test -f $ac_dir/$ac_word; then
2246 ac_cv_prog_AWK="$ac_prog"
2247 break
2249 done
2250 IFS="$ac_save_ifs"
2253 AWK="$ac_cv_prog_AWK"
2254 if test -n "$AWK"; then
2255 echo "$ac_t""$AWK" 1>&6
2256 else
2257 echo "$ac_t""no" 1>&6
2260 test -n "$AWK" && break
2261 done
2263 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2264 echo "configure:2265: checking whether ln works" >&5
2265 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2266 echo $ac_n "(cached) $ac_c" 1>&6
2267 else
2268 rm -f conftestdata_t
2269 echo >conftestdata_f
2270 if ln conftestdata_f conftestdata_t 2>/dev/null
2271 then
2272 gcc_cv_prog_LN="ln"
2273 else
2274 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2275 then
2276 gcc_cv_prog_LN="ln -s"
2277 else
2278 gcc_cv_prog_LN=cp
2281 rm -f conftestdata_f conftestdata_t
2284 LN="$gcc_cv_prog_LN"
2285 if test "$gcc_cv_prog_LN" = "ln"; then
2286 echo "$ac_t""yes" 1>&6
2287 else
2288 if test "$gcc_cv_prog_LN" = "ln -s"; then
2289 echo "$ac_t""no, using ln -s" 1>&6
2290 else
2291 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2295 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2296 echo "configure:2297: checking whether ln -s works" >&5
2297 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2298 echo $ac_n "(cached) $ac_c" 1>&6
2299 else
2300 rm -f conftestdata_t
2301 echo >conftestdata_f
2302 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2303 then
2304 gcc_cv_prog_LN_S="ln -s"
2305 else
2306 if ln conftestdata_f conftestdata_t 2>/dev/null
2307 then
2308 gcc_cv_prog_LN_S=ln
2309 else
2310 gcc_cv_prog_LN_S=cp
2313 rm -f conftestdata_f conftestdata_t
2316 LN_S="$gcc_cv_prog_LN_S"
2317 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2318 echo "$ac_t""yes" 1>&6
2319 else
2320 if test "$gcc_cv_prog_LN_S" = "ln"; then
2321 echo "$ac_t""no, using ln" 1>&6
2322 else
2323 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2327 # Extract the first word of "ranlib", so it can be a program name with args.
2328 set dummy ranlib; ac_word=$2
2329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2330 echo "configure:2331: checking for $ac_word" >&5
2331 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333 else
2334 if test -n "$RANLIB"; then
2335 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2336 else
2337 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2338 ac_dummy="$PATH"
2339 for ac_dir in $ac_dummy; do
2340 test -z "$ac_dir" && ac_dir=.
2341 if test -f $ac_dir/$ac_word; then
2342 ac_cv_prog_RANLIB="ranlib"
2343 break
2345 done
2346 IFS="$ac_save_ifs"
2347 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2350 RANLIB="$ac_cv_prog_RANLIB"
2351 if test -n "$RANLIB"; then
2352 echo "$ac_t""$RANLIB" 1>&6
2353 else
2354 echo "$ac_t""no" 1>&6
2357 # Find a good install program. We prefer a C program (faster),
2358 # so one script is as good as another. But avoid the broken or
2359 # incompatible versions:
2360 # SysV /etc/install, /usr/sbin/install
2361 # SunOS /usr/etc/install
2362 # IRIX /sbin/install
2363 # AIX /bin/install
2364 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2365 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2366 # ./install, which can be erroneously created by make from ./install.sh.
2367 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2368 echo "configure:2369: checking for a BSD compatible install" >&5
2369 if test -z "$INSTALL"; then
2370 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2374 for ac_dir in $PATH; do
2375 # Account for people who put trailing slashes in PATH elements.
2376 case "$ac_dir/" in
2377 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2379 # OSF1 and SCO ODT 3.0 have their own names for install.
2380 for ac_prog in ginstall scoinst install; do
2381 if test -f $ac_dir/$ac_prog; then
2382 if test $ac_prog = install &&
2383 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2384 # AIX install. It has an incompatible calling convention.
2385 # OSF/1 installbsd also uses dspmsg, but is usable.
2387 else
2388 ac_cv_path_install="$ac_dir/$ac_prog -c"
2389 break 2
2392 done
2394 esac
2395 done
2396 IFS="$ac_save_IFS"
2399 if test "${ac_cv_path_install+set}" = set; then
2400 INSTALL="$ac_cv_path_install"
2401 else
2402 # As a last resort, use the slow shell script. We don't cache a
2403 # path for INSTALL within a source directory, because that will
2404 # break other packages using the cache if that directory is
2405 # removed, or if the path is relative.
2406 INSTALL="$ac_install_sh"
2409 echo "$ac_t""$INSTALL" 1>&6
2411 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2412 # It thinks the first close brace ends the variable substitution.
2413 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2415 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2418 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2419 echo "configure:2420: checking for ANSI C header files" >&5
2420 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2421 echo $ac_n "(cached) $ac_c" 1>&6
2422 else
2423 cat > conftest.$ac_ext <<EOF
2424 #line 2425 "configure"
2425 #include "confdefs.h"
2426 #include <stdlib.h>
2427 #include <stdarg.h>
2428 #include <string.h>
2429 #include <float.h>
2431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432 { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2434 if test -z "$ac_err"; then
2435 rm -rf conftest*
2436 ac_cv_header_stdc=yes
2437 else
2438 echo "$ac_err" >&5
2439 echo "configure: failed program was:" >&5
2440 cat conftest.$ac_ext >&5
2441 rm -rf conftest*
2442 ac_cv_header_stdc=no
2444 rm -f conftest*
2446 if test $ac_cv_header_stdc = yes; then
2447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2448 cat > conftest.$ac_ext <<EOF
2449 #line 2450 "configure"
2450 #include "confdefs.h"
2451 #include <string.h>
2453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2454 egrep "memchr" >/dev/null 2>&1; then
2456 else
2457 rm -rf conftest*
2458 ac_cv_header_stdc=no
2460 rm -f conftest*
2464 if test $ac_cv_header_stdc = yes; then
2465 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <stdlib.h>
2471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2472 egrep "free" >/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 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2484 if test "$cross_compiling" = yes; then
2486 else
2487 cat > conftest.$ac_ext <<EOF
2488 #line 2489 "configure"
2489 #include "confdefs.h"
2490 #include <ctype.h>
2491 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2492 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2493 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2494 int main () { int i; for (i = 0; i < 256; i++)
2495 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2496 exit (0); }
2499 if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2500 then
2502 else
2503 echo "configure: failed program was:" >&5
2504 cat conftest.$ac_ext >&5
2505 rm -fr conftest*
2506 ac_cv_header_stdc=no
2508 rm -fr conftest*
2514 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2515 if test $ac_cv_header_stdc = yes; then
2516 cat >> confdefs.h <<\EOF
2517 #define STDC_HEADERS 1
2522 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2523 echo "configure:2524: checking whether time.h and sys/time.h may both be included" >&5
2524 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530 #include <sys/types.h>
2531 #include <sys/time.h>
2532 #include <time.h>
2533 int main() {
2534 struct tm *tp;
2535 ; return 0; }
2537 if { (eval echo configure:2538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2538 rm -rf conftest*
2539 ac_cv_header_time=yes
2540 else
2541 echo "configure: failed program was:" >&5
2542 cat conftest.$ac_ext >&5
2543 rm -rf conftest*
2544 ac_cv_header_time=no
2546 rm -f conftest*
2549 echo "$ac_t""$ac_cv_header_time" 1>&6
2550 if test $ac_cv_header_time = yes; then
2551 cat >> confdefs.h <<\EOF
2552 #define TIME_WITH_SYS_TIME 1
2557 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2558 echo "configure:2559: checking for working stdbool.h" >&5
2559 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2560 echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562 cat > conftest.$ac_ext <<EOF
2563 #line 2564 "configure"
2564 #include "confdefs.h"
2565 #include <stdbool.h>
2566 int main() {
2567 bool foo = false;
2568 ; return 0; }
2570 if { (eval echo configure:2571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2571 rm -rf conftest*
2572 ac_cv_header_stdbool_h=yes
2573 else
2574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
2576 rm -rf conftest*
2577 ac_cv_header_stdbool_h=no
2579 rm -f conftest*
2582 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2583 if test $ac_cv_header_stdbool_h = yes; then
2584 cat >> confdefs.h <<\EOF
2585 #define HAVE_STDBOOL_H 1
2590 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2591 echo "configure:2592: checking whether string.h and strings.h may both be included" >&5
2592 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598 #include <string.h>
2599 #include <strings.h>
2600 int main() {
2602 ; return 0; }
2604 if { (eval echo configure:2605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2605 rm -rf conftest*
2606 gcc_cv_header_string=yes
2607 else
2608 echo "configure: failed program was:" >&5
2609 cat conftest.$ac_ext >&5
2610 rm -rf conftest*
2611 gcc_cv_header_string=no
2613 rm -f conftest*
2616 echo "$ac_t""$gcc_cv_header_string" 1>&6
2617 if test $gcc_cv_header_string = yes; then
2618 cat >> confdefs.h <<\EOF
2619 #define STRING_WITH_STRINGS 1
2624 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2625 echo "configure:2626: checking for sys/wait.h that is POSIX.1 compatible" >&5
2626 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2627 echo $ac_n "(cached) $ac_c" 1>&6
2628 else
2629 cat > conftest.$ac_ext <<EOF
2630 #line 2631 "configure"
2631 #include "confdefs.h"
2632 #include <sys/types.h>
2633 #include <sys/wait.h>
2634 #ifndef WEXITSTATUS
2635 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2636 #endif
2637 #ifndef WIFEXITED
2638 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2639 #endif
2640 int main() {
2641 int s;
2642 wait (&s);
2643 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2644 ; return 0; }
2646 if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2647 rm -rf conftest*
2648 ac_cv_header_sys_wait_h=yes
2649 else
2650 echo "configure: failed program was:" >&5
2651 cat conftest.$ac_ext >&5
2652 rm -rf conftest*
2653 ac_cv_header_sys_wait_h=no
2655 rm -f conftest*
2658 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2659 if test $ac_cv_header_sys_wait_h = yes; then
2660 cat >> confdefs.h <<\EOF
2661 #define HAVE_SYS_WAIT_H 1
2666 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2667 fcntl.h unistd.h sys/file.h sys/time.h \
2668 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2669 direct.h malloc.h langinfo.h
2671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2673 echo "configure:2674: checking for $ac_hdr" >&5
2674 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677 cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680 #include <$ac_hdr>
2682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2683 { (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2685 if test -z "$ac_err"; then
2686 rm -rf conftest*
2687 eval "ac_cv_header_$ac_safe=yes"
2688 else
2689 echo "$ac_err" >&5
2690 echo "configure: failed program was:" >&5
2691 cat conftest.$ac_ext >&5
2692 rm -rf conftest*
2693 eval "ac_cv_header_$ac_safe=no"
2695 rm -f conftest*
2697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2698 echo "$ac_t""yes" 1>&6
2699 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2700 cat >> confdefs.h <<EOF
2701 #define $ac_tr_hdr 1
2704 else
2705 echo "$ac_t""no" 1>&6
2707 done
2710 # Check for thread headers.
2711 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2712 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2713 echo "configure:2714: checking for thread.h" >&5
2714 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717 cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720 #include <thread.h>
2722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2723 { (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2725 if test -z "$ac_err"; then
2726 rm -rf conftest*
2727 eval "ac_cv_header_$ac_safe=yes"
2728 else
2729 echo "$ac_err" >&5
2730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -rf conftest*
2733 eval "ac_cv_header_$ac_safe=no"
2735 rm -f conftest*
2737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2738 echo "$ac_t""yes" 1>&6
2739 have_thread_h=yes
2740 else
2741 echo "$ac_t""no" 1>&6
2742 have_thread_h=
2745 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2746 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2747 echo "configure:2748: checking for pthread.h" >&5
2748 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2749 echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751 cat > conftest.$ac_ext <<EOF
2752 #line 2753 "configure"
2753 #include "confdefs.h"
2754 #include <pthread.h>
2756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2757 { (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2759 if test -z "$ac_err"; then
2760 rm -rf conftest*
2761 eval "ac_cv_header_$ac_safe=yes"
2762 else
2763 echo "$ac_err" >&5
2764 echo "configure: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 rm -rf conftest*
2767 eval "ac_cv_header_$ac_safe=no"
2769 rm -f conftest*
2771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2772 echo "$ac_t""yes" 1>&6
2773 have_pthread_h=yes
2774 else
2775 echo "$ac_t""no" 1>&6
2776 have_pthread_h=
2780 # These tests can't be done till we know if we have limits.h.
2781 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2782 echo "configure:2783: checking for CHAR_BIT" >&5
2783 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2784 echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786 cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789 #ifdef HAVE_LIMITS_H
2790 #include <limits.h>
2791 #endif
2792 #ifdef CHAR_BIT
2793 found
2794 #endif
2796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2797 egrep "found" >/dev/null 2>&1; then
2798 rm -rf conftest*
2799 gcc_cv_decl_char_bit=yes
2800 else
2801 rm -rf conftest*
2802 gcc_cv_decl_char_bit=no
2804 rm -f conftest*
2809 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2810 if test $gcc_cv_decl_char_bit = no; then
2811 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2812 echo "configure:2813: checking number of bits in a byte" >&5
2813 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2814 echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2817 gcc_cv_c_nbby=
2818 while test $i -lt 65; do
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2823 int main() {
2824 switch(0) {
2825 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2826 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2828 ; return 0; }
2830 if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2831 rm -rf conftest*
2832 gcc_cv_c_nbby=$i; break
2833 else
2834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2837 rm -f conftest*
2838 i=`expr $i + 1`
2839 done
2840 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2844 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2845 if test $gcc_cv_c_nbby = failed; then
2846 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2847 else
2848 cat >> confdefs.h <<EOF
2849 #define CHAR_BIT $gcc_cv_c_nbby
2854 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2855 echo "configure:2856: checking byte ordering" >&5
2856 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2857 echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859 ac_cv_c_compile_endian=unknown
2861 ac_ext=c
2862 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2863 ac_cpp='$CPP $CPPFLAGS'
2864 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2865 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2866 cross_compiling=$ac_cv_prog_cc_cross
2868 cat > conftest.$ac_ext <<EOF
2869 #line 2870 "configure"
2870 #include "confdefs.h"
2872 #ifdef HAVE_LIMITS_H
2873 # include <limits.h>
2874 #endif
2875 /* This structure must have no internal padding. */
2876 struct {
2877 char prefix[sizeof "\nendian:" - 1];
2878 short word;
2879 char postfix[2];
2880 } tester = {
2881 "\nendian:",
2882 #if SIZEOF_SHORT == 4
2883 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2884 #endif
2885 ('A' << CHAR_BIT) | 'B',
2886 'X', '\n'
2889 if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2890 od -c conftest.o |
2891 sed 's/^[0-7]*[ ]*/ /
2892 s/\*/./g
2893 s/ \\n/*/g
2894 s/ [0-9][0-9][0-9]/./g
2895 s/ \\[^ ]/./g' |
2896 tr -d '
2897 ' | tr -s '*' '
2898 ' | fold | sed '$a\
2899 ' > conftest.dmp
2900 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2901 ac_cv_c_compile_endian=big-endian
2902 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2903 ac_cv_c_compile_endian=little-endian
2906 rm -rf conftest*
2907 ac_ext=c
2908 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2909 ac_cpp='$CPP $CPPFLAGS'
2910 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2911 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2912 cross_compiling=$ac_cv_prog_cc_cross
2917 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2918 if test $ac_cv_c_compile_endian = unknown; then
2919 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2920 elif test $ac_cv_c_compile_endian = big-endian; then
2921 cat >> confdefs.h <<\EOF
2922 #define HOST_WORDS_BIG_ENDIAN 1
2927 echo $ac_n "checking floating point format""... $ac_c" 1>&6
2928 echo "configure:2929: checking floating point format" >&5
2929 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2930 echo $ac_n "(cached) $ac_c" 1>&6
2931 else
2933 ac_ext=c
2934 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2935 ac_cpp='$CPP $CPPFLAGS'
2936 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2937 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2938 cross_compiling=$ac_cv_prog_cc_cross
2940 cat > conftest.$ac_ext <<EOF
2941 #line 2942 "configure"
2942 #include "confdefs.h"
2943 /* This will not work unless sizeof(double) == 8. */
2944 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2946 /* This structure must have no internal padding. */
2947 struct possibility {
2948 char prefix[8];
2949 double candidate;
2950 char postfix[8];
2953 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
2954 struct possibility table [] =
2956 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
2957 C( 3.53802595280598432000e+18), /* D__float - VAX */
2958 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
2959 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
2960 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
2963 if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2964 od -c conftest.o |
2965 sed 's/^[0-7]*[ ]*/ /
2966 s/\*/./g
2967 s/ \\n/*/g
2968 s/ [0-9][0-9][0-9]/./g
2969 s/ \\[^ ]/./g' |
2970 tr -d '
2971 ' | tr -s '*' '
2972 ' | fold | sed '$a\
2973 ' > conftest.dmp
2974 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2975 ac_cv_c_float_format='IEEE (big-endian)'
2976 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
2977 ac_cv_c_float_format='IEEE (big-endian)'
2978 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
2979 ac_cv_c_float_format='IEEE (little-endian)'
2980 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
2981 ac_cv_c_float_format='IEEE (little-endian)'
2982 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
2983 ac_cv_c_float_format='VAX D-float'
2984 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
2985 ac_cv_c_float_format='PDP-10'
2986 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2987 ac_cv_c_float_format='IBM 370 hex'
2988 else
2989 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
2991 else
2992 { echo "configure: error: compile failed" 1>&2; exit 1; }
2994 rm -rf conftest*
2995 ac_ext=c
2996 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2999 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3000 cross_compiling=$ac_cv_prog_cc_cross
3005 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3006 # IEEE is the default format. If the float endianness isn't the same
3007 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3008 # (which is a tristate: yes, no, default). This is only an issue with
3009 # IEEE; the other formats are only supported by a few machines each,
3010 # all with the same endianness.
3011 format=
3012 fbigend=
3013 case $ac_cv_c_float_format in
3014 'IEEE (big-endian)' )
3015 if test $ac_cv_c_compile_endian = little-endian; then
3016 fbigend=1
3019 'IEEE (little-endian)' )
3020 if test $ac_cv_c_compile_endian = big-endian; then
3021 fbigend=0
3024 'VAX D-float' )
3025 format=VAX_FLOAT_FORMAT
3027 'PDP-10' )
3028 format=PDP10_FLOAT_FORMAT
3030 'IBM 370 hex' )
3031 format=IBM_FLOAT_FORMAT
3033 esac
3034 if test -n "$format"; then
3035 cat >> confdefs.h <<EOF
3036 #define HOST_FLOAT_FORMAT $format
3040 if test -n "$fbigend"; then
3041 cat >> confdefs.h <<EOF
3042 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3048 # See if we have the mktemp command.
3049 # Extract the first word of "mktemp", so it can be a program name with args.
3050 set dummy mktemp; ac_word=$2
3051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3052 echo "configure:3053: checking for $ac_word" >&5
3053 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3054 echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056 if test -n "$have_mktemp_command"; then
3057 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3058 else
3059 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3060 ac_dummy="$PATH"
3061 for ac_dir in $ac_dummy; do
3062 test -z "$ac_dir" && ac_dir=.
3063 if test -f $ac_dir/$ac_word; then
3064 ac_cv_prog_have_mktemp_command="yes"
3065 break
3067 done
3068 IFS="$ac_save_ifs"
3069 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3072 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3073 if test -n "$have_mktemp_command"; then
3074 echo "$ac_t""$have_mktemp_command" 1>&6
3075 else
3076 echo "$ac_t""no" 1>&6
3080 # Do we have a single-tree copy of texinfo?
3081 if test -f $srcdir/../texinfo/Makefile.in; then
3082 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3083 gcc_cv_prog_makeinfo_modern=yes
3084 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3085 else
3086 # See if makeinfo has been installed and is modern enough
3087 # that we can use it.
3088 # Extract the first word of "makeinfo", so it can be a program name with args.
3089 set dummy makeinfo; ac_word=$2
3090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3091 echo "configure:3092: checking for $ac_word" >&5
3092 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3093 echo $ac_n "(cached) $ac_c" 1>&6
3094 else
3095 if test -n "$MAKEINFO"; then
3096 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3097 else
3098 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3099 ac_dummy="$PATH"
3100 for ac_dir in $ac_dummy; do
3101 test -z "$ac_dir" && ac_dir=.
3102 if test -f $ac_dir/$ac_word; then
3103 ac_cv_prog_MAKEINFO="makeinfo"
3104 break
3106 done
3107 IFS="$ac_save_ifs"
3110 MAKEINFO="$ac_cv_prog_MAKEINFO"
3111 if test -n "$MAKEINFO"; then
3112 echo "$ac_t""$MAKEINFO" 1>&6
3113 else
3114 echo "$ac_t""no" 1>&6
3117 if test -n "$MAKEINFO"; then
3118 # Found it, now check the version.
3119 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3120 echo "configure:3121: checking for modern makeinfo" >&5
3121 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3122 echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124 ac_prog_version=`$MAKEINFO --version 2>&1 |
3125 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3126 echo "configure:3127: version of makeinfo is $ac_prog_version" >&5
3127 case $ac_prog_version in
3128 '') gcc_cv_prog_makeinfo_modern=no;;
3129 4.[1-9]*)
3130 gcc_cv_prog_makeinfo_modern=yes;;
3131 *) gcc_cv_prog_makeinfo_modern=no;;
3132 esac
3136 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3137 else
3138 gcc_cv_prog_makeinfo_modern=no
3143 if test $gcc_cv_prog_makeinfo_modern = no; then
3144 echo "configure: warning:
3145 *** Makeinfo is missing or too old.
3146 *** Info documentation will not be built." 1>&2
3147 BUILD_INFO=
3148 else
3149 BUILD_INFO=info
3152 # Is pod2man recent enough to regenerate manpages?
3153 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3154 echo "configure:3155: checking for recent Pod::Man" >&5
3155 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3156 echo "$ac_t""yes" 1>&6
3157 GENERATED_MANPAGES=generated-manpages
3158 else
3159 echo "$ac_t""no" 1>&6
3160 GENERATED_MANPAGES=
3163 # How about lex?
3164 if test -f $srcdir/../flex/skel.c; then
3165 FLEX='$(objdir)/../flex/flex'
3166 else
3167 # Extract the first word of "flex", so it can be a program name with args.
3168 set dummy flex; ac_word=$2
3169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_word" >&5
3171 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174 if test -n "$FLEX"; then
3175 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3176 else
3177 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3178 ac_dummy="$PATH"
3179 for ac_dir in $ac_dummy; do
3180 test -z "$ac_dir" && ac_dir=.
3181 if test -f $ac_dir/$ac_word; then
3182 ac_cv_prog_FLEX="flex"
3183 break
3185 done
3186 IFS="$ac_save_ifs"
3187 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3190 FLEX="$ac_cv_prog_FLEX"
3191 if test -n "$FLEX"; then
3192 echo "$ac_t""$FLEX" 1>&6
3193 else
3194 echo "$ac_t""no" 1>&6
3199 # Bison?
3200 # The -L switch is so bison can find its skeleton file.
3201 if test -f $srcdir/../bison/bison.simple; then
3202 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3203 else
3204 # Extract the first word of "bison", so it can be a program name with args.
3205 set dummy bison; ac_word=$2
3206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_word" >&5
3208 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3209 echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211 if test -n "$BISON"; then
3212 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3213 else
3214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3215 ac_dummy="$PATH"
3216 for ac_dir in $ac_dummy; do
3217 test -z "$ac_dir" && ac_dir=.
3218 if test -f $ac_dir/$ac_word; then
3219 ac_cv_prog_BISON="bison"
3220 break
3222 done
3223 IFS="$ac_save_ifs"
3224 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3227 BISON="$ac_cv_prog_BISON"
3228 if test -n "$BISON"; then
3229 echo "$ac_t""$BISON" 1>&6
3230 else
3231 echo "$ac_t""no" 1>&6
3236 # These libraries may be used by collect2.
3237 # We may need a special search path to get them linked.
3238 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3239 echo "configure:3240: checking for collect2 libraries" >&5
3240 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3241 echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243 save_LIBS="$LIBS"
3244 for libs in '' -lld -lmld \
3245 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3246 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3248 LIBS="$libs"
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 /* Override any gcc2 internal prototype to avoid an error. */
3253 /* We use char because int might match the return type of a gcc2
3254 builtin and then its argument prototype would still apply. */
3255 char ldopen();
3257 int main() {
3258 ldopen()
3259 ; return 0; }
3261 if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3262 rm -rf conftest*
3263 gcc_cv_collect2_libs="$libs"; break
3264 else
3265 echo "configure: failed program was:" >&5
3266 cat conftest.$ac_ext >&5
3268 rm -f conftest*
3269 done
3270 LIBS="$save_LIBS"
3271 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3274 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3275 case $gcc_cv_collect2_libs in
3276 "none required") ;;
3277 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3278 esac
3281 # When building Ada code on Alpha, we need exc_resume which is usually in
3282 # -lexc. So test for it.
3283 save_LIBS="$LIBS"
3284 LIBS=
3286 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3287 echo "configure:3288: checking for library containing exc_resume" >&5
3288 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3289 echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291 ac_func_search_save_LIBS="$LIBS"
3292 ac_cv_search_exc_resume="no"
3293 cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 /* Override any gcc2 internal prototype to avoid an error. */
3297 /* We use char because int might match the return type of a gcc2
3298 builtin and then its argument prototype would still apply. */
3299 char exc_resume();
3301 int main() {
3302 exc_resume()
3303 ; return 0; }
3305 if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3306 rm -rf conftest*
3307 ac_cv_search_exc_resume="none required"
3308 else
3309 echo "configure: failed program was:" >&5
3310 cat conftest.$ac_ext >&5
3312 rm -f conftest*
3313 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3314 LIBS="-l$i $ac_func_search_save_LIBS"
3315 cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 /* Override any gcc2 internal prototype to avoid an error. */
3319 /* We use char because int might match the return type of a gcc2
3320 builtin and then its argument prototype would still apply. */
3321 char exc_resume();
3323 int main() {
3324 exc_resume()
3325 ; return 0; }
3327 if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3328 rm -rf conftest*
3329 ac_cv_search_exc_resume="-l$i"
3330 break
3331 else
3332 echo "configure: failed program was:" >&5
3333 cat conftest.$ac_ext >&5
3335 rm -f conftest*
3336 done
3337 LIBS="$ac_func_search_save_LIBS"
3340 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3341 if test "$ac_cv_search_exc_resume" != "no"; then
3342 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3344 else :
3347 GNAT_LIBEXC="$LIBS"
3348 LIBS="$save_LIBS"
3351 # See if the stage1 system preprocessor understands the ANSI C
3352 # preprocessor stringification operator. (Used by symcat.h.)
3355 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3356 echo "configure:3357: checking for preprocessor stringizing operator" >&5
3357 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3358 echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3364 #define x(y) #y
3366 char *s = x(teststring);
3369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3370 egrep "#teststring" >/dev/null 2>&1; then
3371 rm -rf conftest*
3372 ac_cv_c_stringize=no
3373 else
3374 rm -rf conftest*
3375 ac_cv_c_stringize=yes
3377 rm -f conftest*
3381 if test "${ac_cv_c_stringize}" = yes
3382 then
3383 cat >> confdefs.h <<\EOF
3384 #define HAVE_STRINGIZE 1
3388 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3391 # Use <inttypes.h> only if it exists,
3392 # doesn't clash with <sys/types.h>, and declares intmax_t.
3393 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3394 echo "configure:3395: checking for inttypes.h" >&5
3395 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3396 echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401 #include <sys/types.h>
3402 #include <inttypes.h>
3403 int main() {
3404 intmax_t i = -1;
3405 ; return 0; }
3407 if { (eval echo configure:3408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3408 rm -rf conftest*
3409 gcc_cv_header_inttypes_h=yes
3410 else
3411 echo "configure: failed program was:" >&5
3412 cat conftest.$ac_ext >&5
3413 rm -rf conftest*
3414 gcc_cv_header_inttypes_h=no
3416 rm -f conftest*
3419 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3420 if test $gcc_cv_header_inttypes_h = yes; then
3421 cat >> confdefs.h <<\EOF
3422 #define HAVE_INTTYPES_H 1
3428 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3429 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3430 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3431 scandir alphasort
3433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3434 echo "configure:3435: checking for $ac_func" >&5
3435 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3436 echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438 cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 /* System header to define __stub macros and hopefully few prototypes,
3442 which can conflict with char $ac_func(); below. */
3443 #include <assert.h>
3444 /* Override any gcc2 internal prototype to avoid an error. */
3445 /* We use char because int might match the return type of a gcc2
3446 builtin and then its argument prototype would still apply. */
3447 char $ac_func();
3449 int main() {
3451 /* The GNU C library defines this for functions which it implements
3452 to always fail with ENOSYS. Some functions are actually named
3453 something starting with __ and the normal name is an alias. */
3454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3455 choke me
3456 #else
3457 $ac_func();
3458 #endif
3460 ; return 0; }
3462 if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3463 rm -rf conftest*
3464 eval "ac_cv_func_$ac_func=yes"
3465 else
3466 echo "configure: failed program was:" >&5
3467 cat conftest.$ac_ext >&5
3468 rm -rf conftest*
3469 eval "ac_cv_func_$ac_func=no"
3471 rm -f conftest*
3474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3475 echo "$ac_t""yes" 1>&6
3476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3477 cat >> confdefs.h <<EOF
3478 #define $ac_tr_func 1
3481 else
3482 echo "$ac_t""no" 1>&6
3484 done
3487 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3488 echo "configure:3489: checking for ssize_t" >&5
3489 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3490 echo $ac_n "(cached) $ac_c" 1>&6
3491 else
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <sys/types.h>
3496 #if STDC_HEADERS
3497 #include <stdlib.h>
3498 #include <stddef.h>
3499 #endif
3501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3502 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3503 rm -rf conftest*
3504 ac_cv_type_ssize_t=yes
3505 else
3506 rm -rf conftest*
3507 ac_cv_type_ssize_t=no
3509 rm -f conftest*
3512 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3513 if test $ac_cv_type_ssize_t = no; then
3514 cat >> confdefs.h <<\EOF
3515 #define ssize_t int
3521 # Try to determine the array type of the second argument of getgroups
3522 # for the target system (int or gid_t).
3523 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3524 echo "configure:3525: checking for uid_t in sys/types.h" >&5
3525 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3526 echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <sys/types.h>
3533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3534 egrep "uid_t" >/dev/null 2>&1; then
3535 rm -rf conftest*
3536 ac_cv_type_uid_t=yes
3537 else
3538 rm -rf conftest*
3539 ac_cv_type_uid_t=no
3541 rm -f conftest*
3545 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3546 if test $ac_cv_type_uid_t = no; then
3547 cat >> confdefs.h <<\EOF
3548 #define uid_t int
3551 cat >> confdefs.h <<\EOF
3552 #define gid_t int
3557 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3558 echo "configure:3559: checking type of array argument to getgroups" >&5
3559 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3560 echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562 if test "$cross_compiling" = yes; then
3563 ac_cv_type_getgroups=cross
3564 else
3565 cat > conftest.$ac_ext <<EOF
3566 #line 3567 "configure"
3567 #include "confdefs.h"
3569 /* Thanks to Mike Rendell for this test. */
3570 #include <sys/types.h>
3571 #define NGID 256
3572 #undef MAX
3573 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3574 main()
3576 gid_t gidset[NGID];
3577 int i, n;
3578 union { gid_t gval; long lval; } val;
3580 val.lval = -1;
3581 for (i = 0; i < NGID; i++)
3582 gidset[i] = val.gval;
3583 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3584 gidset);
3585 /* Exit non-zero if getgroups seems to require an array of ints. This
3586 happens when gid_t is short but getgroups modifies an array of ints. */
3587 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3591 if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3592 then
3593 ac_cv_type_getgroups=gid_t
3594 else
3595 echo "configure: failed program was:" >&5
3596 cat conftest.$ac_ext >&5
3597 rm -fr conftest*
3598 ac_cv_type_getgroups=int
3600 rm -fr conftest*
3603 if test $ac_cv_type_getgroups = cross; then
3604 cat > conftest.$ac_ext <<EOF
3605 #line 3606 "configure"
3606 #include "confdefs.h"
3607 #include <unistd.h>
3609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3610 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3611 rm -rf conftest*
3612 ac_cv_type_getgroups=gid_t
3613 else
3614 rm -rf conftest*
3615 ac_cv_type_getgroups=int
3617 rm -f conftest*
3622 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3623 cat >> confdefs.h <<EOF
3624 #define GETGROUPS_T $ac_cv_type_getgroups
3628 if test "${target}" = "${build}"; then
3629 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3630 else
3631 case "${target}" in
3632 # This condition may need some tweaking. It should include all
3633 # targets where the array type of the second argument of getgroups
3634 # is int and the type of gid_t is not equivalent to int.
3635 *-*-sunos* | *-*-ultrix*)
3636 TARGET_GETGROUPS_T=int
3639 TARGET_GETGROUPS_T=gid_t
3641 esac
3645 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3646 echo "configure:3647: checking whether the printf functions support %p" >&5
3647 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3648 echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650 if test "$cross_compiling" = yes; then
3651 gcc_cv_func_printf_ptr=no
3652 else
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <stdio.h>
3658 int main()
3660 char buf[64];
3661 char *p = buf, *q = NULL;
3662 sprintf(buf, "%p", p);
3663 sscanf(buf, "%p", &q);
3664 return (p != q);
3667 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3668 then
3669 gcc_cv_func_printf_ptr=yes
3670 else
3671 echo "configure: failed program was:" >&5
3672 cat conftest.$ac_ext >&5
3673 rm -fr conftest*
3674 gcc_cv_func_printf_ptr=no
3676 rm -fr conftest*
3679 rm -f core core.* *.core
3682 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3683 if test $gcc_cv_func_printf_ptr = yes ; then
3684 cat >> confdefs.h <<\EOF
3685 #define HAVE_PRINTF_PTR 1
3691 case "${host}" in
3692 *-*-uwin*)
3693 { echo "configure: error:
3694 *** UWIN may not be used as a host platform because
3695 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3697 *-*-*vms*)
3698 # Under VMS, vfork works very different than on Unix. The standard test
3699 # won't work, and it isn't easily adaptable. It makes more sense to
3700 # just force it.
3701 ac_cv_func_vfork_works=yes
3703 esac
3704 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3705 echo "configure:3706: checking for pid_t" >&5
3706 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3707 echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709 cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3712 #include <sys/types.h>
3713 #if STDC_HEADERS
3714 #include <stdlib.h>
3715 #include <stddef.h>
3716 #endif
3718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3719 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3720 rm -rf conftest*
3721 ac_cv_type_pid_t=yes
3722 else
3723 rm -rf conftest*
3724 ac_cv_type_pid_t=no
3726 rm -f conftest*
3729 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3730 if test $ac_cv_type_pid_t = no; then
3731 cat >> confdefs.h <<\EOF
3732 #define pid_t int
3737 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3738 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3739 echo "configure:3740: checking for vfork.h" >&5
3740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3741 echo $ac_n "(cached) $ac_c" 1>&6
3742 else
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <vfork.h>
3748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3749 { (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3751 if test -z "$ac_err"; then
3752 rm -rf conftest*
3753 eval "ac_cv_header_$ac_safe=yes"
3754 else
3755 echo "$ac_err" >&5
3756 echo "configure: failed program was:" >&5
3757 cat conftest.$ac_ext >&5
3758 rm -rf conftest*
3759 eval "ac_cv_header_$ac_safe=no"
3761 rm -f conftest*
3763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3764 echo "$ac_t""yes" 1>&6
3765 cat >> confdefs.h <<\EOF
3766 #define HAVE_VFORK_H 1
3769 else
3770 echo "$ac_t""no" 1>&6
3773 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3774 echo "configure:3775: checking for working vfork" >&5
3775 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3776 echo $ac_n "(cached) $ac_c" 1>&6
3777 else
3778 if test "$cross_compiling" = yes; then
3779 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3780 echo "configure:3781: checking for vfork" >&5
3781 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3782 echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784 cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 /* System header to define __stub macros and hopefully few prototypes,
3788 which can conflict with char vfork(); below. */
3789 #include <assert.h>
3790 /* Override any gcc2 internal prototype to avoid an error. */
3791 /* We use char because int might match the return type of a gcc2
3792 builtin and then its argument prototype would still apply. */
3793 char vfork();
3795 int main() {
3797 /* The GNU C library defines this for functions which it implements
3798 to always fail with ENOSYS. Some functions are actually named
3799 something starting with __ and the normal name is an alias. */
3800 #if defined (__stub_vfork) || defined (__stub___vfork)
3801 choke me
3802 #else
3803 vfork();
3804 #endif
3806 ; return 0; }
3808 if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3809 rm -rf conftest*
3810 eval "ac_cv_func_vfork=yes"
3811 else
3812 echo "configure: failed program was:" >&5
3813 cat conftest.$ac_ext >&5
3814 rm -rf conftest*
3815 eval "ac_cv_func_vfork=no"
3817 rm -f conftest*
3820 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3821 echo "$ac_t""yes" 1>&6
3823 else
3824 echo "$ac_t""no" 1>&6
3827 ac_cv_func_vfork_works=$ac_cv_func_vfork
3828 else
3829 cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 /* Thanks to Paul Eggert for this test. */
3833 #include <stdio.h>
3834 #include <sys/types.h>
3835 #include <sys/stat.h>
3836 #ifdef HAVE_UNISTD_H
3837 #include <unistd.h>
3838 #endif
3839 #ifdef HAVE_VFORK_H
3840 #include <vfork.h>
3841 #endif
3842 /* On some sparc systems, changes by the child to local and incoming
3843 argument registers are propagated back to the parent.
3844 The compiler is told about this with #include <vfork.h>,
3845 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3846 Test for this by using a static variable whose address
3847 is put into a register that is clobbered by the vfork. */
3848 static
3849 #ifdef __cplusplus
3850 sparc_address_test (int arg)
3851 #else
3852 sparc_address_test (arg) int arg;
3853 #endif
3855 static pid_t child;
3856 if (!child) {
3857 child = vfork ();
3858 if (child < 0) {
3859 perror ("vfork");
3860 _exit(2);
3862 if (!child) {
3863 arg = getpid();
3864 write(-1, "", 0);
3865 _exit (arg);
3869 main() {
3870 pid_t parent = getpid ();
3871 pid_t child;
3873 sparc_address_test ();
3875 child = vfork ();
3877 if (child == 0) {
3878 /* Here is another test for sparc vfork register problems.
3879 This test uses lots of local variables, at least
3880 as many local variables as main has allocated so far
3881 including compiler temporaries. 4 locals are enough for
3882 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3883 A buggy compiler should reuse the register of parent
3884 for one of the local variables, since it will think that
3885 parent can't possibly be used any more in this routine.
3886 Assigning to the local variable will thus munge parent
3887 in the parent process. */
3888 pid_t
3889 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3890 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3891 /* Convince the compiler that p..p7 are live; otherwise, it might
3892 use the same hardware register for all 8 local variables. */
3893 if (p != p1 || p != p2 || p != p3 || p != p4
3894 || p != p5 || p != p6 || p != p7)
3895 _exit(1);
3897 /* On some systems (e.g. IRIX 3.3),
3898 vfork doesn't separate parent from child file descriptors.
3899 If the child closes a descriptor before it execs or exits,
3900 this munges the parent's descriptor as well.
3901 Test for this by closing stdout in the child. */
3902 _exit(close(fileno(stdout)) != 0);
3903 } else {
3904 int status;
3905 struct stat st;
3907 while (wait(&status) != child)
3909 exit(
3910 /* Was there some problem with vforking? */
3911 child < 0
3913 /* Did the child fail? (This shouldn't happen.) */
3914 || status
3916 /* Did the vfork/compiler bug occur? */
3917 || parent != getpid()
3919 /* Did the file descriptor bug occur? */
3920 || fstat(fileno(stdout), &st) != 0
3925 if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3926 then
3927 ac_cv_func_vfork_works=yes
3928 else
3929 echo "configure: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3931 rm -fr conftest*
3932 ac_cv_func_vfork_works=no
3934 rm -fr conftest*
3939 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3940 if test $ac_cv_func_vfork_works = no; then
3941 cat >> confdefs.h <<\EOF
3942 #define vfork fork
3947 for ac_func in getpagesize
3949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3950 echo "configure:3951: checking for $ac_func" >&5
3951 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3952 echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 /* System header to define __stub macros and hopefully few prototypes,
3958 which can conflict with char $ac_func(); below. */
3959 #include <assert.h>
3960 /* Override any gcc2 internal prototype to avoid an error. */
3961 /* We use char because int might match the return type of a gcc2
3962 builtin and then its argument prototype would still apply. */
3963 char $ac_func();
3965 int main() {
3967 /* The GNU C library defines this for functions which it implements
3968 to always fail with ENOSYS. Some functions are actually named
3969 something starting with __ and the normal name is an alias. */
3970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3971 choke me
3972 #else
3973 $ac_func();
3974 #endif
3976 ; return 0; }
3978 if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979 rm -rf conftest*
3980 eval "ac_cv_func_$ac_func=yes"
3981 else
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3984 rm -rf conftest*
3985 eval "ac_cv_func_$ac_func=no"
3987 rm -f conftest*
3990 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3991 echo "$ac_t""yes" 1>&6
3992 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3993 cat >> confdefs.h <<EOF
3994 #define $ac_tr_func 1
3997 else
3998 echo "$ac_t""no" 1>&6
4000 done
4002 # The test program for the next two tests is the same except for one
4003 # set of ifdefs.
4004 cat >ct-mmap.inc <<'EOF'
4005 #include <sys/types.h>
4006 #include <sys/mman.h>
4007 #include <fcntl.h>
4008 #include <signal.h>
4009 #include <setjmp.h>
4010 #include <stdio.h>
4012 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4013 # define MAP_ANONYMOUS MAP_ANON
4014 #endif
4016 /* This mess was copied from the GNU getpagesize.h. */
4017 #ifndef HAVE_GETPAGESIZE
4018 # ifdef HAVE_UNISTD_H
4019 # include <unistd.h>
4020 # endif
4022 /* Assume that all systems that can run configure have sys/param.h. */
4023 # ifndef HAVE_SYS_PARAM_H
4024 # define HAVE_SYS_PARAM_H 1
4025 # endif
4027 # ifdef _SC_PAGESIZE
4028 # define getpagesize() sysconf(_SC_PAGESIZE)
4029 # else /* no _SC_PAGESIZE */
4030 # ifdef HAVE_SYS_PARAM_H
4031 # include <sys/param.h>
4032 # ifdef EXEC_PAGESIZE
4033 # define getpagesize() EXEC_PAGESIZE
4034 # else /* no EXEC_PAGESIZE */
4035 # ifdef NBPG
4036 # define getpagesize() NBPG * CLSIZE
4037 # ifndef CLSIZE
4038 # define CLSIZE 1
4039 # endif /* no CLSIZE */
4040 # else /* no NBPG */
4041 # ifdef NBPC
4042 # define getpagesize() NBPC
4043 # else /* no NBPC */
4044 # ifdef PAGESIZE
4045 # define getpagesize() PAGESIZE
4046 # endif /* PAGESIZE */
4047 # endif /* no NBPC */
4048 # endif /* no NBPG */
4049 # endif /* no EXEC_PAGESIZE */
4050 # else /* no HAVE_SYS_PARAM_H */
4051 # define getpagesize() 8192 /* punt totally */
4052 # endif /* no HAVE_SYS_PARAM_H */
4053 # endif /* no _SC_PAGESIZE */
4055 #endif /* no HAVE_GETPAGESIZE */
4057 #ifndef MAP_FAILED
4058 # define MAP_FAILED -1
4059 #endif
4061 #undef perror_exit
4062 #define perror_exit(str, val) \
4063 do { perror(str); exit(val); } while (0)
4065 /* Some versions of cygwin mmap require that munmap is called with the
4066 same parameters as mmap. GCC expects that this is not the case.
4067 Test for various forms of this problem. Warning - icky signal games. */
4069 static sigset_t unblock_sigsegv;
4070 static jmp_buf r;
4071 static size_t pg;
4072 static int devzero;
4074 static char *
4075 anonmap (size)
4076 size_t size;
4078 #ifdef USE_MAP_ANON
4079 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4080 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4081 #else
4082 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4083 MAP_PRIVATE, devzero, 0);
4084 #endif
4087 static void
4088 sigsegv (unused)
4089 int unused;
4091 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4092 longjmp (r, 1);
4095 /* Basic functionality test. */
4096 void
4097 test_0 ()
4099 char *x = anonmap (pg);
4100 if (x == (char *) MAP_FAILED)
4101 perror_exit("test 0 mmap", 2);
4103 *(int *)x += 1;
4105 if (munmap(x, pg) < 0)
4106 perror_exit("test 0 munmap", 3);
4109 /* 1. If we map a 2-page region and unmap its second page, the first page
4110 must remain. */
4111 static void
4112 test_1 ()
4114 char *x = anonmap (pg * 2);
4115 if (x == (char *)MAP_FAILED)
4116 perror_exit ("test 1 mmap", 4);
4118 signal (SIGSEGV, sigsegv);
4119 if (setjmp (r))
4120 perror_exit ("test 1 fault", 5);
4122 x[0] = 1;
4123 x[pg] = 1;
4125 if (munmap (x + pg, pg) < 0)
4126 perror_exit ("test 1 munmap 1", 6);
4127 x[0] = 2;
4129 if (setjmp (r) == 0)
4131 x[pg] = 1;
4132 perror_exit ("test 1 no fault", 7);
4134 if (munmap (x, pg) < 0)
4135 perror_exit ("test 1 munmap 2", 8);
4138 /* 2. If we map a 2-page region and unmap its first page, the second
4139 page must remain. */
4140 static void
4141 test_2 ()
4143 char *x = anonmap (pg * 2);
4144 if (x == (char *)MAP_FAILED)
4145 perror_exit ("test 2 mmap", 9);
4147 signal (SIGSEGV, sigsegv);
4148 if (setjmp (r))
4149 perror_exit ("test 2 fault", 10);
4151 x[0] = 1;
4152 x[pg] = 1;
4154 if (munmap (x, pg) < 0)
4155 perror_exit ("test 2 munmap 1", 11);
4157 x[pg] = 2;
4159 if (setjmp (r) == 0)
4161 x[0] = 1;
4162 perror_exit ("test 2 no fault", 12);
4165 if (munmap (x+pg, pg) < 0)
4166 perror_exit ("test 2 munmap 2", 13);
4169 /* 3. If we map two adjacent 1-page regions and unmap them both with
4170 one munmap, both must go away.
4172 Getting two adjacent 1-page regions with two mmap calls is slightly
4173 tricky. All OS's tested skip over already-allocated blocks; therefore
4174 we have been careful to unmap all allocated regions in previous tests.
4175 HP/UX allocates pages backward in memory. No OS has yet been observed
4176 to be so perverse as to leave unmapped space between consecutive calls
4177 to mmap. */
4179 static void
4180 test_3 ()
4182 char *x, *y, *z;
4184 x = anonmap (pg);
4185 if (x == (char *)MAP_FAILED)
4186 perror_exit ("test 3 mmap 1", 14);
4187 y = anonmap (pg);
4188 if (y == (char *)MAP_FAILED)
4189 perror_exit ("test 3 mmap 2", 15);
4191 if (y != x + pg)
4193 if (y == x - pg)
4194 z = y, y = x, x = z;
4195 else
4197 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4198 (unsigned long)x, (unsigned long)y);
4199 exit (16);
4203 signal (SIGSEGV, sigsegv);
4204 if (setjmp (r))
4205 perror_exit ("test 3 fault", 17);
4207 x[0] = 1;
4208 y[0] = 1;
4210 if (munmap (x, pg*2) < 0)
4211 perror_exit ("test 3 munmap", 18);
4213 if (setjmp (r) == 0)
4215 x[0] = 1;
4216 perror_exit ("test 3 no fault 1", 19);
4219 signal (SIGSEGV, sigsegv);
4220 if (setjmp (r) == 0)
4222 y[0] = 1;
4223 perror_exit ("test 3 no fault 2", 20);
4228 main ()
4230 sigemptyset (&unblock_sigsegv);
4231 sigaddset (&unblock_sigsegv, SIGSEGV);
4232 pg = getpagesize ();
4233 #ifndef USE_MAP_ANON
4234 devzero = open ("/dev/zero", O_RDWR);
4235 if (devzero < 0)
4236 perror_exit ("open /dev/zero", 1);
4237 #endif
4239 test_0();
4240 test_1();
4241 test_2();
4242 test_3();
4244 exit(0);
4248 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4249 echo "configure:4250: checking for working mmap from /dev/zero" >&5
4250 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4251 echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253 if test "$cross_compiling" = yes; then
4254 # If this is not cygwin, and /dev/zero is a character device, it's probably
4255 # safe to assume it works.
4256 case "$host_os" in
4257 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4258 * ) if test -c /dev/zero
4259 then ac_cv_func_mmap_dev_zero=yes
4260 else ac_cv_func_mmap_dev_zero=no
4261 fi ;;
4262 esac
4263 else
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 #include "ct-mmap.inc"
4269 if { (eval echo configure:4270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4270 then
4271 ac_cv_func_mmap_dev_zero=yes
4272 else
4273 echo "configure: failed program was:" >&5
4274 cat conftest.$ac_ext >&5
4275 rm -fr conftest*
4276 if test $? -lt 4
4277 then ac_cv_func_mmap_dev_zero=no
4278 else ac_cv_func_mmap_dev_zero=buggy
4281 rm -fr conftest*
4287 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4288 if test $ac_cv_func_mmap_dev_zero = yes; then
4289 cat >> confdefs.h <<\EOF
4290 #define HAVE_MMAP_DEV_ZERO 1
4295 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4296 echo "configure:4297: checking for working mmap with MAP_ANON(YMOUS)" >&5
4297 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4298 echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300 if test "$cross_compiling" = yes; then
4301 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4302 # just because it's there. Some SCO Un*xen define it but don't implement it.
4303 ac_cv_func_mmap_anon=no
4304 else
4305 cat > conftest.$ac_ext <<EOF
4306 #line 4307 "configure"
4307 #include "confdefs.h"
4308 #define USE_MAP_ANON
4309 #include "ct-mmap.inc"
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4312 then
4313 ac_cv_func_mmap_anon=yes
4314 else
4315 echo "configure: failed program was:" >&5
4316 cat conftest.$ac_ext >&5
4317 rm -fr conftest*
4318 if test $? -lt 4
4319 then ac_cv_func_mmap_anon=no
4320 else ac_cv_func_mmap_anon=buggy
4323 rm -fr conftest*
4329 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4330 if test $ac_cv_func_mmap_anon = yes; then
4331 cat >> confdefs.h <<\EOF
4332 #define HAVE_MMAP_ANON 1
4336 rm -f ct-mmap.inc
4338 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4339 echo "configure:4340: checking for working mmap of a file" >&5
4340 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4342 else
4343 # Create a file one thousand bytes long.
4344 for i in 1 2 3 4 5 6 7 8 9 0
4345 do for j in 1 2 3 4 5 6 7 8 9 0
4346 do echo $i $j xxxxx
4347 done
4348 done > conftestdata$$
4350 if test "$cross_compiling" = yes; then
4351 ac_cv_func_mmap_file=no
4352 else
4353 cat > conftest.$ac_ext <<EOF
4354 #line 4355 "configure"
4355 #include "confdefs.h"
4357 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4358 Richard Henderson and Alexandre Oliva.
4359 Check whether read-only mmap of a plain file works. */
4360 #include <sys/types.h>
4361 #include <sys/stat.h>
4362 #include <fcntl.h>
4363 #include <sys/mman.h>
4365 int main()
4367 char *x;
4368 int fd;
4369 struct stat st;
4371 fd = open("conftestdata$$", O_RDONLY);
4372 if (fd < 0)
4373 exit(1);
4375 if (fstat (fd, &st))
4376 exit(2);
4378 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4379 if (x == (char *) -1)
4380 exit(3);
4382 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4383 exit(4);
4385 if (munmap(x, st.st_size) < 0)
4386 exit(5);
4388 exit(0);
4391 if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4392 then
4393 ac_cv_func_mmap_file=yes
4394 else
4395 echo "configure: failed program was:" >&5
4396 cat conftest.$ac_ext >&5
4397 rm -fr conftest*
4398 ac_cv_func_mmap_file=no
4400 rm -fr conftest*
4405 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4406 if test $ac_cv_func_mmap_file = yes; then
4407 cat >> confdefs.h <<\EOF
4408 #define HAVE_MMAP_FILE 1
4416 am_cv_lib_iconv_ldpath=
4417 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4418 if test "${with_libiconv_prefix+set}" = set; then
4419 withval="$with_libiconv_prefix"
4421 for dir in `echo "$withval" | tr : ' '`; do
4422 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4423 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4424 done
4429 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4430 echo "configure:4431: checking for iconv" >&5
4431 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4435 am_cv_func_iconv="no, consider installing GNU libiconv"
4436 am_cv_lib_iconv=no
4437 cat > conftest.$ac_ext <<EOF
4438 #line 4439 "configure"
4439 #include "confdefs.h"
4440 #include <stdlib.h>
4441 #include <iconv.h>
4442 int main() {
4443 iconv_t cd = iconv_open("","");
4444 iconv(cd,NULL,NULL,NULL,NULL);
4445 iconv_close(cd);
4446 ; return 0; }
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4449 rm -rf conftest*
4450 am_cv_func_iconv=yes
4451 else
4452 echo "configure: failed program was:" >&5
4453 cat conftest.$ac_ext >&5
4455 rm -f conftest*
4456 if test "$am_cv_func_iconv" != yes; then
4457 am_save_LIBS="$LIBS"
4458 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4459 cat > conftest.$ac_ext <<EOF
4460 #line 4461 "configure"
4461 #include "confdefs.h"
4462 #include <stdlib.h>
4463 #include <iconv.h>
4464 int main() {
4465 iconv_t cd = iconv_open("","");
4466 iconv(cd,NULL,NULL,NULL,NULL);
4467 iconv_close(cd);
4468 ; return 0; }
4470 if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4471 rm -rf conftest*
4472 am_cv_lib_iconv=yes
4473 am_cv_func_iconv=yes
4474 else
4475 echo "configure: failed program was:" >&5
4476 cat conftest.$ac_ext >&5
4478 rm -f conftest*
4479 LIBS="$am_save_LIBS"
4484 echo "$ac_t""$am_cv_func_iconv" 1>&6
4485 if test "$am_cv_func_iconv" = yes; then
4486 cat >> confdefs.h <<\EOF
4487 #define HAVE_ICONV 1
4490 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4491 echo "configure:4492: checking for iconv declaration" >&5
4492 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4493 echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4500 #include <stdlib.h>
4501 #include <iconv.h>
4502 extern
4503 #ifdef __cplusplus
4505 #endif
4506 #if defined(__STDC__) || defined(__cplusplus)
4507 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4508 #else
4509 size_t iconv();
4510 #endif
4512 int main() {
4514 ; return 0; }
4516 if { (eval echo configure:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4517 rm -rf conftest*
4518 am_cv_proto_iconv_arg1=""
4519 else
4520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
4522 rm -rf conftest*
4523 am_cv_proto_iconv_arg1="const"
4525 rm -f conftest*
4526 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);"
4529 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4530 echo "$ac_t""${ac_t:-
4531 }$am_cv_proto_iconv" 1>&6
4532 cat >> confdefs.h <<EOF
4533 #define ICONV_CONST $am_cv_proto_iconv_arg1
4537 LIBICONV=
4538 if test "$am_cv_lib_iconv" = yes; then
4539 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4544 # We will need to find libiberty.h and ansidecl.h
4545 saved_CFLAGS="$CFLAGS"
4546 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4547 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4548 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4549 fprintf_unlocked strstr errno \
4550 malloc realloc calloc free basename getopt clock
4552 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4553 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4554 echo "configure:4555: checking whether $ac_func is declared" >&5
4555 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4556 echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 #undef $ac_tr_decl
4562 #define $ac_tr_decl 1
4564 #include "ansidecl.h"
4565 #include "system.h"
4567 int main() {
4568 #ifndef $ac_func
4569 char *(*pfn) = (char *(*)) $ac_func ;
4570 #endif
4571 ; return 0; }
4573 if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4574 rm -rf conftest*
4575 eval "gcc_cv_have_decl_$ac_func=yes"
4576 else
4577 echo "configure: failed program was:" >&5
4578 cat conftest.$ac_ext >&5
4579 rm -rf conftest*
4580 eval "gcc_cv_have_decl_$ac_func=no"
4582 rm -f conftest*
4585 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4586 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4587 #define $ac_tr_decl 1
4590 else
4591 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4592 #define $ac_tr_decl 0
4597 done
4598 if test x = y ; then
4599 cat >> confdefs.h <<\EOF
4600 #define HAVE_DECL_GETENV 1
4602 cat >> confdefs.h <<\EOF
4603 #define HAVE_DECL_ATOL 1
4605 cat >> confdefs.h <<\EOF
4606 #define HAVE_DECL_SBRK 1
4608 cat >> confdefs.h <<\EOF
4609 #define HAVE_DECL_ABORT 1
4611 cat >> confdefs.h <<\EOF
4612 #define HAVE_DECL_ATOF 1
4614 cat >> confdefs.h <<\EOF
4615 #define HAVE_DECL_GETCWD 1
4617 cat >> confdefs.h <<\EOF
4618 #define HAVE_DECL_GETWD 1
4621 cat >> confdefs.h <<\EOF
4622 #define HAVE_DECL_STRSIGNAL 1
4624 cat >> confdefs.h <<\EOF
4625 #define HAVE_DECL_PUTC_UNLOCKED 1
4627 cat >> confdefs.h <<\EOF
4628 #define HAVE_DECL_FPUTS_UNLOCKED 1
4630 cat >> confdefs.h <<\EOF
4631 #define HAVE_DECL_FWRITE_UNLOCKED 1
4634 cat >> confdefs.h <<\EOF
4635 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4637 cat >> confdefs.h <<\EOF
4638 #define HAVE_DECL_STRSTR 1
4640 cat >> confdefs.h <<\EOF
4641 #define HAVE_DECL_ERRNO 1
4644 cat >> confdefs.h <<\EOF
4645 #define HAVE_DECL_MALLOC 1
4647 cat >> confdefs.h <<\EOF
4648 #define HAVE_DECL_REALLOC 1
4650 cat >> confdefs.h <<\EOF
4651 #define HAVE_DECL_CALLOC 1
4653 cat >> confdefs.h <<\EOF
4654 #define HAVE_DECL_FREE 1
4656 cat >> confdefs.h <<\EOF
4657 #define HAVE_DECL_BASENAME 1
4659 cat >> confdefs.h <<\EOF
4660 #define HAVE_DECL_GETOPT 1
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_DECL_CLOCK 1
4668 for ac_func in getrlimit setrlimit getrusage
4670 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4671 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4672 echo "configure:4673: checking whether $ac_func is declared" >&5
4673 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4674 echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 #undef $ac_tr_decl
4680 #define $ac_tr_decl 1
4682 #include "ansidecl.h"
4683 #include "system.h"
4684 #ifdef HAVE_SYS_RESOURCE_H
4685 #include <sys/resource.h>
4686 #endif
4689 int main() {
4690 #ifndef $ac_func
4691 char *(*pfn) = (char *(*)) $ac_func ;
4692 #endif
4693 ; return 0; }
4695 if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4696 rm -rf conftest*
4697 eval "gcc_cv_have_decl_$ac_func=yes"
4698 else
4699 echo "configure: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 rm -rf conftest*
4702 eval "gcc_cv_have_decl_$ac_func=no"
4704 rm -f conftest*
4707 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4708 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4709 #define $ac_tr_decl 1
4712 else
4713 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4714 #define $ac_tr_decl 0
4719 done
4720 if test x = y ; then
4721 cat >> confdefs.h <<\EOF
4722 #define HAVE_DECL_GETRLIMIT 1
4724 cat >> confdefs.h <<\EOF
4725 #define HAVE_DECL_SETRLIMIT 1
4727 cat >> confdefs.h <<\EOF
4728 #define HAVE_DECL_GETRUSAGE 1
4733 for ac_func in times
4735 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4736 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4737 echo "configure:4738: checking whether $ac_func is declared" >&5
4738 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4739 echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #undef $ac_tr_decl
4745 #define $ac_tr_decl 1
4747 #include "ansidecl.h"
4748 #include "system.h"
4749 #ifdef HAVE_SYS_TIMES_H
4750 #include <sys/times.h>
4751 #endif
4754 int main() {
4755 #ifndef $ac_func
4756 char *(*pfn) = (char *(*)) $ac_func ;
4757 #endif
4758 ; return 0; }
4760 if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4761 rm -rf conftest*
4762 eval "gcc_cv_have_decl_$ac_func=yes"
4763 else
4764 echo "configure: failed program was:" >&5
4765 cat conftest.$ac_ext >&5
4766 rm -rf conftest*
4767 eval "gcc_cv_have_decl_$ac_func=no"
4769 rm -f conftest*
4772 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4773 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4774 #define $ac_tr_decl 1
4777 else
4778 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4779 #define $ac_tr_decl 0
4784 done
4785 if test x = y ; then
4786 cat >> confdefs.h <<\EOF
4787 #define HAVE_DECL_TIMES 1
4792 # More time-related stuff.
4793 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4794 echo "configure:4795: checking for struct tms" >&5
4795 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4796 echo $ac_n "(cached) $ac_c" 1>&6
4797 else
4799 cat > conftest.$ac_ext <<EOF
4800 #line 4801 "configure"
4801 #include "confdefs.h"
4803 #include "ansidecl.h"
4804 #include "system.h"
4805 #ifdef HAVE_SYS_TIMES_H
4806 #include <sys/times.h>
4807 #endif
4809 int main() {
4810 struct tms tms;
4811 ; return 0; }
4813 if { (eval echo configure:4814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4814 rm -rf conftest*
4815 ac_cv_struct_tms=yes
4816 else
4817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -rf conftest*
4820 ac_cv_struct_tms=no
4822 rm -f conftest*
4825 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4826 if test $ac_cv_struct_tms = yes; then
4827 cat >> confdefs.h <<\EOF
4828 #define HAVE_STRUCT_TMS 1
4833 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4834 # revisit after autoconf 2.50.
4835 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4836 echo "configure:4837: checking for clock_t" >&5
4837 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4838 echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4841 cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4845 #include "ansidecl.h"
4846 #include "system.h"
4848 int main() {
4849 clock_t x;
4850 ; return 0; }
4852 if { (eval echo configure:4853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4853 rm -rf conftest*
4854 gcc_cv_type_clock_t=yes
4855 else
4856 echo "configure: failed program was:" >&5
4857 cat conftest.$ac_ext >&5
4858 rm -rf conftest*
4859 gcc_cv_type_clock_t=no
4861 rm -f conftest*
4864 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4865 if test $gcc_cv_type_clock_t = yes; then
4866 cat >> confdefs.h <<\EOF
4867 #define HAVE_CLOCK_T 1
4872 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4873 CFLAGS="$saved_CFLAGS"
4875 # mkdir takes a single argument on some systems.
4876 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4877 echo "configure:4878: checking if mkdir takes one argument" >&5
4878 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4879 echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881 cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4885 #include <sys/types.h>
4886 #ifdef HAVE_SYS_STAT_H
4887 # include <sys/stat.h>
4888 #endif
4889 #ifdef HAVE_UNISTD_H
4890 # include <unistd.h>
4891 #endif
4892 #ifdef HAVE_DIRECT_H
4893 # include <direct.h>
4894 #endif
4895 int main() {
4896 mkdir ("foo", 0);
4897 ; return 0; }
4899 if { (eval echo configure:4900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4900 rm -rf conftest*
4901 gcc_cv_mkdir_takes_one_arg=no
4902 else
4903 echo "configure: failed program was:" >&5
4904 cat conftest.$ac_ext >&5
4905 rm -rf conftest*
4906 gcc_cv_mkdir_takes_one_arg=yes
4908 rm -f conftest*
4911 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4912 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4913 cat >> confdefs.h <<\EOF
4914 #define MKDIR_TAKES_ONE_ARG 1
4920 # File extensions
4921 manext='.1'
4922 objext='.o'
4926 config_gtfiles=
4927 build_xm_file=
4928 build_xm_defines=
4929 build_install_headers_dir=install-headers-tar
4930 build_exeext=
4931 host_xm_file=
4932 host_xm_defines=
4933 host_xmake_file=
4934 host_truncate_target=
4935 host_exeext=
4937 # Decode the host machine, then the target machine.
4938 # For the host machine, we save the xm_file variable as host_xm_file;
4939 # then we decode the target machine and forget everything else
4940 # that came from the host machine.
4941 for machine in $build $host $target; do
4942 . ${srcdir}/config.gcc
4943 done
4945 extra_objs="${host_extra_objs} ${extra_objs}"
4947 # Default the target-machine variables that were not explicitly set.
4948 if test x"$tm_file" = x
4949 then tm_file=$cpu_type/$cpu_type.h; fi
4951 if test x"$extra_headers" = x
4952 then extra_headers=; fi
4954 if test x$md_file = x
4955 then md_file=$cpu_type/$cpu_type.md; fi
4957 if test x$out_file = x
4958 then out_file=$cpu_type/$cpu_type.c; fi
4960 if test x"$tmake_file" = x
4961 then tmake_file=$cpu_type/t-$cpu_type
4964 if test x"$dwarf2" = xyes
4965 then tm_file="$tm_file tm-dwarf2.h"
4968 if test x$float_format = x
4969 then float_format=i64
4972 if test $float_format = none
4973 then float_h_file=Makefile.in
4974 else float_h_file=float-$float_format.h
4977 # Say what files are being used for the output code and MD file.
4978 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4979 echo "Using \`$srcdir/config/$md_file' as machine description file."
4981 # If any of the xm_file variables contain nonexistent files, warn
4982 # about them and drop them.
4985 for x in $build_xm_file; do
4986 if test -f $srcdir/config/$x
4987 then bx="$bx $x"
4988 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4990 done
4991 build_xm_file="$bx"
4994 for x in $host_xm_file; do
4995 if test -f $srcdir/config/$x
4996 then hx="$hx $x"
4997 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4999 done
5000 host_xm_file="$hx"
5003 for x in $xm_file; do
5004 if test -f $srcdir/config/$x
5005 then tx="$tx $x"
5006 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5008 done
5009 xm_file="$tx"
5011 count=a
5012 for f in $tm_file; do
5013 count=${count}x
5014 done
5015 if test $count = ax; then
5016 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5017 else
5018 echo "Using the following target machine macro files:"
5019 for f in $tm_file; do
5020 echo " $srcdir/config/$f"
5021 done
5024 count=a
5025 for f in $host_xm_file; do
5026 count=${count}x
5027 done
5028 if test $count = a; then
5030 elif test $count = ax; then
5031 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5032 else
5033 echo "Using the following host machine macro files:"
5034 for f in $host_xm_file; do
5035 echo " $srcdir/config/$f"
5036 done
5039 if test "$host_xm_file" != "$build_xm_file"; then
5040 count=a
5041 for f in $build_xm_file; do
5042 count=${count}x
5043 done
5044 if test $count = a; then
5046 elif test $count = ax; then
5047 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5048 else
5049 echo "Using the following build machine macro files:"
5050 for f in $build_xm_file; do
5051 echo " $srcdir/config/$f"
5052 done
5056 if test x$thread_file = x; then
5057 if test x$target_thread_file != x; then
5058 thread_file=$target_thread_file
5059 else
5060 thread_file='single'
5064 # auto-host.h is the file containing items generated by autoconf and is
5065 # the first file included by config.h.
5066 # If host=build, it is correct to have hconfig include auto-host.h
5067 # as well. If host!=build, we are in error and need to do more
5068 # work to find out the build config parameters.
5069 if test x$host = x$build
5070 then
5071 build_auto=auto-host.h
5072 FORBUILD=..
5073 else
5074 # We create a subdir, then run autoconf in the subdir.
5075 # To prevent recursion we set host and build for the new
5076 # invocation of configure to the build for this invocation
5077 # of configure.
5078 tempdir=build.$$
5079 rm -rf $tempdir
5080 mkdir $tempdir
5081 cd $tempdir
5082 case ${srcdir} in
5083 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5084 *) realsrcdir=../${srcdir};;
5085 esac
5086 saved_CFLAGS="${CFLAGS}"
5087 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5088 ${realsrcdir}/configure \
5089 --target=$target_alias --host=$build_alias --build=$build_alias
5090 CFLAGS="${saved_CFLAGS}"
5092 # We just finished tests for the build machine, so rename
5093 # the file auto-build.h in the gcc directory.
5094 mv auto-host.h ../auto-build.h
5095 cd ..
5096 rm -rf $tempdir
5097 build_auto=auto-build.h
5098 FORBUILD=../$build
5102 tm_file="${tm_file} defaults.h"
5103 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5104 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5105 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5107 # Truncate the target if necessary
5108 if test x$host_truncate_target != x; then
5109 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5112 # Get the version trigger filename from the toplevel
5113 if test "${with_gcc_version_trigger+set}" = set; then
5114 gcc_version_trigger=$with_gcc_version_trigger
5115 else
5116 gcc_version_trigger=${srcdir}/version.c
5118 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5119 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5121 # Compile in configure arguments.
5122 if test -f configargs.h ; then
5123 # Being re-configured.
5124 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5125 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5126 else
5127 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5129 cat > configargs.h <<EOF
5130 /* Generated automatically. */
5131 static const char configuration_arguments[] = "$gcc_config_arguments";
5132 static const char thread_model[] = "$thread_file";
5135 # Internationalization
5136 PACKAGE=gcc
5137 VERSION="$gcc_version"
5141 # Enable NLS support by default
5142 # Check whether --enable-nls or --disable-nls was given.
5143 if test "${enable_nls+set}" = set; then
5144 enableval="$enable_nls"
5146 else
5147 enable_nls=yes
5151 # if cross compiling, disable NLS support.
5152 # It's not worth the trouble, at least for now.
5154 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5155 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5156 enable_nls=no
5161 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5162 echo "configure:5163: checking for library containing strerror" >&5
5163 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5164 echo $ac_n "(cached) $ac_c" 1>&6
5165 else
5166 ac_func_search_save_LIBS="$LIBS"
5167 ac_cv_search_strerror="no"
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 /* Override any gcc2 internal prototype to avoid an error. */
5172 /* We use char because int might match the return type of a gcc2
5173 builtin and then its argument prototype would still apply. */
5174 char strerror();
5176 int main() {
5177 strerror()
5178 ; return 0; }
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181 rm -rf conftest*
5182 ac_cv_search_strerror="none required"
5183 else
5184 echo "configure: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5187 rm -f conftest*
5188 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5189 LIBS="-l$i $ac_func_search_save_LIBS"
5190 cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 /* Override any gcc2 internal prototype to avoid an error. */
5194 /* We use char because int might match the return type of a gcc2
5195 builtin and then its argument prototype would still apply. */
5196 char strerror();
5198 int main() {
5199 strerror()
5200 ; return 0; }
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203 rm -rf conftest*
5204 ac_cv_search_strerror="-l$i"
5205 break
5206 else
5207 echo "configure: failed program was:" >&5
5208 cat conftest.$ac_ext >&5
5210 rm -f conftest*
5211 done
5212 LIBS="$ac_func_search_save_LIBS"
5215 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5216 if test "$ac_cv_search_strerror" != "no"; then
5217 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5219 else :
5224 echo $ac_n "checking for working const""... $ac_c" 1>&6
5225 echo "configure:5226: checking for working const" >&5
5226 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5233 int main() {
5235 /* Ultrix mips cc rejects this. */
5236 typedef int charset[2]; const charset x;
5237 /* SunOS 4.1.1 cc rejects this. */
5238 char const *const *ccp;
5239 char **p;
5240 /* NEC SVR4.0.2 mips cc rejects this. */
5241 struct point {int x, y;};
5242 static struct point const zero = {0,0};
5243 /* AIX XL C 1.02.0.0 rejects this.
5244 It does not let you subtract one const X* pointer from another in an arm
5245 of an if-expression whose if-part is not a constant expression */
5246 const char *g = "string";
5247 ccp = &g + (g ? g-g : 0);
5248 /* HPUX 7.0 cc rejects these. */
5249 ++ccp;
5250 p = (char**) ccp;
5251 ccp = (char const *const *) p;
5252 { /* SCO 3.2v4 cc rejects this. */
5253 char *t;
5254 char const *s = 0 ? (char *) 0 : (char const *) 0;
5256 *t++ = 0;
5258 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5259 int x[] = {25, 17};
5260 const int *foo = &x[0];
5261 ++foo;
5263 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5264 typedef const int *iptr;
5265 iptr p = 0;
5266 ++p;
5268 { /* AIX XL C 1.02.0.0 rejects this saying
5269 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5270 struct s { int j; const int *ap[3]; };
5271 struct s *b; b->j = 5;
5273 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5274 const int foo = 10;
5277 ; return 0; }
5279 if { (eval echo configure:5280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5280 rm -rf conftest*
5281 ac_cv_c_const=yes
5282 else
5283 echo "configure: failed program was:" >&5
5284 cat conftest.$ac_ext >&5
5285 rm -rf conftest*
5286 ac_cv_c_const=no
5288 rm -f conftest*
5291 echo "$ac_t""$ac_cv_c_const" 1>&6
5292 if test $ac_cv_c_const = no; then
5293 cat >> confdefs.h <<\EOF
5294 #define const
5299 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5300 echo "configure:5301: checking for off_t" >&5
5301 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5302 echo $ac_n "(cached) $ac_c" 1>&6
5303 else
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307 #include <sys/types.h>
5308 #if STDC_HEADERS
5309 #include <stdlib.h>
5310 #include <stddef.h>
5311 #endif
5313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5314 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5315 rm -rf conftest*
5316 ac_cv_type_off_t=yes
5317 else
5318 rm -rf conftest*
5319 ac_cv_type_off_t=no
5321 rm -f conftest*
5324 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5325 if test $ac_cv_type_off_t = no; then
5326 cat >> confdefs.h <<\EOF
5327 #define off_t long
5332 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5333 echo "configure:5334: checking for size_t" >&5
5334 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5335 echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337 cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340 #include <sys/types.h>
5341 #if STDC_HEADERS
5342 #include <stdlib.h>
5343 #include <stddef.h>
5344 #endif
5346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5347 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5348 rm -rf conftest*
5349 ac_cv_type_size_t=yes
5350 else
5351 rm -rf conftest*
5352 ac_cv_type_size_t=no
5354 rm -f conftest*
5357 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5358 if test $ac_cv_type_size_t = no; then
5359 cat >> confdefs.h <<\EOF
5360 #define size_t unsigned
5365 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5366 # for constant arguments. Useless!
5367 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5368 echo "configure:5369: checking for working alloca.h" >&5
5369 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5370 echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372 cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375 #include <alloca.h>
5376 int main() {
5377 char *p = alloca(2 * sizeof(int));
5378 ; return 0; }
5380 if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5381 rm -rf conftest*
5382 ac_cv_header_alloca_h=yes
5383 else
5384 echo "configure: failed program was:" >&5
5385 cat conftest.$ac_ext >&5
5386 rm -rf conftest*
5387 ac_cv_header_alloca_h=no
5389 rm -f conftest*
5392 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5393 if test $ac_cv_header_alloca_h = yes; then
5394 cat >> confdefs.h <<\EOF
5395 #define HAVE_ALLOCA_H 1
5400 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5401 echo "configure:5402: checking for alloca" >&5
5402 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5403 echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405 cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5409 #ifdef __GNUC__
5410 # define alloca __builtin_alloca
5411 #else
5412 # ifdef _MSC_VER
5413 # include <malloc.h>
5414 # define alloca _alloca
5415 # else
5416 # if HAVE_ALLOCA_H
5417 # include <alloca.h>
5418 # else
5419 # ifdef _AIX
5420 #pragma alloca
5421 # else
5422 # ifndef alloca /* predefined by HP cc +Olibcalls */
5423 char *alloca ();
5424 # endif
5425 # endif
5426 # endif
5427 # endif
5428 #endif
5430 int main() {
5431 char *p = (char *) alloca(1);
5432 ; return 0; }
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435 rm -rf conftest*
5436 ac_cv_func_alloca_works=yes
5437 else
5438 echo "configure: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
5440 rm -rf conftest*
5441 ac_cv_func_alloca_works=no
5443 rm -f conftest*
5446 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5447 if test $ac_cv_func_alloca_works = yes; then
5448 cat >> confdefs.h <<\EOF
5449 #define HAVE_ALLOCA 1
5454 if test $ac_cv_func_alloca_works = no; then
5455 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5456 # that cause trouble. Some versions do not even contain alloca or
5457 # contain a buggy version. If you still want to use their alloca,
5458 # use ar to extract alloca.o from them instead of compiling alloca.c.
5459 ALLOCA=alloca.${ac_objext}
5460 cat >> confdefs.h <<\EOF
5461 #define C_ALLOCA 1
5465 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5466 echo "configure:5467: checking whether alloca needs Cray hooks" >&5
5467 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5468 echo $ac_n "(cached) $ac_c" 1>&6
5469 else
5470 cat > conftest.$ac_ext <<EOF
5471 #line 5472 "configure"
5472 #include "confdefs.h"
5473 #if defined(CRAY) && ! defined(CRAY2)
5474 webecray
5475 #else
5476 wenotbecray
5477 #endif
5480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5481 egrep "webecray" >/dev/null 2>&1; then
5482 rm -rf conftest*
5483 ac_cv_os_cray=yes
5484 else
5485 rm -rf conftest*
5486 ac_cv_os_cray=no
5488 rm -f conftest*
5492 echo "$ac_t""$ac_cv_os_cray" 1>&6
5493 if test $ac_cv_os_cray = yes; then
5494 for ac_func in _getb67 GETB67 getb67; do
5495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5496 echo "configure:5497: checking for $ac_func" >&5
5497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5498 echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500 cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* System header to define __stub macros and hopefully few prototypes,
5504 which can conflict with char $ac_func(); below. */
5505 #include <assert.h>
5506 /* Override any gcc2 internal prototype to avoid an error. */
5507 /* We use char because int might match the return type of a gcc2
5508 builtin and then its argument prototype would still apply. */
5509 char $ac_func();
5511 int main() {
5513 /* The GNU C library defines this for functions which it implements
5514 to always fail with ENOSYS. Some functions are actually named
5515 something starting with __ and the normal name is an alias. */
5516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5517 choke me
5518 #else
5519 $ac_func();
5520 #endif
5522 ; return 0; }
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525 rm -rf conftest*
5526 eval "ac_cv_func_$ac_func=yes"
5527 else
5528 echo "configure: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5530 rm -rf conftest*
5531 eval "ac_cv_func_$ac_func=no"
5533 rm -f conftest*
5536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5537 echo "$ac_t""yes" 1>&6
5538 cat >> confdefs.h <<EOF
5539 #define CRAY_STACKSEG_END $ac_func
5542 break
5543 else
5544 echo "$ac_t""no" 1>&6
5547 done
5550 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5551 echo "configure:5552: checking stack direction for C alloca" >&5
5552 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5553 echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555 if test "$cross_compiling" = yes; then
5556 ac_cv_c_stack_direction=0
5557 else
5558 cat > conftest.$ac_ext <<EOF
5559 #line 5560 "configure"
5560 #include "confdefs.h"
5561 find_stack_direction ()
5563 static char *addr = 0;
5564 auto char dummy;
5565 if (addr == 0)
5567 addr = &dummy;
5568 return find_stack_direction ();
5570 else
5571 return (&dummy > addr) ? 1 : -1;
5573 main ()
5575 exit (find_stack_direction() < 0);
5578 if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5579 then
5580 ac_cv_c_stack_direction=1
5581 else
5582 echo "configure: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 rm -fr conftest*
5585 ac_cv_c_stack_direction=-1
5587 rm -fr conftest*
5592 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5593 cat >> confdefs.h <<EOF
5594 #define STACK_DIRECTION $ac_cv_c_stack_direction
5600 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5601 echo "configure:5602: checking whether we are using the GNU C Library 2.1 or newer" >&5
5602 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5603 echo $ac_n "(cached) $ac_c" 1>&6
5604 else
5605 cat > conftest.$ac_ext <<EOF
5606 #line 5607 "configure"
5607 #include "confdefs.h"
5609 #include <features.h>
5610 #ifdef __GNU_LIBRARY__
5611 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5612 Lucky GNU user
5613 #endif
5614 #endif
5617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5618 egrep "Lucky GNU user" >/dev/null 2>&1; then
5619 rm -rf conftest*
5620 ac_cv_gnu_library_2_1=yes
5621 else
5622 rm -rf conftest*
5623 ac_cv_gnu_library_2_1=no
5625 rm -f conftest*
5631 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5633 GLIBC21="$ac_cv_gnu_library_2_1"
5637 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5638 stdlib.h string.h unistd.h sys/param.h
5640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5642 echo "configure:5643: checking for $ac_hdr" >&5
5643 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5644 echo $ac_n "(cached) $ac_c" 1>&6
5645 else
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 #include <$ac_hdr>
5651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5652 { (eval echo configure:5653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5654 if test -z "$ac_err"; then
5655 rm -rf conftest*
5656 eval "ac_cv_header_$ac_safe=yes"
5657 else
5658 echo "$ac_err" >&5
5659 echo "configure: failed program was:" >&5
5660 cat conftest.$ac_ext >&5
5661 rm -rf conftest*
5662 eval "ac_cv_header_$ac_safe=no"
5664 rm -f conftest*
5666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5667 echo "$ac_t""yes" 1>&6
5668 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5669 cat >> confdefs.h <<EOF
5670 #define $ac_tr_hdr 1
5673 else
5674 echo "$ac_t""no" 1>&6
5676 done
5678 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5679 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5680 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5682 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5683 echo "configure:5684: checking for $ac_func" >&5
5684 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5685 echo $ac_n "(cached) $ac_c" 1>&6
5686 else
5687 cat > conftest.$ac_ext <<EOF
5688 #line 5689 "configure"
5689 #include "confdefs.h"
5690 /* System header to define __stub macros and hopefully few prototypes,
5691 which can conflict with char $ac_func(); below. */
5692 #include <assert.h>
5693 /* Override any gcc2 internal prototype to avoid an error. */
5694 /* We use char because int might match the return type of a gcc2
5695 builtin and then its argument prototype would still apply. */
5696 char $ac_func();
5698 int main() {
5700 /* The GNU C library defines this for functions which it implements
5701 to always fail with ENOSYS. Some functions are actually named
5702 something starting with __ and the normal name is an alias. */
5703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5704 choke me
5705 #else
5706 $ac_func();
5707 #endif
5709 ; return 0; }
5711 if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5712 rm -rf conftest*
5713 eval "ac_cv_func_$ac_func=yes"
5714 else
5715 echo "configure: failed program was:" >&5
5716 cat conftest.$ac_ext >&5
5717 rm -rf conftest*
5718 eval "ac_cv_func_$ac_func=no"
5720 rm -f conftest*
5723 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5724 echo "$ac_t""yes" 1>&6
5725 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5726 cat >> confdefs.h <<EOF
5727 #define $ac_tr_func 1
5730 else
5731 echo "$ac_t""no" 1>&6
5733 done
5738 am_cv_lib_iconv_ldpath=
5739 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5740 if test "${with_libiconv_prefix+set}" = set; then
5741 withval="$with_libiconv_prefix"
5743 for dir in `echo "$withval" | tr : ' '`; do
5744 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5745 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5746 done
5751 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5752 echo "configure:5753: checking for iconv" >&5
5753 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5757 am_cv_func_iconv="no, consider installing GNU libiconv"
5758 am_cv_lib_iconv=no
5759 cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 #include <stdlib.h>
5763 #include <iconv.h>
5764 int main() {
5765 iconv_t cd = iconv_open("","");
5766 iconv(cd,NULL,NULL,NULL,NULL);
5767 iconv_close(cd);
5768 ; return 0; }
5770 if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5771 rm -rf conftest*
5772 am_cv_func_iconv=yes
5773 else
5774 echo "configure: failed program was:" >&5
5775 cat conftest.$ac_ext >&5
5777 rm -f conftest*
5778 if test "$am_cv_func_iconv" != yes; then
5779 am_save_LIBS="$LIBS"
5780 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5781 cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 #include <stdlib.h>
5785 #include <iconv.h>
5786 int main() {
5787 iconv_t cd = iconv_open("","");
5788 iconv(cd,NULL,NULL,NULL,NULL);
5789 iconv_close(cd);
5790 ; return 0; }
5792 if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5793 rm -rf conftest*
5794 am_cv_lib_iconv=yes
5795 am_cv_func_iconv=yes
5796 else
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5800 rm -f conftest*
5801 LIBS="$am_save_LIBS"
5806 echo "$ac_t""$am_cv_func_iconv" 1>&6
5807 if test "$am_cv_func_iconv" = yes; then
5808 cat >> confdefs.h <<\EOF
5809 #define HAVE_ICONV 1
5812 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5813 echo "configure:5814: checking for iconv declaration" >&5
5814 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5815 echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5818 cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5822 #include <stdlib.h>
5823 #include <iconv.h>
5824 extern
5825 #ifdef __cplusplus
5827 #endif
5828 #if defined(__STDC__) || defined(__cplusplus)
5829 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5830 #else
5831 size_t iconv();
5832 #endif
5834 int main() {
5836 ; return 0; }
5838 if { (eval echo configure:5839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5839 rm -rf conftest*
5840 am_cv_proto_iconv_arg1=""
5841 else
5842 echo "configure: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
5844 rm -rf conftest*
5845 am_cv_proto_iconv_arg1="const"
5847 rm -f conftest*
5848 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);"
5851 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5852 echo "$ac_t""${ac_t:-
5853 }$am_cv_proto_iconv" 1>&6
5854 cat >> confdefs.h <<EOF
5855 #define ICONV_CONST $am_cv_proto_iconv_arg1
5859 LIBICONV=
5860 if test "$am_cv_lib_iconv" = yes; then
5861 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5866 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
5867 echo "configure:5868: checking for nl_langinfo and CODESET" >&5
5868 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
5869 echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 #include <langinfo.h>
5875 int main() {
5876 char* cs = nl_langinfo(CODESET);
5877 ; return 0; }
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880 rm -rf conftest*
5881 am_cv_langinfo_codeset=yes
5882 else
5883 echo "configure: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
5885 rm -rf conftest*
5886 am_cv_langinfo_codeset=no
5888 rm -f conftest*
5892 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5893 if test $am_cv_langinfo_codeset = yes; then
5894 cat >> confdefs.h <<\EOF
5895 #define HAVE_LANGINFO_CODESET 1
5900 if test $ac_cv_header_locale_h = yes; then
5901 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5902 echo "configure:5903: checking for LC_MESSAGES" >&5
5903 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5904 echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906 cat > conftest.$ac_ext <<EOF
5907 #line 5908 "configure"
5908 #include "confdefs.h"
5909 #include <locale.h>
5910 int main() {
5911 return LC_MESSAGES
5912 ; return 0; }
5914 if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5915 rm -rf conftest*
5916 am_cv_val_LC_MESSAGES=yes
5917 else
5918 echo "configure: failed program was:" >&5
5919 cat conftest.$ac_ext >&5
5920 rm -rf conftest*
5921 am_cv_val_LC_MESSAGES=no
5923 rm -f conftest*
5926 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5927 if test $am_cv_val_LC_MESSAGES = yes; then
5928 cat >> confdefs.h <<\EOF
5929 #define HAVE_LC_MESSAGES 1
5934 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5935 echo "configure:5936: checking whether NLS is requested" >&5
5936 # Check whether --enable-nls or --disable-nls was given.
5937 if test "${enable_nls+set}" = set; then
5938 enableval="$enable_nls"
5939 USE_NLS=$enableval
5940 else
5941 USE_NLS=yes
5944 echo "$ac_t""$USE_NLS" 1>&6
5947 BUILD_INCLUDED_LIBINTL=no
5948 USE_INCLUDED_LIBINTL=no
5949 INTLLIBS=
5950 INTLDEPS=
5952 if test "$USE_NLS" = "yes"; then
5953 cat >> confdefs.h <<\EOF
5954 #define ENABLE_NLS 1
5957 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5958 echo "configure:5959: checking whether included gettext is requested" >&5
5959 # Check whether --with-included-gettext or --without-included-gettext was given.
5960 if test "${with_included_gettext+set}" = set; then
5961 withval="$with_included_gettext"
5962 nls_cv_force_use_gnu_gettext=$withval
5963 else
5964 nls_cv_force_use_gnu_gettext=no
5967 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5969 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5970 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5971 CATOBJEXT=NONE
5976 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5977 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5978 echo "configure:5979: checking for libintl.h" >&5
5979 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982 cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 #include <libintl.h>
5987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5988 { (eval echo configure:5989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5990 if test -z "$ac_err"; then
5991 rm -rf conftest*
5992 eval "ac_cv_header_$ac_safe=yes"
5993 else
5994 echo "$ac_err" >&5
5995 echo "configure: failed program was:" >&5
5996 cat conftest.$ac_ext >&5
5997 rm -rf conftest*
5998 eval "ac_cv_header_$ac_safe=no"
6000 rm -f conftest*
6002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6003 echo "$ac_t""yes" 1>&6
6004 cat >> confdefs.h <<\EOF
6005 #define HAVE_LIBINTL_H 1
6008 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6009 echo "configure:6010: checking for GNU gettext in libc" >&5
6010 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6011 echo $ac_n "(cached) $ac_c" 1>&6
6012 else
6013 cat > conftest.$ac_ext <<EOF
6014 #line 6015 "configure"
6015 #include "confdefs.h"
6016 #include <libintl.h>
6017 extern int _nl_msg_cat_cntr;
6018 int main() {
6019 bindtextdomain ("", "");
6020 return (int) gettext ("") + _nl_msg_cat_cntr
6021 ; return 0; }
6023 if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6024 rm -rf conftest*
6025 gt_cv_func_gnugettext1_libc=yes
6026 else
6027 echo "configure: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
6029 rm -rf conftest*
6030 gt_cv_func_gnugettext1_libc=no
6032 rm -f conftest*
6035 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6037 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6038 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6039 echo "configure:6040: checking for GNU gettext in libintl" >&5
6040 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6041 echo $ac_n "(cached) $ac_c" 1>&6
6042 else
6043 gt_save_LIBS="$LIBS"
6044 LIBS="$LIBS -lintl $LIBICONV"
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_libintl=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_libintl=no
6064 rm -f conftest*
6065 LIBS="$gt_save_LIBS"
6068 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6071 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6072 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6073 && test "$PACKAGE" != gettext; }; then
6074 cat >> confdefs.h <<\EOF
6075 #define HAVE_GETTEXT 1
6079 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6080 INTLLIBS="-lintl $LIBICONV"
6083 gt_save_LIBS="$LIBS"
6084 LIBS="$LIBS $INTLLIBS"
6085 for ac_func in dcgettext
6087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6088 echo "configure:6089: checking for $ac_func" >&5
6089 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6090 echo $ac_n "(cached) $ac_c" 1>&6
6091 else
6092 cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 /* System header to define __stub macros and hopefully few prototypes,
6096 which can conflict with char $ac_func(); below. */
6097 #include <assert.h>
6098 /* Override any gcc2 internal prototype to avoid an error. */
6099 /* We use char because int might match the return type of a gcc2
6100 builtin and then its argument prototype would still apply. */
6101 char $ac_func();
6103 int main() {
6105 /* The GNU C library defines this for functions which it implements
6106 to always fail with ENOSYS. Some functions are actually named
6107 something starting with __ and the normal name is an alias. */
6108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6109 choke me
6110 #else
6111 $ac_func();
6112 #endif
6114 ; return 0; }
6116 if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6117 rm -rf conftest*
6118 eval "ac_cv_func_$ac_func=yes"
6119 else
6120 echo "configure: failed program was:" >&5
6121 cat conftest.$ac_ext >&5
6122 rm -rf conftest*
6123 eval "ac_cv_func_$ac_func=no"
6125 rm -f conftest*
6128 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6129 echo "$ac_t""yes" 1>&6
6130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6131 cat >> confdefs.h <<EOF
6132 #define $ac_tr_func 1
6135 else
6136 echo "$ac_t""no" 1>&6
6138 done
6140 LIBS="$gt_save_LIBS"
6142 # Extract the first word of "msgfmt", so it can be a program name with args.
6143 set dummy msgfmt; ac_word=$2
6144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6145 echo "configure:6146: checking for $ac_word" >&5
6146 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6147 echo $ac_n "(cached) $ac_c" 1>&6
6148 else
6149 case "$MSGFMT" in
6151 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6155 for ac_dir in $PATH; do
6156 test -z "$ac_dir" && ac_dir=.
6157 if test -f $ac_dir/$ac_word; then
6158 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6159 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6160 break
6163 done
6164 IFS="$ac_save_ifs"
6165 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6167 esac
6169 MSGFMT="$ac_cv_path_MSGFMT"
6170 if test "$MSGFMT" != ":"; then
6171 echo "$ac_t""$MSGFMT" 1>&6
6172 else
6173 echo "$ac_t""no" 1>&6
6176 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6177 set dummy gmsgfmt; ac_word=$2
6178 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6179 echo "configure:6180: checking for $ac_word" >&5
6180 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6181 echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183 case "$GMSGFMT" in
6185 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6187 ?:/*)
6188 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6192 ac_dummy="$PATH"
6193 for ac_dir in $ac_dummy; do
6194 test -z "$ac_dir" && ac_dir=.
6195 if test -f $ac_dir/$ac_word; then
6196 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6197 break
6199 done
6200 IFS="$ac_save_ifs"
6201 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6203 esac
6205 GMSGFMT="$ac_cv_path_GMSGFMT"
6206 if test -n "$GMSGFMT"; then
6207 echo "$ac_t""$GMSGFMT" 1>&6
6208 else
6209 echo "$ac_t""no" 1>&6
6213 # Extract the first word of "xgettext", so it can be a program name with args.
6214 set dummy xgettext; ac_word=$2
6215 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6216 echo "configure:6217: checking for $ac_word" >&5
6217 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6218 echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220 case "$XGETTEXT" in
6222 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6226 for ac_dir in $PATH; do
6227 test -z "$ac_dir" && ac_dir=.
6228 if test -f $ac_dir/$ac_word; then
6229 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6230 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6231 break
6234 done
6235 IFS="$ac_save_ifs"
6236 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6238 esac
6240 XGETTEXT="$ac_cv_path_XGETTEXT"
6241 if test "$XGETTEXT" != ":"; then
6242 echo "$ac_t""$XGETTEXT" 1>&6
6243 else
6244 echo "$ac_t""no" 1>&6
6248 CATOBJEXT=.gmo
6251 else
6252 echo "$ac_t""no" 1>&6
6256 if test "$CATOBJEXT" = "NONE"; then
6257 nls_cv_use_gnu_gettext=yes
6261 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6262 INTLOBJS="\$(GETTOBJS)"
6263 # Extract the first word of "msgfmt", so it can be a program name with args.
6264 set dummy msgfmt; ac_word=$2
6265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6266 echo "configure:6267: checking for $ac_word" >&5
6267 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6268 echo $ac_n "(cached) $ac_c" 1>&6
6269 else
6270 case "$MSGFMT" in
6272 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6275 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6276 for ac_dir in $PATH; do
6277 test -z "$ac_dir" && ac_dir=.
6278 if test -f $ac_dir/$ac_word; then
6279 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6280 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6281 break
6284 done
6285 IFS="$ac_save_ifs"
6286 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6288 esac
6290 MSGFMT="$ac_cv_path_MSGFMT"
6291 if test "$MSGFMT" != ":"; then
6292 echo "$ac_t""$MSGFMT" 1>&6
6293 else
6294 echo "$ac_t""no" 1>&6
6297 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6298 set dummy gmsgfmt; ac_word=$2
6299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6300 echo "configure:6301: checking for $ac_word" >&5
6301 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6302 echo $ac_n "(cached) $ac_c" 1>&6
6303 else
6304 case "$GMSGFMT" in
6306 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6308 ?:/*)
6309 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6312 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6313 ac_dummy="$PATH"
6314 for ac_dir in $ac_dummy; do
6315 test -z "$ac_dir" && ac_dir=.
6316 if test -f $ac_dir/$ac_word; then
6317 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6318 break
6320 done
6321 IFS="$ac_save_ifs"
6322 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6324 esac
6326 GMSGFMT="$ac_cv_path_GMSGFMT"
6327 if test -n "$GMSGFMT"; then
6328 echo "$ac_t""$GMSGFMT" 1>&6
6329 else
6330 echo "$ac_t""no" 1>&6
6333 # Extract the first word of "xgettext", so it can be a program name with args.
6334 set dummy xgettext; ac_word=$2
6335 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6336 echo "configure:6337: checking for $ac_word" >&5
6337 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6338 echo $ac_n "(cached) $ac_c" 1>&6
6339 else
6340 case "$XGETTEXT" in
6342 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6346 for ac_dir in $PATH; do
6347 test -z "$ac_dir" && ac_dir=.
6348 if test -f $ac_dir/$ac_word; then
6349 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6350 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6351 break
6354 done
6355 IFS="$ac_save_ifs"
6356 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6358 esac
6360 XGETTEXT="$ac_cv_path_XGETTEXT"
6361 if test "$XGETTEXT" != ":"; then
6362 echo "$ac_t""$XGETTEXT" 1>&6
6363 else
6364 echo "$ac_t""no" 1>&6
6368 BUILD_INCLUDED_LIBINTL=yes
6369 USE_INCLUDED_LIBINTL=yes
6370 CATOBJEXT=.gmo
6371 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6372 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6373 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6376 if test "$GMSGFMT" != ":"; then
6377 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6379 else
6380 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6381 GMSGFMT=":"
6385 if test "$XGETTEXT" != ":"; then
6386 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6388 else
6389 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6390 XGETTEXT=":"
6394 POSUB=po
6399 if test "$PACKAGE" = gettext; then
6400 BUILD_INCLUDED_LIBINTL=yes
6403 for ac_prog in bison
6405 # Extract the first word of "$ac_prog", so it can be a program name with args.
6406 set dummy $ac_prog; ac_word=$2
6407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6408 echo "configure:6409: checking for $ac_word" >&5
6409 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6410 echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412 if test -n "$INTLBISON"; then
6413 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6414 else
6415 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6416 ac_dummy="$PATH"
6417 for ac_dir in $ac_dummy; do
6418 test -z "$ac_dir" && ac_dir=.
6419 if test -f $ac_dir/$ac_word; then
6420 ac_cv_prog_INTLBISON="$ac_prog"
6421 break
6423 done
6424 IFS="$ac_save_ifs"
6427 INTLBISON="$ac_cv_prog_INTLBISON"
6428 if test -n "$INTLBISON"; then
6429 echo "$ac_t""$INTLBISON" 1>&6
6430 else
6431 echo "$ac_t""no" 1>&6
6434 test -n "$INTLBISON" && break
6435 done
6437 if test -z "$INTLBISON"; then
6438 ac_verc_fail=yes
6439 else
6440 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6441 echo "configure:6442: checking version of bison" >&5
6442 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6443 case $ac_prog_version in
6444 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6445 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6446 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6447 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6448 esac
6449 echo "$ac_t""$ac_prog_version" 1>&6
6451 if test $ac_verc_fail = yes; then
6452 INTLBISON=:
6464 if test $USE_INCLUDED_LIBINTL = yes; then
6465 cat >> confdefs.h <<\EOF
6466 #define USE_INCLUDED_LIBINTL 1
6471 nls_cv_header_intl=
6472 nls_cv_header_libgt=
6474 DATADIRNAME=share
6477 INSTOBJEXT=.mo
6480 GENCAT=gencat
6484 if test "x$CATOBJEXT" != x; then
6485 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6486 echo "configure:6487: checking for catalogs to be installed" >&5
6487 # Look for .po and .gmo files in the source directory.
6488 CATALOGS=
6489 XLINGUAS=
6490 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6491 # If there aren't any .gmo files the shell will give us the
6492 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6493 # weeded out.
6494 case "$cat" in *\**)
6495 continue;;
6496 esac
6497 # The quadruple backslash is collapsed to a double backslash
6498 # by the backticks, then collapsed again by the double quotes,
6499 # leaving us with one backslash in the sed expression (right
6500 # before the dot that mustn't act as a wildcard). The dot to
6501 # be escaped in the second expression is hiding inside CATOBJEXT.
6502 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6503 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6504 # The user is allowed to set LINGUAS to a list of languages to
6505 # install catalogs for. If it's empty that means "all of them."
6506 if test "x$LINGUAS" = x; then
6507 CATALOGS="$CATALOGS $cat"
6508 XLINGUAS="$XLINGUAS $lang"
6509 else
6510 case "$LINGUAS" in *$lang*)
6511 CATALOGS="$CATALOGS $cat"
6512 XLINGUAS="$XLINGUAS $lang"
6514 esac
6516 done
6517 LINGUAS="$XLINGUAS"
6518 echo "$ac_t""$LINGUAS" 1>&6
6521 MKINSTALLDIRS=
6522 if test -n "$ac_aux_dir"; then
6523 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6525 if test -z "$MKINSTALLDIRS"; then
6526 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6530 INTL_LIBTOOL_SUFFIX_PREFIX=
6534 # Windows32 Registry support for specifying GCC installation paths.
6535 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6536 if test "${enable_win32_registry+set}" = set; then
6537 enableval="$enable_win32_registry"
6541 case $host_os in
6542 win32 | pe | cygwin* | mingw32* | uwin*)
6543 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6544 echo "configure:6545: checking whether windows registry support is requested" >&5
6545 if test "x$enable_win32_registry" != xno; then
6546 cat >> confdefs.h <<\EOF
6547 #define ENABLE_WIN32_REGISTRY 1
6550 echo "$ac_t""yes" 1>&6
6552 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6553 echo "configure:6554: checking for library containing RegOpenKeyExA" >&5
6554 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6555 echo $ac_n "(cached) $ac_c" 1>&6
6556 else
6557 ac_func_search_save_LIBS="$LIBS"
6558 ac_cv_search_RegOpenKeyExA="no"
6559 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 /* Override any gcc2 internal prototype to avoid an error. */
6563 /* We use char because int might match the return type of a gcc2
6564 builtin and then its argument prototype would still apply. */
6565 char RegOpenKeyExA();
6567 int main() {
6568 RegOpenKeyExA()
6569 ; return 0; }
6571 if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6572 rm -rf conftest*
6573 ac_cv_search_RegOpenKeyExA="none required"
6574 else
6575 echo "configure: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6578 rm -f conftest*
6579 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6580 LIBS="-l$i $ac_func_search_save_LIBS"
6581 cat > conftest.$ac_ext <<EOF
6582 #line 6583 "configure"
6583 #include "confdefs.h"
6584 /* Override any gcc2 internal prototype to avoid an error. */
6585 /* We use char because int might match the return type of a gcc2
6586 builtin and then its argument prototype would still apply. */
6587 char RegOpenKeyExA();
6589 int main() {
6590 RegOpenKeyExA()
6591 ; return 0; }
6593 if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6594 rm -rf conftest*
6595 ac_cv_search_RegOpenKeyExA="-l$i"
6596 break
6597 else
6598 echo "configure: failed program was:" >&5
6599 cat conftest.$ac_ext >&5
6601 rm -f conftest*
6602 done
6603 LIBS="$ac_func_search_save_LIBS"
6606 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6607 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6608 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6610 else :
6613 else
6614 echo "$ac_t""no" 1>&6
6617 # Check if user specified a different registry key.
6618 case "x${enable_win32_registry}" in
6619 x | xyes)
6620 # default.
6621 gcc_cv_win32_registry_key="$VERSION"
6623 xno)
6624 # no registry lookup.
6625 gcc_cv_win32_registry_key=''
6628 # user-specified key.
6629 gcc_cv_win32_registry_key="$enable_win32_registry"
6631 esac
6633 if test "x$enable_win32_registry" != xno; then
6634 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6635 echo "configure:6636: checking registry key on windows hosts" >&5
6636 cat >> confdefs.h <<EOF
6637 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6640 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6643 esac
6645 # Get an absolute path to the GCC top-level source directory
6646 holddir=`${PWDCMD-pwd}`
6647 cd $srcdir
6648 topdir=`${PWDCMD-pwd}`
6649 cd $holddir
6651 # Conditionalize the makefile for this host machine.
6652 # Make-host contains the concatenation of all host makefile fragments
6653 # [there can be more than one]. This file is built by configure.frag.
6654 host_overrides=Make-host
6655 dep_host_xmake_file=
6656 for f in .. ${host_xmake_file}
6658 if test -f ${srcdir}/config/$f
6659 then
6660 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6662 done
6664 # Conditionalize the makefile for this target machine.
6665 # Make-target contains the concatenation of all host makefile fragments
6666 # [there can be more than one]. This file is built by configure.frag.
6667 target_overrides=Make-target
6668 dep_tmake_file=
6669 for f in .. ${tmake_file}
6671 if test -f ${srcdir}/config/$f
6672 then
6673 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6675 done
6677 # If the host doesn't support symlinks, modify CC in
6678 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6679 # Otherwise, we can use "CC=$(CC)".
6680 rm -f symtest.tem
6681 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6682 then
6683 cc_set_by_configure="\$(CC)"
6684 quoted_cc_set_by_configure="\$(CC)"
6685 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6686 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6687 else
6688 rm -f symtest.tem
6689 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6690 then
6691 symbolic_link="cp -p"
6692 else
6693 symbolic_link="cp"
6695 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6696 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6697 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6698 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6700 rm -f symtest.tem
6702 out_object_file=`basename $out_file .c`.o
6704 tm_file_list=
6705 for f in $tm_file; do
6706 case $f in
6707 ansidecl.h )
6708 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6709 defaults.h )
6710 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6711 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6712 esac
6713 done
6715 tm_p_file_list=
6716 for f in $tm_p_file; do
6717 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6718 done
6720 host_xm_file_list=
6721 for f in $host_xm_file; do
6722 case $f in
6723 ansidecl.h )
6724 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6725 auto-host.h )
6726 host_xm_file_list="${host_xm_file_list} $f" ;;
6727 defaults.h )
6728 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6729 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6730 esac
6731 done
6733 build_xm_file_list=
6734 for f in $build_xm_file; do
6735 case $f in
6736 ansidecl.h )
6737 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6738 auto-build.h | auto-host.h )
6739 build_xm_file_list="${build_xm_file_list} $f" ;;
6740 defaults.h )
6741 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6742 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6743 esac
6744 done
6746 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6747 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6748 CROSS=
6749 ALL=all.internal
6750 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6751 if test x$host != x$target
6752 then
6753 CROSS="-DCROSS_COMPILE"
6754 ALL=all.cross
6755 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6756 case "$host","$target" in
6757 i?86-*-*,x86_64-*-* \
6758 | powerpc*-*-*,powerpc64*-*-*)
6759 CROSS="$CROSS -DNATIVE_CROSS" ;;
6760 esac
6763 # If this is a cross-compiler that does not
6764 # have its own set of headers then define
6765 # inhibit_libc
6767 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6768 # This prevents libgcc2 from containing any code which requires libc
6769 # support.
6770 inhibit_libc=
6771 if test x$host != x$target && test x$with_headers = x; then
6772 inhibit_libc=-Dinhibit_libc
6773 else
6774 if test x$with_newlib = xyes; then
6775 inhibit_libc=-Dinhibit_libc
6780 # When building gcc with a cross-compiler, we need to adjust things so
6781 # that the generator programs are still built with the native compiler.
6782 # Also, we cannot run fixincludes or fix-header.
6783 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6784 # FIXME.
6786 # These are the normal (build=host) settings:
6787 BUILD_PREFIX=
6788 BUILD_PREFIX_1=ignore-
6789 HOST_CC='$(CC)'
6790 HOST_CFLAGS='$(ALL_CFLAGS)'
6792 STMP_FIXINC=stmp-fixinc
6793 STMP_FIXPROTO=stmp-fixproto
6795 # And these apply if build != host.
6796 if test x$build != x$host
6797 then
6798 BUILD_PREFIX=build-
6799 BUILD_PREFIX_1=build-
6800 HOST_CC='$(CC_FOR_BUILD)'
6801 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6803 STMP_FIXINC=
6804 STMP_FIXPROTO=
6807 # Expand extra_headers to include complete path.
6808 # This substitutes for lots of t-* files.
6809 extra_headers_list=
6810 if test "x$extra_headers" = x
6811 then true
6812 else
6813 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6814 for file in $extra_headers;
6816 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6817 done
6820 if test x$use_collect2 = xno; then
6821 use_collect2=
6824 # Add a definition of USE_COLLECT2 if system wants one.
6825 if test x$use_collect2 != x
6826 then
6827 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6828 xm_defines="${xm_defines} USE_COLLECT2"
6831 # If we have gas in the build tree, make a link to it.
6832 if test -f ../gas/Makefile; then
6833 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6836 # If we have nm and objdump in the build tree, make a link to them.
6837 if test -f ../binutils/Makefile; then
6838 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6839 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6842 # If we have ld in the build tree, make a link to it.
6843 if test -f ../ld/Makefile; then
6844 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6847 # Figure out what assembler we will be using.
6848 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6849 echo "configure:6850: checking what assembler to use" >&5
6850 gcc_cv_as=
6851 gcc_cv_gas_major_version=
6852 gcc_cv_gas_minor_version=
6853 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6854 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6855 if test -x "$DEFAULT_ASSEMBLER"; then
6856 gcc_cv_as="$DEFAULT_ASSEMBLER"
6857 elif test -x "$AS"; then
6858 gcc_cv_as="$AS"
6859 elif test -x as$host_exeext; then
6860 # Build using assembler in the current directory.
6861 gcc_cv_as=./as$host_exeext
6862 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6863 # Single tree build which includes gas.
6864 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
6866 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6867 if test x$gcc_cv_gas_version != x; then
6868 break
6870 done
6871 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6872 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6873 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
6876 if test "x$gcc_cv_as" = x; then
6877 # Search the same directories that the installed compiler will
6878 # search. Else we may find the wrong assembler and lose. If we
6879 # do not find a suitable assembler binary, then try the user's
6880 # path.
6882 # Also note we have to check MD_EXEC_PREFIX before checking the
6883 # user's path. Unfortunately, there is no good way to get at the
6884 # value of MD_EXEC_PREFIX here. So we do a brute force search
6885 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6886 # to be fixed as part of the make/configure rewrite too.
6888 if test "x$exec_prefix" = xNONE; then
6889 if test "x$prefix" = xNONE; then
6890 test_prefix=/usr/local
6891 else
6892 test_prefix=$prefix
6894 else
6895 test_prefix=$exec_prefix
6898 # If the loop below does not find an assembler, then use whatever
6899 # one we can find in the users's path.
6900 # user's path.
6901 if test "x$program_prefix" != xNONE; then
6902 gcc_cv_as=${program_prefix}as$host_exeext
6903 else
6904 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
6907 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6908 $test_prefix/lib/gcc-lib/$target_alias \
6909 /usr/lib/gcc/$target_alias/$gcc_version \
6910 /usr/lib/gcc/$target_alias \
6911 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6912 $test_prefix/$target_alias/bin"
6914 if test x$host = x$target; then
6915 test_dirs="$test_dirs \
6916 /usr/libexec \
6917 /usr/ccs/gcc \
6918 /usr/ccs/bin \
6919 /udk/usr/ccs/bin \
6920 /bsd43/usr/lib/cmplrs/cc \
6921 /usr/cross64/usr/bin \
6922 /usr/lib/cmplrs/cc \
6923 /sysv/usr/lib/cmplrs/cc \
6924 /svr4/usr/lib/cmplrs/cc \
6925 /usr/bin"
6928 for dir in $test_dirs; do
6929 if test -x $dir/as$host_exeext; then
6930 gcc_cv_as=$dir/as$host_exeext
6931 break;
6933 done
6935 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6936 echo "$ac_t"""newly built gas"" 1>&6
6937 else
6938 echo "$ac_t""$gcc_cv_as" 1>&6
6941 # Figure out what linker we will be using.
6942 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
6943 echo "configure:6944: checking what linker to use" >&5
6944 gcc_cv_ld=
6945 gcc_cv_gld_major_version=
6946 gcc_cv_gld_minor_version=
6947 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
6948 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6949 if test -x "$DEFAULT_LINKER"; then
6950 gcc_cv_ld="$DEFAULT_LINKER"
6951 elif test -x "$LD"; then
6952 gcc_cv_ld="$LD"
6953 elif test -x ld$host_exeext; then
6954 # Build using linker in the current directory.
6955 gcc_cv_ld=./ld$host_exeext
6956 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
6957 # Single tree build which includes ld.
6958 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
6960 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6961 if test x$gcc_cv_gld_version != x; then
6962 break
6964 done
6965 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
6966 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6969 if test "x$gcc_cv_ld" = x; then
6970 # Search the same directories that the installed compiler will
6971 # search. Else we may find the wrong linker and lose. If we
6972 # do not find a suitable linker binary, then try the user's
6973 # path.
6975 # Also note we have to check MD_EXEC_PREFIX before checking the
6976 # user's path. Unfortunately, there is no good way to get at the
6977 # value of MD_EXEC_PREFIX here. So we do a brute force search
6978 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6979 # to be fixed as part of the make/configure rewrite too.
6981 if test "x$exec_prefix" = xNONE; then
6982 if test "x$prefix" = xNONE; then
6983 test_prefix=/usr/local
6984 else
6985 test_prefix=$prefix
6987 else
6988 test_prefix=$exec_prefix
6991 # If the loop below does not find an linker, then use whatever
6992 # one we can find in the users's path.
6993 # user's path.
6994 if test "x$program_prefix" != xNONE; then
6995 gcc_cv_ld=${program_prefix}ld$host_exeext
6996 else
6997 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7000 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7001 $test_prefix/lib/gcc-lib/$target_alias \
7002 /usr/lib/gcc/$target_alias/$gcc_version \
7003 /usr/lib/gcc/$target_alias \
7004 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7005 $test_prefix/$target_alias/bin"
7007 if test x$host = x$target; then
7008 test_dirs="$test_dirs \
7009 /usr/libexec \
7010 /usr/ccs/gcc \
7011 /usr/ccs/bin \
7012 /udk/usr/ccs/bin \
7013 /bsd43/usr/lib/cmplrs/cc \
7014 /usr/cross64/usr/bin \
7015 /usr/lib/cmplrs/cc \
7016 /sysv/usr/lib/cmplrs/cc \
7017 /svr4/usr/lib/cmplrs/cc \
7018 /usr/bin"
7021 for dir in $test_dirs; do
7022 if test -x $dir/ld$host_exeext; then
7023 gcc_cv_ld=$dir/ld$host_exeext
7024 break;
7026 done
7028 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7029 echo "$ac_t"""newly built ld"" 1>&6
7030 else
7031 echo "$ac_t""$gcc_cv_ld" 1>&6
7034 # Figure out what nm we will be using.
7035 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7036 echo "configure:7037: checking what nm to use" >&5
7037 if test -x nm$host_exeext; then
7038 gcc_cv_nm=./nm$host_exeext
7039 elif test "x$program_prefix" != xNONE; then
7040 gcc_cv_nm=${program_prefix}nm$host_exeext
7041 else
7042 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7044 echo "$ac_t""$gcc_cv_nm" 1>&6
7046 # Figure out what objdump we will be using.
7047 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7048 echo "configure:7049: checking what objdump to use" >&5
7049 if test -x objdump$host_exeext; then
7050 gcc_cv_objdump=./objdump$host_exeext
7051 elif test "x$program_prefix" != xNONE; then
7052 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7053 else
7054 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7056 echo "$ac_t""$gcc_cv_objdump" 1>&6
7058 # Figure out what assembler alignment features are present.
7059 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7060 echo "configure:7061: checking assembler alignment features" >&5
7061 gcc_cv_as_alignment_features=none
7062 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7063 # Gas version 2.6 and later support for .balign and .p2align.
7064 # bytes to skip when using .p2align.
7065 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
7066 gcc_cv_as_alignment_features=".balign and .p2align"
7067 cat >> confdefs.h <<\EOF
7068 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7072 # Gas version 2.8 and later support specifying the maximum
7073 # bytes to skip when using .p2align.
7074 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
7075 gcc_cv_as_alignment_features=".p2align including maximum skip"
7076 cat >> confdefs.h <<\EOF
7077 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7081 elif test x$gcc_cv_as != x; then
7082 # Check if we have .balign and .p2align
7083 echo ".balign 4" > conftest.s
7084 echo ".p2align 2" >> conftest.s
7085 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7086 gcc_cv_as_alignment_features=".balign and .p2align"
7087 cat >> confdefs.h <<\EOF
7088 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7092 rm -f conftest.s conftest.o
7093 # Check if specifying the maximum bytes to skip when
7094 # using .p2align is supported.
7095 echo ".p2align 4,,7" > conftest.s
7096 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7097 gcc_cv_as_alignment_features=".p2align including maximum skip"
7098 cat >> confdefs.h <<\EOF
7099 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7103 rm -f conftest.s conftest.o
7105 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7107 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7108 echo "configure:7109: checking assembler subsection support" >&5
7109 gcc_cv_as_subsections=no
7110 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7111 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
7112 gcc_cv_as_subsections="working .subsection -1"
7114 elif test x$gcc_cv_as != x; then
7115 # Check if we have .subsection
7116 echo ".subsection 1" > conftest.s
7117 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7118 gcc_cv_as_subsections=".subsection"
7119 if test x$gcc_cv_nm != x; then
7120 cat > conftest.s <<EOF
7121 conftest_label1: .word 0
7122 .subsection -1
7123 conftest_label2: .word 0
7124 .previous
7126 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7127 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7128 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7129 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7131 else
7132 gcc_cv_as_subsections="working .subsection -1"
7137 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7139 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7140 cat >> confdefs.h <<\EOF
7141 #define HAVE_GAS_SUBSECTION_ORDERING 1
7145 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7147 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7148 echo "configure:7149: checking assembler weak support" >&5
7149 gcc_cv_as_weak=no
7150 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7151 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
7152 gcc_cv_as_weak="yes"
7154 elif test x$gcc_cv_as != x; then
7155 # Check if we have .weak
7156 echo " .weak foobar" > conftest.s
7157 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7158 gcc_cv_as_weak="yes"
7160 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7162 if test x"$gcc_cv_as_weak" = xyes; then
7163 cat >> confdefs.h <<\EOF
7164 #define HAVE_GAS_WEAK 1
7168 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7170 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7171 echo "configure:7172: checking assembler hidden support" >&5
7172 gcc_cv_as_hidden=no
7173 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7174 if test "$gcc_cv_gas_major_version" -eq 2 \
7175 -a "$gcc_cv_gas_minor_version" -eq 12 \
7176 -a "$gcc_cv_gas_patch_version" -ge 1 \
7177 -o "$gcc_cv_gas_major_version" -eq 2 \
7178 -a "$gcc_cv_gas_minor_version" -gt 12 \
7179 -o "$gcc_cv_gas_major_version" -gt 2 \
7180 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7181 gcc_cv_as_hidden="yes"
7183 elif test x$gcc_cv_as != x; then
7184 # Check if we have .hidden
7185 echo " .hidden foobar" > conftest.s
7186 echo "foobar:" >> conftest.s
7187 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7188 gcc_cv_as_hidden="yes"
7190 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7192 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7193 # This is irritatingly difficult to feature test for. Look for
7194 # the date string after the version number.
7195 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7196 if echo "$ld_ver" | grep GNU > /dev/null; then
7197 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7198 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'`
7199 if test 0"$ld_date" -lt 20020404; then
7200 if test -n "$ld_date"; then
7201 # If there was date string, but was earlier than 2002-04-04, fail
7202 gcc_cv_as_hidden="no"
7203 elif test -z "$ld_vers"; then
7204 # If there was no date string nor ld version number, something is wrong
7205 gcc_cv_as_hidden="no"
7206 else
7207 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7208 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7209 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7210 test -z "$ld_vers_patch" && ld_vers_patch=0
7211 if test "$ld_vers_major" -lt 2; then
7212 gcc_cv_as_hidden="no"
7213 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7214 gcc_cv_as_hidden="no"
7215 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7216 -a "$ld_vers_patch" -eq 0; then
7217 gcc_cv_as_hidden="no"
7223 if test x"$gcc_cv_as_hidden" = xyes; then
7224 cat >> confdefs.h <<\EOF
7225 #define HAVE_GAS_HIDDEN 1
7229 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7230 libgcc_visibility=$gcc_cv_as_hidden
7233 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7234 echo "configure:7235: checking assembler leb128 support" >&5
7235 gcc_cv_as_leb128=no
7236 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7237 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
7238 gcc_cv_as_leb128="yes"
7240 elif test x$gcc_cv_as != x; then
7241 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7242 cat > conftest.s <<EOF
7243 .data
7244 .uleb128 L2 - L1
7246 .uleb128 1280
7247 .sleb128 -1010
7250 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7251 gcc_cv_as_leb128="yes"
7253 # GAS versions before 2.11 do not support uleb128,
7254 # despite appearing to.
7255 # ??? There exists an elf-specific test that will crash
7256 # the assembler. Perhaps it's better to figure out whether
7257 # arbitrary sections are supported and try the test.
7258 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7259 if echo "$as_ver" | grep GNU > /dev/null; then
7260 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7261 as_major=`echo $as_ver | sed 's/\..*//'`
7262 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7263 if test $as_major -eq 2 -a $as_minor -lt 11; then
7264 gcc_cv_as_leb128="no"
7268 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7270 if test x"$gcc_cv_as_leb128" = xyes; then
7271 cat >> confdefs.h <<\EOF
7272 #define HAVE_AS_LEB128 1
7276 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7278 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7279 echo "configure:7280: checking assembler eh_frame optimization" >&5
7280 gcc_cv_as_eh_frame=no
7281 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7282 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
7283 gcc_cv_as_eh_frame="yes"
7285 elif test x$gcc_cv_as != x; then
7286 # Check if this is GAS.
7287 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7288 rm -f a.out 2> /dev/null
7289 if echo "$as_ver" | grep GNU > /dev/null; then
7290 # Versions up to and including 2.11.0 may mis-optimize
7291 # .eh_frame data. Try something.
7292 cat > conftest.s <<EOF
7293 .text
7294 .LFB1:
7295 .4byte 0
7296 .L1:
7297 .4byte 0
7298 .LFE1:
7299 .section .eh_frame,"aw",@progbits
7300 __FRAME_BEGIN__:
7301 .4byte .LECIE1-.LSCIE1
7302 .LSCIE1:
7303 .4byte 0x0
7304 .byte 0x1
7305 .ascii "z\0"
7306 .byte 0x1
7307 .byte 0x78
7308 .byte 0x1a
7309 .byte 0x0
7310 .byte 0x4
7311 .4byte 1
7312 .p2align 1
7313 .LECIE1:
7314 .LSFDE1:
7315 .4byte .LEFDE1-.LASFDE1
7316 .LASFDE1:
7317 .4byte .LASFDE1-__FRAME_BEGIN__
7318 .4byte .LFB1
7319 .4byte .LFE1-.LFB1
7320 .byte 0x4
7321 .4byte .LFE1-.LFB1
7322 .byte 0x4
7323 .4byte .L1-.LFB1
7324 .LEFDE1:
7326 cat > conftest.lit <<EOF
7327 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7328 0010 01000000 12000000 18000000 00000000 ................
7329 0020 08000000 04080000 0044 .........D
7331 cat > conftest.big <<EOF
7332 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7333 0010 00000001 00000012 00000018 00000000 ................
7334 0020 00000008 04000000 0844 .........D
7336 # If the assembler didn't choke, and we can objdump,
7337 # and we got the correct data, then succeed.
7338 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7339 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7340 | tail -3 > conftest.got \
7341 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7342 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7343 then
7344 gcc_cv_as_eh_frame="yes"
7345 else
7346 gcc_cv_as_eh_frame="bad"
7347 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7348 cat >> confdefs.h <<\EOF
7349 #define USE_AS_TRADITIONAL_FORMAT 1
7355 rm -f conftest.*
7357 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7359 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7360 echo "configure:7361: checking assembler section merging support" >&5
7361 gcc_cv_as_shf_merge=no
7362 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7363 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
7364 gcc_cv_as_shf_merge=yes
7366 elif test x$gcc_cv_as != x; then
7367 # Check if we support SHF_MERGE sections
7368 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7369 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7370 gcc_cv_as_shf_merge=yes
7372 rm -f conftest.s conftest.o
7374 if test x"$gcc_cv_as_shf_merge" = xyes; then
7375 cat >> confdefs.h <<\EOF
7376 #define HAVE_GAS_SHF_MERGE 1
7380 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7382 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7383 echo "configure:7384: checking assembler thread-local storage support" >&5
7384 gcc_cv_as_tls=no
7385 conftest_s=
7386 tls_first_major=
7387 tls_first_minor=
7388 case "$target" in
7389 alpha*-*-*)
7390 conftest_s='
7391 .section ".tdata","awT",@progbits
7392 foo: .long 25
7393 .text
7394 ldq $27,__tls_get_addr($29) !literal!1
7395 lda $16,foo($29) !tlsgd!1
7396 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7397 ldq $27,__tls_get_addr($29) !literal!2
7398 lda $16,foo($29) !tlsldm!2
7399 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7400 ldq $1,foo($29) !gotdtprel
7401 ldah $2,foo($29) !dtprelhi
7402 lda $3,foo($2) !dtprello
7403 lda $4,foo($29) !dtprel
7404 ldq $1,foo($29) !gottprel
7405 ldah $2,foo($29) !tprelhi
7406 lda $3,foo($2) !tprello
7407 lda $4,foo($29) !tprel'
7408 tls_first_major=2
7409 tls_first_minor=13
7411 i[34567]86-*-*)
7412 conftest_s='
7413 .section ".tdata","awT",@progbits
7414 foo: .long 25
7415 .text
7416 movl %gs:0, %eax
7417 leal foo@TLSGD(,%ebx,1), %eax
7418 leal foo@TLSLDM(%ebx), %eax
7419 leal foo@DTPOFF(%eax), %edx
7420 movl foo@GOTTPOFF(%ebx), %eax
7421 subl foo@GOTTPOFF(%ebx), %eax
7422 movl $foo@TPOFF, %eax
7423 subl $foo@TPOFF, %eax
7424 leal foo@NTPOFF(%ecx), %eax'
7425 tls_first_major=2
7426 tls_first_minor=13
7428 ia64-*-*)
7429 conftest_s='
7430 .section ".tdata","awT",@progbits
7431 foo: data8 25
7432 .text
7433 addl r16 = @ltoff(@dtpmod(foo#)), gp
7434 addl r17 = @ltoff(@dtprel(foo#)), gp
7435 addl r18 = @ltoff(@tprel(foo#)), gp
7436 addl r19 = @dtprel(foo#), gp
7437 adds r21 = @dtprel(foo#), r13
7438 movl r23 = @dtprel(foo#)
7439 addl r20 = @tprel(foo#), gp
7440 adds r22 = @tprel(foo#), r13
7441 movl r24 = @tprel(foo#)'
7442 tls_first_major=2
7443 tls_first_minor=13
7445 esac
7446 if test -z "$tls_first_major"; then
7448 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7449 then
7450 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7451 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7452 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7453 gcc_cv_as_tls=yes
7455 elif test x$gcc_cv_as != x; then
7456 echo "$conftest_s" > conftest.s
7457 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7458 then
7459 gcc_cv_as_tls=yes
7461 rm -f conftest.s conftest.o
7463 if test "$gcc_cv_as_tls" = yes; then
7464 cat >> confdefs.h <<\EOF
7465 #define HAVE_AS_TLS 1
7469 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7471 case "$target" in
7472 # All TARGET_ABI_OSF targets.
7473 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7474 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7475 echo "configure:7476: checking assembler supports explicit relocations" >&5
7476 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7477 echo $ac_n "(cached) $ac_c" 1>&6
7478 else
7480 gcc_cv_as_explicit_relocs=unknown
7481 if test x$gcc_cv_gas_major_version != x \
7482 -a x$gcc_cv_gas_minor_version != x
7483 then
7484 if test "$gcc_cv_gas_major_version" -eq 2 \
7485 -a "$gcc_cv_gas_minor_version" -ge 12 \
7486 -o "$gcc_cv_gas_major_version" -gt 2; then
7487 gcc_cv_as_explicit_relocs=yes
7489 elif test x$gcc_cv_as != x; then
7490 cat > conftest.s << 'EOF'
7491 .set nomacro
7492 .text
7493 extbl $3, $2, $3 !lituse_bytoff!1
7494 ldq $2, a($29) !literal!1
7495 ldq $4, b($29) !literal!2
7496 ldq_u $3, 0($2) !lituse_base!1
7497 ldq $27, f($29) !literal!5
7498 jsr $26, ($27), f !lituse_jsr!5
7499 ldah $29, 0($26) !gpdisp!3
7500 lda $0, c($29) !gprel
7501 ldah $1, d($29) !gprelhigh
7502 lda $1, d($1) !gprellow
7503 lda $29, 0($29) !gpdisp!3
7505 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7506 gcc_cv_as_explicit_relocs=yes
7507 else
7508 gcc_cv_as_explicit_relocs=no
7510 rm -f conftest.s conftest.o
7515 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7516 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7517 cat >> confdefs.h <<\EOF
7518 #define HAVE_AS_EXPLICIT_RELOCS 1
7523 sparc*-*-*)
7524 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7525 echo "configure:7526: checking assembler .register pseudo-op support" >&5
7526 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7527 echo $ac_n "(cached) $ac_c" 1>&6
7528 else
7530 gcc_cv_as_register_pseudo_op=unknown
7531 if test x$gcc_cv_as != x; then
7532 # Check if we have .register
7533 echo ".register %g2, #scratch" > conftest.s
7534 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7535 gcc_cv_as_register_pseudo_op=yes
7536 else
7537 gcc_cv_as_register_pseudo_op=no
7539 rm -f conftest.s conftest.o
7544 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7545 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7546 cat >> confdefs.h <<\EOF
7547 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7552 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7553 echo "configure:7554: checking assembler supports -relax" >&5
7554 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7555 echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7558 gcc_cv_as_relax_opt=unknown
7559 if test x$gcc_cv_as != x; then
7560 # Check if gas supports -relax
7561 echo ".text" > conftest.s
7562 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7563 gcc_cv_as_relax_opt=yes
7564 else
7565 gcc_cv_as_relax_opt=no
7567 rm -f conftest.s conftest.o
7572 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7573 if test "x$gcc_cv_as_relax_opt" = xyes; then
7574 cat >> confdefs.h <<\EOF
7575 #define HAVE_AS_RELAX_OPTION 1
7580 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7581 echo "configure:7582: checking assembler and linker support unaligned pc related relocs" >&5
7582 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7583 echo $ac_n "(cached) $ac_c" 1>&6
7584 else
7586 gcc_cv_as_sparc_ua_pcrel=unknown
7587 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7588 gcc_cv_as_sparc_ua_pcrel=no
7589 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7590 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7591 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7592 gcc_cv_as_sparc_ua_pcrel=yes
7594 rm -f conftest.s conftest.o conftest
7599 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7600 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7601 cat >> confdefs.h <<\EOF
7602 #define HAVE_AS_SPARC_UA_PCREL 1
7607 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7608 echo "configure:7609: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7609 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7610 echo $ac_n "(cached) $ac_c" 1>&6
7611 else
7613 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7614 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7615 if test x$gcc_cv_objdump != x; then
7616 gcc_cv_as_sparc_ua_pcrel_hidden=no
7617 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7618 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7619 echo "foo: .skip 4" >> conftest.s
7620 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7621 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7622 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7623 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7624 if $gcc_cv_objdump -R conftest 2> /dev/null \
7625 | grep 'DISP32' > /dev/null 2>&1; then
7627 else
7628 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7632 rm -f conftest.s conftest.o conftest
7633 else
7634 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7639 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7640 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7641 cat >> confdefs.h <<\EOF
7642 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7647 if test "x$gcc_cv_as_flags64" != xno; then
7648 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7649 echo "configure:7650: checking for assembler offsetable %lo() support" >&5
7650 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7651 echo $ac_n "(cached) $ac_c" 1>&6
7652 else
7654 gcc_cv_as_offsetable_lo10=unknown
7655 if test "x$gcc_cv_as" != x; then
7656 # Check if assembler has offsetable %lo()
7657 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7658 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7659 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7660 > /dev/null 2>&1 &&
7661 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7662 > /dev/null 2>&1; then
7663 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7664 gcc_cv_as_offsetable_lo10=no
7665 else
7666 gcc_cv_as_offsetable_lo10=yes
7668 else
7669 gcc_cv_as_offsetable_lo10=no
7671 rm -f conftest.s conftest.o conftest1.s conftest1.o
7676 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7677 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7678 cat >> confdefs.h <<\EOF
7679 #define HAVE_AS_OFFSETABLE_LO10 1
7687 i[34567]86-*-* | x86_64-*-*)
7688 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7689 echo "configure:7690: checking assembler instructions" >&5
7690 gcc_cv_as_instructions=
7691 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7692 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
7693 gcc_cv_as_instructions="filds fists"
7695 elif test x$gcc_cv_as != x; then
7696 set "filds fists" "filds mem; fists mem"
7697 while test $# -gt 0
7699 echo "$2" > conftest.s
7700 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7701 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7703 shift 2
7704 done
7705 rm -f conftest.s conftest.o
7707 if test x"$gcc_cv_as_instructions" != x; then
7708 cat >> confdefs.h <<EOF
7709 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7713 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7715 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7716 echo "configure:7717: checking assembler GOTOFF in data directives" >&5
7717 gcc_cv_as_gotoff_in_data=no
7718 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7719 then
7720 if test "$gcc_cv_gas_major_version" -eq 2 \
7721 -a "$gcc_cv_gas_minor_version" -ge 11 \
7722 -o "$gcc_cv_gas_major_version" -gt 2; then
7723 gcc_cv_as_gotoff_in_data=yes
7725 elif test x$gcc_cv_as != x; then
7726 cat > conftest.s <<EOF
7727 .text
7728 .L0:
7730 .data
7731 .long .L0@GOTOFF
7733 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7734 gcc_cv_as_gotoff_in_data=yes
7737 cat >> confdefs.h <<EOF
7738 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7741 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7743 esac
7745 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7746 echo "configure:7747: checking assembler dwarf2 debug_line support" >&5
7747 gcc_cv_as_dwarf2_debug_line=no
7748 # ??? Not all targets support dwarf2 debug_line, even within a version
7749 # of gas. Moreover, we need to emit a valid instruction to trigger any
7750 # info to the output file. So, as supported targets are added to gas 2.11,
7751 # add some instruction here to (also) show we expect this might work.
7752 # ??? Once 2.11 is released, probably need to add first known working
7753 # version to the per-target configury.
7754 case "$target" in
7755 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
7756 insn="nop"
7758 ia64*-*-*)
7759 insn="nop 0"
7761 esac
7762 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7763 then
7764 if test "$gcc_cv_gas_major_version" -eq 2 \
7765 -a "$gcc_cv_gas_minor_version" -ge 11 \
7766 -o "$gcc_cv_gas_major_version" -gt 2 \
7767 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7768 && test x"$insn" != x ; then
7769 gcc_cv_as_dwarf2_debug_line="yes"
7771 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7772 echo ' .file 1 "conftest.s"' > conftest.s
7773 echo ' .loc 1 3 0' >> conftest.s
7774 echo " $insn" >> conftest.s
7775 # ??? This fails with non-gnu grep.
7776 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7777 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7778 # The .debug_line file table must be in the exact order that
7779 # we specified the files, since these indices are also used
7780 # by DW_AT_decl_file. Approximate this test by testing if
7781 # the assembler bitches if the same index is assigned twice.
7782 echo ' .file 1 "foo.s"' > conftest.s
7783 echo ' .file 1 "bar.s"' >> conftest.s
7784 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7785 then
7786 gcc_cv_as_dwarf2_debug_line="no"
7787 else
7788 gcc_cv_as_dwarf2_debug_line="yes"
7791 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7793 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7794 cat >> confdefs.h <<\EOF
7795 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7799 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7801 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7802 echo "configure:7803: checking assembler --gdwarf2 support" >&5
7803 gcc_cv_as_gdwarf2_flag=no
7804 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7805 then
7806 if test "$gcc_cv_gas_major_version" -eq 2 \
7807 -a "$gcc_cv_gas_minor_version" -ge 11 \
7808 -o "$gcc_cv_gas_major_version" -gt 2 \
7809 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7810 && test x"$insn" != x ; then
7811 gcc_cv_as_gdwarf2_debug_flag="yes"
7813 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7814 echo '' > conftest.s
7815 # ??? This fails with non-gnu grep.
7816 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7817 then
7818 gcc_cv_as_gdwarf2_flag="yes"
7820 rm -f conftest.s conftest.o
7822 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7823 cat >> confdefs.h <<\EOF
7824 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7828 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7830 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7831 echo "configure:7832: checking assembler --gstabs support" >&5
7832 gcc_cv_as_gstabs_flag=no
7833 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7834 then
7835 if test "$gcc_cv_gas_major_version" -eq 2 \
7836 -a "$gcc_cv_gas_minor_version" -ge 11 \
7837 -o "$gcc_cv_gas_major_version" -gt 2 \
7838 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7839 && test x"$insn" != x ; then
7840 gcc_cv_as_gstabs_debug_flag="yes"
7842 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7843 echo '' > conftest.s
7844 # ??? This fails with non-gnu grep.
7845 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7846 gcc_cv_as_gstabs_flag="yes"
7848 rm -f conftest.s conftest.o
7850 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7851 cat >> confdefs.h <<\EOF
7852 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7856 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7858 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7859 echo "configure:7860: checking linker PT_GNU_EH_FRAME support" >&5
7860 gcc_cv_ld_eh_frame_hdr=no
7861 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7862 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
7863 gcc_cv_ld_eh_frame_hdr=yes
7865 elif test x$gcc_cv_ld != x; then
7866 # Check if linker supports --eh-frame-hdr option
7867 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7868 gcc_cv_ld_eh_frame_hdr=yes
7871 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7872 cat >> confdefs.h <<\EOF
7873 #define HAVE_LD_EH_FRAME_HDR 1
7877 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7879 if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7880 cat >> confdefs.h <<EOF
7881 #define PREFIX_INCLUDE_DIR "$prefix/include"
7886 # Figure out what language subdirectories are present.
7887 # Look if the user specified --enable-languages="..."; if not, use
7888 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7889 # go away some day.
7890 # NB: embedded tabs in this IF block -- do not untabify
7891 if test x"${enable_languages+set}" != xset; then
7892 if test x"${LANGUAGES+set}" = xset; then
7893 enable_languages="${LANGUAGES}"
7894 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7896 else
7897 enable_languages=all
7899 else
7900 if test x"${enable_languages}" = x ||
7901 test x"${enable_languages}" = xyes;
7902 then
7903 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7906 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
7908 # First scan to see if an enabled language requires some other language.
7909 # We assume that a given config-lang.in will list all the language
7910 # front ends it requires, even if some are required indirectly.
7911 for lang in ${srcdir}/*/config-lang.in ..
7913 case $lang in
7916 # The odd quoting in the next line works around
7917 # an apparent bug in bash 1.12 on linux.
7918 ${srcdir}/[*]/config-lang.in)
7921 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7922 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
7923 for other in $this_lang_requires
7925 case ,${enable_languages}, in
7926 *,$other,*)
7928 *,all,*)
7930 *,$lang_alias,*)
7931 enable_languages="$enable_languages,$other"
7933 esac
7934 done
7936 esac
7937 done
7939 subdirs=
7940 for lang in ${srcdir}/*/config-lang.in ..
7942 case $lang in
7943 ..) ;;
7944 # The odd quoting in the next line works around
7945 # an apparent bug in bash 1.12 on linux.
7946 ${srcdir}/[*]/config-lang.in) ;;
7948 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7949 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
7950 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
7951 if test "x$lang_alias" = x
7952 then
7953 echo "$lang doesn't set \$language." 1>&2
7954 exit 1
7956 case ${build_by_default},${enable_languages}, in
7957 *,$lang_alias,*) add_this_lang=yes ;;
7958 no,*) add_this_lang=no ;;
7959 *,all,*) add_this_lang=yes ;;
7960 *) add_this_lang=no ;;
7961 esac
7962 if test x"${add_this_lang}" = xyes; then
7963 case $lang in
7964 ${srcdir}/ada/config-lang.in)
7965 if test x$have_gnat = xyes ; then
7966 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7970 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7972 esac
7975 esac
7976 done
7978 # Make gthr-default.h if we have a thread file.
7979 gthread_flags=
7980 if test $thread_file != single; then
7981 rm -f gthr-default.h
7982 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7983 gthread_flags=-DHAVE_GTHR_DEFAULT
7987 # Find out what GC implementation we want, or may, use.
7988 # Check whether --with-gc or --without-gc was given.
7989 if test "${with_gc+set}" = set; then
7990 withval="$with_gc"
7991 case "$withval" in
7992 simple | page)
7993 GGC=ggc-$withval
7996 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7998 esac
7999 else
8000 GGC=ggc-page
8004 echo "Using $GGC for garbage collection."
8006 # Use the system's zlib library.
8007 zlibdir=-L../zlib
8008 zlibinc="-I\$(srcdir)/../zlib"
8009 # Check whether --with-system-zlib or --without-system-zlib was given.
8010 if test "${with_system_zlib+set}" = set; then
8011 withval="$with_system_zlib"
8012 zlibdir=
8013 zlibinc=
8021 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8022 echo "configure:8023: checking whether to enable maintainer-specific portions of Makefiles" >&5
8023 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8024 if test "${enable_maintainer_mode+set}" = set; then
8025 enableval="$enable_maintainer_mode"
8026 maintainer_mode=$enableval
8027 else
8028 maintainer_mode=no
8032 echo "$ac_t""$maintainer_mode" 1>&6
8034 if test "$maintainer_mode" = "yes"; then
8035 MAINT=''
8036 else
8037 MAINT='#'
8040 # With Setjmp/Longjmp based exception handling.
8041 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8042 if test "${enable_sjlj_exceptions+set}" = set; then
8043 enableval="$enable_sjlj_exceptions"
8044 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
8045 cat >> confdefs.h <<EOF
8046 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
8052 # Make empty files to contain the specs and options for each language.
8053 # Then add #include lines to for a compiler that has specs and/or options.
8055 lang_specs_files=
8056 lang_options_files=
8057 lang_tree_files=
8058 for subdir in . $subdirs
8060 if test -f $srcdir/$subdir/lang-specs.h; then
8061 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8063 if test -f $srcdir/$subdir/lang-options.h; then
8064 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8066 if test -f $srcdir/$subdir/$subdir-tree.def; then
8067 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8069 done
8071 # These (without "all_") are set in each config-lang.in.
8072 # `language' must be a single word so is spelled singularly.
8073 all_languages=
8074 all_boot_languages=
8075 all_compilers=
8076 all_stagestuff=
8077 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8078 # List of language makefile fragments.
8079 all_lang_makefiles=
8080 # Files for gengtype
8081 all_gtfiles="$config_gtfiles"
8083 # Add the language fragments.
8084 # Languages are added via two mechanisms. Some information must be
8085 # recorded in makefile variables, these are defined in config-lang.in.
8086 # We accumulate them and plug them into the main Makefile.
8087 # The other mechanism is a set of hooks for each of the main targets
8088 # like `clean', `install', etc.
8090 language_fragments="Make-lang"
8091 language_hooks="Make-hooks"
8093 for s in .. $subdirs
8095 if test $s != ".."
8096 then
8097 language=
8098 boot_language=
8099 compilers=
8100 stagestuff=
8101 outputs=
8102 gtfiles=
8103 . ${srcdir}/$s/config-lang.in
8104 if test "x$language" = x
8105 then
8106 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8107 exit 1
8109 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8110 if test -f ${srcdir}/$s/Makefile.in
8111 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8113 all_languages="$all_languages $language"
8114 if test "x$boot_language" = xyes
8115 then
8116 all_boot_languages="$all_boot_languages $language"
8118 all_compilers="$all_compilers $compilers"
8119 all_stagestuff="$all_stagestuff $stagestuff"
8120 all_outputs="$all_outputs $outputs"
8121 all_gtfiles="$all_gtfiles $gtfiles"
8123 done
8125 check_languages=
8126 for language in .. $all_languages
8128 if test $language != ".."
8129 then
8130 check_languages="$check_languages check-$language"
8132 done
8134 # Since we can't use `::' targets, we link each language in
8135 # with a set of hooks, reached indirectly via lang.${target}.
8137 rm -f Make-hooks
8138 touch Make-hooks
8139 target_list="all.build all.cross start.encap rest.encap \
8140 info dvi generated-manpages \
8141 install-normal install-common install-info install-man \
8142 uninstall \
8143 mostlyclean clean distclean extraclean maintainer-clean \
8144 stage1 stage2 stage3 stage4"
8145 for t in $target_list
8148 for lang in .. $all_languages
8150 if test $lang != ".."; then
8151 x="$x $lang.$t"
8153 done
8154 echo "lang.$t: $x" >> Make-hooks
8155 done
8157 # Create .gdbinit.
8159 echo "dir ." > .gdbinit
8160 echo "dir ${srcdir}" >> .gdbinit
8161 if test x$gdb_needs_out_file_path = xyes
8162 then
8163 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8165 if test "x$subdirs" != x; then
8166 for s in $subdirs
8168 echo "dir ${srcdir}/$s" >> .gdbinit
8169 done
8171 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8173 # Define variables host_canonical and build_canonical
8174 # because some Cygnus local changes in the Makefile depend on them.
8175 build_canonical=${build}
8176 host_canonical=${host}
8177 target_subdir=
8178 if test "${host}" != "${target}" ; then
8179 target_subdir=${target_alias}/
8185 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8186 # absolute path for gcc_tooldir based on inserting the number of up-directory
8187 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8188 # $(libsubdir)/@(unlibsubdir) based path.
8189 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8190 # make and thus we'd get different behavior depending on where we built the
8191 # sources.
8192 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8193 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8194 else
8195 # An explanation of the sed strings:
8196 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8197 # -e 's|/$||' match a trailing forward slash and eliminates it
8198 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8199 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8201 # (*) Note this pattern overwrites the first character of the string
8202 # with a forward slash if one is not already present. This is not a
8203 # problem because the exact names of the sub-directories concerned is
8204 # unimportant, just the number of them matters.
8206 # The practical upshot of these patterns is like this:
8208 # prefix exec_prefix result
8209 # ------ ----------- ------
8210 # /foo /foo/bar ../
8211 # /foo/ /foo/bar ../
8212 # /foo /foo/bar/ ../
8213 # /foo/ /foo/bar/ ../
8214 # /foo /foo/bar/ugg ../../
8216 dollar='$$'
8217 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8222 # Find a directory in which to install a shared libgcc.
8224 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8225 if test "${enable_version_specific_runtime_libs+set}" = set; then
8226 enableval="$enable_version_specific_runtime_libs"
8231 # Check whether --with-slibdir or --without-slibdir was given.
8232 if test "${with_slibdir+set}" = set; then
8233 withval="$with_slibdir"
8234 slibdir="$with_slibdir"
8235 else
8236 if test "${enable_version_specific_runtime_libs+set}" = set; then
8237 slibdir='$(libsubdir)'
8238 elif test "$host" != "$target"; then
8239 slibdir='$(build_tooldir)/lib'
8240 else
8241 slibdir='$(libdir)'
8247 # Nothing to do for FLOAT_H, float_format already handled.
8248 objdir=`${PWDCMD-pwd}`
8251 # Process the language and host/target makefile fragments.
8252 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8254 # Substitute configuration variables
8319 # Echo that links are built
8320 if test x$host = x$target
8321 then
8322 str1="native "
8323 else
8324 str1="cross-"
8325 str2=" from $host"
8328 if test x$host != x$build
8329 then
8330 str3=" on a $build system"
8333 if test "x$str2" != x || test "x$str3" != x
8334 then
8335 str4=
8338 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8340 if test "x$str2" != x || test "x$str3" != x
8341 then
8342 echo " ${str2}${str3}." 1>&2
8345 # Truncate the target if necessary
8346 if test x$host_truncate_target != x; then
8347 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8350 # Configure the subdirectories
8351 # AC_CONFIG_SUBDIRS($subdirs)
8353 # Create the Makefile
8354 # and configure language subdirectories
8355 trap '' 1 2 15
8356 cat > confcache <<\EOF
8357 # This file is a shell script that caches the results of configure
8358 # tests run on this system so they can be shared between configure
8359 # scripts and configure runs. It is not useful on other systems.
8360 # If it contains results you don't want to keep, you may remove or edit it.
8362 # By default, configure uses ./config.cache as the cache file,
8363 # creating it if it does not exist already. You can give configure
8364 # the --cache-file=FILE option to use a different cache file; that is
8365 # what configure does when it calls configure scripts in
8366 # subdirectories, so they share the cache.
8367 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8368 # config.status only pays attention to the cache file if you give it the
8369 # --recheck option to rerun configure.
8372 # The following way of writing the cache mishandles newlines in values,
8373 # but we know of no workaround that is simple, portable, and efficient.
8374 # So, don't put newlines in cache variables' values.
8375 # Ultrix sh set writes to stderr and can't be redirected directly,
8376 # and sets the high bit in the cache file unless we assign to the vars.
8377 (set) 2>&1 |
8378 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8379 *ac_space=\ *)
8380 # `set' does not quote correctly, so add quotes (double-quote substitution
8381 # turns \\\\ into \\, and sed turns \\ into \).
8382 sed -n \
8383 -e "s/'/'\\\\''/g" \
8384 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8387 # `set' quotes correctly as required by POSIX, so do not add quotes.
8388 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8390 esac >> confcache
8391 if cmp -s $cache_file confcache; then
8393 else
8394 if test -w $cache_file; then
8395 echo "updating cache $cache_file"
8396 cat confcache > $cache_file
8397 else
8398 echo "not updating unwritable cache $cache_file"
8401 rm -f confcache
8403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8405 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8406 # Let make expand exec_prefix.
8407 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8409 # Any assignment to VPATH causes Sun make to only execute
8410 # the first set of double-colon rules, so remove it if not needed.
8411 # If there is a colon in the path, we need to keep it.
8412 if test "x$srcdir" = x.; then
8413 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8416 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8418 DEFS=-DHAVE_CONFIG_H
8420 # Without the "./", some shells look in PATH for config.status.
8421 : ${CONFIG_STATUS=./config.status}
8423 echo creating $CONFIG_STATUS
8424 rm -f $CONFIG_STATUS
8425 cat > $CONFIG_STATUS <<EOF
8426 #! /bin/sh
8427 # Generated automatically by configure.
8428 # Run this file to recreate the current configuration.
8429 # This directory was configured as follows,
8430 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8432 # $0 $ac_configure_args
8434 # Compiler output produced by configure, useful for debugging
8435 # configure, is in ./config.log if it exists.
8437 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8438 for ac_option
8440 case "\$ac_option" in
8441 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8442 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8443 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8444 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8445 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8446 exit 0 ;;
8447 -help | --help | --hel | --he | --h)
8448 echo "\$ac_cs_usage"; exit 0 ;;
8449 *) echo "\$ac_cs_usage"; exit 1 ;;
8450 esac
8451 done
8453 ac_given_srcdir=$srcdir
8455 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8457 cat >> $CONFIG_STATUS <<EOF
8459 # Protect against being on the right side of a sed subst in config.status.
8460 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8461 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8462 $ac_vpsub
8463 $extrasub
8464 s%@SHELL@%$SHELL%g
8465 s%@CFLAGS@%$CFLAGS%g
8466 s%@CPPFLAGS@%$CPPFLAGS%g
8467 s%@CXXFLAGS@%$CXXFLAGS%g
8468 s%@FFLAGS@%$FFLAGS%g
8469 s%@DEFS@%$DEFS%g
8470 s%@LDFLAGS@%$LDFLAGS%g
8471 s%@LIBS@%$LIBS%g
8472 s%@exec_prefix@%$exec_prefix%g
8473 s%@prefix@%$prefix%g
8474 s%@program_transform_name@%$program_transform_name%g
8475 s%@bindir@%$bindir%g
8476 s%@sbindir@%$sbindir%g
8477 s%@libexecdir@%$libexecdir%g
8478 s%@datadir@%$datadir%g
8479 s%@sysconfdir@%$sysconfdir%g
8480 s%@sharedstatedir@%$sharedstatedir%g
8481 s%@localstatedir@%$localstatedir%g
8482 s%@libdir@%$libdir%g
8483 s%@includedir@%$includedir%g
8484 s%@oldincludedir@%$oldincludedir%g
8485 s%@infodir@%$infodir%g
8486 s%@mandir@%$mandir%g
8487 s%@enable_multilib@%$enable_multilib%g
8488 s%@enable_shared@%$enable_shared%g
8489 s%@host@%$host%g
8490 s%@host_alias@%$host_alias%g
8491 s%@host_cpu@%$host_cpu%g
8492 s%@host_vendor@%$host_vendor%g
8493 s%@host_os@%$host_os%g
8494 s%@target@%$target%g
8495 s%@target_alias@%$target_alias%g
8496 s%@target_cpu@%$target_cpu%g
8497 s%@target_vendor@%$target_vendor%g
8498 s%@target_os@%$target_os%g
8499 s%@build@%$build%g
8500 s%@build_alias@%$build_alias%g
8501 s%@build_cpu@%$build_cpu%g
8502 s%@build_vendor@%$build_vendor%g
8503 s%@build_os@%$build_os%g
8504 s%@CC@%$CC%g
8505 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8506 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8507 s%@GNATBIND@%$GNATBIND%g
8508 s%@ADAC@%$ADAC%g
8509 s%@strict1_warn@%$strict1_warn%g
8510 s%@CPP@%$CPP%g
8511 s%@warn_cflags@%$warn_cflags%g
8512 s%@stage1_cflags@%$stage1_cflags%g
8513 s%@SET_MAKE@%$SET_MAKE%g
8514 s%@AWK@%$AWK%g
8515 s%@LN@%$LN%g
8516 s%@LN_S@%$LN_S%g
8517 s%@RANLIB@%$RANLIB%g
8518 s%@INSTALL@%$INSTALL%g
8519 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8520 s%@INSTALL_DATA@%$INSTALL_DATA%g
8521 s%@have_mktemp_command@%$have_mktemp_command%g
8522 s%@MAKEINFO@%$MAKEINFO%g
8523 s%@BUILD_INFO@%$BUILD_INFO%g
8524 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8525 s%@FLEX@%$FLEX%g
8526 s%@BISON@%$BISON%g
8527 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8528 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8529 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8530 s%@LIBICONV@%$LIBICONV%g
8531 s%@manext@%$manext%g
8532 s%@objext@%$objext%g
8533 s%@FORBUILD@%$FORBUILD%g
8534 s%@PACKAGE@%$PACKAGE%g
8535 s%@VERSION@%$VERSION%g
8536 s%@ALLOCA@%$ALLOCA%g
8537 s%@GLIBC21@%$GLIBC21%g
8538 s%@USE_NLS@%$USE_NLS%g
8539 s%@MSGFMT@%$MSGFMT%g
8540 s%@GMSGFMT@%$GMSGFMT%g
8541 s%@XGETTEXT@%$XGETTEXT%g
8542 s%@INTLBISON@%$INTLBISON%g
8543 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8544 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8545 s%@CATALOGS@%$CATALOGS%g
8546 s%@CATOBJEXT@%$CATOBJEXT%g
8547 s%@INTLLIBS@%$INTLLIBS%g
8548 s%@INTLDEPS@%$INTLDEPS%g
8549 s%@INTLOBJS@%$INTLOBJS%g
8550 s%@POSUB@%$POSUB%g
8551 s%@DATADIRNAME@%$DATADIRNAME%g
8552 s%@INSTOBJEXT@%$INSTOBJEXT%g
8553 s%@GENCAT@%$GENCAT%g
8554 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8555 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8556 s%@CROSS@%$CROSS%g
8557 s%@ALL@%$ALL%g
8558 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8559 s%@inhibit_libc@%$inhibit_libc%g
8560 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8561 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8562 s%@HOST_CC@%$HOST_CC%g
8563 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8564 s%@STMP_FIXINC@%$STMP_FIXINC%g
8565 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8566 s%@libgcc_visibility@%$libgcc_visibility%g
8567 s%@gthread_flags@%$gthread_flags%g
8568 s%@GGC@%$GGC%g
8569 s%@zlibdir@%$zlibdir%g
8570 s%@zlibinc@%$zlibinc%g
8571 s%@MAINT@%$MAINT%g
8572 s%@build_canonical@%$build_canonical%g
8573 s%@host_canonical@%$host_canonical%g
8574 s%@target_subdir@%$target_subdir%g
8575 s%@gcc_tooldir@%$gcc_tooldir%g
8576 s%@dollar@%$dollar%g
8577 s%@slibdir@%$slibdir%g
8578 s%@objdir@%$objdir%g
8579 s%@subdirs@%$subdirs%g
8580 s%@all_boot_languages@%$all_boot_languages%g
8581 s%@all_compilers@%$all_compilers%g
8582 s%@all_gtfiles@%$all_gtfiles%g
8583 s%@all_lang_makefiles@%$all_lang_makefiles%g
8584 s%@all_languages@%$all_languages%g
8585 s%@all_stagestuff@%$all_stagestuff%g
8586 s%@build_exeext@%$build_exeext%g
8587 s%@build_install_headers_dir@%$build_install_headers_dir%g
8588 s%@build_xm_file_list@%$build_xm_file_list%g
8589 s%@build_xm_file@%$build_xm_file%g
8590 s%@build_xm_defines@%$build_xm_defines%g
8591 s%@check_languages@%$check_languages%g
8592 s%@cc_set_by_configure@%$cc_set_by_configure%g
8593 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8594 s%@cpp_install_dir@%$cpp_install_dir%g
8595 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8596 s%@dep_tmake_file@%$dep_tmake_file%g
8597 s%@extra_headers_list@%$extra_headers_list%g
8598 s%@extra_objs@%$extra_objs%g
8599 s%@extra_parts@%$extra_parts%g
8600 s%@extra_passes@%$extra_passes%g
8601 s%@extra_programs@%$extra_programs%g
8602 s%@float_h_file@%$float_h_file%g
8603 s%@gcc_config_arguments@%$gcc_config_arguments%g
8604 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8605 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8606 s%@gcc_version@%$gcc_version%g
8607 s%@gcc_version_full@%$gcc_version_full%g
8608 s%@gcc_version_trigger@%$gcc_version_trigger%g
8609 s%@host_exeext@%$host_exeext%g
8610 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8611 s%@host_xm_file_list@%$host_xm_file_list%g
8612 s%@host_xm_file@%$host_xm_file%g
8613 s%@host_xm_defines@%$host_xm_defines%g
8614 s%@install@%$install%g
8615 s%@lang_options_files@%$lang_options_files%g
8616 s%@lang_specs_files@%$lang_specs_files%g
8617 s%@lang_tree_files@%$lang_tree_files%g
8618 s%@local_prefix@%$local_prefix%g
8619 s%@md_file@%$md_file%g
8620 s%@objc_boehm_gc@%$objc_boehm_gc%g
8621 s%@out_file@%$out_file%g
8622 s%@out_object_file@%$out_object_file%g
8623 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8624 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8625 s%@symbolic_link@%$symbolic_link%g
8626 s%@thread_file@%$thread_file%g
8627 s%@tm_file_list@%$tm_file_list%g
8628 s%@tm_file@%$tm_file%g
8629 s%@tm_p_file_list@%$tm_p_file_list%g
8630 s%@tm_p_file@%$tm_p_file%g
8631 s%@xm_file@%$xm_file%g
8632 s%@xm_defines@%$xm_defines%g
8633 s%@c_target_objs@%$c_target_objs%g
8634 s%@cxx_target_objs@%$cxx_target_objs%g
8635 s%@target_cpu_default@%$target_cpu_default%g
8636 /@target_overrides@/r $target_overrides
8637 s%@target_overrides@%%g
8638 /@host_overrides@/r $host_overrides
8639 s%@host_overrides@%%g
8640 /@language_fragments@/r $language_fragments
8641 s%@language_fragments@%%g
8642 /@language_hooks@/r $language_hooks
8643 s%@language_hooks@%%g
8645 CEOF
8648 cat >> $CONFIG_STATUS <<\EOF
8650 # Split the substitutions into bite-sized pieces for seds with
8651 # small command number limits, like on Digital OSF/1 and HP-UX.
8652 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8653 ac_file=1 # Number of current file.
8654 ac_beg=1 # First line for current file.
8655 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8656 ac_more_lines=:
8657 ac_sed_cmds=""
8658 while $ac_more_lines; do
8659 if test $ac_beg -gt 1; then
8660 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8661 else
8662 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8664 if test ! -s conftest.s$ac_file; then
8665 ac_more_lines=false
8666 rm -f conftest.s$ac_file
8667 else
8668 if test -z "$ac_sed_cmds"; then
8669 ac_sed_cmds="sed -f conftest.s$ac_file"
8670 else
8671 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8673 ac_file=`expr $ac_file + 1`
8674 ac_beg=$ac_end
8675 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8677 done
8678 if test -z "$ac_sed_cmds"; then
8679 ac_sed_cmds=cat
8683 cat >> $CONFIG_STATUS <<EOF
8685 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8687 cat >> $CONFIG_STATUS <<\EOF
8688 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8689 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8690 case "$ac_file" in
8691 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8692 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8693 *) ac_file_in="${ac_file}.in" ;;
8694 esac
8696 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8698 # Remove last slash and all that follows it. Not all systems have dirname.
8699 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8700 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8701 # The file is in a subdirectory.
8702 test ! -d "$ac_dir" && mkdir "$ac_dir"
8703 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8704 # A "../" for each directory in $ac_dir_suffix.
8705 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8706 else
8707 ac_dir_suffix= ac_dots=
8710 case "$ac_given_srcdir" in
8711 .) srcdir=.
8712 if test -z "$ac_dots"; then top_srcdir=.
8713 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8714 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8715 *) # Relative path.
8716 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8717 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8718 esac
8721 echo creating "$ac_file"
8722 rm -f "$ac_file"
8723 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8724 case "$ac_file" in
8725 *Makefile*) ac_comsub="1i\\
8726 # $configure_input" ;;
8727 *) ac_comsub= ;;
8728 esac
8730 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8731 sed -e "$ac_comsub
8732 s%@configure_input@%$configure_input%g
8733 s%@srcdir@%$srcdir%g
8734 s%@top_srcdir@%$top_srcdir%g
8735 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8736 fi; done
8737 rm -f conftest.s*
8739 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8740 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8742 # ac_d sets the value in "#define NAME VALUE" lines.
8743 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8744 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8745 ac_dC='\3'
8746 ac_dD='%g'
8747 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8748 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8749 ac_uB='\([ ]\)%\1#\2define\3'
8750 ac_uC=' '
8751 ac_uD='\4%g'
8752 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8753 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8754 ac_eB='$%\1#\2define\3'
8755 ac_eC=' '
8756 ac_eD='%g'
8758 if test "${CONFIG_HEADERS+set}" != set; then
8760 cat >> $CONFIG_STATUS <<EOF
8761 CONFIG_HEADERS="auto-host.h:config.in"
8763 cat >> $CONFIG_STATUS <<\EOF
8765 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8766 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8767 case "$ac_file" in
8768 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8769 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8770 *) ac_file_in="${ac_file}.in" ;;
8771 esac
8773 echo creating $ac_file
8775 rm -f conftest.frag conftest.in conftest.out
8776 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8777 cat $ac_file_inputs > conftest.in
8781 # Transform confdefs.h into a sed script conftest.vals that substitutes
8782 # the proper values into config.h.in to produce config.h. And first:
8783 # Protect against being on the right side of a sed subst in config.status.
8784 # Protect against being in an unquoted here document in config.status.
8785 rm -f conftest.vals
8786 cat > conftest.hdr <<\EOF
8787 s/[\\&%]/\\&/g
8788 s%[\\$`]%\\&%g
8789 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8790 s%ac_d%ac_u%gp
8791 s%ac_u%ac_e%gp
8793 sed -n -f conftest.hdr confdefs.h > conftest.vals
8794 rm -f conftest.hdr
8796 # This sed command replaces #undef with comments. This is necessary, for
8797 # example, in the case of _POSIX_SOURCE, which is predefined and required
8798 # on some systems where configure will not decide to define it.
8799 cat >> conftest.vals <<\EOF
8800 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8803 # Break up conftest.vals because some shells have a limit on
8804 # the size of here documents, and old seds have small limits too.
8806 rm -f conftest.tail
8807 while :
8809 ac_lines=`grep -c . conftest.vals`
8810 # grep -c gives empty output for an empty file on some AIX systems.
8811 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8812 # Write a limited-size here document to conftest.frag.
8813 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8814 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8815 echo 'CEOF
8816 sed -f conftest.frag conftest.in > conftest.out
8817 rm -f conftest.in
8818 mv conftest.out conftest.in
8819 ' >> $CONFIG_STATUS
8820 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8821 rm -f conftest.vals
8822 mv conftest.tail conftest.vals
8823 done
8824 rm -f conftest.vals
8826 cat >> $CONFIG_STATUS <<\EOF
8827 rm -f conftest.frag conftest.h
8828 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8829 cat conftest.in >> conftest.h
8830 rm -f conftest.in
8831 if cmp -s $ac_file conftest.h 2>/dev/null; then
8832 echo "$ac_file is unchanged"
8833 rm -f conftest.h
8834 else
8835 # Remove last slash and all that follows it. Not all systems have dirname.
8836 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8837 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8838 # The file is in a subdirectory.
8839 test ! -d "$ac_dir" && mkdir "$ac_dir"
8841 rm -f $ac_file
8842 mv conftest.h $ac_file
8844 fi; done
8847 cat >> $CONFIG_STATUS <<EOF
8849 subdirs='$subdirs'
8850 symbolic_link='$symbolic_link'
8853 cat >> $CONFIG_STATUS <<\EOF
8854 for ac_file in $CONFIG_FILES; do
8855 # Support "outfile[:infile[:infile...]]"
8856 case "$ac_file" in
8857 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8858 esac
8859 # PO directories have a Makefile.in generated from Makefile.in.in.
8860 case "$ac_file" in */Makefile.in)
8861 # Adjust a relative srcdir.
8862 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8863 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8864 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8865 # In autoconf-2.13 it is called $ac_given_srcdir.
8866 # In autoconf-2.50 it is called $srcdir.
8867 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8868 case "$ac_given_srcdir" in
8869 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8870 /*) top_srcdir="$ac_given_srcdir" ;;
8871 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8872 esac
8873 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8874 rm -f "$ac_dir/POTFILES"
8875 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8876 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8877 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8878 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8881 esac
8882 done
8884 case x$CONFIG_HEADERS in
8885 xauto-host.h:config.in)
8886 echo > cstamp-h ;;
8887 esac
8888 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8889 # bootstrapping and the installation procedure can still use
8890 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
8891 # FLAGS_TO_PASS has been modified to solve the problem there.
8892 # This is virtually a duplicate of what happens in configure.lang; we do
8893 # an extra check to make sure this only happens if ln -s can be used.
8894 if test "$symbolic_link" = "ln -s"; then
8895 for d in .. ${subdirs} fixinc ; do
8896 if test $d != ..; then
8897 STARTDIR=`${PWDCMD-pwd}`
8898 cd $d
8899 for t in stage1 stage2 stage3 stage4 include
8901 rm -f $t
8902 $symbolic_link ../$t $t 2>/dev/null
8903 done
8904 cd $STARTDIR
8906 done
8907 else true ; fi
8908 # Avoid having to add intl to our include paths.
8909 if test -f intl/libintl.h; then
8910 echo creating libintl.h
8911 echo '#include "intl/libintl.h"' >libintl.h
8914 exit 0
8916 chmod +x $CONFIG_STATUS
8917 rm -fr confdefs* $ac_clean_files
8918 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1