stl_bvector.h (swap(_Bit_reference,_Bit_reference)): Move/rename...
[official-gcc.git] / gcc / configure
blobe87dc26703f61960c21bd55ec456690a92db1cf6
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 mawk gawk 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 build_xm_file=
4927 build_xm_defines=
4928 build_install_headers_dir=install-headers-tar
4929 build_exeext=
4930 host_xm_file=
4931 host_xm_defines=
4932 host_xmake_file=
4933 host_truncate_target=
4934 host_exeext=
4936 # Decode the host machine, then the target machine.
4937 # For the host machine, we save the xm_file variable as host_xm_file;
4938 # then we decode the target machine and forget everything else
4939 # that came from the host machine.
4940 for machine in $build $host $target; do
4941 . ${srcdir}/config.gcc
4942 done
4944 extra_objs="${host_extra_objs} ${extra_objs}"
4946 # Default the target-machine variables that were not explicitly set.
4947 if test x"$tm_file" = x
4948 then tm_file=$cpu_type/$cpu_type.h; fi
4950 if test x"$extra_headers" = x
4951 then extra_headers=; fi
4953 if test x$md_file = x
4954 then md_file=$cpu_type/$cpu_type.md; fi
4956 if test x$out_file = x
4957 then out_file=$cpu_type/$cpu_type.c; fi
4959 if test x"$tmake_file" = x
4960 then tmake_file=$cpu_type/t-$cpu_type
4963 if test x"$dwarf2" = xyes
4964 then tm_file="$tm_file tm-dwarf2.h"
4967 if test x$float_format = x
4968 then float_format=i64
4971 if test $float_format = none
4972 then float_h_file=Makefile.in
4973 else float_h_file=float-$float_format.h
4976 # Say what files are being used for the output code and MD file.
4977 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4978 echo "Using \`$srcdir/config/$md_file' as machine description file."
4980 # If any of the xm_file variables contain nonexistent files, warn
4981 # about them and drop them.
4984 for x in $build_xm_file; do
4985 if test -f $srcdir/config/$x
4986 then bx="$bx $x"
4987 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4989 done
4990 build_xm_file="$bx"
4993 for x in $host_xm_file; do
4994 if test -f $srcdir/config/$x
4995 then hx="$hx $x"
4996 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4998 done
4999 host_xm_file="$hx"
5002 for x in $xm_file; do
5003 if test -f $srcdir/config/$x
5004 then tx="$tx $x"
5005 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5007 done
5008 xm_file="$tx"
5010 count=a
5011 for f in $tm_file; do
5012 count=${count}x
5013 done
5014 if test $count = ax; then
5015 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5016 else
5017 echo "Using the following target machine macro files:"
5018 for f in $tm_file; do
5019 echo " $srcdir/config/$f"
5020 done
5023 count=a
5024 for f in $host_xm_file; do
5025 count=${count}x
5026 done
5027 if test $count = a; then
5029 elif test $count = ax; then
5030 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5031 else
5032 echo "Using the following host machine macro files:"
5033 for f in $host_xm_file; do
5034 echo " $srcdir/config/$f"
5035 done
5038 if test "$host_xm_file" != "$build_xm_file"; then
5039 count=a
5040 for f in $build_xm_file; do
5041 count=${count}x
5042 done
5043 if test $count = a; then
5045 elif test $count = ax; then
5046 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5047 else
5048 echo "Using the following build machine macro files:"
5049 for f in $build_xm_file; do
5050 echo " $srcdir/config/$f"
5051 done
5055 if test x$thread_file = x; then
5056 if test x$target_thread_file != x; then
5057 thread_file=$target_thread_file
5058 else
5059 thread_file='single'
5063 # auto-host.h is the file containing items generated by autoconf and is
5064 # the first file included by config.h.
5065 # If host=build, it is correct to have hconfig include auto-host.h
5066 # as well. If host!=build, we are in error and need to do more
5067 # work to find out the build config parameters.
5068 if test x$host = x$build
5069 then
5070 build_auto=auto-host.h
5071 FORBUILD=..
5072 else
5073 # We create a subdir, then run autoconf in the subdir.
5074 # To prevent recursion we set host and build for the new
5075 # invocation of configure to the build for this invocation
5076 # of configure.
5077 tempdir=build.$$
5078 rm -rf $tempdir
5079 mkdir $tempdir
5080 cd $tempdir
5081 case ${srcdir} in
5082 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5083 *) realsrcdir=../${srcdir};;
5084 esac
5085 saved_CFLAGS="${CFLAGS}"
5086 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5087 ${realsrcdir}/configure \
5088 --target=$target_alias --host=$build_alias --build=$build_alias
5089 CFLAGS="${saved_CFLAGS}"
5091 # We just finished tests for the build machine, so rename
5092 # the file auto-build.h in the gcc directory.
5093 mv auto-host.h ../auto-build.h
5094 cd ..
5095 rm -rf $tempdir
5096 build_auto=auto-build.h
5097 FORBUILD=../$build
5101 tm_file="${tm_file} defaults.h"
5102 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5103 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5104 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5106 # Truncate the target if necessary
5107 if test x$host_truncate_target != x; then
5108 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5111 # Get the version trigger filename from the toplevel
5112 if test "${with_gcc_version_trigger+set}" = set; then
5113 gcc_version_trigger=$with_gcc_version_trigger
5114 else
5115 gcc_version_trigger=${srcdir}/version.c
5117 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5118 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5120 # Compile in configure arguments.
5121 if test -f configargs.h ; then
5122 # Being re-configured.
5123 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5124 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5125 else
5126 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5128 cat > configargs.h <<EOF
5129 /* Generated automatically. */
5130 static const char configuration_arguments[] = "$gcc_config_arguments";
5131 static const char thread_model[] = "$thread_file";
5134 # Internationalization
5135 PACKAGE=gcc
5136 VERSION="$gcc_version"
5140 # Enable NLS support by default
5141 # Check whether --enable-nls or --disable-nls was given.
5142 if test "${enable_nls+set}" = set; then
5143 enableval="$enable_nls"
5145 else
5146 enable_nls=yes
5150 # if cross compiling, disable NLS support.
5151 # It's not worth the trouble, at least for now.
5153 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5154 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5155 enable_nls=no
5160 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5161 echo "configure:5162: checking for library containing strerror" >&5
5162 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5163 echo $ac_n "(cached) $ac_c" 1>&6
5164 else
5165 ac_func_search_save_LIBS="$LIBS"
5166 ac_cv_search_strerror="no"
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170 /* Override any gcc2 internal prototype to avoid an error. */
5171 /* We use char because int might match the return type of a gcc2
5172 builtin and then its argument prototype would still apply. */
5173 char strerror();
5175 int main() {
5176 strerror()
5177 ; return 0; }
5179 if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5180 rm -rf conftest*
5181 ac_cv_search_strerror="none required"
5182 else
5183 echo "configure: failed program was:" >&5
5184 cat conftest.$ac_ext >&5
5186 rm -f conftest*
5187 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5188 LIBS="-l$i $ac_func_search_save_LIBS"
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 /* Override any gcc2 internal prototype to avoid an error. */
5193 /* We use char because int might match the return type of a gcc2
5194 builtin and then its argument prototype would still apply. */
5195 char strerror();
5197 int main() {
5198 strerror()
5199 ; return 0; }
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5202 rm -rf conftest*
5203 ac_cv_search_strerror="-l$i"
5204 break
5205 else
5206 echo "configure: failed program was:" >&5
5207 cat conftest.$ac_ext >&5
5209 rm -f conftest*
5210 done
5211 LIBS="$ac_func_search_save_LIBS"
5214 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5215 if test "$ac_cv_search_strerror" != "no"; then
5216 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5218 else :
5223 echo $ac_n "checking for working const""... $ac_c" 1>&6
5224 echo "configure:5225: checking for working const" >&5
5225 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5226 echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5232 int main() {
5234 /* Ultrix mips cc rejects this. */
5235 typedef int charset[2]; const charset x;
5236 /* SunOS 4.1.1 cc rejects this. */
5237 char const *const *ccp;
5238 char **p;
5239 /* NEC SVR4.0.2 mips cc rejects this. */
5240 struct point {int x, y;};
5241 static struct point const zero = {0,0};
5242 /* AIX XL C 1.02.0.0 rejects this.
5243 It does not let you subtract one const X* pointer from another in an arm
5244 of an if-expression whose if-part is not a constant expression */
5245 const char *g = "string";
5246 ccp = &g + (g ? g-g : 0);
5247 /* HPUX 7.0 cc rejects these. */
5248 ++ccp;
5249 p = (char**) ccp;
5250 ccp = (char const *const *) p;
5251 { /* SCO 3.2v4 cc rejects this. */
5252 char *t;
5253 char const *s = 0 ? (char *) 0 : (char const *) 0;
5255 *t++ = 0;
5257 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5258 int x[] = {25, 17};
5259 const int *foo = &x[0];
5260 ++foo;
5262 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5263 typedef const int *iptr;
5264 iptr p = 0;
5265 ++p;
5267 { /* AIX XL C 1.02.0.0 rejects this saying
5268 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5269 struct s { int j; const int *ap[3]; };
5270 struct s *b; b->j = 5;
5272 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5273 const int foo = 10;
5276 ; return 0; }
5278 if { (eval echo configure:5279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5279 rm -rf conftest*
5280 ac_cv_c_const=yes
5281 else
5282 echo "configure: failed program was:" >&5
5283 cat conftest.$ac_ext >&5
5284 rm -rf conftest*
5285 ac_cv_c_const=no
5287 rm -f conftest*
5290 echo "$ac_t""$ac_cv_c_const" 1>&6
5291 if test $ac_cv_c_const = no; then
5292 cat >> confdefs.h <<\EOF
5293 #define const
5298 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5299 echo "configure:5300: checking for off_t" >&5
5300 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5301 echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303 cat > conftest.$ac_ext <<EOF
5304 #line 5305 "configure"
5305 #include "confdefs.h"
5306 #include <sys/types.h>
5307 #if STDC_HEADERS
5308 #include <stdlib.h>
5309 #include <stddef.h>
5310 #endif
5312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5313 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5314 rm -rf conftest*
5315 ac_cv_type_off_t=yes
5316 else
5317 rm -rf conftest*
5318 ac_cv_type_off_t=no
5320 rm -f conftest*
5323 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5324 if test $ac_cv_type_off_t = no; then
5325 cat >> confdefs.h <<\EOF
5326 #define off_t long
5331 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5332 echo "configure:5333: checking for size_t" >&5
5333 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5334 echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 #include <sys/types.h>
5340 #if STDC_HEADERS
5341 #include <stdlib.h>
5342 #include <stddef.h>
5343 #endif
5345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5346 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5347 rm -rf conftest*
5348 ac_cv_type_size_t=yes
5349 else
5350 rm -rf conftest*
5351 ac_cv_type_size_t=no
5353 rm -f conftest*
5356 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5357 if test $ac_cv_type_size_t = no; then
5358 cat >> confdefs.h <<\EOF
5359 #define size_t unsigned
5364 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5365 # for constant arguments. Useless!
5366 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5367 echo "configure:5368: checking for working alloca.h" >&5
5368 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5369 echo $ac_n "(cached) $ac_c" 1>&6
5370 else
5371 cat > conftest.$ac_ext <<EOF
5372 #line 5373 "configure"
5373 #include "confdefs.h"
5374 #include <alloca.h>
5375 int main() {
5376 char *p = alloca(2 * sizeof(int));
5377 ; return 0; }
5379 if { (eval echo configure:5380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5380 rm -rf conftest*
5381 ac_cv_header_alloca_h=yes
5382 else
5383 echo "configure: failed program was:" >&5
5384 cat conftest.$ac_ext >&5
5385 rm -rf conftest*
5386 ac_cv_header_alloca_h=no
5388 rm -f conftest*
5391 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5392 if test $ac_cv_header_alloca_h = yes; then
5393 cat >> confdefs.h <<\EOF
5394 #define HAVE_ALLOCA_H 1
5399 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5400 echo "configure:5401: checking for alloca" >&5
5401 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5402 echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5408 #ifdef __GNUC__
5409 # define alloca __builtin_alloca
5410 #else
5411 # ifdef _MSC_VER
5412 # include <malloc.h>
5413 # define alloca _alloca
5414 # else
5415 # if HAVE_ALLOCA_H
5416 # include <alloca.h>
5417 # else
5418 # ifdef _AIX
5419 #pragma alloca
5420 # else
5421 # ifndef alloca /* predefined by HP cc +Olibcalls */
5422 char *alloca ();
5423 # endif
5424 # endif
5425 # endif
5426 # endif
5427 #endif
5429 int main() {
5430 char *p = (char *) alloca(1);
5431 ; return 0; }
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434 rm -rf conftest*
5435 ac_cv_func_alloca_works=yes
5436 else
5437 echo "configure: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
5439 rm -rf conftest*
5440 ac_cv_func_alloca_works=no
5442 rm -f conftest*
5445 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5446 if test $ac_cv_func_alloca_works = yes; then
5447 cat >> confdefs.h <<\EOF
5448 #define HAVE_ALLOCA 1
5453 if test $ac_cv_func_alloca_works = no; then
5454 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5455 # that cause trouble. Some versions do not even contain alloca or
5456 # contain a buggy version. If you still want to use their alloca,
5457 # use ar to extract alloca.o from them instead of compiling alloca.c.
5458 ALLOCA=alloca.${ac_objext}
5459 cat >> confdefs.h <<\EOF
5460 #define C_ALLOCA 1
5464 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5465 echo "configure:5466: checking whether alloca needs Cray hooks" >&5
5466 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5467 echo $ac_n "(cached) $ac_c" 1>&6
5468 else
5469 cat > conftest.$ac_ext <<EOF
5470 #line 5471 "configure"
5471 #include "confdefs.h"
5472 #if defined(CRAY) && ! defined(CRAY2)
5473 webecray
5474 #else
5475 wenotbecray
5476 #endif
5479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5480 egrep "webecray" >/dev/null 2>&1; then
5481 rm -rf conftest*
5482 ac_cv_os_cray=yes
5483 else
5484 rm -rf conftest*
5485 ac_cv_os_cray=no
5487 rm -f conftest*
5491 echo "$ac_t""$ac_cv_os_cray" 1>&6
5492 if test $ac_cv_os_cray = yes; then
5493 for ac_func in _getb67 GETB67 getb67; do
5494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5495 echo "configure:5496: checking for $ac_func" >&5
5496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5497 echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499 cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 /* System header to define __stub macros and hopefully few prototypes,
5503 which can conflict with char $ac_func(); below. */
5504 #include <assert.h>
5505 /* Override any gcc2 internal prototype to avoid an error. */
5506 /* We use char because int might match the return type of a gcc2
5507 builtin and then its argument prototype would still apply. */
5508 char $ac_func();
5510 int main() {
5512 /* The GNU C library defines this for functions which it implements
5513 to always fail with ENOSYS. Some functions are actually named
5514 something starting with __ and the normal name is an alias. */
5515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5516 choke me
5517 #else
5518 $ac_func();
5519 #endif
5521 ; return 0; }
5523 if { (eval echo configure:5524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5524 rm -rf conftest*
5525 eval "ac_cv_func_$ac_func=yes"
5526 else
5527 echo "configure: failed program was:" >&5
5528 cat conftest.$ac_ext >&5
5529 rm -rf conftest*
5530 eval "ac_cv_func_$ac_func=no"
5532 rm -f conftest*
5535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5536 echo "$ac_t""yes" 1>&6
5537 cat >> confdefs.h <<EOF
5538 #define CRAY_STACKSEG_END $ac_func
5541 break
5542 else
5543 echo "$ac_t""no" 1>&6
5546 done
5549 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5550 echo "configure:5551: checking stack direction for C alloca" >&5
5551 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5552 echo $ac_n "(cached) $ac_c" 1>&6
5553 else
5554 if test "$cross_compiling" = yes; then
5555 ac_cv_c_stack_direction=0
5556 else
5557 cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560 find_stack_direction ()
5562 static char *addr = 0;
5563 auto char dummy;
5564 if (addr == 0)
5566 addr = &dummy;
5567 return find_stack_direction ();
5569 else
5570 return (&dummy > addr) ? 1 : -1;
5572 main ()
5574 exit (find_stack_direction() < 0);
5577 if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5578 then
5579 ac_cv_c_stack_direction=1
5580 else
5581 echo "configure: failed program was:" >&5
5582 cat conftest.$ac_ext >&5
5583 rm -fr conftest*
5584 ac_cv_c_stack_direction=-1
5586 rm -fr conftest*
5591 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5592 cat >> confdefs.h <<EOF
5593 #define STACK_DIRECTION $ac_cv_c_stack_direction
5599 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5600 echo "configure:5601: checking whether we are using the GNU C Library 2.1 or newer" >&5
5601 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5602 echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604 cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5608 #include <features.h>
5609 #ifdef __GNU_LIBRARY__
5610 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5611 Lucky GNU user
5612 #endif
5613 #endif
5616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5617 egrep "Lucky GNU user" >/dev/null 2>&1; then
5618 rm -rf conftest*
5619 ac_cv_gnu_library_2_1=yes
5620 else
5621 rm -rf conftest*
5622 ac_cv_gnu_library_2_1=no
5624 rm -f conftest*
5630 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5632 GLIBC21="$ac_cv_gnu_library_2_1"
5636 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5637 stdlib.h string.h unistd.h sys/param.h
5639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5641 echo "configure:5642: checking for $ac_hdr" >&5
5642 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5643 echo $ac_n "(cached) $ac_c" 1>&6
5644 else
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648 #include <$ac_hdr>
5650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5651 { (eval echo configure:5652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5653 if test -z "$ac_err"; then
5654 rm -rf conftest*
5655 eval "ac_cv_header_$ac_safe=yes"
5656 else
5657 echo "$ac_err" >&5
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -rf conftest*
5661 eval "ac_cv_header_$ac_safe=no"
5663 rm -f conftest*
5665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5666 echo "$ac_t""yes" 1>&6
5667 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5668 cat >> confdefs.h <<EOF
5669 #define $ac_tr_hdr 1
5672 else
5673 echo "$ac_t""no" 1>&6
5675 done
5677 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5678 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5679 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5682 echo "configure:5683: checking for $ac_func" >&5
5683 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5684 echo $ac_n "(cached) $ac_c" 1>&6
5685 else
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 /* System header to define __stub macros and hopefully few prototypes,
5690 which can conflict with char $ac_func(); below. */
5691 #include <assert.h>
5692 /* Override any gcc2 internal prototype to avoid an error. */
5693 /* We use char because int might match the return type of a gcc2
5694 builtin and then its argument prototype would still apply. */
5695 char $ac_func();
5697 int main() {
5699 /* The GNU C library defines this for functions which it implements
5700 to always fail with ENOSYS. Some functions are actually named
5701 something starting with __ and the normal name is an alias. */
5702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5703 choke me
5704 #else
5705 $ac_func();
5706 #endif
5708 ; return 0; }
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5711 rm -rf conftest*
5712 eval "ac_cv_func_$ac_func=yes"
5713 else
5714 echo "configure: failed program was:" >&5
5715 cat conftest.$ac_ext >&5
5716 rm -rf conftest*
5717 eval "ac_cv_func_$ac_func=no"
5719 rm -f conftest*
5722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5723 echo "$ac_t""yes" 1>&6
5724 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5725 cat >> confdefs.h <<EOF
5726 #define $ac_tr_func 1
5729 else
5730 echo "$ac_t""no" 1>&6
5732 done
5737 am_cv_lib_iconv_ldpath=
5738 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5739 if test "${with_libiconv_prefix+set}" = set; then
5740 withval="$with_libiconv_prefix"
5742 for dir in `echo "$withval" | tr : ' '`; do
5743 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5744 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5745 done
5750 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5751 echo "configure:5752: checking for iconv" >&5
5752 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5753 echo $ac_n "(cached) $ac_c" 1>&6
5754 else
5756 am_cv_func_iconv="no, consider installing GNU libiconv"
5757 am_cv_lib_iconv=no
5758 cat > conftest.$ac_ext <<EOF
5759 #line 5760 "configure"
5760 #include "confdefs.h"
5761 #include <stdlib.h>
5762 #include <iconv.h>
5763 int main() {
5764 iconv_t cd = iconv_open("","");
5765 iconv(cd,NULL,NULL,NULL,NULL);
5766 iconv_close(cd);
5767 ; return 0; }
5769 if { (eval echo configure:5770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5770 rm -rf conftest*
5771 am_cv_func_iconv=yes
5772 else
5773 echo "configure: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
5776 rm -f conftest*
5777 if test "$am_cv_func_iconv" != yes; then
5778 am_save_LIBS="$LIBS"
5779 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5780 cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783 #include <stdlib.h>
5784 #include <iconv.h>
5785 int main() {
5786 iconv_t cd = iconv_open("","");
5787 iconv(cd,NULL,NULL,NULL,NULL);
5788 iconv_close(cd);
5789 ; return 0; }
5791 if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5792 rm -rf conftest*
5793 am_cv_lib_iconv=yes
5794 am_cv_func_iconv=yes
5795 else
5796 echo "configure: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5799 rm -f conftest*
5800 LIBS="$am_save_LIBS"
5805 echo "$ac_t""$am_cv_func_iconv" 1>&6
5806 if test "$am_cv_func_iconv" = yes; then
5807 cat >> confdefs.h <<\EOF
5808 #define HAVE_ICONV 1
5811 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5812 echo "configure:5813: checking for iconv declaration" >&5
5813 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5815 else
5817 cat > conftest.$ac_ext <<EOF
5818 #line 5819 "configure"
5819 #include "confdefs.h"
5821 #include <stdlib.h>
5822 #include <iconv.h>
5823 extern
5824 #ifdef __cplusplus
5826 #endif
5827 #if defined(__STDC__) || defined(__cplusplus)
5828 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5829 #else
5830 size_t iconv();
5831 #endif
5833 int main() {
5835 ; return 0; }
5837 if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5838 rm -rf conftest*
5839 am_cv_proto_iconv_arg1=""
5840 else
5841 echo "configure: failed program was:" >&5
5842 cat conftest.$ac_ext >&5
5843 rm -rf conftest*
5844 am_cv_proto_iconv_arg1="const"
5846 rm -f conftest*
5847 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);"
5850 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5851 echo "$ac_t""${ac_t:-
5852 }$am_cv_proto_iconv" 1>&6
5853 cat >> confdefs.h <<EOF
5854 #define ICONV_CONST $am_cv_proto_iconv_arg1
5858 LIBICONV=
5859 if test "$am_cv_lib_iconv" = yes; then
5860 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5865 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
5866 echo "configure:5867: checking for nl_langinfo and CODESET" >&5
5867 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
5868 echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870 cat > conftest.$ac_ext <<EOF
5871 #line 5872 "configure"
5872 #include "confdefs.h"
5873 #include <langinfo.h>
5874 int main() {
5875 char* cs = nl_langinfo(CODESET);
5876 ; return 0; }
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879 rm -rf conftest*
5880 am_cv_langinfo_codeset=yes
5881 else
5882 echo "configure: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
5884 rm -rf conftest*
5885 am_cv_langinfo_codeset=no
5887 rm -f conftest*
5891 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5892 if test $am_cv_langinfo_codeset = yes; then
5893 cat >> confdefs.h <<\EOF
5894 #define HAVE_LANGINFO_CODESET 1
5899 if test $ac_cv_header_locale_h = yes; then
5900 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5901 echo "configure:5902: checking for LC_MESSAGES" >&5
5902 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5903 echo $ac_n "(cached) $ac_c" 1>&6
5904 else
5905 cat > conftest.$ac_ext <<EOF
5906 #line 5907 "configure"
5907 #include "confdefs.h"
5908 #include <locale.h>
5909 int main() {
5910 return LC_MESSAGES
5911 ; return 0; }
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914 rm -rf conftest*
5915 am_cv_val_LC_MESSAGES=yes
5916 else
5917 echo "configure: failed program was:" >&5
5918 cat conftest.$ac_ext >&5
5919 rm -rf conftest*
5920 am_cv_val_LC_MESSAGES=no
5922 rm -f conftest*
5925 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5926 if test $am_cv_val_LC_MESSAGES = yes; then
5927 cat >> confdefs.h <<\EOF
5928 #define HAVE_LC_MESSAGES 1
5933 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5934 echo "configure:5935: checking whether NLS is requested" >&5
5935 # Check whether --enable-nls or --disable-nls was given.
5936 if test "${enable_nls+set}" = set; then
5937 enableval="$enable_nls"
5938 USE_NLS=$enableval
5939 else
5940 USE_NLS=yes
5943 echo "$ac_t""$USE_NLS" 1>&6
5946 BUILD_INCLUDED_LIBINTL=no
5947 USE_INCLUDED_LIBINTL=no
5948 INTLLIBS=
5949 INTLDEPS=
5951 if test "$USE_NLS" = "yes"; then
5952 cat >> confdefs.h <<\EOF
5953 #define ENABLE_NLS 1
5956 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5957 echo "configure:5958: checking whether included gettext is requested" >&5
5958 # Check whether --with-included-gettext or --without-included-gettext was given.
5959 if test "${with_included_gettext+set}" = set; then
5960 withval="$with_included_gettext"
5961 nls_cv_force_use_gnu_gettext=$withval
5962 else
5963 nls_cv_force_use_gnu_gettext=no
5966 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5968 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5969 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5970 CATOBJEXT=NONE
5975 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5976 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5977 echo "configure:5978: checking for libintl.h" >&5
5978 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5979 echo $ac_n "(cached) $ac_c" 1>&6
5980 else
5981 cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 #include <libintl.h>
5986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5987 { (eval echo configure:5988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5989 if test -z "$ac_err"; then
5990 rm -rf conftest*
5991 eval "ac_cv_header_$ac_safe=yes"
5992 else
5993 echo "$ac_err" >&5
5994 echo "configure: failed program was:" >&5
5995 cat conftest.$ac_ext >&5
5996 rm -rf conftest*
5997 eval "ac_cv_header_$ac_safe=no"
5999 rm -f conftest*
6001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6002 echo "$ac_t""yes" 1>&6
6003 cat >> confdefs.h <<\EOF
6004 #define HAVE_LIBINTL_H 1
6007 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6008 echo "configure:6009: checking for GNU gettext in libc" >&5
6009 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6010 echo $ac_n "(cached) $ac_c" 1>&6
6011 else
6012 cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 #include <libintl.h>
6016 extern int _nl_msg_cat_cntr;
6017 int main() {
6018 bindtextdomain ("", "");
6019 return (int) gettext ("") + _nl_msg_cat_cntr
6020 ; return 0; }
6022 if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6023 rm -rf conftest*
6024 gt_cv_func_gnugettext1_libc=yes
6025 else
6026 echo "configure: failed program was:" >&5
6027 cat conftest.$ac_ext >&5
6028 rm -rf conftest*
6029 gt_cv_func_gnugettext1_libc=no
6031 rm -f conftest*
6034 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6036 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6037 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6038 echo "configure:6039: checking for GNU gettext in libintl" >&5
6039 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6040 echo $ac_n "(cached) $ac_c" 1>&6
6041 else
6042 gt_save_LIBS="$LIBS"
6043 LIBS="$LIBS -lintl $LIBICONV"
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 #include <libintl.h>
6048 extern int _nl_msg_cat_cntr;
6049 int main() {
6050 bindtextdomain ("", "");
6051 return (int) gettext ("") + _nl_msg_cat_cntr
6052 ; return 0; }
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055 rm -rf conftest*
6056 gt_cv_func_gnugettext1_libintl=yes
6057 else
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 rm -rf conftest*
6061 gt_cv_func_gnugettext1_libintl=no
6063 rm -f conftest*
6064 LIBS="$gt_save_LIBS"
6067 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6070 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6071 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6072 && test "$PACKAGE" != gettext; }; then
6073 cat >> confdefs.h <<\EOF
6074 #define HAVE_GETTEXT 1
6078 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6079 INTLLIBS="-lintl $LIBICONV"
6082 gt_save_LIBS="$LIBS"
6083 LIBS="$LIBS $INTLLIBS"
6084 for ac_func in dcgettext
6086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6087 echo "configure:6088: checking for $ac_func" >&5
6088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6089 echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 /* System header to define __stub macros and hopefully few prototypes,
6095 which can conflict with char $ac_func(); below. */
6096 #include <assert.h>
6097 /* Override any gcc2 internal prototype to avoid an error. */
6098 /* We use char because int might match the return type of a gcc2
6099 builtin and then its argument prototype would still apply. */
6100 char $ac_func();
6102 int main() {
6104 /* The GNU C library defines this for functions which it implements
6105 to always fail with ENOSYS. Some functions are actually named
6106 something starting with __ and the normal name is an alias. */
6107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6108 choke me
6109 #else
6110 $ac_func();
6111 #endif
6113 ; return 0; }
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116 rm -rf conftest*
6117 eval "ac_cv_func_$ac_func=yes"
6118 else
6119 echo "configure: failed program was:" >&5
6120 cat conftest.$ac_ext >&5
6121 rm -rf conftest*
6122 eval "ac_cv_func_$ac_func=no"
6124 rm -f conftest*
6127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6128 echo "$ac_t""yes" 1>&6
6129 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6130 cat >> confdefs.h <<EOF
6131 #define $ac_tr_func 1
6134 else
6135 echo "$ac_t""no" 1>&6
6137 done
6139 LIBS="$gt_save_LIBS"
6141 # Extract the first word of "msgfmt", so it can be a program name with args.
6142 set dummy msgfmt; ac_word=$2
6143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6144 echo "configure:6145: checking for $ac_word" >&5
6145 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6146 echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148 case "$MSGFMT" in
6150 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6153 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6154 for ac_dir in $PATH; do
6155 test -z "$ac_dir" && ac_dir=.
6156 if test -f $ac_dir/$ac_word; then
6157 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6158 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6159 break
6162 done
6163 IFS="$ac_save_ifs"
6164 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6166 esac
6168 MSGFMT="$ac_cv_path_MSGFMT"
6169 if test "$MSGFMT" != ":"; then
6170 echo "$ac_t""$MSGFMT" 1>&6
6171 else
6172 echo "$ac_t""no" 1>&6
6175 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6176 set dummy gmsgfmt; ac_word=$2
6177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6178 echo "configure:6179: checking for $ac_word" >&5
6179 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6180 echo $ac_n "(cached) $ac_c" 1>&6
6181 else
6182 case "$GMSGFMT" in
6184 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6186 ?:/*)
6187 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6190 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6191 ac_dummy="$PATH"
6192 for ac_dir in $ac_dummy; do
6193 test -z "$ac_dir" && ac_dir=.
6194 if test -f $ac_dir/$ac_word; then
6195 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6196 break
6198 done
6199 IFS="$ac_save_ifs"
6200 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6202 esac
6204 GMSGFMT="$ac_cv_path_GMSGFMT"
6205 if test -n "$GMSGFMT"; then
6206 echo "$ac_t""$GMSGFMT" 1>&6
6207 else
6208 echo "$ac_t""no" 1>&6
6212 # Extract the first word of "xgettext", so it can be a program name with args.
6213 set dummy xgettext; ac_word=$2
6214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6215 echo "configure:6216: checking for $ac_word" >&5
6216 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6217 echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219 case "$XGETTEXT" in
6221 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6224 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6225 for ac_dir in $PATH; do
6226 test -z "$ac_dir" && ac_dir=.
6227 if test -f $ac_dir/$ac_word; then
6228 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6229 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6230 break
6233 done
6234 IFS="$ac_save_ifs"
6235 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6237 esac
6239 XGETTEXT="$ac_cv_path_XGETTEXT"
6240 if test "$XGETTEXT" != ":"; then
6241 echo "$ac_t""$XGETTEXT" 1>&6
6242 else
6243 echo "$ac_t""no" 1>&6
6247 CATOBJEXT=.gmo
6250 else
6251 echo "$ac_t""no" 1>&6
6255 if test "$CATOBJEXT" = "NONE"; then
6256 nls_cv_use_gnu_gettext=yes
6260 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6261 INTLOBJS="\$(GETTOBJS)"
6262 # Extract the first word of "msgfmt", so it can be a program name with args.
6263 set dummy msgfmt; ac_word=$2
6264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6265 echo "configure:6266: checking for $ac_word" >&5
6266 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6267 echo $ac_n "(cached) $ac_c" 1>&6
6268 else
6269 case "$MSGFMT" in
6271 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6274 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6275 for ac_dir in $PATH; do
6276 test -z "$ac_dir" && ac_dir=.
6277 if test -f $ac_dir/$ac_word; then
6278 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6279 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6280 break
6283 done
6284 IFS="$ac_save_ifs"
6285 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6287 esac
6289 MSGFMT="$ac_cv_path_MSGFMT"
6290 if test "$MSGFMT" != ":"; then
6291 echo "$ac_t""$MSGFMT" 1>&6
6292 else
6293 echo "$ac_t""no" 1>&6
6296 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6297 set dummy gmsgfmt; ac_word=$2
6298 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6299 echo "configure:6300: checking for $ac_word" >&5
6300 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6301 echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303 case "$GMSGFMT" in
6305 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6307 ?:/*)
6308 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6311 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6312 ac_dummy="$PATH"
6313 for ac_dir in $ac_dummy; do
6314 test -z "$ac_dir" && ac_dir=.
6315 if test -f $ac_dir/$ac_word; then
6316 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6317 break
6319 done
6320 IFS="$ac_save_ifs"
6321 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6323 esac
6325 GMSGFMT="$ac_cv_path_GMSGFMT"
6326 if test -n "$GMSGFMT"; then
6327 echo "$ac_t""$GMSGFMT" 1>&6
6328 else
6329 echo "$ac_t""no" 1>&6
6332 # Extract the first word of "xgettext", so it can be a program name with args.
6333 set dummy xgettext; ac_word=$2
6334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6335 echo "configure:6336: checking for $ac_word" >&5
6336 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6337 echo $ac_n "(cached) $ac_c" 1>&6
6338 else
6339 case "$XGETTEXT" in
6341 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6344 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6345 for ac_dir in $PATH; do
6346 test -z "$ac_dir" && ac_dir=.
6347 if test -f $ac_dir/$ac_word; then
6348 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6349 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6350 break
6353 done
6354 IFS="$ac_save_ifs"
6355 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6357 esac
6359 XGETTEXT="$ac_cv_path_XGETTEXT"
6360 if test "$XGETTEXT" != ":"; then
6361 echo "$ac_t""$XGETTEXT" 1>&6
6362 else
6363 echo "$ac_t""no" 1>&6
6367 BUILD_INCLUDED_LIBINTL=yes
6368 USE_INCLUDED_LIBINTL=yes
6369 CATOBJEXT=.gmo
6370 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6371 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6372 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6375 if test "$GMSGFMT" != ":"; then
6376 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6378 else
6379 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6380 GMSGFMT=":"
6384 if test "$XGETTEXT" != ":"; then
6385 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6387 else
6388 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6389 XGETTEXT=":"
6393 POSUB=po
6398 if test "$PACKAGE" = gettext; then
6399 BUILD_INCLUDED_LIBINTL=yes
6402 for ac_prog in bison
6404 # Extract the first word of "$ac_prog", so it can be a program name with args.
6405 set dummy $ac_prog; ac_word=$2
6406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6407 echo "configure:6408: checking for $ac_word" >&5
6408 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6409 echo $ac_n "(cached) $ac_c" 1>&6
6410 else
6411 if test -n "$INTLBISON"; then
6412 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6413 else
6414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6415 ac_dummy="$PATH"
6416 for ac_dir in $ac_dummy; do
6417 test -z "$ac_dir" && ac_dir=.
6418 if test -f $ac_dir/$ac_word; then
6419 ac_cv_prog_INTLBISON="$ac_prog"
6420 break
6422 done
6423 IFS="$ac_save_ifs"
6426 INTLBISON="$ac_cv_prog_INTLBISON"
6427 if test -n "$INTLBISON"; then
6428 echo "$ac_t""$INTLBISON" 1>&6
6429 else
6430 echo "$ac_t""no" 1>&6
6433 test -n "$INTLBISON" && break
6434 done
6436 if test -z "$INTLBISON"; then
6437 ac_verc_fail=yes
6438 else
6439 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6440 echo "configure:6441: checking version of bison" >&5
6441 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6442 case $ac_prog_version in
6443 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6444 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6445 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6446 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6447 esac
6448 echo "$ac_t""$ac_prog_version" 1>&6
6450 if test $ac_verc_fail = yes; then
6451 INTLBISON=:
6463 if test $USE_INCLUDED_LIBINTL = yes; then
6464 cat >> confdefs.h <<\EOF
6465 #define USE_INCLUDED_LIBINTL 1
6470 nls_cv_header_intl=
6471 nls_cv_header_libgt=
6473 DATADIRNAME=share
6476 INSTOBJEXT=.mo
6479 GENCAT=gencat
6483 if test "x$CATOBJEXT" != x; then
6484 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6485 echo "configure:6486: checking for catalogs to be installed" >&5
6486 # Look for .po and .gmo files in the source directory.
6487 CATALOGS=
6488 XLINGUAS=
6489 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6490 # If there aren't any .gmo files the shell will give us the
6491 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6492 # weeded out.
6493 case "$cat" in *\**)
6494 continue;;
6495 esac
6496 # The quadruple backslash is collapsed to a double backslash
6497 # by the backticks, then collapsed again by the double quotes,
6498 # leaving us with one backslash in the sed expression (right
6499 # before the dot that mustn't act as a wildcard). The dot to
6500 # be escaped in the second expression is hiding inside CATOBJEXT.
6501 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6502 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6503 # The user is allowed to set LINGUAS to a list of languages to
6504 # install catalogs for. If it's empty that means "all of them."
6505 if test "x$LINGUAS" = x; then
6506 CATALOGS="$CATALOGS $cat"
6507 XLINGUAS="$XLINGUAS $lang"
6508 else
6509 case "$LINGUAS" in *$lang*)
6510 CATALOGS="$CATALOGS $cat"
6511 XLINGUAS="$XLINGUAS $lang"
6513 esac
6515 done
6516 LINGUAS="$XLINGUAS"
6517 echo "$ac_t""$LINGUAS" 1>&6
6520 MKINSTALLDIRS=
6521 if test -n "$ac_aux_dir"; then
6522 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6524 if test -z "$MKINSTALLDIRS"; then
6525 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6529 INTL_LIBTOOL_SUFFIX_PREFIX=
6533 # Windows32 Registry support for specifying GCC installation paths.
6534 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6535 if test "${enable_win32_registry+set}" = set; then
6536 enableval="$enable_win32_registry"
6540 case $host_os in
6541 win32 | pe | cygwin* | mingw32* | uwin*)
6542 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6543 echo "configure:6544: checking whether windows registry support is requested" >&5
6544 if test "x$enable_win32_registry" != xno; then
6545 cat >> confdefs.h <<\EOF
6546 #define ENABLE_WIN32_REGISTRY 1
6549 echo "$ac_t""yes" 1>&6
6551 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6552 echo "configure:6553: checking for library containing RegOpenKeyExA" >&5
6553 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556 ac_func_search_save_LIBS="$LIBS"
6557 ac_cv_search_RegOpenKeyExA="no"
6558 cat > conftest.$ac_ext <<EOF
6559 #line 6560 "configure"
6560 #include "confdefs.h"
6561 /* Override any gcc2 internal prototype to avoid an error. */
6562 /* We use char because int might match the return type of a gcc2
6563 builtin and then its argument prototype would still apply. */
6564 char RegOpenKeyExA();
6566 int main() {
6567 RegOpenKeyExA()
6568 ; return 0; }
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571 rm -rf conftest*
6572 ac_cv_search_RegOpenKeyExA="none required"
6573 else
6574 echo "configure: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6577 rm -f conftest*
6578 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6579 LIBS="-l$i $ac_func_search_save_LIBS"
6580 cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* Override any gcc2 internal prototype to avoid an error. */
6584 /* We use char because int might match the return type of a gcc2
6585 builtin and then its argument prototype would still apply. */
6586 char RegOpenKeyExA();
6588 int main() {
6589 RegOpenKeyExA()
6590 ; return 0; }
6592 if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6593 rm -rf conftest*
6594 ac_cv_search_RegOpenKeyExA="-l$i"
6595 break
6596 else
6597 echo "configure: failed program was:" >&5
6598 cat conftest.$ac_ext >&5
6600 rm -f conftest*
6601 done
6602 LIBS="$ac_func_search_save_LIBS"
6605 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6606 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6607 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6609 else :
6612 else
6613 echo "$ac_t""no" 1>&6
6616 # Check if user specified a different registry key.
6617 case "x${enable_win32_registry}" in
6618 x | xyes)
6619 # default.
6620 gcc_cv_win32_registry_key="$VERSION"
6622 xno)
6623 # no registry lookup.
6624 gcc_cv_win32_registry_key=''
6627 # user-specified key.
6628 gcc_cv_win32_registry_key="$enable_win32_registry"
6630 esac
6632 if test "x$enable_win32_registry" != xno; then
6633 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6634 echo "configure:6635: checking registry key on windows hosts" >&5
6635 cat >> confdefs.h <<EOF
6636 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6639 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6642 esac
6644 # Get an absolute path to the GCC top-level source directory
6645 holddir=`${PWDCMD-pwd}`
6646 cd $srcdir
6647 topdir=`${PWDCMD-pwd}`
6648 cd $holddir
6650 # Conditionalize the makefile for this host machine.
6651 # Make-host contains the concatenation of all host makefile fragments
6652 # [there can be more than one]. This file is built by configure.frag.
6653 host_overrides=Make-host
6654 dep_host_xmake_file=
6655 for f in .. ${host_xmake_file}
6657 if test -f ${srcdir}/config/$f
6658 then
6659 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6661 done
6663 # Conditionalize the makefile for this target machine.
6664 # Make-target contains the concatenation of all host makefile fragments
6665 # [there can be more than one]. This file is built by configure.frag.
6666 target_overrides=Make-target
6667 dep_tmake_file=
6668 for f in .. ${tmake_file}
6670 if test -f ${srcdir}/config/$f
6671 then
6672 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6674 done
6676 # If the host doesn't support symlinks, modify CC in
6677 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6678 # Otherwise, we can use "CC=$(CC)".
6679 rm -f symtest.tem
6680 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6681 then
6682 cc_set_by_configure="\$(CC)"
6683 quoted_cc_set_by_configure="\$(CC)"
6684 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6685 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6686 else
6687 rm -f symtest.tem
6688 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6689 then
6690 symbolic_link="cp -p"
6691 else
6692 symbolic_link="cp"
6694 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6695 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6696 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6697 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6699 rm -f symtest.tem
6701 out_object_file=`basename $out_file .c`.o
6703 tm_file_list=
6704 for f in $tm_file; do
6705 case $f in
6706 ansidecl.h )
6707 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6708 defaults.h )
6709 tm_file_list="${tm_file_list} $f" ;;
6710 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6711 esac
6712 done
6714 tm_p_file_list=
6715 for f in $tm_p_file; do
6716 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6717 done
6719 host_xm_file_list=
6720 for f in $host_xm_file; do
6721 case $f in
6722 ansidecl.h )
6723 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6724 auto-host.h | defaults.h )
6725 host_xm_file_list="${host_xm_file_list} $f" ;;
6726 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6727 esac
6728 done
6730 build_xm_file_list=
6731 for f in $build_xm_file; do
6732 case $f in
6733 ansidecl.h )
6734 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6735 auto-build.h | auto-host.h | defaults.h )
6736 build_xm_file_list="${build_xm_file_list} $f" ;;
6737 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6738 esac
6739 done
6741 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6742 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6743 CROSS=
6744 ALL=all.internal
6745 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6746 if test x$host != x$target
6747 then
6748 CROSS="-DCROSS_COMPILE"
6749 ALL=all.cross
6750 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6751 case "$host","$target" in
6752 i?86-*-*,x86_64-*-* \
6753 | powerpc*-*-*,powerpc64*-*-*)
6754 CROSS="$CROSS -DNATIVE_CROSS" ;;
6755 esac
6758 # If this is a cross-compiler that does not
6759 # have its own set of headers then define
6760 # inhibit_libc
6762 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6763 # This prevents libgcc2 from containing any code which requires libc
6764 # support.
6765 inhibit_libc=
6766 if test x$host != x$target && test x$with_headers = x; then
6767 inhibit_libc=-Dinhibit_libc
6768 else
6769 if test x$with_newlib = xyes; then
6770 inhibit_libc=-Dinhibit_libc
6775 # When building gcc with a cross-compiler, we need to adjust things so
6776 # that the generator programs are still built with the native compiler.
6777 # Also, we cannot run fixincludes or fix-header.
6778 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6779 # FIXME.
6781 # These are the normal (build=host) settings:
6782 BUILD_PREFIX=
6783 BUILD_PREFIX_1=ignore-
6784 HOST_CC='$(CC)'
6785 HOST_CFLAGS='$(ALL_CFLAGS)'
6787 STMP_FIXINC=stmp-fixinc
6788 STMP_FIXPROTO=stmp-fixproto
6790 # And these apply if build != host.
6791 if test x$build != x$host
6792 then
6793 BUILD_PREFIX=build-
6794 BUILD_PREFIX_1=build-
6795 HOST_CC='$(CC_FOR_BUILD)'
6796 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6798 STMP_FIXINC=
6799 STMP_FIXPROTO=
6802 # Expand extra_headers to include complete path.
6803 # This substitutes for lots of t-* files.
6804 extra_headers_list=
6805 if test "x$extra_headers" = x
6806 then true
6807 else
6808 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6809 for file in $extra_headers;
6811 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6812 done
6815 if test x$use_collect2 = xno; then
6816 use_collect2=
6819 # Add a definition of USE_COLLECT2 if system wants one.
6820 if test x$use_collect2 != x
6821 then
6822 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6823 xm_defines="${xm_defines} USE_COLLECT2"
6826 # If we have gas in the build tree, make a link to it.
6827 if test -f ../gas/Makefile; then
6828 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6831 # If we have nm and objdump in the build tree, make a link to them.
6832 if test -f ../binutils/Makefile; then
6833 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6834 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6837 # If we have ld in the build tree, make a link to it.
6838 if test -f ../ld/Makefile; then
6839 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6842 # Figure out what assembler we will be using.
6843 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6844 echo "configure:6845: checking what assembler to use" >&5
6845 gcc_cv_as=
6846 gcc_cv_gas_major_version=
6847 gcc_cv_gas_minor_version=
6848 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6849 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6850 if test -x "$DEFAULT_ASSEMBLER"; then
6851 gcc_cv_as="$DEFAULT_ASSEMBLER"
6852 elif test -x "$AS"; then
6853 gcc_cv_as="$AS"
6854 elif test -x as$host_exeext; then
6855 # Build using assembler in the current directory.
6856 gcc_cv_as=./as$host_exeext
6857 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6858 # Single tree build which includes gas.
6859 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
6861 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6862 if test x$gcc_cv_gas_version != x; then
6863 break
6865 done
6866 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6867 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6868 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
6871 if test "x$gcc_cv_as" = x; then
6872 # Search the same directories that the installed compiler will
6873 # search. Else we may find the wrong assembler and lose. If we
6874 # do not find a suitable assembler binary, then try the user's
6875 # path.
6877 # Also note we have to check MD_EXEC_PREFIX before checking the
6878 # user's path. Unfortunately, there is no good way to get at the
6879 # value of MD_EXEC_PREFIX here. So we do a brute force search
6880 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6881 # to be fixed as part of the make/configure rewrite too.
6883 if test "x$exec_prefix" = xNONE; then
6884 if test "x$prefix" = xNONE; then
6885 test_prefix=/usr/local
6886 else
6887 test_prefix=$prefix
6889 else
6890 test_prefix=$exec_prefix
6893 # If the loop below does not find an assembler, then use whatever
6894 # one we can find in the users's path.
6895 # user's path.
6896 if test "x$program_prefix" != xNONE; then
6897 gcc_cv_as=${program_prefix}as$host_exeext
6898 else
6899 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
6902 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6903 $test_prefix/lib/gcc-lib/$target_alias \
6904 /usr/lib/gcc/$target_alias/$gcc_version \
6905 /usr/lib/gcc/$target_alias \
6906 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6907 $test_prefix/$target_alias/bin"
6909 if test x$host = x$target; then
6910 test_dirs="$test_dirs \
6911 /usr/libexec \
6912 /usr/ccs/gcc \
6913 /usr/ccs/bin \
6914 /udk/usr/ccs/bin \
6915 /bsd43/usr/lib/cmplrs/cc \
6916 /usr/cross64/usr/bin \
6917 /usr/lib/cmplrs/cc \
6918 /sysv/usr/lib/cmplrs/cc \
6919 /svr4/usr/lib/cmplrs/cc \
6920 /usr/bin"
6923 for dir in $test_dirs; do
6924 if test -x $dir/as$host_exeext; then
6925 gcc_cv_as=$dir/as$host_exeext
6926 break;
6928 done
6930 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6931 echo "$ac_t"""newly built gas"" 1>&6
6932 else
6933 echo "$ac_t""$gcc_cv_as" 1>&6
6936 # Figure out what linker we will be using.
6937 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
6938 echo "configure:6939: checking what linker to use" >&5
6939 gcc_cv_ld=
6940 gcc_cv_gld_major_version=
6941 gcc_cv_gld_minor_version=
6942 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
6943 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6944 if test -x "$DEFAULT_LINKER"; then
6945 gcc_cv_ld="$DEFAULT_LINKER"
6946 elif test -x "$LD"; then
6947 gcc_cv_ld="$LD"
6948 elif test -x ld$host_exeext; then
6949 # Build using linker in the current directory.
6950 gcc_cv_ld=./ld$host_exeext
6951 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
6952 # Single tree build which includes ld.
6953 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
6955 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6956 if test x$gcc_cv_gld_version != x; then
6957 break
6959 done
6960 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
6961 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6964 if test "x$gcc_cv_ld" = x; then
6965 # Search the same directories that the installed compiler will
6966 # search. Else we may find the wrong linker and lose. If we
6967 # do not find a suitable linker binary, then try the user's
6968 # path.
6970 # Also note we have to check MD_EXEC_PREFIX before checking the
6971 # user's path. Unfortunately, there is no good way to get at the
6972 # value of MD_EXEC_PREFIX here. So we do a brute force search
6973 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6974 # to be fixed as part of the make/configure rewrite too.
6976 if test "x$exec_prefix" = xNONE; then
6977 if test "x$prefix" = xNONE; then
6978 test_prefix=/usr/local
6979 else
6980 test_prefix=$prefix
6982 else
6983 test_prefix=$exec_prefix
6986 # If the loop below does not find an linker, then use whatever
6987 # one we can find in the users's path.
6988 # user's path.
6989 if test "x$program_prefix" != xNONE; then
6990 gcc_cv_ld=${program_prefix}ld$host_exeext
6991 else
6992 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
6995 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6996 $test_prefix/lib/gcc-lib/$target_alias \
6997 /usr/lib/gcc/$target_alias/$gcc_version \
6998 /usr/lib/gcc/$target_alias \
6999 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7000 $test_prefix/$target_alias/bin"
7002 if test x$host = x$target; then
7003 test_dirs="$test_dirs \
7004 /usr/libexec \
7005 /usr/ccs/gcc \
7006 /usr/ccs/bin \
7007 /udk/usr/ccs/bin \
7008 /bsd43/usr/lib/cmplrs/cc \
7009 /usr/cross64/usr/bin \
7010 /usr/lib/cmplrs/cc \
7011 /sysv/usr/lib/cmplrs/cc \
7012 /svr4/usr/lib/cmplrs/cc \
7013 /usr/bin"
7016 for dir in $test_dirs; do
7017 if test -x $dir/ld$host_exeext; then
7018 gcc_cv_ld=$dir/ld$host_exeext
7019 break;
7021 done
7023 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7024 echo "$ac_t"""newly built ld"" 1>&6
7025 else
7026 echo "$ac_t""$gcc_cv_ld" 1>&6
7029 # Figure out what nm we will be using.
7030 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7031 echo "configure:7032: checking what nm to use" >&5
7032 if test -x nm$host_exeext; then
7033 gcc_cv_nm=./nm$host_exeext
7034 elif test "x$program_prefix" != xNONE; then
7035 gcc_cv_nm=${program_prefix}nm$host_exeext
7036 else
7037 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7039 echo "$ac_t""$gcc_cv_nm" 1>&6
7041 # Figure out what objdump we will be using.
7042 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7043 echo "configure:7044: checking what objdump to use" >&5
7044 if test -x objdump$host_exeext; then
7045 gcc_cv_objdump=./objdump$host_exeext
7046 elif test "x$program_prefix" != xNONE; then
7047 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7048 else
7049 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7051 echo "$ac_t""$gcc_cv_objdump" 1>&6
7053 # Figure out what assembler alignment features are present.
7054 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7055 echo "configure:7056: checking assembler alignment features" >&5
7056 gcc_cv_as_alignment_features=none
7057 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7058 # Gas version 2.6 and later support for .balign and .p2align.
7059 # bytes to skip when using .p2align.
7060 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
7061 gcc_cv_as_alignment_features=".balign and .p2align"
7062 cat >> confdefs.h <<\EOF
7063 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7067 # Gas version 2.8 and later support specifying the maximum
7068 # bytes to skip when using .p2align.
7069 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
7070 gcc_cv_as_alignment_features=".p2align including maximum skip"
7071 cat >> confdefs.h <<\EOF
7072 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7076 elif test x$gcc_cv_as != x; then
7077 # Check if we have .balign and .p2align
7078 echo ".balign 4" > conftest.s
7079 echo ".p2align 2" >> conftest.s
7080 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7081 gcc_cv_as_alignment_features=".balign and .p2align"
7082 cat >> confdefs.h <<\EOF
7083 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7087 rm -f conftest.s conftest.o
7088 # Check if specifying the maximum bytes to skip when
7089 # using .p2align is supported.
7090 echo ".p2align 4,,7" > conftest.s
7091 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7092 gcc_cv_as_alignment_features=".p2align including maximum skip"
7093 cat >> confdefs.h <<\EOF
7094 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7098 rm -f conftest.s conftest.o
7100 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7102 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7103 echo "configure:7104: checking assembler subsection support" >&5
7104 gcc_cv_as_subsections=no
7105 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7106 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
7107 gcc_cv_as_subsections="working .subsection -1"
7109 elif test x$gcc_cv_as != x; then
7110 # Check if we have .subsection
7111 echo ".subsection 1" > conftest.s
7112 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7113 gcc_cv_as_subsections=".subsection"
7114 if test x$gcc_cv_nm != x; then
7115 cat > conftest.s <<EOF
7116 conftest_label1: .word 0
7117 .subsection -1
7118 conftest_label2: .word 0
7119 .previous
7121 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7122 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7123 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7124 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7126 else
7127 gcc_cv_as_subsections="working .subsection -1"
7132 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7134 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7135 cat >> confdefs.h <<\EOF
7136 #define HAVE_GAS_SUBSECTION_ORDERING 1
7140 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7142 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7143 echo "configure:7144: checking assembler weak support" >&5
7144 gcc_cv_as_weak=no
7145 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7146 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
7147 gcc_cv_as_weak="yes"
7149 elif test x$gcc_cv_as != x; then
7150 # Check if we have .weak
7151 echo " .weak foobar" > conftest.s
7152 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7153 gcc_cv_as_weak="yes"
7155 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7157 if test x"$gcc_cv_as_weak" = xyes; then
7158 cat >> confdefs.h <<\EOF
7159 #define HAVE_GAS_WEAK 1
7163 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7165 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7166 echo "configure:7167: checking assembler hidden support" >&5
7167 gcc_cv_as_hidden=no
7168 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7169 if test "$gcc_cv_gas_major_version" -eq 2 \
7170 -a "$gcc_cv_gas_minor_version" -eq 12 \
7171 -a "$gcc_cv_gas_patch_version" -ge 1 \
7172 -o "$gcc_cv_gas_major_version" -eq 2 \
7173 -a "$gcc_cv_gas_minor_version" -gt 12 \
7174 -o "$gcc_cv_gas_major_version" -gt 2 \
7175 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7176 gcc_cv_as_hidden="yes"
7178 elif test x$gcc_cv_as != x; then
7179 # Check if we have .hidden
7180 echo " .hidden foobar" > conftest.s
7181 echo "foobar:" >> conftest.s
7182 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7183 gcc_cv_as_hidden="yes"
7185 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7187 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7188 # This is irritatingly difficult to feature test for. Look for
7189 # the date string after the version number.
7190 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7191 if echo "$ld_ver" | grep GNU > /dev/null; then
7192 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7193 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'`
7194 if test 0"$ld_date" -lt 20020404; then
7195 if test -n "$ld_date"; then
7196 # If there was date string, but was earlier than 2002-04-04, fail
7197 gcc_cv_as_hidden="no"
7198 elif test -z "$ld_vers"; then
7199 # If there was no date string nor ld version number, something is wrong
7200 gcc_cv_as_hidden="no"
7201 else
7202 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7203 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7204 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7205 test -z "$ld_vers_patch" && ld_vers_patch=0
7206 if test "$ld_vers_major" -lt 2; then
7207 gcc_cv_as_hidden="no"
7208 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7209 gcc_cv_as_hidden="no"
7210 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7211 -a "$ld_vers_patch" -eq 0; then
7212 gcc_cv_as_hidden="no"
7218 if test x"$gcc_cv_as_hidden" = xyes; then
7219 cat >> confdefs.h <<\EOF
7220 #define HAVE_GAS_HIDDEN 1
7224 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7225 libgcc_visibility=$gcc_cv_as_hidden
7228 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7229 echo "configure:7230: checking assembler leb128 support" >&5
7230 gcc_cv_as_leb128=no
7231 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7232 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
7233 gcc_cv_as_leb128="yes"
7235 elif test x$gcc_cv_as != x; then
7236 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7237 cat > conftest.s <<EOF
7238 .data
7239 .uleb128 L2 - L1
7241 .uleb128 1280
7242 .sleb128 -1010
7245 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7246 gcc_cv_as_leb128="yes"
7248 # GAS versions before 2.11 do not support uleb128,
7249 # despite appearing to.
7250 # ??? There exists an elf-specific test that will crash
7251 # the assembler. Perhaps it's better to figure out whether
7252 # arbitrary sections are supported and try the test.
7253 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7254 if echo "$as_ver" | grep GNU > /dev/null; then
7255 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7256 as_major=`echo $as_ver | sed 's/\..*//'`
7257 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7258 if test $as_major -eq 2 -a $as_minor -lt 11; then
7259 gcc_cv_as_leb128="no"
7263 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7265 if test x"$gcc_cv_as_leb128" = xyes; then
7266 cat >> confdefs.h <<\EOF
7267 #define HAVE_AS_LEB128 1
7271 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7273 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7274 echo "configure:7275: checking assembler eh_frame optimization" >&5
7275 gcc_cv_as_eh_frame=no
7276 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7277 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
7278 gcc_cv_as_eh_frame="yes"
7280 elif test x$gcc_cv_as != x; then
7281 # Check if this is GAS.
7282 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7283 rm -f a.out 2> /dev/null
7284 if echo "$as_ver" | grep GNU > /dev/null; then
7285 # Versions up to and including 2.11.0 may mis-optimize
7286 # .eh_frame data. Try something.
7287 cat > conftest.s <<EOF
7288 .text
7289 .LFB1:
7290 .4byte 0
7291 .L1:
7292 .4byte 0
7293 .LFE1:
7294 .section .eh_frame,"aw",@progbits
7295 __FRAME_BEGIN__:
7296 .4byte .LECIE1-.LSCIE1
7297 .LSCIE1:
7298 .4byte 0x0
7299 .byte 0x1
7300 .ascii "z\0"
7301 .byte 0x1
7302 .byte 0x78
7303 .byte 0x1a
7304 .byte 0x0
7305 .byte 0x4
7306 .4byte 1
7307 .p2align 1
7308 .LECIE1:
7309 .LSFDE1:
7310 .4byte .LEFDE1-.LASFDE1
7311 .LASFDE1:
7312 .4byte .LASFDE1-__FRAME_BEGIN__
7313 .4byte .LFB1
7314 .4byte .LFE1-.LFB1
7315 .byte 0x4
7316 .4byte .LFE1-.LFB1
7317 .byte 0x4
7318 .4byte .L1-.LFB1
7319 .LEFDE1:
7321 cat > conftest.lit <<EOF
7322 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7323 0010 01000000 12000000 18000000 00000000 ................
7324 0020 08000000 04080000 0044 .........D
7326 cat > conftest.big <<EOF
7327 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7328 0010 00000001 00000012 00000018 00000000 ................
7329 0020 00000008 04000000 0844 .........D
7331 # If the assembler didn't choke, and we can objdump,
7332 # and we got the correct data, then succeed.
7333 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7334 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7335 | tail -3 > conftest.got \
7336 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7337 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7338 then
7339 gcc_cv_as_eh_frame="yes"
7340 else
7341 gcc_cv_as_eh_frame="bad"
7342 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7343 cat >> confdefs.h <<\EOF
7344 #define USE_AS_TRADITIONAL_FORMAT 1
7350 rm -f conftest.*
7352 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7354 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7355 echo "configure:7356: checking assembler section merging support" >&5
7356 gcc_cv_as_shf_merge=no
7357 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7358 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
7359 gcc_cv_as_shf_merge=yes
7361 elif test x$gcc_cv_as != x; then
7362 # Check if we support SHF_MERGE sections
7363 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7364 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7365 gcc_cv_as_shf_merge=yes
7367 rm -f conftest.s conftest.o
7369 if test x"$gcc_cv_as_shf_merge" = xyes; then
7370 cat >> confdefs.h <<\EOF
7371 #define HAVE_GAS_SHF_MERGE 1
7375 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7377 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7378 echo "configure:7379: checking assembler thread-local storage support" >&5
7379 gcc_cv_as_tls=no
7380 conftest_s=
7381 tls_first_major=
7382 tls_first_minor=
7383 case "$target" in
7384 alpha*-*-*)
7385 conftest_s='
7386 .section ".tdata","awT",@progbits
7387 foo: .long 25
7388 .text
7389 ldq $27,__tls_get_addr($29) !literal!1
7390 lda $16,foo($29) !tlsgd!1
7391 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7392 ldq $27,__tls_get_addr($29) !literal!2
7393 lda $16,foo($29) !tlsldm!2
7394 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7395 ldq $1,foo($29) !gotdtprel
7396 ldah $2,foo($29) !dtprelhi
7397 lda $3,foo($2) !dtprello
7398 lda $4,foo($29) !dtprel
7399 ldq $1,foo($29) !gottprel
7400 ldah $2,foo($29) !tprelhi
7401 lda $3,foo($2) !tprello
7402 lda $4,foo($29) !tprel'
7403 tls_first_major=2
7404 tls_first_minor=13
7406 i[34567]86-*-*)
7407 conftest_s='
7408 .section ".tdata","awT",@progbits
7409 foo: .long 25
7410 .text
7411 movl %gs:0, %eax
7412 leal foo@TLSGD(,%ebx,1), %eax
7413 leal foo@TLSLDM(%ebx), %eax
7414 leal foo@DTPOFF(%eax), %edx
7415 movl foo@GOTTPOFF(%ebx), %eax
7416 subl foo@GOTTPOFF(%ebx), %eax
7417 movl $foo@TPOFF, %eax
7418 subl $foo@TPOFF, %eax
7419 leal foo@NTPOFF(%ecx), %eax'
7420 tls_first_major=2
7421 tls_first_minor=13
7423 ia64-*-*)
7424 conftest_s='
7425 .section ".tdata","awT",@progbits
7426 foo: data8 25
7427 .text
7428 addl r16 = @ltoff(@dtpmod(foo#)), gp
7429 addl r17 = @ltoff(@dtprel(foo#)), gp
7430 addl r18 = @ltoff(@tprel(foo#)), gp
7431 addl r19 = @dtprel(foo#), gp
7432 adds r21 = @dtprel(foo#), r13
7433 movl r23 = @dtprel(foo#)
7434 addl r20 = @tprel(foo#), gp
7435 adds r22 = @tprel(foo#), r13
7436 movl r24 = @tprel(foo#)'
7437 tls_first_major=2
7438 tls_first_minor=13
7440 esac
7441 if test -z "$tls_first_major"; then
7443 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7444 then
7445 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7446 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7447 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7448 gcc_cv_as_tls=yes
7450 elif test x$gcc_cv_as != x; then
7451 echo "$conftest_s" > conftest.s
7452 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7453 then
7454 gcc_cv_as_tls=yes
7456 rm -f conftest.s conftest.o
7458 if test "$gcc_cv_as_tls" = yes; then
7459 cat >> confdefs.h <<\EOF
7460 #define HAVE_AS_TLS 1
7464 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7466 case "$target" in
7467 # All TARGET_ABI_OSF targets.
7468 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7469 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7470 echo "configure:7471: checking assembler supports explicit relocations" >&5
7471 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7472 echo $ac_n "(cached) $ac_c" 1>&6
7473 else
7475 gcc_cv_as_explicit_relocs=unknown
7476 if test x$gcc_cv_gas_major_version != x \
7477 -a x$gcc_cv_gas_minor_version != x
7478 then
7479 if test "$gcc_cv_gas_major_version" -eq 2 \
7480 -a "$gcc_cv_gas_minor_version" -ge 12 \
7481 -o "$gcc_cv_gas_major_version" -gt 2; then
7482 gcc_cv_as_explicit_relocs=yes
7484 elif test x$gcc_cv_as != x; then
7485 cat > conftest.s << 'EOF'
7486 .set nomacro
7487 .text
7488 extbl $3, $2, $3 !lituse_bytoff!1
7489 ldq $2, a($29) !literal!1
7490 ldq $4, b($29) !literal!2
7491 ldq_u $3, 0($2) !lituse_base!1
7492 ldq $27, f($29) !literal!5
7493 jsr $26, ($27), f !lituse_jsr!5
7494 ldah $29, 0($26) !gpdisp!3
7495 lda $0, c($29) !gprel
7496 ldah $1, d($29) !gprelhigh
7497 lda $1, d($1) !gprellow
7498 lda $29, 0($29) !gpdisp!3
7500 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7501 gcc_cv_as_explicit_relocs=yes
7502 else
7503 gcc_cv_as_explicit_relocs=no
7505 rm -f conftest.s conftest.o
7510 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7511 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7512 cat >> confdefs.h <<\EOF
7513 #define HAVE_AS_EXPLICIT_RELOCS 1
7518 sparc*-*-*)
7519 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7520 echo "configure:7521: checking assembler .register pseudo-op support" >&5
7521 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7522 echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7525 gcc_cv_as_register_pseudo_op=unknown
7526 if test x$gcc_cv_as != x; then
7527 # Check if we have .register
7528 echo ".register %g2, #scratch" > conftest.s
7529 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7530 gcc_cv_as_register_pseudo_op=yes
7531 else
7532 gcc_cv_as_register_pseudo_op=no
7534 rm -f conftest.s conftest.o
7539 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7540 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7541 cat >> confdefs.h <<\EOF
7542 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7547 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7548 echo "configure:7549: checking assembler supports -relax" >&5
7549 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7550 echo $ac_n "(cached) $ac_c" 1>&6
7551 else
7553 gcc_cv_as_relax_opt=unknown
7554 if test x$gcc_cv_as != x; then
7555 # Check if gas supports -relax
7556 echo ".text" > conftest.s
7557 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7558 gcc_cv_as_relax_opt=yes
7559 else
7560 gcc_cv_as_relax_opt=no
7562 rm -f conftest.s conftest.o
7567 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7568 if test "x$gcc_cv_as_relax_opt" = xyes; then
7569 cat >> confdefs.h <<\EOF
7570 #define HAVE_AS_RELAX_OPTION 1
7575 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7576 echo "configure:7577: checking assembler and linker support unaligned pc related relocs" >&5
7577 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7578 echo $ac_n "(cached) $ac_c" 1>&6
7579 else
7581 gcc_cv_as_sparc_ua_pcrel=unknown
7582 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7583 gcc_cv_as_sparc_ua_pcrel=no
7584 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7585 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7586 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7587 gcc_cv_as_sparc_ua_pcrel=yes
7589 rm -f conftest.s conftest.o conftest
7594 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7595 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7596 cat >> confdefs.h <<\EOF
7597 #define HAVE_AS_SPARC_UA_PCREL 1
7602 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7603 echo "configure:7604: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7604 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7605 echo $ac_n "(cached) $ac_c" 1>&6
7606 else
7608 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7609 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7610 if test x$gcc_cv_objdump != x; then
7611 gcc_cv_as_sparc_ua_pcrel_hidden=no
7612 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7613 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7614 echo "foo: .skip 4" >> conftest.s
7615 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7616 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7617 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7618 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7619 if $gcc_cv_objdump -R conftest 2> /dev/null \
7620 | grep 'DISP32' > /dev/null 2>&1; then
7622 else
7623 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7627 rm -f conftest.s conftest.o conftest
7628 else
7629 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7634 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7635 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7636 cat >> confdefs.h <<\EOF
7637 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7642 if test "x$gcc_cv_as_flags64" != xno; then
7643 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7644 echo "configure:7645: checking for assembler offsetable %lo() support" >&5
7645 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7646 echo $ac_n "(cached) $ac_c" 1>&6
7647 else
7649 gcc_cv_as_offsetable_lo10=unknown
7650 if test "x$gcc_cv_as" != x; then
7651 # Check if assembler has offsetable %lo()
7652 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7653 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7654 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7655 > /dev/null 2>&1 &&
7656 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7657 > /dev/null 2>&1; then
7658 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7659 gcc_cv_as_offsetable_lo10=no
7660 else
7661 gcc_cv_as_offsetable_lo10=yes
7663 else
7664 gcc_cv_as_offsetable_lo10=no
7666 rm -f conftest.s conftest.o conftest1.s conftest1.o
7671 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7672 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7673 cat >> confdefs.h <<\EOF
7674 #define HAVE_AS_OFFSETABLE_LO10 1
7682 i[34567]86-*-* | x86_64-*-*)
7683 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7684 echo "configure:7685: checking assembler instructions" >&5
7685 gcc_cv_as_instructions=
7686 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7687 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
7688 gcc_cv_as_instructions="filds fists"
7690 elif test x$gcc_cv_as != x; then
7691 set "filds fists" "filds mem; fists mem"
7692 while test $# -gt 0
7694 echo "$2" > conftest.s
7695 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7696 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7698 shift 2
7699 done
7700 rm -f conftest.s conftest.o
7702 if test x"$gcc_cv_as_instructions" != x; then
7703 cat >> confdefs.h <<EOF
7704 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7708 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7710 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7711 echo "configure:7712: checking assembler GOTOFF in data directives" >&5
7712 gcc_cv_as_gotoff_in_data=no
7713 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7714 then
7715 if test "$gcc_cv_gas_major_version" -eq 2 \
7716 -a "$gcc_cv_gas_minor_version" -ge 11 \
7717 -o "$gcc_cv_gas_major_version" -gt 2; then
7718 gcc_cv_as_gotoff_in_data=yes
7720 elif test x$gcc_cv_as != x; then
7721 cat > conftest.s <<EOF
7722 .text
7723 .L0:
7725 .data
7726 .long .L0@GOTOFF
7728 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7729 gcc_cv_as_gotoff_in_data=yes
7732 cat >> confdefs.h <<EOF
7733 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7736 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7738 esac
7740 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7741 echo "configure:7742: checking assembler dwarf2 debug_line support" >&5
7742 gcc_cv_as_dwarf2_debug_line=no
7743 # ??? Not all targets support dwarf2 debug_line, even within a version
7744 # of gas. Moreover, we need to emit a valid instruction to trigger any
7745 # info to the output file. So, as supported targets are added to gas 2.11,
7746 # add some instruction here to (also) show we expect this might work.
7747 # ??? Once 2.11 is released, probably need to add first known working
7748 # version to the per-target configury.
7749 case "$target" in
7750 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
7751 insn="nop"
7753 ia64*-*-*)
7754 insn="nop 0"
7756 esac
7757 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7758 then
7759 if test "$gcc_cv_gas_major_version" -eq 2 \
7760 -a "$gcc_cv_gas_minor_version" -ge 11 \
7761 -o "$gcc_cv_gas_major_version" -gt 2 \
7762 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7763 && test x"$insn" != x ; then
7764 gcc_cv_as_dwarf2_debug_line="yes"
7766 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7767 echo ' .file 1 "conftest.s"' > conftest.s
7768 echo ' .loc 1 3 0' >> conftest.s
7769 echo " $insn" >> conftest.s
7770 # ??? This fails with non-gnu grep.
7771 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7772 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7773 # The .debug_line file table must be in the exact order that
7774 # we specified the files, since these indices are also used
7775 # by DW_AT_decl_file. Approximate this test by testing if
7776 # the assembler bitches if the same index is assigned twice.
7777 echo ' .file 1 "foo.s"' > conftest.s
7778 echo ' .file 1 "bar.s"' >> conftest.s
7779 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7780 then
7781 gcc_cv_as_dwarf2_debug_line="no"
7782 else
7783 gcc_cv_as_dwarf2_debug_line="yes"
7786 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7788 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7789 cat >> confdefs.h <<\EOF
7790 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7794 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7796 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7797 echo "configure:7798: checking assembler --gdwarf2 support" >&5
7798 gcc_cv_as_gdwarf2_flag=no
7799 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7800 then
7801 if test "$gcc_cv_gas_major_version" -eq 2 \
7802 -a "$gcc_cv_gas_minor_version" -ge 11 \
7803 -o "$gcc_cv_gas_major_version" -gt 2 \
7804 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7805 && test x"$insn" != x ; then
7806 gcc_cv_as_gdwarf2_debug_flag="yes"
7808 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7809 echo '' > conftest.s
7810 # ??? This fails with non-gnu grep.
7811 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7812 then
7813 gcc_cv_as_gdwarf2_flag="yes"
7815 rm -f conftest.s conftest.o
7817 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7818 cat >> confdefs.h <<\EOF
7819 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7823 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7825 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7826 echo "configure:7827: checking assembler --gstabs support" >&5
7827 gcc_cv_as_gstabs_flag=no
7828 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7829 then
7830 if test "$gcc_cv_gas_major_version" -eq 2 \
7831 -a "$gcc_cv_gas_minor_version" -ge 11 \
7832 -o "$gcc_cv_gas_major_version" -gt 2 \
7833 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7834 && test x"$insn" != x ; then
7835 gcc_cv_as_gstabs_debug_flag="yes"
7837 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7838 echo '' > conftest.s
7839 # ??? This fails with non-gnu grep.
7840 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7841 gcc_cv_as_gstabs_flag="yes"
7843 rm -f conftest.s conftest.o
7845 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7846 cat >> confdefs.h <<\EOF
7847 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7851 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7853 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7854 echo "configure:7855: checking linker PT_GNU_EH_FRAME support" >&5
7855 gcc_cv_ld_eh_frame_hdr=no
7856 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7857 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
7858 gcc_cv_ld_eh_frame_hdr=yes
7860 elif test x$gcc_cv_ld != x; then
7861 # Check if linker supports --eh-frame-hdr option
7862 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7863 gcc_cv_ld_eh_frame_hdr=yes
7866 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7867 cat >> confdefs.h <<\EOF
7868 #define HAVE_LD_EH_FRAME_HDR 1
7872 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7874 if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7875 cat >> confdefs.h <<EOF
7876 #define PREFIX_INCLUDE_DIR "$prefix/include"
7881 # Figure out what language subdirectories are present.
7882 # Look if the user specified --enable-languages="..."; if not, use
7883 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7884 # go away some day.
7885 # NB: embedded tabs in this IF block -- do not untabify
7886 if test x"${enable_languages+set}" != xset; then
7887 if test x"${LANGUAGES+set}" = xset; then
7888 enable_languages="${LANGUAGES}"
7889 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7891 else
7892 enable_languages=all
7894 else
7895 if test x"${enable_languages}" = x ||
7896 test x"${enable_languages}" = xyes;
7897 then
7898 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7901 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
7903 # First scan to see if an enabled language requires some other language.
7904 # We assume that a given config-lang.in will list all the language
7905 # front ends it requires, even if some are required indirectly.
7906 for lang in ${srcdir}/*/config-lang.in ..
7908 case $lang in
7911 # The odd quoting in the next line works around
7912 # an apparent bug in bash 1.12 on linux.
7913 ${srcdir}/[*]/config-lang.in)
7916 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7917 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
7918 for other in $this_lang_requires
7920 case ,${enable_languages}, in
7921 *,$other,*)
7923 *,all,*)
7925 *,$lang_alias,*)
7926 enable_languages="$enable_languages,$other"
7928 esac
7929 done
7931 esac
7932 done
7934 subdirs=
7935 for lang in ${srcdir}/*/config-lang.in ..
7937 case $lang in
7938 ..) ;;
7939 # The odd quoting in the next line works around
7940 # an apparent bug in bash 1.12 on linux.
7941 ${srcdir}/[*]/config-lang.in) ;;
7943 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7944 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
7945 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
7946 if test "x$lang_alias" = x
7947 then
7948 echo "$lang doesn't set \$language." 1>&2
7949 exit 1
7951 case ${build_by_default},${enable_languages}, in
7952 *,$lang_alias,*) add_this_lang=yes ;;
7953 no,*) add_this_lang=no ;;
7954 *,all,*) add_this_lang=yes ;;
7955 *) add_this_lang=no ;;
7956 esac
7957 if test x"${add_this_lang}" = xyes; then
7958 case $lang in
7959 ${srcdir}/ada/config-lang.in)
7960 if test x$have_gnat = xyes ; then
7961 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7965 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7967 esac
7970 esac
7971 done
7973 # Make gthr-default.h if we have a thread file.
7974 gthread_flags=
7975 if test $thread_file != single; then
7976 rm -f gthr-default.h
7977 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7978 gthread_flags=-DHAVE_GTHR_DEFAULT
7982 # Find out what GC implementation we want, or may, use.
7983 # Check whether --with-gc or --without-gc was given.
7984 if test "${with_gc+set}" = set; then
7985 withval="$with_gc"
7986 case "$withval" in
7987 simple | page)
7988 GGC=ggc-$withval
7991 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7993 esac
7994 else
7995 GGC=ggc-page
7999 echo "Using $GGC for garbage collection."
8001 # Use the system's zlib library.
8002 zlibdir=-L../zlib
8003 zlibinc="-I\$(srcdir)/../zlib"
8004 # Check whether --with-system-zlib or --without-system-zlib was given.
8005 if test "${with_system_zlib+set}" = set; then
8006 withval="$with_system_zlib"
8007 zlibdir=
8008 zlibinc=
8016 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8017 echo "configure:8018: checking whether to enable maintainer-specific portions of Makefiles" >&5
8018 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8019 if test "${enable_maintainer_mode+set}" = set; then
8020 enableval="$enable_maintainer_mode"
8021 maintainer_mode=$enableval
8022 else
8023 maintainer_mode=no
8027 echo "$ac_t""$maintainer_mode" 1>&6
8029 if test "$maintainer_mode" = "yes"; then
8030 MAINT=''
8031 else
8032 MAINT='#'
8035 # With Setjmp/Longjmp based exception handling.
8036 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8037 if test "${enable_sjlj_exceptions+set}" = set; then
8038 enableval="$enable_sjlj_exceptions"
8039 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
8040 cat >> confdefs.h <<EOF
8041 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
8047 # Make empty files to contain the specs and options for each language.
8048 # Then add #include lines to for a compiler that has specs and/or options.
8050 lang_specs_files=
8051 lang_options_files=
8052 lang_tree_files=
8053 for subdir in . $subdirs
8055 if test -f $srcdir/$subdir/lang-specs.h; then
8056 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8058 if test -f $srcdir/$subdir/lang-options.h; then
8059 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8061 if test -f $srcdir/$subdir/$subdir-tree.def; then
8062 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8064 done
8066 # These (without "all_") are set in each config-lang.in.
8067 # `language' must be a single word so is spelled singularly.
8068 all_languages=
8069 all_boot_languages=
8070 all_compilers=
8071 all_stagestuff=
8072 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8073 # List of language makefile fragments.
8074 all_lang_makefiles=
8076 # Add the language fragments.
8077 # Languages are added via two mechanisms. Some information must be
8078 # recorded in makefile variables, these are defined in config-lang.in.
8079 # We accumulate them and plug them into the main Makefile.
8080 # The other mechanism is a set of hooks for each of the main targets
8081 # like `clean', `install', etc.
8083 language_fragments="Make-lang"
8084 language_hooks="Make-hooks"
8086 for s in .. $subdirs
8088 if test $s != ".."
8089 then
8090 language=
8091 boot_language=
8092 compilers=
8093 stagestuff=
8094 outputs=
8095 . ${srcdir}/$s/config-lang.in
8096 if test "x$language" = x
8097 then
8098 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8099 exit 1
8101 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8102 if test -f ${srcdir}/$s/Makefile.in
8103 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8105 all_languages="$all_languages $language"
8106 if test "x$boot_language" = xyes
8107 then
8108 all_boot_languages="$all_boot_languages $language"
8110 all_compilers="$all_compilers $compilers"
8111 all_stagestuff="$all_stagestuff $stagestuff"
8112 all_outputs="$all_outputs $outputs"
8114 done
8116 check_languages=
8117 for language in .. $all_languages
8119 if test $language != ".."
8120 then
8121 check_languages="$check_languages check-$language"
8123 done
8125 # Since we can't use `::' targets, we link each language in
8126 # with a set of hooks, reached indirectly via lang.${target}.
8128 rm -f Make-hooks
8129 touch Make-hooks
8130 target_list="all.build all.cross start.encap rest.encap \
8131 info dvi generated-manpages \
8132 install-normal install-common install-info install-man \
8133 uninstall \
8134 mostlyclean clean distclean extraclean maintainer-clean \
8135 stage1 stage2 stage3 stage4"
8136 for t in $target_list
8139 for lang in .. $all_languages
8141 if test $lang != ".."; then
8142 x="$x $lang.$t"
8144 done
8145 echo "lang.$t: $x" >> Make-hooks
8146 done
8148 # Create .gdbinit.
8150 echo "dir ." > .gdbinit
8151 echo "dir ${srcdir}" >> .gdbinit
8152 if test x$gdb_needs_out_file_path = xyes
8153 then
8154 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8156 if test "x$subdirs" != x; then
8157 for s in $subdirs
8159 echo "dir ${srcdir}/$s" >> .gdbinit
8160 done
8162 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8164 # Define variables host_canonical and build_canonical
8165 # because some Cygnus local changes in the Makefile depend on them.
8166 build_canonical=${build}
8167 host_canonical=${host}
8168 target_subdir=
8169 if test "${host}" != "${target}" ; then
8170 target_subdir=${target_alias}/
8176 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8177 # absolute path for gcc_tooldir based on inserting the number of up-directory
8178 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8179 # $(libsubdir)/@(unlibsubdir) based path.
8180 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8181 # make and thus we'd get different behavior depending on where we built the
8182 # sources.
8183 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8184 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8185 else
8186 # An explanation of the sed strings:
8187 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8188 # -e 's|/$||' match a trailing forward slash and eliminates it
8189 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8190 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8192 # (*) Note this pattern overwrites the first character of the string
8193 # with a forward slash if one is not already present. This is not a
8194 # problem because the exact names of the sub-directories concerned is
8195 # unimportant, just the number of them matters.
8197 # The practical upshot of these patterns is like this:
8199 # prefix exec_prefix result
8200 # ------ ----------- ------
8201 # /foo /foo/bar ../
8202 # /foo/ /foo/bar ../
8203 # /foo /foo/bar/ ../
8204 # /foo/ /foo/bar/ ../
8205 # /foo /foo/bar/ugg ../../
8207 dollar='$$'
8208 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8213 # Find a directory in which to install a shared libgcc.
8215 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8216 if test "${enable_version_specific_runtime_libs+set}" = set; then
8217 enableval="$enable_version_specific_runtime_libs"
8222 # Check whether --with-slibdir or --without-slibdir was given.
8223 if test "${with_slibdir+set}" = set; then
8224 withval="$with_slibdir"
8225 slibdir="$with_slibdir"
8226 else
8227 if test "${enable_version_specific_runtime_libs+set}" = set; then
8228 slibdir='$(libsubdir)'
8229 elif test "$host" != "$target"; then
8230 slibdir='$(build_tooldir)/lib'
8231 else
8232 slibdir='$(libdir)'
8238 # Nothing to do for FLOAT_H, float_format already handled.
8239 objdir=`${PWDCMD-pwd}`
8242 # Process the language and host/target makefile fragments.
8243 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8245 # Substitute configuration variables
8309 # Echo that links are built
8310 if test x$host = x$target
8311 then
8312 str1="native "
8313 else
8314 str1="cross-"
8315 str2=" from $host"
8318 if test x$host != x$build
8319 then
8320 str3=" on a $build system"
8323 if test "x$str2" != x || test "x$str3" != x
8324 then
8325 str4=
8328 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8330 if test "x$str2" != x || test "x$str3" != x
8331 then
8332 echo " ${str2}${str3}." 1>&2
8335 # Truncate the target if necessary
8336 if test x$host_truncate_target != x; then
8337 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8340 # Configure the subdirectories
8341 # AC_CONFIG_SUBDIRS($subdirs)
8343 # Create the Makefile
8344 # and configure language subdirectories
8345 trap '' 1 2 15
8346 cat > confcache <<\EOF
8347 # This file is a shell script that caches the results of configure
8348 # tests run on this system so they can be shared between configure
8349 # scripts and configure runs. It is not useful on other systems.
8350 # If it contains results you don't want to keep, you may remove or edit it.
8352 # By default, configure uses ./config.cache as the cache file,
8353 # creating it if it does not exist already. You can give configure
8354 # the --cache-file=FILE option to use a different cache file; that is
8355 # what configure does when it calls configure scripts in
8356 # subdirectories, so they share the cache.
8357 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8358 # config.status only pays attention to the cache file if you give it the
8359 # --recheck option to rerun configure.
8362 # The following way of writing the cache mishandles newlines in values,
8363 # but we know of no workaround that is simple, portable, and efficient.
8364 # So, don't put newlines in cache variables' values.
8365 # Ultrix sh set writes to stderr and can't be redirected directly,
8366 # and sets the high bit in the cache file unless we assign to the vars.
8367 (set) 2>&1 |
8368 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8369 *ac_space=\ *)
8370 # `set' does not quote correctly, so add quotes (double-quote substitution
8371 # turns \\\\ into \\, and sed turns \\ into \).
8372 sed -n \
8373 -e "s/'/'\\\\''/g" \
8374 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8377 # `set' quotes correctly as required by POSIX, so do not add quotes.
8378 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8380 esac >> confcache
8381 if cmp -s $cache_file confcache; then
8383 else
8384 if test -w $cache_file; then
8385 echo "updating cache $cache_file"
8386 cat confcache > $cache_file
8387 else
8388 echo "not updating unwritable cache $cache_file"
8391 rm -f confcache
8393 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8395 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8396 # Let make expand exec_prefix.
8397 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8399 # Any assignment to VPATH causes Sun make to only execute
8400 # the first set of double-colon rules, so remove it if not needed.
8401 # If there is a colon in the path, we need to keep it.
8402 if test "x$srcdir" = x.; then
8403 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8406 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8408 DEFS=-DHAVE_CONFIG_H
8410 # Without the "./", some shells look in PATH for config.status.
8411 : ${CONFIG_STATUS=./config.status}
8413 echo creating $CONFIG_STATUS
8414 rm -f $CONFIG_STATUS
8415 cat > $CONFIG_STATUS <<EOF
8416 #! /bin/sh
8417 # Generated automatically by configure.
8418 # Run this file to recreate the current configuration.
8419 # This directory was configured as follows,
8420 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8422 # $0 $ac_configure_args
8424 # Compiler output produced by configure, useful for debugging
8425 # configure, is in ./config.log if it exists.
8427 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8428 for ac_option
8430 case "\$ac_option" in
8431 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8432 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8433 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8434 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8435 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8436 exit 0 ;;
8437 -help | --help | --hel | --he | --h)
8438 echo "\$ac_cs_usage"; exit 0 ;;
8439 *) echo "\$ac_cs_usage"; exit 1 ;;
8440 esac
8441 done
8443 ac_given_srcdir=$srcdir
8445 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8447 cat >> $CONFIG_STATUS <<EOF
8449 # Protect against being on the right side of a sed subst in config.status.
8450 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8451 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8452 $ac_vpsub
8453 $extrasub
8454 s%@SHELL@%$SHELL%g
8455 s%@CFLAGS@%$CFLAGS%g
8456 s%@CPPFLAGS@%$CPPFLAGS%g
8457 s%@CXXFLAGS@%$CXXFLAGS%g
8458 s%@FFLAGS@%$FFLAGS%g
8459 s%@DEFS@%$DEFS%g
8460 s%@LDFLAGS@%$LDFLAGS%g
8461 s%@LIBS@%$LIBS%g
8462 s%@exec_prefix@%$exec_prefix%g
8463 s%@prefix@%$prefix%g
8464 s%@program_transform_name@%$program_transform_name%g
8465 s%@bindir@%$bindir%g
8466 s%@sbindir@%$sbindir%g
8467 s%@libexecdir@%$libexecdir%g
8468 s%@datadir@%$datadir%g
8469 s%@sysconfdir@%$sysconfdir%g
8470 s%@sharedstatedir@%$sharedstatedir%g
8471 s%@localstatedir@%$localstatedir%g
8472 s%@libdir@%$libdir%g
8473 s%@includedir@%$includedir%g
8474 s%@oldincludedir@%$oldincludedir%g
8475 s%@infodir@%$infodir%g
8476 s%@mandir@%$mandir%g
8477 s%@enable_multilib@%$enable_multilib%g
8478 s%@enable_shared@%$enable_shared%g
8479 s%@host@%$host%g
8480 s%@host_alias@%$host_alias%g
8481 s%@host_cpu@%$host_cpu%g
8482 s%@host_vendor@%$host_vendor%g
8483 s%@host_os@%$host_os%g
8484 s%@target@%$target%g
8485 s%@target_alias@%$target_alias%g
8486 s%@target_cpu@%$target_cpu%g
8487 s%@target_vendor@%$target_vendor%g
8488 s%@target_os@%$target_os%g
8489 s%@build@%$build%g
8490 s%@build_alias@%$build_alias%g
8491 s%@build_cpu@%$build_cpu%g
8492 s%@build_vendor@%$build_vendor%g
8493 s%@build_os@%$build_os%g
8494 s%@CC@%$CC%g
8495 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8496 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8497 s%@GNATBIND@%$GNATBIND%g
8498 s%@ADAC@%$ADAC%g
8499 s%@strict1_warn@%$strict1_warn%g
8500 s%@CPP@%$CPP%g
8501 s%@warn_cflags@%$warn_cflags%g
8502 s%@stage1_cflags@%$stage1_cflags%g
8503 s%@SET_MAKE@%$SET_MAKE%g
8504 s%@AWK@%$AWK%g
8505 s%@LN@%$LN%g
8506 s%@LN_S@%$LN_S%g
8507 s%@RANLIB@%$RANLIB%g
8508 s%@INSTALL@%$INSTALL%g
8509 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8510 s%@INSTALL_DATA@%$INSTALL_DATA%g
8511 s%@have_mktemp_command@%$have_mktemp_command%g
8512 s%@MAKEINFO@%$MAKEINFO%g
8513 s%@BUILD_INFO@%$BUILD_INFO%g
8514 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8515 s%@FLEX@%$FLEX%g
8516 s%@BISON@%$BISON%g
8517 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8518 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8519 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8520 s%@LIBICONV@%$LIBICONV%g
8521 s%@manext@%$manext%g
8522 s%@objext@%$objext%g
8523 s%@FORBUILD@%$FORBUILD%g
8524 s%@PACKAGE@%$PACKAGE%g
8525 s%@VERSION@%$VERSION%g
8526 s%@ALLOCA@%$ALLOCA%g
8527 s%@GLIBC21@%$GLIBC21%g
8528 s%@USE_NLS@%$USE_NLS%g
8529 s%@MSGFMT@%$MSGFMT%g
8530 s%@GMSGFMT@%$GMSGFMT%g
8531 s%@XGETTEXT@%$XGETTEXT%g
8532 s%@INTLBISON@%$INTLBISON%g
8533 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8534 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8535 s%@CATALOGS@%$CATALOGS%g
8536 s%@CATOBJEXT@%$CATOBJEXT%g
8537 s%@INTLLIBS@%$INTLLIBS%g
8538 s%@INTLDEPS@%$INTLDEPS%g
8539 s%@INTLOBJS@%$INTLOBJS%g
8540 s%@POSUB@%$POSUB%g
8541 s%@DATADIRNAME@%$DATADIRNAME%g
8542 s%@INSTOBJEXT@%$INSTOBJEXT%g
8543 s%@GENCAT@%$GENCAT%g
8544 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8545 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8546 s%@CROSS@%$CROSS%g
8547 s%@ALL@%$ALL%g
8548 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8549 s%@inhibit_libc@%$inhibit_libc%g
8550 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8551 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8552 s%@HOST_CC@%$HOST_CC%g
8553 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8554 s%@STMP_FIXINC@%$STMP_FIXINC%g
8555 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8556 s%@libgcc_visibility@%$libgcc_visibility%g
8557 s%@gthread_flags@%$gthread_flags%g
8558 s%@GGC@%$GGC%g
8559 s%@zlibdir@%$zlibdir%g
8560 s%@zlibinc@%$zlibinc%g
8561 s%@MAINT@%$MAINT%g
8562 s%@build_canonical@%$build_canonical%g
8563 s%@host_canonical@%$host_canonical%g
8564 s%@target_subdir@%$target_subdir%g
8565 s%@gcc_tooldir@%$gcc_tooldir%g
8566 s%@dollar@%$dollar%g
8567 s%@slibdir@%$slibdir%g
8568 s%@objdir@%$objdir%g
8569 s%@subdirs@%$subdirs%g
8570 s%@all_boot_languages@%$all_boot_languages%g
8571 s%@all_compilers@%$all_compilers%g
8572 s%@all_lang_makefiles@%$all_lang_makefiles%g
8573 s%@all_languages@%$all_languages%g
8574 s%@all_stagestuff@%$all_stagestuff%g
8575 s%@build_exeext@%$build_exeext%g
8576 s%@build_install_headers_dir@%$build_install_headers_dir%g
8577 s%@build_xm_file_list@%$build_xm_file_list%g
8578 s%@build_xm_file@%$build_xm_file%g
8579 s%@build_xm_defines@%$build_xm_defines%g
8580 s%@check_languages@%$check_languages%g
8581 s%@cc_set_by_configure@%$cc_set_by_configure%g
8582 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8583 s%@cpp_install_dir@%$cpp_install_dir%g
8584 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8585 s%@dep_tmake_file@%$dep_tmake_file%g
8586 s%@extra_headers_list@%$extra_headers_list%g
8587 s%@extra_objs@%$extra_objs%g
8588 s%@extra_parts@%$extra_parts%g
8589 s%@extra_passes@%$extra_passes%g
8590 s%@extra_programs@%$extra_programs%g
8591 s%@float_h_file@%$float_h_file%g
8592 s%@gcc_config_arguments@%$gcc_config_arguments%g
8593 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8594 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8595 s%@gcc_version@%$gcc_version%g
8596 s%@gcc_version_full@%$gcc_version_full%g
8597 s%@gcc_version_trigger@%$gcc_version_trigger%g
8598 s%@host_exeext@%$host_exeext%g
8599 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8600 s%@host_xm_file_list@%$host_xm_file_list%g
8601 s%@host_xm_file@%$host_xm_file%g
8602 s%@host_xm_defines@%$host_xm_defines%g
8603 s%@install@%$install%g
8604 s%@lang_options_files@%$lang_options_files%g
8605 s%@lang_specs_files@%$lang_specs_files%g
8606 s%@lang_tree_files@%$lang_tree_files%g
8607 s%@local_prefix@%$local_prefix%g
8608 s%@md_file@%$md_file%g
8609 s%@objc_boehm_gc@%$objc_boehm_gc%g
8610 s%@out_file@%$out_file%g
8611 s%@out_object_file@%$out_object_file%g
8612 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8613 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8614 s%@symbolic_link@%$symbolic_link%g
8615 s%@thread_file@%$thread_file%g
8616 s%@tm_file_list@%$tm_file_list%g
8617 s%@tm_file@%$tm_file%g
8618 s%@tm_p_file_list@%$tm_p_file_list%g
8619 s%@tm_p_file@%$tm_p_file%g
8620 s%@xm_file@%$xm_file%g
8621 s%@xm_defines@%$xm_defines%g
8622 s%@c_target_objs@%$c_target_objs%g
8623 s%@cxx_target_objs@%$cxx_target_objs%g
8624 s%@target_cpu_default@%$target_cpu_default%g
8625 /@target_overrides@/r $target_overrides
8626 s%@target_overrides@%%g
8627 /@host_overrides@/r $host_overrides
8628 s%@host_overrides@%%g
8629 /@language_fragments@/r $language_fragments
8630 s%@language_fragments@%%g
8631 /@language_hooks@/r $language_hooks
8632 s%@language_hooks@%%g
8634 CEOF
8637 cat >> $CONFIG_STATUS <<\EOF
8639 # Split the substitutions into bite-sized pieces for seds with
8640 # small command number limits, like on Digital OSF/1 and HP-UX.
8641 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8642 ac_file=1 # Number of current file.
8643 ac_beg=1 # First line for current file.
8644 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8645 ac_more_lines=:
8646 ac_sed_cmds=""
8647 while $ac_more_lines; do
8648 if test $ac_beg -gt 1; then
8649 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8650 else
8651 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8653 if test ! -s conftest.s$ac_file; then
8654 ac_more_lines=false
8655 rm -f conftest.s$ac_file
8656 else
8657 if test -z "$ac_sed_cmds"; then
8658 ac_sed_cmds="sed -f conftest.s$ac_file"
8659 else
8660 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8662 ac_file=`expr $ac_file + 1`
8663 ac_beg=$ac_end
8664 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8666 done
8667 if test -z "$ac_sed_cmds"; then
8668 ac_sed_cmds=cat
8672 cat >> $CONFIG_STATUS <<EOF
8674 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8676 cat >> $CONFIG_STATUS <<\EOF
8677 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8678 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8679 case "$ac_file" in
8680 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8681 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8682 *) ac_file_in="${ac_file}.in" ;;
8683 esac
8685 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8687 # Remove last slash and all that follows it. Not all systems have dirname.
8688 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8689 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8690 # The file is in a subdirectory.
8691 test ! -d "$ac_dir" && mkdir "$ac_dir"
8692 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8693 # A "../" for each directory in $ac_dir_suffix.
8694 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8695 else
8696 ac_dir_suffix= ac_dots=
8699 case "$ac_given_srcdir" in
8700 .) srcdir=.
8701 if test -z "$ac_dots"; then top_srcdir=.
8702 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8703 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8704 *) # Relative path.
8705 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8706 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8707 esac
8710 echo creating "$ac_file"
8711 rm -f "$ac_file"
8712 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8713 case "$ac_file" in
8714 *Makefile*) ac_comsub="1i\\
8715 # $configure_input" ;;
8716 *) ac_comsub= ;;
8717 esac
8719 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8720 sed -e "$ac_comsub
8721 s%@configure_input@%$configure_input%g
8722 s%@srcdir@%$srcdir%g
8723 s%@top_srcdir@%$top_srcdir%g
8724 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8725 fi; done
8726 rm -f conftest.s*
8728 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8729 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8731 # ac_d sets the value in "#define NAME VALUE" lines.
8732 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8733 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8734 ac_dC='\3'
8735 ac_dD='%g'
8736 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8737 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8738 ac_uB='\([ ]\)%\1#\2define\3'
8739 ac_uC=' '
8740 ac_uD='\4%g'
8741 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8742 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8743 ac_eB='$%\1#\2define\3'
8744 ac_eC=' '
8745 ac_eD='%g'
8747 if test "${CONFIG_HEADERS+set}" != set; then
8749 cat >> $CONFIG_STATUS <<EOF
8750 CONFIG_HEADERS="auto-host.h:config.in"
8752 cat >> $CONFIG_STATUS <<\EOF
8754 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8755 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8756 case "$ac_file" in
8757 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8758 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8759 *) ac_file_in="${ac_file}.in" ;;
8760 esac
8762 echo creating $ac_file
8764 rm -f conftest.frag conftest.in conftest.out
8765 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8766 cat $ac_file_inputs > conftest.in
8770 # Transform confdefs.h into a sed script conftest.vals that substitutes
8771 # the proper values into config.h.in to produce config.h. And first:
8772 # Protect against being on the right side of a sed subst in config.status.
8773 # Protect against being in an unquoted here document in config.status.
8774 rm -f conftest.vals
8775 cat > conftest.hdr <<\EOF
8776 s/[\\&%]/\\&/g
8777 s%[\\$`]%\\&%g
8778 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8779 s%ac_d%ac_u%gp
8780 s%ac_u%ac_e%gp
8782 sed -n -f conftest.hdr confdefs.h > conftest.vals
8783 rm -f conftest.hdr
8785 # This sed command replaces #undef with comments. This is necessary, for
8786 # example, in the case of _POSIX_SOURCE, which is predefined and required
8787 # on some systems where configure will not decide to define it.
8788 cat >> conftest.vals <<\EOF
8789 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8792 # Break up conftest.vals because some shells have a limit on
8793 # the size of here documents, and old seds have small limits too.
8795 rm -f conftest.tail
8796 while :
8798 ac_lines=`grep -c . conftest.vals`
8799 # grep -c gives empty output for an empty file on some AIX systems.
8800 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8801 # Write a limited-size here document to conftest.frag.
8802 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8803 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8804 echo 'CEOF
8805 sed -f conftest.frag conftest.in > conftest.out
8806 rm -f conftest.in
8807 mv conftest.out conftest.in
8808 ' >> $CONFIG_STATUS
8809 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8810 rm -f conftest.vals
8811 mv conftest.tail conftest.vals
8812 done
8813 rm -f conftest.vals
8815 cat >> $CONFIG_STATUS <<\EOF
8816 rm -f conftest.frag conftest.h
8817 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8818 cat conftest.in >> conftest.h
8819 rm -f conftest.in
8820 if cmp -s $ac_file conftest.h 2>/dev/null; then
8821 echo "$ac_file is unchanged"
8822 rm -f conftest.h
8823 else
8824 # Remove last slash and all that follows it. Not all systems have dirname.
8825 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8826 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8827 # The file is in a subdirectory.
8828 test ! -d "$ac_dir" && mkdir "$ac_dir"
8830 rm -f $ac_file
8831 mv conftest.h $ac_file
8833 fi; done
8836 cat >> $CONFIG_STATUS <<EOF
8838 subdirs='$subdirs'
8839 symbolic_link='$symbolic_link'
8842 cat >> $CONFIG_STATUS <<\EOF
8843 for ac_file in $CONFIG_FILES; do
8844 # Support "outfile[:infile[:infile...]]"
8845 case "$ac_file" in
8846 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8847 esac
8848 # PO directories have a Makefile.in generated from Makefile.in.in.
8849 case "$ac_file" in */Makefile.in)
8850 # Adjust a relative srcdir.
8851 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8852 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8853 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8854 # In autoconf-2.13 it is called $ac_given_srcdir.
8855 # In autoconf-2.50 it is called $srcdir.
8856 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8857 case "$ac_given_srcdir" in
8858 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8859 /*) top_srcdir="$ac_given_srcdir" ;;
8860 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8861 esac
8862 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8863 rm -f "$ac_dir/POTFILES"
8864 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8865 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8866 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8867 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8870 esac
8871 done
8873 case x$CONFIG_HEADERS in
8874 xauto-host.h:config.in)
8875 echo > cstamp-h ;;
8876 esac
8877 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8878 # bootstrapping and the installation procedure can still use
8879 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
8880 # FLAGS_TO_PASS has been modified to solve the problem there.
8881 # This is virtually a duplicate of what happens in configure.lang; we do
8882 # an extra check to make sure this only happens if ln -s can be used.
8883 if test "$symbolic_link" = "ln -s"; then
8884 for d in .. ${subdirs} fixinc ; do
8885 if test $d != ..; then
8886 STARTDIR=`${PWDCMD-pwd}`
8887 cd $d
8888 for t in stage1 stage2 stage3 stage4 include
8890 rm -f $t
8891 $symbolic_link ../$t $t 2>/dev/null
8892 done
8893 cd $STARTDIR
8895 done
8896 else true ; fi
8897 # Avoid having to add intl to our include paths.
8898 if test -f intl/libintl.h; then
8899 echo creating libintl.h
8900 echo '#include "intl/libintl.h"' >libintl.h
8903 exit 0
8905 chmod +x $CONFIG_STATUS
8906 rm -fr confdefs* $ac_clean_files
8907 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1