Fix typo
[official-gcc.git] / gcc / configure
blobf68033a17a214d1131ddfb55ee6eb3f83bff22e8
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,gc,gcac; default
38 is misc,tree,gc"
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 DWARF2."
55 ac_help="$ac_help
56 --disable-shared don't provide a shared libgcc."
57 ac_help="$ac_help
58 --enable-nls use Native Language Support (default)"
59 ac_help="$ac_help
60 --disable-nls do not use Native Language Support"
61 ac_help="$ac_help
62 --with-included-gettext use the GNU gettext library included here"
63 ac_help="$ac_help
64 --with-catgets use catgets functions if available"
65 ac_help="$ac_help
66 --disable-win32-registry
67 Disable lookup of installation paths in the
68 Registry on Windows hosts.
69 --enable-win32-registry Enable registry lookup (default).
70 --enable-win32-registry=KEY
71 Use KEY instead of GCC version as the last portion
72 of the registry key."
73 ac_help="$ac_help
74 --with-gc={simple,page} Choose the garbage collection mechanism to use
75 with the compiler."
76 ac_help="$ac_help
77 --with-system-zlib use installed libz"
78 ac_help="$ac_help
79 --enable-maintainer-mode enable make rules and dependencies not useful
80 (and sometimes confusing) to the casual installer"
81 ac_help="$ac_help
82 --enable-version-specific-runtime-libs Specify that runtime libraries shou
83 ld be installed in a compiler-specific directory "
84 ac_help="$ac_help
85 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
87 # Initialize some variables set by options.
88 # The variables have the same names as the options, with
89 # dashes changed to underlines.
90 build=NONE
91 cache_file=./config.cache
92 exec_prefix=NONE
93 host=NONE
94 no_create=
95 nonopt=NONE
96 no_recursion=
97 prefix=NONE
98 program_prefix=NONE
99 program_suffix=NONE
100 program_transform_name=s,x,x,
101 silent=
102 site=
103 srcdir=
104 target=NONE
105 verbose=
106 x_includes=NONE
107 x_libraries=NONE
108 bindir='${exec_prefix}/bin'
109 sbindir='${exec_prefix}/sbin'
110 libexecdir='${exec_prefix}/libexec'
111 datadir='${prefix}/share'
112 sysconfdir='${prefix}/etc'
113 sharedstatedir='${prefix}/com'
114 localstatedir='${prefix}/var'
115 libdir='${exec_prefix}/lib'
116 includedir='${prefix}/include'
117 oldincludedir='/usr/include'
118 infodir='${prefix}/info'
119 mandir='${prefix}/man'
121 # Initialize some other variables.
122 subdirs=
123 MFLAGS= MAKEFLAGS=
124 SHELL=${CONFIG_SHELL-/bin/sh}
125 # Maximum number of lines to put in a shell here document.
126 ac_max_here_lines=12
128 ac_prev=
129 for ac_option
132 # If the previous option needs an argument, assign it.
133 if test -n "$ac_prev"; then
134 eval "$ac_prev=\$ac_option"
135 ac_prev=
136 continue
139 case "$ac_option" in
140 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
141 *) ac_optarg= ;;
142 esac
144 # Accept the important Cygnus configure options, so we can diagnose typos.
146 case "$ac_option" in
148 -bindir | --bindir | --bindi | --bind | --bin | --bi)
149 ac_prev=bindir ;;
150 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
151 bindir="$ac_optarg" ;;
153 -build | --build | --buil | --bui | --bu)
154 ac_prev=build ;;
155 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
156 build="$ac_optarg" ;;
158 -cache-file | --cache-file | --cache-fil | --cache-fi \
159 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
160 ac_prev=cache_file ;;
161 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
162 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
163 cache_file="$ac_optarg" ;;
165 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
166 ac_prev=datadir ;;
167 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
168 | --da=*)
169 datadir="$ac_optarg" ;;
171 -disable-* | --disable-*)
172 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
173 # Reject names that are not valid shell variable names.
174 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
175 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178 eval "enable_${ac_feature}=no" ;;
180 -enable-* | --enable-*)
181 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
182 # Reject names that are not valid shell variable names.
183 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
184 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
186 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187 case "$ac_option" in
188 *=*) ;;
189 *) ac_optarg=yes ;;
190 esac
191 eval "enable_${ac_feature}='$ac_optarg'" ;;
193 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
194 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
195 | --exec | --exe | --ex)
196 ac_prev=exec_prefix ;;
197 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
198 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
199 | --exec=* | --exe=* | --ex=*)
200 exec_prefix="$ac_optarg" ;;
202 -gas | --gas | --ga | --g)
203 # Obsolete; use --with-gas.
204 with_gas=yes ;;
206 -help | --help | --hel | --he)
207 # Omit some internal or obsolete options to make the list less imposing.
208 # This message is too long to be a string in the A/UX 3.1 sh.
209 cat << EOF
210 Usage: configure [options] [host]
211 Options: [defaults in brackets after descriptions]
212 Configuration:
213 --cache-file=FILE cache test results in FILE
214 --help print this message
215 --no-create do not create output files
216 --quiet, --silent do not print \`checking...' messages
217 --version print the version of autoconf that created configure
218 Directory and file names:
219 --prefix=PREFIX install architecture-independent files in PREFIX
220 [$ac_default_prefix]
221 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
222 [same as prefix]
223 --bindir=DIR user executables in DIR [EPREFIX/bin]
224 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
225 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
226 --datadir=DIR read-only architecture-independent data in DIR
227 [PREFIX/share]
228 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
229 --sharedstatedir=DIR modifiable architecture-independent data in DIR
230 [PREFIX/com]
231 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
232 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
233 --includedir=DIR C header files in DIR [PREFIX/include]
234 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
235 --infodir=DIR info documentation in DIR [PREFIX/info]
236 --mandir=DIR man documentation in DIR [PREFIX/man]
237 --srcdir=DIR find the sources in DIR [configure dir or ..]
238 --program-prefix=PREFIX prepend PREFIX to installed program names
239 --program-suffix=SUFFIX append SUFFIX to installed program names
240 --program-transform-name=PROGRAM
241 run sed PROGRAM on installed program names
243 cat << EOF
244 Host type:
245 --build=BUILD configure for building on BUILD [BUILD=HOST]
246 --host=HOST configure for HOST [guessed]
247 --target=TARGET configure for TARGET [TARGET=HOST]
248 Features and packages:
249 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
250 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
251 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
252 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
253 --x-includes=DIR X include files are in DIR
254 --x-libraries=DIR X library files are in DIR
256 if test -n "$ac_help"; then
257 echo "--enable and --with options recognized:$ac_help"
259 exit 0 ;;
261 -host | --host | --hos | --ho)
262 ac_prev=host ;;
263 -host=* | --host=* | --hos=* | --ho=*)
264 host="$ac_optarg" ;;
266 -includedir | --includedir | --includedi | --included | --include \
267 | --includ | --inclu | --incl | --inc)
268 ac_prev=includedir ;;
269 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
270 | --includ=* | --inclu=* | --incl=* | --inc=*)
271 includedir="$ac_optarg" ;;
273 -infodir | --infodir | --infodi | --infod | --info | --inf)
274 ac_prev=infodir ;;
275 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
276 infodir="$ac_optarg" ;;
278 -libdir | --libdir | --libdi | --libd)
279 ac_prev=libdir ;;
280 -libdir=* | --libdir=* | --libdi=* | --libd=*)
281 libdir="$ac_optarg" ;;
283 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
284 | --libexe | --libex | --libe)
285 ac_prev=libexecdir ;;
286 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
287 | --libexe=* | --libex=* | --libe=*)
288 libexecdir="$ac_optarg" ;;
290 -localstatedir | --localstatedir | --localstatedi | --localstated \
291 | --localstate | --localstat | --localsta | --localst \
292 | --locals | --local | --loca | --loc | --lo)
293 ac_prev=localstatedir ;;
294 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
295 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
296 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
297 localstatedir="$ac_optarg" ;;
299 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
300 ac_prev=mandir ;;
301 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 mandir="$ac_optarg" ;;
304 -nfp | --nfp | --nf)
305 # Obsolete; use --without-fp.
306 with_fp=no ;;
308 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 | --no-cr | --no-c)
310 no_create=yes ;;
312 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
314 no_recursion=yes ;;
316 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
317 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
318 | --oldin | --oldi | --old | --ol | --o)
319 ac_prev=oldincludedir ;;
320 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
321 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
322 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
323 oldincludedir="$ac_optarg" ;;
325 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
326 ac_prev=prefix ;;
327 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
328 prefix="$ac_optarg" ;;
330 -program-prefix | --program-prefix | --program-prefi | --program-pref \
331 | --program-pre | --program-pr | --program-p)
332 ac_prev=program_prefix ;;
333 -program-prefix=* | --program-prefix=* | --program-prefi=* \
334 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
335 program_prefix="$ac_optarg" ;;
337 -program-suffix | --program-suffix | --program-suffi | --program-suff \
338 | --program-suf | --program-su | --program-s)
339 ac_prev=program_suffix ;;
340 -program-suffix=* | --program-suffix=* | --program-suffi=* \
341 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
342 program_suffix="$ac_optarg" ;;
344 -program-transform-name | --program-transform-name \
345 | --program-transform-nam | --program-transform-na \
346 | --program-transform-n | --program-transform- \
347 | --program-transform | --program-transfor \
348 | --program-transfo | --program-transf \
349 | --program-trans | --program-tran \
350 | --progr-tra | --program-tr | --program-t)
351 ac_prev=program_transform_name ;;
352 -program-transform-name=* | --program-transform-name=* \
353 | --program-transform-nam=* | --program-transform-na=* \
354 | --program-transform-n=* | --program-transform-=* \
355 | --program-transform=* | --program-transfor=* \
356 | --program-transfo=* | --program-transf=* \
357 | --program-trans=* | --program-tran=* \
358 | --progr-tra=* | --program-tr=* | --program-t=*)
359 program_transform_name="$ac_optarg" ;;
361 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
362 | -silent | --silent | --silen | --sile | --sil)
363 silent=yes ;;
365 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
366 ac_prev=sbindir ;;
367 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
368 | --sbi=* | --sb=*)
369 sbindir="$ac_optarg" ;;
371 -sharedstatedir | --sharedstatedir | --sharedstatedi \
372 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
373 | --sharedst | --shareds | --shared | --share | --shar \
374 | --sha | --sh)
375 ac_prev=sharedstatedir ;;
376 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
377 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
378 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
379 | --sha=* | --sh=*)
380 sharedstatedir="$ac_optarg" ;;
382 -site | --site | --sit)
383 ac_prev=site ;;
384 -site=* | --site=* | --sit=*)
385 site="$ac_optarg" ;;
387 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
388 ac_prev=srcdir ;;
389 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
390 srcdir="$ac_optarg" ;;
392 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
393 | --syscon | --sysco | --sysc | --sys | --sy)
394 ac_prev=sysconfdir ;;
395 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
396 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
397 sysconfdir="$ac_optarg" ;;
399 -target | --target | --targe | --targ | --tar | --ta | --t)
400 ac_prev=target ;;
401 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
402 target="$ac_optarg" ;;
404 -v | -verbose | --verbose | --verbos | --verbo | --verb)
405 verbose=yes ;;
407 -version | --version | --versio | --versi | --vers)
408 echo "configure generated by autoconf version 2.13"
409 exit 0 ;;
411 -with-* | --with-*)
412 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
413 # Reject names that are not valid shell variable names.
414 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
415 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417 ac_package=`echo $ac_package| sed 's/-/_/g'`
418 case "$ac_option" in
419 *=*) ;;
420 *) ac_optarg=yes ;;
421 esac
422 eval "with_${ac_package}='$ac_optarg'" ;;
424 -without-* | --without-*)
425 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
426 # Reject names that are not valid shell variable names.
427 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
428 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
430 ac_package=`echo $ac_package| sed 's/-/_/g'`
431 eval "with_${ac_package}=no" ;;
433 --x)
434 # Obsolete; use --with-x.
435 with_x=yes ;;
437 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
438 | --x-incl | --x-inc | --x-in | --x-i)
439 ac_prev=x_includes ;;
440 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
441 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
442 x_includes="$ac_optarg" ;;
444 -x-libraries | --x-libraries | --x-librarie | --x-librari \
445 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
446 ac_prev=x_libraries ;;
447 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
448 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
449 x_libraries="$ac_optarg" ;;
451 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
455 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
456 echo "configure: warning: $ac_option: invalid host type" 1>&2
458 if test "x$nonopt" != xNONE; then
459 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
461 nonopt="$ac_option"
464 esac
465 done
467 if test -n "$ac_prev"; then
468 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
471 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
473 # File descriptor usage:
474 # 0 standard input
475 # 1 file creation
476 # 2 errors and warnings
477 # 3 some systems may open it to /dev/tty
478 # 4 used on the Kubota Titan
479 # 6 checking for... messages and results
480 # 5 compiler messages saved in config.log
481 if test "$silent" = yes; then
482 exec 6>/dev/null
483 else
484 exec 6>&1
486 exec 5>./config.log
488 echo "\
489 This file contains any messages produced by compilers while
490 running configure, to aid debugging if configure makes a mistake.
491 " 1>&5
493 # Strip out --no-create and --no-recursion so they do not pile up.
494 # Also quote any args containing shell metacharacters.
495 ac_configure_args=
496 for ac_arg
498 case "$ac_arg" in
499 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
500 | --no-cr | --no-c) ;;
501 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
502 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
504 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
505 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
506 esac
507 done
509 # NLS nuisances.
510 # Only set these to C if already set. These must not be set unconditionally
511 # because not all systems understand e.g. LANG=C (notably SCO).
512 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
513 # Non-C LC_CTYPE values break the ctype check.
514 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
515 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
516 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
517 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
519 # confdefs.h avoids OS command line length limits that DEFS can exceed.
520 rm -rf conftest* confdefs.h
521 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
522 echo > confdefs.h
524 # A filename unique to this package, relative to the directory that
525 # configure is in, which we can look for to find out if srcdir is correct.
526 ac_unique_file=tree.c
528 # Find the source files, if location was not specified.
529 if test -z "$srcdir"; then
530 ac_srcdir_defaulted=yes
531 # Try the directory containing this script, then its parent.
532 ac_prog=$0
533 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
534 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
535 srcdir=$ac_confdir
536 if test ! -r $srcdir/$ac_unique_file; then
537 srcdir=..
539 else
540 ac_srcdir_defaulted=no
542 if test ! -r $srcdir/$ac_unique_file; then
543 if test "$ac_srcdir_defaulted" = yes; then
544 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
545 else
546 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
549 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
551 # Prefer explicitly selected file to automatically selected ones.
552 if test -z "$CONFIG_SITE"; then
553 if test "x$prefix" != xNONE; then
554 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
555 else
556 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
559 for ac_site_file in $CONFIG_SITE; do
560 if test -r "$ac_site_file"; then
561 echo "loading site script $ac_site_file"
562 . "$ac_site_file"
564 done
566 if test -r "$cache_file"; then
567 echo "loading cache $cache_file"
568 . $cache_file
569 else
570 echo "creating cache $cache_file"
571 > $cache_file
574 ac_ext=c
575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
576 ac_cpp='$CPP $CPPFLAGS'
577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
579 cross_compiling=$ac_cv_prog_cc_cross
581 ac_exeext=
582 ac_objext=o
583 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
584 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
585 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
586 ac_n= ac_c='
587 ' ac_t=' '
588 else
589 ac_n=-n ac_c= ac_t=
591 else
592 ac_n= ac_c='\c' ac_t=
598 remove=rm
599 hard_link=ln
600 symbolic_link='ln -s'
601 copy=cp
603 # Check for bogus environment variables.
604 # Test if LIBRARY_PATH contains the notation for the current directory
605 # since this would lead to problems installing/building glibc.
606 # LIBRARY_PATH contains the current directory if one of the following
607 # is true:
608 # - one of the terminals (":" and ";") is the first or last sign
609 # - two terminals occur directly after each other
610 # - the path contains an element with a dot in it
611 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
612 echo "configure:613: checking LIBRARY_PATH variable" >&5
613 case ${LIBRARY_PATH} in
614 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
615 library_path_setting="contains current directory"
618 library_path_setting="ok"
620 esac
621 echo "$ac_t""$library_path_setting" 1>&6
622 if test "$library_path_setting" != "ok"; then
623 { echo "configure: error:
624 *** LIBRARY_PATH shouldn't contain the current directory when
625 *** building gcc. Please change the environment variable
626 *** and run configure again." 1>&2; exit 1; }
629 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
630 # since this would lead to problems installing/building glibc.
631 # GCC_EXEC_PREFIX contains the current directory if one of the following
632 # is true:
633 # - one of the terminals (":" and ";") is the first or last sign
634 # - two terminals occur directly after each other
635 # - the path contains an element with a dot in it
636 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
637 echo "configure:638: checking GCC_EXEC_PREFIX variable" >&5
638 case ${GCC_EXEC_PREFIX} in
639 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
640 gcc_exec_prefix_setting="contains current directory"
643 gcc_exec_prefix_setting="ok"
645 esac
646 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
647 if test "$gcc_exec_prefix_setting" != "ok"; then
648 { echo "configure: error:
649 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
650 *** building gcc. Please change the environment variable
651 *** and run configure again." 1>&2; exit 1; }
654 # Check for additional parameters
656 # With GNU ld
657 # Check whether --with-gnu-ld or --without-gnu-ld was given.
658 if test "${with_gnu_ld+set}" = set; then
659 withval="$with_gnu_ld"
660 gnu_ld_flag="$with_gnu_ld"
661 else
662 gnu_ld_flag=no
666 # With pre-defined ld
667 # Check whether --with-ld or --without-ld was given.
668 if test "${with_ld+set}" = set; then
669 withval="$with_ld"
670 DEFAULT_LINKER="$with_ld"
673 if test x"${DEFAULT_LINKER+set}" = x"set"; then
674 if test ! -x "$DEFAULT_LINKER"; then
675 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
676 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
677 gnu_ld_flag=yes
679 cat >> confdefs.h <<EOF
680 #define DEFAULT_LINKER "$DEFAULT_LINKER"
685 # With GNU as
686 # Check whether --with-gnu-as or --without-gnu-as was given.
687 if test "${with_gnu_as+set}" = set; then
688 withval="$with_gnu_as"
689 gas_flag="$with_gnu_as"
690 else
691 gas_flag=no
695 # Check whether --with-as or --without-as was given.
696 if test "${with_as+set}" = set; then
697 withval="$with_as"
698 DEFAULT_ASSEMBLER="$with_as"
701 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
702 if test ! -x "$DEFAULT_ASSEMBLER"; then
703 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
704 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
705 gas_flag=yes
707 cat >> confdefs.h <<EOF
708 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
713 # With stabs
714 # Check whether --with-stabs or --without-stabs was given.
715 if test "${with_stabs+set}" = set; then
716 withval="$with_stabs"
717 stabs="$with_stabs"
718 else
719 stabs=no
723 # With ELF
724 # Check whether --with-elf or --without-elf was given.
725 if test "${with_elf+set}" = set; then
726 withval="$with_elf"
727 elf="$with_elf"
728 else
729 elf=no
733 # Specify the local prefix
734 local_prefix=
735 # Check whether --with-local-prefix or --without-local-prefix was given.
736 if test "${with_local_prefix+set}" = set; then
737 withval="$with_local_prefix"
738 case "${withval}" in
739 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
740 no) ;;
741 *) local_prefix=$with_local_prefix ;;
742 esac
746 # Default local prefix if it is empty
747 if test x$local_prefix = x; then
748 local_prefix=/usr/local
751 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
752 # passed in by the toplevel make and thus we'd get different behavior
753 # depending on where we built the sources.
754 gcc_gxx_include_dir=
755 # Specify the g++ header file directory
756 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
757 if test "${with_gxx_include_dir+set}" = set; then
758 withval="$with_gxx_include_dir"
759 case "${withval}" in
760 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
761 no) ;;
762 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
763 esac
767 if test x${gcc_gxx_include_dir} = x; then
768 if test x${enable_version_specific_runtime_libs} = xyes; then
769 gcc_gxx_include_dir='${libsubdir}/include/g++'
770 else
771 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
772 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
776 # Determine whether or not multilibs are enabled.
777 # Check whether --enable-multilib or --disable-multilib was given.
778 if test "${enable_multilib+set}" = set; then
779 enableval="$enable_multilib"
781 else
782 enable_multilib=yes
787 # Enable expensive internal checks
788 # Check whether --enable-checking or --disable-checking was given.
789 if test "${enable_checking+set}" = set; then
790 enableval="$enable_checking"
791 ac_checking=
792 ac_tree_checking=
793 ac_rtl_checking=
794 ac_gc_checking=
795 ac_gc_always_collect=
796 case "${enableval}" in
797 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
798 no) ;;
799 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
800 set fnord $enableval; shift
801 IFS="$ac_save_IFS"
802 for check
804 case $check in
805 misc) ac_checking=1 ;;
806 tree) ac_tree_checking=1 ;;
807 rtl) ac_rtl_checking=1 ;;
808 gc) ac_gc_checking=1 ;;
809 gcac) ac_gc_always_collect=1 ;;
810 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
811 esac
812 done
814 esac
816 else
817 # Enable some checks by default for development versions of GCC
818 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;
821 if test x$ac_checking != x ; then
822 cat >> confdefs.h <<\EOF
823 #define ENABLE_CHECKING 1
827 if test x$ac_tree_checking != x ; then
828 cat >> confdefs.h <<\EOF
829 #define ENABLE_TREE_CHECKING 1
833 if test x$ac_rtl_checking != x ; then
834 cat >> confdefs.h <<\EOF
835 #define ENABLE_RTL_CHECKING 1
839 if test x$ac_gc_checking != x ; then
840 cat >> confdefs.h <<\EOF
841 #define ENABLE_GC_CHECKING 1
845 if test x$ac_gc_always_collect != x ; then
846 cat >> confdefs.h <<\EOF
847 #define ENABLE_GC_ALWAYS_COLLECT 1
853 # Check whether --enable-cpp or --disable-cpp was given.
854 if test "${enable_cpp+set}" = set; then
855 enableval="$enable_cpp"
857 else
858 enable_cpp=yes
862 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
863 if test "${with_cpp_install_dir+set}" = set; then
864 withval="$with_cpp_install_dir"
865 if test x$withval = xyes; then
866 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
867 elif test x$withval != xno; then
868 cpp_install_dir=$withval
873 # Enable Multibyte Characters for C/C++
874 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
875 if test "${enable_c_mbchar+set}" = set; then
876 enableval="$enable_c_mbchar"
877 if test x$enable_c_mbchar != xno; then
878 cat >> confdefs.h <<\EOF
879 #define MULTIBYTE_CHARS 1
886 # Enable threads
887 # Pass with no value to take the default
888 # Pass with a value to specify a thread package
889 # Check whether --enable-threads or --disable-threads was given.
890 if test "${enable_threads+set}" = set; then
891 enableval="$enable_threads"
893 else
894 enable_threads=''
898 enable_threads_flag=$enable_threads
899 # Check if a valid thread package
900 case x${enable_threads_flag} in
901 x | xno)
902 # No threads
903 target_thread_file='single'
905 xyes)
906 # default
907 target_thread_file=''
909 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
910 xsolaris | xwin32 | xdce | xvxworks | xaix)
911 target_thread_file=$enable_threads_flag
914 echo "$enable_threads is an unknown thread package" 1>&2
915 exit 1
917 esac
919 # Check whether --enable-objc-gc or --disable-objc-gc was given.
920 if test "${enable_objc_gc+set}" = set; then
921 enableval="$enable_objc_gc"
922 if test x$enable_objc_gc = xno; then
923 objc_boehm_gc=''
924 else
925 objc_boehm_gc=1
927 else
928 objc_boehm_gc=''
932 # Check whether --with-dwarf2 or --without-dwarf2 was given.
933 if test "${with_dwarf2+set}" = set; then
934 withval="$with_dwarf2"
935 dwarf2="$with_dwarf2"
936 else
937 dwarf2=no
941 # Check whether --enable-shared or --disable-shared was given.
942 if test "${enable_shared+set}" = set; then
943 enableval="$enable_shared"
945 case $enable_shared in
946 yes | no) ;;
948 enable_shared=no
949 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
950 for pkg in $enableval; do
951 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
952 enable_shared=yes
954 done
955 IFS="$ac_save_ifs"
957 esac
959 else
960 enable_shared=yes
965 # Determine the host, build, and target systems
966 ac_aux_dir=
967 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
968 if test -f $ac_dir/install-sh; then
969 ac_aux_dir=$ac_dir
970 ac_install_sh="$ac_aux_dir/install-sh -c"
971 break
972 elif test -f $ac_dir/install.sh; then
973 ac_aux_dir=$ac_dir
974 ac_install_sh="$ac_aux_dir/install.sh -c"
975 break
977 done
978 if test -z "$ac_aux_dir"; then
979 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
981 ac_config_guess=$ac_aux_dir/config.guess
982 ac_config_sub=$ac_aux_dir/config.sub
983 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
986 # Do some error checking and defaulting for the host and target type.
987 # The inputs are:
988 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
990 # The rules are:
991 # 1. You are not allowed to specify --host, --target, and nonopt at the
992 # same time.
993 # 2. Host defaults to nonopt.
994 # 3. If nonopt is not specified, then host defaults to the current host,
995 # as determined by config.guess.
996 # 4. Target and build default to nonopt.
997 # 5. If nonopt is not specified, then target and build default to host.
999 # The aliases save the names the user supplied, while $host etc.
1000 # will get canonicalized.
1001 case $host---$target---$nonopt in
1002 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1003 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1004 esac
1007 # Make sure we can run config.sub.
1008 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1009 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1012 echo $ac_n "checking host system type""... $ac_c" 1>&6
1013 echo "configure:1014: checking host system type" >&5
1015 host_alias=$host
1016 case "$host_alias" in
1017 NONE)
1018 case $nonopt in
1019 NONE)
1020 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1021 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1022 fi ;;
1023 *) host_alias=$nonopt ;;
1024 esac ;;
1025 esac
1027 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1028 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1029 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1030 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1031 echo "$ac_t""$host" 1>&6
1033 echo $ac_n "checking target system type""... $ac_c" 1>&6
1034 echo "configure:1035: checking target system type" >&5
1036 target_alias=$target
1037 case "$target_alias" in
1038 NONE)
1039 case $nonopt in
1040 NONE) target_alias=$host_alias ;;
1041 *) target_alias=$nonopt ;;
1042 esac ;;
1043 esac
1045 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1046 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1047 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1048 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1049 echo "$ac_t""$target" 1>&6
1051 echo $ac_n "checking build system type""... $ac_c" 1>&6
1052 echo "configure:1053: checking build system type" >&5
1054 build_alias=$build
1055 case "$build_alias" in
1056 NONE)
1057 case $nonopt in
1058 NONE) build_alias=$host_alias ;;
1059 *) build_alias=$nonopt ;;
1060 esac ;;
1061 esac
1063 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1064 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067 echo "$ac_t""$build" 1>&6
1069 test "$host_alias" != "$target_alias" &&
1070 test "$program_prefix$program_suffix$program_transform_name" = \
1071 NONENONEs,x,x, &&
1072 program_prefix=${target_alias}-
1075 # Find the native compiler
1076 # Extract the first word of "gcc", so it can be a program name with args.
1077 set dummy gcc; ac_word=$2
1078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1079 echo "configure:1080: checking for $ac_word" >&5
1080 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1082 else
1083 if test -n "$CC"; then
1084 ac_cv_prog_CC="$CC" # Let the user override the test.
1085 else
1086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1087 ac_dummy="$PATH"
1088 for ac_dir in $ac_dummy; do
1089 test -z "$ac_dir" && ac_dir=.
1090 if test -f $ac_dir/$ac_word; then
1091 ac_cv_prog_CC="gcc"
1092 break
1094 done
1095 IFS="$ac_save_ifs"
1098 CC="$ac_cv_prog_CC"
1099 if test -n "$CC"; then
1100 echo "$ac_t""$CC" 1>&6
1101 else
1102 echo "$ac_t""no" 1>&6
1105 if test -z "$CC"; then
1106 # Extract the first word of "cc", so it can be a program name with args.
1107 set dummy cc; ac_word=$2
1108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1109 echo "configure:1110: checking for $ac_word" >&5
1110 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1112 else
1113 if test -n "$CC"; then
1114 ac_cv_prog_CC="$CC" # Let the user override the test.
1115 else
1116 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1117 ac_prog_rejected=no
1118 ac_dummy="$PATH"
1119 for ac_dir in $ac_dummy; do
1120 test -z "$ac_dir" && ac_dir=.
1121 if test -f $ac_dir/$ac_word; then
1122 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1123 ac_prog_rejected=yes
1124 continue
1126 ac_cv_prog_CC="cc"
1127 break
1129 done
1130 IFS="$ac_save_ifs"
1131 if test $ac_prog_rejected = yes; then
1132 # We found a bogon in the path, so make sure we never use it.
1133 set dummy $ac_cv_prog_CC
1134 shift
1135 if test $# -gt 0; then
1136 # We chose a different compiler from the bogus one.
1137 # However, it has the same basename, so the bogon will be chosen
1138 # first if we set CC to just the basename; use the full file name.
1139 shift
1140 set dummy "$ac_dir/$ac_word" "$@"
1141 shift
1142 ac_cv_prog_CC="$@"
1147 CC="$ac_cv_prog_CC"
1148 if test -n "$CC"; then
1149 echo "$ac_t""$CC" 1>&6
1150 else
1151 echo "$ac_t""no" 1>&6
1154 if test -z "$CC"; then
1155 case "`uname -s`" in
1156 *win32* | *WIN32*)
1157 # Extract the first word of "cl", so it can be a program name with args.
1158 set dummy cl; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_word" >&5
1161 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164 if test -n "$CC"; then
1165 ac_cv_prog_CC="$CC" # Let the user override the test.
1166 else
1167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1168 ac_dummy="$PATH"
1169 for ac_dir in $ac_dummy; do
1170 test -z "$ac_dir" && ac_dir=.
1171 if test -f $ac_dir/$ac_word; then
1172 ac_cv_prog_CC="cl"
1173 break
1175 done
1176 IFS="$ac_save_ifs"
1179 CC="$ac_cv_prog_CC"
1180 if test -n "$CC"; then
1181 echo "$ac_t""$CC" 1>&6
1182 else
1183 echo "$ac_t""no" 1>&6
1186 esac
1188 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1191 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1192 echo "configure:1193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1194 ac_ext=c
1195 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1196 ac_cpp='$CPP $CPPFLAGS'
1197 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1198 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1199 cross_compiling=$ac_cv_prog_cc_cross
1201 cat > conftest.$ac_ext << EOF
1203 #line 1204 "configure"
1204 #include "confdefs.h"
1206 main(){return(0);}
1208 if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1209 ac_cv_prog_cc_works=yes
1210 # If we can't run a trivial program, we are probably using a cross compiler.
1211 if (./conftest; exit) 2>/dev/null; then
1212 ac_cv_prog_cc_cross=no
1213 else
1214 ac_cv_prog_cc_cross=yes
1216 else
1217 echo "configure: failed program was:" >&5
1218 cat conftest.$ac_ext >&5
1219 ac_cv_prog_cc_works=no
1221 rm -fr conftest*
1222 ac_ext=c
1223 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1224 ac_cpp='$CPP $CPPFLAGS'
1225 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1226 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1227 cross_compiling=$ac_cv_prog_cc_cross
1229 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1230 if test $ac_cv_prog_cc_works = no; then
1231 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1233 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1234 echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1235 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1236 cross_compiling=$ac_cv_prog_cc_cross
1238 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1239 echo "configure:1240: checking whether we are using GNU C" >&5
1240 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1241 echo $ac_n "(cached) $ac_c" 1>&6
1242 else
1243 cat > conftest.c <<EOF
1244 #ifdef __GNUC__
1245 yes;
1246 #endif
1248 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1249 ac_cv_prog_gcc=yes
1250 else
1251 ac_cv_prog_gcc=no
1255 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1257 if test $ac_cv_prog_gcc = yes; then
1258 GCC=yes
1259 else
1260 GCC=
1263 ac_test_CFLAGS="${CFLAGS+set}"
1264 ac_save_CFLAGS="$CFLAGS"
1265 CFLAGS=
1266 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1267 echo "configure:1268: checking whether ${CC-cc} accepts -g" >&5
1268 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1270 else
1271 echo 'void f(){}' > conftest.c
1272 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1273 ac_cv_prog_cc_g=yes
1274 else
1275 ac_cv_prog_cc_g=no
1277 rm -f conftest*
1281 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1282 if test "$ac_test_CFLAGS" = set; then
1283 CFLAGS="$ac_save_CFLAGS"
1284 elif test $ac_cv_prog_cc_g = yes; then
1285 if test "$GCC" = yes; then
1286 CFLAGS="-g -O2"
1287 else
1288 CFLAGS="-g"
1290 else
1291 if test "$GCC" = yes; then
1292 CFLAGS="-O2"
1293 else
1294 CFLAGS=
1298 if test "x$CC" != xcc; then
1299 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1300 echo "configure:1301: checking whether $CC and cc understand -c and -o together" >&5
1301 else
1302 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1303 echo "configure:1304: checking whether cc understands -c and -o together" >&5
1305 set dummy $CC; ac_cc="`echo $2 |
1306 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1307 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310 echo 'foo(){}' > conftest.c
1311 # Make sure it works both with $CC and with simple cc.
1312 # We do the test twice because some compilers refuse to overwrite an
1313 # existing .o file with -o, though they will create one.
1314 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1315 if { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1316 test -f conftest.o && { (eval echo configure:1317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1317 then
1318 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1319 if test "x$CC" != xcc; then
1320 # Test first that cc exists at all.
1321 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1322 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1323 if { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1324 test -f conftest.o && { (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1325 then
1326 # cc works too.
1328 else
1329 # cc exists but doesn't like -o.
1330 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1334 else
1335 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1337 rm -f conftest*
1340 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1341 echo "$ac_t""yes" 1>&6
1342 else
1343 echo "$ac_t""no" 1>&6
1344 cat >> confdefs.h <<\EOF
1345 #define NO_MINUS_C_MINUS_O 1
1350 # autoconf is lame and doesn't give us any substitution variable for this.
1351 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1352 NO_MINUS_C_MINUS_O=yes
1353 else
1354 OUTPUT_OPTION='-o $@'
1359 echo $ac_n "checking for long double""... $ac_c" 1>&6
1360 echo "configure:1361: checking for long double" >&5
1361 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1362 echo $ac_n "(cached) $ac_c" 1>&6
1363 else
1364 if test "$GCC" = yes; then
1365 gcc_cv_c_long_double=yes
1366 else
1367 cat > conftest.$ac_ext <<EOF
1368 #line 1369 "configure"
1369 #include "confdefs.h"
1371 int main() {
1372 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1373 long double foo = 0.0;
1374 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1375 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1376 ; return 0; }
1378 if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1379 rm -rf conftest*
1380 gcc_cv_c_long_double=yes
1381 else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1384 rm -rf conftest*
1385 gcc_cv_c_long_double=no
1387 rm -f conftest*
1391 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1392 if test $gcc_cv_c_long_double = yes; then
1393 cat >> confdefs.h <<\EOF
1394 #define HAVE_LONG_DOUBLE 1
1400 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1401 echo "configure:1402: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1402 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1403 echo $ac_n "(cached) $ac_c" 1>&6
1404 else
1405 save_CFLAGS="$CFLAGS"
1406 CFLAGS="-Wno-long-long"
1407 cat > conftest.$ac_ext <<EOF
1408 #line 1409 "configure"
1409 #include "confdefs.h"
1411 int main() {
1413 ; return 0; }
1415 if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1416 rm -rf conftest*
1417 ac_cv_prog_cc_no_long_long=yes
1418 else
1419 echo "configure: failed program was:" >&5
1420 cat conftest.$ac_ext >&5
1421 rm -rf conftest*
1422 ac_cv_prog_cc_no_long_long=no
1424 rm -f conftest*
1425 CFLAGS="$save_CFLAGS"
1428 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1429 strict1_warn=
1430 if test $ac_cv_prog_cc_no_long_long = yes; then
1431 strict1_warn="-pedantic -Wno-long-long"
1435 # If the native compiler is GCC, we can enable warnings even in stage1.
1436 # That's useful for people building cross-compilers, or just running a
1437 # quick `make'.
1438 warn_cflags=
1439 if test "x$GCC" = "xyes"; then
1440 warn_cflags='$(GCC_WARN_CFLAGS)'
1444 # Stage specific cflags for build.
1445 stage1_cflags=
1446 case $build in
1447 vax-*-*)
1448 if test x$GCC = xyes
1449 then
1450 stage1_cflags="-Wa,-J"
1451 else
1452 stage1_cflags="-J"
1455 esac
1458 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1459 echo "configure:1460: checking whether ${MAKE-make} sets \${MAKE}" >&5
1460 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1461 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464 cat > conftestmake <<\EOF
1465 all:
1466 @echo 'ac_maketemp="${MAKE}"'
1468 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1469 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1470 if test -n "$ac_maketemp"; then
1471 eval ac_cv_prog_make_${ac_make}_set=yes
1472 else
1473 eval ac_cv_prog_make_${ac_make}_set=no
1475 rm -f conftestmake
1477 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1478 echo "$ac_t""yes" 1>&6
1479 SET_MAKE=
1480 else
1481 echo "$ac_t""no" 1>&6
1482 SET_MAKE="MAKE=${MAKE-make}"
1486 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1487 echo "configure:1488: checking whether a default assembler was specified" >&5
1488 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1489 if test x"$gas_flag" = x"no"; then
1490 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1491 else
1492 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1494 else
1495 echo "$ac_t""no" 1>&6
1498 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1499 echo "configure:1500: checking whether a default linker was specified" >&5
1500 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1501 if test x"$gnu_ld_flag" = x"no"; then
1502 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1503 else
1504 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1506 else
1507 echo "$ac_t""no" 1>&6
1510 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
1511 echo "configure:1512: checking for GNU C library" >&5
1512 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
1514 else
1515 cat > conftest.$ac_ext <<EOF
1516 #line 1517 "configure"
1517 #include "confdefs.h"
1518 #include <features.h>
1519 int main() {
1521 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
1522 #error Not a GNU C library system
1523 #endif
1524 ; return 0; }
1526 if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1527 rm -rf conftest*
1528 gcc_cv_glibc=yes
1529 else
1530 echo "configure: failed program was:" >&5
1531 cat conftest.$ac_ext >&5
1532 rm -rf conftest*
1533 gcc_cv_glibc=no
1535 rm -f conftest*
1538 echo "$ac_t""$gcc_cv_glibc" 1>&6
1539 if test $gcc_cv_glibc = yes; then
1540 cat >> confdefs.h <<\EOF
1541 #define _GNU_SOURCE 1
1546 echo $ac_n "checking for inline""... $ac_c" 1>&6
1547 echo "configure:1548: checking for inline" >&5
1548 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1549 echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551 ac_cv_c_inline=no
1552 for ac_kw in inline __inline__ __inline; do
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1557 int main() {
1558 } $ac_kw foo() {
1559 ; return 0; }
1561 if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1562 rm -rf conftest*
1563 ac_cv_c_inline=$ac_kw; break
1564 else
1565 echo "configure: failed program was:" >&5
1566 cat conftest.$ac_ext >&5
1568 rm -f conftest*
1569 done
1573 echo "$ac_t""$ac_cv_c_inline" 1>&6
1574 case "$ac_cv_c_inline" in
1575 inline | yes) ;;
1576 no) cat >> confdefs.h <<\EOF
1577 #define inline
1580 *) cat >> confdefs.h <<EOF
1581 #define inline $ac_cv_c_inline
1584 esac
1587 # Find some useful tools
1588 for ac_prog in mawk gawk nawk awk
1590 # Extract the first word of "$ac_prog", so it can be a program name with args.
1591 set dummy $ac_prog; ac_word=$2
1592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1593 echo "configure:1594: checking for $ac_word" >&5
1594 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1595 echo $ac_n "(cached) $ac_c" 1>&6
1596 else
1597 if test -n "$AWK"; then
1598 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1599 else
1600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1601 ac_dummy="$PATH"
1602 for ac_dir in $ac_dummy; do
1603 test -z "$ac_dir" && ac_dir=.
1604 if test -f $ac_dir/$ac_word; then
1605 ac_cv_prog_AWK="$ac_prog"
1606 break
1608 done
1609 IFS="$ac_save_ifs"
1612 AWK="$ac_cv_prog_AWK"
1613 if test -n "$AWK"; then
1614 echo "$ac_t""$AWK" 1>&6
1615 else
1616 echo "$ac_t""no" 1>&6
1619 test -n "$AWK" && break
1620 done
1622 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1623 echo "configure:1624: checking whether ln works" >&5
1624 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
1626 else
1627 rm -f conftestdata_t
1628 echo >conftestdata_f
1629 if ln conftestdata_f conftestdata_t 2>/dev/null
1630 then
1631 gcc_cv_prog_LN="ln"
1632 else
1633 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1634 then
1635 gcc_cv_prog_LN="ln -s"
1636 else
1637 gcc_cv_prog_LN=cp
1640 rm -f conftestdata_f conftestdata_t
1643 LN="$gcc_cv_prog_LN"
1644 if test "$gcc_cv_prog_LN" = "ln"; then
1645 echo "$ac_t""yes" 1>&6
1646 else
1647 if test "$gcc_cv_prog_LN" = "ln -s"; then
1648 echo "$ac_t""no, using ln -s" 1>&6
1649 else
1650 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1654 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1655 echo "configure:1656: checking whether ln -s works" >&5
1656 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659 rm -f conftestdata_t
1660 echo >conftestdata_f
1661 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1662 then
1663 gcc_cv_prog_LN_S="ln -s"
1664 else
1665 if ln conftestdata_f conftestdata_t 2>/dev/null
1666 then
1667 gcc_cv_prog_LN_S=ln
1668 else
1669 gcc_cv_prog_LN_S=cp
1672 rm -f conftestdata_f conftestdata_t
1675 LN_S="$gcc_cv_prog_LN_S"
1676 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1677 echo "$ac_t""yes" 1>&6
1678 else
1679 if test "$gcc_cv_prog_LN_S" = "ln"; then
1680 echo "$ac_t""no, using ln" 1>&6
1681 else
1682 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1686 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1687 echo "configure:1688: checking for volatile" >&5
1688 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1689 echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1695 int main() {
1696 volatile int foo;
1697 ; return 0; }
1699 if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1700 rm -rf conftest*
1701 gcc_cv_c_volatile=yes
1702 else
1703 echo "configure: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1705 rm -rf conftest*
1706 gcc_cv_c_volatile=no
1708 rm -f conftest*
1711 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1712 if test $gcc_cv_c_volatile = yes ; then
1713 cat >> confdefs.h <<\EOF
1714 #define HAVE_VOLATILE 1
1719 # Extract the first word of "ranlib", so it can be a program name with args.
1720 set dummy ranlib; ac_word=$2
1721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1722 echo "configure:1723: checking for $ac_word" >&5
1723 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1724 echo $ac_n "(cached) $ac_c" 1>&6
1725 else
1726 if test -n "$RANLIB"; then
1727 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1728 else
1729 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1730 ac_dummy="$PATH"
1731 for ac_dir in $ac_dummy; do
1732 test -z "$ac_dir" && ac_dir=.
1733 if test -f $ac_dir/$ac_word; then
1734 ac_cv_prog_RANLIB="ranlib"
1735 break
1737 done
1738 IFS="$ac_save_ifs"
1739 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1742 RANLIB="$ac_cv_prog_RANLIB"
1743 if test -n "$RANLIB"; then
1744 echo "$ac_t""$RANLIB" 1>&6
1745 else
1746 echo "$ac_t""no" 1>&6
1749 # Find a good install program. We prefer a C program (faster),
1750 # so one script is as good as another. But avoid the broken or
1751 # incompatible versions:
1752 # SysV /etc/install, /usr/sbin/install
1753 # SunOS /usr/etc/install
1754 # IRIX /sbin/install
1755 # AIX /bin/install
1756 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1757 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1758 # ./install, which can be erroneously created by make from ./install.sh.
1759 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1760 echo "configure:1761: checking for a BSD compatible install" >&5
1761 if test -z "$INSTALL"; then
1762 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1766 for ac_dir in $PATH; do
1767 # Account for people who put trailing slashes in PATH elements.
1768 case "$ac_dir/" in
1769 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1771 # OSF1 and SCO ODT 3.0 have their own names for install.
1772 for ac_prog in ginstall scoinst install; do
1773 if test -f $ac_dir/$ac_prog; then
1774 if test $ac_prog = install &&
1775 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1776 # AIX install. It has an incompatible calling convention.
1777 # OSF/1 installbsd also uses dspmsg, but is usable.
1779 else
1780 ac_cv_path_install="$ac_dir/$ac_prog -c"
1781 break 2
1784 done
1786 esac
1787 done
1788 IFS="$ac_save_IFS"
1791 if test "${ac_cv_path_install+set}" = set; then
1792 INSTALL="$ac_cv_path_install"
1793 else
1794 # As a last resort, use the slow shell script. We don't cache a
1795 # path for INSTALL within a source directory, because that will
1796 # break other packages using the cache if that directory is
1797 # removed, or if the path is relative.
1798 INSTALL="$ac_install_sh"
1801 echo "$ac_t""$INSTALL" 1>&6
1803 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1804 # It thinks the first close brace ends the variable substitution.
1805 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1807 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1810 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1811 echo "configure:1812: checking how to run the C preprocessor" >&5
1812 # On Suns, sometimes $CPP names a directory.
1813 if test -n "$CPP" && test -d "$CPP"; then
1814 CPP=
1816 if test -z "$CPP"; then
1817 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820 # This must be in double quotes, not single quotes, because CPP may get
1821 # substituted into the Makefile and "${CC-cc}" will confuse make.
1822 CPP="${CC-cc} -E"
1823 # On the NeXT, cc -E runs the code through the compiler's parser,
1824 # not just through cpp.
1825 cat > conftest.$ac_ext <<EOF
1826 #line 1827 "configure"
1827 #include "confdefs.h"
1828 #include <assert.h>
1829 Syntax Error
1831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1832 { (eval echo configure:1833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1834 if test -z "$ac_err"; then
1836 else
1837 echo "$ac_err" >&5
1838 echo "configure: failed program was:" >&5
1839 cat conftest.$ac_ext >&5
1840 rm -rf conftest*
1841 CPP="${CC-cc} -E -traditional-cpp"
1842 cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845 #include <assert.h>
1846 Syntax Error
1848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1849 { (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1851 if test -z "$ac_err"; then
1853 else
1854 echo "$ac_err" >&5
1855 echo "configure: failed program was:" >&5
1856 cat conftest.$ac_ext >&5
1857 rm -rf conftest*
1858 CPP="${CC-cc} -nologo -E"
1859 cat > conftest.$ac_ext <<EOF
1860 #line 1861 "configure"
1861 #include "confdefs.h"
1862 #include <assert.h>
1863 Syntax Error
1865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1866 { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1868 if test -z "$ac_err"; then
1870 else
1871 echo "$ac_err" >&5
1872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 rm -rf conftest*
1875 CPP=/lib/cpp
1877 rm -f conftest*
1879 rm -f conftest*
1881 rm -f conftest*
1882 ac_cv_prog_CPP="$CPP"
1884 CPP="$ac_cv_prog_CPP"
1885 else
1886 ac_cv_prog_CPP="$CPP"
1888 echo "$ac_t""$CPP" 1>&6
1890 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1891 echo "configure:1892: checking for ANSI C header files" >&5
1892 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1893 echo $ac_n "(cached) $ac_c" 1>&6
1894 else
1895 cat > conftest.$ac_ext <<EOF
1896 #line 1897 "configure"
1897 #include "confdefs.h"
1898 #include <stdlib.h>
1899 #include <stdarg.h>
1900 #include <string.h>
1901 #include <float.h>
1903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1904 { (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1906 if test -z "$ac_err"; then
1907 rm -rf conftest*
1908 ac_cv_header_stdc=yes
1909 else
1910 echo "$ac_err" >&5
1911 echo "configure: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 rm -rf conftest*
1914 ac_cv_header_stdc=no
1916 rm -f conftest*
1918 if test $ac_cv_header_stdc = yes; then
1919 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1920 cat > conftest.$ac_ext <<EOF
1921 #line 1922 "configure"
1922 #include "confdefs.h"
1923 #include <string.h>
1925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1926 egrep "memchr" >/dev/null 2>&1; then
1928 else
1929 rm -rf conftest*
1930 ac_cv_header_stdc=no
1932 rm -f conftest*
1936 if test $ac_cv_header_stdc = yes; then
1937 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1938 cat > conftest.$ac_ext <<EOF
1939 #line 1940 "configure"
1940 #include "confdefs.h"
1941 #include <stdlib.h>
1943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1944 egrep "free" >/dev/null 2>&1; then
1946 else
1947 rm -rf conftest*
1948 ac_cv_header_stdc=no
1950 rm -f conftest*
1954 if test $ac_cv_header_stdc = yes; then
1955 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1956 if test "$cross_compiling" = yes; then
1958 else
1959 cat > conftest.$ac_ext <<EOF
1960 #line 1961 "configure"
1961 #include "confdefs.h"
1962 #include <ctype.h>
1963 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1964 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1965 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1966 int main () { int i; for (i = 0; i < 256; i++)
1967 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1968 exit (0); }
1971 if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1972 then
1974 else
1975 echo "configure: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 rm -fr conftest*
1978 ac_cv_header_stdc=no
1980 rm -fr conftest*
1986 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1987 if test $ac_cv_header_stdc = yes; then
1988 cat >> confdefs.h <<\EOF
1989 #define STDC_HEADERS 1
1994 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether time.h and sys/time.h may both be included" >&5
1996 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998 else
1999 cat > conftest.$ac_ext <<EOF
2000 #line 2001 "configure"
2001 #include "confdefs.h"
2002 #include <sys/types.h>
2003 #include <sys/time.h>
2004 #include <time.h>
2005 int main() {
2006 struct tm *tp;
2007 ; return 0; }
2009 if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2010 rm -rf conftest*
2011 ac_cv_header_time=yes
2012 else
2013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 rm -rf conftest*
2016 ac_cv_header_time=no
2018 rm -f conftest*
2021 echo "$ac_t""$ac_cv_header_time" 1>&6
2022 if test $ac_cv_header_time = yes; then
2023 cat >> confdefs.h <<\EOF
2024 #define TIME_WITH_SYS_TIME 1
2029 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2030 echo "configure:2031: checking whether string.h and strings.h may both be included" >&5
2031 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
2033 else
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 #include <string.h>
2038 #include <strings.h>
2039 int main() {
2041 ; return 0; }
2043 if { (eval echo configure:2044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044 rm -rf conftest*
2045 gcc_cv_header_string=yes
2046 else
2047 echo "configure: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2049 rm -rf conftest*
2050 gcc_cv_header_string=no
2052 rm -f conftest*
2055 echo "$ac_t""$gcc_cv_header_string" 1>&6
2056 if test $gcc_cv_header_string = yes; then
2057 cat >> confdefs.h <<\EOF
2058 #define STRING_WITH_STRINGS 1
2063 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2064 echo "configure:2065: checking for sys/wait.h that is POSIX.1 compatible" >&5
2065 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2066 echo $ac_n "(cached) $ac_c" 1>&6
2067 else
2068 cat > conftest.$ac_ext <<EOF
2069 #line 2070 "configure"
2070 #include "confdefs.h"
2071 #include <sys/types.h>
2072 #include <sys/wait.h>
2073 #ifndef WEXITSTATUS
2074 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2075 #endif
2076 #ifndef WIFEXITED
2077 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2078 #endif
2079 int main() {
2080 int s;
2081 wait (&s);
2082 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2083 ; return 0; }
2085 if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2086 rm -rf conftest*
2087 ac_cv_header_sys_wait_h=yes
2088 else
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 ac_cv_header_sys_wait_h=no
2094 rm -f conftest*
2097 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2098 if test $ac_cv_header_sys_wait_h = yes; then
2099 cat >> confdefs.h <<\EOF
2100 #define HAVE_SYS_WAIT_H 1
2105 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2106 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2107 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2108 direct.h malloc.h langinfo.h iconv.h stdbool.h
2110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2112 echo "configure:2113: checking for $ac_hdr" >&5
2113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2114 echo $ac_n "(cached) $ac_c" 1>&6
2115 else
2116 cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119 #include <$ac_hdr>
2121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2122 { (eval echo configure:2123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2124 if test -z "$ac_err"; then
2125 rm -rf conftest*
2126 eval "ac_cv_header_$ac_safe=yes"
2127 else
2128 echo "$ac_err" >&5
2129 echo "configure: failed program was:" >&5
2130 cat conftest.$ac_ext >&5
2131 rm -rf conftest*
2132 eval "ac_cv_header_$ac_safe=no"
2134 rm -f conftest*
2136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2137 echo "$ac_t""yes" 1>&6
2138 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2139 cat >> confdefs.h <<EOF
2140 #define $ac_tr_hdr 1
2143 else
2144 echo "$ac_t""no" 1>&6
2146 done
2149 # Check for thread headers.
2150 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2151 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2152 echo "configure:2153: checking for thread.h" >&5
2153 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155 else
2156 cat > conftest.$ac_ext <<EOF
2157 #line 2158 "configure"
2158 #include "confdefs.h"
2159 #include <thread.h>
2161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2162 { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2164 if test -z "$ac_err"; then
2165 rm -rf conftest*
2166 eval "ac_cv_header_$ac_safe=yes"
2167 else
2168 echo "$ac_err" >&5
2169 echo "configure: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 rm -rf conftest*
2172 eval "ac_cv_header_$ac_safe=no"
2174 rm -f conftest*
2176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2177 echo "$ac_t""yes" 1>&6
2178 have_thread_h=yes
2179 else
2180 echo "$ac_t""no" 1>&6
2181 have_thread_h=
2184 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2185 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2186 echo "configure:2187: checking for pthread.h" >&5
2187 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2188 echo $ac_n "(cached) $ac_c" 1>&6
2189 else
2190 cat > conftest.$ac_ext <<EOF
2191 #line 2192 "configure"
2192 #include "confdefs.h"
2193 #include <pthread.h>
2195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2196 { (eval echo configure:2197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2198 if test -z "$ac_err"; then
2199 rm -rf conftest*
2200 eval "ac_cv_header_$ac_safe=yes"
2201 else
2202 echo "$ac_err" >&5
2203 echo "configure: failed program was:" >&5
2204 cat conftest.$ac_ext >&5
2205 rm -rf conftest*
2206 eval "ac_cv_header_$ac_safe=no"
2208 rm -f conftest*
2210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2211 echo "$ac_t""yes" 1>&6
2212 have_pthread_h=yes
2213 else
2214 echo "$ac_t""no" 1>&6
2215 have_pthread_h=
2219 # See if GNAT has been installed
2220 # Extract the first word of "gnatbind", so it can be a program name with args.
2221 set dummy gnatbind; ac_word=$2
2222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2223 echo "configure:2224: checking for $ac_word" >&5
2224 if eval "test \"`echo '$''{'ac_cv_prog_have_gnat'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 if test -n "$have_gnat"; then
2228 ac_cv_prog_have_gnat="$have_gnat" # Let the user override the test.
2229 else
2230 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2231 ac_dummy="$PATH"
2232 for ac_dir in $ac_dummy; do
2233 test -z "$ac_dir" && ac_dir=.
2234 if test -f $ac_dir/$ac_word; then
2235 ac_cv_prog_have_gnat="yes"
2236 break
2238 done
2239 IFS="$ac_save_ifs"
2240 test -z "$ac_cv_prog_have_gnat" && ac_cv_prog_have_gnat="no"
2243 have_gnat="$ac_cv_prog_have_gnat"
2244 if test -n "$have_gnat"; then
2245 echo "$ac_t""$have_gnat" 1>&6
2246 else
2247 echo "$ac_t""no" 1>&6
2251 # See if we have the mktemp command.
2252 # Extract the first word of "mktemp", so it can be a program name with args.
2253 set dummy mktemp; ac_word=$2
2254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2255 echo "configure:2256: checking for $ac_word" >&5
2256 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2258 else
2259 if test -n "$have_mktemp_command"; then
2260 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2261 else
2262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2263 ac_dummy="$PATH"
2264 for ac_dir in $ac_dummy; do
2265 test -z "$ac_dir" && ac_dir=.
2266 if test -f $ac_dir/$ac_word; then
2267 ac_cv_prog_have_mktemp_command="yes"
2268 break
2270 done
2271 IFS="$ac_save_ifs"
2272 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2275 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2276 if test -n "$have_mktemp_command"; then
2277 echo "$ac_t""$have_mktemp_command" 1>&6
2278 else
2279 echo "$ac_t""no" 1>&6
2283 # Do we have a single-tree copy of texinfo?
2284 if test -f $srcdir/../texinfo/Makefile.in; then
2285 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2286 gcc_cv_prog_makeinfo_modern=yes
2287 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2288 else
2289 # See if makeinfo has been installed and is modern enough
2290 # that we can use it.
2291 # Extract the first word of "makeinfo", so it can be a program name with args.
2292 set dummy makeinfo; ac_word=$2
2293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2294 echo "configure:2295: checking for $ac_word" >&5
2295 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2296 echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298 if test -n "$MAKEINFO"; then
2299 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2300 else
2301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2302 ac_dummy="$PATH"
2303 for ac_dir in $ac_dummy; do
2304 test -z "$ac_dir" && ac_dir=.
2305 if test -f $ac_dir/$ac_word; then
2306 ac_cv_prog_MAKEINFO="makeinfo"
2307 break
2309 done
2310 IFS="$ac_save_ifs"
2313 MAKEINFO="$ac_cv_prog_MAKEINFO"
2314 if test -n "$MAKEINFO"; then
2315 echo "$ac_t""$MAKEINFO" 1>&6
2316 else
2317 echo "$ac_t""no" 1>&6
2320 if test -n "$MAKEINFO"; then
2321 # Found it, now check the version.
2322 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2323 echo "configure:2324: checking for modern makeinfo" >&5
2324 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2326 else
2327 ac_prog_version=`$MAKEINFO --version 2>&1 |
2328 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2329 echo "configure:2330: version of makeinfo is $ac_prog_version" >&5
2330 case $ac_prog_version in
2331 '') gcc_cv_prog_makeinfo_modern=no;;
2332 4.*)
2333 gcc_cv_prog_makeinfo_modern=yes;;
2334 *) gcc_cv_prog_makeinfo_modern=no;;
2335 esac
2339 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2340 else
2341 gcc_cv_prog_makeinfo_modern=no
2346 if test $gcc_cv_prog_makeinfo_modern = no; then
2347 echo "configure: warning:
2348 *** Makeinfo is missing or too old.
2349 *** Info documentation will not be built." 1>&2
2350 BUILD_INFO=
2351 else
2352 BUILD_INFO=info
2355 # Is pod2man recent enough to regenerate manpages?
2356 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2357 echo "configure:2358: checking for recent Pod::Man" >&5
2358 if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
2359 echo "$ac_t""yes" 1>&6
2360 GENERATED_MANPAGES=generated-manpages
2361 else
2362 echo "$ac_t""no" 1>&6
2363 GENERATED_MANPAGES=
2366 # How about lex?
2367 if test -f $srcdir/../flex/skel.c; then
2368 FLEX='$(objdir)/../flex/flex'
2369 else
2370 # Extract the first word of "flex", so it can be a program name with args.
2371 set dummy flex; ac_word=$2
2372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2373 echo "configure:2374: checking for $ac_word" >&5
2374 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2376 else
2377 if test -n "$FLEX"; then
2378 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2379 else
2380 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2381 ac_dummy="$PATH"
2382 for ac_dir in $ac_dummy; do
2383 test -z "$ac_dir" && ac_dir=.
2384 if test -f $ac_dir/$ac_word; then
2385 ac_cv_prog_FLEX="flex"
2386 break
2388 done
2389 IFS="$ac_save_ifs"
2390 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2393 FLEX="$ac_cv_prog_FLEX"
2394 if test -n "$FLEX"; then
2395 echo "$ac_t""$FLEX" 1>&6
2396 else
2397 echo "$ac_t""no" 1>&6
2402 # Bison?
2403 # The -L switch is so bison can find its skeleton file.
2404 if test -f $srcdir/../bison/bison.simple; then
2405 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2406 else
2407 # Extract the first word of "bison", so it can be a program name with args.
2408 set dummy bison; ac_word=$2
2409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2410 echo "configure:2411: checking for $ac_word" >&5
2411 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 if test -n "$BISON"; then
2415 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2416 else
2417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2418 ac_dummy="$PATH"
2419 for ac_dir in $ac_dummy; do
2420 test -z "$ac_dir" && ac_dir=.
2421 if test -f $ac_dir/$ac_word; then
2422 ac_cv_prog_BISON="bison"
2423 break
2425 done
2426 IFS="$ac_save_ifs"
2427 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
2430 BISON="$ac_cv_prog_BISON"
2431 if test -n "$BISON"; then
2432 echo "$ac_t""$BISON" 1>&6
2433 else
2434 echo "$ac_t""no" 1>&6
2439 # See if the stage1 system preprocessor understands the ANSI C
2440 # preprocessor stringification operator.
2443 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
2444 echo "configure:2445: checking for preprocessor stringizing operator" >&5
2445 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447 else
2448 cat > conftest.$ac_ext <<EOF
2449 #line 2450 "configure"
2450 #include "confdefs.h"
2452 #define x(y) #y
2454 char *s = x(teststring);
2457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2458 egrep "#teststring" >/dev/null 2>&1; then
2459 rm -rf conftest*
2460 ac_cv_c_stringize=no
2461 else
2462 rm -rf conftest*
2463 ac_cv_c_stringize=yes
2465 rm -f conftest*
2469 if test "${ac_cv_c_stringize}" = yes
2470 then
2471 cat >> confdefs.h <<\EOF
2472 #define HAVE_STRINGIZE 1
2476 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2479 # Use <inttypes.h> only if it exists,
2480 # doesn't clash with <sys/types.h>, and declares intmax_t.
2481 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2482 echo "configure:2483: checking for inttypes.h" >&5
2483 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2484 echo $ac_n "(cached) $ac_c" 1>&6
2485 else
2486 cat > conftest.$ac_ext <<EOF
2487 #line 2488 "configure"
2488 #include "confdefs.h"
2489 #include <sys/types.h>
2490 #include <inttypes.h>
2491 int main() {
2492 intmax_t i = -1;
2493 ; return 0; }
2495 if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2496 rm -rf conftest*
2497 gcc_cv_header_inttypes_h=yes
2498 else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -rf conftest*
2502 gcc_cv_header_inttypes_h=no
2504 rm -f conftest*
2507 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2508 if test $gcc_cv_header_inttypes_h = yes; then
2509 cat >> confdefs.h <<\EOF
2510 #define HAVE_INTTYPES_H 1
2516 for ac_func in strtoul bsearch putenv popen bcopy \
2517 strchr strrchr kill getrlimit setrlimit atoll atoq \
2518 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2519 fputs_unlocked getrusage iconv nl_langinfo
2521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2522 echo "configure:2523: checking for $ac_func" >&5
2523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2524 echo $ac_n "(cached) $ac_c" 1>&6
2525 else
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 /* System header to define __stub macros and hopefully few prototypes,
2530 which can conflict with char $ac_func(); below. */
2531 #include <assert.h>
2532 /* Override any gcc2 internal prototype to avoid an error. */
2533 /* We use char because int might match the return type of a gcc2
2534 builtin and then its argument prototype would still apply. */
2535 char $ac_func();
2537 int main() {
2539 /* The GNU C library defines this for functions which it implements
2540 to always fail with ENOSYS. Some functions are actually named
2541 something starting with __ and the normal name is an alias. */
2542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2543 choke me
2544 #else
2545 $ac_func();
2546 #endif
2548 ; return 0; }
2550 if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2551 rm -rf conftest*
2552 eval "ac_cv_func_$ac_func=yes"
2553 else
2554 echo "configure: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 rm -rf conftest*
2557 eval "ac_cv_func_$ac_func=no"
2559 rm -f conftest*
2562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2563 echo "$ac_t""yes" 1>&6
2564 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2565 cat >> confdefs.h <<EOF
2566 #define $ac_tr_func 1
2569 else
2570 echo "$ac_t""no" 1>&6
2572 done
2575 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2576 echo "configure:2577: checking for ssize_t" >&5
2577 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580 cat > conftest.$ac_ext <<EOF
2581 #line 2582 "configure"
2582 #include "confdefs.h"
2583 #include <sys/types.h>
2584 #if STDC_HEADERS
2585 #include <stdlib.h>
2586 #include <stddef.h>
2587 #endif
2589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2590 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2591 rm -rf conftest*
2592 ac_cv_type_ssize_t=yes
2593 else
2594 rm -rf conftest*
2595 ac_cv_type_ssize_t=no
2597 rm -f conftest*
2600 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2601 if test $ac_cv_type_ssize_t = no; then
2602 cat >> confdefs.h <<\EOF
2603 #define ssize_t int
2609 # Try to determine the array type of the second argument of getgroups
2610 # for the target system (int or gid_t).
2611 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2612 echo "configure:2613: checking for uid_t in sys/types.h" >&5
2613 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <sys/types.h>
2621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2622 egrep "uid_t" >/dev/null 2>&1; then
2623 rm -rf conftest*
2624 ac_cv_type_uid_t=yes
2625 else
2626 rm -rf conftest*
2627 ac_cv_type_uid_t=no
2629 rm -f conftest*
2633 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2634 if test $ac_cv_type_uid_t = no; then
2635 cat >> confdefs.h <<\EOF
2636 #define uid_t int
2639 cat >> confdefs.h <<\EOF
2640 #define gid_t int
2645 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2646 echo "configure:2647: checking type of array argument to getgroups" >&5
2647 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2648 echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650 if test "$cross_compiling" = yes; then
2651 ac_cv_type_getgroups=cross
2652 else
2653 cat > conftest.$ac_ext <<EOF
2654 #line 2655 "configure"
2655 #include "confdefs.h"
2657 /* Thanks to Mike Rendell for this test. */
2658 #include <sys/types.h>
2659 #define NGID 256
2660 #undef MAX
2661 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2662 main()
2664 gid_t gidset[NGID];
2665 int i, n;
2666 union { gid_t gval; long lval; } val;
2668 val.lval = -1;
2669 for (i = 0; i < NGID; i++)
2670 gidset[i] = val.gval;
2671 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2672 gidset);
2673 /* Exit non-zero if getgroups seems to require an array of ints. This
2674 happens when gid_t is short but getgroups modifies an array of ints. */
2675 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2679 if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2680 then
2681 ac_cv_type_getgroups=gid_t
2682 else
2683 echo "configure: failed program was:" >&5
2684 cat conftest.$ac_ext >&5
2685 rm -fr conftest*
2686 ac_cv_type_getgroups=int
2688 rm -fr conftest*
2691 if test $ac_cv_type_getgroups = cross; then
2692 cat > conftest.$ac_ext <<EOF
2693 #line 2694 "configure"
2694 #include "confdefs.h"
2695 #include <unistd.h>
2697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2698 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2699 rm -rf conftest*
2700 ac_cv_type_getgroups=gid_t
2701 else
2702 rm -rf conftest*
2703 ac_cv_type_getgroups=int
2705 rm -f conftest*
2710 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2711 cat >> confdefs.h <<EOF
2712 #define GETGROUPS_T $ac_cv_type_getgroups
2716 if test "${target}" = "${build}"; then
2717 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
2718 else
2719 case "${target}" in
2720 # This condition may need some tweaking. It should include all
2721 # targets where the array type of the second argument of getgroups
2722 # is int and the type of gid_t is not equivalent to int.
2723 *-*-sunos* | *-*-ultrix*)
2724 TARGET_GETGROUPS_T=int
2727 TARGET_GETGROUPS_T=gid_t
2729 esac
2733 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2734 echo "configure:2735: checking for vprintf" >&5
2735 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2736 echo $ac_n "(cached) $ac_c" 1>&6
2737 else
2738 cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741 /* System header to define __stub macros and hopefully few prototypes,
2742 which can conflict with char vprintf(); below. */
2743 #include <assert.h>
2744 /* Override any gcc2 internal prototype to avoid an error. */
2745 /* We use char because int might match the return type of a gcc2
2746 builtin and then its argument prototype would still apply. */
2747 char vprintf();
2749 int main() {
2751 /* The GNU C library defines this for functions which it implements
2752 to always fail with ENOSYS. Some functions are actually named
2753 something starting with __ and the normal name is an alias. */
2754 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2755 choke me
2756 #else
2757 vprintf();
2758 #endif
2760 ; return 0; }
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763 rm -rf conftest*
2764 eval "ac_cv_func_vprintf=yes"
2765 else
2766 echo "configure: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 rm -rf conftest*
2769 eval "ac_cv_func_vprintf=no"
2771 rm -f conftest*
2774 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2775 echo "$ac_t""yes" 1>&6
2776 cat >> confdefs.h <<\EOF
2777 #define HAVE_VPRINTF 1
2780 else
2781 echo "$ac_t""no" 1>&6
2784 if test "$ac_cv_func_vprintf" != yes; then
2785 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2786 echo "configure:2787: checking for _doprnt" >&5
2787 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2788 echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790 cat > conftest.$ac_ext <<EOF
2791 #line 2792 "configure"
2792 #include "confdefs.h"
2793 /* System header to define __stub macros and hopefully few prototypes,
2794 which can conflict with char _doprnt(); below. */
2795 #include <assert.h>
2796 /* Override any gcc2 internal prototype to avoid an error. */
2797 /* We use char because int might match the return type of a gcc2
2798 builtin and then its argument prototype would still apply. */
2799 char _doprnt();
2801 int main() {
2803 /* The GNU C library defines this for functions which it implements
2804 to always fail with ENOSYS. Some functions are actually named
2805 something starting with __ and the normal name is an alias. */
2806 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2807 choke me
2808 #else
2809 _doprnt();
2810 #endif
2812 ; return 0; }
2814 if { (eval echo configure:2815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2815 rm -rf conftest*
2816 eval "ac_cv_func__doprnt=yes"
2817 else
2818 echo "configure: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 rm -rf conftest*
2821 eval "ac_cv_func__doprnt=no"
2823 rm -f conftest*
2826 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2827 echo "$ac_t""yes" 1>&6
2828 cat >> confdefs.h <<\EOF
2829 #define HAVE_DOPRNT 1
2832 else
2833 echo "$ac_t""no" 1>&6
2838 vfprintf=
2839 doprint=
2840 if test $ac_cv_func_vprintf != yes ; then
2841 vfprintf=vfprintf.o
2842 if test $ac_cv_func__doprnt != yes ; then
2843 doprint=doprint.o
2849 for ac_func in strstr
2851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2852 echo "configure:2853: checking for $ac_func" >&5
2853 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2854 echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856 cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 /* System header to define __stub macros and hopefully few prototypes,
2860 which can conflict with char $ac_func(); below. */
2861 #include <assert.h>
2862 /* Override any gcc2 internal prototype to avoid an error. */
2863 /* We use char because int might match the return type of a gcc2
2864 builtin and then its argument prototype would still apply. */
2865 char $ac_func();
2867 int main() {
2869 /* The GNU C library defines this for functions which it implements
2870 to always fail with ENOSYS. Some functions are actually named
2871 something starting with __ and the normal name is an alias. */
2872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2873 choke me
2874 #else
2875 $ac_func();
2876 #endif
2878 ; return 0; }
2880 if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2881 rm -rf conftest*
2882 eval "ac_cv_func_$ac_func=yes"
2883 else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 eval "ac_cv_func_$ac_func=no"
2889 rm -f conftest*
2892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2893 echo "$ac_t""yes" 1>&6
2894 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2895 cat >> confdefs.h <<EOF
2896 #define $ac_tr_func 1
2898 strstr=
2899 else
2900 echo "$ac_t""no" 1>&6
2901 strstr=strstr.o
2903 done
2906 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
2907 echo "configure:2908: checking whether the printf functions support %p" >&5
2908 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
2909 echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911 if test "$cross_compiling" = yes; then
2912 gcc_cv_func_printf_ptr=no
2913 else
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917 #include <stdio.h>
2919 int main()
2921 char buf[64];
2922 char *p = buf, *q = NULL;
2923 sprintf(buf, "%p", p);
2924 sscanf(buf, "%p", &q);
2925 return (p != q);
2928 if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2929 then
2930 gcc_cv_func_printf_ptr=yes
2931 else
2932 echo "configure: failed program was:" >&5
2933 cat conftest.$ac_ext >&5
2934 rm -fr conftest*
2935 gcc_cv_func_printf_ptr=no
2937 rm -fr conftest*
2940 rm -f core core.* *.core
2943 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
2944 if test $gcc_cv_func_printf_ptr = yes ; then
2945 cat >> confdefs.h <<\EOF
2946 #define HAVE_PRINTF_PTR 1
2952 case "${host}" in
2953 *-*-uwin*)
2954 { echo "configure: error:
2955 *** UWIN may not be used as a host platform because
2956 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
2958 esac
2959 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2960 echo "configure:2961: checking for pid_t" >&5
2961 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2962 echo $ac_n "(cached) $ac_c" 1>&6
2963 else
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2967 #include <sys/types.h>
2968 #if STDC_HEADERS
2969 #include <stdlib.h>
2970 #include <stddef.h>
2971 #endif
2973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2974 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2975 rm -rf conftest*
2976 ac_cv_type_pid_t=yes
2977 else
2978 rm -rf conftest*
2979 ac_cv_type_pid_t=no
2981 rm -f conftest*
2984 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2985 if test $ac_cv_type_pid_t = no; then
2986 cat >> confdefs.h <<\EOF
2987 #define pid_t int
2992 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2993 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2994 echo "configure:2995: checking for vfork.h" >&5
2995 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2996 echo $ac_n "(cached) $ac_c" 1>&6
2997 else
2998 cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 #include <vfork.h>
3003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3004 { (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3006 if test -z "$ac_err"; then
3007 rm -rf conftest*
3008 eval "ac_cv_header_$ac_safe=yes"
3009 else
3010 echo "$ac_err" >&5
3011 echo "configure: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 rm -rf conftest*
3014 eval "ac_cv_header_$ac_safe=no"
3016 rm -f conftest*
3018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3019 echo "$ac_t""yes" 1>&6
3020 cat >> confdefs.h <<\EOF
3021 #define HAVE_VFORK_H 1
3024 else
3025 echo "$ac_t""no" 1>&6
3028 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3029 echo "configure:3030: checking for working vfork" >&5
3030 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3031 echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033 if test "$cross_compiling" = yes; then
3034 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3035 echo "configure:3036: checking for vfork" >&5
3036 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
3038 else
3039 cat > conftest.$ac_ext <<EOF
3040 #line 3041 "configure"
3041 #include "confdefs.h"
3042 /* System header to define __stub macros and hopefully few prototypes,
3043 which can conflict with char vfork(); below. */
3044 #include <assert.h>
3045 /* Override any gcc2 internal prototype to avoid an error. */
3046 /* We use char because int might match the return type of a gcc2
3047 builtin and then its argument prototype would still apply. */
3048 char vfork();
3050 int main() {
3052 /* The GNU C library defines this for functions which it implements
3053 to always fail with ENOSYS. Some functions are actually named
3054 something starting with __ and the normal name is an alias. */
3055 #if defined (__stub_vfork) || defined (__stub___vfork)
3056 choke me
3057 #else
3058 vfork();
3059 #endif
3061 ; return 0; }
3063 if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3064 rm -rf conftest*
3065 eval "ac_cv_func_vfork=yes"
3066 else
3067 echo "configure: failed program was:" >&5
3068 cat conftest.$ac_ext >&5
3069 rm -rf conftest*
3070 eval "ac_cv_func_vfork=no"
3072 rm -f conftest*
3075 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3076 echo "$ac_t""yes" 1>&6
3078 else
3079 echo "$ac_t""no" 1>&6
3082 ac_cv_func_vfork_works=$ac_cv_func_vfork
3083 else
3084 cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 /* Thanks to Paul Eggert for this test. */
3088 #include <stdio.h>
3089 #include <sys/types.h>
3090 #include <sys/stat.h>
3091 #ifdef HAVE_UNISTD_H
3092 #include <unistd.h>
3093 #endif
3094 #ifdef HAVE_VFORK_H
3095 #include <vfork.h>
3096 #endif
3097 /* On some sparc systems, changes by the child to local and incoming
3098 argument registers are propagated back to the parent.
3099 The compiler is told about this with #include <vfork.h>,
3100 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3101 Test for this by using a static variable whose address
3102 is put into a register that is clobbered by the vfork. */
3103 static
3104 #ifdef __cplusplus
3105 sparc_address_test (int arg)
3106 #else
3107 sparc_address_test (arg) int arg;
3108 #endif
3110 static pid_t child;
3111 if (!child) {
3112 child = vfork ();
3113 if (child < 0) {
3114 perror ("vfork");
3115 _exit(2);
3117 if (!child) {
3118 arg = getpid();
3119 write(-1, "", 0);
3120 _exit (arg);
3124 main() {
3125 pid_t parent = getpid ();
3126 pid_t child;
3128 sparc_address_test ();
3130 child = vfork ();
3132 if (child == 0) {
3133 /* Here is another test for sparc vfork register problems.
3134 This test uses lots of local variables, at least
3135 as many local variables as main has allocated so far
3136 including compiler temporaries. 4 locals are enough for
3137 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3138 A buggy compiler should reuse the register of parent
3139 for one of the local variables, since it will think that
3140 parent can't possibly be used any more in this routine.
3141 Assigning to the local variable will thus munge parent
3142 in the parent process. */
3143 pid_t
3144 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3145 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3146 /* Convince the compiler that p..p7 are live; otherwise, it might
3147 use the same hardware register for all 8 local variables. */
3148 if (p != p1 || p != p2 || p != p3 || p != p4
3149 || p != p5 || p != p6 || p != p7)
3150 _exit(1);
3152 /* On some systems (e.g. IRIX 3.3),
3153 vfork doesn't separate parent from child file descriptors.
3154 If the child closes a descriptor before it execs or exits,
3155 this munges the parent's descriptor as well.
3156 Test for this by closing stdout in the child. */
3157 _exit(close(fileno(stdout)) != 0);
3158 } else {
3159 int status;
3160 struct stat st;
3162 while (wait(&status) != child)
3164 exit(
3165 /* Was there some problem with vforking? */
3166 child < 0
3168 /* Did the child fail? (This shouldn't happen.) */
3169 || status
3171 /* Did the vfork/compiler bug occur? */
3172 || parent != getpid()
3174 /* Did the file descriptor bug occur? */
3175 || fstat(fileno(stdout), &st) != 0
3180 if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3181 then
3182 ac_cv_func_vfork_works=yes
3183 else
3184 echo "configure: failed program was:" >&5
3185 cat conftest.$ac_ext >&5
3186 rm -fr conftest*
3187 ac_cv_func_vfork_works=no
3189 rm -fr conftest*
3194 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3195 if test $ac_cv_func_vfork_works = no; then
3196 cat >> confdefs.h <<\EOF
3197 #define vfork fork
3202 for ac_func in getpagesize
3204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3205 echo "configure:3206: checking for $ac_func" >&5
3206 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3207 echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 /* System header to define __stub macros and hopefully few prototypes,
3213 which can conflict with char $ac_func(); below. */
3214 #include <assert.h>
3215 /* Override any gcc2 internal prototype to avoid an error. */
3216 /* We use char because int might match the return type of a gcc2
3217 builtin and then its argument prototype would still apply. */
3218 char $ac_func();
3220 int main() {
3222 /* The GNU C library defines this for functions which it implements
3223 to always fail with ENOSYS. Some functions are actually named
3224 something starting with __ and the normal name is an alias. */
3225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3226 choke me
3227 #else
3228 $ac_func();
3229 #endif
3231 ; return 0; }
3233 if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3234 rm -rf conftest*
3235 eval "ac_cv_func_$ac_func=yes"
3236 else
3237 echo "configure: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
3239 rm -rf conftest*
3240 eval "ac_cv_func_$ac_func=no"
3242 rm -f conftest*
3245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3246 echo "$ac_t""yes" 1>&6
3247 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3248 cat >> confdefs.h <<EOF
3249 #define $ac_tr_func 1
3252 else
3253 echo "$ac_t""no" 1>&6
3255 done
3257 # The test program for the next two tests is the same except for one
3258 # set of ifdefs.
3259 cat >ct-mmap.inc <<'EOF'
3260 #include <sys/types.h>
3261 #include <sys/mman.h>
3262 #include <fcntl.h>
3263 #include <signal.h>
3264 #include <setjmp.h>
3265 #include <stdio.h>
3267 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3268 # define MAP_ANONYMOUS MAP_ANON
3269 #endif
3271 /* This mess was copied from the GNU getpagesize.h. */
3272 #ifndef HAVE_GETPAGESIZE
3273 # ifdef HAVE_UNISTD_H
3274 # include <unistd.h>
3275 # endif
3277 /* Assume that all systems that can run configure have sys/param.h. */
3278 # ifndef HAVE_SYS_PARAM_H
3279 # define HAVE_SYS_PARAM_H 1
3280 # endif
3282 # ifdef _SC_PAGESIZE
3283 # define getpagesize() sysconf(_SC_PAGESIZE)
3284 # else /* no _SC_PAGESIZE */
3285 # ifdef HAVE_SYS_PARAM_H
3286 # include <sys/param.h>
3287 # ifdef EXEC_PAGESIZE
3288 # define getpagesize() EXEC_PAGESIZE
3289 # else /* no EXEC_PAGESIZE */
3290 # ifdef NBPG
3291 # define getpagesize() NBPG * CLSIZE
3292 # ifndef CLSIZE
3293 # define CLSIZE 1
3294 # endif /* no CLSIZE */
3295 # else /* no NBPG */
3296 # ifdef NBPC
3297 # define getpagesize() NBPC
3298 # else /* no NBPC */
3299 # ifdef PAGESIZE
3300 # define getpagesize() PAGESIZE
3301 # endif /* PAGESIZE */
3302 # endif /* no NBPC */
3303 # endif /* no NBPG */
3304 # endif /* no EXEC_PAGESIZE */
3305 # else /* no HAVE_SYS_PARAM_H */
3306 # define getpagesize() 8192 /* punt totally */
3307 # endif /* no HAVE_SYS_PARAM_H */
3308 # endif /* no _SC_PAGESIZE */
3310 #endif /* no HAVE_GETPAGESIZE */
3312 #ifndef MAP_FAILED
3313 # define MAP_FAILED -1
3314 #endif
3316 #undef perror_exit
3317 #define perror_exit(str, val) \
3318 do { perror(str); exit(val); } while (0)
3320 /* Some versions of cygwin mmap require that munmap is called with the
3321 same parameters as mmap. GCC expects that this is not the case.
3322 Test for various forms of this problem. Warning - icky signal games. */
3324 static sigset_t unblock_sigsegv;
3325 static jmp_buf r;
3326 static size_t pg;
3327 static int devzero;
3329 static char *
3330 anonmap (size)
3331 size_t size;
3333 #ifdef USE_MAP_ANON
3334 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3335 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3336 #else
3337 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3338 MAP_PRIVATE, devzero, 0);
3339 #endif
3342 static void
3343 sigsegv (unused)
3344 int unused;
3346 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3347 longjmp (r, 1);
3350 /* Basic functionality test. */
3351 void
3352 test_0 ()
3354 char *x = anonmap (pg);
3355 if (x == (char *) MAP_FAILED)
3356 perror_exit("test 0 mmap", 2);
3358 *(int *)x += 1;
3360 if (munmap(x, pg) < 0)
3361 perror_exit("test 0 munmap", 3);
3364 /* 1. If we map a 2-page region and unmap its second page, the first page
3365 must remain. */
3366 static void
3367 test_1 ()
3369 char *x = anonmap (pg * 2);
3370 if (x == (char *)MAP_FAILED)
3371 perror_exit ("test 1 mmap", 4);
3373 signal (SIGSEGV, sigsegv);
3374 if (setjmp (r))
3375 perror_exit ("test 1 fault", 5);
3377 x[0] = 1;
3378 x[pg] = 1;
3380 if (munmap (x + pg, pg) < 0)
3381 perror_exit ("test 1 munmap 1", 6);
3382 x[0] = 2;
3384 if (setjmp (r) == 0)
3386 x[pg] = 1;
3387 perror_exit ("test 1 no fault", 7);
3389 if (munmap (x, pg) < 0)
3390 perror_exit ("test 1 munmap 2", 8);
3393 /* 2. If we map a 2-page region and unmap its first page, the second
3394 page must remain. */
3395 static void
3396 test_2 ()
3398 char *x = anonmap (pg * 2);
3399 if (x == (char *)MAP_FAILED)
3400 perror_exit ("test 2 mmap", 9);
3402 signal (SIGSEGV, sigsegv);
3403 if (setjmp (r))
3404 perror_exit ("test 2 fault", 10);
3406 x[0] = 1;
3407 x[pg] = 1;
3409 if (munmap (x, pg) < 0)
3410 perror_exit ("test 2 munmap 1", 11);
3412 x[pg] = 2;
3414 if (setjmp (r) == 0)
3416 x[0] = 1;
3417 perror_exit ("test 2 no fault", 12);
3420 if (munmap (x+pg, pg) < 0)
3421 perror_exit ("test 2 munmap 2", 13);
3424 /* 3. If we map two adjacent 1-page regions and unmap them both with
3425 one munmap, both must go away.
3427 Getting two adjacent 1-page regions with two mmap calls is slightly
3428 tricky. All OS's tested skip over already-allocated blocks; therefore
3429 we have been careful to unmap all allocated regions in previous tests.
3430 HP/UX allocates pages backward in memory. No OS has yet been observed
3431 to be so perverse as to leave unmapped space between consecutive calls
3432 to mmap. */
3434 static void
3435 test_3 ()
3437 char *x, *y, *z;
3439 x = anonmap (pg);
3440 if (x == (char *)MAP_FAILED)
3441 perror_exit ("test 3 mmap 1", 14);
3442 y = anonmap (pg);
3443 if (y == (char *)MAP_FAILED)
3444 perror_exit ("test 3 mmap 2", 15);
3446 if (y != x + pg)
3448 if (y == x - pg)
3449 z = y, y = x, x = z;
3450 else
3452 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
3453 (unsigned long)x, (unsigned long)y);
3454 exit (16);
3458 signal (SIGSEGV, sigsegv);
3459 if (setjmp (r))
3460 perror_exit ("test 3 fault", 17);
3462 x[0] = 1;
3463 y[0] = 1;
3465 if (munmap (x, pg*2) < 0)
3466 perror_exit ("test 3 munmap", 18);
3468 if (setjmp (r) == 0)
3470 x[0] = 1;
3471 perror_exit ("test 3 no fault 1", 19);
3474 signal (SIGSEGV, sigsegv);
3475 if (setjmp (r) == 0)
3477 y[0] = 1;
3478 perror_exit ("test 3 no fault 2", 20);
3483 main ()
3485 sigemptyset (&unblock_sigsegv);
3486 sigaddset (&unblock_sigsegv, SIGSEGV);
3487 pg = getpagesize ();
3488 #ifndef USE_MAP_ANON
3489 devzero = open ("/dev/zero", O_RDWR);
3490 if (devzero < 0)
3491 perror_exit ("open /dev/zero", 1);
3492 #endif
3494 test_0();
3495 test_1();
3496 test_2();
3497 test_3();
3499 exit(0);
3503 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
3504 echo "configure:3505: checking for working mmap from /dev/zero" >&5
3505 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3506 echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508 if test "$cross_compiling" = yes; then
3509 # If this is not cygwin, and /dev/zero is a character device, it's probably
3510 # safe to assume it works.
3511 case "$host_os" in
3512 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
3513 * ) if test -c /dev/zero
3514 then ac_cv_func_mmap_dev_zero=yes
3515 else ac_cv_func_mmap_dev_zero=no
3516 fi ;;
3517 esac
3518 else
3519 cat > conftest.$ac_ext <<EOF
3520 #line 3521 "configure"
3521 #include "confdefs.h"
3522 #include "ct-mmap.inc"
3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3525 then
3526 ac_cv_func_mmap_dev_zero=yes
3527 else
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 rm -fr conftest*
3531 if test $? -lt 4
3532 then ac_cv_func_mmap_dev_zero=no
3533 else ac_cv_func_mmap_dev_zero=buggy
3536 rm -fr conftest*
3542 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
3543 if test $ac_cv_func_mmap_dev_zero = yes; then
3544 cat >> confdefs.h <<\EOF
3545 #define HAVE_MMAP_DEV_ZERO 1
3550 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
3551 echo "configure:3552: checking for working mmap with MAP_ANON(YMOUS)" >&5
3552 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
3553 echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555 if test "$cross_compiling" = yes; then
3556 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
3557 # just because it's there. Some SCO Un*xen define it but don't implement it.
3558 ac_cv_func_mmap_anon=no
3559 else
3560 cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #define USE_MAP_ANON
3564 #include "ct-mmap.inc"
3566 if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3567 then
3568 ac_cv_func_mmap_anon=yes
3569 else
3570 echo "configure: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
3572 rm -fr conftest*
3573 if test $? -lt 4
3574 then ac_cv_func_mmap_anon=no
3575 else ac_cv_func_mmap_anon=buggy
3578 rm -fr conftest*
3584 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
3585 if test $ac_cv_func_mmap_anon = yes; then
3586 cat >> confdefs.h <<\EOF
3587 #define HAVE_MMAP_ANON 1
3591 rm -f ct-mmap.inc
3593 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
3594 echo "configure:3595: checking for working mmap of a file" >&5
3595 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
3596 echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598 # Create a file one thousand bytes long.
3599 for i in 1 2 3 4 5 6 7 8 9 0
3600 do for j in 1 2 3 4 5 6 7 8 9 0
3601 do echo $i $j xxxxx
3602 done
3603 done > conftestdata$$
3605 if test "$cross_compiling" = yes; then
3606 ac_cv_func_mmap_file=no
3607 else
3608 cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3612 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
3613 Richard Henderson and Alexandre Oliva.
3614 Check whether read-only mmap of a plain file works. */
3615 #include <sys/types.h>
3616 #include <sys/stat.h>
3617 #include <fcntl.h>
3618 #include <sys/mman.h>
3620 int main()
3622 char *x;
3623 int fd;
3624 struct stat st;
3626 fd = open("conftestdata$$", O_RDONLY);
3627 if (fd < 0)
3628 exit(1);
3630 if (fstat (fd, &st))
3631 exit(2);
3633 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
3634 if (x == (char *) -1)
3635 exit(3);
3637 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
3638 exit(4);
3640 if (munmap(x, st.st_size) < 0)
3641 exit(5);
3643 exit(0);
3646 if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3647 then
3648 ac_cv_func_mmap_file=yes
3649 else
3650 echo "configure: failed program was:" >&5
3651 cat conftest.$ac_ext >&5
3652 rm -fr conftest*
3653 ac_cv_func_mmap_file=no
3655 rm -fr conftest*
3660 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
3661 if test $ac_cv_func_mmap_file = yes; then
3662 cat >> confdefs.h <<\EOF
3663 #define HAVE_MMAP_FILE 1
3669 # We will need to find libiberty.h and ansidecl.h
3670 saved_CFLAGS="$CFLAGS"
3671 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
3672 for ac_func in bcopy \
3673 getenv atol sbrk abort atof getcwd getwd \
3674 strsignal putc_unlocked fputs_unlocked strstr environ \
3675 malloc realloc calloc free basename getopt
3677 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3678 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3679 echo "configure:3680: checking whether $ac_func is declared" >&5
3680 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3681 echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #undef $ac_tr_decl
3687 #define $ac_tr_decl 1
3689 #include "gansidecl.h"
3690 #include "system.h"
3692 int main() {
3693 #ifndef $ac_func
3694 char *(*pfn) = (char *(*)) $ac_func ;
3695 #endif
3696 ; return 0; }
3698 if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3699 rm -rf conftest*
3700 eval "gcc_cv_have_decl_$ac_func=yes"
3701 else
3702 echo "configure: failed program was:" >&5
3703 cat conftest.$ac_ext >&5
3704 rm -rf conftest*
3705 eval "gcc_cv_have_decl_$ac_func=no"
3707 rm -f conftest*
3710 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3711 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3712 #define $ac_tr_decl 1
3715 else
3716 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3717 #define $ac_tr_decl 0
3722 done
3723 if test x = y ; then
3724 cat >> confdefs.h <<EOF
3725 #define HAVE_DECL_BCOPY 1
3728 cat >> confdefs.h <<EOF
3729 #define HAVE_DECL_GETENV 1
3731 cat >> confdefs.h <<EOF
3732 #define HAVE_DECL_ATOL 1
3734 cat >> confdefs.h <<EOF
3735 #define HAVE_DECL_SBRK 1
3737 cat >> confdefs.h <<EOF
3738 #define HAVE_DECL_ABORT 1
3740 cat >> confdefs.h <<EOF
3741 #define HAVE_DECL_ATOF 1
3743 cat >> confdefs.h <<EOF
3744 #define HAVE_DECL_GETCWD 1
3746 cat >> confdefs.h <<EOF
3747 #define HAVE_DECL_GETWD 1
3750 cat >> confdefs.h <<EOF
3751 #define HAVE_DECL_STRSIGNAL 1
3753 cat >> confdefs.h <<EOF
3754 #define HAVE_DECL_PUTC_UNLOCKED 1
3756 cat >> confdefs.h <<EOF
3757 #define HAVE_DECL_FPUTS_UNLOCKED 1
3759 cat >> confdefs.h <<EOF
3760 #define HAVE_DECL_STRSTR 1
3762 cat >> confdefs.h <<EOF
3763 #define HAVE_DECL_ENVIRON 1
3766 cat >> confdefs.h <<EOF
3767 #define HAVE_DECL_MALLOC 1
3769 cat >> confdefs.h <<EOF
3770 #define HAVE_DECL_REALLOC 1
3772 cat >> confdefs.h <<EOF
3773 #define HAVE_DECL_CALLOC 1
3775 cat >> confdefs.h <<EOF
3776 #define HAVE_DECL_FREE 1
3778 cat >> confdefs.h <<EOF
3779 #define HAVE_DECL_BASENAME 1
3781 cat >> confdefs.h <<EOF
3782 #define HAVE_DECL_GETOPT 1
3787 for ac_func in getrlimit setrlimit getrusage
3789 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3790 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3791 echo "configure:3792: checking whether $ac_func is declared" >&5
3792 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3793 echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795 cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #undef $ac_tr_decl
3799 #define $ac_tr_decl 1
3801 #include "gansidecl.h"
3802 #include "system.h"
3803 #ifdef HAVE_SYS_RESOURCE_H
3804 #include <sys/resource.h>
3805 #endif
3808 int main() {
3809 #ifndef $ac_func
3810 char *(*pfn) = (char *(*)) $ac_func ;
3811 #endif
3812 ; return 0; }
3814 if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3815 rm -rf conftest*
3816 eval "gcc_cv_have_decl_$ac_func=yes"
3817 else
3818 echo "configure: failed program was:" >&5
3819 cat conftest.$ac_ext >&5
3820 rm -rf conftest*
3821 eval "gcc_cv_have_decl_$ac_func=no"
3823 rm -f conftest*
3826 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3828 #define $ac_tr_decl 1
3831 else
3832 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3833 #define $ac_tr_decl 0
3838 done
3839 if test x = y ; then
3840 cat >> confdefs.h <<EOF
3841 #define HAVE_DECL_GETRLIMIT 1
3843 cat >> confdefs.h <<EOF
3844 #define HAVE_DECL_SETRLIMIT 1
3846 cat >> confdefs.h <<EOF
3847 #define HAVE_DECL_GETRUSAGE 1
3852 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
3853 CFLAGS="$saved_CFLAGS"
3855 # mkdir takes a single argument on some systems.
3856 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
3857 echo "configure:3858: checking if mkdir takes one argument" >&5
3858 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
3859 echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861 cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3865 #include <sys/types.h>
3866 #ifdef HAVE_SYS_STAT_H
3867 # include <sys/stat.h>
3868 #endif
3869 #ifdef HAVE_UNISTD_H
3870 # include <unistd.h>
3871 #endif
3872 #ifdef HAVE_DIRECT_H
3873 # include <direct.h>
3874 #endif
3875 int main() {
3876 mkdir ("foo", 0);
3877 ; return 0; }
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880 rm -rf conftest*
3881 gcc_cv_mkdir_takes_one_arg=no
3882 else
3883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
3885 rm -rf conftest*
3886 gcc_cv_mkdir_takes_one_arg=yes
3888 rm -f conftest*
3891 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
3892 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
3893 cat >> confdefs.h <<\EOF
3894 #define MKDIR_TAKES_ONE_ARG 1
3900 # File extensions
3901 manext='.1'
3902 objext='.o'
3906 build_xm_file=
3907 build_xm_defines=
3908 build_install_headers_dir=install-headers-tar
3909 build_exeext=
3910 host_xm_file=
3911 host_xm_defines=
3912 host_xmake_file=
3913 host_truncate_target=
3914 host_exeext=
3916 # Decode the host machine, then the target machine.
3917 # For the host machine, we save the xm_file variable as host_xm_file;
3918 # then we decode the target machine and forget everything else
3919 # that came from the host machine.
3920 for machine in $build $host $target; do
3921 . ${srcdir}/config.gcc
3922 done
3924 extra_objs="${host_extra_objs} ${extra_objs}"
3926 # Default the target-machine variables that were not explicitly set.
3927 if test x"$tm_file" = x
3928 then tm_file=$cpu_type/$cpu_type.h; fi
3930 if test x"$extra_headers" = x
3931 then extra_headers=; fi
3933 if test x"$xm_file" = x
3934 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3936 if test x$md_file = x
3937 then md_file=$cpu_type/$cpu_type.md; fi
3939 if test x$out_file = x
3940 then out_file=$cpu_type/$cpu_type.c; fi
3942 if test x"$tmake_file" = x
3943 then tmake_file=$cpu_type/t-$cpu_type
3946 if test x"$dwarf2" = xyes
3947 then tm_file="$tm_file tm-dwarf2.h"
3950 if test x$float_format = x
3951 then float_format=i64
3954 if test $float_format = none
3955 then float_h_file=Makefile.in
3956 else float_h_file=float-$float_format.h
3959 # Handle cpp installation.
3960 if test x$enable_cpp != xno
3961 then
3962 tmake_file="$tmake_file t-install-cpp"
3965 # Say what files are being used for the output code and MD file.
3966 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
3967 echo "Using \`$srcdir/config/$md_file' as machine description file."
3969 # If any of the xm_file variables contain nonexistent files, warn
3970 # about them and drop them. But $cpu/xm-$cpu.h is allowed not to
3971 # exist, if we have nothing for it to do.
3973 for x in $build_xm_file; do
3974 if test -f $srcdir/config/$x
3975 then bx="$bx $x"
3976 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
3977 then :
3978 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
3980 done
3981 build_xm_file="$bx"
3984 for x in $host_xm_file; do
3985 if test -f $srcdir/config/$x
3986 then hx="$hx $x"
3987 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
3988 then :
3989 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
3991 done
3992 host_xm_file="$hx"
3995 for x in $xm_file; do
3996 if test -f $srcdir/config/$x
3997 then tx="$tx $x"
3998 elif expr $x : '\([^/]*\)/xm-\1\.h' >/dev/null
3999 then :
4000 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4002 done
4003 xm_file="$tx"
4005 count=a
4006 for f in $tm_file; do
4007 count=${count}x
4008 done
4009 if test $count = ax; then
4010 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4011 else
4012 echo "Using the following target machine macro files:"
4013 for f in $tm_file; do
4014 echo " $srcdir/config/$f"
4015 done
4018 count=a
4019 for f in $host_xm_file; do
4020 count=${count}x
4021 done
4022 if test $count = a; then
4024 elif test $count = ax; then
4025 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4026 else
4027 echo "Using the following host machine macro files:"
4028 for f in $host_xm_file; do
4029 echo " $srcdir/config/$f"
4030 done
4033 if test "$host_xm_file" != "$build_xm_file"; then
4034 count=a
4035 for f in $build_xm_file; do
4036 count=${count}x
4037 done
4038 if test $count = a; then
4040 elif test $count = ax; then
4041 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4042 else
4043 echo "Using the following build machine macro files:"
4044 for f in $build_xm_file; do
4045 echo " $srcdir/config/$f"
4046 done
4050 if test x$thread_file = x; then
4051 if test x$target_thread_file != x; then
4052 thread_file=$target_thread_file
4053 else
4054 thread_file='single'
4058 # auto-host.h is the file containing items generated by autoconf and is
4059 # the first file included by config.h.
4060 # If host=build, it is correct to have hconfig include auto-host.h
4061 # as well. If host!=build, we are in error and need to do more
4062 # work to find out the build config parameters.
4063 if test x$host = x$build
4064 then
4065 build_auto=auto-host.h
4066 else
4067 # We create a subdir, then run autoconf in the subdir.
4068 # To prevent recursion we set host and build for the new
4069 # invocation of configure to the build for this invocation
4070 # of configure.
4071 tempdir=build.$$
4072 rm -rf $tempdir
4073 mkdir $tempdir
4074 cd $tempdir
4075 case ${srcdir} in
4076 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4077 *) realsrcdir=../${srcdir};;
4078 esac
4079 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4080 --target=$target --host=$build --build=$build
4082 # We just finished tests for the build machine, so rename
4083 # the file auto-build.h in the gcc directory.
4084 mv auto-host.h ../auto-build.h
4085 cd ..
4086 rm -rf $tempdir
4087 build_auto=auto-build.h
4090 tm_file="${tm_file} defaults.h"
4091 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file} hwint.h"
4092 build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file} hwint.h"
4093 xm_file="gansidecl.h ${xm_file} ${tm_file}"
4095 # Truncate the target if necessary
4096 if test x$host_truncate_target != x; then
4097 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4100 # Get the version trigger filename from the toplevel
4101 if test "${with_gcc_version_trigger+set}" = set; then
4102 gcc_version_trigger=$with_gcc_version_trigger
4103 else
4104 gcc_version_trigger=${srcdir}/version.c
4106 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4107 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4109 # Compile in configure arguments.
4110 if test -f configargs.h ; then
4111 # Being re-configured.
4112 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4113 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4114 else
4115 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4117 cat > configargs.h <<EOF
4118 /* Generated automatically. */
4119 static const char configuration_arguments[] = "$gcc_config_arguments";
4122 # Internationalization
4123 PACKAGE=gcc
4124 VERSION="$gcc_version"
4125 cat >> confdefs.h <<EOF
4126 #define PACKAGE "$PACKAGE"
4129 cat >> confdefs.h <<EOF
4130 #define VERSION "$VERSION"
4136 ALL_LINGUAS="sv"
4138 # Enable NLS support by default
4139 # Check whether --enable-nls or --disable-nls was given.
4140 if test "${enable_nls+set}" = set; then
4141 enableval="$enable_nls"
4143 else
4144 enable_nls=yes
4148 # if cross compiling, disable NLS support.
4149 # It's not worth the trouble, at least for now.
4151 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4152 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4153 enable_nls=no
4156 # if NLS is enabled, also enable check in po subdir
4157 if test $enable_nls = yes; then
4158 CHECK_PO=check-po
4159 else
4160 CHECK_PO=""
4166 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4167 echo "configure:4168: checking for strerror in -lcposix" >&5
4168 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4169 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4170 echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172 ac_save_LIBS="$LIBS"
4173 LIBS="-lcposix $LIBS"
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 /* Override any gcc2 internal prototype to avoid an error. */
4178 /* We use char because int might match the return type of a gcc2
4179 builtin and then its argument prototype would still apply. */
4180 char strerror();
4182 int main() {
4183 strerror()
4184 ; return 0; }
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4187 rm -rf conftest*
4188 eval "ac_cv_lib_$ac_lib_var=yes"
4189 else
4190 echo "configure: failed program was:" >&5
4191 cat conftest.$ac_ext >&5
4192 rm -rf conftest*
4193 eval "ac_cv_lib_$ac_lib_var=no"
4195 rm -f conftest*
4196 LIBS="$ac_save_LIBS"
4199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4200 echo "$ac_t""yes" 1>&6
4201 LIBS="$LIBS -lcposix"
4202 else
4203 echo "$ac_t""no" 1>&6
4208 echo $ac_n "checking for working const""... $ac_c" 1>&6
4209 echo "configure:4210: checking for working const" >&5
4210 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4211 echo $ac_n "(cached) $ac_c" 1>&6
4212 else
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4217 int main() {
4219 /* Ultrix mips cc rejects this. */
4220 typedef int charset[2]; const charset x;
4221 /* SunOS 4.1.1 cc rejects this. */
4222 char const *const *ccp;
4223 char **p;
4224 /* NEC SVR4.0.2 mips cc rejects this. */
4225 struct point {int x, y;};
4226 static struct point const zero = {0,0};
4227 /* AIX XL C 1.02.0.0 rejects this.
4228 It does not let you subtract one const X* pointer from another in an arm
4229 of an if-expression whose if-part is not a constant expression */
4230 const char *g = "string";
4231 ccp = &g + (g ? g-g : 0);
4232 /* HPUX 7.0 cc rejects these. */
4233 ++ccp;
4234 p = (char**) ccp;
4235 ccp = (char const *const *) p;
4236 { /* SCO 3.2v4 cc rejects this. */
4237 char *t;
4238 char const *s = 0 ? (char *) 0 : (char const *) 0;
4240 *t++ = 0;
4242 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4243 int x[] = {25, 17};
4244 const int *foo = &x[0];
4245 ++foo;
4247 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4248 typedef const int *iptr;
4249 iptr p = 0;
4250 ++p;
4252 { /* AIX XL C 1.02.0.0 rejects this saying
4253 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4254 struct s { int j; const int *ap[3]; };
4255 struct s *b; b->j = 5;
4257 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4258 const int foo = 10;
4261 ; return 0; }
4263 if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4264 rm -rf conftest*
4265 ac_cv_c_const=yes
4266 else
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4269 rm -rf conftest*
4270 ac_cv_c_const=no
4272 rm -f conftest*
4275 echo "$ac_t""$ac_cv_c_const" 1>&6
4276 if test $ac_cv_c_const = no; then
4277 cat >> confdefs.h <<\EOF
4278 #define const
4283 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4284 echo "configure:4285: checking for off_t" >&5
4285 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4286 echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288 cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <sys/types.h>
4292 #if STDC_HEADERS
4293 #include <stdlib.h>
4294 #include <stddef.h>
4295 #endif
4297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4298 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4299 rm -rf conftest*
4300 ac_cv_type_off_t=yes
4301 else
4302 rm -rf conftest*
4303 ac_cv_type_off_t=no
4305 rm -f conftest*
4308 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4309 if test $ac_cv_type_off_t = no; then
4310 cat >> confdefs.h <<\EOF
4311 #define off_t long
4316 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4317 echo "configure:4318: checking for size_t" >&5
4318 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4319 echo $ac_n "(cached) $ac_c" 1>&6
4320 else
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 #include <sys/types.h>
4325 #if STDC_HEADERS
4326 #include <stdlib.h>
4327 #include <stddef.h>
4328 #endif
4330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4331 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4332 rm -rf conftest*
4333 ac_cv_type_size_t=yes
4334 else
4335 rm -rf conftest*
4336 ac_cv_type_size_t=no
4338 rm -f conftest*
4341 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4342 if test $ac_cv_type_size_t = no; then
4343 cat >> confdefs.h <<\EOF
4344 #define size_t unsigned
4350 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4351 unistd.h sys/param.h
4353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4355 echo "configure:4356: checking for $ac_hdr" >&5
4356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4357 echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359 cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 #include <$ac_hdr>
4364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4365 { (eval echo configure:4366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4367 if test -z "$ac_err"; then
4368 rm -rf conftest*
4369 eval "ac_cv_header_$ac_safe=yes"
4370 else
4371 echo "$ac_err" >&5
4372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 eval "ac_cv_header_$ac_safe=no"
4377 rm -f conftest*
4379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4380 echo "$ac_t""yes" 1>&6
4381 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4382 cat >> confdefs.h <<EOF
4383 #define $ac_tr_hdr 1
4386 else
4387 echo "$ac_t""no" 1>&6
4389 done
4391 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4392 strdup __argz_count __argz_stringify __argz_next
4394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4395 echo "configure:4396: checking for $ac_func" >&5
4396 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4397 echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402 /* System header to define __stub macros and hopefully few prototypes,
4403 which can conflict with char $ac_func(); below. */
4404 #include <assert.h>
4405 /* Override any gcc2 internal prototype to avoid an error. */
4406 /* We use char because int might match the return type of a gcc2
4407 builtin and then its argument prototype would still apply. */
4408 char $ac_func();
4410 int main() {
4412 /* The GNU C library defines this for functions which it implements
4413 to always fail with ENOSYS. Some functions are actually named
4414 something starting with __ and the normal name is an alias. */
4415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4416 choke me
4417 #else
4418 $ac_func();
4419 #endif
4421 ; return 0; }
4423 if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4424 rm -rf conftest*
4425 eval "ac_cv_func_$ac_func=yes"
4426 else
4427 echo "configure: failed program was:" >&5
4428 cat conftest.$ac_ext >&5
4429 rm -rf conftest*
4430 eval "ac_cv_func_$ac_func=no"
4432 rm -f conftest*
4435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4436 echo "$ac_t""yes" 1>&6
4437 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4438 cat >> confdefs.h <<EOF
4439 #define $ac_tr_func 1
4442 else
4443 echo "$ac_t""no" 1>&6
4445 done
4448 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4449 for ac_func in stpcpy
4451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4452 echo "configure:4453: checking for $ac_func" >&5
4453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4454 echo $ac_n "(cached) $ac_c" 1>&6
4455 else
4456 cat > conftest.$ac_ext <<EOF
4457 #line 4458 "configure"
4458 #include "confdefs.h"
4459 /* System header to define __stub macros and hopefully few prototypes,
4460 which can conflict with char $ac_func(); below. */
4461 #include <assert.h>
4462 /* Override any gcc2 internal prototype to avoid an error. */
4463 /* We use char because int might match the return type of a gcc2
4464 builtin and then its argument prototype would still apply. */
4465 char $ac_func();
4467 int main() {
4469 /* The GNU C library defines this for functions which it implements
4470 to always fail with ENOSYS. Some functions are actually named
4471 something starting with __ and the normal name is an alias. */
4472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4473 choke me
4474 #else
4475 $ac_func();
4476 #endif
4478 ; return 0; }
4480 if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4481 rm -rf conftest*
4482 eval "ac_cv_func_$ac_func=yes"
4483 else
4484 echo "configure: failed program was:" >&5
4485 cat conftest.$ac_ext >&5
4486 rm -rf conftest*
4487 eval "ac_cv_func_$ac_func=no"
4489 rm -f conftest*
4492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4493 echo "$ac_t""yes" 1>&6
4494 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4495 cat >> confdefs.h <<EOF
4496 #define $ac_tr_func 1
4499 else
4500 echo "$ac_t""no" 1>&6
4502 done
4505 if test "${ac_cv_func_stpcpy}" = "yes"; then
4506 cat >> confdefs.h <<\EOF
4507 #define HAVE_STPCPY 1
4512 if test $ac_cv_header_locale_h = yes; then
4513 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4514 echo "configure:4515: checking for LC_MESSAGES" >&5
4515 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4516 echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518 cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521 #include <locale.h>
4522 int main() {
4523 return LC_MESSAGES
4524 ; return 0; }
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527 rm -rf conftest*
4528 am_cv_val_LC_MESSAGES=yes
4529 else
4530 echo "configure: failed program was:" >&5
4531 cat conftest.$ac_ext >&5
4532 rm -rf conftest*
4533 am_cv_val_LC_MESSAGES=no
4535 rm -f conftest*
4538 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4539 if test $am_cv_val_LC_MESSAGES = yes; then
4540 cat >> confdefs.h <<\EOF
4541 #define HAVE_LC_MESSAGES 1
4546 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4547 echo "configure:4548: checking whether NLS is requested" >&5
4548 # Check whether --enable-nls or --disable-nls was given.
4549 if test "${enable_nls+set}" = set; then
4550 enableval="$enable_nls"
4551 USE_NLS=$enableval
4552 else
4553 USE_NLS=yes
4556 echo "$ac_t""$USE_NLS" 1>&6
4559 USE_INCLUDED_LIBINTL=no
4561 if test "$USE_NLS" = "yes"; then
4562 cat >> confdefs.h <<\EOF
4563 #define ENABLE_NLS 1
4566 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4567 echo "configure:4568: checking whether included gettext is requested" >&5
4568 # Check whether --with-included-gettext or --without-included-gettext was given.
4569 if test "${with_included_gettext+set}" = set; then
4570 withval="$with_included_gettext"
4571 nls_cv_force_use_gnu_gettext=$withval
4572 else
4573 nls_cv_force_use_gnu_gettext=no
4576 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
4578 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4579 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4580 nls_cv_header_intl=
4581 nls_cv_header_libgt=
4582 CATOBJEXT=NONE
4584 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4585 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4586 echo "configure:4587: checking for libintl.h" >&5
4587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4588 echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 #include <libintl.h>
4595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4596 { (eval echo configure:4597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4598 if test -z "$ac_err"; then
4599 rm -rf conftest*
4600 eval "ac_cv_header_$ac_safe=yes"
4601 else
4602 echo "$ac_err" >&5
4603 echo "configure: failed program was:" >&5
4604 cat conftest.$ac_ext >&5
4605 rm -rf conftest*
4606 eval "ac_cv_header_$ac_safe=no"
4608 rm -f conftest*
4610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4611 echo "$ac_t""yes" 1>&6
4612 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4613 echo "configure:4614: checking for gettext in libc" >&5
4614 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4615 echo $ac_n "(cached) $ac_c" 1>&6
4616 else
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <libintl.h>
4621 int main() {
4622 return (int) gettext ("")
4623 ; return 0; }
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4626 rm -rf conftest*
4627 gt_cv_func_gettext_libc=yes
4628 else
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4631 rm -rf conftest*
4632 gt_cv_func_gettext_libc=no
4634 rm -f conftest*
4637 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4639 if test "$gt_cv_func_gettext_libc" != "yes"; then
4640 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4641 echo "configure:4642: checking for bindtextdomain in -lintl" >&5
4642 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4643 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4644 echo $ac_n "(cached) $ac_c" 1>&6
4645 else
4646 ac_save_LIBS="$LIBS"
4647 LIBS="-lintl $LIBS"
4648 cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 /* Override any gcc2 internal prototype to avoid an error. */
4652 /* We use char because int might match the return type of a gcc2
4653 builtin and then its argument prototype would still apply. */
4654 char bindtextdomain();
4656 int main() {
4657 bindtextdomain()
4658 ; return 0; }
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4661 rm -rf conftest*
4662 eval "ac_cv_lib_$ac_lib_var=yes"
4663 else
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -rf conftest*
4667 eval "ac_cv_lib_$ac_lib_var=no"
4669 rm -f conftest*
4670 LIBS="$ac_save_LIBS"
4673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4674 echo "$ac_t""yes" 1>&6
4675 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4676 echo "configure:4677: checking for gettext in libintl" >&5
4677 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4678 echo $ac_n "(cached) $ac_c" 1>&6
4679 else
4680 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
4681 echo "configure:4682: checking for gettext in -lintl" >&5
4682 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
4683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686 ac_save_LIBS="$LIBS"
4687 LIBS="-lintl $LIBS"
4688 cat > conftest.$ac_ext <<EOF
4689 #line 4690 "configure"
4690 #include "confdefs.h"
4691 /* Override any gcc2 internal prototype to avoid an error. */
4692 /* We use char because int might match the return type of a gcc2
4693 builtin and then its argument prototype would still apply. */
4694 char gettext();
4696 int main() {
4697 gettext()
4698 ; return 0; }
4700 if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701 rm -rf conftest*
4702 eval "ac_cv_lib_$ac_lib_var=yes"
4703 else
4704 echo "configure: failed program was:" >&5
4705 cat conftest.$ac_ext >&5
4706 rm -rf conftest*
4707 eval "ac_cv_lib_$ac_lib_var=no"
4709 rm -f conftest*
4710 LIBS="$ac_save_LIBS"
4713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4714 echo "$ac_t""yes" 1>&6
4715 gt_cv_func_gettext_libintl=yes
4716 else
4717 echo "$ac_t""no" 1>&6
4718 gt_cv_func_gettext_libintl=no
4723 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4724 else
4725 echo "$ac_t""no" 1>&6
4730 if test "$gt_cv_func_gettext_libintl" = "yes"; then
4731 LIBS="-lintl $LIBS"
4734 if test "$gt_cv_func_gettext_libc" = "yes" \
4735 || test "$gt_cv_func_gettext_libintl" = "yes"; then
4736 cat >> confdefs.h <<\EOF
4737 #define HAVE_GETTEXT 1
4740 # Extract the first word of "msgfmt", so it can be a program name with args.
4741 set dummy msgfmt; ac_word=$2
4742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4743 echo "configure:4744: checking for $ac_word" >&5
4744 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
4745 echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747 case "$MSGFMT" in
4749 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4753 for ac_dir in $PATH; do
4754 test -z "$ac_dir" && ac_dir=.
4755 if test -f $ac_dir/$ac_word; then
4756 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4757 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
4758 break
4761 done
4762 IFS="$ac_save_ifs"
4763 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
4765 esac
4767 MSGFMT="$gcc_cv_path_MSGFMT"
4768 if test -n "$MSGFMT"; then
4769 echo "$ac_t""$MSGFMT" 1>&6
4770 else
4771 echo "$ac_t""no" 1>&6
4773 if test "$MSGFMT" != "no"; then
4774 for ac_func in dcgettext
4776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4777 echo "configure:4778: checking for $ac_func" >&5
4778 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4779 echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781 cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 /* System header to define __stub macros and hopefully few prototypes,
4785 which can conflict with char $ac_func(); below. */
4786 #include <assert.h>
4787 /* Override any gcc2 internal prototype to avoid an error. */
4788 /* We use char because int might match the return type of a gcc2
4789 builtin and then its argument prototype would still apply. */
4790 char $ac_func();
4792 int main() {
4794 /* The GNU C library defines this for functions which it implements
4795 to always fail with ENOSYS. Some functions are actually named
4796 something starting with __ and the normal name is an alias. */
4797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4798 choke me
4799 #else
4800 $ac_func();
4801 #endif
4803 ; return 0; }
4805 if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4806 rm -rf conftest*
4807 eval "ac_cv_func_$ac_func=yes"
4808 else
4809 echo "configure: failed program was:" >&5
4810 cat conftest.$ac_ext >&5
4811 rm -rf conftest*
4812 eval "ac_cv_func_$ac_func=no"
4814 rm -f conftest*
4817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4818 echo "$ac_t""yes" 1>&6
4819 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4820 cat >> confdefs.h <<EOF
4821 #define $ac_tr_func 1
4824 else
4825 echo "$ac_t""no" 1>&6
4827 done
4829 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4830 set dummy gmsgfmt; ac_word=$2
4831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4832 echo "configure:4833: checking for $ac_word" >&5
4833 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
4834 echo $ac_n "(cached) $ac_c" 1>&6
4835 else
4836 case "$GMSGFMT" in
4838 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4840 ?:/*)
4841 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4845 ac_dummy="$PATH"
4846 for ac_dir in $ac_dummy; do
4847 test -z "$ac_dir" && ac_dir=.
4848 if test -f $ac_dir/$ac_word; then
4849 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
4850 break
4852 done
4853 IFS="$ac_save_ifs"
4854 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
4856 esac
4858 GMSGFMT="$gcc_cv_path_GMSGFMT"
4859 if test -n "$GMSGFMT"; then
4860 echo "$ac_t""$GMSGFMT" 1>&6
4861 else
4862 echo "$ac_t""no" 1>&6
4865 # Extract the first word of "xgettext", so it can be a program name with args.
4866 set dummy xgettext; ac_word=$2
4867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4868 echo "configure:4869: checking for $ac_word" >&5
4869 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
4870 echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872 case "$XGETTEXT" in
4874 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4878 for ac_dir in $PATH; do
4879 test -z "$ac_dir" && ac_dir=.
4880 if test -f $ac_dir/$ac_word; then
4881 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4882 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
4883 break
4886 done
4887 IFS="$ac_save_ifs"
4888 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
4890 esac
4892 XGETTEXT="$gcc_cv_path_XGETTEXT"
4893 if test -n "$XGETTEXT"; then
4894 echo "$ac_t""$XGETTEXT" 1>&6
4895 else
4896 echo "$ac_t""no" 1>&6
4899 cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4903 int main() {
4904 extern int _nl_msg_cat_cntr;
4905 return _nl_msg_cat_cntr
4906 ; return 0; }
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909 rm -rf conftest*
4910 CATOBJEXT=.gmo
4911 DATADIRNAME=share
4912 else
4913 echo "configure: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4915 rm -rf conftest*
4916 CATOBJEXT=.mo
4917 DATADIRNAME=lib
4919 rm -f conftest*
4920 INSTOBJEXT=.mo
4921 else
4922 create_catalogs="no"
4926 else
4927 echo "$ac_t""no" 1>&6
4931 if test "$CATOBJEXT" = "NONE"; then
4932 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
4933 echo "configure:4934: checking whether catgets can be used" >&5
4934 # Check whether --with-catgets or --without-catgets was given.
4935 if test "${with_catgets+set}" = set; then
4936 withval="$with_catgets"
4937 nls_cv_use_catgets=$withval
4938 else
4939 nls_cv_use_catgets=no
4942 echo "$ac_t""$nls_cv_use_catgets" 1>&6
4944 if test "$nls_cv_use_catgets" = "yes"; then
4945 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
4946 echo "configure:4947: checking for main in -li" >&5
4947 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
4948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4949 echo $ac_n "(cached) $ac_c" 1>&6
4950 else
4951 ac_save_LIBS="$LIBS"
4952 LIBS="-li $LIBS"
4953 cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4957 int main() {
4958 main()
4959 ; return 0; }
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962 rm -rf conftest*
4963 eval "ac_cv_lib_$ac_lib_var=yes"
4964 else
4965 echo "configure: failed program was:" >&5
4966 cat conftest.$ac_ext >&5
4967 rm -rf conftest*
4968 eval "ac_cv_lib_$ac_lib_var=no"
4970 rm -f conftest*
4971 LIBS="$ac_save_LIBS"
4974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4975 echo "$ac_t""yes" 1>&6
4976 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4977 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4978 cat >> confdefs.h <<EOF
4979 #define $ac_tr_lib 1
4982 LIBS="-li $LIBS"
4984 else
4985 echo "$ac_t""no" 1>&6
4988 echo $ac_n "checking for catgets""... $ac_c" 1>&6
4989 echo "configure:4990: checking for catgets" >&5
4990 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
4991 echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993 cat > conftest.$ac_ext <<EOF
4994 #line 4995 "configure"
4995 #include "confdefs.h"
4996 /* System header to define __stub macros and hopefully few prototypes,
4997 which can conflict with char catgets(); below. */
4998 #include <assert.h>
4999 /* Override any gcc2 internal prototype to avoid an error. */
5000 /* We use char because int might match the return type of a gcc2
5001 builtin and then its argument prototype would still apply. */
5002 char catgets();
5004 int main() {
5006 /* The GNU C library defines this for functions which it implements
5007 to always fail with ENOSYS. Some functions are actually named
5008 something starting with __ and the normal name is an alias. */
5009 #if defined (__stub_catgets) || defined (__stub___catgets)
5010 choke me
5011 #else
5012 catgets();
5013 #endif
5015 ; return 0; }
5017 if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5018 rm -rf conftest*
5019 eval "ac_cv_func_catgets=yes"
5020 else
5021 echo "configure: failed program was:" >&5
5022 cat conftest.$ac_ext >&5
5023 rm -rf conftest*
5024 eval "ac_cv_func_catgets=no"
5026 rm -f conftest*
5029 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5030 echo "$ac_t""yes" 1>&6
5031 cat >> confdefs.h <<\EOF
5032 #define HAVE_CATGETS 1
5035 INTLOBJS="\$(CATOBJS)"
5036 # Extract the first word of "gencat", so it can be a program name with args.
5037 set dummy gencat; ac_word=$2
5038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5039 echo "configure:5040: checking for $ac_word" >&5
5040 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5041 echo $ac_n "(cached) $ac_c" 1>&6
5042 else
5043 case "$GENCAT" in
5045 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5047 ?:/*)
5048 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5051 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5052 ac_dummy="$PATH"
5053 for ac_dir in $ac_dummy; do
5054 test -z "$ac_dir" && ac_dir=.
5055 if test -f $ac_dir/$ac_word; then
5056 gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5057 break
5059 done
5060 IFS="$ac_save_ifs"
5061 test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5063 esac
5065 GENCAT="$gcc_cv_path_GENCAT"
5066 if test -n "$GENCAT"; then
5067 echo "$ac_t""$GENCAT" 1>&6
5068 else
5069 echo "$ac_t""no" 1>&6
5071 if test "$GENCAT" != "no"; then
5072 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5073 set dummy gmsgfmt; ac_word=$2
5074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5075 echo "configure:5076: checking for $ac_word" >&5
5076 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5077 echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079 case "$GMSGFMT" in
5081 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5083 ?:/*)
5084 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5087 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5088 ac_dummy="$PATH"
5089 for ac_dir in $ac_dummy; do
5090 test -z "$ac_dir" && ac_dir=.
5091 if test -f $ac_dir/$ac_word; then
5092 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5093 break
5095 done
5096 IFS="$ac_save_ifs"
5097 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5099 esac
5101 GMSGFMT="$gcc_cv_path_GMSGFMT"
5102 if test -n "$GMSGFMT"; then
5103 echo "$ac_t""$GMSGFMT" 1>&6
5104 else
5105 echo "$ac_t""no" 1>&6
5108 if test "$GMSGFMT" = "no"; then
5109 # Extract the first word of "msgfmt", so it can be a program name with args.
5110 set dummy msgfmt; ac_word=$2
5111 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5112 echo "configure:5113: checking for $ac_word" >&5
5113 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5114 echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116 case "$GMSGFMT" in
5118 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5121 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5122 for ac_dir in $PATH; do
5123 test -z "$ac_dir" && ac_dir=.
5124 if test -f $ac_dir/$ac_word; then
5125 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5126 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5127 break
5130 done
5131 IFS="$ac_save_ifs"
5132 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5134 esac
5136 GMSGFMT="$gcc_cv_path_GMSGFMT"
5137 if test -n "$GMSGFMT"; then
5138 echo "$ac_t""$GMSGFMT" 1>&6
5139 else
5140 echo "$ac_t""no" 1>&6
5143 if test "$GMSGFMT" = "msgfmt"; then
5144 create_catalogs="no"
5147 # Extract the first word of "xgettext", so it can be a program name with args.
5148 set dummy xgettext; ac_word=$2
5149 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5150 echo "configure:5151: checking for $ac_word" >&5
5151 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5152 echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154 case "$XGETTEXT" in
5156 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5160 for ac_dir in $PATH; do
5161 test -z "$ac_dir" && ac_dir=.
5162 if test -f $ac_dir/$ac_word; then
5163 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5164 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5165 break
5168 done
5169 IFS="$ac_save_ifs"
5170 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5172 esac
5174 XGETTEXT="$gcc_cv_path_XGETTEXT"
5175 if test -n "$XGETTEXT"; then
5176 echo "$ac_t""$XGETTEXT" 1>&6
5177 else
5178 echo "$ac_t""no" 1>&6
5181 USE_INCLUDED_LIBINTL=yes
5182 CATOBJEXT=.cat
5183 INSTOBJEXT=.cat
5184 DATADIRNAME=lib
5185 INTLDEPS='$(top_builddir)/intl/libintl.a'
5186 INTLLIBS=$INTLDEPS
5187 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5188 nls_cv_header_intl=intl/libintl.h
5189 nls_cv_header_libgt=intl/libgettext.h
5191 else
5192 echo "$ac_t""no" 1>&6
5198 if test "$CATOBJEXT" = "NONE"; then
5199 nls_cv_use_gnu_gettext=yes
5203 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5204 INTLOBJS="\$(GETTOBJS)"
5205 # Extract the first word of "msgfmt", so it can be a program name with args.
5206 set dummy msgfmt; ac_word=$2
5207 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5208 echo "configure:5209: checking for $ac_word" >&5
5209 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5210 echo $ac_n "(cached) $ac_c" 1>&6
5211 else
5212 case "$MSGFMT" in
5214 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5218 for ac_dir in $PATH; do
5219 test -z "$ac_dir" && ac_dir=.
5220 if test -f $ac_dir/$ac_word; then
5221 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5222 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5223 break
5226 done
5227 IFS="$ac_save_ifs"
5228 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5230 esac
5232 MSGFMT="$gcc_cv_path_MSGFMT"
5233 if test -n "$MSGFMT"; then
5234 echo "$ac_t""$MSGFMT" 1>&6
5235 else
5236 echo "$ac_t""no" 1>&6
5239 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5240 set dummy gmsgfmt; ac_word=$2
5241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5242 echo "configure:5243: checking for $ac_word" >&5
5243 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5244 echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246 case "$GMSGFMT" in
5248 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5250 ?:/*)
5251 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5254 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5255 ac_dummy="$PATH"
5256 for ac_dir in $ac_dummy; do
5257 test -z "$ac_dir" && ac_dir=.
5258 if test -f $ac_dir/$ac_word; then
5259 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5260 break
5262 done
5263 IFS="$ac_save_ifs"
5264 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5266 esac
5268 GMSGFMT="$gcc_cv_path_GMSGFMT"
5269 if test -n "$GMSGFMT"; then
5270 echo "$ac_t""$GMSGFMT" 1>&6
5271 else
5272 echo "$ac_t""no" 1>&6
5275 if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5276 create_catalogs="no"
5278 # Extract the first word of "xgettext", so it can be a program name with args.
5279 set dummy xgettext; ac_word=$2
5280 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5281 echo "configure:5282: checking for $ac_word" >&5
5282 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5283 echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285 case "$XGETTEXT" in
5287 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5291 for ac_dir in $PATH; do
5292 test -z "$ac_dir" && ac_dir=.
5293 if test -f $ac_dir/$ac_word; then
5294 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5295 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5296 break
5299 done
5300 IFS="$ac_save_ifs"
5301 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5303 esac
5305 XGETTEXT="$gcc_cv_path_XGETTEXT"
5306 if test -n "$XGETTEXT"; then
5307 echo "$ac_t""$XGETTEXT" 1>&6
5308 else
5309 echo "$ac_t""no" 1>&6
5313 USE_INCLUDED_LIBINTL=yes
5314 CATOBJEXT=.gmo
5315 INSTOBJEXT=.mo
5316 DATADIRNAME=share
5317 INTLDEPS='$(top_builddir)/intl/libintl.a'
5318 INTLLIBS=$INTLDEPS
5319 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5320 nls_cv_header_intl=intl/libintl.h
5321 nls_cv_header_libgt=intl/libgettext.h
5324 if test "$XGETTEXT" != ":"; then
5325 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5327 else
5328 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5329 XGETTEXT=":"
5335 # We need to process the po/ directory.
5336 POSUB=po
5337 else
5338 DATADIRNAME=share
5339 nls_cv_header_intl=intl/libintl.h
5340 nls_cv_header_libgt=intl/libgettext.h
5346 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5347 # because some of the sources are only built for this goal.
5348 if test "$PACKAGE" = gettext; then
5349 USE_NLS=yes
5350 USE_INCLUDED_LIBINTL=yes
5353 for lang in $ALL_LINGUAS; do
5354 GMOFILES="$GMOFILES $lang.gmo"
5355 POFILES="$POFILES $lang.po"
5356 done
5371 if test "x$create_catalogs" = "xno"; then
5372 echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5375 if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
5376 if test "x$ALL_LINGUAS" = "x"; then
5377 LINGUAS=
5378 else
5379 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5380 echo "configure:5381: checking for catalogs to be installed" >&5
5381 if test "x$LINGUAS" = "x"; then
5382 LINGUAS=$ALL_LINGUAS
5383 else
5384 NEW_LINGUAS=
5385 for lang in $ALL_LINGUAS; do
5386 case " $LINGUAS " in
5387 *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5388 esac
5389 done
5390 LINGUAS=$NEW_LINGUAS
5392 echo "$ac_t""$LINGUAS" 1>&6
5395 if test -n "$LINGUAS"; then
5396 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5400 if test $ac_cv_header_locale_h = yes; then
5401 INCLUDE_LOCALE_H="#include <locale.h>"
5402 else
5403 INCLUDE_LOCALE_H="\
5404 /* The system does not provide the header <locale.h>. Take care yourself. */"
5408 test -d intl || mkdir intl
5409 if test "$CATOBJEXT" = ".cat"; then
5410 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5411 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5412 echo "configure:5413: checking for linux/version.h" >&5
5413 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5414 echo $ac_n "(cached) $ac_c" 1>&6
5415 else
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 #include <linux/version.h>
5421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5422 { (eval echo configure:5423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5424 if test -z "$ac_err"; then
5425 rm -rf conftest*
5426 eval "ac_cv_header_$ac_safe=yes"
5427 else
5428 echo "$ac_err" >&5
5429 echo "configure: failed program was:" >&5
5430 cat conftest.$ac_ext >&5
5431 rm -rf conftest*
5432 eval "ac_cv_header_$ac_safe=no"
5434 rm -f conftest*
5436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5437 echo "$ac_t""yes" 1>&6
5438 msgformat=linux
5439 else
5440 echo "$ac_t""no" 1>&6
5441 msgformat=xopen
5445 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
5447 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5448 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
5450 if test "$PACKAGE" = "gettext"; then
5451 GT_NO="#NO#"
5452 GT_YES=
5453 else
5454 GT_NO=
5455 GT_YES="#YES#"
5460 MKINSTALLDIRS=
5461 if test -n "$ac_aux_dir"; then
5462 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5464 if test -z "$MKINSTALLDIRS"; then
5465 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5472 test -d po || mkdir po
5473 if test "x$srcdir" != "x."; then
5474 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5475 posrcprefix="$srcdir/"
5476 else
5477 posrcprefix="../$srcdir/"
5479 else
5480 posrcprefix="../"
5482 rm -f po/POTFILES
5483 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5484 < $srcdir/po/POTFILES.in > po/POTFILES
5486 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
5488 # Windows32 Registry support for specifying GCC installation paths.
5489 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5490 if test "${enable_win32_registry+set}" = set; then
5491 enableval="$enable_win32_registry"
5496 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5497 echo "configure:5498: checking whether windows registry support is requested" >&5
5498 if test x$enable_win32_registry != xno; then
5499 cat >> confdefs.h <<\EOF
5500 #define ENABLE_WIN32_REGISTRY 1
5503 echo "$ac_t""yes" 1>&6
5504 else
5505 echo "$ac_t""no" 1>&6
5508 # Check if user specified a different registry key.
5509 case x${enable_win32_registry} in
5510 x | xyes)
5511 # default.
5512 gcc_cv_win32_registry_key="$VERSION"
5514 xno)
5515 # no registry lookup.
5516 gcc_cv_win32_registry_key=''
5519 # user-specified key.
5520 gcc_cv_win32_registry_key="$enable_win32_registry"
5522 esac
5524 if test x$enable_win32_registry != xno; then
5525 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
5526 echo "configure:5527: checking registry key on windows hosts" >&5
5527 cat >> confdefs.h <<EOF
5528 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
5531 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
5534 # Get an absolute path to the GCC top-level source directory
5535 holddir=`pwd`
5536 cd $srcdir
5537 topdir=`pwd`
5538 cd $holddir
5540 # Conditionalize the makefile for this host machine.
5541 # Make-host contains the concatenation of all host makefile fragments
5542 # [there can be more than one]. This file is built by configure.frag.
5543 host_overrides=Make-host
5544 dep_host_xmake_file=
5545 for f in .. ${host_xmake_file}
5547 if test -f ${srcdir}/config/$f
5548 then
5549 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
5551 done
5553 # Conditionalize the makefile for this target machine.
5554 # Make-target contains the concatenation of all host makefile fragments
5555 # [there can be more than one]. This file is built by configure.frag.
5556 target_overrides=Make-target
5557 dep_tmake_file=
5558 for f in .. ${tmake_file}
5560 if test -f ${srcdir}/config/$f
5561 then
5562 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
5564 done
5566 # If the host doesn't support symlinks, modify CC in
5567 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5568 # Otherwise, we can use "CC=$(CC)".
5569 rm -f symtest.tem
5570 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5571 then
5572 cc_set_by_configure="\$(CC)"
5573 quoted_cc_set_by_configure="\$(CC)"
5574 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5575 else
5576 rm -f symtest.tem
5577 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5578 then
5579 symbolic_link="cp -p"
5580 else
5581 symbolic_link="cp"
5583 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5584 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
5585 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5587 rm -f symtest.tem
5589 out_object_file=`basename $out_file .c`.o
5591 tm_file_list=
5592 for f in $tm_file; do
5593 case $f in
5594 gansidecl.h | defaults.h )
5595 tm_file_list="${tm_file_list} $f" ;;
5596 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
5597 esac
5598 done
5600 tm_p_file_list=
5601 for f in $tm_p_file; do
5602 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
5603 done
5605 host_xm_file_list=
5606 for f in $host_xm_file; do
5607 case $f in
5608 auto-host.h | gansidecl.h | defaults.h | hwint.h )
5609 host_xm_file_list="${host_xm_file_list} $f" ;;
5610 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
5611 esac
5612 done
5614 build_xm_file_list=
5615 for f in $build_xm_file; do
5616 case $f in
5617 auto-build.h | auto-host.h | gansidecl.h | defaults.h | hwint.h )
5618 build_xm_file_list="${build_xm_file_list} $f" ;;
5619 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
5620 esac
5621 done
5623 # Define macro CROSS_COMPILE in compilation
5624 # if this is a cross-compiler.
5625 # Also use all.cross instead of all.internal
5626 # and add cross-make to Makefile.
5627 cross_overrides="/dev/null"
5628 if test x$host != x$target
5629 then
5630 cross_defines="CROSS=-DCROSS_COMPILE"
5631 cross_overrides="${topdir}/cross-make"
5634 # If this is a cross-compiler that does not
5635 # have its own set of headers then define
5636 # inhibit_libc
5638 # If this is using newlib, then define inhibit_libc in
5639 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
5640 # libgcc.a, but that's OK because newlib should have its own version of
5641 # assert.h.
5642 inhibit_libc=
5643 if test x$host != x$target && test x$with_headers = x; then
5644 inhibit_libc=-Dinhibit_libc
5645 else
5646 if test x$with_newlib = xyes; then
5647 inhibit_libc=-Dinhibit_libc
5652 # When building gcc with a cross-compiler, we need to fix a few things.
5653 # This must come after cross-make as we want all.build to override
5654 # all.cross.
5655 build_overrides="/dev/null"
5656 if test x$build != x$host
5657 then
5658 build_overrides="${topdir}/build-make"
5661 # Expand extra_headers to include complete path.
5662 # This substitutes for lots of t-* files.
5663 extra_headers_list=
5664 if test "x$extra_headers" = x
5665 then true
5666 else
5667 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
5668 for file in $extra_headers;
5670 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
5671 done
5674 if test x$use_collect2 = xno; then
5675 use_collect2=
5678 # Add a definition of USE_COLLECT2 if system wants one.
5679 # Also tell toplev.c what to do.
5680 # This substitutes for lots of t-* files.
5681 if test x$use_collect2 = x
5682 then
5683 will_use_collect2=
5684 maybe_use_collect2=
5685 else
5686 will_use_collect2="collect2"
5687 maybe_use_collect2="-DUSE_COLLECT2"
5690 # If we have gas in the build tree, make a link to it.
5691 if test -f ../gas/Makefile; then
5692 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5695 # If we have nm in the build tree, make a link to it.
5696 if test -f ../binutils/Makefile; then
5697 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
5700 # If we have ld in the build tree, make a link to it.
5701 if test -f ../ld/Makefile; then
5702 # if test x$use_collect2 = x; then
5703 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
5704 # else
5705 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
5706 # fi
5709 # Figure out what assembler we will be using.
5710 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
5711 echo "configure:5712: checking what assembler to use" >&5
5712 gcc_cv_as=
5713 gcc_cv_gas_major_version=
5714 gcc_cv_gas_minor_version=
5715 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
5716 if test -x "$DEFAULT_ASSEMBLER"; then
5717 gcc_cv_as="$DEFAULT_ASSEMBLER"
5718 elif test -x "$AS"; then
5719 gcc_cv_as="$AS"
5720 elif test -x as$host_exeext; then
5721 # Build using assembler in the current directory.
5722 gcc_cv_as=./as$host_exeext
5723 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
5724 # Single tree build which includes gas.
5725 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
5727 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
5728 if test x$gcc_cv_gas_version != x; then
5729 break
5731 done
5732 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
5733 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
5736 if test "x$gcc_cv_as" = x -a x$host = x$target; then
5737 # Native build.
5738 # Search the same directories that the installed compiler will
5739 # search. Else we may find the wrong assembler and lose. If we
5740 # do not find a suitable assembler binary, then try the user's
5741 # path.
5743 # Also note we have to check MD_EXEC_PREFIX before checking the
5744 # user's path. Unfortunately, there is no good way to get at the
5745 # value of MD_EXEC_PREFIX here. So we do a brute force search
5746 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
5747 # to be fixed as part of the make/configure rewrite too.
5749 if test "x$exec_prefix" = xNONE; then
5750 if test "x$prefix" = xNONE; then
5751 test_prefix=/usr/local
5752 else
5753 test_prefix=$prefix
5755 else
5756 test_prefix=$exec_prefix
5759 # If the loop below does not find an assembler, then use whatever
5760 # one we can find in the users's path.
5761 # user's path.
5762 as=as$host_exeext
5764 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
5765 $test_prefix/lib/gcc-lib/$target \
5766 /usr/lib/gcc/$target/$gcc_version \
5767 /usr/lib/gcc/$target \
5768 $test_prefix/$target/bin/$target/$gcc_version \
5769 $test_prefix/$target/bin \
5770 /usr/libexec \
5771 /usr/ccs/gcc \
5772 /usr/ccs/bin \
5773 /udk/usr/ccs/bin \
5774 /bsd43/usr/lib/cmplrs/cc \
5775 /usr/cross64/usr/bin \
5776 /usr/lib/cmplrs/cc \
5777 /sysv/usr/lib/cmplrs/cc \
5778 /svr4/usr/lib/cmplrs/cc \
5779 /usr/bin"
5781 for dir in $test_dirs; do
5782 if test -f $dir/as$host_exeext; then
5783 gcc_cv_as=$dir/as$host_exeext
5784 break;
5786 done
5788 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5789 echo "$ac_t"""newly built gas"" 1>&6
5790 else
5791 echo "$ac_t""$gcc_cv_as" 1>&6
5794 # Figure out what nm we will be using.
5795 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
5796 echo "configure:5797: checking what nm to use" >&5
5797 if test -x nm$host_exeext; then
5798 gcc_cv_nm=./nm$host_exeext
5799 elif test x$host = x$target; then
5800 # Native build.
5801 gcc_cv_nm=nm$host_exeext
5803 echo "$ac_t""$gcc_cv_nm" 1>&6
5805 # Figure out what assembler alignment features are present.
5806 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
5807 echo "configure:5808: checking assembler alignment features" >&5
5808 gcc_cv_as_alignment_features=none
5809 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5810 # Gas version 2.6 and later support for .balign and .p2align.
5811 # bytes to skip when using .p2align.
5812 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
5813 gcc_cv_as_alignment_features=".balign and .p2align"
5814 cat >> confdefs.h <<\EOF
5815 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5819 # Gas version 2.8 and later support specifying the maximum
5820 # bytes to skip when using .p2align.
5821 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
5822 gcc_cv_as_alignment_features=".p2align including maximum skip"
5823 cat >> confdefs.h <<\EOF
5824 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
5828 elif test x$gcc_cv_as != x; then
5829 # Check if we have .balign and .p2align
5830 echo ".balign 4" > conftest.s
5831 echo ".p2align 2" >> conftest.s
5832 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5833 gcc_cv_as_alignment_features=".balign and .p2align"
5834 cat >> confdefs.h <<\EOF
5835 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
5839 rm -f conftest.s conftest.o
5840 # Check if specifying the maximum bytes to skip when
5841 # using .p2align is supported.
5842 echo ".p2align 4,,7" > conftest.s
5843 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5844 gcc_cv_as_alignment_features=".p2align including maximum skip"
5845 cat >> confdefs.h <<\EOF
5846 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
5850 rm -f conftest.s conftest.o
5852 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
5854 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
5855 echo "configure:5856: checking assembler subsection support" >&5
5856 gcc_cv_as_subsections=no
5857 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5858 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
5859 gcc_cv_as_subsections="working .subsection -1"
5861 elif test x$gcc_cv_as != x; then
5862 # Check if we have .subsection
5863 echo ".subsection 1" > conftest.s
5864 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5865 gcc_cv_as_subsections=".subsection"
5866 if test x$gcc_cv_nm != x; then
5867 cat > conftest.s <<EOF
5868 conftest_label1: .word 0
5869 .subsection -1
5870 conftest_label2: .word 0
5871 .previous
5873 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5874 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
5875 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
5876 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
5878 else
5879 gcc_cv_as_subsections="working .subsection -1"
5884 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
5886 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
5887 cat >> confdefs.h <<\EOF
5888 #define HAVE_GAS_SUBSECTION_ORDERING 1
5892 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
5894 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
5895 echo "configure:5896: checking assembler weak support" >&5
5896 gcc_cv_as_weak=no
5897 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5898 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
5899 gcc_cv_as_weak="yes"
5901 elif test x$gcc_cv_as != x; then
5902 # Check if we have .weak
5903 echo " .weak foobar" > conftest.s
5904 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5905 gcc_cv_as_weak="yes"
5907 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
5909 if test x"$gcc_cv_as_weak" = xyes; then
5910 cat >> confdefs.h <<\EOF
5911 #define HAVE_GAS_WEAK 1
5915 echo "$ac_t""$gcc_cv_as_weak" 1>&6
5917 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
5918 echo "configure:5919: checking assembler hidden support" >&5
5919 gcc_cv_as_hidden=no
5920 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5921 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
5922 gcc_cv_as_hidden="yes"
5924 elif test x$gcc_cv_as != x; then
5925 # Check if we have .hidden
5926 echo " .hidden foobar" > conftest.s
5927 echo "foobar:" >> conftest.s
5928 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5929 gcc_cv_as_hidden="yes"
5931 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
5933 if test x"$gcc_cv_as_hidden" = xyes; then
5934 cat >> confdefs.h <<\EOF
5935 #define HAVE_GAS_HIDDEN 1
5939 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
5941 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
5942 echo "configure:5943: checking assembler leb128 support" >&5
5943 gcc_cv_as_hidden=no
5944 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
5945 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
5946 gcc_cv_as_leb128="yes"
5948 elif test x$gcc_cv_as != x; then
5949 # Check if we have .[us]leb128, and support symbol arithmetic with it.
5950 cat > conftest.s <<EOF
5951 .data
5952 .uleb128 L2 - L1
5954 .uleb128 1280
5955 .sleb128 -1010
5958 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5959 gcc_cv_as_leb128="yes"
5961 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
5963 if test x"$gcc_cv_as_leb128" = xyes; then
5964 cat >> confdefs.h <<\EOF
5965 #define HAVE_AS_LEB128 1
5969 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
5971 case "$target" in
5972 sparc*-*-*)
5973 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
5974 echo "configure:5975: checking assembler .register pseudo-op support" >&5
5975 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
5976 echo $ac_n "(cached) $ac_c" 1>&6
5977 else
5979 gcc_cv_as_register_pseudo_op=unknown
5980 if test x$gcc_cv_as != x; then
5981 # Check if we have .register
5982 echo ".register %g2, #scratch" > conftest.s
5983 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
5984 gcc_cv_as_register_pseudo_op=yes
5985 else
5986 gcc_cv_as_register_pseudo_op=no
5988 rm -f conftest.s conftest.o
5993 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
5994 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
5995 cat >> confdefs.h <<\EOF
5996 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6001 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6002 echo "configure:6003: checking assembler supports -relax" >&5
6003 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6007 gcc_cv_as_relax_opt=unknown
6008 if test x$gcc_cv_as != x; then
6009 # Check if gas supports -relax
6010 echo ".text" > conftest.s
6011 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6012 gcc_cv_as_relax_opt=yes
6013 else
6014 gcc_cv_as_relax_opt=no
6016 rm -f conftest.s conftest.o
6021 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6022 if test "x$gcc_cv_as_relax_opt" = xyes; then
6023 cat >> confdefs.h <<\EOF
6024 #define HAVE_AS_RELAX_OPTION 1
6029 case "$tm_file" in
6030 *64*)
6031 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6032 echo "configure:6033: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6033 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6034 echo $ac_n "(cached) $ac_c" 1>&6
6035 else
6037 if test -n "$gcc_cv_as"; then
6038 echo ".xword foo" > conftest.s
6039 gcc_cv_as_flags64=no
6040 for flag in "-xarch=v9" "-64 -Av9"; do
6041 if $gcc_cv_as $flag -o conftest.o conftest.s \
6042 > /dev/null 2>&1; then
6043 gcc_cv_as_flags64=$flag
6044 break
6046 done
6047 rm -f conftest.s conftest.o
6048 else
6049 if test "$gas" = yes; then
6050 gcc_cv_as_flags64="-64 -Av9"
6051 else
6052 gcc_cv_as_flags64="-xarch=v9"
6058 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6059 if test "x$gcc_cv_as_flags64" = xno; then
6061 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6062 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6064 else
6065 cat >> confdefs.h <<EOF
6066 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6071 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6073 esac
6075 if test "x$gcc_cv_as_flags64" != xno; then
6076 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6077 echo "configure:6078: checking for assembler offsetable %lo() support" >&5
6078 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6079 echo $ac_n "(cached) $ac_c" 1>&6
6080 else
6082 gcc_cv_as_offsetable_lo10=unknown
6083 if test "x$gcc_cv_as" != x; then
6084 # Check if assembler has offsetable %lo()
6085 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6086 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6087 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6088 > /dev/null 2>&1 &&
6089 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6090 > /dev/null 2>&1; then
6091 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6092 gcc_cv_as_offsetable_lo10=no
6093 else
6094 gcc_cv_as_offsetable_lo10=yes
6096 else
6097 gcc_cv_as_offsetable_lo10=no
6099 rm -f conftest.s conftest.o conftest1.s conftest1.o
6104 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6105 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6106 cat >> confdefs.h <<\EOF
6107 #define HAVE_AS_OFFSETABLE_LO10 1
6114 i[34567]86-*-*)
6115 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6116 echo "configure:6117: checking assembler instructions" >&5
6117 gcc_cv_as_instructions=
6118 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6119 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
6120 gcc_cv_as_instructions="filds fists"
6122 elif test x$gcc_cv_as != x; then
6123 set "filds fists" "filds mem; fists mem"
6124 while test $# -gt 0
6126 echo "$2" > conftest.s
6127 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6128 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6130 shift 2
6131 done
6132 rm -f conftest.s conftest.o
6134 if test x"$gcc_cv_as_instructions" != x; then
6135 cat >> confdefs.h <<EOF
6136 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6140 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6142 esac
6144 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6145 echo "configure:6146: checking assembler dwarf2 debug_line support" >&5
6146 gcc_cv_as_dwarf2_debug_line=no
6147 # ??? Not all targets support dwarf2 debug_line, even within a version
6148 # of gas. Moreover, we need to emit a valid instruction to trigger any
6149 # info to the output file. So, as supported targets are added to gas 2.11,
6150 # add some instruction here to (also) show we expect this might work.
6151 # ??? Once 2.11 is released, probably need to add first known working
6152 # version to the per-target configury.
6153 case "$target" in
6154 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
6155 insn="nop"
6157 ia64*-*-*)
6158 insn="nop 0"
6160 esac
6161 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6162 then
6163 if test "$gcc_cv_gas_major_version" -eq 2 \
6164 -a "$gcc_cv_gas_minor_version" -ge 11 \
6165 -o "$gcc_cv_gas_major_version" -gt 2 \
6166 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6167 && test x"$insn" != x ; then
6168 gcc_cv_as_dwarf2_debug_line="yes"
6170 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6171 echo ' .file 0 "conftest.s"' > conftest.s
6172 echo ' .loc 0 3 0' >> conftest.s
6173 echo " $insn" >> conftest.s
6174 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6175 && grep debug_line conftest.o > /dev/null 2>&1 ; then
6176 gcc_cv_as_dwarf2_debug_line="yes"
6178 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6180 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6181 cat >> confdefs.h <<\EOF
6182 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6186 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6188 # Figure out what language subdirectories are present.
6189 # Look if the user specified --enable-languages="..."; if not, use
6190 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6191 # go away some day.
6192 if test x"${enable_languages+set}" != xset; then
6193 if test x"${LANGUAGES+set}" = xset; then
6194 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6195 else
6196 enable_languages=all
6198 else
6199 if test x"${enable_languages}" = x; then
6200 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6204 # First scan to see if an enabled language requires some other language.
6205 # We assume that a given config-lang.in will list all the language
6206 # front ends it requires, even if some are required indirectly.
6207 for lang in ${srcdir}/*/config-lang.in ..
6209 case $lang in
6212 # The odd quoting in the next line works around
6213 # an apparent bug in bash 1.12 on linux.
6214 ${srcdir}/[*]/config-lang.in)
6217 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6218 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
6219 for other in $this_lang_requires
6221 case ,${enable_languages}, in
6222 *,$other,*)
6224 *,all,*)
6226 *,$lang_alias,*)
6227 enable_languages="$enable_languages,$other"
6229 esac
6230 done
6232 esac
6233 done
6235 subdirs=
6236 for lang in ${srcdir}/*/config-lang.in ..
6238 case $lang in
6239 ..) ;;
6240 # The odd quoting in the next line works around
6241 # an apparent bug in bash 1.12 on linux.
6242 ${srcdir}/[*]/config-lang.in) ;;
6244 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6245 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
6246 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
6247 if test "x$lang_alias" = x
6248 then
6249 echo "$lang doesn't set \$language." 1>&2
6250 exit 1
6252 case ${build_by_default},${enable_languages}, in
6253 *,$lang_alias,*) add_this_lang=yes ;;
6254 no,*) add_this_lang=no ;;
6255 *,all,*) add_this_lang=yes ;;
6256 *) add_this_lang=no ;;
6257 esac
6258 if test x"${add_this_lang}" = xyes; then
6259 case $lang in
6260 ${srcdir}/ada/config-lang.in)
6261 if test x$have_gnat = xyes ; then
6262 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6266 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6268 esac
6271 esac
6272 done
6274 # Make gthr-default.h if we have a thread file.
6275 gthread_flags=
6276 if test $thread_file != single; then
6277 rm -f gthr-default.h
6278 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6279 gthread_flags=-DHAVE_GTHR_DEFAULT
6283 # Find out what GC implementation we want, or may, use.
6284 # Check whether --with-gc or --without-gc was given.
6285 if test "${with_gc+set}" = set; then
6286 withval="$with_gc"
6287 case "$withval" in
6288 simple | page)
6289 GGC=ggc-$withval
6292 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6294 esac
6295 else
6296 GGC=ggc-page
6300 echo "Using $GGC for garbage collection."
6302 # Use the system's zlib library.
6303 zlibdir=-L../zlib
6304 zlibinc="-I\$(srcdir)/../zlib"
6305 # Check whether --with-system-zlib or --without-system-zlib was given.
6306 if test "${with_system_zlib+set}" = set; then
6307 withval="$with_system_zlib"
6308 zlibdir=
6309 zlibinc=
6316 cat >> confdefs.h <<EOF
6317 #define ENABLE_STD_NAMESPACE 1
6322 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6323 echo "configure:6324: checking whether to enable maintainer-specific portions of Makefiles" >&5
6324 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6325 if test "${enable_maintainer_mode+set}" = set; then
6326 enableval="$enable_maintainer_mode"
6327 maintainer_mode=$enableval
6328 else
6329 maintainer_mode=no
6333 echo "$ac_t""$maintainer_mode" 1>&6
6335 if test "$maintainer_mode" = "yes"; then
6336 MAINT=''
6337 else
6338 MAINT='#'
6341 # Make empty files to contain the specs and options for each language.
6342 # Then add #include lines to for a compiler that has specs and/or options.
6344 lang_specs_files=
6345 lang_options_files=
6346 lang_tree_files=
6347 rm -f specs.h options.h gencheck.h
6348 touch specs.h options.h gencheck.h
6349 for subdir in . $subdirs
6351 if test -f $srcdir/$subdir/lang-specs.h; then
6352 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6353 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6355 if test -f $srcdir/$subdir/lang-options.h; then
6356 echo "#include \"$subdir/lang-options.h\"" >>options.h
6357 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6359 if test -f $srcdir/$subdir/$subdir-tree.def; then
6360 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6361 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6363 done
6365 # These (without "all_") are set in each config-lang.in.
6366 # `language' must be a single word so is spelled singularly.
6367 all_languages=
6368 all_boot_languages=
6369 all_compilers=
6370 all_stagestuff=
6371 all_diff_excludes=
6372 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
6373 # List of language makefile fragments.
6374 all_lang_makefiles=
6375 all_headers=
6376 all_lib2funcs=
6378 # Add the language fragments.
6379 # Languages are added via two mechanisms. Some information must be
6380 # recorded in makefile variables, these are defined in config-lang.in.
6381 # We accumulate them and plug them into the main Makefile.
6382 # The other mechanism is a set of hooks for each of the main targets
6383 # like `clean', `install', etc.
6385 language_fragments="Make-lang"
6386 language_hooks="Make-hooks"
6388 for s in .. $subdirs
6390 if test $s != ".."
6391 then
6392 language=
6393 boot_language=
6394 compilers=
6395 stagestuff=
6396 diff_excludes=
6397 headers=
6398 outputs=
6399 lib2funcs=
6400 . ${srcdir}/$s/config-lang.in
6401 if test "x$language" = x
6402 then
6403 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6404 exit 1
6406 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
6407 if test -f ${srcdir}/$s/Makefile.in
6408 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
6410 all_languages="$all_languages $language"
6411 if test "x$boot_language" = xyes
6412 then
6413 all_boot_languages="$all_boot_languages $language"
6415 all_compilers="$all_compilers $compilers"
6416 all_stagestuff="$all_stagestuff $stagestuff"
6417 all_diff_excludes="$all_diff_excludes $diff_excludes"
6418 all_headers="$all_headers $headers"
6419 all_outputs="$all_outputs $outputs"
6420 all_lib2funcs="$all_lib2funcs $lib2funcs"
6422 done
6424 check_languages=
6425 for language in .. $all_languages
6427 if test $language != ".."
6428 then
6429 check_languages="$check_languages check-$language"
6431 done
6433 # Since we can't use `::' targets, we link each language in
6434 # with a set of hooks, reached indirectly via lang.${target}.
6436 rm -f Make-hooks
6437 touch Make-hooks
6438 target_list="all.build all.cross start.encap rest.encap \
6439 info dvi \
6440 install-normal install-common install-info install-man \
6441 uninstall \
6442 mostlyclean clean distclean extraclean maintainer-clean \
6443 stage1 stage2 stage3 stage4"
6444 for t in $target_list
6447 for lang in .. $all_languages
6449 if test $lang != ".."; then
6450 x="$x $lang.$t"
6452 done
6453 echo "lang.$t: $x" >> Make-hooks
6454 done
6456 # Create .gdbinit.
6458 echo "dir ." > .gdbinit
6459 echo "dir ${srcdir}" >> .gdbinit
6460 if test x$gdb_needs_out_file_path = xyes
6461 then
6462 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6464 if test "x$subdirs" != x; then
6465 for s in $subdirs
6467 echo "dir ${srcdir}/$s" >> .gdbinit
6468 done
6470 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
6472 # Define variables host_canonical and build_canonical
6473 # because some Cygnus local changes in the Makefile depend on them.
6474 build_canonical=${build}
6475 host_canonical=${host}
6476 target_subdir=
6477 if test "${host}" != "${target}" ; then
6478 target_subdir=${target}/
6484 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
6485 # absolute path for gcc_tooldir based on inserting the number of up-directory
6486 # movements required to get from $(exec_prefix) to $(prefix) into the basic
6487 # $(libsubdir)/@(unlibsubdir) based path.
6488 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
6489 # make and thus we'd get different behavior depending on where we built the
6490 # sources.
6491 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
6492 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
6493 else
6494 # An explanation of the sed strings:
6495 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
6496 # -e 's|/$||' match a trailing forward slash and eliminates it
6497 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
6498 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
6500 # (*) Note this pattern overwrites the first character of the string
6501 # with a forward slash if one is not already present. This is not a
6502 # problem because the exact names of the sub-directories concerned is
6503 # unimportant, just the number of them matters.
6505 # The practical upshot of these patterns is like this:
6507 # prefix exec_prefix result
6508 # ------ ----------- ------
6509 # /foo /foo/bar ../
6510 # /foo/ /foo/bar ../
6511 # /foo /foo/bar/ ../
6512 # /foo/ /foo/bar/ ../
6513 # /foo /foo/bar/ugg ../../
6515 dollar='$$'
6516 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
6521 # Find a directory in which to install a shared libgcc.
6523 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
6524 if test "${enable_version_specific_runtime_libs+set}" = set; then
6525 enableval="$enable_version_specific_runtime_libs"
6530 # Check whether --with-slibdir or --without-slibdir was given.
6531 if test "${with_slibdir+set}" = set; then
6532 withval="$with_slibdir"
6533 slibdir="$with_slibdir"
6534 else
6535 if test "${enable_version_specific_runtime_libs+set}" = set; then
6536 slibdir='$(libsubdir)'
6537 elif test "$host" != "$target"; then
6538 slibdir='$(build_tooldir)/lib'
6539 else
6540 slibdir='$(libdir)'
6546 # Nothing to do for FLOAT_H, float_format already handled.
6547 objdir=`pwd`
6550 # Process the language and host/target makefile fragments.
6551 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
6553 # Substitute configuration variables
6624 # Echo that links are built
6625 if test x$host = x$target
6626 then
6627 str1="native "
6628 else
6629 str1="cross-"
6630 str2=" from $host"
6633 if test x$host != x$build
6634 then
6635 str3=" on a $build system"
6638 if test "x$str2" != x || test "x$str3" != x
6639 then
6640 str4=
6643 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
6645 if test "x$str2" != x || test "x$str3" != x
6646 then
6647 echo " ${str2}${str3}." 1>&2
6650 # Truncate the target if necessary
6651 if test x$host_truncate_target != x; then
6652 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
6655 # Configure the subdirectories
6656 # AC_CONFIG_SUBDIRS($subdirs)
6658 # Create the Makefile
6659 # and configure language subdirectories
6660 trap '' 1 2 15
6661 cat > confcache <<\EOF
6662 # This file is a shell script that caches the results of configure
6663 # tests run on this system so they can be shared between configure
6664 # scripts and configure runs. It is not useful on other systems.
6665 # If it contains results you don't want to keep, you may remove or edit it.
6667 # By default, configure uses ./config.cache as the cache file,
6668 # creating it if it does not exist already. You can give configure
6669 # the --cache-file=FILE option to use a different cache file; that is
6670 # what configure does when it calls configure scripts in
6671 # subdirectories, so they share the cache.
6672 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6673 # config.status only pays attention to the cache file if you give it the
6674 # --recheck option to rerun configure.
6677 # The following way of writing the cache mishandles newlines in values,
6678 # but we know of no workaround that is simple, portable, and efficient.
6679 # So, don't put newlines in cache variables' values.
6680 # Ultrix sh set writes to stderr and can't be redirected directly,
6681 # and sets the high bit in the cache file unless we assign to the vars.
6682 (set) 2>&1 |
6683 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6684 *ac_space=\ *)
6685 # `set' does not quote correctly, so add quotes (double-quote substitution
6686 # turns \\\\ into \\, and sed turns \\ into \).
6687 sed -n \
6688 -e "s/'/'\\\\''/g" \
6689 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6692 # `set' quotes correctly as required by POSIX, so do not add quotes.
6693 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6695 esac >> confcache
6696 if cmp -s $cache_file confcache; then
6698 else
6699 if test -w $cache_file; then
6700 echo "updating cache $cache_file"
6701 cat confcache > $cache_file
6702 else
6703 echo "not updating unwritable cache $cache_file"
6706 rm -f confcache
6708 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6710 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6711 # Let make expand exec_prefix.
6712 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6714 # Any assignment to VPATH causes Sun make to only execute
6715 # the first set of double-colon rules, so remove it if not needed.
6716 # If there is a colon in the path, we need to keep it.
6717 if test "x$srcdir" = x.; then
6718 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6721 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6723 DEFS=-DHAVE_CONFIG_H
6725 # Without the "./", some shells look in PATH for config.status.
6726 : ${CONFIG_STATUS=./config.status}
6728 echo creating $CONFIG_STATUS
6729 rm -f $CONFIG_STATUS
6730 cat > $CONFIG_STATUS <<EOF
6731 #! /bin/sh
6732 # Generated automatically by configure.
6733 # Run this file to recreate the current configuration.
6734 # This directory was configured as follows,
6735 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6737 # $0 $ac_configure_args
6739 # Compiler output produced by configure, useful for debugging
6740 # configure, is in ./config.log if it exists.
6742 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6743 for ac_option
6745 case "\$ac_option" in
6746 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6747 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6748 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6749 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6750 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6751 exit 0 ;;
6752 -help | --help | --hel | --he | --h)
6753 echo "\$ac_cs_usage"; exit 0 ;;
6754 *) echo "\$ac_cs_usage"; exit 1 ;;
6755 esac
6756 done
6758 ac_given_srcdir=$srcdir
6760 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6762 cat >> $CONFIG_STATUS <<EOF
6764 # Protect against being on the right side of a sed subst in config.status.
6765 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6766 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6767 $ac_vpsub
6768 $extrasub
6769 s%@SHELL@%$SHELL%g
6770 s%@CFLAGS@%$CFLAGS%g
6771 s%@CPPFLAGS@%$CPPFLAGS%g
6772 s%@CXXFLAGS@%$CXXFLAGS%g
6773 s%@FFLAGS@%$FFLAGS%g
6774 s%@DEFS@%$DEFS%g
6775 s%@LDFLAGS@%$LDFLAGS%g
6776 s%@LIBS@%$LIBS%g
6777 s%@exec_prefix@%$exec_prefix%g
6778 s%@prefix@%$prefix%g
6779 s%@program_transform_name@%$program_transform_name%g
6780 s%@bindir@%$bindir%g
6781 s%@sbindir@%$sbindir%g
6782 s%@libexecdir@%$libexecdir%g
6783 s%@datadir@%$datadir%g
6784 s%@sysconfdir@%$sysconfdir%g
6785 s%@sharedstatedir@%$sharedstatedir%g
6786 s%@localstatedir@%$localstatedir%g
6787 s%@libdir@%$libdir%g
6788 s%@includedir@%$includedir%g
6789 s%@oldincludedir@%$oldincludedir%g
6790 s%@infodir@%$infodir%g
6791 s%@mandir@%$mandir%g
6792 s%@enable_multilib@%$enable_multilib%g
6793 s%@enable_shared@%$enable_shared%g
6794 s%@host@%$host%g
6795 s%@host_alias@%$host_alias%g
6796 s%@host_cpu@%$host_cpu%g
6797 s%@host_vendor@%$host_vendor%g
6798 s%@host_os@%$host_os%g
6799 s%@target@%$target%g
6800 s%@target_alias@%$target_alias%g
6801 s%@target_cpu@%$target_cpu%g
6802 s%@target_vendor@%$target_vendor%g
6803 s%@target_os@%$target_os%g
6804 s%@build@%$build%g
6805 s%@build_alias@%$build_alias%g
6806 s%@build_cpu@%$build_cpu%g
6807 s%@build_vendor@%$build_vendor%g
6808 s%@build_os@%$build_os%g
6809 s%@CC@%$CC%g
6810 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
6811 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
6812 s%@strict1_warn@%$strict1_warn%g
6813 s%@warn_cflags@%$warn_cflags%g
6814 s%@stage1_cflags@%$stage1_cflags%g
6815 s%@SET_MAKE@%$SET_MAKE%g
6816 s%@AWK@%$AWK%g
6817 s%@LN@%$LN%g
6818 s%@LN_S@%$LN_S%g
6819 s%@RANLIB@%$RANLIB%g
6820 s%@INSTALL@%$INSTALL%g
6821 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6822 s%@INSTALL_DATA@%$INSTALL_DATA%g
6823 s%@CPP@%$CPP%g
6824 s%@have_gnat@%$have_gnat%g
6825 s%@have_mktemp_command@%$have_mktemp_command%g
6826 s%@MAKEINFO@%$MAKEINFO%g
6827 s%@BUILD_INFO@%$BUILD_INFO%g
6828 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
6829 s%@FLEX@%$FLEX%g
6830 s%@BISON@%$BISON%g
6831 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
6832 s%@vfprintf@%$vfprintf%g
6833 s%@doprint@%$doprint%g
6834 s%@strstr@%$strstr%g
6835 s%@manext@%$manext%g
6836 s%@objext@%$objext%g
6837 s%@PACKAGE@%$PACKAGE%g
6838 s%@VERSION@%$VERSION%g
6839 s%@CHECK_PO@%$CHECK_PO%g
6840 s%@USE_NLS@%$USE_NLS%g
6841 s%@MSGFMT@%$MSGFMT%g
6842 s%@GMSGFMT@%$GMSGFMT%g
6843 s%@XGETTEXT@%$XGETTEXT%g
6844 s%@GENCAT@%$GENCAT%g
6845 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6846 s%@CATALOGS@%$CATALOGS%g
6847 s%@CATOBJEXT@%$CATOBJEXT%g
6848 s%@DATADIRNAME@%$DATADIRNAME%g
6849 s%@GMOFILES@%$GMOFILES%g
6850 s%@INSTOBJEXT@%$INSTOBJEXT%g
6851 s%@INTLDEPS@%$INTLDEPS%g
6852 s%@INTLLIBS@%$INTLLIBS%g
6853 s%@INTLOBJS@%$INTLOBJS%g
6854 s%@POFILES@%$POFILES%g
6855 s%@POSUB@%$POSUB%g
6856 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6857 s%@GT_NO@%$GT_NO%g
6858 s%@GT_YES@%$GT_YES%g
6859 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6860 s%@l@%$l%g
6861 s%@inhibit_libc@%$inhibit_libc%g
6862 s%@gthread_flags@%$gthread_flags%g
6863 s%@GGC@%$GGC%g
6864 s%@zlibdir@%$zlibdir%g
6865 s%@zlibinc@%$zlibinc%g
6866 s%@MAINT@%$MAINT%g
6867 s%@build_canonical@%$build_canonical%g
6868 s%@host_canonical@%$host_canonical%g
6869 s%@target_subdir@%$target_subdir%g
6870 s%@gcc_tooldir@%$gcc_tooldir%g
6871 s%@dollar@%$dollar%g
6872 s%@slibdir@%$slibdir%g
6873 s%@objdir@%$objdir%g
6874 s%@subdirs@%$subdirs%g
6875 s%@all_boot_languages@%$all_boot_languages%g
6876 s%@all_compilers@%$all_compilers%g
6877 s%@all_diff_excludes@%$all_diff_excludes%g
6878 s%@all_headers@%$all_headers%g
6879 s%@all_lang_makefiles@%$all_lang_makefiles%g
6880 s%@all_languages@%$all_languages%g
6881 s%@all_lib2funcs@%$all_lib2funcs%g
6882 s%@all_stagestuff@%$all_stagestuff%g
6883 s%@build_exeext@%$build_exeext%g
6884 s%@build_install_headers_dir@%$build_install_headers_dir%g
6885 s%@build_xm_file_list@%$build_xm_file_list%g
6886 s%@build_xm_file@%$build_xm_file%g
6887 s%@build_xm_defines@%$build_xm_defines%g
6888 s%@check_languages@%$check_languages%g
6889 s%@cc_set_by_configure@%$cc_set_by_configure%g
6890 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
6891 s%@cpp_install_dir@%$cpp_install_dir%g
6892 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
6893 s%@dep_tmake_file@%$dep_tmake_file%g
6894 s%@extra_c_flags@%$extra_c_flags%g
6895 s%@extra_headers_list@%$extra_headers_list%g
6896 s%@extra_objs@%$extra_objs%g
6897 s%@extra_parts@%$extra_parts%g
6898 s%@extra_passes@%$extra_passes%g
6899 s%@extra_programs@%$extra_programs%g
6900 s%@float_h_file@%$float_h_file%g
6901 s%@gcc_config_arguments@%$gcc_config_arguments%g
6902 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
6903 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
6904 s%@gcc_version@%$gcc_version%g
6905 s%@gcc_version_full@%$gcc_version_full%g
6906 s%@gcc_version_trigger@%$gcc_version_trigger%g
6907 s%@host_exeext@%$host_exeext%g
6908 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
6909 s%@host_xm_file_list@%$host_xm_file_list%g
6910 s%@host_xm_file@%$host_xm_file%g
6911 s%@host_xm_defines@%$host_xm_defines%g
6912 s%@install@%$install%g
6913 s%@lang_options_files@%$lang_options_files%g
6914 s%@lang_specs_files@%$lang_specs_files%g
6915 s%@lang_tree_files@%$lang_tree_files%g
6916 s%@local_prefix@%$local_prefix%g
6917 s%@maybe_use_collect2@%$maybe_use_collect2%g
6918 s%@md_file@%$md_file%g
6919 s%@objc_boehm_gc@%$objc_boehm_gc%g
6920 s%@out_file@%$out_file%g
6921 s%@out_object_file@%$out_object_file%g
6922 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
6923 s%@symbolic_link@%$symbolic_link%g
6924 s%@thread_file@%$thread_file%g
6925 s%@tm_file_list@%$tm_file_list%g
6926 s%@tm_file@%$tm_file%g
6927 s%@tm_p_file_list@%$tm_p_file_list%g
6928 s%@tm_p_file@%$tm_p_file%g
6929 s%@xm_file@%$xm_file%g
6930 s%@xm_defines@%$xm_defines%g
6931 s%@will_use_collect2@%$will_use_collect2%g
6932 s%@c_target_objs@%$c_target_objs%g
6933 s%@cxx_target_objs@%$cxx_target_objs%g
6934 s%@target_cpu_default@%$target_cpu_default%g
6935 /@target_overrides@/r $target_overrides
6936 s%@target_overrides@%%g
6937 /@host_overrides@/r $host_overrides
6938 s%@host_overrides@%%g
6939 s%@cross_defines@%$cross_defines%g
6940 /@cross_overrides@/r $cross_overrides
6941 s%@cross_overrides@%%g
6942 /@build_overrides@/r $build_overrides
6943 s%@build_overrides@%%g
6944 /@language_fragments@/r $language_fragments
6945 s%@language_fragments@%%g
6946 /@language_hooks@/r $language_hooks
6947 s%@language_hooks@%%g
6949 CEOF
6952 cat >> $CONFIG_STATUS <<\EOF
6954 # Split the substitutions into bite-sized pieces for seds with
6955 # small command number limits, like on Digital OSF/1 and HP-UX.
6956 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6957 ac_file=1 # Number of current file.
6958 ac_beg=1 # First line for current file.
6959 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6960 ac_more_lines=:
6961 ac_sed_cmds=""
6962 while $ac_more_lines; do
6963 if test $ac_beg -gt 1; then
6964 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6965 else
6966 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6968 if test ! -s conftest.s$ac_file; then
6969 ac_more_lines=false
6970 rm -f conftest.s$ac_file
6971 else
6972 if test -z "$ac_sed_cmds"; then
6973 ac_sed_cmds="sed -f conftest.s$ac_file"
6974 else
6975 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6977 ac_file=`expr $ac_file + 1`
6978 ac_beg=$ac_end
6979 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6981 done
6982 if test -z "$ac_sed_cmds"; then
6983 ac_sed_cmds=cat
6987 cat >> $CONFIG_STATUS <<EOF
6989 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
6991 cat >> $CONFIG_STATUS <<\EOF
6992 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6993 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6994 case "$ac_file" in
6995 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6996 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6997 *) ac_file_in="${ac_file}.in" ;;
6998 esac
7000 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7002 # Remove last slash and all that follows it. Not all systems have dirname.
7003 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7004 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7005 # The file is in a subdirectory.
7006 test ! -d "$ac_dir" && mkdir "$ac_dir"
7007 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7008 # A "../" for each directory in $ac_dir_suffix.
7009 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7010 else
7011 ac_dir_suffix= ac_dots=
7014 case "$ac_given_srcdir" in
7015 .) srcdir=.
7016 if test -z "$ac_dots"; then top_srcdir=.
7017 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7018 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7019 *) # Relative path.
7020 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7021 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7022 esac
7025 echo creating "$ac_file"
7026 rm -f "$ac_file"
7027 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7028 case "$ac_file" in
7029 *Makefile*) ac_comsub="1i\\
7030 # $configure_input" ;;
7031 *) ac_comsub= ;;
7032 esac
7034 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7035 sed -e "$ac_comsub
7036 s%@configure_input@%$configure_input%g
7037 s%@srcdir@%$srcdir%g
7038 s%@top_srcdir@%$top_srcdir%g
7039 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7040 fi; done
7041 rm -f conftest.s*
7043 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7044 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7046 # ac_d sets the value in "#define NAME VALUE" lines.
7047 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7048 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7049 ac_dC='\3'
7050 ac_dD='%g'
7051 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7052 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7053 ac_uB='\([ ]\)%\1#\2define\3'
7054 ac_uC=' '
7055 ac_uD='\4%g'
7056 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7057 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7058 ac_eB='$%\1#\2define\3'
7059 ac_eC=' '
7060 ac_eD='%g'
7062 if test "${CONFIG_HEADERS+set}" != set; then
7064 cat >> $CONFIG_STATUS <<EOF
7065 CONFIG_HEADERS="auto-host.h:config.in"
7067 cat >> $CONFIG_STATUS <<\EOF
7069 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7070 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7071 case "$ac_file" in
7072 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7073 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7074 *) ac_file_in="${ac_file}.in" ;;
7075 esac
7077 echo creating $ac_file
7079 rm -f conftest.frag conftest.in conftest.out
7080 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7081 cat $ac_file_inputs > conftest.in
7085 # Transform confdefs.h into a sed script conftest.vals that substitutes
7086 # the proper values into config.h.in to produce config.h. And first:
7087 # Protect against being on the right side of a sed subst in config.status.
7088 # Protect against being in an unquoted here document in config.status.
7089 rm -f conftest.vals
7090 cat > conftest.hdr <<\EOF
7091 s/[\\&%]/\\&/g
7092 s%[\\$`]%\\&%g
7093 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7094 s%ac_d%ac_u%gp
7095 s%ac_u%ac_e%gp
7097 sed -n -f conftest.hdr confdefs.h > conftest.vals
7098 rm -f conftest.hdr
7100 # This sed command replaces #undef with comments. This is necessary, for
7101 # example, in the case of _POSIX_SOURCE, which is predefined and required
7102 # on some systems where configure will not decide to define it.
7103 cat >> conftest.vals <<\EOF
7104 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7107 # Break up conftest.vals because some shells have a limit on
7108 # the size of here documents, and old seds have small limits too.
7110 rm -f conftest.tail
7111 while :
7113 ac_lines=`grep -c . conftest.vals`
7114 # grep -c gives empty output for an empty file on some AIX systems.
7115 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7116 # Write a limited-size here document to conftest.frag.
7117 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7118 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7119 echo 'CEOF
7120 sed -f conftest.frag conftest.in > conftest.out
7121 rm -f conftest.in
7122 mv conftest.out conftest.in
7123 ' >> $CONFIG_STATUS
7124 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7125 rm -f conftest.vals
7126 mv conftest.tail conftest.vals
7127 done
7128 rm -f conftest.vals
7130 cat >> $CONFIG_STATUS <<\EOF
7131 rm -f conftest.frag conftest.h
7132 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7133 cat conftest.in >> conftest.h
7134 rm -f conftest.in
7135 if cmp -s $ac_file conftest.h 2>/dev/null; then
7136 echo "$ac_file is unchanged"
7137 rm -f conftest.h
7138 else
7139 # Remove last slash and all that follows it. Not all systems have dirname.
7140 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7141 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7142 # The file is in a subdirectory.
7143 test ! -d "$ac_dir" && mkdir "$ac_dir"
7145 rm -f $ac_file
7146 mv conftest.h $ac_file
7148 fi; done
7152 cat >> $CONFIG_STATUS <<EOF
7153 ac_sources="$nls_cv_header_libgt"
7154 ac_dests="$nls_cv_header_intl"
7157 cat >> $CONFIG_STATUS <<\EOF
7158 srcdir=$ac_given_srcdir
7159 while test -n "$ac_sources"; do
7160 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7161 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7163 echo "linking $srcdir/$ac_source to $ac_dest"
7165 if test ! -r $srcdir/$ac_source; then
7166 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7168 rm -f $ac_dest
7170 # Make relative symlinks.
7171 # Remove last slash and all that follows it. Not all systems have dirname.
7172 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7173 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7174 # The dest file is in a subdirectory.
7175 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7176 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7177 # A "../" for each directory in $ac_dest_dir_suffix.
7178 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7179 else
7180 ac_dest_dir_suffix= ac_dots=
7183 case "$srcdir" in
7184 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7185 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7186 esac
7188 # Make a symlink if possible; otherwise try a hard link.
7189 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7190 ln $srcdir/$ac_source $ac_dest; then :
7191 else
7192 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7194 done
7196 cat >> $CONFIG_STATUS <<EOF
7199 host='${host}'
7200 build='${build}'
7201 target='${target}'
7202 target_alias='${target_alias}'
7203 srcdir='${srcdir}'
7204 subdirs='${subdirs}'
7205 symbolic_link='${symbolic_link}'
7206 program_transform_set='${program_transform_set}'
7207 program_transform_name='${program_transform_name}'
7208 dep_host_xmake_file='${dep_host_xmake_file}'
7209 host_xmake_file='${host_xmake_file}'
7210 dep_tmake_file='${dep_tmake_file}'
7211 tmake_file='${tmake_file}'
7212 thread_file='${thread_file}'
7213 gcc_config_arguments='${gcc_config_arguments}'
7214 gcc_version='${gcc_version}'
7215 gcc_version_full='${gcc_version_full}'
7216 gcc_version_trigger='${gcc_version_trigger}'
7217 local_prefix='${local_prefix}'
7218 build_install_headers_dir='${build_install_headers_dir}'
7219 build_exeext='${build_exeext}'
7220 host_exeext='${host_exeext}'
7221 out_file='${out_file}'
7222 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7223 SET_MAKE='${SET_MAKE}'
7224 target_list='${target_list}'
7225 target_overrides='${target_overrides}'
7226 host_overrides='${host_overrides}'
7227 cross_defines='${cross_defines}'
7228 cross_overrides='${cross_overrides}'
7229 build_overrides='${build_overrides}'
7230 cpp_install_dir='${cpp_install_dir}'
7233 cat >> $CONFIG_STATUS <<\EOF
7234 case "$CONFIG_FILES" in *po/Makefile.in*)
7235 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7236 esac
7238 case x$CONFIG_HEADERS in
7239 xauto-host.h:config.in)
7240 echo > cstamp-h ;;
7241 esac
7242 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
7243 # bootstrapping and the installation procedure can still use
7244 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
7245 # FLAGS_TO_PASS has been modified to solve the problem there.
7246 # This is virtually a duplicate of what happens in configure.lang; we do
7247 # an extra check to make sure this only happens if ln -s can be used.
7248 if test "$symbolic_link" = "ln -s"; then
7249 for d in .. ${subdirs} ; do
7250 if test $d != ..; then
7251 STARTDIR=`pwd`
7252 cd $d
7253 for t in stage1 stage2 stage3 stage4 include
7255 rm -f $t
7256 $symbolic_link ../$t $t 2>/dev/null
7257 done
7258 cd $STARTDIR
7260 done
7261 else true ; fi
7262 # Avoid having to add intl to our include paths.
7263 if test -f intl/libintl.h; then
7264 echo creating libintl.h
7265 echo '#include "intl/libintl.h"' >libintl.h
7268 exit 0
7270 chmod +x $CONFIG_STATUS
7271 rm -fr confdefs* $ac_clean_files
7272 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1