* configure.in (CROSS): Define NATIVE_CROSS.
[official-gcc.git] / gcc / configure
blobea8701c0edb7c0a93a97712963b645026594afaf
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 --disable-cpp don't provide a user-visible C preprocessor"
41 ac_help="$ac_help
42 --with-cpp-install-dir=DIR
43 install the user visible C preprocessor in DIR
44 (relative to PREFIX) as well as PREFIX/bin"
45 ac_help="$ac_help
46 --enable-c-mbchar enable multibyte characters for C and C++"
47 ac_help="$ac_help
48 --enable-threads enable thread usage for target GCC
49 --enable-threads=LIB use LIB thread package for target GCC"
50 ac_help="$ac_help
51 --enable-objc-gc enable the use of Boehm's garbage collector with
52 the GNU Objective-C runtime"
53 ac_help="$ac_help
54 --with-dwarf2 force the default debug format to be DWARF 2"
55 ac_help="$ac_help
56 --disable-shared don't provide a shared libgcc"
57 ac_help="$ac_help
58 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
59 ac_help="$ac_help
60 --enable-nls use Native Language Support (default)"
61 ac_help="$ac_help
62 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
63 ac_help="$ac_help
64 --disable-nls do not use Native Language Support"
65 ac_help="$ac_help
66 --with-included-gettext use the GNU gettext library included here"
67 ac_help="$ac_help
68 --disable-win32-registry
69 disable lookup of installation paths in the
70 Registry on Windows hosts
71 --enable-win32-registry enable registry lookup (default)
72 --enable-win32-registry=KEY
73 use KEY instead of GCC version as the last portion
74 of the registry key"
75 ac_help="$ac_help
76 --with-gc={simple,page} choose the garbage collection mechanism to use
77 with the compiler"
78 ac_help="$ac_help
79 --with-system-zlib use installed libz"
80 ac_help="$ac_help
81 --enable-maintainer-mode
82 enable make rules and dependencies not useful
83 (and sometimes confusing) to the casual installer"
84 ac_help="$ac_help
85 --enable-sjlj-exceptions
86 arrange to use setjmp/longjmp exception handling"
87 ac_help="$ac_help
88 --enable-version-specific-runtime-libs
89 specify that runtime libraries should be
90 installed in a compiler-specific directory"
91 ac_help="$ac_help
92 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
94 # Initialize some variables set by options.
95 # The variables have the same names as the options, with
96 # dashes changed to underlines.
97 build=NONE
98 cache_file=./config.cache
99 exec_prefix=NONE
100 host=NONE
101 no_create=
102 nonopt=NONE
103 no_recursion=
104 prefix=NONE
105 program_prefix=NONE
106 program_suffix=NONE
107 program_transform_name=s,x,x,
108 silent=
109 site=
110 srcdir=
111 target=NONE
112 verbose=
113 x_includes=NONE
114 x_libraries=NONE
115 bindir='${exec_prefix}/bin'
116 sbindir='${exec_prefix}/sbin'
117 libexecdir='${exec_prefix}/libexec'
118 datadir='${prefix}/share'
119 sysconfdir='${prefix}/etc'
120 sharedstatedir='${prefix}/com'
121 localstatedir='${prefix}/var'
122 libdir='${exec_prefix}/lib'
123 includedir='${prefix}/include'
124 oldincludedir='/usr/include'
125 infodir='${prefix}/info'
126 mandir='${prefix}/man'
128 # Initialize some other variables.
129 subdirs=
130 MFLAGS= MAKEFLAGS=
131 SHELL=${CONFIG_SHELL-/bin/sh}
132 # Maximum number of lines to put in a shell here document.
133 ac_max_here_lines=12
135 ac_prev=
136 for ac_option
139 # If the previous option needs an argument, assign it.
140 if test -n "$ac_prev"; then
141 eval "$ac_prev=\$ac_option"
142 ac_prev=
143 continue
146 case "$ac_option" in
147 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
148 *) ac_optarg= ;;
149 esac
151 # Accept the important Cygnus configure options, so we can diagnose typos.
153 case "$ac_option" in
155 -bindir | --bindir | --bindi | --bind | --bin | --bi)
156 ac_prev=bindir ;;
157 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
158 bindir="$ac_optarg" ;;
160 -build | --build | --buil | --bui | --bu)
161 ac_prev=build ;;
162 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
163 build="$ac_optarg" ;;
165 -cache-file | --cache-file | --cache-fil | --cache-fi \
166 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
167 ac_prev=cache_file ;;
168 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
169 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
170 cache_file="$ac_optarg" ;;
172 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
173 ac_prev=datadir ;;
174 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
175 | --da=*)
176 datadir="$ac_optarg" ;;
178 -disable-* | --disable-*)
179 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
180 # Reject names that are not valid shell variable names.
181 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
182 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
185 eval "enable_${ac_feature}=no" ;;
187 -enable-* | --enable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 case "$ac_option" in
195 *=*) ;;
196 *) ac_optarg=yes ;;
197 esac
198 eval "enable_${ac_feature}='$ac_optarg'" ;;
200 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
201 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
202 | --exec | --exe | --ex)
203 ac_prev=exec_prefix ;;
204 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
205 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
206 | --exec=* | --exe=* | --ex=*)
207 exec_prefix="$ac_optarg" ;;
209 -gas | --gas | --ga | --g)
210 # Obsolete; use --with-gas.
211 with_gas=yes ;;
213 -help | --help | --hel | --he)
214 # Omit some internal or obsolete options to make the list less imposing.
215 # This message is too long to be a string in the A/UX 3.1 sh.
216 cat << EOF
217 Usage: configure [options] [host]
218 Options: [defaults in brackets after descriptions]
219 Configuration:
220 --cache-file=FILE cache test results in FILE
221 --help print this message
222 --no-create do not create output files
223 --quiet, --silent do not print \`checking...' messages
224 --version print the version of autoconf that created configure
225 Directory and file names:
226 --prefix=PREFIX install architecture-independent files in PREFIX
227 [$ac_default_prefix]
228 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
229 [same as prefix]
230 --bindir=DIR user executables in DIR [EPREFIX/bin]
231 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
232 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
233 --datadir=DIR read-only architecture-independent data in DIR
234 [PREFIX/share]
235 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
236 --sharedstatedir=DIR modifiable architecture-independent data in DIR
237 [PREFIX/com]
238 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
239 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
240 --includedir=DIR C header files in DIR [PREFIX/include]
241 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
242 --infodir=DIR info documentation in DIR [PREFIX/info]
243 --mandir=DIR man documentation in DIR [PREFIX/man]
244 --srcdir=DIR find the sources in DIR [configure dir or ..]
245 --program-prefix=PREFIX prepend PREFIX to installed program names
246 --program-suffix=SUFFIX append SUFFIX to installed program names
247 --program-transform-name=PROGRAM
248 run sed PROGRAM on installed program names
250 cat << EOF
251 Host type:
252 --build=BUILD configure for building on BUILD [BUILD=HOST]
253 --host=HOST configure for HOST [guessed]
254 --target=TARGET configure for TARGET [TARGET=HOST]
255 Features and packages:
256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
258 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
259 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
260 --x-includes=DIR X include files are in DIR
261 --x-libraries=DIR X library files are in DIR
263 if test -n "$ac_help"; then
264 echo "--enable and --with options recognized:$ac_help"
266 exit 0 ;;
268 -host | --host | --hos | --ho)
269 ac_prev=host ;;
270 -host=* | --host=* | --hos=* | --ho=*)
271 host="$ac_optarg" ;;
273 -includedir | --includedir | --includedi | --included | --include \
274 | --includ | --inclu | --incl | --inc)
275 ac_prev=includedir ;;
276 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
277 | --includ=* | --inclu=* | --incl=* | --inc=*)
278 includedir="$ac_optarg" ;;
280 -infodir | --infodir | --infodi | --infod | --info | --inf)
281 ac_prev=infodir ;;
282 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
283 infodir="$ac_optarg" ;;
285 -libdir | --libdir | --libdi | --libd)
286 ac_prev=libdir ;;
287 -libdir=* | --libdir=* | --libdi=* | --libd=*)
288 libdir="$ac_optarg" ;;
290 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
291 | --libexe | --libex | --libe)
292 ac_prev=libexecdir ;;
293 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
294 | --libexe=* | --libex=* | --libe=*)
295 libexecdir="$ac_optarg" ;;
297 -localstatedir | --localstatedir | --localstatedi | --localstated \
298 | --localstate | --localstat | --localsta | --localst \
299 | --locals | --local | --loca | --loc | --lo)
300 ac_prev=localstatedir ;;
301 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
302 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
303 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
304 localstatedir="$ac_optarg" ;;
306 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
307 ac_prev=mandir ;;
308 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
309 mandir="$ac_optarg" ;;
311 -nfp | --nfp | --nf)
312 # Obsolete; use --without-fp.
313 with_fp=no ;;
315 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
316 | --no-cr | --no-c)
317 no_create=yes ;;
319 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
320 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
321 no_recursion=yes ;;
323 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
324 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
325 | --oldin | --oldi | --old | --ol | --o)
326 ac_prev=oldincludedir ;;
327 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
328 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
329 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
330 oldincludedir="$ac_optarg" ;;
332 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
333 ac_prev=prefix ;;
334 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
335 prefix="$ac_optarg" ;;
337 -program-prefix | --program-prefix | --program-prefi | --program-pref \
338 | --program-pre | --program-pr | --program-p)
339 ac_prev=program_prefix ;;
340 -program-prefix=* | --program-prefix=* | --program-prefi=* \
341 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
342 program_prefix="$ac_optarg" ;;
344 -program-suffix | --program-suffix | --program-suffi | --program-suff \
345 | --program-suf | --program-su | --program-s)
346 ac_prev=program_suffix ;;
347 -program-suffix=* | --program-suffix=* | --program-suffi=* \
348 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
349 program_suffix="$ac_optarg" ;;
351 -program-transform-name | --program-transform-name \
352 | --program-transform-nam | --program-transform-na \
353 | --program-transform-n | --program-transform- \
354 | --program-transform | --program-transfor \
355 | --program-transfo | --program-transf \
356 | --program-trans | --program-tran \
357 | --progr-tra | --program-tr | --program-t)
358 ac_prev=program_transform_name ;;
359 -program-transform-name=* | --program-transform-name=* \
360 | --program-transform-nam=* | --program-transform-na=* \
361 | --program-transform-n=* | --program-transform-=* \
362 | --program-transform=* | --program-transfor=* \
363 | --program-transfo=* | --program-transf=* \
364 | --program-trans=* | --program-tran=* \
365 | --progr-tra=* | --program-tr=* | --program-t=*)
366 program_transform_name="$ac_optarg" ;;
368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
369 | -silent | --silent | --silen | --sile | --sil)
370 silent=yes ;;
372 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
373 ac_prev=sbindir ;;
374 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
375 | --sbi=* | --sb=*)
376 sbindir="$ac_optarg" ;;
378 -sharedstatedir | --sharedstatedir | --sharedstatedi \
379 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
380 | --sharedst | --shareds | --shared | --share | --shar \
381 | --sha | --sh)
382 ac_prev=sharedstatedir ;;
383 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
384 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
385 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
386 | --sha=* | --sh=*)
387 sharedstatedir="$ac_optarg" ;;
389 -site | --site | --sit)
390 ac_prev=site ;;
391 -site=* | --site=* | --sit=*)
392 site="$ac_optarg" ;;
394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
395 ac_prev=srcdir ;;
396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
397 srcdir="$ac_optarg" ;;
399 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
400 | --syscon | --sysco | --sysc | --sys | --sy)
401 ac_prev=sysconfdir ;;
402 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
403 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
404 sysconfdir="$ac_optarg" ;;
406 -target | --target | --targe | --targ | --tar | --ta | --t)
407 ac_prev=target ;;
408 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
409 target="$ac_optarg" ;;
411 -v | -verbose | --verbose | --verbos | --verbo | --verb)
412 verbose=yes ;;
414 -version | --version | --versio | --versi | --vers)
415 echo "configure generated by autoconf version 2.13"
416 exit 0 ;;
418 -with-* | --with-*)
419 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 case "$ac_option" in
426 *=*) ;;
427 *) ac_optarg=yes ;;
428 esac
429 eval "with_${ac_package}='$ac_optarg'" ;;
431 -without-* | --without-*)
432 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 eval "with_${ac_package}=no" ;;
440 --x)
441 # Obsolete; use --with-x.
442 with_x=yes ;;
444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
445 | --x-incl | --x-inc | --x-in | --x-i)
446 ac_prev=x_includes ;;
447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
449 x_includes="$ac_optarg" ;;
451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
453 ac_prev=x_libraries ;;
454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
456 x_libraries="$ac_optarg" ;;
458 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
462 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
463 echo "configure: warning: $ac_option: invalid host type" 1>&2
465 if test "x$nonopt" != xNONE; then
466 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
468 nonopt="$ac_option"
471 esac
472 done
474 if test -n "$ac_prev"; then
475 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
480 # File descriptor usage:
481 # 0 standard input
482 # 1 file creation
483 # 2 errors and warnings
484 # 3 some systems may open it to /dev/tty
485 # 4 used on the Kubota Titan
486 # 6 checking for... messages and results
487 # 5 compiler messages saved in config.log
488 if test "$silent" = yes; then
489 exec 6>/dev/null
490 else
491 exec 6>&1
493 exec 5>./config.log
495 echo "\
496 This file contains any messages produced by compilers while
497 running configure, to aid debugging if configure makes a mistake.
498 " 1>&5
500 # Strip out --no-create and --no-recursion so they do not pile up.
501 # Also quote any args containing shell metacharacters.
502 ac_configure_args=
503 for ac_arg
505 case "$ac_arg" in
506 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
507 | --no-cr | --no-c) ;;
508 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
509 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
510 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
511 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
512 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
513 esac
514 done
516 # NLS nuisances.
517 # Only set these to C if already set. These must not be set unconditionally
518 # because not all systems understand e.g. LANG=C (notably SCO).
519 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
520 # Non-C LC_CTYPE values break the ctype check.
521 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
522 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
523 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
524 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
526 # confdefs.h avoids OS command line length limits that DEFS can exceed.
527 rm -rf conftest* confdefs.h
528 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
529 echo > confdefs.h
531 # A filename unique to this package, relative to the directory that
532 # configure is in, which we can look for to find out if srcdir is correct.
533 ac_unique_file=tree.c
535 # Find the source files, if location was not specified.
536 if test -z "$srcdir"; then
537 ac_srcdir_defaulted=yes
538 # Try the directory containing this script, then its parent.
539 ac_prog=$0
540 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
541 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
542 srcdir=$ac_confdir
543 if test ! -r $srcdir/$ac_unique_file; then
544 srcdir=..
546 else
547 ac_srcdir_defaulted=no
549 if test ! -r $srcdir/$ac_unique_file; then
550 if test "$ac_srcdir_defaulted" = yes; then
551 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
552 else
553 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
558 # Prefer explicitly selected file to automatically selected ones.
559 if test -z "$CONFIG_SITE"; then
560 if test "x$prefix" != xNONE; then
561 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
562 else
563 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566 for ac_site_file in $CONFIG_SITE; do
567 if test -r "$ac_site_file"; then
568 echo "loading site script $ac_site_file"
569 . "$ac_site_file"
571 done
573 if test -r "$cache_file"; then
574 echo "loading cache $cache_file"
575 . $cache_file
576 else
577 echo "creating cache $cache_file"
578 > $cache_file
581 ac_ext=c
582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
583 ac_cpp='$CPP $CPPFLAGS'
584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
586 cross_compiling=$ac_cv_prog_cc_cross
588 ac_exeext=
589 ac_objext=o
590 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
591 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
592 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
593 ac_n= ac_c='
594 ' ac_t=' '
595 else
596 ac_n=-n ac_c= ac_t=
598 else
599 ac_n= ac_c='\c' ac_t=
605 remove=rm
606 hard_link=ln
607 symbolic_link='ln -s'
608 copy=cp
610 # Check for bogus environment variables.
611 # Test if LIBRARY_PATH contains the notation for the current directory
612 # since this would lead to problems installing/building glibc.
613 # LIBRARY_PATH contains the current directory if one of the following
614 # is true:
615 # - one of the terminals (":" and ";") is the first or last sign
616 # - two terminals occur directly after each other
617 # - the path contains an element with a dot in it
618 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
619 echo "configure:620: checking LIBRARY_PATH variable" >&5
620 case ${LIBRARY_PATH} in
621 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
622 library_path_setting="contains current directory"
625 library_path_setting="ok"
627 esac
628 echo "$ac_t""$library_path_setting" 1>&6
629 if test "$library_path_setting" != "ok"; then
630 { echo "configure: error:
631 *** LIBRARY_PATH shouldn't contain the current directory when
632 *** building gcc. Please change the environment variable
633 *** and run configure again." 1>&2; exit 1; }
636 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
637 # since this would lead to problems installing/building glibc.
638 # GCC_EXEC_PREFIX contains the current directory if one of the following
639 # is true:
640 # - one of the terminals (":" and ";") is the first or last sign
641 # - two terminals occur directly after each other
642 # - the path contains an element with a dot in it
643 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
644 echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5
645 case ${GCC_EXEC_PREFIX} in
646 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
647 gcc_exec_prefix_setting="contains current directory"
650 gcc_exec_prefix_setting="ok"
652 esac
653 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
654 if test "$gcc_exec_prefix_setting" != "ok"; then
655 { echo "configure: error:
656 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
657 *** building gcc. Please change the environment variable
658 *** and run configure again." 1>&2; exit 1; }
661 # Check for additional parameters
663 # With GNU ld
664 # Check whether --with-gnu-ld or --without-gnu-ld was given.
665 if test "${with_gnu_ld+set}" = set; then
666 withval="$with_gnu_ld"
667 gnu_ld_flag="$with_gnu_ld"
668 else
669 gnu_ld_flag=no
673 # With pre-defined ld
674 # Check whether --with-ld or --without-ld was given.
675 if test "${with_ld+set}" = set; then
676 withval="$with_ld"
677 DEFAULT_LINKER="$with_ld"
680 if test x"${DEFAULT_LINKER+set}" = x"set"; then
681 if test ! -x "$DEFAULT_LINKER"; then
682 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
683 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
684 gnu_ld_flag=yes
686 cat >> confdefs.h <<EOF
687 #define DEFAULT_LINKER "$DEFAULT_LINKER"
692 # With GNU as
693 # Check whether --with-gnu-as or --without-gnu-as was given.
694 if test "${with_gnu_as+set}" = set; then
695 withval="$with_gnu_as"
696 gas_flag="$with_gnu_as"
697 else
698 gas_flag=no
702 # Check whether --with-as or --without-as was given.
703 if test "${with_as+set}" = set; then
704 withval="$with_as"
705 DEFAULT_ASSEMBLER="$with_as"
708 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
709 if test ! -x "$DEFAULT_ASSEMBLER"; then
710 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
711 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
712 gas_flag=yes
714 cat >> confdefs.h <<EOF
715 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
720 # With stabs
721 # Check whether --with-stabs or --without-stabs was given.
722 if test "${with_stabs+set}" = set; then
723 withval="$with_stabs"
724 stabs="$with_stabs"
725 else
726 stabs=no
730 # With ELF
731 # Check whether --with-elf or --without-elf was given.
732 if test "${with_elf+set}" = set; then
733 withval="$with_elf"
734 elf="$with_elf"
735 else
736 elf=no
740 # Specify the local prefix
741 local_prefix=
742 # Check whether --with-local-prefix or --without-local-prefix was given.
743 if test "${with_local_prefix+set}" = set; then
744 withval="$with_local_prefix"
745 case "${withval}" in
746 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
747 no) ;;
748 *) local_prefix=$with_local_prefix ;;
749 esac
753 # Default local prefix if it is empty
754 if test x$local_prefix = x; then
755 local_prefix=/usr/local
758 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
759 # passed in by the toplevel make and thus we'd get different behavior
760 # depending on where we built the sources.
761 gcc_gxx_include_dir=
762 # Specify the g++ header file directory
763 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
764 if test "${with_gxx_include_dir+set}" = set; then
765 withval="$with_gxx_include_dir"
766 case "${withval}" in
767 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
768 no) ;;
769 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
770 esac
774 if test x${gcc_gxx_include_dir} = x; then
775 if test x${enable_version_specific_runtime_libs} = xyes; then
776 gcc_gxx_include_dir='${libsubdir}/include/g++'
777 else
778 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
779 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
783 # Determine whether or not multilibs are enabled.
784 # Check whether --enable-multilib or --disable-multilib was given.
785 if test "${enable_multilib+set}" = set; then
786 enableval="$enable_multilib"
788 else
789 enable_multilib=yes
794 # Enable expensive internal checks
795 # Check whether --enable-checking or --disable-checking was given.
796 if test "${enable_checking+set}" = set; then
797 enableval="$enable_checking"
798 ac_checking=
799 ac_tree_checking=
800 ac_rtl_checking=
801 ac_rtlflag_checking=
802 ac_gc_checking=
803 ac_gc_always_collect=
804 case "${enableval}" in
805 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
806 ac_rtlflag_checking=1 ;;
807 no) ;;
808 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
809 set fnord $enableval; shift
810 IFS="$ac_save_IFS"
811 for check
813 case $check in
814 misc) ac_checking=1 ;;
815 tree) ac_tree_checking=1 ;;
816 rtlflag) ac_rtlflag_checking=1 ;;
817 rtl) ac_rtl_checking=1 ;;
818 gc) ac_gc_checking=1 ;;
819 gcac) ac_gc_always_collect=1 ;;
820 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
821 esac
822 done
824 esac
826 else
827 # Enable some checks by default for development versions of GCC
828 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
831 if test x$ac_checking != x ; then
832 cat >> confdefs.h <<\EOF
833 #define ENABLE_CHECKING 1
837 if test x$ac_tree_checking != x ; then
838 cat >> confdefs.h <<\EOF
839 #define ENABLE_TREE_CHECKING 1
843 if test x$ac_rtl_checking != x ; then
844 cat >> confdefs.h <<\EOF
845 #define ENABLE_RTL_CHECKING 1
849 if test x$ac_rtlflag_checking != x ; then
850 cat >> confdefs.h <<\EOF
851 #define ENABLE_RTL_FLAG_CHECKING 1
855 if test x$ac_gc_checking != x ; then
856 cat >> confdefs.h <<\EOF
857 #define ENABLE_GC_CHECKING 1
861 if test x$ac_gc_always_collect != x ; then
862 cat >> confdefs.h <<\EOF
863 #define ENABLE_GC_ALWAYS_COLLECT 1
869 # Check whether --enable-cpp or --disable-cpp was given.
870 if test "${enable_cpp+set}" = set; then
871 enableval="$enable_cpp"
873 else
874 enable_cpp=yes
878 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
879 if test "${with_cpp_install_dir+set}" = set; then
880 withval="$with_cpp_install_dir"
881 if test x$withval = xyes; then
882 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
883 elif test x$withval != xno; then
884 cpp_install_dir=$withval
889 # Enable Multibyte Characters for C/C++
890 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
891 if test "${enable_c_mbchar+set}" = set; then
892 enableval="$enable_c_mbchar"
893 if test x$enable_c_mbchar != xno; then
894 cat >> confdefs.h <<\EOF
895 #define MULTIBYTE_CHARS 1
902 # Enable threads
903 # Pass with no value to take the default
904 # Pass with a value to specify a thread package
905 # Check whether --enable-threads or --disable-threads was given.
906 if test "${enable_threads+set}" = set; then
907 enableval="$enable_threads"
909 else
910 enable_threads=''
914 enable_threads_flag=$enable_threads
915 # Check if a valid thread package
916 case x${enable_threads_flag} in
917 x | xno)
918 # No threads
919 target_thread_file='single'
921 xyes)
922 # default
923 target_thread_file=''
925 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
926 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
927 target_thread_file=$enable_threads_flag
930 echo "$enable_threads is an unknown thread package" 1>&2
931 exit 1
933 esac
935 # Check whether --enable-objc-gc or --disable-objc-gc was given.
936 if test "${enable_objc_gc+set}" = set; then
937 enableval="$enable_objc_gc"
938 if test x$enable_objc_gc = xno; then
939 objc_boehm_gc=''
940 else
941 objc_boehm_gc=1
943 else
944 objc_boehm_gc=''
948 # Check whether --with-dwarf2 or --without-dwarf2 was given.
949 if test "${with_dwarf2+set}" = set; then
950 withval="$with_dwarf2"
951 dwarf2="$with_dwarf2"
952 else
953 dwarf2=no
957 # Check whether --enable-shared or --disable-shared was given.
958 if test "${enable_shared+set}" = set; then
959 enableval="$enable_shared"
961 case $enable_shared in
962 yes | no) ;;
964 enable_shared=no
965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
966 for pkg in $enableval; do
967 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
968 enable_shared=yes
970 done
971 IFS="$ac_save_ifs"
973 esac
975 else
976 enable_shared=yes
981 # Determine the host, build, and target systems
982 ac_aux_dir=
983 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
984 if test -f $ac_dir/install-sh; then
985 ac_aux_dir=$ac_dir
986 ac_install_sh="$ac_aux_dir/install-sh -c"
987 break
988 elif test -f $ac_dir/install.sh; then
989 ac_aux_dir=$ac_dir
990 ac_install_sh="$ac_aux_dir/install.sh -c"
991 break
993 done
994 if test -z "$ac_aux_dir"; then
995 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
997 ac_config_guess=$ac_aux_dir/config.guess
998 ac_config_sub=$ac_aux_dir/config.sub
999 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1002 # Do some error checking and defaulting for the host and target type.
1003 # The inputs are:
1004 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1006 # The rules are:
1007 # 1. You are not allowed to specify --host, --target, and nonopt at the
1008 # same time.
1009 # 2. Host defaults to nonopt.
1010 # 3. If nonopt is not specified, then host defaults to the current host,
1011 # as determined by config.guess.
1012 # 4. Target and build default to nonopt.
1013 # 5. If nonopt is not specified, then target and build default to host.
1015 # The aliases save the names the user supplied, while $host etc.
1016 # will get canonicalized.
1017 case $host---$target---$nonopt in
1018 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1019 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1020 esac
1023 # Make sure we can run config.sub.
1024 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1025 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1028 echo $ac_n "checking host system type""... $ac_c" 1>&6
1029 echo "configure:1030: checking host system type" >&5
1031 host_alias=$host
1032 case "$host_alias" in
1033 NONE)
1034 case $nonopt in
1035 NONE)
1036 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1037 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1038 fi ;;
1039 *) host_alias=$nonopt ;;
1040 esac ;;
1041 esac
1043 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1044 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1045 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1046 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1047 echo "$ac_t""$host" 1>&6
1049 echo $ac_n "checking target system type""... $ac_c" 1>&6
1050 echo "configure:1051: checking target system type" >&5
1052 target_alias=$target
1053 case "$target_alias" in
1054 NONE)
1055 case $nonopt in
1056 NONE) target_alias=$host_alias ;;
1057 *) target_alias=$nonopt ;;
1058 esac ;;
1059 esac
1061 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1062 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1063 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1064 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1065 echo "$ac_t""$target" 1>&6
1067 echo $ac_n "checking build system type""... $ac_c" 1>&6
1068 echo "configure:1069: checking build system type" >&5
1070 build_alias=$build
1071 case "$build_alias" in
1072 NONE)
1073 case $nonopt in
1074 NONE) build_alias=$host_alias ;;
1075 *) build_alias=$nonopt ;;
1076 esac ;;
1077 esac
1079 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1080 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1081 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1082 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1083 echo "$ac_t""$build" 1>&6
1085 test "$host_alias" != "$target_alias" &&
1086 test "$program_prefix$program_suffix$program_transform_name" = \
1087 NONENONEs,x,x, &&
1088 program_prefix=${target_alias}-
1091 # Set program_transform_name
1092 if test "$program_transform_name" = s,x,x,; then
1093 program_transform_name=
1094 else
1095 # Double any \ or $. echo might interpret backslashes.
1096 cat <<\EOF_SED > conftestsed
1097 s,\\,\\\\,g; s,\$,$$,g
1098 EOF_SED
1099 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1100 rm -f conftestsed
1102 test "$program_prefix" != NONE &&
1103 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1104 # Use a double $ so make ignores it.
1105 test "$program_suffix" != NONE &&
1106 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1108 # sed with no file args requires a program.
1109 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1112 # Find the native compiler
1113 # Extract the first word of "gcc", so it can be a program name with args.
1114 set dummy gcc; ac_word=$2
1115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1116 echo "configure:1117: checking for $ac_word" >&5
1117 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1118 echo $ac_n "(cached) $ac_c" 1>&6
1119 else
1120 if test -n "$CC"; then
1121 ac_cv_prog_CC="$CC" # Let the user override the test.
1122 else
1123 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1124 ac_dummy="$PATH"
1125 for ac_dir in $ac_dummy; do
1126 test -z "$ac_dir" && ac_dir=.
1127 if test -f $ac_dir/$ac_word; then
1128 ac_cv_prog_CC="gcc"
1129 break
1131 done
1132 IFS="$ac_save_ifs"
1135 CC="$ac_cv_prog_CC"
1136 if test -n "$CC"; then
1137 echo "$ac_t""$CC" 1>&6
1138 else
1139 echo "$ac_t""no" 1>&6
1142 if test -z "$CC"; then
1143 # Extract the first word of "cc", so it can be a program name with args.
1144 set dummy cc; ac_word=$2
1145 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1146 echo "configure:1147: checking for $ac_word" >&5
1147 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1148 echo $ac_n "(cached) $ac_c" 1>&6
1149 else
1150 if test -n "$CC"; then
1151 ac_cv_prog_CC="$CC" # Let the user override the test.
1152 else
1153 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1154 ac_prog_rejected=no
1155 ac_dummy="$PATH"
1156 for ac_dir in $ac_dummy; do
1157 test -z "$ac_dir" && ac_dir=.
1158 if test -f $ac_dir/$ac_word; then
1159 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1160 ac_prog_rejected=yes
1161 continue
1163 ac_cv_prog_CC="cc"
1164 break
1166 done
1167 IFS="$ac_save_ifs"
1168 if test $ac_prog_rejected = yes; then
1169 # We found a bogon in the path, so make sure we never use it.
1170 set dummy $ac_cv_prog_CC
1171 shift
1172 if test $# -gt 0; then
1173 # We chose a different compiler from the bogus one.
1174 # However, it has the same basename, so the bogon will be chosen
1175 # first if we set CC to just the basename; use the full file name.
1176 shift
1177 set dummy "$ac_dir/$ac_word" "$@"
1178 shift
1179 ac_cv_prog_CC="$@"
1184 CC="$ac_cv_prog_CC"
1185 if test -n "$CC"; then
1186 echo "$ac_t""$CC" 1>&6
1187 else
1188 echo "$ac_t""no" 1>&6
1191 if test -z "$CC"; then
1192 case "`uname -s`" in
1193 *win32* | *WIN32*)
1194 # Extract the first word of "cl", so it can be a program name with args.
1195 set dummy cl; ac_word=$2
1196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1197 echo "configure:1198: checking for $ac_word" >&5
1198 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201 if test -n "$CC"; then
1202 ac_cv_prog_CC="$CC" # Let the user override the test.
1203 else
1204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1205 ac_dummy="$PATH"
1206 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 if test -f $ac_dir/$ac_word; then
1209 ac_cv_prog_CC="cl"
1210 break
1212 done
1213 IFS="$ac_save_ifs"
1216 CC="$ac_cv_prog_CC"
1217 if test -n "$CC"; then
1218 echo "$ac_t""$CC" 1>&6
1219 else
1220 echo "$ac_t""no" 1>&6
1223 esac
1225 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1228 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1229 echo "configure:1230: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1231 ac_ext=c
1232 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1233 ac_cpp='$CPP $CPPFLAGS'
1234 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1235 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1236 cross_compiling=$ac_cv_prog_cc_cross
1238 cat > conftest.$ac_ext << EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1243 main(){return(0);}
1245 if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1246 ac_cv_prog_cc_works=yes
1247 # If we can't run a trivial program, we are probably using a cross compiler.
1248 if (./conftest; exit) 2>/dev/null; then
1249 ac_cv_prog_cc_cross=no
1250 else
1251 ac_cv_prog_cc_cross=yes
1253 else
1254 echo "configure: failed program was:" >&5
1255 cat conftest.$ac_ext >&5
1256 ac_cv_prog_cc_works=no
1258 rm -fr conftest*
1259 ac_ext=c
1260 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1261 ac_cpp='$CPP $CPPFLAGS'
1262 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1263 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1264 cross_compiling=$ac_cv_prog_cc_cross
1266 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1267 if test $ac_cv_prog_cc_works = no; then
1268 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1270 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1271 echo "configure:1272: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1272 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1273 cross_compiling=$ac_cv_prog_cc_cross
1275 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1276 echo "configure:1277: checking whether we are using GNU C" >&5
1277 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279 else
1280 cat > conftest.c <<EOF
1281 #ifdef __GNUC__
1282 yes;
1283 #endif
1285 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1286 ac_cv_prog_gcc=yes
1287 else
1288 ac_cv_prog_gcc=no
1292 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1294 if test $ac_cv_prog_gcc = yes; then
1295 GCC=yes
1296 else
1297 GCC=
1300 ac_test_CFLAGS="${CFLAGS+set}"
1301 ac_save_CFLAGS="$CFLAGS"
1302 CFLAGS=
1303 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1304 echo "configure:1305: checking whether ${CC-cc} accepts -g" >&5
1305 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308 echo 'void f(){}' > conftest.c
1309 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1310 ac_cv_prog_cc_g=yes
1311 else
1312 ac_cv_prog_cc_g=no
1314 rm -f conftest*
1318 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1319 if test "$ac_test_CFLAGS" = set; then
1320 CFLAGS="$ac_save_CFLAGS"
1321 elif test $ac_cv_prog_cc_g = yes; then
1322 if test "$GCC" = yes; then
1323 CFLAGS="-g -O2"
1324 else
1325 CFLAGS="-g"
1327 else
1328 if test "$GCC" = yes; then
1329 CFLAGS="-O2"
1330 else
1331 CFLAGS=
1335 if test "x$CC" != xcc; then
1336 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1337 echo "configure:1338: checking whether $CC and cc understand -c and -o together" >&5
1338 else
1339 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1340 echo "configure:1341: checking whether cc understands -c and -o together" >&5
1342 set dummy $CC; ac_cc="`echo $2 |
1343 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1344 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1346 else
1347 echo 'foo(){}' > conftest.c
1348 # Make sure it works both with $CC and with simple cc.
1349 # We do the test twice because some compilers refuse to overwrite an
1350 # existing .o file with -o, though they will create one.
1351 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1352 if { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1353 test -f conftest.o && { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1354 then
1355 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1356 if test "x$CC" != xcc; then
1357 # Test first that cc exists at all.
1358 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1359 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1360 if { (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1361 test -f conftest.o && { (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1362 then
1363 # cc works too.
1365 else
1366 # cc exists but doesn't like -o.
1367 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1371 else
1372 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1374 rm -f conftest*
1377 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1378 echo "$ac_t""yes" 1>&6
1379 else
1380 echo "$ac_t""no" 1>&6
1381 cat >> confdefs.h <<\EOF
1382 #define NO_MINUS_C_MINUS_O 1
1387 # autoconf is lame and doesn't give us any substitution variable for this.
1388 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1389 NO_MINUS_C_MINUS_O=yes
1390 else
1391 OUTPUT_OPTION='-o $@'
1396 # See if GNAT has been installed
1397 if test $host != $build; then
1398 ac_tool_prefix=${host_alias}-
1399 else
1400 ac_tool_prefix=
1404 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1405 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1407 echo "configure:1408: checking for $ac_word" >&5
1408 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1409 echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411 if test -n "$GNATBIND"; then
1412 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1413 else
1414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1415 ac_dummy="$PATH"
1416 for ac_dir in $ac_dummy; do
1417 test -z "$ac_dir" && ac_dir=.
1418 if test -f $ac_dir/$ac_word; then
1419 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1420 break
1422 done
1423 IFS="$ac_save_ifs"
1426 GNATBIND="$ac_cv_prog_GNATBIND"
1427 if test -n "$GNATBIND"; then
1428 echo "$ac_t""$GNATBIND" 1>&6
1429 else
1430 echo "$ac_t""no" 1>&6
1434 if test -z "$ac_cv_prog_GNATBIND"; then
1435 if test -n "$ac_tool_prefix"; then
1436 # Extract the first word of "gnatbind", so it can be a program name with args.
1437 set dummy gnatbind; ac_word=$2
1438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1439 echo "configure:1440: checking for $ac_word" >&5
1440 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1441 echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443 if test -n "$GNATBIND"; then
1444 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1445 else
1446 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1447 ac_dummy="$PATH"
1448 for ac_dir in $ac_dummy; do
1449 test -z "$ac_dir" && ac_dir=.
1450 if test -f $ac_dir/$ac_word; then
1451 ac_cv_prog_GNATBIND="gnatbind"
1452 break
1454 done
1455 IFS="$ac_save_ifs"
1456 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1459 GNATBIND="$ac_cv_prog_GNATBIND"
1460 if test -n "$GNATBIND"; then
1461 echo "$ac_t""$GNATBIND" 1>&6
1462 else
1463 echo "$ac_t""no" 1>&6
1466 else
1467 GNATBIND="no"
1471 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1472 echo "configure:1473: checking for compiler driver that understands Ada" >&5
1473 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476 cat >conftest.adb <<EOF
1477 procedure conftest is begin null; end conftest;
1479 gcc_cv_prog_adac=no
1480 # Have to do ac_tool_prefix and user overrides by hand.
1481 user_adac=$ADAC
1482 user_cc=$CC
1483 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1484 ${ac_tool_prefix}$user_cc $user_cc \
1485 ${ac_tool_prefix}gcc gcc \
1486 ${ac_tool_prefix}cc cc \
1487 ${ac_tool_prefix}gnatgcc gnatgcc \
1488 ${ac_tool_prefix}gnatcc gnatcc \
1489 ${ac_tool_prefix}adagcc adagcc \
1490 ${ac_tool_prefix}adacc adacc ; do
1491 # There is a bug in all released versions of GCC which causes the
1492 # driver to exit successfully when the appropriate language module
1493 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1494 # Therefore we must check for the error message as well as an
1495 # unsuccessful exit.
1496 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1497 if test x"$errors" = x; then
1498 gcc_cv_prog_adac=$cand
1499 break
1501 done
1502 rm -f conftest.*
1505 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1506 ADAC=$gcc_cv_prog_adac
1509 if test x$GNATBIND != xno && test x$ADAC != xno; then
1510 have_gnat=yes
1511 else
1512 have_gnat=no
1516 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1517 echo "configure:1518: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1518 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1519 echo $ac_n "(cached) $ac_c" 1>&6
1520 else
1521 save_CFLAGS="$CFLAGS"
1522 CFLAGS="-Wno-long-long"
1523 cat > conftest.$ac_ext <<EOF
1524 #line 1525 "configure"
1525 #include "confdefs.h"
1527 int main() {
1529 ; return 0; }
1531 if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1532 rm -rf conftest*
1533 ac_cv_prog_cc_no_long_long=yes
1534 else
1535 echo "configure: failed program was:" >&5
1536 cat conftest.$ac_ext >&5
1537 rm -rf conftest*
1538 ac_cv_prog_cc_no_long_long=no
1540 rm -f conftest*
1541 CFLAGS="$save_CFLAGS"
1544 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1546 if test x$have_gnat != xno ; then
1547 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1548 echo "configure:1549: checking whether ${ADAC} accepts -Wno-long-long" >&5
1549 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552 cat >conftest.adb <<EOF
1553 procedure conftest is begin null; end conftest;
1555 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1556 ac_cv_prog_adac_no_long_long=yes
1557 else
1558 ac_cv_prog_adac_no_long_long=no
1560 rm -f conftest*
1563 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1564 else
1565 ac_cv_prog_adac_no_long_long=yes
1568 strict1_warn=
1569 if test $ac_cv_prog_cc_no_long_long = yes && \
1570 test $ac_cv_prog_adac_no_long_long = yes ; then
1571 strict1_warn="-pedantic -Wno-long-long"
1575 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1576 echo "configure:1577: checking how to run the C preprocessor" >&5
1577 # On Suns, sometimes $CPP names a directory.
1578 if test -n "$CPP" && test -d "$CPP"; then
1579 CPP=
1581 if test -z "$CPP"; then
1582 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1583 echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585 # This must be in double quotes, not single quotes, because CPP may get
1586 # substituted into the Makefile and "${CC-cc}" will confuse make.
1587 CPP="${CC-cc} -E"
1588 # On the NeXT, cc -E runs the code through the compiler's parser,
1589 # not just through cpp.
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1592 "configure"
1592 #include "confdefs.h"
1593 #include <assert.h>
1594 Syntax Error
1596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1597 { (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1599 if test -z "$ac_err"; then
1601 else
1602 echo "$ac_err" >&5
1603 echo "configure: failed program was:" >&5
1604 cat conftest.$ac_ext >&5
1605 rm -rf conftest*
1606 CPP="${CC-cc} -E -traditional-cpp"
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <assert.h>
1611 Syntax Error
1613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1614 { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1616 if test -z "$ac_err"; then
1618 else
1619 echo "$ac_err" >&5
1620 echo "configure: failed program was:" >&5
1621 cat conftest.$ac_ext >&5
1622 rm -rf conftest*
1623 CPP="${CC-cc} -nologo -E"
1624 cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 #include <assert.h>
1628 Syntax Error
1630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1631 { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1633 if test -z "$ac_err"; then
1635 else
1636 echo "$ac_err" >&5
1637 echo "configure: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 rm -rf conftest*
1640 CPP=/lib/cpp
1642 rm -f conftest*
1644 rm -f conftest*
1646 rm -f conftest*
1647 ac_cv_prog_CPP="$CPP"
1649 CPP="$ac_cv_prog_CPP"
1650 else
1651 ac_cv_prog_CPP="$CPP"
1653 echo "$ac_t""$CPP" 1>&6
1655 echo $ac_n "checking for inline""... $ac_c" 1>&6
1656 echo "configure:1657: checking for inline" >&5
1657 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1658 echo $ac_n "(cached) $ac_c" 1>&6
1659 else
1660 ac_cv_c_inline=no
1661 for ac_kw in inline __inline__ __inline; do
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1666 int main() {
1667 } $ac_kw foo() {
1668 ; return 0; }
1670 if { (eval echo configure:1671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1671 rm -rf conftest*
1672 ac_cv_c_inline=$ac_kw; break
1673 else
1674 echo "configure: failed program was:" >&5
1675 cat conftest.$ac_ext >&5
1677 rm -f conftest*
1678 done
1682 echo "$ac_t""$ac_cv_c_inline" 1>&6
1683 case "$ac_cv_c_inline" in
1684 inline | yes) ;;
1685 no) cat >> confdefs.h <<\EOF
1686 #define inline
1689 *) cat >> confdefs.h <<EOF
1690 #define inline $ac_cv_c_inline
1693 esac
1695 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1696 echo "configure:1697: checking for volatile" >&5
1697 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1698 echo $ac_n "(cached) $ac_c" 1>&6
1699 else
1700 cat > conftest.$ac_ext <<EOF
1701 #line 1702 "configure"
1702 #include "confdefs.h"
1704 int main() {
1705 volatile int foo;
1706 ; return 0; }
1708 if { (eval echo configure:1709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1709 rm -rf conftest*
1710 gcc_cv_c_volatile=yes
1711 else
1712 echo "configure: failed program was:" >&5
1713 cat conftest.$ac_ext >&5
1714 rm -rf conftest*
1715 gcc_cv_c_volatile=no
1717 rm -f conftest*
1720 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1721 if test $gcc_cv_c_volatile = yes ; then
1722 cat >> confdefs.h <<\EOF
1723 #define HAVE_VOLATILE 1
1729 echo $ac_n "checking for long double""... $ac_c" 1>&6
1730 echo "configure:1731: checking for long double" >&5
1731 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1733 else
1734 if test "$GCC" = yes; then
1735 gcc_cv_c_long_double=yes
1736 else
1737 cat > conftest.$ac_ext <<EOF
1738 #line 1739 "configure"
1739 #include "confdefs.h"
1741 int main() {
1742 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1743 long double foo = 0.0;
1744 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1745 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1746 ; return 0; }
1748 if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1749 rm -rf conftest*
1750 gcc_cv_c_long_double=yes
1751 else
1752 echo "configure: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 rm -rf conftest*
1755 gcc_cv_c_long_double=no
1757 rm -f conftest*
1761 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1762 if test $gcc_cv_c_long_double = yes; then
1763 cat >> confdefs.h <<\EOF
1764 #define HAVE_LONG_DOUBLE 1
1769 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1770 echo "configure:1771: checking for long long int" >&5
1771 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1772 echo $ac_n "(cached) $ac_c" 1>&6
1773 else
1774 cat > conftest.$ac_ext <<EOF
1775 #line 1776 "configure"
1776 #include "confdefs.h"
1778 int main() {
1779 long long int i;
1780 ; return 0; }
1782 if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1783 rm -rf conftest*
1784 ac_cv_c_long_long=yes
1785 else
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -rf conftest*
1789 ac_cv_c_long_long=no
1791 rm -f conftest*
1794 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1795 if test $ac_cv_c_long_long = yes; then
1796 cat >> confdefs.h <<\EOF
1797 #define HAVE_LONG_LONG 1
1801 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1802 echo "configure:1803: checking for __int64" >&5
1803 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1810 int main() {
1811 __int64 i;
1812 ; return 0; }
1814 if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1815 rm -rf conftest*
1816 ac_cv_c___int64=yes
1817 else
1818 echo "configure: failed program was:" >&5
1819 cat conftest.$ac_ext >&5
1820 rm -rf conftest*
1821 ac_cv_c___int64=no
1823 rm -f conftest*
1826 echo "$ac_t""$ac_cv_c___int64" 1>&6
1827 if test $ac_cv_c___int64 = yes; then
1828 cat >> confdefs.h <<\EOF
1829 #define HAVE___INT64 1
1834 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1835 echo "configure:1836: checking for built-in _Bool" >&5
1836 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1837 echo $ac_n "(cached) $ac_c" 1>&6
1838 else
1839 cat > conftest.$ac_ext <<EOF
1840 #line 1841 "configure"
1841 #include "confdefs.h"
1843 int main() {
1844 _Bool foo;
1845 ; return 0; }
1847 if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1848 rm -rf conftest*
1849 gcc_cv_c__bool=yes
1850 else
1851 echo "configure: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 rm -rf conftest*
1854 gcc_cv_c__bool=no
1856 rm -f conftest*
1860 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1861 if test $gcc_cv_c__bool = yes; then
1862 cat >> confdefs.h <<\EOF
1863 #define HAVE__BOOL 1
1869 # sizeof(char) is 1 by definition.
1870 echo $ac_n "checking size of short""... $ac_c" 1>&6
1871 echo "configure:1872: checking size of short" >&5
1872 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1873 echo $ac_n "(cached) $ac_c" 1>&6
1874 else
1875 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1876 cat > conftest.$ac_ext <<EOF
1877 #line 1878 "configure"
1878 #include "confdefs.h"
1879 #include "confdefs.h"
1880 #include <sys/types.h>
1883 int main() {
1884 switch (0) case 0: case (sizeof (short) == $ac_size):;
1885 ; return 0; }
1887 if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1888 rm -rf conftest*
1889 ac_cv_sizeof_short=$ac_size
1890 else
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1894 rm -f conftest*
1895 if test x$ac_cv_sizeof_short != x ; then break; fi
1896 done
1900 if test x$ac_cv_sizeof_short = x ; then
1901 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1903 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1904 cat >> confdefs.h <<EOF
1905 #define SIZEOF_SHORT $ac_cv_sizeof_short
1909 echo $ac_n "checking size of int""... $ac_c" 1>&6
1910 echo "configure:1911: checking size of int" >&5
1911 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1912 echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1915 cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include "confdefs.h"
1919 #include <sys/types.h>
1922 int main() {
1923 switch (0) case 0: case (sizeof (int) == $ac_size):;
1924 ; return 0; }
1926 if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1927 rm -rf conftest*
1928 ac_cv_sizeof_int=$ac_size
1929 else
1930 echo "configure: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1933 rm -f conftest*
1934 if test x$ac_cv_sizeof_int != x ; then break; fi
1935 done
1939 if test x$ac_cv_sizeof_int = x ; then
1940 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1942 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1943 cat >> confdefs.h <<EOF
1944 #define SIZEOF_INT $ac_cv_sizeof_int
1948 echo $ac_n "checking size of long""... $ac_c" 1>&6
1949 echo "configure:1950: checking size of long" >&5
1950 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1954 cat > conftest.$ac_ext <<EOF
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957 #include "confdefs.h"
1958 #include <sys/types.h>
1961 int main() {
1962 switch (0) case 0: case (sizeof (long) == $ac_size):;
1963 ; return 0; }
1965 if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1966 rm -rf conftest*
1967 ac_cv_sizeof_long=$ac_size
1968 else
1969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1972 rm -f conftest*
1973 if test x$ac_cv_sizeof_long != x ; then break; fi
1974 done
1978 if test x$ac_cv_sizeof_long = x ; then
1979 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1981 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1982 cat >> confdefs.h <<EOF
1983 #define SIZEOF_LONG $ac_cv_sizeof_long
1987 if test $ac_cv_c_long_long = yes; then
1988 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1989 echo "configure:1990: checking size of long long" >&5
1990 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1991 echo $ac_n "(cached) $ac_c" 1>&6
1992 else
1993 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1994 cat > conftest.$ac_ext <<EOF
1995 #line 1996 "configure"
1996 #include "confdefs.h"
1997 #include "confdefs.h"
1998 #include <sys/types.h>
2001 int main() {
2002 switch (0) case 0: case (sizeof (long long) == $ac_size):;
2003 ; return 0; }
2005 if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2006 rm -rf conftest*
2007 ac_cv_sizeof_long_long=$ac_size
2008 else
2009 echo "configure: failed program was:" >&5
2010 cat conftest.$ac_ext >&5
2012 rm -f conftest*
2013 if test x$ac_cv_sizeof_long_long != x ; then break; fi
2014 done
2018 if test x$ac_cv_sizeof_long_long = x ; then
2019 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
2021 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2022 cat >> confdefs.h <<EOF
2023 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2028 if test $ac_cv_c___int64 = yes; then
2029 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
2030 echo "configure:2031: checking size of __int64" >&5
2031 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
2033 else
2034 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
2035 cat > conftest.$ac_ext <<EOF
2036 #line 2037 "configure"
2037 #include "confdefs.h"
2038 #include "confdefs.h"
2039 #include <sys/types.h>
2042 int main() {
2043 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
2044 ; return 0; }
2046 if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2047 rm -rf conftest*
2048 ac_cv_sizeof___int64=$ac_size
2049 else
2050 echo "configure: failed program was:" >&5
2051 cat conftest.$ac_ext >&5
2053 rm -f conftest*
2054 if test x$ac_cv_sizeof___int64 != x ; then break; fi
2055 done
2059 if test x$ac_cv_sizeof___int64 = x ; then
2060 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
2062 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
2063 cat >> confdefs.h <<EOF
2064 #define SIZEOF___INT64 $ac_cv_sizeof___int64
2070 echo $ac_n "checking execution character set""... $ac_c" 1>&6
2071 echo "configure:2072: checking execution character set" >&5
2072 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
2073 echo $ac_n "(cached) $ac_c" 1>&6
2074 else
2075 cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
2079 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
2080 ASCII
2081 #endif
2083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2084 egrep "ASCII" >/dev/null 2>&1; then
2085 rm -rf conftest*
2086 ac_cv_c_charset=ASCII
2088 rm -f conftest*
2090 if test x${ac_cv_c_charset+set} != xset; then
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
2095 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
2096 EBCDIC
2097 #endif
2099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2100 egrep "EBCDIC" >/dev/null 2>&1; then
2101 rm -rf conftest*
2102 ac_cv_c_charset=EBCDIC
2104 rm -f conftest*
2107 if test x${ac_cv_c_charset+set} != xset; then
2108 ac_cv_c_charset=unknown
2112 echo "$ac_t""$ac_cv_c_charset" 1>&6
2113 if test $ac_cv_c_charset = unknown; then
2114 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
2115 elif test $ac_cv_c_charset = EBCDIC; then
2116 cat >> confdefs.h <<\EOF
2117 #define HOST_EBCDIC 1
2122 # If the native compiler is GCC, we can enable warnings even in stage1.
2123 # That's useful for people building cross-compilers, or just running a
2124 # quick `make'.
2125 warn_cflags=
2126 if test "x$GCC" = "xyes"; then
2127 warn_cflags='$(GCC_WARN_CFLAGS)'
2131 # Stage specific cflags for build.
2132 stage1_cflags=
2133 case $build in
2134 vax-*-*)
2135 if test x$GCC = xyes
2136 then
2137 stage1_cflags="-Wa,-J"
2138 else
2139 stage1_cflags="-J"
2142 powerpc-*-darwin*)
2143 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2144 # sources; use -no-cpp-precomp to get to GNU cpp.
2145 # Apple's GCC has bugs in designated initializer handling, so disable
2146 # that too.
2147 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2149 esac
2152 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2153 echo "configure:2154: checking whether ${MAKE-make} sets \${MAKE}" >&5
2154 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2155 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2156 echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158 cat > conftestmake <<\EOF
2159 all:
2160 @echo 'ac_maketemp="${MAKE}"'
2162 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2163 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2164 if test -n "$ac_maketemp"; then
2165 eval ac_cv_prog_make_${ac_make}_set=yes
2166 else
2167 eval ac_cv_prog_make_${ac_make}_set=no
2169 rm -f conftestmake
2171 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2172 echo "$ac_t""yes" 1>&6
2173 SET_MAKE=
2174 else
2175 echo "$ac_t""no" 1>&6
2176 SET_MAKE="MAKE=${MAKE-make}"
2180 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2181 echo "configure:2182: checking whether a default assembler was specified" >&5
2182 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2183 if test x"$gas_flag" = x"no"; then
2184 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2185 else
2186 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2188 else
2189 echo "$ac_t""no" 1>&6
2192 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2193 echo "configure:2194: checking whether a default linker was specified" >&5
2194 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2195 if test x"$gnu_ld_flag" = x"no"; then
2196 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2197 else
2198 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2200 else
2201 echo "$ac_t""no" 1>&6
2204 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2205 echo "configure:2206: checking for GNU C library" >&5
2206 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2208 else
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212 #include <features.h>
2213 int main() {
2215 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2216 #error Not a GNU C library system
2217 #endif
2218 ; return 0; }
2220 if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2221 rm -rf conftest*
2222 gcc_cv_glibc=yes
2223 else
2224 echo "configure: failed program was:" >&5
2225 cat conftest.$ac_ext >&5
2226 rm -rf conftest*
2227 gcc_cv_glibc=no
2229 rm -f conftest*
2232 echo "$ac_t""$gcc_cv_glibc" 1>&6
2233 if test $gcc_cv_glibc = yes; then
2234 cat >> confdefs.h <<\EOF
2235 #define _GNU_SOURCE 1
2240 # Find some useful tools
2241 for ac_prog in gawk mawk nawk awk
2243 # Extract the first word of "$ac_prog", so it can be a program name with args.
2244 set dummy $ac_prog; ac_word=$2
2245 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2246 echo "configure:2247: checking for $ac_word" >&5
2247 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2248 echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250 if test -n "$AWK"; then
2251 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2252 else
2253 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2254 ac_dummy="$PATH"
2255 for ac_dir in $ac_dummy; do
2256 test -z "$ac_dir" && ac_dir=.
2257 if test -f $ac_dir/$ac_word; then
2258 ac_cv_prog_AWK="$ac_prog"
2259 break
2261 done
2262 IFS="$ac_save_ifs"
2265 AWK="$ac_cv_prog_AWK"
2266 if test -n "$AWK"; then
2267 echo "$ac_t""$AWK" 1>&6
2268 else
2269 echo "$ac_t""no" 1>&6
2272 test -n "$AWK" && break
2273 done
2275 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2276 echo "configure:2277: checking whether ln works" >&5
2277 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2278 echo $ac_n "(cached) $ac_c" 1>&6
2279 else
2280 rm -f conftestdata_t
2281 echo >conftestdata_f
2282 if ln conftestdata_f conftestdata_t 2>/dev/null
2283 then
2284 gcc_cv_prog_LN="ln"
2285 else
2286 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2287 then
2288 gcc_cv_prog_LN="ln -s"
2289 else
2290 gcc_cv_prog_LN=cp
2293 rm -f conftestdata_f conftestdata_t
2296 LN="$gcc_cv_prog_LN"
2297 if test "$gcc_cv_prog_LN" = "ln"; then
2298 echo "$ac_t""yes" 1>&6
2299 else
2300 if test "$gcc_cv_prog_LN" = "ln -s"; then
2301 echo "$ac_t""no, using ln -s" 1>&6
2302 else
2303 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2307 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2308 echo "configure:2309: checking whether ln -s works" >&5
2309 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312 rm -f conftestdata_t
2313 echo >conftestdata_f
2314 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2315 then
2316 gcc_cv_prog_LN_S="ln -s"
2317 else
2318 if ln conftestdata_f conftestdata_t 2>/dev/null
2319 then
2320 gcc_cv_prog_LN_S=ln
2321 else
2322 gcc_cv_prog_LN_S=cp
2325 rm -f conftestdata_f conftestdata_t
2328 LN_S="$gcc_cv_prog_LN_S"
2329 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2330 echo "$ac_t""yes" 1>&6
2331 else
2332 if test "$gcc_cv_prog_LN_S" = "ln"; then
2333 echo "$ac_t""no, using ln" 1>&6
2334 else
2335 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2339 # Extract the first word of "ranlib", so it can be a program name with args.
2340 set dummy ranlib; ac_word=$2
2341 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2342 echo "configure:2343: checking for $ac_word" >&5
2343 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346 if test -n "$RANLIB"; then
2347 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2348 else
2349 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2350 ac_dummy="$PATH"
2351 for ac_dir in $ac_dummy; do
2352 test -z "$ac_dir" && ac_dir=.
2353 if test -f $ac_dir/$ac_word; then
2354 ac_cv_prog_RANLIB="ranlib"
2355 break
2357 done
2358 IFS="$ac_save_ifs"
2359 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2362 RANLIB="$ac_cv_prog_RANLIB"
2363 if test -n "$RANLIB"; then
2364 echo "$ac_t""$RANLIB" 1>&6
2365 else
2366 echo "$ac_t""no" 1>&6
2369 # Find a good install program. We prefer a C program (faster),
2370 # so one script is as good as another. But avoid the broken or
2371 # incompatible versions:
2372 # SysV /etc/install, /usr/sbin/install
2373 # SunOS /usr/etc/install
2374 # IRIX /sbin/install
2375 # AIX /bin/install
2376 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2377 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2378 # ./install, which can be erroneously created by make from ./install.sh.
2379 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2380 echo "configure:2381: checking for a BSD compatible install" >&5
2381 if test -z "$INSTALL"; then
2382 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2386 for ac_dir in $PATH; do
2387 # Account for people who put trailing slashes in PATH elements.
2388 case "$ac_dir/" in
2389 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2391 # OSF1 and SCO ODT 3.0 have their own names for install.
2392 for ac_prog in ginstall scoinst install; do
2393 if test -f $ac_dir/$ac_prog; then
2394 if test $ac_prog = install &&
2395 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2396 # AIX install. It has an incompatible calling convention.
2397 # OSF/1 installbsd also uses dspmsg, but is usable.
2399 else
2400 ac_cv_path_install="$ac_dir/$ac_prog -c"
2401 break 2
2404 done
2406 esac
2407 done
2408 IFS="$ac_save_IFS"
2411 if test "${ac_cv_path_install+set}" = set; then
2412 INSTALL="$ac_cv_path_install"
2413 else
2414 # As a last resort, use the slow shell script. We don't cache a
2415 # path for INSTALL within a source directory, because that will
2416 # break other packages using the cache if that directory is
2417 # removed, or if the path is relative.
2418 INSTALL="$ac_install_sh"
2421 echo "$ac_t""$INSTALL" 1>&6
2423 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2424 # It thinks the first close brace ends the variable substitution.
2425 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2427 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2430 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2431 echo "configure:2432: checking for ANSI C header files" >&5
2432 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2433 echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 #include <stdlib.h>
2439 #include <stdarg.h>
2440 #include <string.h>
2441 #include <float.h>
2443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2444 { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2446 if test -z "$ac_err"; then
2447 rm -rf conftest*
2448 ac_cv_header_stdc=yes
2449 else
2450 echo "$ac_err" >&5
2451 echo "configure: failed program was:" >&5
2452 cat conftest.$ac_ext >&5
2453 rm -rf conftest*
2454 ac_cv_header_stdc=no
2456 rm -f conftest*
2458 if test $ac_cv_header_stdc = yes; then
2459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 #include <string.h>
2465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2466 egrep "memchr" >/dev/null 2>&1; then
2468 else
2469 rm -rf conftest*
2470 ac_cv_header_stdc=no
2472 rm -f conftest*
2476 if test $ac_cv_header_stdc = yes; then
2477 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2478 cat > conftest.$ac_ext <<EOF
2479 #line 2480 "configure"
2480 #include "confdefs.h"
2481 #include <stdlib.h>
2483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2484 egrep "free" >/dev/null 2>&1; then
2486 else
2487 rm -rf conftest*
2488 ac_cv_header_stdc=no
2490 rm -f conftest*
2494 if test $ac_cv_header_stdc = yes; then
2495 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2496 if test "$cross_compiling" = yes; then
2498 else
2499 cat > conftest.$ac_ext <<EOF
2500 #line 2501 "configure"
2501 #include "confdefs.h"
2502 #include <ctype.h>
2503 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2504 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2505 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2506 int main () { int i; for (i = 0; i < 256; i++)
2507 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2508 exit (0); }
2511 if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2512 then
2514 else
2515 echo "configure: failed program was:" >&5
2516 cat conftest.$ac_ext >&5
2517 rm -fr conftest*
2518 ac_cv_header_stdc=no
2520 rm -fr conftest*
2526 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2527 if test $ac_cv_header_stdc = yes; then
2528 cat >> confdefs.h <<\EOF
2529 #define STDC_HEADERS 1
2534 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2535 echo "configure:2536: checking whether time.h and sys/time.h may both be included" >&5
2536 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539 cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <sys/types.h>
2543 #include <sys/time.h>
2544 #include <time.h>
2545 int main() {
2546 struct tm *tp;
2547 ; return 0; }
2549 if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2550 rm -rf conftest*
2551 ac_cv_header_time=yes
2552 else
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -rf conftest*
2556 ac_cv_header_time=no
2558 rm -f conftest*
2561 echo "$ac_t""$ac_cv_header_time" 1>&6
2562 if test $ac_cv_header_time = yes; then
2563 cat >> confdefs.h <<\EOF
2564 #define TIME_WITH_SYS_TIME 1
2569 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2570 echo "configure:2571: checking for working stdbool.h" >&5
2571 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2572 echo $ac_n "(cached) $ac_c" 1>&6
2573 else
2574 cat > conftest.$ac_ext <<EOF
2575 #line 2576 "configure"
2576 #include "confdefs.h"
2577 #include <stdbool.h>
2578 int main() {
2579 bool foo = false;
2580 ; return 0; }
2582 if { (eval echo configure:2583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2583 rm -rf conftest*
2584 ac_cv_header_stdbool_h=yes
2585 else
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2588 rm -rf conftest*
2589 ac_cv_header_stdbool_h=no
2591 rm -f conftest*
2594 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2595 if test $ac_cv_header_stdbool_h = yes; then
2596 cat >> confdefs.h <<\EOF
2597 #define HAVE_STDBOOL_H 1
2602 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2603 echo "configure:2604: checking whether string.h and strings.h may both be included" >&5
2604 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2605 echo $ac_n "(cached) $ac_c" 1>&6
2606 else
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 #include <string.h>
2611 #include <strings.h>
2612 int main() {
2614 ; return 0; }
2616 if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2617 rm -rf conftest*
2618 gcc_cv_header_string=yes
2619 else
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2622 rm -rf conftest*
2623 gcc_cv_header_string=no
2625 rm -f conftest*
2628 echo "$ac_t""$gcc_cv_header_string" 1>&6
2629 if test $gcc_cv_header_string = yes; then
2630 cat >> confdefs.h <<\EOF
2631 #define STRING_WITH_STRINGS 1
2636 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2637 echo "configure:2638: checking for sys/wait.h that is POSIX.1 compatible" >&5
2638 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641 cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <sys/types.h>
2645 #include <sys/wait.h>
2646 #ifndef WEXITSTATUS
2647 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2648 #endif
2649 #ifndef WIFEXITED
2650 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2651 #endif
2652 int main() {
2653 int s;
2654 wait (&s);
2655 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2656 ; return 0; }
2658 if { (eval echo configure:2659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2659 rm -rf conftest*
2660 ac_cv_header_sys_wait_h=yes
2661 else
2662 echo "configure: failed program was:" >&5
2663 cat conftest.$ac_ext >&5
2664 rm -rf conftest*
2665 ac_cv_header_sys_wait_h=no
2667 rm -f conftest*
2670 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2671 if test $ac_cv_header_sys_wait_h = yes; then
2672 cat >> confdefs.h <<\EOF
2673 #define HAVE_SYS_WAIT_H 1
2678 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2679 fcntl.h unistd.h sys/file.h sys/time.h \
2680 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2681 direct.h malloc.h langinfo.h
2683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2685 echo "configure:2686: checking for $ac_hdr" >&5
2686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2687 echo $ac_n "(cached) $ac_c" 1>&6
2688 else
2689 cat > conftest.$ac_ext <<EOF
2690 #line 2691 "configure"
2691 #include "confdefs.h"
2692 #include <$ac_hdr>
2694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2695 { (eval echo configure:2696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2697 if test -z "$ac_err"; then
2698 rm -rf conftest*
2699 eval "ac_cv_header_$ac_safe=yes"
2700 else
2701 echo "$ac_err" >&5
2702 echo "configure: failed program was:" >&5
2703 cat conftest.$ac_ext >&5
2704 rm -rf conftest*
2705 eval "ac_cv_header_$ac_safe=no"
2707 rm -f conftest*
2709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2710 echo "$ac_t""yes" 1>&6
2711 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2712 cat >> confdefs.h <<EOF
2713 #define $ac_tr_hdr 1
2716 else
2717 echo "$ac_t""no" 1>&6
2719 done
2722 # Check for thread headers.
2723 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2724 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2725 echo "configure:2726: checking for thread.h" >&5
2726 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2727 echo $ac_n "(cached) $ac_c" 1>&6
2728 else
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732 #include <thread.h>
2734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2735 { (eval echo configure:2736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2737 if test -z "$ac_err"; then
2738 rm -rf conftest*
2739 eval "ac_cv_header_$ac_safe=yes"
2740 else
2741 echo "$ac_err" >&5
2742 echo "configure: failed program was:" >&5
2743 cat conftest.$ac_ext >&5
2744 rm -rf conftest*
2745 eval "ac_cv_header_$ac_safe=no"
2747 rm -f conftest*
2749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2750 echo "$ac_t""yes" 1>&6
2751 have_thread_h=yes
2752 else
2753 echo "$ac_t""no" 1>&6
2754 have_thread_h=
2757 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2758 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2759 echo "configure:2760: checking for pthread.h" >&5
2760 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2761 echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763 cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766 #include <pthread.h>
2768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2769 { (eval echo configure:2770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2771 if test -z "$ac_err"; then
2772 rm -rf conftest*
2773 eval "ac_cv_header_$ac_safe=yes"
2774 else
2775 echo "$ac_err" >&5
2776 echo "configure: failed program was:" >&5
2777 cat conftest.$ac_ext >&5
2778 rm -rf conftest*
2779 eval "ac_cv_header_$ac_safe=no"
2781 rm -f conftest*
2783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2784 echo "$ac_t""yes" 1>&6
2785 have_pthread_h=yes
2786 else
2787 echo "$ac_t""no" 1>&6
2788 have_pthread_h=
2792 # These tests can't be done till we know if we have limits.h.
2793 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2794 echo "configure:2795: checking for CHAR_BIT" >&5
2795 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2796 echo $ac_n "(cached) $ac_c" 1>&6
2797 else
2798 cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801 #ifdef HAVE_LIMITS_H
2802 #include <limits.h>
2803 #endif
2804 #ifdef CHAR_BIT
2805 found
2806 #endif
2808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2809 egrep "found" >/dev/null 2>&1; then
2810 rm -rf conftest*
2811 gcc_cv_decl_char_bit=yes
2812 else
2813 rm -rf conftest*
2814 gcc_cv_decl_char_bit=no
2816 rm -f conftest*
2821 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2822 if test $gcc_cv_decl_char_bit = no; then
2823 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2824 echo "configure:2825: checking number of bits in a byte" >&5
2825 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2829 gcc_cv_c_nbby=
2830 while test $i -lt 65; do
2831 cat > conftest.$ac_ext <<EOF
2832 #line 2833 "configure"
2833 #include "confdefs.h"
2835 int main() {
2836 switch(0) {
2837 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2838 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2840 ; return 0; }
2842 if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2843 rm -rf conftest*
2844 gcc_cv_c_nbby=$i; break
2845 else
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2849 rm -f conftest*
2850 i=`expr $i + 1`
2851 done
2852 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2856 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2857 if test $gcc_cv_c_nbby = failed; then
2858 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2859 else
2860 cat >> confdefs.h <<EOF
2861 #define CHAR_BIT $gcc_cv_c_nbby
2866 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2867 echo "configure:2868: checking byte ordering" >&5
2868 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2869 echo $ac_n "(cached) $ac_c" 1>&6
2870 else
2871 ac_cv_c_compile_endian=unknown
2873 ac_ext=c
2874 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2875 ac_cpp='$CPP $CPPFLAGS'
2876 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2877 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2878 cross_compiling=$ac_cv_prog_cc_cross
2880 cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2884 #ifdef HAVE_LIMITS_H
2885 # include <limits.h>
2886 #endif
2887 /* This structure must have no internal padding. */
2888 struct {
2889 char prefix[sizeof "\nendian:" - 1];
2890 short word;
2891 char postfix[2];
2892 } tester = {
2893 "\nendian:",
2894 #if SIZEOF_SHORT == 4
2895 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2896 #endif
2897 ('A' << CHAR_BIT) | 'B',
2898 'X', '\n'
2901 if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2902 od -c conftest.o |
2903 sed 's/^[0-7]*[ ]*/ /
2904 s/\*/./g
2905 s/ \\n/*/g
2906 s/ [0-9][0-9][0-9]/./g
2907 s/ \\[^ ]/./g' |
2908 tr -d '
2909 ' | tr -s '*' '
2910 ' | fold | sed '$a\
2911 ' > conftest.dmp
2912 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2913 ac_cv_c_compile_endian=big-endian
2914 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2915 ac_cv_c_compile_endian=little-endian
2918 rm -rf conftest*
2919 ac_ext=c
2920 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2923 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2924 cross_compiling=$ac_cv_prog_cc_cross
2929 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2930 if test $ac_cv_c_compile_endian = unknown; then
2931 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2932 elif test $ac_cv_c_compile_endian = big-endian; then
2933 cat >> confdefs.h <<\EOF
2934 #define HOST_WORDS_BIG_ENDIAN 1
2939 echo $ac_n "checking floating point format""... $ac_c" 1>&6
2940 echo "configure:2941: checking floating point format" >&5
2941 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2945 ac_ext=c
2946 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2947 ac_cpp='$CPP $CPPFLAGS'
2948 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2949 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2950 cross_compiling=$ac_cv_prog_cc_cross
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 /* This will not work unless sizeof(double) == 8. */
2956 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2958 /* This structure must have no internal padding. */
2959 struct possibility {
2960 char prefix[8];
2961 double candidate;
2962 char postfix[8];
2965 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
2966 struct possibility table [] =
2968 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
2969 C( 3.53802595280598432000e+18), /* D__float - VAX */
2970 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
2971 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
2972 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
2975 if { (eval echo configure:2976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2976 od -c conftest.o |
2977 sed 's/^[0-7]*[ ]*/ /
2978 s/\*/./g
2979 s/ \\n/*/g
2980 s/ [0-9][0-9][0-9]/./g
2981 s/ \\[^ ]/./g' |
2982 tr -d '
2983 ' | tr -s '*' '
2984 ' | fold | sed '$a\
2985 ' > conftest.dmp
2986 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2987 ac_cv_c_float_format='IEEE (big-endian)'
2988 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
2989 ac_cv_c_float_format='IEEE (big-endian)'
2990 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
2991 ac_cv_c_float_format='IEEE (little-endian)'
2992 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
2993 ac_cv_c_float_format='IEEE (little-endian)'
2994 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
2995 ac_cv_c_float_format='VAX D-float'
2996 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
2997 ac_cv_c_float_format='PDP-10'
2998 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2999 ac_cv_c_float_format='IBM 370 hex'
3000 else
3001 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3003 else
3004 { echo "configure: error: compile failed" 1>&2; exit 1; }
3006 rm -rf conftest*
3007 ac_ext=c
3008 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3009 ac_cpp='$CPP $CPPFLAGS'
3010 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3011 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3012 cross_compiling=$ac_cv_prog_cc_cross
3017 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3018 # IEEE is the default format. If the float endianness isn't the same
3019 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3020 # (which is a tristate: yes, no, default). This is only an issue with
3021 # IEEE; the other formats are only supported by a few machines each,
3022 # all with the same endianness.
3023 format=
3024 fbigend=
3025 case $ac_cv_c_float_format in
3026 'IEEE (big-endian)' )
3027 if test $ac_cv_c_compile_endian = little-endian; then
3028 fbigend=1
3031 'IEEE (little-endian)' )
3032 if test $ac_cv_c_compile_endian = big-endian; then
3033 fbigend=0
3036 'VAX D-float' )
3037 format=VAX_FLOAT_FORMAT
3039 'PDP-10' )
3040 format=PDP10_FLOAT_FORMAT
3042 'IBM 370 hex' )
3043 format=IBM_FLOAT_FORMAT
3045 esac
3046 if test -n "$format"; then
3047 cat >> confdefs.h <<EOF
3048 #define HOST_FLOAT_FORMAT $format
3052 if test -n "$fbigend"; then
3053 cat >> confdefs.h <<EOF
3054 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3060 # See if we have the mktemp command.
3061 # Extract the first word of "mktemp", so it can be a program name with args.
3062 set dummy mktemp; ac_word=$2
3063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_word" >&5
3065 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3066 echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068 if test -n "$have_mktemp_command"; then
3069 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3070 else
3071 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3072 ac_dummy="$PATH"
3073 for ac_dir in $ac_dummy; do
3074 test -z "$ac_dir" && ac_dir=.
3075 if test -f $ac_dir/$ac_word; then
3076 ac_cv_prog_have_mktemp_command="yes"
3077 break
3079 done
3080 IFS="$ac_save_ifs"
3081 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3084 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3085 if test -n "$have_mktemp_command"; then
3086 echo "$ac_t""$have_mktemp_command" 1>&6
3087 else
3088 echo "$ac_t""no" 1>&6
3092 # Do we have a single-tree copy of texinfo?
3093 if test -f $srcdir/../texinfo/Makefile.in; then
3094 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3095 gcc_cv_prog_makeinfo_modern=yes
3096 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3097 else
3098 # See if makeinfo has been installed and is modern enough
3099 # that we can use it.
3100 # Extract the first word of "makeinfo", so it can be a program name with args.
3101 set dummy makeinfo; ac_word=$2
3102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3103 echo "configure:3104: checking for $ac_word" >&5
3104 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3105 echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107 if test -n "$MAKEINFO"; then
3108 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3109 else
3110 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3111 ac_dummy="$PATH"
3112 for ac_dir in $ac_dummy; do
3113 test -z "$ac_dir" && ac_dir=.
3114 if test -f $ac_dir/$ac_word; then
3115 ac_cv_prog_MAKEINFO="makeinfo"
3116 break
3118 done
3119 IFS="$ac_save_ifs"
3122 MAKEINFO="$ac_cv_prog_MAKEINFO"
3123 if test -n "$MAKEINFO"; then
3124 echo "$ac_t""$MAKEINFO" 1>&6
3125 else
3126 echo "$ac_t""no" 1>&6
3129 if test -n "$MAKEINFO"; then
3130 # Found it, now check the version.
3131 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3132 echo "configure:3133: checking for modern makeinfo" >&5
3133 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3134 echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136 ac_prog_version=`$MAKEINFO --version 2>&1 |
3137 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3138 echo "configure:3139: version of makeinfo is $ac_prog_version" >&5
3139 case $ac_prog_version in
3140 '') gcc_cv_prog_makeinfo_modern=no;;
3141 4.[1-9]*)
3142 gcc_cv_prog_makeinfo_modern=yes;;
3143 *) gcc_cv_prog_makeinfo_modern=no;;
3144 esac
3148 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3149 else
3150 gcc_cv_prog_makeinfo_modern=no
3155 if test $gcc_cv_prog_makeinfo_modern = no; then
3156 echo "configure: warning:
3157 *** Makeinfo is missing or too old.
3158 *** Info documentation will not be built." 1>&2
3159 BUILD_INFO=
3160 else
3161 BUILD_INFO=info
3164 # Is pod2man recent enough to regenerate manpages?
3165 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3166 echo "configure:3167: checking for recent Pod::Man" >&5
3167 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3168 echo "$ac_t""yes" 1>&6
3169 GENERATED_MANPAGES=generated-manpages
3170 else
3171 echo "$ac_t""no" 1>&6
3172 GENERATED_MANPAGES=
3175 # How about lex?
3176 if test -f $srcdir/../flex/skel.c; then
3177 FLEX='$(objdir)/../flex/flex'
3178 else
3179 # Extract the first word of "flex", so it can be a program name with args.
3180 set dummy flex; ac_word=$2
3181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3182 echo "configure:3183: checking for $ac_word" >&5
3183 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3184 echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186 if test -n "$FLEX"; then
3187 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3188 else
3189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3190 ac_dummy="$PATH"
3191 for ac_dir in $ac_dummy; do
3192 test -z "$ac_dir" && ac_dir=.
3193 if test -f $ac_dir/$ac_word; then
3194 ac_cv_prog_FLEX="flex"
3195 break
3197 done
3198 IFS="$ac_save_ifs"
3199 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3202 FLEX="$ac_cv_prog_FLEX"
3203 if test -n "$FLEX"; then
3204 echo "$ac_t""$FLEX" 1>&6
3205 else
3206 echo "$ac_t""no" 1>&6
3211 # Bison?
3212 # The -L switch is so bison can find its skeleton file.
3213 if test -f $srcdir/../bison/bison.simple; then
3214 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3215 else
3216 # Extract the first word of "bison", so it can be a program name with args.
3217 set dummy bison; ac_word=$2
3218 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3219 echo "configure:3220: checking for $ac_word" >&5
3220 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3221 echo $ac_n "(cached) $ac_c" 1>&6
3222 else
3223 if test -n "$BISON"; then
3224 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3225 else
3226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229 test -z "$ac_dir" && ac_dir=.
3230 if test -f $ac_dir/$ac_word; then
3231 ac_cv_prog_BISON="bison"
3232 break
3234 done
3235 IFS="$ac_save_ifs"
3236 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3239 BISON="$ac_cv_prog_BISON"
3240 if test -n "$BISON"; then
3241 echo "$ac_t""$BISON" 1>&6
3242 else
3243 echo "$ac_t""no" 1>&6
3248 # These libraries may be used by collect2.
3249 # We may need a special search path to get them linked.
3250 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3251 echo "configure:3252: checking for collect2 libraries" >&5
3252 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3253 echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255 save_LIBS="$LIBS"
3256 for libs in '' -lld -lmld \
3257 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3258 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3260 LIBS="$libs"
3261 cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 /* Override any gcc2 internal prototype to avoid an error. */
3265 /* We use char because int might match the return type of a gcc2
3266 builtin and then its argument prototype would still apply. */
3267 char ldopen();
3269 int main() {
3270 ldopen()
3271 ; return 0; }
3273 if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3274 rm -rf conftest*
3275 gcc_cv_collect2_libs="$libs"; break
3276 else
3277 echo "configure: failed program was:" >&5
3278 cat conftest.$ac_ext >&5
3280 rm -f conftest*
3281 done
3282 LIBS="$save_LIBS"
3283 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3286 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3287 case $gcc_cv_collect2_libs in
3288 "none required") ;;
3289 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3290 esac
3293 # When building Ada code on Alpha, we need exc_resume which is usually in
3294 # -lexc. So test for it.
3295 save_LIBS="$LIBS"
3296 LIBS=
3298 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3299 echo "configure:3300: checking for library containing exc_resume" >&5
3300 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303 ac_func_search_save_LIBS="$LIBS"
3304 ac_cv_search_exc_resume="no"
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 /* Override any gcc2 internal prototype to avoid an error. */
3309 /* We use char because int might match the return type of a gcc2
3310 builtin and then its argument prototype would still apply. */
3311 char exc_resume();
3313 int main() {
3314 exc_resume()
3315 ; return 0; }
3317 if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3318 rm -rf conftest*
3319 ac_cv_search_exc_resume="none required"
3320 else
3321 echo "configure: failed program was:" >&5
3322 cat conftest.$ac_ext >&5
3324 rm -f conftest*
3325 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3326 LIBS="-l$i $ac_func_search_save_LIBS"
3327 cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330 /* Override any gcc2 internal prototype to avoid an error. */
3331 /* We use char because int might match the return type of a gcc2
3332 builtin and then its argument prototype would still apply. */
3333 char exc_resume();
3335 int main() {
3336 exc_resume()
3337 ; return 0; }
3339 if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3340 rm -rf conftest*
3341 ac_cv_search_exc_resume="-l$i"
3342 break
3343 else
3344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
3347 rm -f conftest*
3348 done
3349 LIBS="$ac_func_search_save_LIBS"
3352 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3353 if test "$ac_cv_search_exc_resume" != "no"; then
3354 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3356 else :
3359 GNAT_LIBEXC="$LIBS"
3360 LIBS="$save_LIBS"
3363 # See if the stage1 system preprocessor understands the ANSI C
3364 # preprocessor stringification operator. (Used by symcat.h.)
3367 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3368 echo "configure:3369: checking for preprocessor stringizing operator" >&5
3369 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3376 #define x(y) #y
3378 char *s = x(teststring);
3381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3382 egrep "#teststring" >/dev/null 2>&1; then
3383 rm -rf conftest*
3384 ac_cv_c_stringize=no
3385 else
3386 rm -rf conftest*
3387 ac_cv_c_stringize=yes
3389 rm -f conftest*
3393 if test "${ac_cv_c_stringize}" = yes
3394 then
3395 cat >> confdefs.h <<\EOF
3396 #define HAVE_STRINGIZE 1
3400 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3403 # Use <inttypes.h> only if it exists,
3404 # doesn't clash with <sys/types.h>, and declares intmax_t.
3405 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3406 echo "configure:3407: checking for inttypes.h" >&5
3407 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3408 echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 #include <inttypes.h>
3415 int main() {
3416 intmax_t i = -1;
3417 ; return 0; }
3419 if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3420 rm -rf conftest*
3421 gcc_cv_header_inttypes_h=yes
3422 else
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 rm -rf conftest*
3426 gcc_cv_header_inttypes_h=no
3428 rm -f conftest*
3431 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3432 if test $gcc_cv_header_inttypes_h = yes; then
3433 cat >> confdefs.h <<\EOF
3434 #define HAVE_INTTYPES_H 1
3440 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3441 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3442 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3443 scandir alphasort
3445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_func" >&5
3447 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3448 echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450 cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453 /* System header to define __stub macros and hopefully few prototypes,
3454 which can conflict with char $ac_func(); below. */
3455 #include <assert.h>
3456 /* Override any gcc2 internal prototype to avoid an error. */
3457 /* We use char because int might match the return type of a gcc2
3458 builtin and then its argument prototype would still apply. */
3459 char $ac_func();
3461 int main() {
3463 /* The GNU C library defines this for functions which it implements
3464 to always fail with ENOSYS. Some functions are actually named
3465 something starting with __ and the normal name is an alias. */
3466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3467 choke me
3468 #else
3469 $ac_func();
3470 #endif
3472 ; return 0; }
3474 if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3475 rm -rf conftest*
3476 eval "ac_cv_func_$ac_func=yes"
3477 else
3478 echo "configure: failed program was:" >&5
3479 cat conftest.$ac_ext >&5
3480 rm -rf conftest*
3481 eval "ac_cv_func_$ac_func=no"
3483 rm -f conftest*
3486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3487 echo "$ac_t""yes" 1>&6
3488 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3489 cat >> confdefs.h <<EOF
3490 #define $ac_tr_func 1
3493 else
3494 echo "$ac_t""no" 1>&6
3496 done
3499 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3500 echo "configure:3501: checking for ssize_t" >&5
3501 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504 cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507 #include <sys/types.h>
3508 #if STDC_HEADERS
3509 #include <stdlib.h>
3510 #include <stddef.h>
3511 #endif
3513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3514 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3515 rm -rf conftest*
3516 ac_cv_type_ssize_t=yes
3517 else
3518 rm -rf conftest*
3519 ac_cv_type_ssize_t=no
3521 rm -f conftest*
3524 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3525 if test $ac_cv_type_ssize_t = no; then
3526 cat >> confdefs.h <<\EOF
3527 #define ssize_t int
3533 # Try to determine the array type of the second argument of getgroups
3534 # for the target system (int or gid_t).
3535 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3536 echo "configure:3537: checking for uid_t in sys/types.h" >&5
3537 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3538 echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540 cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 #include <sys/types.h>
3545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3546 egrep "uid_t" >/dev/null 2>&1; then
3547 rm -rf conftest*
3548 ac_cv_type_uid_t=yes
3549 else
3550 rm -rf conftest*
3551 ac_cv_type_uid_t=no
3553 rm -f conftest*
3557 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3558 if test $ac_cv_type_uid_t = no; then
3559 cat >> confdefs.h <<\EOF
3560 #define uid_t int
3563 cat >> confdefs.h <<\EOF
3564 #define gid_t int
3569 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3570 echo "configure:3571: checking type of array argument to getgroups" >&5
3571 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574 if test "$cross_compiling" = yes; then
3575 ac_cv_type_getgroups=cross
3576 else
3577 cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3581 /* Thanks to Mike Rendell for this test. */
3582 #include <sys/types.h>
3583 #define NGID 256
3584 #undef MAX
3585 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3586 main()
3588 gid_t gidset[NGID];
3589 int i, n;
3590 union { gid_t gval; long lval; } val;
3592 val.lval = -1;
3593 for (i = 0; i < NGID; i++)
3594 gidset[i] = val.gval;
3595 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3596 gidset);
3597 /* Exit non-zero if getgroups seems to require an array of ints. This
3598 happens when gid_t is short but getgroups modifies an array of ints. */
3599 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3603 if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3604 then
3605 ac_cv_type_getgroups=gid_t
3606 else
3607 echo "configure: failed program was:" >&5
3608 cat conftest.$ac_ext >&5
3609 rm -fr conftest*
3610 ac_cv_type_getgroups=int
3612 rm -fr conftest*
3615 if test $ac_cv_type_getgroups = cross; then
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 #include <unistd.h>
3621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3622 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3623 rm -rf conftest*
3624 ac_cv_type_getgroups=gid_t
3625 else
3626 rm -rf conftest*
3627 ac_cv_type_getgroups=int
3629 rm -f conftest*
3634 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3635 cat >> confdefs.h <<EOF
3636 #define GETGROUPS_T $ac_cv_type_getgroups
3640 if test "${target}" = "${build}"; then
3641 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3642 else
3643 case "${target}" in
3644 # This condition may need some tweaking. It should include all
3645 # targets where the array type of the second argument of getgroups
3646 # is int and the type of gid_t is not equivalent to int.
3647 *-*-sunos* | *-*-ultrix*)
3648 TARGET_GETGROUPS_T=int
3651 TARGET_GETGROUPS_T=gid_t
3653 esac
3657 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3658 echo "configure:3659: checking whether the printf functions support %p" >&5
3659 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3660 echo $ac_n "(cached) $ac_c" 1>&6
3661 else
3662 if test "$cross_compiling" = yes; then
3663 gcc_cv_func_printf_ptr=no
3664 else
3665 cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 #include <stdio.h>
3670 int main()
3672 char buf[64];
3673 char *p = buf, *q = NULL;
3674 sprintf(buf, "%p", p);
3675 sscanf(buf, "%p", &q);
3676 return (p != q);
3679 if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3680 then
3681 gcc_cv_func_printf_ptr=yes
3682 else
3683 echo "configure: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
3685 rm -fr conftest*
3686 gcc_cv_func_printf_ptr=no
3688 rm -fr conftest*
3691 rm -f core core.* *.core
3694 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3695 if test $gcc_cv_func_printf_ptr = yes ; then
3696 cat >> confdefs.h <<\EOF
3697 #define HAVE_PRINTF_PTR 1
3703 case "${host}" in
3704 *-*-uwin*)
3705 { echo "configure: error:
3706 *** UWIN may not be used as a host platform because
3707 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3709 *-*-*vms*)
3710 # Under VMS, vfork works very different than on Unix. The standard test
3711 # won't work, and it isn't easily adaptable. It makes more sense to
3712 # just force it.
3713 ac_cv_func_vfork_works=yes
3715 esac
3716 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3717 echo "configure:3718: checking for pid_t" >&5
3718 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
3720 else
3721 cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 #include <sys/types.h>
3725 #if STDC_HEADERS
3726 #include <stdlib.h>
3727 #include <stddef.h>
3728 #endif
3730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3731 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3732 rm -rf conftest*
3733 ac_cv_type_pid_t=yes
3734 else
3735 rm -rf conftest*
3736 ac_cv_type_pid_t=no
3738 rm -f conftest*
3741 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3742 if test $ac_cv_type_pid_t = no; then
3743 cat >> confdefs.h <<\EOF
3744 #define pid_t int
3749 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3750 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3751 echo "configure:3752: checking for vfork.h" >&5
3752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3753 echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755 cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 #include <vfork.h>
3760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3761 { (eval echo configure:3762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3763 if test -z "$ac_err"; then
3764 rm -rf conftest*
3765 eval "ac_cv_header_$ac_safe=yes"
3766 else
3767 echo "$ac_err" >&5
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3770 rm -rf conftest*
3771 eval "ac_cv_header_$ac_safe=no"
3773 rm -f conftest*
3775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3776 echo "$ac_t""yes" 1>&6
3777 cat >> confdefs.h <<\EOF
3778 #define HAVE_VFORK_H 1
3781 else
3782 echo "$ac_t""no" 1>&6
3785 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3786 echo "configure:3787: checking for working vfork" >&5
3787 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3788 echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790 if test "$cross_compiling" = yes; then
3791 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3792 echo "configure:3793: checking for vfork" >&5
3793 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799 /* System header to define __stub macros and hopefully few prototypes,
3800 which can conflict with char vfork(); below. */
3801 #include <assert.h>
3802 /* Override any gcc2 internal prototype to avoid an error. */
3803 /* We use char because int might match the return type of a gcc2
3804 builtin and then its argument prototype would still apply. */
3805 char vfork();
3807 int main() {
3809 /* The GNU C library defines this for functions which it implements
3810 to always fail with ENOSYS. Some functions are actually named
3811 something starting with __ and the normal name is an alias. */
3812 #if defined (__stub_vfork) || defined (__stub___vfork)
3813 choke me
3814 #else
3815 vfork();
3816 #endif
3818 ; return 0; }
3820 if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3821 rm -rf conftest*
3822 eval "ac_cv_func_vfork=yes"
3823 else
3824 echo "configure: failed program was:" >&5
3825 cat conftest.$ac_ext >&5
3826 rm -rf conftest*
3827 eval "ac_cv_func_vfork=no"
3829 rm -f conftest*
3832 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3833 echo "$ac_t""yes" 1>&6
3835 else
3836 echo "$ac_t""no" 1>&6
3839 ac_cv_func_vfork_works=$ac_cv_func_vfork
3840 else
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 /* Thanks to Paul Eggert for this test. */
3845 #include <stdio.h>
3846 #include <sys/types.h>
3847 #include <sys/stat.h>
3848 #ifdef HAVE_UNISTD_H
3849 #include <unistd.h>
3850 #endif
3851 #ifdef HAVE_VFORK_H
3852 #include <vfork.h>
3853 #endif
3854 /* On some sparc systems, changes by the child to local and incoming
3855 argument registers are propagated back to the parent.
3856 The compiler is told about this with #include <vfork.h>,
3857 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3858 Test for this by using a static variable whose address
3859 is put into a register that is clobbered by the vfork. */
3860 static
3861 #ifdef __cplusplus
3862 sparc_address_test (int arg)
3863 #else
3864 sparc_address_test (arg) int arg;
3865 #endif
3867 static pid_t child;
3868 if (!child) {
3869 child = vfork ();
3870 if (child < 0) {
3871 perror ("vfork");
3872 _exit(2);
3874 if (!child) {
3875 arg = getpid();
3876 write(-1, "", 0);
3877 _exit (arg);
3881 main() {
3882 pid_t parent = getpid ();
3883 pid_t child;
3885 sparc_address_test ();
3887 child = vfork ();
3889 if (child == 0) {
3890 /* Here is another test for sparc vfork register problems.
3891 This test uses lots of local variables, at least
3892 as many local variables as main has allocated so far
3893 including compiler temporaries. 4 locals are enough for
3894 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3895 A buggy compiler should reuse the register of parent
3896 for one of the local variables, since it will think that
3897 parent can't possibly be used any more in this routine.
3898 Assigning to the local variable will thus munge parent
3899 in the parent process. */
3900 pid_t
3901 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3902 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3903 /* Convince the compiler that p..p7 are live; otherwise, it might
3904 use the same hardware register for all 8 local variables. */
3905 if (p != p1 || p != p2 || p != p3 || p != p4
3906 || p != p5 || p != p6 || p != p7)
3907 _exit(1);
3909 /* On some systems (e.g. IRIX 3.3),
3910 vfork doesn't separate parent from child file descriptors.
3911 If the child closes a descriptor before it execs or exits,
3912 this munges the parent's descriptor as well.
3913 Test for this by closing stdout in the child. */
3914 _exit(close(fileno(stdout)) != 0);
3915 } else {
3916 int status;
3917 struct stat st;
3919 while (wait(&status) != child)
3921 exit(
3922 /* Was there some problem with vforking? */
3923 child < 0
3925 /* Did the child fail? (This shouldn't happen.) */
3926 || status
3928 /* Did the vfork/compiler bug occur? */
3929 || parent != getpid()
3931 /* Did the file descriptor bug occur? */
3932 || fstat(fileno(stdout), &st) != 0
3937 if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3938 then
3939 ac_cv_func_vfork_works=yes
3940 else
3941 echo "configure: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 rm -fr conftest*
3944 ac_cv_func_vfork_works=no
3946 rm -fr conftest*
3951 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3952 if test $ac_cv_func_vfork_works = no; then
3953 cat >> confdefs.h <<\EOF
3954 #define vfork fork
3959 for ac_func in getpagesize
3961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3962 echo "configure:3963: checking for $ac_func" >&5
3963 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 /* System header to define __stub macros and hopefully few prototypes,
3970 which can conflict with char $ac_func(); below. */
3971 #include <assert.h>
3972 /* Override any gcc2 internal prototype to avoid an error. */
3973 /* We use char because int might match the return type of a gcc2
3974 builtin and then its argument prototype would still apply. */
3975 char $ac_func();
3977 int main() {
3979 /* The GNU C library defines this for functions which it implements
3980 to always fail with ENOSYS. Some functions are actually named
3981 something starting with __ and the normal name is an alias. */
3982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3983 choke me
3984 #else
3985 $ac_func();
3986 #endif
3988 ; return 0; }
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991 rm -rf conftest*
3992 eval "ac_cv_func_$ac_func=yes"
3993 else
3994 echo "configure: failed program was:" >&5
3995 cat conftest.$ac_ext >&5
3996 rm -rf conftest*
3997 eval "ac_cv_func_$ac_func=no"
3999 rm -f conftest*
4002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4003 echo "$ac_t""yes" 1>&6
4004 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4005 cat >> confdefs.h <<EOF
4006 #define $ac_tr_func 1
4009 else
4010 echo "$ac_t""no" 1>&6
4012 done
4014 # The test program for the next two tests is the same except for one
4015 # set of ifdefs.
4016 cat >ct-mmap.inc <<'EOF'
4017 #include <sys/types.h>
4018 #include <sys/mman.h>
4019 #include <fcntl.h>
4020 #include <signal.h>
4021 #include <setjmp.h>
4022 #include <stdio.h>
4024 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4025 # define MAP_ANONYMOUS MAP_ANON
4026 #endif
4028 /* This mess was copied from the GNU getpagesize.h. */
4029 #ifndef HAVE_GETPAGESIZE
4030 # ifdef HAVE_UNISTD_H
4031 # include <unistd.h>
4032 # endif
4034 /* Assume that all systems that can run configure have sys/param.h. */
4035 # ifndef HAVE_SYS_PARAM_H
4036 # define HAVE_SYS_PARAM_H 1
4037 # endif
4039 # ifdef _SC_PAGESIZE
4040 # define getpagesize() sysconf(_SC_PAGESIZE)
4041 # else /* no _SC_PAGESIZE */
4042 # ifdef HAVE_SYS_PARAM_H
4043 # include <sys/param.h>
4044 # ifdef EXEC_PAGESIZE
4045 # define getpagesize() EXEC_PAGESIZE
4046 # else /* no EXEC_PAGESIZE */
4047 # ifdef NBPG
4048 # define getpagesize() NBPG * CLSIZE
4049 # ifndef CLSIZE
4050 # define CLSIZE 1
4051 # endif /* no CLSIZE */
4052 # else /* no NBPG */
4053 # ifdef NBPC
4054 # define getpagesize() NBPC
4055 # else /* no NBPC */
4056 # ifdef PAGESIZE
4057 # define getpagesize() PAGESIZE
4058 # endif /* PAGESIZE */
4059 # endif /* no NBPC */
4060 # endif /* no NBPG */
4061 # endif /* no EXEC_PAGESIZE */
4062 # else /* no HAVE_SYS_PARAM_H */
4063 # define getpagesize() 8192 /* punt totally */
4064 # endif /* no HAVE_SYS_PARAM_H */
4065 # endif /* no _SC_PAGESIZE */
4067 #endif /* no HAVE_GETPAGESIZE */
4069 #ifndef MAP_FAILED
4070 # define MAP_FAILED -1
4071 #endif
4073 #undef perror_exit
4074 #define perror_exit(str, val) \
4075 do { perror(str); exit(val); } while (0)
4077 /* Some versions of cygwin mmap require that munmap is called with the
4078 same parameters as mmap. GCC expects that this is not the case.
4079 Test for various forms of this problem. Warning - icky signal games. */
4081 static sigset_t unblock_sigsegv;
4082 static jmp_buf r;
4083 static size_t pg;
4084 static int devzero;
4086 static char *
4087 anonmap (size)
4088 size_t size;
4090 #ifdef USE_MAP_ANON
4091 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4092 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4093 #else
4094 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4095 MAP_PRIVATE, devzero, 0);
4096 #endif
4099 static void
4100 sigsegv (unused)
4101 int unused;
4103 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4104 longjmp (r, 1);
4107 /* Basic functionality test. */
4108 void
4109 test_0 ()
4111 char *x = anonmap (pg);
4112 if (x == (char *) MAP_FAILED)
4113 perror_exit("test 0 mmap", 2);
4115 *(int *)x += 1;
4117 if (munmap(x, pg) < 0)
4118 perror_exit("test 0 munmap", 3);
4121 /* 1. If we map a 2-page region and unmap its second page, the first page
4122 must remain. */
4123 static void
4124 test_1 ()
4126 char *x = anonmap (pg * 2);
4127 if (x == (char *)MAP_FAILED)
4128 perror_exit ("test 1 mmap", 4);
4130 signal (SIGSEGV, sigsegv);
4131 if (setjmp (r))
4132 perror_exit ("test 1 fault", 5);
4134 x[0] = 1;
4135 x[pg] = 1;
4137 if (munmap (x + pg, pg) < 0)
4138 perror_exit ("test 1 munmap 1", 6);
4139 x[0] = 2;
4141 if (setjmp (r) == 0)
4143 x[pg] = 1;
4144 perror_exit ("test 1 no fault", 7);
4146 if (munmap (x, pg) < 0)
4147 perror_exit ("test 1 munmap 2", 8);
4150 /* 2. If we map a 2-page region and unmap its first page, the second
4151 page must remain. */
4152 static void
4153 test_2 ()
4155 char *x = anonmap (pg * 2);
4156 if (x == (char *)MAP_FAILED)
4157 perror_exit ("test 2 mmap", 9);
4159 signal (SIGSEGV, sigsegv);
4160 if (setjmp (r))
4161 perror_exit ("test 2 fault", 10);
4163 x[0] = 1;
4164 x[pg] = 1;
4166 if (munmap (x, pg) < 0)
4167 perror_exit ("test 2 munmap 1", 11);
4169 x[pg] = 2;
4171 if (setjmp (r) == 0)
4173 x[0] = 1;
4174 perror_exit ("test 2 no fault", 12);
4177 if (munmap (x+pg, pg) < 0)
4178 perror_exit ("test 2 munmap 2", 13);
4181 /* 3. If we map two adjacent 1-page regions and unmap them both with
4182 one munmap, both must go away.
4184 Getting two adjacent 1-page regions with two mmap calls is slightly
4185 tricky. All OS's tested skip over already-allocated blocks; therefore
4186 we have been careful to unmap all allocated regions in previous tests.
4187 HP/UX allocates pages backward in memory. No OS has yet been observed
4188 to be so perverse as to leave unmapped space between consecutive calls
4189 to mmap. */
4191 static void
4192 test_3 ()
4194 char *x, *y, *z;
4196 x = anonmap (pg);
4197 if (x == (char *)MAP_FAILED)
4198 perror_exit ("test 3 mmap 1", 14);
4199 y = anonmap (pg);
4200 if (y == (char *)MAP_FAILED)
4201 perror_exit ("test 3 mmap 2", 15);
4203 if (y != x + pg)
4205 if (y == x - pg)
4206 z = y, y = x, x = z;
4207 else
4209 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4210 (unsigned long)x, (unsigned long)y);
4211 exit (16);
4215 signal (SIGSEGV, sigsegv);
4216 if (setjmp (r))
4217 perror_exit ("test 3 fault", 17);
4219 x[0] = 1;
4220 y[0] = 1;
4222 if (munmap (x, pg*2) < 0)
4223 perror_exit ("test 3 munmap", 18);
4225 if (setjmp (r) == 0)
4227 x[0] = 1;
4228 perror_exit ("test 3 no fault 1", 19);
4231 signal (SIGSEGV, sigsegv);
4232 if (setjmp (r) == 0)
4234 y[0] = 1;
4235 perror_exit ("test 3 no fault 2", 20);
4240 main ()
4242 sigemptyset (&unblock_sigsegv);
4243 sigaddset (&unblock_sigsegv, SIGSEGV);
4244 pg = getpagesize ();
4245 #ifndef USE_MAP_ANON
4246 devzero = open ("/dev/zero", O_RDWR);
4247 if (devzero < 0)
4248 perror_exit ("open /dev/zero", 1);
4249 #endif
4251 test_0();
4252 test_1();
4253 test_2();
4254 test_3();
4256 exit(0);
4260 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4261 echo "configure:4262: checking for working mmap from /dev/zero" >&5
4262 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4263 echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265 if test "$cross_compiling" = yes; then
4266 # If this is not cygwin, and /dev/zero is a character device, it's probably
4267 # safe to assume it works.
4268 case "$host_os" in
4269 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4270 * ) if test -c /dev/zero
4271 then ac_cv_func_mmap_dev_zero=yes
4272 else ac_cv_func_mmap_dev_zero=no
4273 fi ;;
4274 esac
4275 else
4276 cat > conftest.$ac_ext <<EOF
4277 #line 4278 "configure"
4278 #include "confdefs.h"
4279 #include "ct-mmap.inc"
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4282 then
4283 ac_cv_func_mmap_dev_zero=yes
4284 else
4285 echo "configure: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 rm -fr conftest*
4288 if test $? -lt 4
4289 then ac_cv_func_mmap_dev_zero=no
4290 else ac_cv_func_mmap_dev_zero=buggy
4293 rm -fr conftest*
4299 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4300 if test $ac_cv_func_mmap_dev_zero = yes; then
4301 cat >> confdefs.h <<\EOF
4302 #define HAVE_MMAP_DEV_ZERO 1
4307 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4308 echo "configure:4309: checking for working mmap with MAP_ANON(YMOUS)" >&5
4309 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4310 echo $ac_n "(cached) $ac_c" 1>&6
4311 else
4312 if test "$cross_compiling" = yes; then
4313 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4314 # just because it's there. Some SCO Un*xen define it but don't implement it.
4315 ac_cv_func_mmap_anon=no
4316 else
4317 cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 #define USE_MAP_ANON
4321 #include "ct-mmap.inc"
4323 if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4324 then
4325 ac_cv_func_mmap_anon=yes
4326 else
4327 echo "configure: failed program was:" >&5
4328 cat conftest.$ac_ext >&5
4329 rm -fr conftest*
4330 if test $? -lt 4
4331 then ac_cv_func_mmap_anon=no
4332 else ac_cv_func_mmap_anon=buggy
4335 rm -fr conftest*
4341 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4342 if test $ac_cv_func_mmap_anon = yes; then
4343 cat >> confdefs.h <<\EOF
4344 #define HAVE_MMAP_ANON 1
4348 rm -f ct-mmap.inc
4350 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4351 echo "configure:4352: checking for working mmap of a file" >&5
4352 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4353 echo $ac_n "(cached) $ac_c" 1>&6
4354 else
4355 # Create a file one thousand bytes long.
4356 for i in 1 2 3 4 5 6 7 8 9 0
4357 do for j in 1 2 3 4 5 6 7 8 9 0
4358 do echo $i $j xxxxx
4359 done
4360 done > conftestdata$$
4362 if test "$cross_compiling" = yes; then
4363 ac_cv_func_mmap_file=no
4364 else
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4369 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4370 Richard Henderson and Alexandre Oliva.
4371 Check whether read-only mmap of a plain file works. */
4372 #include <sys/types.h>
4373 #include <sys/stat.h>
4374 #include <fcntl.h>
4375 #include <sys/mman.h>
4377 int main()
4379 char *x;
4380 int fd;
4381 struct stat st;
4383 fd = open("conftestdata$$", O_RDONLY);
4384 if (fd < 0)
4385 exit(1);
4387 if (fstat (fd, &st))
4388 exit(2);
4390 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4391 if (x == (char *) -1)
4392 exit(3);
4394 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4395 exit(4);
4397 if (munmap(x, st.st_size) < 0)
4398 exit(5);
4400 exit(0);
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4404 then
4405 ac_cv_func_mmap_file=yes
4406 else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -fr conftest*
4410 ac_cv_func_mmap_file=no
4412 rm -fr conftest*
4417 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4418 if test $ac_cv_func_mmap_file = yes; then
4419 cat >> confdefs.h <<\EOF
4420 #define HAVE_MMAP_FILE 1
4428 am_cv_lib_iconv_ldpath=
4429 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4430 if test "${with_libiconv_prefix+set}" = set; then
4431 withval="$with_libiconv_prefix"
4433 for dir in `echo "$withval" | tr : ' '`; do
4434 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4435 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4436 done
4441 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4442 echo "configure:4443: checking for iconv" >&5
4443 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4444 echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4447 am_cv_func_iconv="no, consider installing GNU libiconv"
4448 am_cv_lib_iconv=no
4449 cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 #include <stdlib.h>
4453 #include <iconv.h>
4454 int main() {
4455 iconv_t cd = iconv_open("","");
4456 iconv(cd,NULL,NULL,NULL,NULL);
4457 iconv_close(cd);
4458 ; return 0; }
4460 if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4461 rm -rf conftest*
4462 am_cv_func_iconv=yes
4463 else
4464 echo "configure: failed program was:" >&5
4465 cat conftest.$ac_ext >&5
4467 rm -f conftest*
4468 if test "$am_cv_func_iconv" != yes; then
4469 am_save_LIBS="$LIBS"
4470 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 #include <stdlib.h>
4475 #include <iconv.h>
4476 int main() {
4477 iconv_t cd = iconv_open("","");
4478 iconv(cd,NULL,NULL,NULL,NULL);
4479 iconv_close(cd);
4480 ; return 0; }
4482 if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4483 rm -rf conftest*
4484 am_cv_lib_iconv=yes
4485 am_cv_func_iconv=yes
4486 else
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4490 rm -f conftest*
4491 LIBS="$am_save_LIBS"
4496 echo "$ac_t""$am_cv_func_iconv" 1>&6
4497 if test "$am_cv_func_iconv" = yes; then
4498 cat >> confdefs.h <<\EOF
4499 #define HAVE_ICONV 1
4502 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4503 echo "configure:4504: checking for iconv declaration" >&5
4504 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4505 echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4512 #include <stdlib.h>
4513 #include <iconv.h>
4514 extern
4515 #ifdef __cplusplus
4517 #endif
4518 #if defined(__STDC__) || defined(__cplusplus)
4519 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4520 #else
4521 size_t iconv();
4522 #endif
4524 int main() {
4526 ; return 0; }
4528 if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4529 rm -rf conftest*
4530 am_cv_proto_iconv_arg1=""
4531 else
4532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4534 rm -rf conftest*
4535 am_cv_proto_iconv_arg1="const"
4537 rm -f conftest*
4538 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);"
4541 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4542 echo "$ac_t""${ac_t:-
4543 }$am_cv_proto_iconv" 1>&6
4544 cat >> confdefs.h <<EOF
4545 #define ICONV_CONST $am_cv_proto_iconv_arg1
4549 LIBICONV=
4550 if test "$am_cv_lib_iconv" = yes; then
4551 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4556 # We will need to find libiberty.h and ansidecl.h
4557 saved_CFLAGS="$CFLAGS"
4558 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4559 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4560 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4561 fprintf_unlocked strstr errno \
4562 malloc realloc calloc free basename getopt clock
4564 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4565 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4566 echo "configure:4567: checking whether $ac_func is declared" >&5
4567 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4568 echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #undef $ac_tr_decl
4574 #define $ac_tr_decl 1
4576 #include "ansidecl.h"
4577 #include "system.h"
4579 int main() {
4580 #ifndef $ac_func
4581 char *(*pfn) = (char *(*)) $ac_func ;
4582 #endif
4583 ; return 0; }
4585 if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4586 rm -rf conftest*
4587 eval "gcc_cv_have_decl_$ac_func=yes"
4588 else
4589 echo "configure: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 rm -rf conftest*
4592 eval "gcc_cv_have_decl_$ac_func=no"
4594 rm -f conftest*
4597 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4598 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4599 #define $ac_tr_decl 1
4602 else
4603 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4604 #define $ac_tr_decl 0
4609 done
4610 if test x = y ; then
4611 cat >> confdefs.h <<\EOF
4612 #define HAVE_DECL_GETENV 1
4614 cat >> confdefs.h <<\EOF
4615 #define HAVE_DECL_ATOL 1
4617 cat >> confdefs.h <<\EOF
4618 #define HAVE_DECL_SBRK 1
4620 cat >> confdefs.h <<\EOF
4621 #define HAVE_DECL_ABORT 1
4623 cat >> confdefs.h <<\EOF
4624 #define HAVE_DECL_ATOF 1
4626 cat >> confdefs.h <<\EOF
4627 #define HAVE_DECL_GETCWD 1
4629 cat >> confdefs.h <<\EOF
4630 #define HAVE_DECL_GETWD 1
4633 cat >> confdefs.h <<\EOF
4634 #define HAVE_DECL_STRSIGNAL 1
4636 cat >> confdefs.h <<\EOF
4637 #define HAVE_DECL_PUTC_UNLOCKED 1
4639 cat >> confdefs.h <<\EOF
4640 #define HAVE_DECL_FPUTS_UNLOCKED 1
4642 cat >> confdefs.h <<\EOF
4643 #define HAVE_DECL_FWRITE_UNLOCKED 1
4646 cat >> confdefs.h <<\EOF
4647 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4649 cat >> confdefs.h <<\EOF
4650 #define HAVE_DECL_STRSTR 1
4652 cat >> confdefs.h <<\EOF
4653 #define HAVE_DECL_ERRNO 1
4656 cat >> confdefs.h <<\EOF
4657 #define HAVE_DECL_MALLOC 1
4659 cat >> confdefs.h <<\EOF
4660 #define HAVE_DECL_REALLOC 1
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_DECL_CALLOC 1
4665 cat >> confdefs.h <<\EOF
4666 #define HAVE_DECL_FREE 1
4668 cat >> confdefs.h <<\EOF
4669 #define HAVE_DECL_BASENAME 1
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_DECL_GETOPT 1
4674 cat >> confdefs.h <<\EOF
4675 #define HAVE_DECL_CLOCK 1
4680 for ac_func in getrlimit setrlimit getrusage
4682 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4683 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4684 echo "configure:4685: checking whether $ac_func is declared" >&5
4685 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4686 echo $ac_n "(cached) $ac_c" 1>&6
4687 else
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 #undef $ac_tr_decl
4692 #define $ac_tr_decl 1
4694 #include "ansidecl.h"
4695 #include "system.h"
4696 #ifdef HAVE_SYS_RESOURCE_H
4697 #include <sys/resource.h>
4698 #endif
4701 int main() {
4702 #ifndef $ac_func
4703 char *(*pfn) = (char *(*)) $ac_func ;
4704 #endif
4705 ; return 0; }
4707 if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4708 rm -rf conftest*
4709 eval "gcc_cv_have_decl_$ac_func=yes"
4710 else
4711 echo "configure: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
4713 rm -rf conftest*
4714 eval "gcc_cv_have_decl_$ac_func=no"
4716 rm -f conftest*
4719 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4720 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4721 #define $ac_tr_decl 1
4724 else
4725 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4726 #define $ac_tr_decl 0
4731 done
4732 if test x = y ; then
4733 cat >> confdefs.h <<\EOF
4734 #define HAVE_DECL_GETRLIMIT 1
4736 cat >> confdefs.h <<\EOF
4737 #define HAVE_DECL_SETRLIMIT 1
4739 cat >> confdefs.h <<\EOF
4740 #define HAVE_DECL_GETRUSAGE 1
4745 for ac_func in times
4747 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4748 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4749 echo "configure:4750: checking whether $ac_func is declared" >&5
4750 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4751 echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753 cat > conftest.$ac_ext <<EOF
4754 #line 4755 "configure"
4755 #include "confdefs.h"
4756 #undef $ac_tr_decl
4757 #define $ac_tr_decl 1
4759 #include "ansidecl.h"
4760 #include "system.h"
4761 #ifdef HAVE_SYS_TIMES_H
4762 #include <sys/times.h>
4763 #endif
4766 int main() {
4767 #ifndef $ac_func
4768 char *(*pfn) = (char *(*)) $ac_func ;
4769 #endif
4770 ; return 0; }
4772 if { (eval echo configure:4773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4773 rm -rf conftest*
4774 eval "gcc_cv_have_decl_$ac_func=yes"
4775 else
4776 echo "configure: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4778 rm -rf conftest*
4779 eval "gcc_cv_have_decl_$ac_func=no"
4781 rm -f conftest*
4784 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4785 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4786 #define $ac_tr_decl 1
4789 else
4790 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4791 #define $ac_tr_decl 0
4796 done
4797 if test x = y ; then
4798 cat >> confdefs.h <<\EOF
4799 #define HAVE_DECL_TIMES 1
4804 # More time-related stuff.
4805 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4806 echo "configure:4807: checking for struct tms" >&5
4807 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4808 echo $ac_n "(cached) $ac_c" 1>&6
4809 else
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4815 #include "ansidecl.h"
4816 #include "system.h"
4817 #ifdef HAVE_SYS_TIMES_H
4818 #include <sys/times.h>
4819 #endif
4821 int main() {
4822 struct tms tms;
4823 ; return 0; }
4825 if { (eval echo configure:4826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4826 rm -rf conftest*
4827 ac_cv_struct_tms=yes
4828 else
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4831 rm -rf conftest*
4832 ac_cv_struct_tms=no
4834 rm -f conftest*
4837 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4838 if test $ac_cv_struct_tms = yes; then
4839 cat >> confdefs.h <<\EOF
4840 #define HAVE_STRUCT_TMS 1
4845 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4846 # revisit after autoconf 2.50.
4847 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4848 echo "configure:4849: checking for clock_t" >&5
4849 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4850 echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4853 cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4857 #include "ansidecl.h"
4858 #include "system.h"
4860 int main() {
4861 clock_t x;
4862 ; return 0; }
4864 if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4865 rm -rf conftest*
4866 gcc_cv_type_clock_t=yes
4867 else
4868 echo "configure: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4870 rm -rf conftest*
4871 gcc_cv_type_clock_t=no
4873 rm -f conftest*
4876 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4877 if test $gcc_cv_type_clock_t = yes; then
4878 cat >> confdefs.h <<\EOF
4879 #define HAVE_CLOCK_T 1
4884 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4885 CFLAGS="$saved_CFLAGS"
4887 # mkdir takes a single argument on some systems.
4888 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4889 echo "configure:4890: checking if mkdir takes one argument" >&5
4890 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4891 echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893 cat > conftest.$ac_ext <<EOF
4894 #line 4895 "configure"
4895 #include "confdefs.h"
4897 #include <sys/types.h>
4898 #ifdef HAVE_SYS_STAT_H
4899 # include <sys/stat.h>
4900 #endif
4901 #ifdef HAVE_UNISTD_H
4902 # include <unistd.h>
4903 #endif
4904 #ifdef HAVE_DIRECT_H
4905 # include <direct.h>
4906 #endif
4907 int main() {
4908 mkdir ("foo", 0);
4909 ; return 0; }
4911 if { (eval echo configure:4912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4912 rm -rf conftest*
4913 gcc_cv_mkdir_takes_one_arg=no
4914 else
4915 echo "configure: failed program was:" >&5
4916 cat conftest.$ac_ext >&5
4917 rm -rf conftest*
4918 gcc_cv_mkdir_takes_one_arg=yes
4920 rm -f conftest*
4923 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4924 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4925 cat >> confdefs.h <<\EOF
4926 #define MKDIR_TAKES_ONE_ARG 1
4932 # File extensions
4933 manext='.1'
4934 objext='.o'
4938 build_xm_file=
4939 build_xm_defines=
4940 build_install_headers_dir=install-headers-tar
4941 build_exeext=
4942 host_xm_file=
4943 host_xm_defines=
4944 host_xmake_file=
4945 host_truncate_target=
4946 host_exeext=
4948 # Decode the host machine, then the target machine.
4949 # For the host machine, we save the xm_file variable as host_xm_file;
4950 # then we decode the target machine and forget everything else
4951 # that came from the host machine.
4952 for machine in $build $host $target; do
4953 . ${srcdir}/config.gcc
4954 done
4956 extra_objs="${host_extra_objs} ${extra_objs}"
4958 # Default the target-machine variables that were not explicitly set.
4959 if test x"$tm_file" = x
4960 then tm_file=$cpu_type/$cpu_type.h; fi
4962 if test x"$extra_headers" = x
4963 then extra_headers=; fi
4965 if test x$md_file = x
4966 then md_file=$cpu_type/$cpu_type.md; fi
4968 if test x$out_file = x
4969 then out_file=$cpu_type/$cpu_type.c; fi
4971 if test x"$tmake_file" = x
4972 then tmake_file=$cpu_type/t-$cpu_type
4975 if test x"$dwarf2" = xyes
4976 then tm_file="$tm_file tm-dwarf2.h"
4979 if test x$float_format = x
4980 then float_format=i64
4983 if test $float_format = none
4984 then float_h_file=Makefile.in
4985 else float_h_file=float-$float_format.h
4988 # Handle cpp installation.
4989 if test x$enable_cpp != xno
4990 then
4991 tmake_file="$tmake_file t-install-cpp"
4994 # Say what files are being used for the output code and MD file.
4995 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4996 echo "Using \`$srcdir/config/$md_file' as machine description file."
4998 # If any of the xm_file variables contain nonexistent files, warn
4999 # about them and drop them.
5002 for x in $build_xm_file; do
5003 if test -f $srcdir/config/$x
5004 then bx="$bx $x"
5005 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5007 done
5008 build_xm_file="$bx"
5011 for x in $host_xm_file; do
5012 if test -f $srcdir/config/$x
5013 then hx="$hx $x"
5014 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5016 done
5017 host_xm_file="$hx"
5020 for x in $xm_file; do
5021 if test -f $srcdir/config/$x
5022 then tx="$tx $x"
5023 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5025 done
5026 xm_file="$tx"
5028 count=a
5029 for f in $tm_file; do
5030 count=${count}x
5031 done
5032 if test $count = ax; then
5033 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5034 else
5035 echo "Using the following target machine macro files:"
5036 for f in $tm_file; do
5037 echo " $srcdir/config/$f"
5038 done
5041 count=a
5042 for f in $host_xm_file; do
5043 count=${count}x
5044 done
5045 if test $count = a; then
5047 elif test $count = ax; then
5048 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5049 else
5050 echo "Using the following host machine macro files:"
5051 for f in $host_xm_file; do
5052 echo " $srcdir/config/$f"
5053 done
5056 if test "$host_xm_file" != "$build_xm_file"; then
5057 count=a
5058 for f in $build_xm_file; do
5059 count=${count}x
5060 done
5061 if test $count = a; then
5063 elif test $count = ax; then
5064 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5065 else
5066 echo "Using the following build machine macro files:"
5067 for f in $build_xm_file; do
5068 echo " $srcdir/config/$f"
5069 done
5073 if test x$thread_file = x; then
5074 if test x$target_thread_file != x; then
5075 thread_file=$target_thread_file
5076 else
5077 thread_file='single'
5081 # auto-host.h is the file containing items generated by autoconf and is
5082 # the first file included by config.h.
5083 # If host=build, it is correct to have hconfig include auto-host.h
5084 # as well. If host!=build, we are in error and need to do more
5085 # work to find out the build config parameters.
5086 if test x$host = x$build
5087 then
5088 build_auto=auto-host.h
5089 FORBUILD=..
5090 else
5091 # We create a subdir, then run autoconf in the subdir.
5092 # To prevent recursion we set host and build for the new
5093 # invocation of configure to the build for this invocation
5094 # of configure.
5095 tempdir=build.$$
5096 rm -rf $tempdir
5097 mkdir $tempdir
5098 cd $tempdir
5099 case ${srcdir} in
5100 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5101 *) realsrcdir=../${srcdir};;
5102 esac
5103 saved_CFLAGS="${CFLAGS}"
5104 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5105 ${realsrcdir}/configure \
5106 --target=$target_alias --host=$build_alias --build=$build_alias
5107 CFLAGS="${saved_CFLAGS}"
5109 # We just finished tests for the build machine, so rename
5110 # the file auto-build.h in the gcc directory.
5111 mv auto-host.h ../auto-build.h
5112 cd ..
5113 rm -rf $tempdir
5114 build_auto=auto-build.h
5115 FORBUILD=../$build
5119 tm_file="${tm_file} defaults.h"
5120 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5121 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5122 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5124 # Truncate the target if necessary
5125 if test x$host_truncate_target != x; then
5126 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5129 # Get the version trigger filename from the toplevel
5130 if test "${with_gcc_version_trigger+set}" = set; then
5131 gcc_version_trigger=$with_gcc_version_trigger
5132 else
5133 gcc_version_trigger=${srcdir}/version.c
5135 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5136 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5138 # Compile in configure arguments.
5139 if test -f configargs.h ; then
5140 # Being re-configured.
5141 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5142 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5143 else
5144 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5146 cat > configargs.h <<EOF
5147 /* Generated automatically. */
5148 static const char configuration_arguments[] = "$gcc_config_arguments";
5149 static const char thread_model[] = "$thread_file";
5152 # Internationalization
5153 PACKAGE=gcc
5154 VERSION="$gcc_version"
5158 # Enable NLS support by default
5159 # Check whether --enable-nls or --disable-nls was given.
5160 if test "${enable_nls+set}" = set; then
5161 enableval="$enable_nls"
5163 else
5164 enable_nls=yes
5168 # if cross compiling, disable NLS support.
5169 # It's not worth the trouble, at least for now.
5171 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5172 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5173 enable_nls=no
5178 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5179 echo "configure:5180: checking for library containing strerror" >&5
5180 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183 ac_func_search_save_LIBS="$LIBS"
5184 ac_cv_search_strerror="no"
5185 cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188 /* Override any gcc2 internal prototype to avoid an error. */
5189 /* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5191 char strerror();
5193 int main() {
5194 strerror()
5195 ; return 0; }
5197 if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5198 rm -rf conftest*
5199 ac_cv_search_strerror="none required"
5200 else
5201 echo "configure: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5204 rm -f conftest*
5205 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5206 LIBS="-l$i $ac_func_search_save_LIBS"
5207 cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 /* Override any gcc2 internal prototype to avoid an error. */
5211 /* We use char because int might match the return type of a gcc2
5212 builtin and then its argument prototype would still apply. */
5213 char strerror();
5215 int main() {
5216 strerror()
5217 ; return 0; }
5219 if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5220 rm -rf conftest*
5221 ac_cv_search_strerror="-l$i"
5222 break
5223 else
5224 echo "configure: failed program was:" >&5
5225 cat conftest.$ac_ext >&5
5227 rm -f conftest*
5228 done
5229 LIBS="$ac_func_search_save_LIBS"
5232 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5233 if test "$ac_cv_search_strerror" != "no"; then
5234 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5236 else :
5241 echo $ac_n "checking for working const""... $ac_c" 1>&6
5242 echo "configure:5243: checking for working const" >&5
5243 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5244 echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5250 int main() {
5252 /* Ultrix mips cc rejects this. */
5253 typedef int charset[2]; const charset x;
5254 /* SunOS 4.1.1 cc rejects this. */
5255 char const *const *ccp;
5256 char **p;
5257 /* NEC SVR4.0.2 mips cc rejects this. */
5258 struct point {int x, y;};
5259 static struct point const zero = {0,0};
5260 /* AIX XL C 1.02.0.0 rejects this.
5261 It does not let you subtract one const X* pointer from another in an arm
5262 of an if-expression whose if-part is not a constant expression */
5263 const char *g = "string";
5264 ccp = &g + (g ? g-g : 0);
5265 /* HPUX 7.0 cc rejects these. */
5266 ++ccp;
5267 p = (char**) ccp;
5268 ccp = (char const *const *) p;
5269 { /* SCO 3.2v4 cc rejects this. */
5270 char *t;
5271 char const *s = 0 ? (char *) 0 : (char const *) 0;
5273 *t++ = 0;
5275 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5276 int x[] = {25, 17};
5277 const int *foo = &x[0];
5278 ++foo;
5280 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5281 typedef const int *iptr;
5282 iptr p = 0;
5283 ++p;
5285 { /* AIX XL C 1.02.0.0 rejects this saying
5286 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5287 struct s { int j; const int *ap[3]; };
5288 struct s *b; b->j = 5;
5290 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5291 const int foo = 10;
5294 ; return 0; }
5296 if { (eval echo configure:5297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5297 rm -rf conftest*
5298 ac_cv_c_const=yes
5299 else
5300 echo "configure: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 rm -rf conftest*
5303 ac_cv_c_const=no
5305 rm -f conftest*
5308 echo "$ac_t""$ac_cv_c_const" 1>&6
5309 if test $ac_cv_c_const = no; then
5310 cat >> confdefs.h <<\EOF
5311 #define const
5316 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5317 echo "configure:5318: checking for off_t" >&5
5318 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5319 echo $ac_n "(cached) $ac_c" 1>&6
5320 else
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324 #include <sys/types.h>
5325 #if STDC_HEADERS
5326 #include <stdlib.h>
5327 #include <stddef.h>
5328 #endif
5330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5331 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5332 rm -rf conftest*
5333 ac_cv_type_off_t=yes
5334 else
5335 rm -rf conftest*
5336 ac_cv_type_off_t=no
5338 rm -f conftest*
5341 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5342 if test $ac_cv_type_off_t = no; then
5343 cat >> confdefs.h <<\EOF
5344 #define off_t long
5349 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5350 echo "configure:5351: checking for size_t" >&5
5351 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5352 echo $ac_n "(cached) $ac_c" 1>&6
5353 else
5354 cat > conftest.$ac_ext <<EOF
5355 #line 5356 "configure"
5356 #include "confdefs.h"
5357 #include <sys/types.h>
5358 #if STDC_HEADERS
5359 #include <stdlib.h>
5360 #include <stddef.h>
5361 #endif
5363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5364 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5365 rm -rf conftest*
5366 ac_cv_type_size_t=yes
5367 else
5368 rm -rf conftest*
5369 ac_cv_type_size_t=no
5371 rm -f conftest*
5374 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5375 if test $ac_cv_type_size_t = no; then
5376 cat >> confdefs.h <<\EOF
5377 #define size_t unsigned
5382 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5383 # for constant arguments. Useless!
5384 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5385 echo "configure:5386: checking for working alloca.h" >&5
5386 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5387 echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389 cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 #include <alloca.h>
5393 int main() {
5394 char *p = alloca(2 * sizeof(int));
5395 ; return 0; }
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398 rm -rf conftest*
5399 ac_cv_header_alloca_h=yes
5400 else
5401 echo "configure: failed program was:" >&5
5402 cat conftest.$ac_ext >&5
5403 rm -rf conftest*
5404 ac_cv_header_alloca_h=no
5406 rm -f conftest*
5409 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5410 if test $ac_cv_header_alloca_h = yes; then
5411 cat >> confdefs.h <<\EOF
5412 #define HAVE_ALLOCA_H 1
5417 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5418 echo "configure:5419: checking for alloca" >&5
5419 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5420 echo $ac_n "(cached) $ac_c" 1>&6
5421 else
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5426 #ifdef __GNUC__
5427 # define alloca __builtin_alloca
5428 #else
5429 # ifdef _MSC_VER
5430 # include <malloc.h>
5431 # define alloca _alloca
5432 # else
5433 # if HAVE_ALLOCA_H
5434 # include <alloca.h>
5435 # else
5436 # ifdef _AIX
5437 #pragma alloca
5438 # else
5439 # ifndef alloca /* predefined by HP cc +Olibcalls */
5440 char *alloca ();
5441 # endif
5442 # endif
5443 # endif
5444 # endif
5445 #endif
5447 int main() {
5448 char *p = (char *) alloca(1);
5449 ; return 0; }
5451 if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5452 rm -rf conftest*
5453 ac_cv_func_alloca_works=yes
5454 else
5455 echo "configure: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
5457 rm -rf conftest*
5458 ac_cv_func_alloca_works=no
5460 rm -f conftest*
5463 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5464 if test $ac_cv_func_alloca_works = yes; then
5465 cat >> confdefs.h <<\EOF
5466 #define HAVE_ALLOCA 1
5471 if test $ac_cv_func_alloca_works = no; then
5472 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5473 # that cause trouble. Some versions do not even contain alloca or
5474 # contain a buggy version. If you still want to use their alloca,
5475 # use ar to extract alloca.o from them instead of compiling alloca.c.
5476 ALLOCA=alloca.${ac_objext}
5477 cat >> confdefs.h <<\EOF
5478 #define C_ALLOCA 1
5482 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5483 echo "configure:5484: checking whether alloca needs Cray hooks" >&5
5484 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5485 echo $ac_n "(cached) $ac_c" 1>&6
5486 else
5487 cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5490 #if defined(CRAY) && ! defined(CRAY2)
5491 webecray
5492 #else
5493 wenotbecray
5494 #endif
5497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5498 egrep "webecray" >/dev/null 2>&1; then
5499 rm -rf conftest*
5500 ac_cv_os_cray=yes
5501 else
5502 rm -rf conftest*
5503 ac_cv_os_cray=no
5505 rm -f conftest*
5509 echo "$ac_t""$ac_cv_os_cray" 1>&6
5510 if test $ac_cv_os_cray = yes; then
5511 for ac_func in _getb67 GETB67 getb67; do
5512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5513 echo "configure:5514: checking for $ac_func" >&5
5514 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 /* System header to define __stub macros and hopefully few prototypes,
5521 which can conflict with char $ac_func(); below. */
5522 #include <assert.h>
5523 /* Override any gcc2 internal prototype to avoid an error. */
5524 /* We use char because int might match the return type of a gcc2
5525 builtin and then its argument prototype would still apply. */
5526 char $ac_func();
5528 int main() {
5530 /* The GNU C library defines this for functions which it implements
5531 to always fail with ENOSYS. Some functions are actually named
5532 something starting with __ and the normal name is an alias. */
5533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5534 choke me
5535 #else
5536 $ac_func();
5537 #endif
5539 ; return 0; }
5541 if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5542 rm -rf conftest*
5543 eval "ac_cv_func_$ac_func=yes"
5544 else
5545 echo "configure: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5547 rm -rf conftest*
5548 eval "ac_cv_func_$ac_func=no"
5550 rm -f conftest*
5553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5554 echo "$ac_t""yes" 1>&6
5555 cat >> confdefs.h <<EOF
5556 #define CRAY_STACKSEG_END $ac_func
5559 break
5560 else
5561 echo "$ac_t""no" 1>&6
5564 done
5567 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5568 echo "configure:5569: checking stack direction for C alloca" >&5
5569 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5570 echo $ac_n "(cached) $ac_c" 1>&6
5571 else
5572 if test "$cross_compiling" = yes; then
5573 ac_cv_c_stack_direction=0
5574 else
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 find_stack_direction ()
5580 static char *addr = 0;
5581 auto char dummy;
5582 if (addr == 0)
5584 addr = &dummy;
5585 return find_stack_direction ();
5587 else
5588 return (&dummy > addr) ? 1 : -1;
5590 main ()
5592 exit (find_stack_direction() < 0);
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5596 then
5597 ac_cv_c_stack_direction=1
5598 else
5599 echo "configure: failed program was:" >&5
5600 cat conftest.$ac_ext >&5
5601 rm -fr conftest*
5602 ac_cv_c_stack_direction=-1
5604 rm -fr conftest*
5609 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5610 cat >> confdefs.h <<EOF
5611 #define STACK_DIRECTION $ac_cv_c_stack_direction
5617 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5618 echo "configure:5619: checking whether we are using the GNU C Library 2.1 or newer" >&5
5619 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5620 echo $ac_n "(cached) $ac_c" 1>&6
5621 else
5622 cat > conftest.$ac_ext <<EOF
5623 #line 5624 "configure"
5624 #include "confdefs.h"
5626 #include <features.h>
5627 #ifdef __GNU_LIBRARY__
5628 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5629 Lucky GNU user
5630 #endif
5631 #endif
5634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5635 egrep "Lucky GNU user" >/dev/null 2>&1; then
5636 rm -rf conftest*
5637 ac_cv_gnu_library_2_1=yes
5638 else
5639 rm -rf conftest*
5640 ac_cv_gnu_library_2_1=no
5642 rm -f conftest*
5648 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5650 GLIBC21="$ac_cv_gnu_library_2_1"
5654 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5655 stdlib.h string.h unistd.h sys/param.h
5657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5659 echo "configure:5660: checking for $ac_hdr" >&5
5660 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5661 echo $ac_n "(cached) $ac_c" 1>&6
5662 else
5663 cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666 #include <$ac_hdr>
5668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5669 { (eval echo configure:5670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5671 if test -z "$ac_err"; then
5672 rm -rf conftest*
5673 eval "ac_cv_header_$ac_safe=yes"
5674 else
5675 echo "$ac_err" >&5
5676 echo "configure: failed program was:" >&5
5677 cat conftest.$ac_ext >&5
5678 rm -rf conftest*
5679 eval "ac_cv_header_$ac_safe=no"
5681 rm -f conftest*
5683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5684 echo "$ac_t""yes" 1>&6
5685 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5686 cat >> confdefs.h <<EOF
5687 #define $ac_tr_hdr 1
5690 else
5691 echo "$ac_t""no" 1>&6
5693 done
5695 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5696 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5697 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5700 echo "configure:5701: checking for $ac_func" >&5
5701 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5702 echo $ac_n "(cached) $ac_c" 1>&6
5703 else
5704 cat > conftest.$ac_ext <<EOF
5705 #line 5706 "configure"
5706 #include "confdefs.h"
5707 /* System header to define __stub macros and hopefully few prototypes,
5708 which can conflict with char $ac_func(); below. */
5709 #include <assert.h>
5710 /* Override any gcc2 internal prototype to avoid an error. */
5711 /* We use char because int might match the return type of a gcc2
5712 builtin and then its argument prototype would still apply. */
5713 char $ac_func();
5715 int main() {
5717 /* The GNU C library defines this for functions which it implements
5718 to always fail with ENOSYS. Some functions are actually named
5719 something starting with __ and the normal name is an alias. */
5720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5721 choke me
5722 #else
5723 $ac_func();
5724 #endif
5726 ; return 0; }
5728 if { (eval echo configure:5729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5729 rm -rf conftest*
5730 eval "ac_cv_func_$ac_func=yes"
5731 else
5732 echo "configure: failed program was:" >&5
5733 cat conftest.$ac_ext >&5
5734 rm -rf conftest*
5735 eval "ac_cv_func_$ac_func=no"
5737 rm -f conftest*
5740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5741 echo "$ac_t""yes" 1>&6
5742 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5743 cat >> confdefs.h <<EOF
5744 #define $ac_tr_func 1
5747 else
5748 echo "$ac_t""no" 1>&6
5750 done
5755 am_cv_lib_iconv_ldpath=
5756 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5757 if test "${with_libiconv_prefix+set}" = set; then
5758 withval="$with_libiconv_prefix"
5760 for dir in `echo "$withval" | tr : ' '`; do
5761 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5762 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5763 done
5768 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5769 echo "configure:5770: checking for iconv" >&5
5770 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5771 echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5774 am_cv_func_iconv="no, consider installing GNU libiconv"
5775 am_cv_lib_iconv=no
5776 cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 #include <stdlib.h>
5780 #include <iconv.h>
5781 int main() {
5782 iconv_t cd = iconv_open("","");
5783 iconv(cd,NULL,NULL,NULL,NULL);
5784 iconv_close(cd);
5785 ; return 0; }
5787 if { (eval echo configure:5788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5788 rm -rf conftest*
5789 am_cv_func_iconv=yes
5790 else
5791 echo "configure: failed program was:" >&5
5792 cat conftest.$ac_ext >&5
5794 rm -f conftest*
5795 if test "$am_cv_func_iconv" != yes; then
5796 am_save_LIBS="$LIBS"
5797 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5798 cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 #include <stdlib.h>
5802 #include <iconv.h>
5803 int main() {
5804 iconv_t cd = iconv_open("","");
5805 iconv(cd,NULL,NULL,NULL,NULL);
5806 iconv_close(cd);
5807 ; return 0; }
5809 if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5810 rm -rf conftest*
5811 am_cv_lib_iconv=yes
5812 am_cv_func_iconv=yes
5813 else
5814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
5817 rm -f conftest*
5818 LIBS="$am_save_LIBS"
5823 echo "$ac_t""$am_cv_func_iconv" 1>&6
5824 if test "$am_cv_func_iconv" = yes; then
5825 cat >> confdefs.h <<\EOF
5826 #define HAVE_ICONV 1
5829 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5830 echo "configure:5831: checking for iconv declaration" >&5
5831 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5832 echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5835 cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5839 #include <stdlib.h>
5840 #include <iconv.h>
5841 extern
5842 #ifdef __cplusplus
5844 #endif
5845 #if defined(__STDC__) || defined(__cplusplus)
5846 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5847 #else
5848 size_t iconv();
5849 #endif
5851 int main() {
5853 ; return 0; }
5855 if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5856 rm -rf conftest*
5857 am_cv_proto_iconv_arg1=""
5858 else
5859 echo "configure: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5861 rm -rf conftest*
5862 am_cv_proto_iconv_arg1="const"
5864 rm -f conftest*
5865 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);"
5868 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5869 echo "$ac_t""${ac_t:-
5870 }$am_cv_proto_iconv" 1>&6
5871 cat >> confdefs.h <<EOF
5872 #define ICONV_CONST $am_cv_proto_iconv_arg1
5876 LIBICONV=
5877 if test "$am_cv_lib_iconv" = yes; then
5878 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5883 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
5884 echo "configure:5885: checking for nl_langinfo and CODESET" >&5
5885 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
5886 echo $ac_n "(cached) $ac_c" 1>&6
5887 else
5888 cat > conftest.$ac_ext <<EOF
5889 #line 5890 "configure"
5890 #include "confdefs.h"
5891 #include <langinfo.h>
5892 int main() {
5893 char* cs = nl_langinfo(CODESET);
5894 ; return 0; }
5896 if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5897 rm -rf conftest*
5898 am_cv_langinfo_codeset=yes
5899 else
5900 echo "configure: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 rm -rf conftest*
5903 am_cv_langinfo_codeset=no
5905 rm -f conftest*
5909 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5910 if test $am_cv_langinfo_codeset = yes; then
5911 cat >> confdefs.h <<\EOF
5912 #define HAVE_LANGINFO_CODESET 1
5917 if test $ac_cv_header_locale_h = yes; then
5918 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5919 echo "configure:5920: checking for LC_MESSAGES" >&5
5920 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5921 echo $ac_n "(cached) $ac_c" 1>&6
5922 else
5923 cat > conftest.$ac_ext <<EOF
5924 #line 5925 "configure"
5925 #include "confdefs.h"
5926 #include <locale.h>
5927 int main() {
5928 return LC_MESSAGES
5929 ; return 0; }
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5932 rm -rf conftest*
5933 am_cv_val_LC_MESSAGES=yes
5934 else
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
5937 rm -rf conftest*
5938 am_cv_val_LC_MESSAGES=no
5940 rm -f conftest*
5943 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5944 if test $am_cv_val_LC_MESSAGES = yes; then
5945 cat >> confdefs.h <<\EOF
5946 #define HAVE_LC_MESSAGES 1
5951 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5952 echo "configure:5953: checking whether NLS is requested" >&5
5953 # Check whether --enable-nls or --disable-nls was given.
5954 if test "${enable_nls+set}" = set; then
5955 enableval="$enable_nls"
5956 USE_NLS=$enableval
5957 else
5958 USE_NLS=yes
5961 echo "$ac_t""$USE_NLS" 1>&6
5964 BUILD_INCLUDED_LIBINTL=no
5965 USE_INCLUDED_LIBINTL=no
5966 INTLLIBS=
5967 INTLDEPS=
5969 if test "$USE_NLS" = "yes"; then
5970 cat >> confdefs.h <<\EOF
5971 #define ENABLE_NLS 1
5974 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5975 echo "configure:5976: checking whether included gettext is requested" >&5
5976 # Check whether --with-included-gettext or --without-included-gettext was given.
5977 if test "${with_included_gettext+set}" = set; then
5978 withval="$with_included_gettext"
5979 nls_cv_force_use_gnu_gettext=$withval
5980 else
5981 nls_cv_force_use_gnu_gettext=no
5984 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5986 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5987 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5988 CATOBJEXT=NONE
5993 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5994 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5995 echo "configure:5996: checking for libintl.h" >&5
5996 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5997 echo $ac_n "(cached) $ac_c" 1>&6
5998 else
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002 #include <libintl.h>
6004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6005 { (eval echo configure:6006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6007 if test -z "$ac_err"; then
6008 rm -rf conftest*
6009 eval "ac_cv_header_$ac_safe=yes"
6010 else
6011 echo "$ac_err" >&5
6012 echo "configure: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6014 rm -rf conftest*
6015 eval "ac_cv_header_$ac_safe=no"
6017 rm -f conftest*
6019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6020 echo "$ac_t""yes" 1>&6
6021 cat >> confdefs.h <<\EOF
6022 #define HAVE_LIBINTL_H 1
6025 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6026 echo "configure:6027: checking for GNU gettext in libc" >&5
6027 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6028 echo $ac_n "(cached) $ac_c" 1>&6
6029 else
6030 cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033 #include <libintl.h>
6034 extern int _nl_msg_cat_cntr;
6035 int main() {
6036 bindtextdomain ("", "");
6037 return (int) gettext ("") + _nl_msg_cat_cntr
6038 ; return 0; }
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041 rm -rf conftest*
6042 gt_cv_func_gnugettext1_libc=yes
6043 else
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 rm -rf conftest*
6047 gt_cv_func_gnugettext1_libc=no
6049 rm -f conftest*
6052 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6054 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6055 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6056 echo "configure:6057: checking for GNU gettext in libintl" >&5
6057 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6058 echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060 gt_save_LIBS="$LIBS"
6061 LIBS="$LIBS -lintl $LIBICONV"
6062 cat > conftest.$ac_ext <<EOF
6063 #line 6064 "configure"
6064 #include "confdefs.h"
6065 #include <libintl.h>
6066 extern int _nl_msg_cat_cntr;
6067 int main() {
6068 bindtextdomain ("", "");
6069 return (int) gettext ("") + _nl_msg_cat_cntr
6070 ; return 0; }
6072 if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6073 rm -rf conftest*
6074 gt_cv_func_gnugettext1_libintl=yes
6075 else
6076 echo "configure: failed program was:" >&5
6077 cat conftest.$ac_ext >&5
6078 rm -rf conftest*
6079 gt_cv_func_gnugettext1_libintl=no
6081 rm -f conftest*
6082 LIBS="$gt_save_LIBS"
6085 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6088 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6089 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6090 && test "$PACKAGE" != gettext; }; then
6091 cat >> confdefs.h <<\EOF
6092 #define HAVE_GETTEXT 1
6096 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6097 INTLLIBS="-lintl $LIBICONV"
6100 gt_save_LIBS="$LIBS"
6101 LIBS="$LIBS $INTLLIBS"
6102 for ac_func in dcgettext
6104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6105 echo "configure:6106: checking for $ac_func" >&5
6106 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6107 echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109 cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 /* System header to define __stub macros and hopefully few prototypes,
6113 which can conflict with char $ac_func(); below. */
6114 #include <assert.h>
6115 /* Override any gcc2 internal prototype to avoid an error. */
6116 /* We use char because int might match the return type of a gcc2
6117 builtin and then its argument prototype would still apply. */
6118 char $ac_func();
6120 int main() {
6122 /* The GNU C library defines this for functions which it implements
6123 to always fail with ENOSYS. Some functions are actually named
6124 something starting with __ and the normal name is an alias. */
6125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6126 choke me
6127 #else
6128 $ac_func();
6129 #endif
6131 ; return 0; }
6133 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6134 rm -rf conftest*
6135 eval "ac_cv_func_$ac_func=yes"
6136 else
6137 echo "configure: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6139 rm -rf conftest*
6140 eval "ac_cv_func_$ac_func=no"
6142 rm -f conftest*
6145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6146 echo "$ac_t""yes" 1>&6
6147 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6148 cat >> confdefs.h <<EOF
6149 #define $ac_tr_func 1
6152 else
6153 echo "$ac_t""no" 1>&6
6155 done
6157 LIBS="$gt_save_LIBS"
6159 # Extract the first word of "msgfmt", so it can be a program name with args.
6160 set dummy msgfmt; ac_word=$2
6161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6162 echo "configure:6163: checking for $ac_word" >&5
6163 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6164 echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166 case "$MSGFMT" in
6168 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6172 for ac_dir in $PATH; do
6173 test -z "$ac_dir" && ac_dir=.
6174 if test -f $ac_dir/$ac_word; then
6175 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6176 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6177 break
6180 done
6181 IFS="$ac_save_ifs"
6182 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6184 esac
6186 MSGFMT="$ac_cv_path_MSGFMT"
6187 if test "$MSGFMT" != ":"; then
6188 echo "$ac_t""$MSGFMT" 1>&6
6189 else
6190 echo "$ac_t""no" 1>&6
6193 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6194 set dummy gmsgfmt; ac_word=$2
6195 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6196 echo "configure:6197: checking for $ac_word" >&5
6197 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6198 echo $ac_n "(cached) $ac_c" 1>&6
6199 else
6200 case "$GMSGFMT" in
6202 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6204 ?:/*)
6205 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6209 ac_dummy="$PATH"
6210 for ac_dir in $ac_dummy; do
6211 test -z "$ac_dir" && ac_dir=.
6212 if test -f $ac_dir/$ac_word; then
6213 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6214 break
6216 done
6217 IFS="$ac_save_ifs"
6218 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6220 esac
6222 GMSGFMT="$ac_cv_path_GMSGFMT"
6223 if test -n "$GMSGFMT"; then
6224 echo "$ac_t""$GMSGFMT" 1>&6
6225 else
6226 echo "$ac_t""no" 1>&6
6230 # Extract the first word of "xgettext", so it can be a program name with args.
6231 set dummy xgettext; ac_word=$2
6232 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6233 echo "configure:6234: checking for $ac_word" >&5
6234 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6235 echo $ac_n "(cached) $ac_c" 1>&6
6236 else
6237 case "$XGETTEXT" in
6239 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6242 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6243 for ac_dir in $PATH; do
6244 test -z "$ac_dir" && ac_dir=.
6245 if test -f $ac_dir/$ac_word; then
6246 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6247 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6248 break
6251 done
6252 IFS="$ac_save_ifs"
6253 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6255 esac
6257 XGETTEXT="$ac_cv_path_XGETTEXT"
6258 if test "$XGETTEXT" != ":"; then
6259 echo "$ac_t""$XGETTEXT" 1>&6
6260 else
6261 echo "$ac_t""no" 1>&6
6265 CATOBJEXT=.gmo
6268 else
6269 echo "$ac_t""no" 1>&6
6273 if test "$CATOBJEXT" = "NONE"; then
6274 nls_cv_use_gnu_gettext=yes
6278 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6279 INTLOBJS="\$(GETTOBJS)"
6280 # Extract the first word of "msgfmt", so it can be a program name with args.
6281 set dummy msgfmt; ac_word=$2
6282 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6283 echo "configure:6284: checking for $ac_word" >&5
6284 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6285 echo $ac_n "(cached) $ac_c" 1>&6
6286 else
6287 case "$MSGFMT" in
6289 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6292 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6293 for ac_dir in $PATH; do
6294 test -z "$ac_dir" && ac_dir=.
6295 if test -f $ac_dir/$ac_word; then
6296 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6297 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6298 break
6301 done
6302 IFS="$ac_save_ifs"
6303 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6305 esac
6307 MSGFMT="$ac_cv_path_MSGFMT"
6308 if test "$MSGFMT" != ":"; then
6309 echo "$ac_t""$MSGFMT" 1>&6
6310 else
6311 echo "$ac_t""no" 1>&6
6314 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6315 set dummy gmsgfmt; ac_word=$2
6316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6317 echo "configure:6318: checking for $ac_word" >&5
6318 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6319 echo $ac_n "(cached) $ac_c" 1>&6
6320 else
6321 case "$GMSGFMT" in
6323 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6325 ?:/*)
6326 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6329 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6330 ac_dummy="$PATH"
6331 for ac_dir in $ac_dummy; do
6332 test -z "$ac_dir" && ac_dir=.
6333 if test -f $ac_dir/$ac_word; then
6334 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6335 break
6337 done
6338 IFS="$ac_save_ifs"
6339 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6341 esac
6343 GMSGFMT="$ac_cv_path_GMSGFMT"
6344 if test -n "$GMSGFMT"; then
6345 echo "$ac_t""$GMSGFMT" 1>&6
6346 else
6347 echo "$ac_t""no" 1>&6
6350 # Extract the first word of "xgettext", so it can be a program name with args.
6351 set dummy xgettext; ac_word=$2
6352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6353 echo "configure:6354: checking for $ac_word" >&5
6354 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6355 echo $ac_n "(cached) $ac_c" 1>&6
6356 else
6357 case "$XGETTEXT" in
6359 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6362 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6363 for ac_dir in $PATH; do
6364 test -z "$ac_dir" && ac_dir=.
6365 if test -f $ac_dir/$ac_word; then
6366 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6367 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6368 break
6371 done
6372 IFS="$ac_save_ifs"
6373 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6375 esac
6377 XGETTEXT="$ac_cv_path_XGETTEXT"
6378 if test "$XGETTEXT" != ":"; then
6379 echo "$ac_t""$XGETTEXT" 1>&6
6380 else
6381 echo "$ac_t""no" 1>&6
6385 BUILD_INCLUDED_LIBINTL=yes
6386 USE_INCLUDED_LIBINTL=yes
6387 CATOBJEXT=.gmo
6388 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6389 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6390 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6393 if test "$GMSGFMT" != ":"; then
6394 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6396 else
6397 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6398 GMSGFMT=":"
6402 if test "$XGETTEXT" != ":"; then
6403 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6405 else
6406 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6407 XGETTEXT=":"
6411 POSUB=po
6416 if test "$PACKAGE" = gettext; then
6417 BUILD_INCLUDED_LIBINTL=yes
6420 for ac_prog in bison
6422 # Extract the first word of "$ac_prog", so it can be a program name with args.
6423 set dummy $ac_prog; ac_word=$2
6424 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6425 echo "configure:6426: checking for $ac_word" >&5
6426 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6427 echo $ac_n "(cached) $ac_c" 1>&6
6428 else
6429 if test -n "$INTLBISON"; then
6430 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6431 else
6432 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6433 ac_dummy="$PATH"
6434 for ac_dir in $ac_dummy; do
6435 test -z "$ac_dir" && ac_dir=.
6436 if test -f $ac_dir/$ac_word; then
6437 ac_cv_prog_INTLBISON="$ac_prog"
6438 break
6440 done
6441 IFS="$ac_save_ifs"
6444 INTLBISON="$ac_cv_prog_INTLBISON"
6445 if test -n "$INTLBISON"; then
6446 echo "$ac_t""$INTLBISON" 1>&6
6447 else
6448 echo "$ac_t""no" 1>&6
6451 test -n "$INTLBISON" && break
6452 done
6454 if test -z "$INTLBISON"; then
6455 ac_verc_fail=yes
6456 else
6457 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6458 echo "configure:6459: checking version of bison" >&5
6459 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6460 case $ac_prog_version in
6461 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6462 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6463 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6464 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6465 esac
6466 echo "$ac_t""$ac_prog_version" 1>&6
6468 if test $ac_verc_fail = yes; then
6469 INTLBISON=:
6481 if test $USE_INCLUDED_LIBINTL = yes; then
6482 cat >> confdefs.h <<\EOF
6483 #define USE_INCLUDED_LIBINTL 1
6488 nls_cv_header_intl=
6489 nls_cv_header_libgt=
6491 DATADIRNAME=share
6494 INSTOBJEXT=.mo
6497 GENCAT=gencat
6501 if test "x$CATOBJEXT" != x; then
6502 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6503 echo "configure:6504: checking for catalogs to be installed" >&5
6504 # Look for .po and .gmo files in the source directory.
6505 CATALOGS=
6506 XLINGUAS=
6507 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6508 # If there aren't any .gmo files the shell will give us the
6509 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6510 # weeded out.
6511 case "$cat" in *\**)
6512 continue;;
6513 esac
6514 # The quadruple backslash is collapsed to a double backslash
6515 # by the backticks, then collapsed again by the double quotes,
6516 # leaving us with one backslash in the sed expression (right
6517 # before the dot that mustn't act as a wildcard). The dot to
6518 # be escaped in the second expression is hiding inside CATOBJEXT.
6519 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6520 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6521 # The user is allowed to set LINGUAS to a list of languages to
6522 # install catalogs for. If it's empty that means "all of them."
6523 if test "x$LINGUAS" = x; then
6524 CATALOGS="$CATALOGS $cat"
6525 XLINGUAS="$XLINGUAS $lang"
6526 else
6527 case "$LINGUAS" in *$lang*)
6528 CATALOGS="$CATALOGS $cat"
6529 XLINGUAS="$XLINGUAS $lang"
6531 esac
6533 done
6534 LINGUAS="$XLINGUAS"
6535 echo "$ac_t""$LINGUAS" 1>&6
6538 MKINSTALLDIRS=
6539 if test -n "$ac_aux_dir"; then
6540 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6542 if test -z "$MKINSTALLDIRS"; then
6543 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6547 INTL_LIBTOOL_SUFFIX_PREFIX=
6551 # Windows32 Registry support for specifying GCC installation paths.
6552 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6553 if test "${enable_win32_registry+set}" = set; then
6554 enableval="$enable_win32_registry"
6558 case $host_os in
6559 win32 | pe | cygwin* | mingw32* | uwin*)
6560 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6561 echo "configure:6562: checking whether windows registry support is requested" >&5
6562 if test "x$enable_win32_registry" != xno; then
6563 cat >> confdefs.h <<\EOF
6564 #define ENABLE_WIN32_REGISTRY 1
6567 echo "$ac_t""yes" 1>&6
6569 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6570 echo "configure:6571: checking for library containing RegOpenKeyExA" >&5
6571 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6572 echo $ac_n "(cached) $ac_c" 1>&6
6573 else
6574 ac_func_search_save_LIBS="$LIBS"
6575 ac_cv_search_RegOpenKeyExA="no"
6576 cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* Override any gcc2 internal prototype to avoid an error. */
6580 /* We use char because int might match the return type of a gcc2
6581 builtin and then its argument prototype would still apply. */
6582 char RegOpenKeyExA();
6584 int main() {
6585 RegOpenKeyExA()
6586 ; return 0; }
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589 rm -rf conftest*
6590 ac_cv_search_RegOpenKeyExA="none required"
6591 else
6592 echo "configure: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6595 rm -f conftest*
6596 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6597 LIBS="-l$i $ac_func_search_save_LIBS"
6598 cat > conftest.$ac_ext <<EOF
6599 #line 6600 "configure"
6600 #include "confdefs.h"
6601 /* Override any gcc2 internal prototype to avoid an error. */
6602 /* We use char because int might match the return type of a gcc2
6603 builtin and then its argument prototype would still apply. */
6604 char RegOpenKeyExA();
6606 int main() {
6607 RegOpenKeyExA()
6608 ; return 0; }
6610 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6611 rm -rf conftest*
6612 ac_cv_search_RegOpenKeyExA="-l$i"
6613 break
6614 else
6615 echo "configure: failed program was:" >&5
6616 cat conftest.$ac_ext >&5
6618 rm -f conftest*
6619 done
6620 LIBS="$ac_func_search_save_LIBS"
6623 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6624 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6625 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6627 else :
6630 else
6631 echo "$ac_t""no" 1>&6
6634 # Check if user specified a different registry key.
6635 case "x${enable_win32_registry}" in
6636 x | xyes)
6637 # default.
6638 gcc_cv_win32_registry_key="$VERSION"
6640 xno)
6641 # no registry lookup.
6642 gcc_cv_win32_registry_key=''
6645 # user-specified key.
6646 gcc_cv_win32_registry_key="$enable_win32_registry"
6648 esac
6650 if test "x$enable_win32_registry" != xno; then
6651 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6652 echo "configure:6653: checking registry key on windows hosts" >&5
6653 cat >> confdefs.h <<EOF
6654 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6657 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6660 esac
6662 # Get an absolute path to the GCC top-level source directory
6663 holddir=`${PWDCMD-pwd}`
6664 cd $srcdir
6665 topdir=`${PWDCMD-pwd}`
6666 cd $holddir
6668 # Conditionalize the makefile for this host machine.
6669 # Make-host contains the concatenation of all host makefile fragments
6670 # [there can be more than one]. This file is built by configure.frag.
6671 host_overrides=Make-host
6672 dep_host_xmake_file=
6673 for f in .. ${host_xmake_file}
6675 if test -f ${srcdir}/config/$f
6676 then
6677 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6679 done
6681 # Conditionalize the makefile for this target machine.
6682 # Make-target contains the concatenation of all host makefile fragments
6683 # [there can be more than one]. This file is built by configure.frag.
6684 target_overrides=Make-target
6685 dep_tmake_file=
6686 for f in .. ${tmake_file}
6688 if test -f ${srcdir}/config/$f
6689 then
6690 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6692 done
6694 # If the host doesn't support symlinks, modify CC in
6695 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6696 # Otherwise, we can use "CC=$(CC)".
6697 rm -f symtest.tem
6698 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6699 then
6700 cc_set_by_configure="\$(CC)"
6701 quoted_cc_set_by_configure="\$(CC)"
6702 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6703 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6704 else
6705 rm -f symtest.tem
6706 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6707 then
6708 symbolic_link="cp -p"
6709 else
6710 symbolic_link="cp"
6712 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6713 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6714 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6715 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6717 rm -f symtest.tem
6719 out_object_file=`basename $out_file .c`.o
6721 tm_file_list=
6722 for f in $tm_file; do
6723 case $f in
6724 ansidecl.h )
6725 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6726 defaults.h )
6727 tm_file_list="${tm_file_list} $f" ;;
6728 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6729 esac
6730 done
6732 tm_p_file_list=
6733 for f in $tm_p_file; do
6734 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6735 done
6737 host_xm_file_list=
6738 for f in $host_xm_file; do
6739 case $f in
6740 ansidecl.h )
6741 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6742 auto-host.h | defaults.h )
6743 host_xm_file_list="${host_xm_file_list} $f" ;;
6744 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6745 esac
6746 done
6748 build_xm_file_list=
6749 for f in $build_xm_file; do
6750 case $f in
6751 ansidecl.h )
6752 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6753 auto-build.h | auto-host.h | defaults.h )
6754 build_xm_file_list="${build_xm_file_list} $f" ;;
6755 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6756 esac
6757 done
6759 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6760 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6761 CROSS=
6762 ALL=all.internal
6763 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6764 if test x$host != x$target
6765 then
6766 CROSS="-DCROSS_COMPILE"
6767 ALL=all.cross
6768 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6769 case "$host","$target" in
6770 i?86-*-*,x86_64-*-* \
6771 | powerpc*-*-*,powerpc64*-*-*)
6772 CROSS="$CROSS -DNATIVE_CROSS" ;;
6773 esac
6776 # If this is a cross-compiler that does not
6777 # have its own set of headers then define
6778 # inhibit_libc
6780 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6781 # This prevents libgcc2 from containing any code which requires libc
6782 # support.
6783 inhibit_libc=
6784 if test x$host != x$target && test x$with_headers = x; then
6785 inhibit_libc=-Dinhibit_libc
6786 else
6787 if test x$with_newlib = xyes; then
6788 inhibit_libc=-Dinhibit_libc
6793 # When building gcc with a cross-compiler, we need to adjust things so
6794 # that the generator programs are still built with the native compiler.
6795 # Also, we cannot run fixincludes or fix-header.
6796 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6797 # FIXME.
6799 # These are the normal (build=host) settings:
6800 HOST_PREFIX=
6801 HOST_PREFIX_1=ignore-
6802 HOST_CC='$(CC)'
6803 HOST_CFLAGS='$(ALL_CFLAGS)'
6805 STMP_FIXINC=stmp-fixinc
6806 STMP_FIXPROTO=stmp-fixproto
6808 # And these apply if build != host.
6809 if test x$build != x$host
6810 then
6811 HOST_PREFIX=build-
6812 HOST_PREFIX_1=build-
6813 HOST_CC='$(CC_FOR_BUILD)'
6814 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6816 STMP_FIXINC=
6817 STMP_FIXPROTO=
6820 # Expand extra_headers to include complete path.
6821 # This substitutes for lots of t-* files.
6822 extra_headers_list=
6823 if test "x$extra_headers" = x
6824 then true
6825 else
6826 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
6827 for file in $extra_headers;
6829 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
6830 done
6833 if test x$use_collect2 = xno; then
6834 use_collect2=
6837 # Add a definition of USE_COLLECT2 if system wants one.
6838 if test x$use_collect2 != x
6839 then
6840 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6841 xm_defines="${xm_defines} USE_COLLECT2"
6844 # If we have gas in the build tree, make a link to it.
6845 if test -f ../gas/Makefile; then
6846 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6849 # If we have nm and objdump in the build tree, make a link to them.
6850 if test -f ../binutils/Makefile; then
6851 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6852 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
6855 # If we have ld in the build tree, make a link to it.
6856 if test -f ../ld/Makefile; then
6857 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6860 # Figure out what assembler we will be using.
6861 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6862 echo "configure:6863: checking what assembler to use" >&5
6863 gcc_cv_as=
6864 gcc_cv_gas_major_version=
6865 gcc_cv_gas_minor_version=
6866 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6867 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6868 if test -x "$DEFAULT_ASSEMBLER"; then
6869 gcc_cv_as="$DEFAULT_ASSEMBLER"
6870 elif test -x "$AS"; then
6871 gcc_cv_as="$AS"
6872 elif test -x as$host_exeext; then
6873 # Build using assembler in the current directory.
6874 gcc_cv_as=./as$host_exeext
6875 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6876 # Single tree build which includes gas.
6877 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
6879 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6880 if test x$gcc_cv_gas_version != x; then
6881 break
6883 done
6884 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6885 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6886 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
6889 if test "x$gcc_cv_as" = x; then
6890 # Search the same directories that the installed compiler will
6891 # search. Else we may find the wrong assembler and lose. If we
6892 # do not find a suitable assembler binary, then try the user's
6893 # path.
6895 # Also note we have to check MD_EXEC_PREFIX before checking the
6896 # user's path. Unfortunately, there is no good way to get at the
6897 # value of MD_EXEC_PREFIX here. So we do a brute force search
6898 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6899 # to be fixed as part of the make/configure rewrite too.
6901 if test "x$exec_prefix" = xNONE; then
6902 if test "x$prefix" = xNONE; then
6903 test_prefix=/usr/local
6904 else
6905 test_prefix=$prefix
6907 else
6908 test_prefix=$exec_prefix
6911 # If the loop below does not find an assembler, then use whatever
6912 # one we can find in the users's path.
6913 # user's path.
6914 if test "x$program_prefix" != xNONE; then
6915 gcc_cv_as=${program_prefix}as$host_exeext
6916 else
6917 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
6920 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
6921 $test_prefix/lib/gcc-lib/$target_alias \
6922 /usr/lib/gcc/$target_alias/$gcc_version \
6923 /usr/lib/gcc/$target_alias \
6924 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
6925 $test_prefix/$target_alias/bin"
6927 if test x$host = x$target; then
6928 test_dirs="$test_dirs \
6929 /usr/libexec \
6930 /usr/ccs/gcc \
6931 /usr/ccs/bin \
6932 /udk/usr/ccs/bin \
6933 /bsd43/usr/lib/cmplrs/cc \
6934 /usr/cross64/usr/bin \
6935 /usr/lib/cmplrs/cc \
6936 /sysv/usr/lib/cmplrs/cc \
6937 /svr4/usr/lib/cmplrs/cc \
6938 /usr/bin"
6941 for dir in $test_dirs; do
6942 if test -x $dir/as$host_exeext; then
6943 gcc_cv_as=$dir/as$host_exeext
6944 break;
6946 done
6948 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6949 echo "$ac_t"""newly built gas"" 1>&6
6950 else
6951 echo "$ac_t""$gcc_cv_as" 1>&6
6954 # Figure out what linker we will be using.
6955 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
6956 echo "configure:6957: checking what linker to use" >&5
6957 gcc_cv_ld=
6958 gcc_cv_gld_major_version=
6959 gcc_cv_gld_minor_version=
6960 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
6961 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
6962 if test -x "$DEFAULT_LINKER"; then
6963 gcc_cv_ld="$DEFAULT_LINKER"
6964 elif test -x "$LD"; then
6965 gcc_cv_ld="$LD"
6966 elif test -x ld$host_exeext; then
6967 # Build using linker in the current directory.
6968 gcc_cv_ld=./ld$host_exeext
6969 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
6970 # Single tree build which includes ld.
6971 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
6973 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6974 if test x$gcc_cv_gld_version != x; then
6975 break
6977 done
6978 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
6979 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6982 if test "x$gcc_cv_ld" = x; then
6983 # Search the same directories that the installed compiler will
6984 # search. Else we may find the wrong linker and lose. If we
6985 # do not find a suitable linker binary, then try the user's
6986 # path.
6988 # Also note we have to check MD_EXEC_PREFIX before checking the
6989 # user's path. Unfortunately, there is no good way to get at the
6990 # value of MD_EXEC_PREFIX here. So we do a brute force search
6991 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6992 # to be fixed as part of the make/configure rewrite too.
6994 if test "x$exec_prefix" = xNONE; then
6995 if test "x$prefix" = xNONE; then
6996 test_prefix=/usr/local
6997 else
6998 test_prefix=$prefix
7000 else
7001 test_prefix=$exec_prefix
7004 # If the loop below does not find an linker, then use whatever
7005 # one we can find in the users's path.
7006 # user's path.
7007 if test "x$program_prefix" != xNONE; then
7008 gcc_cv_ld=${program_prefix}ld$host_exeext
7009 else
7010 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7013 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7014 $test_prefix/lib/gcc-lib/$target_alias \
7015 /usr/lib/gcc/$target_alias/$gcc_version \
7016 /usr/lib/gcc/$target_alias \
7017 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7018 $test_prefix/$target_alias/bin"
7020 if test x$host = x$target; then
7021 test_dirs="$test_dirs \
7022 /usr/libexec \
7023 /usr/ccs/gcc \
7024 /usr/ccs/bin \
7025 /udk/usr/ccs/bin \
7026 /bsd43/usr/lib/cmplrs/cc \
7027 /usr/cross64/usr/bin \
7028 /usr/lib/cmplrs/cc \
7029 /sysv/usr/lib/cmplrs/cc \
7030 /svr4/usr/lib/cmplrs/cc \
7031 /usr/bin"
7034 for dir in $test_dirs; do
7035 if test -x $dir/ld$host_exeext; then
7036 gcc_cv_ld=$dir/ld$host_exeext
7037 break;
7039 done
7041 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7042 echo "$ac_t"""newly built ld"" 1>&6
7043 else
7044 echo "$ac_t""$gcc_cv_ld" 1>&6
7047 # Figure out what nm we will be using.
7048 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7049 echo "configure:7050: checking what nm to use" >&5
7050 if test -x nm$host_exeext; then
7051 gcc_cv_nm=./nm$host_exeext
7052 elif test "x$program_prefix" != xNONE; then
7053 gcc_cv_nm=${program_prefix}nm$host_exeext
7054 else
7055 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7057 echo "$ac_t""$gcc_cv_nm" 1>&6
7059 # Figure out what objdump we will be using.
7060 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7061 echo "configure:7062: checking what objdump to use" >&5
7062 if test -x objdump$host_exeext; then
7063 gcc_cv_objdump=./objdump$host_exeext
7064 elif test "x$program_prefix" != xNONE; then
7065 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7066 else
7067 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7069 echo "$ac_t""$gcc_cv_objdump" 1>&6
7071 # Figure out what assembler alignment features are present.
7072 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7073 echo "configure:7074: checking assembler alignment features" >&5
7074 gcc_cv_as_alignment_features=none
7075 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7076 # Gas version 2.6 and later support for .balign and .p2align.
7077 # bytes to skip when using .p2align.
7078 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
7079 gcc_cv_as_alignment_features=".balign and .p2align"
7080 cat >> confdefs.h <<\EOF
7081 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7085 # Gas version 2.8 and later support specifying the maximum
7086 # bytes to skip when using .p2align.
7087 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
7088 gcc_cv_as_alignment_features=".p2align including maximum skip"
7089 cat >> confdefs.h <<\EOF
7090 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7094 elif test x$gcc_cv_as != x; then
7095 # Check if we have .balign and .p2align
7096 echo ".balign 4" > conftest.s
7097 echo ".p2align 2" >> conftest.s
7098 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7099 gcc_cv_as_alignment_features=".balign and .p2align"
7100 cat >> confdefs.h <<\EOF
7101 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7105 rm -f conftest.s conftest.o
7106 # Check if specifying the maximum bytes to skip when
7107 # using .p2align is supported.
7108 echo ".p2align 4,,7" > conftest.s
7109 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7110 gcc_cv_as_alignment_features=".p2align including maximum skip"
7111 cat >> confdefs.h <<\EOF
7112 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7116 rm -f conftest.s conftest.o
7118 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7120 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7121 echo "configure:7122: checking assembler subsection support" >&5
7122 gcc_cv_as_subsections=no
7123 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7124 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
7125 gcc_cv_as_subsections="working .subsection -1"
7127 elif test x$gcc_cv_as != x; then
7128 # Check if we have .subsection
7129 echo ".subsection 1" > conftest.s
7130 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7131 gcc_cv_as_subsections=".subsection"
7132 if test x$gcc_cv_nm != x; then
7133 cat > conftest.s <<EOF
7134 conftest_label1: .word 0
7135 .subsection -1
7136 conftest_label2: .word 0
7137 .previous
7139 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7140 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7141 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7142 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7144 else
7145 gcc_cv_as_subsections="working .subsection -1"
7150 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7152 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7153 cat >> confdefs.h <<\EOF
7154 #define HAVE_GAS_SUBSECTION_ORDERING 1
7158 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7160 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7161 echo "configure:7162: checking assembler weak support" >&5
7162 gcc_cv_as_weak=no
7163 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7164 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
7165 gcc_cv_as_weak="yes"
7167 elif test x$gcc_cv_as != x; then
7168 # Check if we have .weak
7169 echo " .weak foobar" > conftest.s
7170 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7171 gcc_cv_as_weak="yes"
7173 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7175 if test x"$gcc_cv_as_weak" = xyes; then
7176 cat >> confdefs.h <<\EOF
7177 #define HAVE_GAS_WEAK 1
7181 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7183 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7184 echo "configure:7185: checking assembler hidden support" >&5
7185 gcc_cv_as_hidden=no
7186 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7187 if test "$gcc_cv_gas_major_version" -eq 2 \
7188 -a "$gcc_cv_gas_minor_version" -eq 12 \
7189 -a "$gcc_cv_gas_patch_version" -ge 1 \
7190 -o "$gcc_cv_gas_major_version" -eq 2 \
7191 -a "$gcc_cv_gas_minor_version" -gt 12 \
7192 -o "$gcc_cv_gas_major_version" -gt 2 \
7193 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7194 gcc_cv_as_hidden="yes"
7196 elif test x$gcc_cv_as != x; then
7197 # Check if we have .hidden
7198 echo " .hidden foobar" > conftest.s
7199 echo "foobar:" >> conftest.s
7200 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7201 gcc_cv_as_hidden="yes"
7203 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7205 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7206 # This is irritatingly difficult to feature test for. Look for
7207 # the date string after the version number.
7208 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7209 if echo "$ld_ver" | grep GNU > /dev/null; then
7210 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'`
7211 if test 0"$ld_date" -lt 20020404; then
7212 gcc_cv_as_hidden="no"
7216 if test x"$gcc_cv_as_hidden" = xyes; then
7217 cat >> confdefs.h <<\EOF
7218 #define HAVE_GAS_HIDDEN 1
7222 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7223 libgcc_visibility=$gcc_cv_as_hidden
7226 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7227 echo "configure:7228: checking assembler leb128 support" >&5
7228 gcc_cv_as_leb128=no
7229 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7230 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
7231 gcc_cv_as_leb128="yes"
7233 elif test x$gcc_cv_as != x; then
7234 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7235 cat > conftest.s <<EOF
7236 .data
7237 .uleb128 L2 - L1
7239 .uleb128 1280
7240 .sleb128 -1010
7243 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7244 gcc_cv_as_leb128="yes"
7246 # GAS versions before 2.11 do not support uleb128,
7247 # despite appearing to.
7248 # ??? There exists an elf-specific test that will crash
7249 # the assembler. Perhaps it's better to figure out whether
7250 # arbitrary sections are supported and try the test.
7251 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7252 if echo "$as_ver" | grep GNU > /dev/null; then
7253 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7254 as_major=`echo $as_ver | sed 's/\..*//'`
7255 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7256 if test $as_major -eq 2 -a $as_minor -lt 11; then
7257 gcc_cv_as_leb128="no"
7261 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7263 if test x"$gcc_cv_as_leb128" = xyes; then
7264 cat >> confdefs.h <<\EOF
7265 #define HAVE_AS_LEB128 1
7269 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7271 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7272 echo "configure:7273: checking assembler eh_frame optimization" >&5
7273 gcc_cv_as_eh_frame=no
7274 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7275 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
7276 gcc_cv_as_eh_frame="yes"
7278 elif test x$gcc_cv_as != x; then
7279 # Check if this is GAS.
7280 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7281 rm -f a.out 2> /dev/null
7282 if echo "$as_ver" | grep GNU > /dev/null; then
7283 # Versions up to and including 2.11.0 may mis-optimize
7284 # .eh_frame data. Try something.
7285 cat > conftest.s <<EOF
7286 .text
7287 .LFB1:
7288 .4byte 0
7289 .L1:
7290 .4byte 0
7291 .LFE1:
7292 .section .eh_frame,"aw",@progbits
7293 __FRAME_BEGIN__:
7294 .4byte .LECIE1-.LSCIE1
7295 .LSCIE1:
7296 .4byte 0x0
7297 .byte 0x1
7298 .ascii "z\0"
7299 .byte 0x1
7300 .byte 0x78
7301 .byte 0x1a
7302 .byte 0x0
7303 .byte 0x4
7304 .4byte 1
7305 .p2align 1
7306 .LECIE1:
7307 .LSFDE1:
7308 .4byte .LEFDE1-.LASFDE1
7309 .LASFDE1:
7310 .4byte .LASFDE1-__FRAME_BEGIN__
7311 .4byte .LFB1
7312 .4byte .LFE1-.LFB1
7313 .byte 0x4
7314 .4byte .LFE1-.LFB1
7315 .byte 0x4
7316 .4byte .L1-.LFB1
7317 .LEFDE1:
7319 cat > conftest.lit <<EOF
7320 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7321 0010 01000000 12000000 18000000 00000000 ................
7322 0020 08000000 04080000 0044 .........D
7324 cat > conftest.big <<EOF
7325 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7326 0010 00000001 00000012 00000018 00000000 ................
7327 0020 00000008 04000000 0844 .........D
7329 # If the assembler didn't choke, and we can objdump,
7330 # and we got the correct data, then succeed.
7331 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7332 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7333 | tail -3 > conftest.got \
7334 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7335 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7336 then
7337 gcc_cv_as_eh_frame="yes"
7338 else
7339 gcc_cv_as_eh_frame="bad"
7340 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7341 cat >> confdefs.h <<\EOF
7342 #define USE_AS_TRADITIONAL_FORMAT 1
7348 rm -f conftest.*
7350 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7352 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7353 echo "configure:7354: checking assembler section merging support" >&5
7354 gcc_cv_as_shf_merge=no
7355 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7356 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
7357 gcc_cv_as_shf_merge=yes
7359 elif test x$gcc_cv_as != x; then
7360 # Check if we support SHF_MERGE sections
7361 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7362 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7363 gcc_cv_as_shf_merge=yes
7365 rm -f conftest.s conftest.o
7367 if test x"$gcc_cv_as_shf_merge" = xyes; then
7368 cat >> confdefs.h <<\EOF
7369 #define HAVE_GAS_SHF_MERGE 1
7373 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7375 case "$target" in
7376 # All TARGET_ABI_OSF targets.
7377 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7378 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7379 echo "configure:7380: checking assembler supports explicit relocations" >&5
7380 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7381 echo $ac_n "(cached) $ac_c" 1>&6
7382 else
7384 gcc_cv_as_explicit_relocs=unknown
7385 if test x$gcc_cv_gas_major_version != x \
7386 -a x$gcc_cv_gas_minor_version != x
7387 then
7388 if test "$gcc_cv_gas_major_version" -eq 2 \
7389 -a "$gcc_cv_gas_minor_version" -ge 12 \
7390 -o "$gcc_cv_gas_major_version" -gt 2; then
7391 gcc_cv_as_explicit_relocs=yes
7393 elif test x$gcc_cv_as != x; then
7394 cat > conftest.s << 'EOF'
7395 .set nomacro
7396 .text
7397 extbl $3, $2, $3 !lituse_bytoff!1
7398 ldq $2, a($29) !literal!1
7399 ldq $4, b($29) !literal!2
7400 ldq_u $3, 0($2) !lituse_base!1
7401 ldq $27, f($29) !literal!5
7402 jsr $26, ($27), f !lituse_jsr!5
7403 ldah $29, 0($26) !gpdisp!3
7404 lda $0, c($29) !gprel
7405 ldah $1, d($29) !gprelhigh
7406 lda $1, d($1) !gprellow
7407 lda $29, 0($29) !gpdisp!3
7409 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7410 gcc_cv_as_explicit_relocs=yes
7411 else
7412 gcc_cv_as_explicit_relocs=no
7414 rm -f conftest.s conftest.o
7419 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7420 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7421 cat >> confdefs.h <<\EOF
7422 #define HAVE_AS_EXPLICIT_RELOCS 1
7427 sparc*-*-*)
7428 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7429 echo "configure:7430: checking assembler .register pseudo-op support" >&5
7430 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7431 echo $ac_n "(cached) $ac_c" 1>&6
7432 else
7434 gcc_cv_as_register_pseudo_op=unknown
7435 if test x$gcc_cv_as != x; then
7436 # Check if we have .register
7437 echo ".register %g2, #scratch" > conftest.s
7438 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7439 gcc_cv_as_register_pseudo_op=yes
7440 else
7441 gcc_cv_as_register_pseudo_op=no
7443 rm -f conftest.s conftest.o
7448 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7449 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7450 cat >> confdefs.h <<\EOF
7451 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7456 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7457 echo "configure:7458: checking assembler supports -relax" >&5
7458 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7459 echo $ac_n "(cached) $ac_c" 1>&6
7460 else
7462 gcc_cv_as_relax_opt=unknown
7463 if test x$gcc_cv_as != x; then
7464 # Check if gas supports -relax
7465 echo ".text" > conftest.s
7466 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7467 gcc_cv_as_relax_opt=yes
7468 else
7469 gcc_cv_as_relax_opt=no
7471 rm -f conftest.s conftest.o
7476 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7477 if test "x$gcc_cv_as_relax_opt" = xyes; then
7478 cat >> confdefs.h <<\EOF
7479 #define HAVE_AS_RELAX_OPTION 1
7484 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7485 echo "configure:7486: checking assembler and linker support unaligned pc related relocs" >&5
7486 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7487 echo $ac_n "(cached) $ac_c" 1>&6
7488 else
7490 gcc_cv_as_sparc_ua_pcrel=unknown
7491 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7492 gcc_cv_as_sparc_ua_pcrel=no
7493 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7494 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7495 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7496 gcc_cv_as_sparc_ua_pcrel=yes
7498 rm -f conftest.s conftest.o conftest
7503 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7504 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7505 cat >> confdefs.h <<\EOF
7506 #define HAVE_AS_SPARC_UA_PCREL 1
7511 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7512 echo "configure:7513: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7513 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7514 echo $ac_n "(cached) $ac_c" 1>&6
7515 else
7517 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7518 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7519 if test x$gcc_cv_objdump != x; then
7520 gcc_cv_as_sparc_ua_pcrel_hidden=no
7521 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7522 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7523 echo "foo: .skip 4" >> conftest.s
7524 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7525 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7526 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7527 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7528 if $gcc_cv_objdump -R conftest 2> /dev/null \
7529 | grep 'DISP32' > /dev/null 2>&1; then
7531 else
7532 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7536 rm -f conftest.s conftest.o conftest
7537 else
7538 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7543 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7544 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7545 cat >> confdefs.h <<\EOF
7546 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7551 if test "x$gcc_cv_as_flags64" != xno; then
7552 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7553 echo "configure:7554: checking for assembler offsetable %lo() support" >&5
7554 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7555 echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7558 gcc_cv_as_offsetable_lo10=unknown
7559 if test "x$gcc_cv_as" != x; then
7560 # Check if assembler has offsetable %lo()
7561 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7562 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7563 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7564 > /dev/null 2>&1 &&
7565 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7566 > /dev/null 2>&1; then
7567 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7568 gcc_cv_as_offsetable_lo10=no
7569 else
7570 gcc_cv_as_offsetable_lo10=yes
7572 else
7573 gcc_cv_as_offsetable_lo10=no
7575 rm -f conftest.s conftest.o conftest1.s conftest1.o
7580 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7581 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7582 cat >> confdefs.h <<\EOF
7583 #define HAVE_AS_OFFSETABLE_LO10 1
7591 i[34567]86-*-* | x86_64-*-*)
7592 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7593 echo "configure:7594: checking assembler instructions" >&5
7594 gcc_cv_as_instructions=
7595 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7596 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
7597 gcc_cv_as_instructions="filds fists"
7599 elif test x$gcc_cv_as != x; then
7600 set "filds fists" "filds mem; fists mem"
7601 while test $# -gt 0
7603 echo "$2" > conftest.s
7604 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7605 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7607 shift 2
7608 done
7609 rm -f conftest.s conftest.o
7611 if test x"$gcc_cv_as_instructions" != x; then
7612 cat >> confdefs.h <<EOF
7613 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7617 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7619 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7620 echo "configure:7621: checking assembler GOTOFF in data directives" >&5
7621 gcc_cv_as_gotoff_in_data=no
7622 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7623 then
7624 if test "$gcc_cv_gas_major_version" -eq 2 \
7625 -a "$gcc_cv_gas_minor_version" -ge 11 \
7626 -o "$gcc_cv_gas_major_version" -gt 2; then
7627 gcc_cv_as_gotoff_in_data=yes
7629 elif test x$gcc_cv_as != x; then
7630 cat > conftest.s <<EOF
7631 .text
7632 .L0:
7634 .data
7635 .long .L0@GOTOFF
7637 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7638 gcc_cv_as_gotoff_in_data=yes
7641 cat >> confdefs.h <<EOF
7642 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7645 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7647 esac
7649 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7650 echo "configure:7651: checking assembler dwarf2 debug_line support" >&5
7651 gcc_cv_as_dwarf2_debug_line=no
7652 # ??? Not all targets support dwarf2 debug_line, even within a version
7653 # of gas. Moreover, we need to emit a valid instruction to trigger any
7654 # info to the output file. So, as supported targets are added to gas 2.11,
7655 # add some instruction here to (also) show we expect this might work.
7656 # ??? Once 2.11 is released, probably need to add first known working
7657 # version to the per-target configury.
7658 case "$target" in
7659 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
7660 insn="nop"
7662 ia64*-*-*)
7663 insn="nop 0"
7665 esac
7666 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7667 then
7668 if test "$gcc_cv_gas_major_version" -eq 2 \
7669 -a "$gcc_cv_gas_minor_version" -ge 11 \
7670 -o "$gcc_cv_gas_major_version" -gt 2 \
7671 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7672 && test x"$insn" != x ; then
7673 gcc_cv_as_dwarf2_debug_line="yes"
7675 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7676 echo ' .file 1 "conftest.s"' > conftest.s
7677 echo ' .loc 1 3 0' >> conftest.s
7678 echo " $insn" >> conftest.s
7679 # ??? This fails with non-gnu grep.
7680 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7681 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7682 # The .debug_line file table must be in the exact order that
7683 # we specified the files, since these indices are also used
7684 # by DW_AT_decl_file. Approximate this test by testing if
7685 # the assembler bitches if the same index is assigned twice.
7686 echo ' .file 1 "foo.s"' > conftest.s
7687 echo ' .file 1 "bar.s"' >> conftest.s
7688 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7689 then
7690 gcc_cv_as_dwarf2_debug_line="no"
7691 else
7692 gcc_cv_as_dwarf2_debug_line="yes"
7695 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7697 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7698 cat >> confdefs.h <<\EOF
7699 #define HAVE_AS_DWARF2_DEBUG_LINE 1
7703 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7705 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
7706 echo "configure:7707: checking assembler --gdwarf2 support" >&5
7707 gcc_cv_as_gdwarf2_flag=no
7708 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7709 then
7710 if test "$gcc_cv_gas_major_version" -eq 2 \
7711 -a "$gcc_cv_gas_minor_version" -ge 11 \
7712 -o "$gcc_cv_gas_major_version" -gt 2 \
7713 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7714 && test x"$insn" != x ; then
7715 gcc_cv_as_gdwarf2_debug_flag="yes"
7717 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7718 echo '' > conftest.s
7719 # ??? This fails with non-gnu grep.
7720 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7721 then
7722 gcc_cv_as_gdwarf2_flag="yes"
7724 rm -f conftest.s conftest.o
7726 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7727 cat >> confdefs.h <<\EOF
7728 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7732 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7734 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
7735 echo "configure:7736: checking assembler --gstabs support" >&5
7736 gcc_cv_as_gstabs_flag=no
7737 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7738 then
7739 if test "$gcc_cv_gas_major_version" -eq 2 \
7740 -a "$gcc_cv_gas_minor_version" -ge 11 \
7741 -o "$gcc_cv_gas_major_version" -gt 2 \
7742 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7743 && test x"$insn" != x ; then
7744 gcc_cv_as_gstabs_debug_flag="yes"
7746 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7747 echo '' > conftest.s
7748 # ??? This fails with non-gnu grep.
7749 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7750 gcc_cv_as_gstabs_flag="yes"
7752 rm -f conftest.s conftest.o
7754 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7755 cat >> confdefs.h <<\EOF
7756 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
7760 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7762 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
7763 echo "configure:7764: checking linker PT_GNU_EH_FRAME support" >&5
7764 gcc_cv_ld_eh_frame_hdr=no
7765 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7766 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
7767 gcc_cv_ld_eh_frame_hdr=yes
7769 elif test x$gcc_cv_ld != x; then
7770 # Check if linker supports --eh-frame-hdr option
7771 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
7772 gcc_cv_ld_eh_frame_hdr=yes
7775 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
7776 cat >> confdefs.h <<\EOF
7777 #define HAVE_LD_EH_FRAME_HDR 1
7781 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
7783 if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7784 cat >> confdefs.h <<EOF
7785 #define PREFIX_INCLUDE_DIR "$prefix/include"
7790 # Figure out what language subdirectories are present.
7791 # Look if the user specified --enable-languages="..."; if not, use
7792 # the environment variable $LANGUAGES if defined. $LANGUAGES might
7793 # go away some day.
7794 # NB: embedded tabs in this IF block -- do not untabify
7795 if test x"${enable_languages+set}" != xset; then
7796 if test x"${LANGUAGES+set}" = xset; then
7797 enable_languages="${LANGUAGES}"
7798 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7800 else
7801 enable_languages=all
7803 else
7804 if test x"${enable_languages}" = x ||
7805 test x"${enable_languages}" = xyes;
7806 then
7807 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
7810 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
7812 # First scan to see if an enabled language requires some other language.
7813 # We assume that a given config-lang.in will list all the language
7814 # front ends it requires, even if some are required indirectly.
7815 for lang in ${srcdir}/*/config-lang.in ..
7817 case $lang in
7820 # The odd quoting in the next line works around
7821 # an apparent bug in bash 1.12 on linux.
7822 ${srcdir}/[*]/config-lang.in)
7825 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7826 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
7827 for other in $this_lang_requires
7829 case ,${enable_languages}, in
7830 *,$other,*)
7832 *,all,*)
7834 *,$lang_alias,*)
7835 enable_languages="$enable_languages,$other"
7837 esac
7838 done
7840 esac
7841 done
7843 subdirs=
7844 for lang in ${srcdir}/*/config-lang.in ..
7846 case $lang in
7847 ..) ;;
7848 # The odd quoting in the next line works around
7849 # an apparent bug in bash 1.12 on linux.
7850 ${srcdir}/[*]/config-lang.in) ;;
7852 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7853 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
7854 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
7855 if test "x$lang_alias" = x
7856 then
7857 echo "$lang doesn't set \$language." 1>&2
7858 exit 1
7860 case ${build_by_default},${enable_languages}, in
7861 *,$lang_alias,*) add_this_lang=yes ;;
7862 no,*) add_this_lang=no ;;
7863 *,all,*) add_this_lang=yes ;;
7864 *) add_this_lang=no ;;
7865 esac
7866 if test x"${add_this_lang}" = xyes; then
7867 case $lang in
7868 ${srcdir}/ada/config-lang.in)
7869 if test x$have_gnat = xyes ; then
7870 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7874 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7876 esac
7879 esac
7880 done
7882 # Make gthr-default.h if we have a thread file.
7883 gthread_flags=
7884 if test $thread_file != single; then
7885 rm -f gthr-default.h
7886 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
7887 gthread_flags=-DHAVE_GTHR_DEFAULT
7891 # Find out what GC implementation we want, or may, use.
7892 # Check whether --with-gc or --without-gc was given.
7893 if test "${with_gc+set}" = set; then
7894 withval="$with_gc"
7895 case "$withval" in
7896 simple | page)
7897 GGC=ggc-$withval
7900 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7902 esac
7903 else
7904 GGC=ggc-page
7908 echo "Using $GGC for garbage collection."
7910 # Use the system's zlib library.
7911 zlibdir=-L../zlib
7912 zlibinc="-I\$(srcdir)/../zlib"
7913 # Check whether --with-system-zlib or --without-system-zlib was given.
7914 if test "${with_system_zlib+set}" = set; then
7915 withval="$with_system_zlib"
7916 zlibdir=
7917 zlibinc=
7925 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
7926 echo "configure:7927: checking whether to enable maintainer-specific portions of Makefiles" >&5
7927 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7928 if test "${enable_maintainer_mode+set}" = set; then
7929 enableval="$enable_maintainer_mode"
7930 maintainer_mode=$enableval
7931 else
7932 maintainer_mode=no
7936 echo "$ac_t""$maintainer_mode" 1>&6
7938 if test "$maintainer_mode" = "yes"; then
7939 MAINT=''
7940 else
7941 MAINT='#'
7944 # With Setjmp/Longjmp based exception handling.
7945 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
7946 if test "${enable_sjlj_exceptions+set}" = set; then
7947 enableval="$enable_sjlj_exceptions"
7948 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
7949 cat >> confdefs.h <<EOF
7950 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
7956 # Make empty files to contain the specs and options for each language.
7957 # Then add #include lines to for a compiler that has specs and/or options.
7959 lang_specs_files=
7960 lang_options_files=
7961 lang_tree_files=
7962 for subdir in . $subdirs
7964 if test -f $srcdir/$subdir/lang-specs.h; then
7965 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7967 if test -f $srcdir/$subdir/lang-options.h; then
7968 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
7970 if test -f $srcdir/$subdir/$subdir-tree.def; then
7971 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7973 done
7975 # These (without "all_") are set in each config-lang.in.
7976 # `language' must be a single word so is spelled singularly.
7977 all_languages=
7978 all_boot_languages=
7979 all_compilers=
7980 all_stagestuff=
7981 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc'
7982 # List of language makefile fragments.
7983 all_lang_makefiles=
7985 # Add the language fragments.
7986 # Languages are added via two mechanisms. Some information must be
7987 # recorded in makefile variables, these are defined in config-lang.in.
7988 # We accumulate them and plug them into the main Makefile.
7989 # The other mechanism is a set of hooks for each of the main targets
7990 # like `clean', `install', etc.
7992 language_fragments="Make-lang"
7993 language_hooks="Make-hooks"
7995 for s in .. $subdirs
7997 if test $s != ".."
7998 then
7999 language=
8000 boot_language=
8001 compilers=
8002 stagestuff=
8003 outputs=
8004 . ${srcdir}/$s/config-lang.in
8005 if test "x$language" = x
8006 then
8007 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8008 exit 1
8010 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8011 if test -f ${srcdir}/$s/Makefile.in
8012 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8014 all_languages="$all_languages $language"
8015 if test "x$boot_language" = xyes
8016 then
8017 all_boot_languages="$all_boot_languages $language"
8019 all_compilers="$all_compilers $compilers"
8020 all_stagestuff="$all_stagestuff $stagestuff"
8021 all_outputs="$all_outputs $outputs"
8023 done
8025 check_languages=
8026 for language in .. $all_languages
8028 if test $language != ".."
8029 then
8030 check_languages="$check_languages check-$language"
8032 done
8034 # Since we can't use `::' targets, we link each language in
8035 # with a set of hooks, reached indirectly via lang.${target}.
8037 rm -f Make-hooks
8038 touch Make-hooks
8039 target_list="all.build all.cross start.encap rest.encap \
8040 info dvi generated-manpages \
8041 install-normal install-common install-info install-man \
8042 uninstall \
8043 mostlyclean clean distclean extraclean maintainer-clean \
8044 stage1 stage2 stage3 stage4"
8045 for t in $target_list
8048 for lang in .. $all_languages
8050 if test $lang != ".."; then
8051 x="$x $lang.$t"
8053 done
8054 echo "lang.$t: $x" >> Make-hooks
8055 done
8057 # Create .gdbinit.
8059 echo "dir ." > .gdbinit
8060 echo "dir ${srcdir}" >> .gdbinit
8061 if test x$gdb_needs_out_file_path = xyes
8062 then
8063 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8065 if test "x$subdirs" != x; then
8066 for s in $subdirs
8068 echo "dir ${srcdir}/$s" >> .gdbinit
8069 done
8071 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8073 # Define variables host_canonical and build_canonical
8074 # because some Cygnus local changes in the Makefile depend on them.
8075 build_canonical=${build}
8076 host_canonical=${host}
8077 target_subdir=
8078 if test "${host}" != "${target}" ; then
8079 target_subdir=${target_alias}/
8085 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8086 # absolute path for gcc_tooldir based on inserting the number of up-directory
8087 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8088 # $(libsubdir)/@(unlibsubdir) based path.
8089 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8090 # make and thus we'd get different behavior depending on where we built the
8091 # sources.
8092 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8093 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8094 else
8095 # An explanation of the sed strings:
8096 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8097 # -e 's|/$||' match a trailing forward slash and eliminates it
8098 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8099 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8101 # (*) Note this pattern overwrites the first character of the string
8102 # with a forward slash if one is not already present. This is not a
8103 # problem because the exact names of the sub-directories concerned is
8104 # unimportant, just the number of them matters.
8106 # The practical upshot of these patterns is like this:
8108 # prefix exec_prefix result
8109 # ------ ----------- ------
8110 # /foo /foo/bar ../
8111 # /foo/ /foo/bar ../
8112 # /foo /foo/bar/ ../
8113 # /foo/ /foo/bar/ ../
8114 # /foo /foo/bar/ugg ../../
8116 dollar='$$'
8117 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8122 # Find a directory in which to install a shared libgcc.
8124 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8125 if test "${enable_version_specific_runtime_libs+set}" = set; then
8126 enableval="$enable_version_specific_runtime_libs"
8131 # Check whether --with-slibdir or --without-slibdir was given.
8132 if test "${with_slibdir+set}" = set; then
8133 withval="$with_slibdir"
8134 slibdir="$with_slibdir"
8135 else
8136 if test "${enable_version_specific_runtime_libs+set}" = set; then
8137 slibdir='$(libsubdir)'
8138 elif test "$host" != "$target"; then
8139 slibdir='$(build_tooldir)/lib'
8140 else
8141 slibdir='$(libdir)'
8147 # Nothing to do for FLOAT_H, float_format already handled.
8148 objdir=`${PWDCMD-pwd}`
8151 # Process the language and host/target makefile fragments.
8152 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8154 # Substitute configuration variables
8218 # Echo that links are built
8219 if test x$host = x$target
8220 then
8221 str1="native "
8222 else
8223 str1="cross-"
8224 str2=" from $host"
8227 if test x$host != x$build
8228 then
8229 str3=" on a $build system"
8232 if test "x$str2" != x || test "x$str3" != x
8233 then
8234 str4=
8237 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8239 if test "x$str2" != x || test "x$str3" != x
8240 then
8241 echo " ${str2}${str3}." 1>&2
8244 # Truncate the target if necessary
8245 if test x$host_truncate_target != x; then
8246 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8249 # Configure the subdirectories
8250 # AC_CONFIG_SUBDIRS($subdirs)
8252 # Create the Makefile
8253 # and configure language subdirectories
8254 trap '' 1 2 15
8255 cat > confcache <<\EOF
8256 # This file is a shell script that caches the results of configure
8257 # tests run on this system so they can be shared between configure
8258 # scripts and configure runs. It is not useful on other systems.
8259 # If it contains results you don't want to keep, you may remove or edit it.
8261 # By default, configure uses ./config.cache as the cache file,
8262 # creating it if it does not exist already. You can give configure
8263 # the --cache-file=FILE option to use a different cache file; that is
8264 # what configure does when it calls configure scripts in
8265 # subdirectories, so they share the cache.
8266 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8267 # config.status only pays attention to the cache file if you give it the
8268 # --recheck option to rerun configure.
8271 # The following way of writing the cache mishandles newlines in values,
8272 # but we know of no workaround that is simple, portable, and efficient.
8273 # So, don't put newlines in cache variables' values.
8274 # Ultrix sh set writes to stderr and can't be redirected directly,
8275 # and sets the high bit in the cache file unless we assign to the vars.
8276 (set) 2>&1 |
8277 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8278 *ac_space=\ *)
8279 # `set' does not quote correctly, so add quotes (double-quote substitution
8280 # turns \\\\ into \\, and sed turns \\ into \).
8281 sed -n \
8282 -e "s/'/'\\\\''/g" \
8283 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8286 # `set' quotes correctly as required by POSIX, so do not add quotes.
8287 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8289 esac >> confcache
8290 if cmp -s $cache_file confcache; then
8292 else
8293 if test -w $cache_file; then
8294 echo "updating cache $cache_file"
8295 cat confcache > $cache_file
8296 else
8297 echo "not updating unwritable cache $cache_file"
8300 rm -f confcache
8302 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8304 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8305 # Let make expand exec_prefix.
8306 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8308 # Any assignment to VPATH causes Sun make to only execute
8309 # the first set of double-colon rules, so remove it if not needed.
8310 # If there is a colon in the path, we need to keep it.
8311 if test "x$srcdir" = x.; then
8312 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8315 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8317 DEFS=-DHAVE_CONFIG_H
8319 # Without the "./", some shells look in PATH for config.status.
8320 : ${CONFIG_STATUS=./config.status}
8322 echo creating $CONFIG_STATUS
8323 rm -f $CONFIG_STATUS
8324 cat > $CONFIG_STATUS <<EOF
8325 #! /bin/sh
8326 # Generated automatically by configure.
8327 # Run this file to recreate the current configuration.
8328 # This directory was configured as follows,
8329 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8331 # $0 $ac_configure_args
8333 # Compiler output produced by configure, useful for debugging
8334 # configure, is in ./config.log if it exists.
8336 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8337 for ac_option
8339 case "\$ac_option" in
8340 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8341 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8342 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8343 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8344 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8345 exit 0 ;;
8346 -help | --help | --hel | --he | --h)
8347 echo "\$ac_cs_usage"; exit 0 ;;
8348 *) echo "\$ac_cs_usage"; exit 1 ;;
8349 esac
8350 done
8352 ac_given_srcdir=$srcdir
8354 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8356 cat >> $CONFIG_STATUS <<EOF
8358 # Protect against being on the right side of a sed subst in config.status.
8359 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8360 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8361 $ac_vpsub
8362 $extrasub
8363 s%@SHELL@%$SHELL%g
8364 s%@CFLAGS@%$CFLAGS%g
8365 s%@CPPFLAGS@%$CPPFLAGS%g
8366 s%@CXXFLAGS@%$CXXFLAGS%g
8367 s%@FFLAGS@%$FFLAGS%g
8368 s%@DEFS@%$DEFS%g
8369 s%@LDFLAGS@%$LDFLAGS%g
8370 s%@LIBS@%$LIBS%g
8371 s%@exec_prefix@%$exec_prefix%g
8372 s%@prefix@%$prefix%g
8373 s%@program_transform_name@%$program_transform_name%g
8374 s%@bindir@%$bindir%g
8375 s%@sbindir@%$sbindir%g
8376 s%@libexecdir@%$libexecdir%g
8377 s%@datadir@%$datadir%g
8378 s%@sysconfdir@%$sysconfdir%g
8379 s%@sharedstatedir@%$sharedstatedir%g
8380 s%@localstatedir@%$localstatedir%g
8381 s%@libdir@%$libdir%g
8382 s%@includedir@%$includedir%g
8383 s%@oldincludedir@%$oldincludedir%g
8384 s%@infodir@%$infodir%g
8385 s%@mandir@%$mandir%g
8386 s%@enable_multilib@%$enable_multilib%g
8387 s%@enable_shared@%$enable_shared%g
8388 s%@host@%$host%g
8389 s%@host_alias@%$host_alias%g
8390 s%@host_cpu@%$host_cpu%g
8391 s%@host_vendor@%$host_vendor%g
8392 s%@host_os@%$host_os%g
8393 s%@target@%$target%g
8394 s%@target_alias@%$target_alias%g
8395 s%@target_cpu@%$target_cpu%g
8396 s%@target_vendor@%$target_vendor%g
8397 s%@target_os@%$target_os%g
8398 s%@build@%$build%g
8399 s%@build_alias@%$build_alias%g
8400 s%@build_cpu@%$build_cpu%g
8401 s%@build_vendor@%$build_vendor%g
8402 s%@build_os@%$build_os%g
8403 s%@CC@%$CC%g
8404 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8405 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8406 s%@GNATBIND@%$GNATBIND%g
8407 s%@ADAC@%$ADAC%g
8408 s%@strict1_warn@%$strict1_warn%g
8409 s%@CPP@%$CPP%g
8410 s%@warn_cflags@%$warn_cflags%g
8411 s%@stage1_cflags@%$stage1_cflags%g
8412 s%@SET_MAKE@%$SET_MAKE%g
8413 s%@AWK@%$AWK%g
8414 s%@LN@%$LN%g
8415 s%@LN_S@%$LN_S%g
8416 s%@RANLIB@%$RANLIB%g
8417 s%@INSTALL@%$INSTALL%g
8418 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8419 s%@INSTALL_DATA@%$INSTALL_DATA%g
8420 s%@have_mktemp_command@%$have_mktemp_command%g
8421 s%@MAKEINFO@%$MAKEINFO%g
8422 s%@BUILD_INFO@%$BUILD_INFO%g
8423 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8424 s%@FLEX@%$FLEX%g
8425 s%@BISON@%$BISON%g
8426 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8427 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8428 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8429 s%@LIBICONV@%$LIBICONV%g
8430 s%@manext@%$manext%g
8431 s%@objext@%$objext%g
8432 s%@FORBUILD@%$FORBUILD%g
8433 s%@PACKAGE@%$PACKAGE%g
8434 s%@VERSION@%$VERSION%g
8435 s%@ALLOCA@%$ALLOCA%g
8436 s%@GLIBC21@%$GLIBC21%g
8437 s%@USE_NLS@%$USE_NLS%g
8438 s%@MSGFMT@%$MSGFMT%g
8439 s%@GMSGFMT@%$GMSGFMT%g
8440 s%@XGETTEXT@%$XGETTEXT%g
8441 s%@INTLBISON@%$INTLBISON%g
8442 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8443 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8444 s%@CATALOGS@%$CATALOGS%g
8445 s%@CATOBJEXT@%$CATOBJEXT%g
8446 s%@INTLLIBS@%$INTLLIBS%g
8447 s%@INTLDEPS@%$INTLDEPS%g
8448 s%@INTLOBJS@%$INTLOBJS%g
8449 s%@POSUB@%$POSUB%g
8450 s%@DATADIRNAME@%$DATADIRNAME%g
8451 s%@INSTOBJEXT@%$INSTOBJEXT%g
8452 s%@GENCAT@%$GENCAT%g
8453 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8454 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8455 s%@CROSS@%$CROSS%g
8456 s%@ALL@%$ALL%g
8457 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8458 s%@inhibit_libc@%$inhibit_libc%g
8459 s%@HOST_PREFIX@%$HOST_PREFIX%g
8460 s%@HOST_PREFIX_1@%$HOST_PREFIX_1%g
8461 s%@HOST_CC@%$HOST_CC%g
8462 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8463 s%@STMP_FIXINC@%$STMP_FIXINC%g
8464 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8465 s%@libgcc_visibility@%$libgcc_visibility%g
8466 s%@gthread_flags@%$gthread_flags%g
8467 s%@GGC@%$GGC%g
8468 s%@zlibdir@%$zlibdir%g
8469 s%@zlibinc@%$zlibinc%g
8470 s%@MAINT@%$MAINT%g
8471 s%@build_canonical@%$build_canonical%g
8472 s%@host_canonical@%$host_canonical%g
8473 s%@target_subdir@%$target_subdir%g
8474 s%@gcc_tooldir@%$gcc_tooldir%g
8475 s%@dollar@%$dollar%g
8476 s%@slibdir@%$slibdir%g
8477 s%@objdir@%$objdir%g
8478 s%@subdirs@%$subdirs%g
8479 s%@all_boot_languages@%$all_boot_languages%g
8480 s%@all_compilers@%$all_compilers%g
8481 s%@all_lang_makefiles@%$all_lang_makefiles%g
8482 s%@all_languages@%$all_languages%g
8483 s%@all_stagestuff@%$all_stagestuff%g
8484 s%@build_exeext@%$build_exeext%g
8485 s%@build_install_headers_dir@%$build_install_headers_dir%g
8486 s%@build_xm_file_list@%$build_xm_file_list%g
8487 s%@build_xm_file@%$build_xm_file%g
8488 s%@build_xm_defines@%$build_xm_defines%g
8489 s%@check_languages@%$check_languages%g
8490 s%@cc_set_by_configure@%$cc_set_by_configure%g
8491 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8492 s%@cpp_install_dir@%$cpp_install_dir%g
8493 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8494 s%@dep_tmake_file@%$dep_tmake_file%g
8495 s%@extra_headers_list@%$extra_headers_list%g
8496 s%@extra_objs@%$extra_objs%g
8497 s%@extra_parts@%$extra_parts%g
8498 s%@extra_passes@%$extra_passes%g
8499 s%@extra_programs@%$extra_programs%g
8500 s%@float_h_file@%$float_h_file%g
8501 s%@gcc_config_arguments@%$gcc_config_arguments%g
8502 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8503 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8504 s%@gcc_version@%$gcc_version%g
8505 s%@gcc_version_full@%$gcc_version_full%g
8506 s%@gcc_version_trigger@%$gcc_version_trigger%g
8507 s%@host_exeext@%$host_exeext%g
8508 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8509 s%@host_xm_file_list@%$host_xm_file_list%g
8510 s%@host_xm_file@%$host_xm_file%g
8511 s%@host_xm_defines@%$host_xm_defines%g
8512 s%@install@%$install%g
8513 s%@lang_options_files@%$lang_options_files%g
8514 s%@lang_specs_files@%$lang_specs_files%g
8515 s%@lang_tree_files@%$lang_tree_files%g
8516 s%@local_prefix@%$local_prefix%g
8517 s%@md_file@%$md_file%g
8518 s%@objc_boehm_gc@%$objc_boehm_gc%g
8519 s%@out_file@%$out_file%g
8520 s%@out_object_file@%$out_object_file%g
8521 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8522 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8523 s%@symbolic_link@%$symbolic_link%g
8524 s%@thread_file@%$thread_file%g
8525 s%@tm_file_list@%$tm_file_list%g
8526 s%@tm_file@%$tm_file%g
8527 s%@tm_p_file_list@%$tm_p_file_list%g
8528 s%@tm_p_file@%$tm_p_file%g
8529 s%@xm_file@%$xm_file%g
8530 s%@xm_defines@%$xm_defines%g
8531 s%@c_target_objs@%$c_target_objs%g
8532 s%@cxx_target_objs@%$cxx_target_objs%g
8533 s%@target_cpu_default@%$target_cpu_default%g
8534 /@target_overrides@/r $target_overrides
8535 s%@target_overrides@%%g
8536 /@host_overrides@/r $host_overrides
8537 s%@host_overrides@%%g
8538 /@language_fragments@/r $language_fragments
8539 s%@language_fragments@%%g
8540 /@language_hooks@/r $language_hooks
8541 s%@language_hooks@%%g
8543 CEOF
8546 cat >> $CONFIG_STATUS <<\EOF
8548 # Split the substitutions into bite-sized pieces for seds with
8549 # small command number limits, like on Digital OSF/1 and HP-UX.
8550 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8551 ac_file=1 # Number of current file.
8552 ac_beg=1 # First line for current file.
8553 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8554 ac_more_lines=:
8555 ac_sed_cmds=""
8556 while $ac_more_lines; do
8557 if test $ac_beg -gt 1; then
8558 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8559 else
8560 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8562 if test ! -s conftest.s$ac_file; then
8563 ac_more_lines=false
8564 rm -f conftest.s$ac_file
8565 else
8566 if test -z "$ac_sed_cmds"; then
8567 ac_sed_cmds="sed -f conftest.s$ac_file"
8568 else
8569 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8571 ac_file=`expr $ac_file + 1`
8572 ac_beg=$ac_end
8573 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8575 done
8576 if test -z "$ac_sed_cmds"; then
8577 ac_sed_cmds=cat
8581 cat >> $CONFIG_STATUS <<EOF
8583 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8585 cat >> $CONFIG_STATUS <<\EOF
8586 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8587 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8588 case "$ac_file" in
8589 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8590 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8591 *) ac_file_in="${ac_file}.in" ;;
8592 esac
8594 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8596 # Remove last slash and all that follows it. Not all systems have dirname.
8597 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8598 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8599 # The file is in a subdirectory.
8600 test ! -d "$ac_dir" && mkdir "$ac_dir"
8601 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8602 # A "../" for each directory in $ac_dir_suffix.
8603 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8604 else
8605 ac_dir_suffix= ac_dots=
8608 case "$ac_given_srcdir" in
8609 .) srcdir=.
8610 if test -z "$ac_dots"; then top_srcdir=.
8611 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8612 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8613 *) # Relative path.
8614 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8615 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8616 esac
8619 echo creating "$ac_file"
8620 rm -f "$ac_file"
8621 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8622 case "$ac_file" in
8623 *Makefile*) ac_comsub="1i\\
8624 # $configure_input" ;;
8625 *) ac_comsub= ;;
8626 esac
8628 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8629 sed -e "$ac_comsub
8630 s%@configure_input@%$configure_input%g
8631 s%@srcdir@%$srcdir%g
8632 s%@top_srcdir@%$top_srcdir%g
8633 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8634 fi; done
8635 rm -f conftest.s*
8637 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8638 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8640 # ac_d sets the value in "#define NAME VALUE" lines.
8641 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8642 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8643 ac_dC='\3'
8644 ac_dD='%g'
8645 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8646 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8647 ac_uB='\([ ]\)%\1#\2define\3'
8648 ac_uC=' '
8649 ac_uD='\4%g'
8650 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8651 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8652 ac_eB='$%\1#\2define\3'
8653 ac_eC=' '
8654 ac_eD='%g'
8656 if test "${CONFIG_HEADERS+set}" != set; then
8658 cat >> $CONFIG_STATUS <<EOF
8659 CONFIG_HEADERS="auto-host.h:config.in"
8661 cat >> $CONFIG_STATUS <<\EOF
8663 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8664 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8665 case "$ac_file" in
8666 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8667 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8668 *) ac_file_in="${ac_file}.in" ;;
8669 esac
8671 echo creating $ac_file
8673 rm -f conftest.frag conftest.in conftest.out
8674 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8675 cat $ac_file_inputs > conftest.in
8679 # Transform confdefs.h into a sed script conftest.vals that substitutes
8680 # the proper values into config.h.in to produce config.h. And first:
8681 # Protect against being on the right side of a sed subst in config.status.
8682 # Protect against being in an unquoted here document in config.status.
8683 rm -f conftest.vals
8684 cat > conftest.hdr <<\EOF
8685 s/[\\&%]/\\&/g
8686 s%[\\$`]%\\&%g
8687 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8688 s%ac_d%ac_u%gp
8689 s%ac_u%ac_e%gp
8691 sed -n -f conftest.hdr confdefs.h > conftest.vals
8692 rm -f conftest.hdr
8694 # This sed command replaces #undef with comments. This is necessary, for
8695 # example, in the case of _POSIX_SOURCE, which is predefined and required
8696 # on some systems where configure will not decide to define it.
8697 cat >> conftest.vals <<\EOF
8698 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8701 # Break up conftest.vals because some shells have a limit on
8702 # the size of here documents, and old seds have small limits too.
8704 rm -f conftest.tail
8705 while :
8707 ac_lines=`grep -c . conftest.vals`
8708 # grep -c gives empty output for an empty file on some AIX systems.
8709 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8710 # Write a limited-size here document to conftest.frag.
8711 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8712 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8713 echo 'CEOF
8714 sed -f conftest.frag conftest.in > conftest.out
8715 rm -f conftest.in
8716 mv conftest.out conftest.in
8717 ' >> $CONFIG_STATUS
8718 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8719 rm -f conftest.vals
8720 mv conftest.tail conftest.vals
8721 done
8722 rm -f conftest.vals
8724 cat >> $CONFIG_STATUS <<\EOF
8725 rm -f conftest.frag conftest.h
8726 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8727 cat conftest.in >> conftest.h
8728 rm -f conftest.in
8729 if cmp -s $ac_file conftest.h 2>/dev/null; then
8730 echo "$ac_file is unchanged"
8731 rm -f conftest.h
8732 else
8733 # Remove last slash and all that follows it. Not all systems have dirname.
8734 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8735 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8736 # The file is in a subdirectory.
8737 test ! -d "$ac_dir" && mkdir "$ac_dir"
8739 rm -f $ac_file
8740 mv conftest.h $ac_file
8742 fi; done
8745 cat >> $CONFIG_STATUS <<EOF
8747 subdirs='$subdirs'
8748 symbolic_link='$symbolic_link'
8751 cat >> $CONFIG_STATUS <<\EOF
8752 for ac_file in $CONFIG_FILES; do
8753 # Support "outfile[:infile[:infile...]]"
8754 case "$ac_file" in
8755 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8756 esac
8757 # PO directories have a Makefile.in generated from Makefile.in.in.
8758 case "$ac_file" in */Makefile.in)
8759 # Adjust a relative srcdir.
8760 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8761 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8762 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8763 # In autoconf-2.13 it is called $ac_given_srcdir.
8764 # In autoconf-2.50 it is called $srcdir.
8765 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8766 case "$ac_given_srcdir" in
8767 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8768 /*) top_srcdir="$ac_given_srcdir" ;;
8769 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8770 esac
8771 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8772 rm -f "$ac_dir/POTFILES"
8773 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8774 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8775 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8776 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8779 esac
8780 done
8782 case x$CONFIG_HEADERS in
8783 xauto-host.h:config.in)
8784 echo > cstamp-h ;;
8785 esac
8786 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
8787 # bootstrapping and the installation procedure can still use
8788 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
8789 # FLAGS_TO_PASS has been modified to solve the problem there.
8790 # This is virtually a duplicate of what happens in configure.lang; we do
8791 # an extra check to make sure this only happens if ln -s can be used.
8792 if test "$symbolic_link" = "ln -s"; then
8793 for d in .. ${subdirs} fixinc ; do
8794 if test $d != ..; then
8795 STARTDIR=`${PWDCMD-pwd}`
8796 cd $d
8797 for t in stage1 stage2 stage3 stage4 include
8799 rm -f $t
8800 $symbolic_link ../$t $t 2>/dev/null
8801 done
8802 cd $STARTDIR
8804 done
8805 else true ; fi
8806 # Avoid having to add intl to our include paths.
8807 if test -f intl/libintl.h; then
8808 echo creating libintl.h
8809 echo '#include "intl/libintl.h"' >libintl.h
8812 exit 0
8814 chmod +x $CONFIG_STATUS
8815 rm -fr confdefs* $ac_clean_files
8816 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1