Update version
[official-gcc.git] / gcc / configure
blob2236b097808ffcfd333073c598103913cf0fc6b4
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 no checking"
39 ac_help="$ac_help
40 --disable-cpp don't provide a user-visible C preprocessor"
41 ac_help="$ac_help
42 --with-cpp-install-dir=DIR
43 install the user visible C preprocessor in DIR
44 (relative to PREFIX) as well as PREFIX/bin"
45 ac_help="$ac_help
46 --enable-c-mbchar enable multibyte characters for C and C++"
47 ac_help="$ac_help
48 --enable-threads enable thread usage for target GCC
49 --enable-threads=LIB use LIB thread package for target GCC"
50 ac_help="$ac_help
51 --enable-objc-gc enable the use of Boehm's garbage collector with
52 the GNU Objective-C runtime"
53 ac_help="$ac_help
54 --with-dwarf2 force the default debug format to be DWARF 2"
55 ac_help="$ac_help
56 --disable-shared don't provide a shared libgcc"
57 ac_help="$ac_help
58 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
59 ac_help="$ac_help
60 --enable-nls use Native Language Support (default)"
61 ac_help="$ac_help
62 --disable-nls do not use Native Language Support"
63 ac_help="$ac_help
64 --with-included-gettext use the GNU gettext library included here"
65 ac_help="$ac_help
66 --with-catgets use catgets functions if available"
67 ac_help="$ac_help
68 --disable-win32-registry
69 disable lookup of installation paths in the
70 Registry on Windows hosts
71 --enable-win32-registry enable registry lookup (default)
72 --enable-win32-registry=KEY
73 use KEY instead of GCC version as the last portion
74 of the registry key"
75 ac_help="$ac_help
76 --with-gc={simple,page} choose the garbage collection mechanism to use
77 with the compiler"
78 ac_help="$ac_help
79 --with-system-zlib use installed libz"
80 ac_help="$ac_help
81 --enable-maintainer-mode
82 enable make rules and dependencies not useful
83 (and sometimes confusing) to the casual installer"
84 ac_help="$ac_help
85 --enable-sjlj-exceptions
86 arrange to use setjmp/longjmp exception handling"
87 ac_help="$ac_help
88 --enable-version-specific-runtime-libs
89 specify that runtime libraries should be
90 installed in a compiler-specific directory"
91 ac_help="$ac_help
92 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
94 # Initialize some variables set by options.
95 # The variables have the same names as the options, with
96 # dashes changed to underlines.
97 build=NONE
98 cache_file=./config.cache
99 exec_prefix=NONE
100 host=NONE
101 no_create=
102 nonopt=NONE
103 no_recursion=
104 prefix=NONE
105 program_prefix=NONE
106 program_suffix=NONE
107 program_transform_name=s,x,x,
108 silent=
109 site=
110 srcdir=
111 target=NONE
112 verbose=
113 x_includes=NONE
114 x_libraries=NONE
115 bindir='${exec_prefix}/bin'
116 sbindir='${exec_prefix}/sbin'
117 libexecdir='${exec_prefix}/libexec'
118 datadir='${prefix}/share'
119 sysconfdir='${prefix}/etc'
120 sharedstatedir='${prefix}/com'
121 localstatedir='${prefix}/var'
122 libdir='${exec_prefix}/lib'
123 includedir='${prefix}/include'
124 oldincludedir='/usr/include'
125 infodir='${prefix}/info'
126 mandir='${prefix}/man'
128 # Initialize some other variables.
129 subdirs=
130 MFLAGS= MAKEFLAGS=
131 SHELL=${CONFIG_SHELL-/bin/sh}
132 # Maximum number of lines to put in a shell here document.
133 ac_max_here_lines=12
135 ac_prev=
136 for ac_option
139 # If the previous option needs an argument, assign it.
140 if test -n "$ac_prev"; then
141 eval "$ac_prev=\$ac_option"
142 ac_prev=
143 continue
146 case "$ac_option" in
147 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
148 *) ac_optarg= ;;
149 esac
151 # Accept the important Cygnus configure options, so we can diagnose typos.
153 case "$ac_option" in
155 -bindir | --bindir | --bindi | --bind | --bin | --bi)
156 ac_prev=bindir ;;
157 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
158 bindir="$ac_optarg" ;;
160 -build | --build | --buil | --bui | --bu)
161 ac_prev=build ;;
162 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
163 build="$ac_optarg" ;;
165 -cache-file | --cache-file | --cache-fil | --cache-fi \
166 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
167 ac_prev=cache_file ;;
168 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
169 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
170 cache_file="$ac_optarg" ;;
172 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
173 ac_prev=datadir ;;
174 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
175 | --da=*)
176 datadir="$ac_optarg" ;;
178 -disable-* | --disable-*)
179 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
180 # Reject names that are not valid shell variable names.
181 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
182 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
185 eval "enable_${ac_feature}=no" ;;
187 -enable-* | --enable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 case "$ac_option" in
195 *=*) ;;
196 *) ac_optarg=yes ;;
197 esac
198 eval "enable_${ac_feature}='$ac_optarg'" ;;
200 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
201 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
202 | --exec | --exe | --ex)
203 ac_prev=exec_prefix ;;
204 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
205 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
206 | --exec=* | --exe=* | --ex=*)
207 exec_prefix="$ac_optarg" ;;
209 -gas | --gas | --ga | --g)
210 # Obsolete; use --with-gas.
211 with_gas=yes ;;
213 -help | --help | --hel | --he)
214 # Omit some internal or obsolete options to make the list less imposing.
215 # This message is too long to be a string in the A/UX 3.1 sh.
216 cat << EOF
217 Usage: configure [options] [host]
218 Options: [defaults in brackets after descriptions]
219 Configuration:
220 --cache-file=FILE cache test results in FILE
221 --help print this message
222 --no-create do not create output files
223 --quiet, --silent do not print \`checking...' messages
224 --version print the version of autoconf that created configure
225 Directory and file names:
226 --prefix=PREFIX install architecture-independent files in PREFIX
227 [$ac_default_prefix]
228 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
229 [same as prefix]
230 --bindir=DIR user executables in DIR [EPREFIX/bin]
231 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
232 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
233 --datadir=DIR read-only architecture-independent data in DIR
234 [PREFIX/share]
235 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
236 --sharedstatedir=DIR modifiable architecture-independent data in DIR
237 [PREFIX/com]
238 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
239 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
240 --includedir=DIR C header files in DIR [PREFIX/include]
241 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
242 --infodir=DIR info documentation in DIR [PREFIX/info]
243 --mandir=DIR man documentation in DIR [PREFIX/man]
244 --srcdir=DIR find the sources in DIR [configure dir or ..]
245 --program-prefix=PREFIX prepend PREFIX to installed program names
246 --program-suffix=SUFFIX append SUFFIX to installed program names
247 --program-transform-name=PROGRAM
248 run sed PROGRAM on installed program names
250 cat << EOF
251 Host type:
252 --build=BUILD configure for building on BUILD [BUILD=HOST]
253 --host=HOST configure for HOST [guessed]
254 --target=TARGET configure for TARGET [TARGET=HOST]
255 Features and packages:
256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
258 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
259 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
260 --x-includes=DIR X include files are in DIR
261 --x-libraries=DIR X library files are in DIR
263 if test -n "$ac_help"; then
264 echo "--enable and --with options recognized:$ac_help"
266 exit 0 ;;
268 -host | --host | --hos | --ho)
269 ac_prev=host ;;
270 -host=* | --host=* | --hos=* | --ho=*)
271 host="$ac_optarg" ;;
273 -includedir | --includedir | --includedi | --included | --include \
274 | --includ | --inclu | --incl | --inc)
275 ac_prev=includedir ;;
276 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
277 | --includ=* | --inclu=* | --incl=* | --inc=*)
278 includedir="$ac_optarg" ;;
280 -infodir | --infodir | --infodi | --infod | --info | --inf)
281 ac_prev=infodir ;;
282 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
283 infodir="$ac_optarg" ;;
285 -libdir | --libdir | --libdi | --libd)
286 ac_prev=libdir ;;
287 -libdir=* | --libdir=* | --libdi=* | --libd=*)
288 libdir="$ac_optarg" ;;
290 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
291 | --libexe | --libex | --libe)
292 ac_prev=libexecdir ;;
293 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
294 | --libexe=* | --libex=* | --libe=*)
295 libexecdir="$ac_optarg" ;;
297 -localstatedir | --localstatedir | --localstatedi | --localstated \
298 | --localstate | --localstat | --localsta | --localst \
299 | --locals | --local | --loca | --loc | --lo)
300 ac_prev=localstatedir ;;
301 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
302 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
303 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
304 localstatedir="$ac_optarg" ;;
306 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
307 ac_prev=mandir ;;
308 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
309 mandir="$ac_optarg" ;;
311 -nfp | --nfp | --nf)
312 # Obsolete; use --without-fp.
313 with_fp=no ;;
315 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
316 | --no-cr | --no-c)
317 no_create=yes ;;
319 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
320 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
321 no_recursion=yes ;;
323 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
324 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
325 | --oldin | --oldi | --old | --ol | --o)
326 ac_prev=oldincludedir ;;
327 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
328 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
329 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
330 oldincludedir="$ac_optarg" ;;
332 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
333 ac_prev=prefix ;;
334 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
335 prefix="$ac_optarg" ;;
337 -program-prefix | --program-prefix | --program-prefi | --program-pref \
338 | --program-pre | --program-pr | --program-p)
339 ac_prev=program_prefix ;;
340 -program-prefix=* | --program-prefix=* | --program-prefi=* \
341 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
342 program_prefix="$ac_optarg" ;;
344 -program-suffix | --program-suffix | --program-suffi | --program-suff \
345 | --program-suf | --program-su | --program-s)
346 ac_prev=program_suffix ;;
347 -program-suffix=* | --program-suffix=* | --program-suffi=* \
348 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
349 program_suffix="$ac_optarg" ;;
351 -program-transform-name | --program-transform-name \
352 | --program-transform-nam | --program-transform-na \
353 | --program-transform-n | --program-transform- \
354 | --program-transform | --program-transfor \
355 | --program-transfo | --program-transf \
356 | --program-trans | --program-tran \
357 | --progr-tra | --program-tr | --program-t)
358 ac_prev=program_transform_name ;;
359 -program-transform-name=* | --program-transform-name=* \
360 | --program-transform-nam=* | --program-transform-na=* \
361 | --program-transform-n=* | --program-transform-=* \
362 | --program-transform=* | --program-transfor=* \
363 | --program-transfo=* | --program-transf=* \
364 | --program-trans=* | --program-tran=* \
365 | --progr-tra=* | --program-tr=* | --program-t=*)
366 program_transform_name="$ac_optarg" ;;
368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
369 | -silent | --silent | --silen | --sile | --sil)
370 silent=yes ;;
372 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
373 ac_prev=sbindir ;;
374 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
375 | --sbi=* | --sb=*)
376 sbindir="$ac_optarg" ;;
378 -sharedstatedir | --sharedstatedir | --sharedstatedi \
379 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
380 | --sharedst | --shareds | --shared | --share | --shar \
381 | --sha | --sh)
382 ac_prev=sharedstatedir ;;
383 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
384 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
385 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
386 | --sha=* | --sh=*)
387 sharedstatedir="$ac_optarg" ;;
389 -site | --site | --sit)
390 ac_prev=site ;;
391 -site=* | --site=* | --sit=*)
392 site="$ac_optarg" ;;
394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
395 ac_prev=srcdir ;;
396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
397 srcdir="$ac_optarg" ;;
399 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
400 | --syscon | --sysco | --sysc | --sys | --sy)
401 ac_prev=sysconfdir ;;
402 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
403 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
404 sysconfdir="$ac_optarg" ;;
406 -target | --target | --targe | --targ | --tar | --ta | --t)
407 ac_prev=target ;;
408 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
409 target="$ac_optarg" ;;
411 -v | -verbose | --verbose | --verbos | --verbo | --verb)
412 verbose=yes ;;
414 -version | --version | --versio | --versi | --vers)
415 echo "configure generated by autoconf version 2.13"
416 exit 0 ;;
418 -with-* | --with-*)
419 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 case "$ac_option" in
426 *=*) ;;
427 *) ac_optarg=yes ;;
428 esac
429 eval "with_${ac_package}='$ac_optarg'" ;;
431 -without-* | --without-*)
432 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 eval "with_${ac_package}=no" ;;
440 --x)
441 # Obsolete; use --with-x.
442 with_x=yes ;;
444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
445 | --x-incl | --x-inc | --x-in | --x-i)
446 ac_prev=x_includes ;;
447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
449 x_includes="$ac_optarg" ;;
451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
453 ac_prev=x_libraries ;;
454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
456 x_libraries="$ac_optarg" ;;
458 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
462 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
463 echo "configure: warning: $ac_option: invalid host type" 1>&2
465 if test "x$nonopt" != xNONE; then
466 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
468 nonopt="$ac_option"
471 esac
472 done
474 if test -n "$ac_prev"; then
475 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
480 # File descriptor usage:
481 # 0 standard input
482 # 1 file creation
483 # 2 errors and warnings
484 # 3 some systems may open it to /dev/tty
485 # 4 used on the Kubota Titan
486 # 6 checking for... messages and results
487 # 5 compiler messages saved in config.log
488 if test "$silent" = yes; then
489 exec 6>/dev/null
490 else
491 exec 6>&1
493 exec 5>./config.log
495 echo "\
496 This file contains any messages produced by compilers while
497 running configure, to aid debugging if configure makes a mistake.
498 " 1>&5
500 # Strip out --no-create and --no-recursion so they do not pile up.
501 # Also quote any args containing shell metacharacters.
502 ac_configure_args=
503 for ac_arg
505 case "$ac_arg" in
506 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
507 | --no-cr | --no-c) ;;
508 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
509 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
510 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
511 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
512 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
513 esac
514 done
516 # NLS nuisances.
517 # Only set these to C if already set. These must not be set unconditionally
518 # because not all systems understand e.g. LANG=C (notably SCO).
519 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
520 # Non-C LC_CTYPE values break the ctype check.
521 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
522 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
523 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
524 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
526 # confdefs.h avoids OS command line length limits that DEFS can exceed.
527 rm -rf conftest* confdefs.h
528 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
529 echo > confdefs.h
531 # A filename unique to this package, relative to the directory that
532 # configure is in, which we can look for to find out if srcdir is correct.
533 ac_unique_file=tree.c
535 # Find the source files, if location was not specified.
536 if test -z "$srcdir"; then
537 ac_srcdir_defaulted=yes
538 # Try the directory containing this script, then its parent.
539 ac_prog=$0
540 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
541 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
542 srcdir=$ac_confdir
543 if test ! -r $srcdir/$ac_unique_file; then
544 srcdir=..
546 else
547 ac_srcdir_defaulted=no
549 if test ! -r $srcdir/$ac_unique_file; then
550 if test "$ac_srcdir_defaulted" = yes; then
551 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
552 else
553 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
556 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
558 # Prefer explicitly selected file to automatically selected ones.
559 if test -z "$CONFIG_SITE"; then
560 if test "x$prefix" != xNONE; then
561 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
562 else
563 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
566 for ac_site_file in $CONFIG_SITE; do
567 if test -r "$ac_site_file"; then
568 echo "loading site script $ac_site_file"
569 . "$ac_site_file"
571 done
573 if test -r "$cache_file"; then
574 echo "loading cache $cache_file"
575 . $cache_file
576 else
577 echo "creating cache $cache_file"
578 > $cache_file
581 ac_ext=c
582 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
583 ac_cpp='$CPP $CPPFLAGS'
584 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
585 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
586 cross_compiling=$ac_cv_prog_cc_cross
588 ac_exeext=
589 ac_objext=o
590 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
591 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
592 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
593 ac_n= ac_c='
594 ' ac_t=' '
595 else
596 ac_n=-n ac_c= ac_t=
598 else
599 ac_n= ac_c='\c' ac_t=
605 remove=rm
606 hard_link=ln
607 symbolic_link='ln -s'
608 copy=cp
610 # Check for bogus environment variables.
611 # Test if LIBRARY_PATH contains the notation for the current directory
612 # since this would lead to problems installing/building glibc.
613 # LIBRARY_PATH contains the current directory if one of the following
614 # is true:
615 # - one of the terminals (":" and ";") is the first or last sign
616 # - two terminals occur directly after each other
617 # - the path contains an element with a dot in it
618 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
619 echo "configure:620: checking LIBRARY_PATH variable" >&5
620 case ${LIBRARY_PATH} in
621 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
622 library_path_setting="contains current directory"
625 library_path_setting="ok"
627 esac
628 echo "$ac_t""$library_path_setting" 1>&6
629 if test "$library_path_setting" != "ok"; then
630 { echo "configure: error:
631 *** LIBRARY_PATH shouldn't contain the current directory when
632 *** building gcc. Please change the environment variable
633 *** and run configure again." 1>&2; exit 1; }
636 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
637 # since this would lead to problems installing/building glibc.
638 # GCC_EXEC_PREFIX contains the current directory if one of the following
639 # is true:
640 # - one of the terminals (":" and ";") is the first or last sign
641 # - two terminals occur directly after each other
642 # - the path contains an element with a dot in it
643 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
644 echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5
645 case ${GCC_EXEC_PREFIX} in
646 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
647 gcc_exec_prefix_setting="contains current directory"
650 gcc_exec_prefix_setting="ok"
652 esac
653 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
654 if test "$gcc_exec_prefix_setting" != "ok"; then
655 { echo "configure: error:
656 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
657 *** building gcc. Please change the environment variable
658 *** and run configure again." 1>&2; exit 1; }
661 # Check for additional parameters
663 # With GNU ld
664 # Check whether --with-gnu-ld or --without-gnu-ld was given.
665 if test "${with_gnu_ld+set}" = set; then
666 withval="$with_gnu_ld"
667 gnu_ld_flag="$with_gnu_ld"
668 else
669 gnu_ld_flag=no
673 # With pre-defined ld
674 # Check whether --with-ld or --without-ld was given.
675 if test "${with_ld+set}" = set; then
676 withval="$with_ld"
677 DEFAULT_LINKER="$with_ld"
680 if test x"${DEFAULT_LINKER+set}" = x"set"; then
681 if test ! -x "$DEFAULT_LINKER"; then
682 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
683 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
684 gnu_ld_flag=yes
686 cat >> confdefs.h <<EOF
687 #define DEFAULT_LINKER "$DEFAULT_LINKER"
692 # With GNU as
693 # Check whether --with-gnu-as or --without-gnu-as was given.
694 if test "${with_gnu_as+set}" = set; then
695 withval="$with_gnu_as"
696 gas_flag="$with_gnu_as"
697 else
698 gas_flag=no
702 # Check whether --with-as or --without-as was given.
703 if test "${with_as+set}" = set; then
704 withval="$with_as"
705 DEFAULT_ASSEMBLER="$with_as"
708 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
709 if test ! -x "$DEFAULT_ASSEMBLER"; then
710 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
711 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
712 gas_flag=yes
714 cat >> confdefs.h <<EOF
715 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
720 # With stabs
721 # Check whether --with-stabs or --without-stabs was given.
722 if test "${with_stabs+set}" = set; then
723 withval="$with_stabs"
724 stabs="$with_stabs"
725 else
726 stabs=no
730 # With ELF
731 # Check whether --with-elf or --without-elf was given.
732 if test "${with_elf+set}" = set; then
733 withval="$with_elf"
734 elf="$with_elf"
735 else
736 elf=no
740 # Specify the local prefix
741 local_prefix=
742 # Check whether --with-local-prefix or --without-local-prefix was given.
743 if test "${with_local_prefix+set}" = set; then
744 withval="$with_local_prefix"
745 case "${withval}" in
746 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
747 no) ;;
748 *) local_prefix=$with_local_prefix ;;
749 esac
753 # Default local prefix if it is empty
754 if test x$local_prefix = x; then
755 local_prefix=/usr/local
758 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
759 # passed in by the toplevel make and thus we'd get different behavior
760 # depending on where we built the sources.
761 gcc_gxx_include_dir=
762 # Specify the g++ header file directory
763 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
764 if test "${with_gxx_include_dir+set}" = set; then
765 withval="$with_gxx_include_dir"
766 case "${withval}" in
767 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
768 no) ;;
769 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
770 esac
774 if test x${gcc_gxx_include_dir} = x; then
775 if test x${enable_version_specific_runtime_libs} = xyes; then
776 gcc_gxx_include_dir='${libsubdir}/include/g++'
777 else
778 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
779 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
783 # Determine whether or not multilibs are enabled.
784 # Check whether --enable-multilib or --disable-multilib was given.
785 if test "${enable_multilib+set}" = set; then
786 enableval="$enable_multilib"
788 else
789 enable_multilib=yes
794 # Enable expensive internal checks
795 # Check whether --enable-checking or --disable-checking was given.
796 if test "${enable_checking+set}" = set; then
797 enableval="$enable_checking"
798 ac_checking=
799 ac_tree_checking=
800 ac_rtl_checking=
801 ac_gc_checking=
802 ac_gc_always_collect=
803 case "${enableval}" in
804 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
805 no) ;;
806 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
807 set fnord $enableval; shift
808 IFS="$ac_save_IFS"
809 for check
811 case $check in
812 misc) ac_checking=1 ;;
813 tree) ac_tree_checking=1 ;;
814 rtl) ac_rtl_checking=1 ;;
815 gc) ac_gc_checking=1 ;;
816 gcac) ac_gc_always_collect=1 ;;
817 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
818 esac
819 done
821 esac
825 if test x$ac_checking != x ; then
826 cat >> confdefs.h <<\EOF
827 #define ENABLE_CHECKING 1
831 if test x$ac_tree_checking != x ; then
832 cat >> confdefs.h <<\EOF
833 #define ENABLE_TREE_CHECKING 1
837 if test x$ac_rtl_checking != x ; then
838 cat >> confdefs.h <<\EOF
839 #define ENABLE_RTL_CHECKING 1
843 if test x$ac_gc_checking != x ; then
844 cat >> confdefs.h <<\EOF
845 #define ENABLE_GC_CHECKING 1
849 if test x$ac_gc_always_collect != x ; then
850 cat >> confdefs.h <<\EOF
851 #define ENABLE_GC_ALWAYS_COLLECT 1
857 # Check whether --enable-cpp or --disable-cpp was given.
858 if test "${enable_cpp+set}" = set; then
859 enableval="$enable_cpp"
861 else
862 enable_cpp=yes
866 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
867 if test "${with_cpp_install_dir+set}" = set; then
868 withval="$with_cpp_install_dir"
869 if test x$withval = xyes; then
870 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
871 elif test x$withval != xno; then
872 cpp_install_dir=$withval
877 # Enable Multibyte Characters for C/C++
878 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
879 if test "${enable_c_mbchar+set}" = set; then
880 enableval="$enable_c_mbchar"
881 if test x$enable_c_mbchar != xno; then
882 cat >> confdefs.h <<\EOF
883 #define MULTIBYTE_CHARS 1
890 # Enable threads
891 # Pass with no value to take the default
892 # Pass with a value to specify a thread package
893 # Check whether --enable-threads or --disable-threads was given.
894 if test "${enable_threads+set}" = set; then
895 enableval="$enable_threads"
897 else
898 enable_threads=''
902 enable_threads_flag=$enable_threads
903 # Check if a valid thread package
904 case x${enable_threads_flag} in
905 x | xno)
906 # No threads
907 target_thread_file='single'
909 xyes)
910 # default
911 target_thread_file=''
913 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
914 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
915 target_thread_file=$enable_threads_flag
918 echo "$enable_threads is an unknown thread package" 1>&2
919 exit 1
921 esac
923 # Check whether --enable-objc-gc or --disable-objc-gc was given.
924 if test "${enable_objc_gc+set}" = set; then
925 enableval="$enable_objc_gc"
926 if test x$enable_objc_gc = xno; then
927 objc_boehm_gc=''
928 else
929 objc_boehm_gc=1
931 else
932 objc_boehm_gc=''
936 # Check whether --with-dwarf2 or --without-dwarf2 was given.
937 if test "${with_dwarf2+set}" = set; then
938 withval="$with_dwarf2"
939 dwarf2="$with_dwarf2"
940 else
941 dwarf2=no
945 # Check whether --enable-shared or --disable-shared was given.
946 if test "${enable_shared+set}" = set; then
947 enableval="$enable_shared"
949 case $enable_shared in
950 yes | no) ;;
952 enable_shared=no
953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
954 for pkg in $enableval; do
955 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
956 enable_shared=yes
958 done
959 IFS="$ac_save_ifs"
961 esac
963 else
964 enable_shared=yes
969 # Determine the host, build, and target systems
970 ac_aux_dir=
971 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
972 if test -f $ac_dir/install-sh; then
973 ac_aux_dir=$ac_dir
974 ac_install_sh="$ac_aux_dir/install-sh -c"
975 break
976 elif test -f $ac_dir/install.sh; then
977 ac_aux_dir=$ac_dir
978 ac_install_sh="$ac_aux_dir/install.sh -c"
979 break
981 done
982 if test -z "$ac_aux_dir"; then
983 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
985 ac_config_guess=$ac_aux_dir/config.guess
986 ac_config_sub=$ac_aux_dir/config.sub
987 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
990 # Do some error checking and defaulting for the host and target type.
991 # The inputs are:
992 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
994 # The rules are:
995 # 1. You are not allowed to specify --host, --target, and nonopt at the
996 # same time.
997 # 2. Host defaults to nonopt.
998 # 3. If nonopt is not specified, then host defaults to the current host,
999 # as determined by config.guess.
1000 # 4. Target and build default to nonopt.
1001 # 5. If nonopt is not specified, then target and build default to host.
1003 # The aliases save the names the user supplied, while $host etc.
1004 # will get canonicalized.
1005 case $host---$target---$nonopt in
1006 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1007 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1008 esac
1011 # Make sure we can run config.sub.
1012 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1013 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1016 echo $ac_n "checking host system type""... $ac_c" 1>&6
1017 echo "configure:1018: checking host system type" >&5
1019 host_alias=$host
1020 case "$host_alias" in
1021 NONE)
1022 case $nonopt in
1023 NONE)
1024 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1025 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1026 fi ;;
1027 *) host_alias=$nonopt ;;
1028 esac ;;
1029 esac
1031 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1032 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1033 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1034 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1035 echo "$ac_t""$host" 1>&6
1037 echo $ac_n "checking target system type""... $ac_c" 1>&6
1038 echo "configure:1039: checking target system type" >&5
1040 target_alias=$target
1041 case "$target_alias" in
1042 NONE)
1043 case $nonopt in
1044 NONE) target_alias=$host_alias ;;
1045 *) target_alias=$nonopt ;;
1046 esac ;;
1047 esac
1049 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1050 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1051 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1052 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1053 echo "$ac_t""$target" 1>&6
1055 echo $ac_n "checking build system type""... $ac_c" 1>&6
1056 echo "configure:1057: checking build system type" >&5
1058 build_alias=$build
1059 case "$build_alias" in
1060 NONE)
1061 case $nonopt in
1062 NONE) build_alias=$host_alias ;;
1063 *) build_alias=$nonopt ;;
1064 esac ;;
1065 esac
1067 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1068 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1071 echo "$ac_t""$build" 1>&6
1073 test "$host_alias" != "$target_alias" &&
1074 test "$program_prefix$program_suffix$program_transform_name" = \
1075 NONENONEs,x,x, &&
1076 program_prefix=${target_alias}-
1079 # Find the native compiler
1080 # Extract the first word of "gcc", so it can be a program name with args.
1081 set dummy gcc; ac_word=$2
1082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1083 echo "configure:1084: checking for $ac_word" >&5
1084 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1085 echo $ac_n "(cached) $ac_c" 1>&6
1086 else
1087 if test -n "$CC"; then
1088 ac_cv_prog_CC="$CC" # Let the user override the test.
1089 else
1090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1091 ac_dummy="$PATH"
1092 for ac_dir in $ac_dummy; do
1093 test -z "$ac_dir" && ac_dir=.
1094 if test -f $ac_dir/$ac_word; then
1095 ac_cv_prog_CC="gcc"
1096 break
1098 done
1099 IFS="$ac_save_ifs"
1102 CC="$ac_cv_prog_CC"
1103 if test -n "$CC"; then
1104 echo "$ac_t""$CC" 1>&6
1105 else
1106 echo "$ac_t""no" 1>&6
1109 if test -z "$CC"; then
1110 # Extract the first word of "cc", so it can be a program name with args.
1111 set dummy cc; ac_word=$2
1112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1113 echo "configure:1114: checking for $ac_word" >&5
1114 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117 if test -n "$CC"; then
1118 ac_cv_prog_CC="$CC" # Let the user override the test.
1119 else
1120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1121 ac_prog_rejected=no
1122 ac_dummy="$PATH"
1123 for ac_dir in $ac_dummy; do
1124 test -z "$ac_dir" && ac_dir=.
1125 if test -f $ac_dir/$ac_word; then
1126 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1127 ac_prog_rejected=yes
1128 continue
1130 ac_cv_prog_CC="cc"
1131 break
1133 done
1134 IFS="$ac_save_ifs"
1135 if test $ac_prog_rejected = yes; then
1136 # We found a bogon in the path, so make sure we never use it.
1137 set dummy $ac_cv_prog_CC
1138 shift
1139 if test $# -gt 0; then
1140 # We chose a different compiler from the bogus one.
1141 # However, it has the same basename, so the bogon will be chosen
1142 # first if we set CC to just the basename; use the full file name.
1143 shift
1144 set dummy "$ac_dir/$ac_word" "$@"
1145 shift
1146 ac_cv_prog_CC="$@"
1151 CC="$ac_cv_prog_CC"
1152 if test -n "$CC"; then
1153 echo "$ac_t""$CC" 1>&6
1154 else
1155 echo "$ac_t""no" 1>&6
1158 if test -z "$CC"; then
1159 case "`uname -s`" in
1160 *win32* | *WIN32*)
1161 # Extract the first word of "cl", so it can be a program name with args.
1162 set dummy cl; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168 if test -n "$CC"; then
1169 ac_cv_prog_CC="$CC" # Let the user override the test.
1170 else
1171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1172 ac_dummy="$PATH"
1173 for ac_dir in $ac_dummy; do
1174 test -z "$ac_dir" && ac_dir=.
1175 if test -f $ac_dir/$ac_word; then
1176 ac_cv_prog_CC="cl"
1177 break
1179 done
1180 IFS="$ac_save_ifs"
1183 CC="$ac_cv_prog_CC"
1184 if test -n "$CC"; then
1185 echo "$ac_t""$CC" 1>&6
1186 else
1187 echo "$ac_t""no" 1>&6
1190 esac
1192 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1195 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1198 ac_ext=c
1199 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1200 ac_cpp='$CPP $CPPFLAGS'
1201 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1202 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1203 cross_compiling=$ac_cv_prog_cc_cross
1205 cat > conftest.$ac_ext << EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1210 main(){return(0);}
1212 if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1213 ac_cv_prog_cc_works=yes
1214 # If we can't run a trivial program, we are probably using a cross compiler.
1215 if (./conftest; exit) 2>/dev/null; then
1216 ac_cv_prog_cc_cross=no
1217 else
1218 ac_cv_prog_cc_cross=yes
1220 else
1221 echo "configure: failed program was:" >&5
1222 cat conftest.$ac_ext >&5
1223 ac_cv_prog_cc_works=no
1225 rm -fr conftest*
1226 ac_ext=c
1227 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1228 ac_cpp='$CPP $CPPFLAGS'
1229 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1230 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1231 cross_compiling=$ac_cv_prog_cc_cross
1233 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1234 if test $ac_cv_prog_cc_works = no; then
1235 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1237 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1238 echo "configure:1239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1239 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1240 cross_compiling=$ac_cv_prog_cc_cross
1242 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1243 echo "configure:1244: checking whether we are using GNU C" >&5
1244 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247 cat > conftest.c <<EOF
1248 #ifdef __GNUC__
1249 yes;
1250 #endif
1252 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1253 ac_cv_prog_gcc=yes
1254 else
1255 ac_cv_prog_gcc=no
1259 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1261 if test $ac_cv_prog_gcc = yes; then
1262 GCC=yes
1263 else
1264 GCC=
1267 ac_test_CFLAGS="${CFLAGS+set}"
1268 ac_save_CFLAGS="$CFLAGS"
1269 CFLAGS=
1270 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1271 echo "configure:1272: checking whether ${CC-cc} accepts -g" >&5
1272 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1273 echo $ac_n "(cached) $ac_c" 1>&6
1274 else
1275 echo 'void f(){}' > conftest.c
1276 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1277 ac_cv_prog_cc_g=yes
1278 else
1279 ac_cv_prog_cc_g=no
1281 rm -f conftest*
1285 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1286 if test "$ac_test_CFLAGS" = set; then
1287 CFLAGS="$ac_save_CFLAGS"
1288 elif test $ac_cv_prog_cc_g = yes; then
1289 if test "$GCC" = yes; then
1290 CFLAGS="-g -O2"
1291 else
1292 CFLAGS="-g"
1294 else
1295 if test "$GCC" = yes; then
1296 CFLAGS="-O2"
1297 else
1298 CFLAGS=
1302 if test "x$CC" != xcc; then
1303 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1304 echo "configure:1305: checking whether $CC and cc understand -c and -o together" >&5
1305 else
1306 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1307 echo "configure:1308: checking whether cc understands -c and -o together" >&5
1309 set dummy $CC; ac_cc="`echo $2 |
1310 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1311 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314 echo 'foo(){}' > conftest.c
1315 # Make sure it works both with $CC and with simple cc.
1316 # We do the test twice because some compilers refuse to overwrite an
1317 # existing .o file with -o, though they will create one.
1318 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1319 if { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1320 test -f conftest.o && { (eval echo configure:1321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1321 then
1322 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1323 if test "x$CC" != xcc; then
1324 # Test first that cc exists at all.
1325 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1326 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1327 if { (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1328 test -f conftest.o && { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1329 then
1330 # cc works too.
1332 else
1333 # cc exists but doesn't like -o.
1334 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1338 else
1339 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1341 rm -f conftest*
1344 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1345 echo "$ac_t""yes" 1>&6
1346 else
1347 echo "$ac_t""no" 1>&6
1348 cat >> confdefs.h <<\EOF
1349 #define NO_MINUS_C_MINUS_O 1
1354 # autoconf is lame and doesn't give us any substitution variable for this.
1355 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1356 NO_MINUS_C_MINUS_O=yes
1357 else
1358 OUTPUT_OPTION='-o $@'
1363 echo $ac_n "checking for long double""... $ac_c" 1>&6
1364 echo "configure:1365: checking for long double" >&5
1365 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368 if test "$GCC" = yes; then
1369 gcc_cv_c_long_double=yes
1370 else
1371 cat > conftest.$ac_ext <<EOF
1372 #line 1373 "configure"
1373 #include "confdefs.h"
1375 int main() {
1376 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1377 long double foo = 0.0;
1378 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1379 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1380 ; return 0; }
1382 if { (eval echo configure:1383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1383 rm -rf conftest*
1384 gcc_cv_c_long_double=yes
1385 else
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1388 rm -rf conftest*
1389 gcc_cv_c_long_double=no
1391 rm -f conftest*
1395 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1396 if test $gcc_cv_c_long_double = yes; then
1397 cat >> confdefs.h <<\EOF
1398 #define HAVE_LONG_DOUBLE 1
1403 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1404 echo "configure:1405: checking for built-in _Bool" >&5
1405 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407 else
1408 cat > conftest.$ac_ext <<EOF
1409 #line 1410 "configure"
1410 #include "confdefs.h"
1412 int main() {
1413 _Bool foo;
1414 ; return 0; }
1416 if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1417 rm -rf conftest*
1418 gcc_cv_c__bool=yes
1419 else
1420 echo "configure: failed program was:" >&5
1421 cat conftest.$ac_ext >&5
1422 rm -rf conftest*
1423 gcc_cv_c__bool=no
1425 rm -f conftest*
1429 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1430 if test $gcc_cv_c__bool = yes; then
1431 cat >> confdefs.h <<\EOF
1432 #define HAVE__BOOL 1
1438 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1439 echo "configure:1440: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1440 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1441 echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443 save_CFLAGS="$CFLAGS"
1444 CFLAGS="-Wno-long-long"
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1449 int main() {
1451 ; return 0; }
1453 if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1454 rm -rf conftest*
1455 ac_cv_prog_cc_no_long_long=yes
1456 else
1457 echo "configure: failed program was:" >&5
1458 cat conftest.$ac_ext >&5
1459 rm -rf conftest*
1460 ac_cv_prog_cc_no_long_long=no
1462 rm -f conftest*
1463 CFLAGS="$save_CFLAGS"
1466 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1467 strict1_warn=
1468 if test $ac_cv_prog_cc_no_long_long = yes; then
1469 strict1_warn="-pedantic -Wno-long-long"
1473 # If the native compiler is GCC, we can enable warnings even in stage1.
1474 # That's useful for people building cross-compilers, or just running a
1475 # quick `make'.
1476 warn_cflags=
1477 if test "x$GCC" = "xyes"; then
1478 warn_cflags='$(GCC_WARN_CFLAGS)'
1482 # Stage specific cflags for build.
1483 stage1_cflags=
1484 case $build in
1485 vax-*-*)
1486 if test x$GCC = xyes
1487 then
1488 stage1_cflags="-Wa,-J"
1489 else
1490 stage1_cflags="-J"
1493 esac
1496 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1497 echo "configure:1498: checking whether ${MAKE-make} sets \${MAKE}" >&5
1498 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1499 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1500 echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502 cat > conftestmake <<\EOF
1503 all:
1504 @echo 'ac_maketemp="${MAKE}"'
1506 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1507 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1508 if test -n "$ac_maketemp"; then
1509 eval ac_cv_prog_make_${ac_make}_set=yes
1510 else
1511 eval ac_cv_prog_make_${ac_make}_set=no
1513 rm -f conftestmake
1515 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1516 echo "$ac_t""yes" 1>&6
1517 SET_MAKE=
1518 else
1519 echo "$ac_t""no" 1>&6
1520 SET_MAKE="MAKE=${MAKE-make}"
1524 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1525 echo "configure:1526: checking whether a default assembler was specified" >&5
1526 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1527 if test x"$gas_flag" = x"no"; then
1528 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1529 else
1530 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1532 else
1533 echo "$ac_t""no" 1>&6
1536 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1537 echo "configure:1538: checking whether a default linker was specified" >&5
1538 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1539 if test x"$gnu_ld_flag" = x"no"; then
1540 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1541 else
1542 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1544 else
1545 echo "$ac_t""no" 1>&6
1548 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
1549 echo "configure:1550: checking for GNU C library" >&5
1550 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552 else
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556 #include <features.h>
1557 int main() {
1559 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
1560 #error Not a GNU C library system
1561 #endif
1562 ; return 0; }
1564 if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1565 rm -rf conftest*
1566 gcc_cv_glibc=yes
1567 else
1568 echo "configure: failed program was:" >&5
1569 cat conftest.$ac_ext >&5
1570 rm -rf conftest*
1571 gcc_cv_glibc=no
1573 rm -f conftest*
1576 echo "$ac_t""$gcc_cv_glibc" 1>&6
1577 if test $gcc_cv_glibc = yes; then
1578 cat >> confdefs.h <<\EOF
1579 #define _GNU_SOURCE 1
1584 echo $ac_n "checking for inline""... $ac_c" 1>&6
1585 echo "configure:1586: checking for inline" >&5
1586 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1587 echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589 ac_cv_c_inline=no
1590 for ac_kw in inline __inline__ __inline; do
1591 cat > conftest.$ac_ext <<EOF
1592 #line 1593 "configure"
1593 #include "confdefs.h"
1595 int main() {
1596 } $ac_kw foo() {
1597 ; return 0; }
1599 if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1600 rm -rf conftest*
1601 ac_cv_c_inline=$ac_kw; break
1602 else
1603 echo "configure: failed program was:" >&5
1604 cat conftest.$ac_ext >&5
1606 rm -f conftest*
1607 done
1611 echo "$ac_t""$ac_cv_c_inline" 1>&6
1612 case "$ac_cv_c_inline" in
1613 inline | yes) ;;
1614 no) cat >> confdefs.h <<\EOF
1615 #define inline
1618 *) cat >> confdefs.h <<EOF
1619 #define inline $ac_cv_c_inline
1622 esac
1625 # Find some useful tools
1626 for ac_prog in mawk gawk nawk awk
1628 # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1631 echo "configure:1632: checking for $ac_word" >&5
1632 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634 else
1635 if test -n "$AWK"; then
1636 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1637 else
1638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1639 ac_dummy="$PATH"
1640 for ac_dir in $ac_dummy; do
1641 test -z "$ac_dir" && ac_dir=.
1642 if test -f $ac_dir/$ac_word; then
1643 ac_cv_prog_AWK="$ac_prog"
1644 break
1646 done
1647 IFS="$ac_save_ifs"
1650 AWK="$ac_cv_prog_AWK"
1651 if test -n "$AWK"; then
1652 echo "$ac_t""$AWK" 1>&6
1653 else
1654 echo "$ac_t""no" 1>&6
1657 test -n "$AWK" && break
1658 done
1660 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1661 echo "configure:1662: checking whether ln works" >&5
1662 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1663 echo $ac_n "(cached) $ac_c" 1>&6
1664 else
1665 rm -f conftestdata_t
1666 echo >conftestdata_f
1667 if ln conftestdata_f conftestdata_t 2>/dev/null
1668 then
1669 gcc_cv_prog_LN="ln"
1670 else
1671 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1672 then
1673 gcc_cv_prog_LN="ln -s"
1674 else
1675 gcc_cv_prog_LN=cp
1678 rm -f conftestdata_f conftestdata_t
1681 LN="$gcc_cv_prog_LN"
1682 if test "$gcc_cv_prog_LN" = "ln"; then
1683 echo "$ac_t""yes" 1>&6
1684 else
1685 if test "$gcc_cv_prog_LN" = "ln -s"; then
1686 echo "$ac_t""no, using ln -s" 1>&6
1687 else
1688 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1692 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1693 echo "configure:1694: checking whether ln -s works" >&5
1694 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1695 echo $ac_n "(cached) $ac_c" 1>&6
1696 else
1697 rm -f conftestdata_t
1698 echo >conftestdata_f
1699 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1700 then
1701 gcc_cv_prog_LN_S="ln -s"
1702 else
1703 if ln conftestdata_f conftestdata_t 2>/dev/null
1704 then
1705 gcc_cv_prog_LN_S=ln
1706 else
1707 gcc_cv_prog_LN_S=cp
1710 rm -f conftestdata_f conftestdata_t
1713 LN_S="$gcc_cv_prog_LN_S"
1714 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1715 echo "$ac_t""yes" 1>&6
1716 else
1717 if test "$gcc_cv_prog_LN_S" = "ln"; then
1718 echo "$ac_t""no, using ln" 1>&6
1719 else
1720 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1724 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1725 echo "configure:1726: checking for volatile" >&5
1726 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1728 else
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1733 int main() {
1734 volatile int foo;
1735 ; return 0; }
1737 if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1738 rm -rf conftest*
1739 gcc_cv_c_volatile=yes
1740 else
1741 echo "configure: failed program was:" >&5
1742 cat conftest.$ac_ext >&5
1743 rm -rf conftest*
1744 gcc_cv_c_volatile=no
1746 rm -f conftest*
1749 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1750 if test $gcc_cv_c_volatile = yes ; then
1751 cat >> confdefs.h <<\EOF
1752 #define HAVE_VOLATILE 1
1757 # Extract the first word of "ranlib", so it can be a program name with args.
1758 set dummy ranlib; ac_word=$2
1759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1760 echo "configure:1761: checking for $ac_word" >&5
1761 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1762 echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764 if test -n "$RANLIB"; then
1765 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1766 else
1767 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1768 ac_dummy="$PATH"
1769 for ac_dir in $ac_dummy; do
1770 test -z "$ac_dir" && ac_dir=.
1771 if test -f $ac_dir/$ac_word; then
1772 ac_cv_prog_RANLIB="ranlib"
1773 break
1775 done
1776 IFS="$ac_save_ifs"
1777 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1780 RANLIB="$ac_cv_prog_RANLIB"
1781 if test -n "$RANLIB"; then
1782 echo "$ac_t""$RANLIB" 1>&6
1783 else
1784 echo "$ac_t""no" 1>&6
1787 # Find a good install program. We prefer a C program (faster),
1788 # so one script is as good as another. But avoid the broken or
1789 # incompatible versions:
1790 # SysV /etc/install, /usr/sbin/install
1791 # SunOS /usr/etc/install
1792 # IRIX /sbin/install
1793 # AIX /bin/install
1794 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1795 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1796 # ./install, which can be erroneously created by make from ./install.sh.
1797 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1798 echo "configure:1799: checking for a BSD compatible install" >&5
1799 if test -z "$INSTALL"; then
1800 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1801 echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1804 for ac_dir in $PATH; do
1805 # Account for people who put trailing slashes in PATH elements.
1806 case "$ac_dir/" in
1807 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1809 # OSF1 and SCO ODT 3.0 have their own names for install.
1810 for ac_prog in ginstall scoinst install; do
1811 if test -f $ac_dir/$ac_prog; then
1812 if test $ac_prog = install &&
1813 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1814 # AIX install. It has an incompatible calling convention.
1815 # OSF/1 installbsd also uses dspmsg, but is usable.
1817 else
1818 ac_cv_path_install="$ac_dir/$ac_prog -c"
1819 break 2
1822 done
1824 esac
1825 done
1826 IFS="$ac_save_IFS"
1829 if test "${ac_cv_path_install+set}" = set; then
1830 INSTALL="$ac_cv_path_install"
1831 else
1832 # As a last resort, use the slow shell script. We don't cache a
1833 # path for INSTALL within a source directory, because that will
1834 # break other packages using the cache if that directory is
1835 # removed, or if the path is relative.
1836 INSTALL="$ac_install_sh"
1839 echo "$ac_t""$INSTALL" 1>&6
1841 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1842 # It thinks the first close brace ends the variable substitution.
1843 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1845 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1848 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1849 echo "configure:1850: checking how to run the C preprocessor" >&5
1850 # On Suns, sometimes $CPP names a directory.
1851 if test -n "$CPP" && test -d "$CPP"; then
1852 CPP=
1854 if test -z "$CPP"; then
1855 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858 # This must be in double quotes, not single quotes, because CPP may get
1859 # substituted into the Makefile and "${CC-cc}" will confuse make.
1860 CPP="${CC-cc} -E"
1861 # On the NeXT, cc -E runs the code through the compiler's parser,
1862 # not just through cpp.
1863 cat > conftest.$ac_ext <<EOF
1864 #line 1865 "configure"
1865 #include "confdefs.h"
1866 #include <assert.h>
1867 Syntax Error
1869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1870 { (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1872 if test -z "$ac_err"; then
1874 else
1875 echo "$ac_err" >&5
1876 echo "configure: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 rm -rf conftest*
1879 CPP="${CC-cc} -E -traditional-cpp"
1880 cat > conftest.$ac_ext <<EOF
1881 #line 1882 "configure"
1882 #include "confdefs.h"
1883 #include <assert.h>
1884 Syntax Error
1886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1887 { (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1889 if test -z "$ac_err"; then
1891 else
1892 echo "$ac_err" >&5
1893 echo "configure: failed program was:" >&5
1894 cat conftest.$ac_ext >&5
1895 rm -rf conftest*
1896 CPP="${CC-cc} -nologo -E"
1897 cat > conftest.$ac_ext <<EOF
1898 #line 1899 "configure"
1899 #include "confdefs.h"
1900 #include <assert.h>
1901 Syntax Error
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
1908 else
1909 echo "$ac_err" >&5
1910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 rm -rf conftest*
1913 CPP=/lib/cpp
1915 rm -f conftest*
1917 rm -f conftest*
1919 rm -f conftest*
1920 ac_cv_prog_CPP="$CPP"
1922 CPP="$ac_cv_prog_CPP"
1923 else
1924 ac_cv_prog_CPP="$CPP"
1926 echo "$ac_t""$CPP" 1>&6
1928 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1929 echo "configure:1930: checking for ANSI C header files" >&5
1930 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932 else
1933 cat > conftest.$ac_ext <<EOF
1934 #line 1935 "configure"
1935 #include "confdefs.h"
1936 #include <stdlib.h>
1937 #include <stdarg.h>
1938 #include <string.h>
1939 #include <float.h>
1941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1942 { (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1944 if test -z "$ac_err"; then
1945 rm -rf conftest*
1946 ac_cv_header_stdc=yes
1947 else
1948 echo "$ac_err" >&5
1949 echo "configure: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 rm -rf conftest*
1952 ac_cv_header_stdc=no
1954 rm -f conftest*
1956 if test $ac_cv_header_stdc = yes; then
1957 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1958 cat > conftest.$ac_ext <<EOF
1959 #line 1960 "configure"
1960 #include "confdefs.h"
1961 #include <string.h>
1963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1964 egrep "memchr" >/dev/null 2>&1; then
1966 else
1967 rm -rf conftest*
1968 ac_cv_header_stdc=no
1970 rm -f conftest*
1974 if test $ac_cv_header_stdc = yes; then
1975 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1976 cat > conftest.$ac_ext <<EOF
1977 #line 1978 "configure"
1978 #include "confdefs.h"
1979 #include <stdlib.h>
1981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1982 egrep "free" >/dev/null 2>&1; then
1984 else
1985 rm -rf conftest*
1986 ac_cv_header_stdc=no
1988 rm -f conftest*
1992 if test $ac_cv_header_stdc = yes; then
1993 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1994 if test "$cross_compiling" = yes; then
1996 else
1997 cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000 #include <ctype.h>
2001 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2002 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2003 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2004 int main () { int i; for (i = 0; i < 256; i++)
2005 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2006 exit (0); }
2009 if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2010 then
2012 else
2013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 rm -fr conftest*
2016 ac_cv_header_stdc=no
2018 rm -fr conftest*
2024 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2025 if test $ac_cv_header_stdc = yes; then
2026 cat >> confdefs.h <<\EOF
2027 #define STDC_HEADERS 1
2032 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2033 echo "configure:2034: checking whether time.h and sys/time.h may both be included" >&5
2034 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2036 else
2037 cat > conftest.$ac_ext <<EOF
2038 #line 2039 "configure"
2039 #include "confdefs.h"
2040 #include <sys/types.h>
2041 #include <sys/time.h>
2042 #include <time.h>
2043 int main() {
2044 struct tm *tp;
2045 ; return 0; }
2047 if { (eval echo configure:2048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2048 rm -rf conftest*
2049 ac_cv_header_time=yes
2050 else
2051 echo "configure: failed program was:" >&5
2052 cat conftest.$ac_ext >&5
2053 rm -rf conftest*
2054 ac_cv_header_time=no
2056 rm -f conftest*
2059 echo "$ac_t""$ac_cv_header_time" 1>&6
2060 if test $ac_cv_header_time = yes; then
2061 cat >> confdefs.h <<\EOF
2062 #define TIME_WITH_SYS_TIME 1
2067 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2068 echo "configure:2069: checking for working stdbool.h" >&5
2069 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072 cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 #include <stdbool.h>
2076 int main() {
2077 bool foo = false;
2078 ; return 0; }
2080 if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2081 rm -rf conftest*
2082 ac_cv_header_stdbool_h=yes
2083 else
2084 echo "configure: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 rm -rf conftest*
2087 ac_cv_header_stdbool_h=no
2089 rm -f conftest*
2092 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2093 if test $ac_cv_header_stdbool_h = yes; then
2094 cat >> confdefs.h <<\EOF
2095 #define HAVE_STDBOOL_H 1
2100 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2101 echo "configure:2102: checking whether string.h and strings.h may both be included" >&5
2102 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2103 echo $ac_n "(cached) $ac_c" 1>&6
2104 else
2105 cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <string.h>
2109 #include <strings.h>
2110 int main() {
2112 ; return 0; }
2114 if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2115 rm -rf conftest*
2116 gcc_cv_header_string=yes
2117 else
2118 echo "configure: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2120 rm -rf conftest*
2121 gcc_cv_header_string=no
2123 rm -f conftest*
2126 echo "$ac_t""$gcc_cv_header_string" 1>&6
2127 if test $gcc_cv_header_string = yes; then
2128 cat >> confdefs.h <<\EOF
2129 #define STRING_WITH_STRINGS 1
2134 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2135 echo "configure:2136: checking for sys/wait.h that is POSIX.1 compatible" >&5
2136 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2137 echo $ac_n "(cached) $ac_c" 1>&6
2138 else
2139 cat > conftest.$ac_ext <<EOF
2140 #line 2141 "configure"
2141 #include "confdefs.h"
2142 #include <sys/types.h>
2143 #include <sys/wait.h>
2144 #ifndef WEXITSTATUS
2145 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2146 #endif
2147 #ifndef WIFEXITED
2148 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2149 #endif
2150 int main() {
2151 int s;
2152 wait (&s);
2153 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2154 ; return 0; }
2156 if { (eval echo configure:2157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2157 rm -rf conftest*
2158 ac_cv_header_sys_wait_h=yes
2159 else
2160 echo "configure: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 rm -rf conftest*
2163 ac_cv_header_sys_wait_h=no
2165 rm -f conftest*
2168 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2169 if test $ac_cv_header_sys_wait_h = yes; then
2170 cat >> confdefs.h <<\EOF
2171 #define HAVE_SYS_WAIT_H 1
2176 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2177 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2178 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2179 direct.h malloc.h langinfo.h
2181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2183 echo "configure:2184: checking for $ac_hdr" >&5
2184 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2185 echo $ac_n "(cached) $ac_c" 1>&6
2186 else
2187 cat > conftest.$ac_ext <<EOF
2188 #line 2189 "configure"
2189 #include "confdefs.h"
2190 #include <$ac_hdr>
2192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2193 { (eval echo configure:2194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2195 if test -z "$ac_err"; then
2196 rm -rf conftest*
2197 eval "ac_cv_header_$ac_safe=yes"
2198 else
2199 echo "$ac_err" >&5
2200 echo "configure: failed program was:" >&5
2201 cat conftest.$ac_ext >&5
2202 rm -rf conftest*
2203 eval "ac_cv_header_$ac_safe=no"
2205 rm -f conftest*
2207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2208 echo "$ac_t""yes" 1>&6
2209 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2210 cat >> confdefs.h <<EOF
2211 #define $ac_tr_hdr 1
2214 else
2215 echo "$ac_t""no" 1>&6
2217 done
2220 # Check for thread headers.
2221 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2222 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2223 echo "configure:2224: checking for thread.h" >&5
2224 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2225 echo $ac_n "(cached) $ac_c" 1>&6
2226 else
2227 cat > conftest.$ac_ext <<EOF
2228 #line 2229 "configure"
2229 #include "confdefs.h"
2230 #include <thread.h>
2232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2233 { (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2235 if test -z "$ac_err"; then
2236 rm -rf conftest*
2237 eval "ac_cv_header_$ac_safe=yes"
2238 else
2239 echo "$ac_err" >&5
2240 echo "configure: failed program was:" >&5
2241 cat conftest.$ac_ext >&5
2242 rm -rf conftest*
2243 eval "ac_cv_header_$ac_safe=no"
2245 rm -f conftest*
2247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2248 echo "$ac_t""yes" 1>&6
2249 have_thread_h=yes
2250 else
2251 echo "$ac_t""no" 1>&6
2252 have_thread_h=
2255 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2256 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2257 echo "configure:2258: checking for pthread.h" >&5
2258 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2259 echo $ac_n "(cached) $ac_c" 1>&6
2260 else
2261 cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 #include <pthread.h>
2266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2267 { (eval echo configure:2268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2269 if test -z "$ac_err"; then
2270 rm -rf conftest*
2271 eval "ac_cv_header_$ac_safe=yes"
2272 else
2273 echo "$ac_err" >&5
2274 echo "configure: failed program was:" >&5
2275 cat conftest.$ac_ext >&5
2276 rm -rf conftest*
2277 eval "ac_cv_header_$ac_safe=no"
2279 rm -f conftest*
2281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2282 echo "$ac_t""yes" 1>&6
2283 have_pthread_h=yes
2284 else
2285 echo "$ac_t""no" 1>&6
2286 have_pthread_h=
2290 # See if GNAT has been installed
2291 # Extract the first word of "gnatbind", so it can be a program name with args.
2292 set dummy gnatbind; 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_gnat'+set}'`\" = set"; then
2296 echo $ac_n "(cached) $ac_c" 1>&6
2297 else
2298 if test -n "$gnat"; then
2299 ac_cv_prog_gnat="$gnat" # 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_gnat="yes"
2307 break
2309 done
2310 IFS="$ac_save_ifs"
2311 test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
2314 gnat="$ac_cv_prog_gnat"
2315 if test -n "$gnat"; then
2316 echo "$ac_t""$gnat" 1>&6
2317 else
2318 echo "$ac_t""no" 1>&6
2322 # See if we have the mktemp command.
2323 # Extract the first word of "mktemp", so it can be a program name with args.
2324 set dummy mktemp; ac_word=$2
2325 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2326 echo "configure:2327: checking for $ac_word" >&5
2327 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
2329 else
2330 if test -n "$have_mktemp_command"; then
2331 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2332 else
2333 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2334 ac_dummy="$PATH"
2335 for ac_dir in $ac_dummy; do
2336 test -z "$ac_dir" && ac_dir=.
2337 if test -f $ac_dir/$ac_word; then
2338 ac_cv_prog_have_mktemp_command="yes"
2339 break
2341 done
2342 IFS="$ac_save_ifs"
2343 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2346 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2347 if test -n "$have_mktemp_command"; then
2348 echo "$ac_t""$have_mktemp_command" 1>&6
2349 else
2350 echo "$ac_t""no" 1>&6
2354 # Do we have a single-tree copy of texinfo?
2355 if test -f $srcdir/../texinfo/Makefile.in; then
2356 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2357 gcc_cv_prog_makeinfo_modern=yes
2358 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2359 else
2360 # See if makeinfo has been installed and is modern enough
2361 # that we can use it.
2362 # Extract the first word of "makeinfo", so it can be a program name with args.
2363 set dummy makeinfo; ac_word=$2
2364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2365 echo "configure:2366: checking for $ac_word" >&5
2366 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2367 echo $ac_n "(cached) $ac_c" 1>&6
2368 else
2369 if test -n "$MAKEINFO"; then
2370 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2371 else
2372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2373 ac_dummy="$PATH"
2374 for ac_dir in $ac_dummy; do
2375 test -z "$ac_dir" && ac_dir=.
2376 if test -f $ac_dir/$ac_word; then
2377 ac_cv_prog_MAKEINFO="makeinfo"
2378 break
2380 done
2381 IFS="$ac_save_ifs"
2384 MAKEINFO="$ac_cv_prog_MAKEINFO"
2385 if test -n "$MAKEINFO"; then
2386 echo "$ac_t""$MAKEINFO" 1>&6
2387 else
2388 echo "$ac_t""no" 1>&6
2391 if test -n "$MAKEINFO"; then
2392 # Found it, now check the version.
2393 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2394 echo "configure:2395: checking for modern makeinfo" >&5
2395 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2396 echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398 ac_prog_version=`$MAKEINFO --version 2>&1 |
2399 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2400 echo "configure:2401: version of makeinfo is $ac_prog_version" >&5
2401 case $ac_prog_version in
2402 '') gcc_cv_prog_makeinfo_modern=no;;
2403 4.*)
2404 gcc_cv_prog_makeinfo_modern=yes;;
2405 *) gcc_cv_prog_makeinfo_modern=no;;
2406 esac
2410 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2411 else
2412 gcc_cv_prog_makeinfo_modern=no
2417 if test $gcc_cv_prog_makeinfo_modern = no; then
2418 echo "configure: warning:
2419 *** Makeinfo is missing or too old.
2420 *** Info documentation will not be built." 1>&2
2421 BUILD_INFO=
2422 else
2423 BUILD_INFO=info
2426 # Is pod2man recent enough to regenerate manpages?
2427 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2428 echo "configure:2429: checking for recent Pod::Man" >&5
2429 if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
2430 echo "$ac_t""yes" 1>&6
2431 GENERATED_MANPAGES=generated-manpages
2432 else
2433 echo "$ac_t""no" 1>&6
2434 GENERATED_MANPAGES=
2437 # How about lex?
2438 if test -f $srcdir/../flex/skel.c; then
2439 FLEX='$(objdir)/../flex/flex'
2440 else
2441 # Extract the first word of "flex", so it can be a program name with args.
2442 set dummy flex; ac_word=$2
2443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2444 echo "configure:2445: checking for $ac_word" >&5
2445 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447 else
2448 if test -n "$FLEX"; then
2449 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2450 else
2451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2452 ac_dummy="$PATH"
2453 for ac_dir in $ac_dummy; do
2454 test -z "$ac_dir" && ac_dir=.
2455 if test -f $ac_dir/$ac_word; then
2456 ac_cv_prog_FLEX="flex"
2457 break
2459 done
2460 IFS="$ac_save_ifs"
2461 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2464 FLEX="$ac_cv_prog_FLEX"
2465 if test -n "$FLEX"; then
2466 echo "$ac_t""$FLEX" 1>&6
2467 else
2468 echo "$ac_t""no" 1>&6
2473 # Bison?
2474 # The -L switch is so bison can find its skeleton file.
2475 if test -f $srcdir/../bison/bison.simple; then
2476 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2477 else
2478 # Extract the first word of "bison", so it can be a program name with args.
2479 set dummy bison; ac_word=$2
2480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2481 echo "configure:2482: checking for $ac_word" >&5
2482 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2483 echo $ac_n "(cached) $ac_c" 1>&6
2484 else
2485 if test -n "$BISON"; then
2486 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2487 else
2488 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2489 ac_dummy="$PATH"
2490 for ac_dir in $ac_dummy; do
2491 test -z "$ac_dir" && ac_dir=.
2492 if test -f $ac_dir/$ac_word; then
2493 ac_cv_prog_BISON="bison"
2494 break
2496 done
2497 IFS="$ac_save_ifs"
2498 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
2501 BISON="$ac_cv_prog_BISON"
2502 if test -n "$BISON"; then
2503 echo "$ac_t""$BISON" 1>&6
2504 else
2505 echo "$ac_t""no" 1>&6
2510 # See if the stage1 system preprocessor understands the ANSI C
2511 # preprocessor stringification operator.
2514 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
2515 echo "configure:2516: checking for preprocessor stringizing operator" >&5
2516 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2523 #define x(y) #y
2525 char *s = x(teststring);
2528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2529 egrep "#teststring" >/dev/null 2>&1; then
2530 rm -rf conftest*
2531 ac_cv_c_stringize=no
2532 else
2533 rm -rf conftest*
2534 ac_cv_c_stringize=yes
2536 rm -f conftest*
2540 if test "${ac_cv_c_stringize}" = yes
2541 then
2542 cat >> confdefs.h <<\EOF
2543 #define HAVE_STRINGIZE 1
2547 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2550 # Use <inttypes.h> only if it exists,
2551 # doesn't clash with <sys/types.h>, and declares intmax_t.
2552 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2553 echo "configure:2554: checking for inttypes.h" >&5
2554 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2555 echo $ac_n "(cached) $ac_c" 1>&6
2556 else
2557 cat > conftest.$ac_ext <<EOF
2558 #line 2559 "configure"
2559 #include "confdefs.h"
2560 #include <sys/types.h>
2561 #include <inttypes.h>
2562 int main() {
2563 intmax_t i = -1;
2564 ; return 0; }
2566 if { (eval echo configure:2567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2567 rm -rf conftest*
2568 gcc_cv_header_inttypes_h=yes
2569 else
2570 echo "configure: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 rm -rf conftest*
2573 gcc_cv_header_inttypes_h=no
2575 rm -f conftest*
2578 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2579 if test $gcc_cv_header_inttypes_h = yes; then
2580 cat >> confdefs.h <<\EOF
2581 #define HAVE_INTTYPES_H 1
2587 # Determine if enumerated bitfields are unsigned. ISO C says they can
2588 # be either signed or unsigned.
2590 echo $ac_n "checking for unsigned enumerated bitfields""... $ac_c" 1>&6
2591 echo "configure:2592: checking for unsigned enumerated bitfields" >&5
2592 if eval "test \"`echo '$''{'gcc_cv_enum_bf_unsigned'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 if test "$cross_compiling" = yes; then
2596 gcc_cv_enum_bf_unsigned=yes
2597 else
2598 cat > conftest.$ac_ext <<EOF
2599 #line 2600 "configure"
2600 #include "confdefs.h"
2601 #include <stdlib.h>
2602 enum t { BLAH = 128 } ;
2603 struct s_t { enum t member : 8; } s ;
2604 int main(void)
2606 s.member = BLAH;
2607 if (s.member < 0) exit(1);
2608 exit(0);
2612 if { (eval echo configure:2613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2613 then
2614 gcc_cv_enum_bf_unsigned=yes
2615 else
2616 echo "configure: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2618 rm -fr conftest*
2619 gcc_cv_enum_bf_unsigned=no
2621 rm -fr conftest*
2626 echo "$ac_t""$gcc_cv_enum_bf_unsigned" 1>&6
2627 if test $gcc_cv_enum_bf_unsigned = yes; then
2628 cat >> confdefs.h <<\EOF
2629 #define ENUM_BITFIELDS_ARE_UNSIGNED 1
2634 for ac_func in strtoul bsearch putenv popen bcopy \
2635 strchr strrchr kill getrlimit setrlimit atoll atoq \
2636 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2637 fputs_unlocked getrusage nl_langinfo lstat
2639 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2640 echo "configure:2641: checking for $ac_func" >&5
2641 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2642 echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644 cat > conftest.$ac_ext <<EOF
2645 #line 2646 "configure"
2646 #include "confdefs.h"
2647 /* System header to define __stub macros and hopefully few prototypes,
2648 which can conflict with char $ac_func(); below. */
2649 #include <assert.h>
2650 /* Override any gcc2 internal prototype to avoid an error. */
2651 /* We use char because int might match the return type of a gcc2
2652 builtin and then its argument prototype would still apply. */
2653 char $ac_func();
2655 int main() {
2657 /* The GNU C library defines this for functions which it implements
2658 to always fail with ENOSYS. Some functions are actually named
2659 something starting with __ and the normal name is an alias. */
2660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2661 choke me
2662 #else
2663 $ac_func();
2664 #endif
2666 ; return 0; }
2668 if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2669 rm -rf conftest*
2670 eval "ac_cv_func_$ac_func=yes"
2671 else
2672 echo "configure: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 rm -rf conftest*
2675 eval "ac_cv_func_$ac_func=no"
2677 rm -f conftest*
2680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2681 echo "$ac_t""yes" 1>&6
2682 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2683 cat >> confdefs.h <<EOF
2684 #define $ac_tr_func 1
2687 else
2688 echo "$ac_t""no" 1>&6
2690 done
2693 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2694 echo "configure:2695: checking for ssize_t" >&5
2695 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2696 echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698 cat > conftest.$ac_ext <<EOF
2699 #line 2700 "configure"
2700 #include "confdefs.h"
2701 #include <sys/types.h>
2702 #if STDC_HEADERS
2703 #include <stdlib.h>
2704 #include <stddef.h>
2705 #endif
2707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2708 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2709 rm -rf conftest*
2710 ac_cv_type_ssize_t=yes
2711 else
2712 rm -rf conftest*
2713 ac_cv_type_ssize_t=no
2715 rm -f conftest*
2718 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2719 if test $ac_cv_type_ssize_t = no; then
2720 cat >> confdefs.h <<\EOF
2721 #define ssize_t int
2727 # Try to determine the array type of the second argument of getgroups
2728 # for the target system (int or gid_t).
2729 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2730 echo "configure:2731: checking for uid_t in sys/types.h" >&5
2731 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2732 echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734 cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737 #include <sys/types.h>
2739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2740 egrep "uid_t" >/dev/null 2>&1; then
2741 rm -rf conftest*
2742 ac_cv_type_uid_t=yes
2743 else
2744 rm -rf conftest*
2745 ac_cv_type_uid_t=no
2747 rm -f conftest*
2751 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2752 if test $ac_cv_type_uid_t = no; then
2753 cat >> confdefs.h <<\EOF
2754 #define uid_t int
2757 cat >> confdefs.h <<\EOF
2758 #define gid_t int
2763 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2764 echo "configure:2765: checking type of array argument to getgroups" >&5
2765 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768 if test "$cross_compiling" = yes; then
2769 ac_cv_type_getgroups=cross
2770 else
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2775 /* Thanks to Mike Rendell for this test. */
2776 #include <sys/types.h>
2777 #define NGID 256
2778 #undef MAX
2779 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2780 main()
2782 gid_t gidset[NGID];
2783 int i, n;
2784 union { gid_t gval; long lval; } val;
2786 val.lval = -1;
2787 for (i = 0; i < NGID; i++)
2788 gidset[i] = val.gval;
2789 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2790 gidset);
2791 /* Exit non-zero if getgroups seems to require an array of ints. This
2792 happens when gid_t is short but getgroups modifies an array of ints. */
2793 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2797 if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2798 then
2799 ac_cv_type_getgroups=gid_t
2800 else
2801 echo "configure: failed program was:" >&5
2802 cat conftest.$ac_ext >&5
2803 rm -fr conftest*
2804 ac_cv_type_getgroups=int
2806 rm -fr conftest*
2809 if test $ac_cv_type_getgroups = cross; then
2810 cat > conftest.$ac_ext <<EOF
2811 #line 2812 "configure"
2812 #include "confdefs.h"
2813 #include <unistd.h>
2815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2816 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2817 rm -rf conftest*
2818 ac_cv_type_getgroups=gid_t
2819 else
2820 rm -rf conftest*
2821 ac_cv_type_getgroups=int
2823 rm -f conftest*
2828 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2829 cat >> confdefs.h <<EOF
2830 #define GETGROUPS_T $ac_cv_type_getgroups
2834 if test "${target}" = "${build}"; then
2835 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
2836 else
2837 case "${target}" in
2838 # This condition may need some tweaking. It should include all
2839 # targets where the array type of the second argument of getgroups
2840 # is int and the type of gid_t is not equivalent to int.
2841 *-*-sunos* | *-*-ultrix*)
2842 TARGET_GETGROUPS_T=int
2845 TARGET_GETGROUPS_T=gid_t
2847 esac
2851 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2852 echo "configure:2853: checking for vprintf" >&5
2853 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+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 vprintf(); 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 vprintf();
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_vprintf) || defined (__stub___vprintf)
2873 choke me
2874 #else
2875 vprintf();
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_vprintf=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_vprintf=no"
2889 rm -f conftest*
2892 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2893 echo "$ac_t""yes" 1>&6
2894 cat >> confdefs.h <<\EOF
2895 #define HAVE_VPRINTF 1
2898 else
2899 echo "$ac_t""no" 1>&6
2902 if test "$ac_cv_func_vprintf" != yes; then
2903 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2904 echo "configure:2905: checking for _doprnt" >&5
2905 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2906 echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908 cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911 /* System header to define __stub macros and hopefully few prototypes,
2912 which can conflict with char _doprnt(); below. */
2913 #include <assert.h>
2914 /* Override any gcc2 internal prototype to avoid an error. */
2915 /* We use char because int might match the return type of a gcc2
2916 builtin and then its argument prototype would still apply. */
2917 char _doprnt();
2919 int main() {
2921 /* The GNU C library defines this for functions which it implements
2922 to always fail with ENOSYS. Some functions are actually named
2923 something starting with __ and the normal name is an alias. */
2924 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2925 choke me
2926 #else
2927 _doprnt();
2928 #endif
2930 ; return 0; }
2932 if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2933 rm -rf conftest*
2934 eval "ac_cv_func__doprnt=yes"
2935 else
2936 echo "configure: failed program was:" >&5
2937 cat conftest.$ac_ext >&5
2938 rm -rf conftest*
2939 eval "ac_cv_func__doprnt=no"
2941 rm -f conftest*
2944 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2945 echo "$ac_t""yes" 1>&6
2946 cat >> confdefs.h <<\EOF
2947 #define HAVE_DOPRNT 1
2950 else
2951 echo "$ac_t""no" 1>&6
2956 vfprintf=
2957 doprint=
2958 if test $ac_cv_func_vprintf != yes ; then
2959 vfprintf=vfprintf.o
2960 if test $ac_cv_func__doprnt != yes ; then
2961 doprint=doprint.o
2967 for ac_func in strstr
2969 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2970 echo "configure:2971: checking for $ac_func" >&5
2971 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2972 echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974 cat > conftest.$ac_ext <<EOF
2975 #line 2976 "configure"
2976 #include "confdefs.h"
2977 /* System header to define __stub macros and hopefully few prototypes,
2978 which can conflict with char $ac_func(); below. */
2979 #include <assert.h>
2980 /* Override any gcc2 internal prototype to avoid an error. */
2981 /* We use char because int might match the return type of a gcc2
2982 builtin and then its argument prototype would still apply. */
2983 char $ac_func();
2985 int main() {
2987 /* The GNU C library defines this for functions which it implements
2988 to always fail with ENOSYS. Some functions are actually named
2989 something starting with __ and the normal name is an alias. */
2990 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2991 choke me
2992 #else
2993 $ac_func();
2994 #endif
2996 ; return 0; }
2998 if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2999 rm -rf conftest*
3000 eval "ac_cv_func_$ac_func=yes"
3001 else
3002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 rm -rf conftest*
3005 eval "ac_cv_func_$ac_func=no"
3007 rm -f conftest*
3010 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3011 echo "$ac_t""yes" 1>&6
3012 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3013 cat >> confdefs.h <<EOF
3014 #define $ac_tr_func 1
3016 strstr=
3017 else
3018 echo "$ac_t""no" 1>&6
3019 strstr=strstr.o
3021 done
3024 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3025 echo "configure:3026: checking whether the printf functions support %p" >&5
3026 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3027 echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029 if test "$cross_compiling" = yes; then
3030 gcc_cv_func_printf_ptr=no
3031 else
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 #include <stdio.h>
3037 int main()
3039 char buf[64];
3040 char *p = buf, *q = NULL;
3041 sprintf(buf, "%p", p);
3042 sscanf(buf, "%p", &q);
3043 return (p != q);
3046 if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3047 then
3048 gcc_cv_func_printf_ptr=yes
3049 else
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 rm -fr conftest*
3053 gcc_cv_func_printf_ptr=no
3055 rm -fr conftest*
3058 rm -f core core.* *.core
3061 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3062 if test $gcc_cv_func_printf_ptr = yes ; then
3063 cat >> confdefs.h <<\EOF
3064 #define HAVE_PRINTF_PTR 1
3070 case "${host}" in
3071 *-*-uwin*)
3072 { echo "configure: error:
3073 *** UWIN may not be used as a host platform because
3074 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3076 esac
3077 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3078 echo "configure:3079: checking for pid_t" >&5
3079 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3080 echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082 cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085 #include <sys/types.h>
3086 #if STDC_HEADERS
3087 #include <stdlib.h>
3088 #include <stddef.h>
3089 #endif
3091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3092 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3093 rm -rf conftest*
3094 ac_cv_type_pid_t=yes
3095 else
3096 rm -rf conftest*
3097 ac_cv_type_pid_t=no
3099 rm -f conftest*
3102 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3103 if test $ac_cv_type_pid_t = no; then
3104 cat >> confdefs.h <<\EOF
3105 #define pid_t int
3110 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3111 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3112 echo "configure:3113: checking for vfork.h" >&5
3113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3114 echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 #include <vfork.h>
3121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3122 { (eval echo configure:3123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3124 if test -z "$ac_err"; then
3125 rm -rf conftest*
3126 eval "ac_cv_header_$ac_safe=yes"
3127 else
3128 echo "$ac_err" >&5
3129 echo "configure: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3131 rm -rf conftest*
3132 eval "ac_cv_header_$ac_safe=no"
3134 rm -f conftest*
3136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3137 echo "$ac_t""yes" 1>&6
3138 cat >> confdefs.h <<\EOF
3139 #define HAVE_VFORK_H 1
3142 else
3143 echo "$ac_t""no" 1>&6
3146 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3147 echo "configure:3148: checking for working vfork" >&5
3148 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3149 echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151 if test "$cross_compiling" = yes; then
3152 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3153 echo "configure:3154: checking for vfork" >&5
3154 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 /* System header to define __stub macros and hopefully few prototypes,
3161 which can conflict with char vfork(); below. */
3162 #include <assert.h>
3163 /* Override any gcc2 internal prototype to avoid an error. */
3164 /* We use char because int might match the return type of a gcc2
3165 builtin and then its argument prototype would still apply. */
3166 char vfork();
3168 int main() {
3170 /* The GNU C library defines this for functions which it implements
3171 to always fail with ENOSYS. Some functions are actually named
3172 something starting with __ and the normal name is an alias. */
3173 #if defined (__stub_vfork) || defined (__stub___vfork)
3174 choke me
3175 #else
3176 vfork();
3177 #endif
3179 ; return 0; }
3181 if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3182 rm -rf conftest*
3183 eval "ac_cv_func_vfork=yes"
3184 else
3185 echo "configure: failed program was:" >&5
3186 cat conftest.$ac_ext >&5
3187 rm -rf conftest*
3188 eval "ac_cv_func_vfork=no"
3190 rm -f conftest*
3193 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3194 echo "$ac_t""yes" 1>&6
3196 else
3197 echo "$ac_t""no" 1>&6
3200 ac_cv_func_vfork_works=$ac_cv_func_vfork
3201 else
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 /* Thanks to Paul Eggert for this test. */
3206 #include <stdio.h>
3207 #include <sys/types.h>
3208 #include <sys/stat.h>
3209 #ifdef HAVE_UNISTD_H
3210 #include <unistd.h>
3211 #endif
3212 #ifdef HAVE_VFORK_H
3213 #include <vfork.h>
3214 #endif
3215 /* On some sparc systems, changes by the child to local and incoming
3216 argument registers are propagated back to the parent.
3217 The compiler is told about this with #include <vfork.h>,
3218 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3219 Test for this by using a static variable whose address
3220 is put into a register that is clobbered by the vfork. */
3221 static
3222 #ifdef __cplusplus
3223 sparc_address_test (int arg)
3224 #else
3225 sparc_address_test (arg) int arg;
3226 #endif
3228 static pid_t child;
3229 if (!child) {
3230 child = vfork ();
3231 if (child < 0) {
3232 perror ("vfork");
3233 _exit(2);
3235 if (!child) {
3236 arg = getpid();
3237 write(-1, "", 0);
3238 _exit (arg);
3242 main() {
3243 pid_t parent = getpid ();
3244 pid_t child;
3246 sparc_address_test ();
3248 child = vfork ();
3250 if (child == 0) {
3251 /* Here is another test for sparc vfork register problems.
3252 This test uses lots of local variables, at least
3253 as many local variables as main has allocated so far
3254 including compiler temporaries. 4 locals are enough for
3255 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3256 A buggy compiler should reuse the register of parent
3257 for one of the local variables, since it will think that
3258 parent can't possibly be used any more in this routine.
3259 Assigning to the local variable will thus munge parent
3260 in the parent process. */
3261 pid_t
3262 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3263 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3264 /* Convince the compiler that p..p7 are live; otherwise, it might
3265 use the same hardware register for all 8 local variables. */
3266 if (p != p1 || p != p2 || p != p3 || p != p4
3267 || p != p5 || p != p6 || p != p7)
3268 _exit(1);
3270 /* On some systems (e.g. IRIX 3.3),
3271 vfork doesn't separate parent from child file descriptors.
3272 If the child closes a descriptor before it execs or exits,
3273 this munges the parent's descriptor as well.
3274 Test for this by closing stdout in the child. */
3275 _exit(close(fileno(stdout)) != 0);
3276 } else {
3277 int status;
3278 struct stat st;
3280 while (wait(&status) != child)
3282 exit(
3283 /* Was there some problem with vforking? */
3284 child < 0
3286 /* Did the child fail? (This shouldn't happen.) */
3287 || status
3289 /* Did the vfork/compiler bug occur? */
3290 || parent != getpid()
3292 /* Did the file descriptor bug occur? */
3293 || fstat(fileno(stdout), &st) != 0
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3299 then
3300 ac_cv_func_vfork_works=yes
3301 else
3302 echo "configure: failed program was:" >&5
3303 cat conftest.$ac_ext >&5
3304 rm -fr conftest*
3305 ac_cv_func_vfork_works=no
3307 rm -fr conftest*
3312 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3313 if test $ac_cv_func_vfork_works = no; then
3314 cat >> confdefs.h <<\EOF
3315 #define vfork fork
3320 for ac_func in getpagesize
3322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3323 echo "configure:3324: checking for $ac_func" >&5
3324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3325 echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327 cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330 /* System header to define __stub macros and hopefully few prototypes,
3331 which can conflict with char $ac_func(); below. */
3332 #include <assert.h>
3333 /* Override any gcc2 internal prototype to avoid an error. */
3334 /* We use char because int might match the return type of a gcc2
3335 builtin and then its argument prototype would still apply. */
3336 char $ac_func();
3338 int main() {
3340 /* The GNU C library defines this for functions which it implements
3341 to always fail with ENOSYS. Some functions are actually named
3342 something starting with __ and the normal name is an alias. */
3343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3344 choke me
3345 #else
3346 $ac_func();
3347 #endif
3349 ; return 0; }
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3352 rm -rf conftest*
3353 eval "ac_cv_func_$ac_func=yes"
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 rm -rf conftest*
3358 eval "ac_cv_func_$ac_func=no"
3360 rm -f conftest*
3363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3364 echo "$ac_t""yes" 1>&6
3365 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3366 cat >> confdefs.h <<EOF
3367 #define $ac_tr_func 1
3370 else
3371 echo "$ac_t""no" 1>&6
3373 done
3375 # The test program for the next two tests is the same except for one
3376 # set of ifdefs.
3377 cat >ct-mmap.inc <<'EOF'
3378 #include <sys/types.h>
3379 #include <sys/mman.h>
3380 #include <fcntl.h>
3381 #include <signal.h>
3382 #include <setjmp.h>
3383 #include <stdio.h>
3385 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3386 # define MAP_ANONYMOUS MAP_ANON
3387 #endif
3389 /* This mess was copied from the GNU getpagesize.h. */
3390 #ifndef HAVE_GETPAGESIZE
3391 # ifdef HAVE_UNISTD_H
3392 # include <unistd.h>
3393 # endif
3395 /* Assume that all systems that can run configure have sys/param.h. */
3396 # ifndef HAVE_SYS_PARAM_H
3397 # define HAVE_SYS_PARAM_H 1
3398 # endif
3400 # ifdef _SC_PAGESIZE
3401 # define getpagesize() sysconf(_SC_PAGESIZE)
3402 # else /* no _SC_PAGESIZE */
3403 # ifdef HAVE_SYS_PARAM_H
3404 # include <sys/param.h>
3405 # ifdef EXEC_PAGESIZE
3406 # define getpagesize() EXEC_PAGESIZE
3407 # else /* no EXEC_PAGESIZE */
3408 # ifdef NBPG
3409 # define getpagesize() NBPG * CLSIZE
3410 # ifndef CLSIZE
3411 # define CLSIZE 1
3412 # endif /* no CLSIZE */
3413 # else /* no NBPG */
3414 # ifdef NBPC
3415 # define getpagesize() NBPC
3416 # else /* no NBPC */
3417 # ifdef PAGESIZE
3418 # define getpagesize() PAGESIZE
3419 # endif /* PAGESIZE */
3420 # endif /* no NBPC */
3421 # endif /* no NBPG */
3422 # endif /* no EXEC_PAGESIZE */
3423 # else /* no HAVE_SYS_PARAM_H */
3424 # define getpagesize() 8192 /* punt totally */
3425 # endif /* no HAVE_SYS_PARAM_H */
3426 # endif /* no _SC_PAGESIZE */
3428 #endif /* no HAVE_GETPAGESIZE */
3430 #ifndef MAP_FAILED
3431 # define MAP_FAILED -1
3432 #endif
3434 #undef perror_exit
3435 #define perror_exit(str, val) \
3436 do { perror(str); exit(val); } while (0)
3438 /* Some versions of cygwin mmap require that munmap is called with the
3439 same parameters as mmap. GCC expects that this is not the case.
3440 Test for various forms of this problem. Warning - icky signal games. */
3442 static sigset_t unblock_sigsegv;
3443 static jmp_buf r;
3444 static size_t pg;
3445 static int devzero;
3447 static char *
3448 anonmap (size)
3449 size_t size;
3451 #ifdef USE_MAP_ANON
3452 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3453 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3454 #else
3455 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3456 MAP_PRIVATE, devzero, 0);
3457 #endif
3460 static void
3461 sigsegv (unused)
3462 int unused;
3464 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3465 longjmp (r, 1);
3468 /* Basic functionality test. */
3469 void
3470 test_0 ()
3472 char *x = anonmap (pg);
3473 if (x == (char *) MAP_FAILED)
3474 perror_exit("test 0 mmap", 2);
3476 *(int *)x += 1;
3478 if (munmap(x, pg) < 0)
3479 perror_exit("test 0 munmap", 3);
3482 /* 1. If we map a 2-page region and unmap its second page, the first page
3483 must remain. */
3484 static void
3485 test_1 ()
3487 char *x = anonmap (pg * 2);
3488 if (x == (char *)MAP_FAILED)
3489 perror_exit ("test 1 mmap", 4);
3491 signal (SIGSEGV, sigsegv);
3492 if (setjmp (r))
3493 perror_exit ("test 1 fault", 5);
3495 x[0] = 1;
3496 x[pg] = 1;
3498 if (munmap (x + pg, pg) < 0)
3499 perror_exit ("test 1 munmap 1", 6);
3500 x[0] = 2;
3502 if (setjmp (r) == 0)
3504 x[pg] = 1;
3505 perror_exit ("test 1 no fault", 7);
3507 if (munmap (x, pg) < 0)
3508 perror_exit ("test 1 munmap 2", 8);
3511 /* 2. If we map a 2-page region and unmap its first page, the second
3512 page must remain. */
3513 static void
3514 test_2 ()
3516 char *x = anonmap (pg * 2);
3517 if (x == (char *)MAP_FAILED)
3518 perror_exit ("test 2 mmap", 9);
3520 signal (SIGSEGV, sigsegv);
3521 if (setjmp (r))
3522 perror_exit ("test 2 fault", 10);
3524 x[0] = 1;
3525 x[pg] = 1;
3527 if (munmap (x, pg) < 0)
3528 perror_exit ("test 2 munmap 1", 11);
3530 x[pg] = 2;
3532 if (setjmp (r) == 0)
3534 x[0] = 1;
3535 perror_exit ("test 2 no fault", 12);
3538 if (munmap (x+pg, pg) < 0)
3539 perror_exit ("test 2 munmap 2", 13);
3542 /* 3. If we map two adjacent 1-page regions and unmap them both with
3543 one munmap, both must go away.
3545 Getting two adjacent 1-page regions with two mmap calls is slightly
3546 tricky. All OS's tested skip over already-allocated blocks; therefore
3547 we have been careful to unmap all allocated regions in previous tests.
3548 HP/UX allocates pages backward in memory. No OS has yet been observed
3549 to be so perverse as to leave unmapped space between consecutive calls
3550 to mmap. */
3552 static void
3553 test_3 ()
3555 char *x, *y, *z;
3557 x = anonmap (pg);
3558 if (x == (char *)MAP_FAILED)
3559 perror_exit ("test 3 mmap 1", 14);
3560 y = anonmap (pg);
3561 if (y == (char *)MAP_FAILED)
3562 perror_exit ("test 3 mmap 2", 15);
3564 if (y != x + pg)
3566 if (y == x - pg)
3567 z = y, y = x, x = z;
3568 else
3570 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
3571 (unsigned long)x, (unsigned long)y);
3572 exit (16);
3576 signal (SIGSEGV, sigsegv);
3577 if (setjmp (r))
3578 perror_exit ("test 3 fault", 17);
3580 x[0] = 1;
3581 y[0] = 1;
3583 if (munmap (x, pg*2) < 0)
3584 perror_exit ("test 3 munmap", 18);
3586 if (setjmp (r) == 0)
3588 x[0] = 1;
3589 perror_exit ("test 3 no fault 1", 19);
3592 signal (SIGSEGV, sigsegv);
3593 if (setjmp (r) == 0)
3595 y[0] = 1;
3596 perror_exit ("test 3 no fault 2", 20);
3601 main ()
3603 sigemptyset (&unblock_sigsegv);
3604 sigaddset (&unblock_sigsegv, SIGSEGV);
3605 pg = getpagesize ();
3606 #ifndef USE_MAP_ANON
3607 devzero = open ("/dev/zero", O_RDWR);
3608 if (devzero < 0)
3609 perror_exit ("open /dev/zero", 1);
3610 #endif
3612 test_0();
3613 test_1();
3614 test_2();
3615 test_3();
3617 exit(0);
3621 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
3622 echo "configure:3623: checking for working mmap from /dev/zero" >&5
3623 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3624 echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626 if test "$cross_compiling" = yes; then
3627 # If this is not cygwin, and /dev/zero is a character device, it's probably
3628 # safe to assume it works.
3629 case "$host_os" in
3630 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
3631 * ) if test -c /dev/zero
3632 then ac_cv_func_mmap_dev_zero=yes
3633 else ac_cv_func_mmap_dev_zero=no
3634 fi ;;
3635 esac
3636 else
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include "ct-mmap.inc"
3642 if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3643 then
3644 ac_cv_func_mmap_dev_zero=yes
3645 else
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3648 rm -fr conftest*
3649 if test $? -lt 4
3650 then ac_cv_func_mmap_dev_zero=no
3651 else ac_cv_func_mmap_dev_zero=buggy
3654 rm -fr conftest*
3660 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
3661 if test $ac_cv_func_mmap_dev_zero = yes; then
3662 cat >> confdefs.h <<\EOF
3663 #define HAVE_MMAP_DEV_ZERO 1
3668 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
3669 echo "configure:3670: checking for working mmap with MAP_ANON(YMOUS)" >&5
3670 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
3671 echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673 if test "$cross_compiling" = yes; then
3674 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
3675 # just because it's there. Some SCO Un*xen define it but don't implement it.
3676 ac_cv_func_mmap_anon=no
3677 else
3678 cat > conftest.$ac_ext <<EOF
3679 #line 3680 "configure"
3680 #include "confdefs.h"
3681 #define USE_MAP_ANON
3682 #include "ct-mmap.inc"
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3685 then
3686 ac_cv_func_mmap_anon=yes
3687 else
3688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3690 rm -fr conftest*
3691 if test $? -lt 4
3692 then ac_cv_func_mmap_anon=no
3693 else ac_cv_func_mmap_anon=buggy
3696 rm -fr conftest*
3702 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
3703 if test $ac_cv_func_mmap_anon = yes; then
3704 cat >> confdefs.h <<\EOF
3705 #define HAVE_MMAP_ANON 1
3709 rm -f ct-mmap.inc
3711 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
3712 echo "configure:3713: checking for working mmap of a file" >&5
3713 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
3714 echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716 # Create a file one thousand bytes long.
3717 for i in 1 2 3 4 5 6 7 8 9 0
3718 do for j in 1 2 3 4 5 6 7 8 9 0
3719 do echo $i $j xxxxx
3720 done
3721 done > conftestdata$$
3723 if test "$cross_compiling" = yes; then
3724 ac_cv_func_mmap_file=no
3725 else
3726 cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3730 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
3731 Richard Henderson and Alexandre Oliva.
3732 Check whether read-only mmap of a plain file works. */
3733 #include <sys/types.h>
3734 #include <sys/stat.h>
3735 #include <fcntl.h>
3736 #include <sys/mman.h>
3738 int main()
3740 char *x;
3741 int fd;
3742 struct stat st;
3744 fd = open("conftestdata$$", O_RDONLY);
3745 if (fd < 0)
3746 exit(1);
3748 if (fstat (fd, &st))
3749 exit(2);
3751 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
3752 if (x == (char *) -1)
3753 exit(3);
3755 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
3756 exit(4);
3758 if (munmap(x, st.st_size) < 0)
3759 exit(5);
3761 exit(0);
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3765 then
3766 ac_cv_func_mmap_file=yes
3767 else
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3770 rm -fr conftest*
3771 ac_cv_func_mmap_file=no
3773 rm -fr conftest*
3778 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
3779 if test $ac_cv_func_mmap_file = yes; then
3780 cat >> confdefs.h <<\EOF
3781 #define HAVE_MMAP_FILE 1
3789 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3790 if test "${with_libiconv_prefix+set}" = set; then
3791 withval="$with_libiconv_prefix"
3793 for dir in `echo "$withval" | tr : ' '`; do
3794 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3795 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
3796 done
3801 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3802 echo "configure:3803: checking for iconv" >&5
3803 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805 else
3807 am_cv_func_iconv="no, consider installing GNU libiconv"
3808 am_cv_lib_iconv=no
3809 cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <stdlib.h>
3813 #include <iconv.h>
3814 int main() {
3815 iconv_t cd = iconv_open("","");
3816 iconv(cd,NULL,NULL,NULL,NULL);
3817 iconv_close(cd);
3818 ; return 0; }
3820 if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3821 rm -rf conftest*
3822 am_cv_func_iconv=yes
3823 else
3824 echo "configure: failed program was:" >&5
3825 cat conftest.$ac_ext >&5
3827 rm -f conftest*
3828 if test "$am_cv_func_iconv" != yes; then
3829 am_save_LIBS="$LIBS"
3830 LIBS="$LIBS -liconv"
3831 cat > conftest.$ac_ext <<EOF
3832 #line 3833 "configure"
3833 #include "confdefs.h"
3834 #include <stdlib.h>
3835 #include <iconv.h>
3836 int main() {
3837 iconv_t cd = iconv_open("","");
3838 iconv(cd,NULL,NULL,NULL,NULL);
3839 iconv_close(cd);
3840 ; return 0; }
3842 if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3843 rm -rf conftest*
3844 am_cv_lib_iconv=yes
3845 am_cv_func_iconv=yes
3846 else
3847 echo "configure: failed program was:" >&5
3848 cat conftest.$ac_ext >&5
3850 rm -f conftest*
3851 LIBS="$am_save_LIBS"
3856 echo "$ac_t""$am_cv_func_iconv" 1>&6
3857 if test "$am_cv_func_iconv" = yes; then
3858 cat >> confdefs.h <<\EOF
3859 #define HAVE_ICONV 1
3862 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3863 echo "configure:3864: checking for iconv declaration" >&5
3864 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3865 echo $ac_n "(cached) $ac_c" 1>&6
3866 else
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3872 #include <stdlib.h>
3873 #include <iconv.h>
3874 extern
3875 #ifdef __cplusplus
3877 #endif
3878 #if defined(__STDC__) || defined(__cplusplus)
3879 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3880 #else
3881 size_t iconv();
3882 #endif
3884 int main() {
3886 ; return 0; }
3888 if { (eval echo configure:3889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3889 rm -rf conftest*
3890 am_cv_proto_iconv_arg1=""
3891 else
3892 echo "configure: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3894 rm -rf conftest*
3895 am_cv_proto_iconv_arg1="const"
3897 rm -f conftest*
3898 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
3901 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3902 echo "$ac_t""${ac_t:-
3903 }$am_cv_proto_iconv" 1>&6
3904 cat >> confdefs.h <<EOF
3905 #define ICONV_CONST $am_cv_proto_iconv_arg1
3909 LIBICONV=
3910 if test "$am_cv_lib_iconv" = yes; then
3911 LIBICONV="-liconv"
3916 # We will need to find libiberty.h and ansidecl.h
3917 saved_CFLAGS="$CFLAGS"
3918 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
3919 for ac_func in bcopy \
3920 getenv atol sbrk abort atof getcwd getwd \
3921 strsignal putc_unlocked fputs_unlocked strstr environ \
3922 malloc realloc calloc free basename getopt
3924 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3925 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3926 echo "configure:3927: checking whether $ac_func is declared" >&5
3927 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3928 echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 #undef $ac_tr_decl
3934 #define $ac_tr_decl 1
3936 #include "gansidecl.h"
3937 #include "system.h"
3939 int main() {
3940 #ifndef $ac_func
3941 char *(*pfn) = (char *(*)) $ac_func ;
3942 #endif
3943 ; return 0; }
3945 if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3946 rm -rf conftest*
3947 eval "gcc_cv_have_decl_$ac_func=yes"
3948 else
3949 echo "configure: failed program was:" >&5
3950 cat conftest.$ac_ext >&5
3951 rm -rf conftest*
3952 eval "gcc_cv_have_decl_$ac_func=no"
3954 rm -f conftest*
3957 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3958 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3959 #define $ac_tr_decl 1
3962 else
3963 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3964 #define $ac_tr_decl 0
3969 done
3970 if test x = y ; then
3971 cat >> confdefs.h <<\EOF
3972 #define HAVE_DECL_BCOPY 1
3975 cat >> confdefs.h <<\EOF
3976 #define HAVE_DECL_GETENV 1
3978 cat >> confdefs.h <<\EOF
3979 #define HAVE_DECL_ATOL 1
3981 cat >> confdefs.h <<\EOF
3982 #define HAVE_DECL_SBRK 1
3984 cat >> confdefs.h <<\EOF
3985 #define HAVE_DECL_ABORT 1
3987 cat >> confdefs.h <<\EOF
3988 #define HAVE_DECL_ATOF 1
3990 cat >> confdefs.h <<\EOF
3991 #define HAVE_DECL_GETCWD 1
3993 cat >> confdefs.h <<\EOF
3994 #define HAVE_DECL_GETWD 1
3997 cat >> confdefs.h <<\EOF
3998 #define HAVE_DECL_STRSIGNAL 1
4000 cat >> confdefs.h <<\EOF
4001 #define HAVE_DECL_PUTC_UNLOCKED 1
4003 cat >> confdefs.h <<\EOF
4004 #define HAVE_DECL_FPUTS_UNLOCKED 1
4006 cat >> confdefs.h <<\EOF
4007 #define HAVE_DECL_STRSTR 1
4009 cat >> confdefs.h <<\EOF
4010 #define HAVE_DECL_ENVIRON 1
4013 cat >> confdefs.h <<\EOF
4014 #define HAVE_DECL_MALLOC 1
4016 cat >> confdefs.h <<\EOF
4017 #define HAVE_DECL_REALLOC 1
4019 cat >> confdefs.h <<\EOF
4020 #define HAVE_DECL_CALLOC 1
4022 cat >> confdefs.h <<\EOF
4023 #define HAVE_DECL_FREE 1
4025 cat >> confdefs.h <<\EOF
4026 #define HAVE_DECL_BASENAME 1
4028 cat >> confdefs.h <<\EOF
4029 #define HAVE_DECL_GETOPT 1
4034 for ac_func in getrlimit setrlimit getrusage
4036 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4037 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4038 echo "configure:4039: checking whether $ac_func is declared" >&5
4039 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042 cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #undef $ac_tr_decl
4046 #define $ac_tr_decl 1
4048 #include "gansidecl.h"
4049 #include "system.h"
4050 #ifdef HAVE_SYS_RESOURCE_H
4051 #include <sys/resource.h>
4052 #endif
4055 int main() {
4056 #ifndef $ac_func
4057 char *(*pfn) = (char *(*)) $ac_func ;
4058 #endif
4059 ; return 0; }
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062 rm -rf conftest*
4063 eval "gcc_cv_have_decl_$ac_func=yes"
4064 else
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 eval "gcc_cv_have_decl_$ac_func=no"
4070 rm -f conftest*
4073 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4074 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4075 #define $ac_tr_decl 1
4078 else
4079 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4080 #define $ac_tr_decl 0
4085 done
4086 if test x = y ; then
4087 cat >> confdefs.h <<\EOF
4088 #define HAVE_DECL_GETRLIMIT 1
4090 cat >> confdefs.h <<\EOF
4091 #define HAVE_DECL_SETRLIMIT 1
4093 cat >> confdefs.h <<\EOF
4094 #define HAVE_DECL_GETRUSAGE 1
4099 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4100 CFLAGS="$saved_CFLAGS"
4102 # mkdir takes a single argument on some systems.
4103 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
4104 echo "configure:4105: checking if mkdir takes one argument" >&5
4105 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4106 echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4112 #include <sys/types.h>
4113 #ifdef HAVE_SYS_STAT_H
4114 # include <sys/stat.h>
4115 #endif
4116 #ifdef HAVE_UNISTD_H
4117 # include <unistd.h>
4118 #endif
4119 #ifdef HAVE_DIRECT_H
4120 # include <direct.h>
4121 #endif
4122 int main() {
4123 mkdir ("foo", 0);
4124 ; return 0; }
4126 if { (eval echo configure:4127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4127 rm -rf conftest*
4128 gcc_cv_mkdir_takes_one_arg=no
4129 else
4130 echo "configure: failed program was:" >&5
4131 cat conftest.$ac_ext >&5
4132 rm -rf conftest*
4133 gcc_cv_mkdir_takes_one_arg=yes
4135 rm -f conftest*
4138 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4139 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4140 cat >> confdefs.h <<\EOF
4141 #define MKDIR_TAKES_ONE_ARG 1
4147 # File extensions
4148 manext='.1'
4149 objext='.o'
4153 build_xm_file=
4154 build_xm_defines=
4155 build_install_headers_dir=install-headers-tar
4156 build_exeext=
4157 host_xm_file=
4158 host_xm_defines=
4159 host_xmake_file=
4160 host_truncate_target=
4161 host_exeext=
4163 # Decode the host machine, then the target machine.
4164 # For the host machine, we save the xm_file variable as host_xm_file;
4165 # then we decode the target machine and forget everything else
4166 # that came from the host machine.
4167 for machine in $build $host $target; do
4168 . ${srcdir}/config.gcc
4169 done
4171 extra_objs="${host_extra_objs} ${extra_objs}"
4173 # Default the target-machine variables that were not explicitly set.
4174 if test x"$tm_file" = x
4175 then tm_file=$cpu_type/$cpu_type.h; fi
4177 if test x"$extra_headers" = x
4178 then extra_headers=; fi
4180 if test x"$xm_file" = x
4181 then xm_file=$cpu_type/xm-$cpu_type.h; fi
4183 if test x$md_file = x
4184 then md_file=$cpu_type/$cpu_type.md; fi
4186 if test x$out_file = x
4187 then out_file=$cpu_type/$cpu_type.c; fi
4189 if test x"$tmake_file" = x
4190 then tmake_file=$cpu_type/t-$cpu_type
4193 if test x"$dwarf2" = xyes
4194 then tm_file="$tm_file tm-dwarf2.h"
4197 if test x$float_format = x
4198 then float_format=i64
4201 if test $float_format = none
4202 then float_h_file=Makefile.in
4203 else float_h_file=float-$float_format.h
4206 # Handle cpp installation.
4207 if test x$enable_cpp != xno
4208 then
4209 tmake_file="$tmake_file t-install-cpp"
4212 # Say what files are being used for the output code and MD file.
4213 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4214 echo "Using \`$srcdir/config/$md_file' as machine description file."
4216 # If any of the xm_file variables contain nonexistent files, warn
4217 # about them and drop them. But $cpu/xm-$cpu.h is allowed not to
4218 # exist, if we have nothing for it to do.
4221 for x in $build_xm_file; do
4222 if test -f $srcdir/config/$x
4223 then bx="$bx $x"
4224 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4225 then :
4226 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4228 done
4229 build_xm_file="$bx"
4232 for x in $host_xm_file; do
4233 if test -f $srcdir/config/$x
4234 then hx="$hx $x"
4235 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4236 then :
4237 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4239 done
4240 host_xm_file="$hx"
4243 for x in $xm_file; do
4244 if test -f $srcdir/config/$x
4245 then tx="$tx $x"
4246 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4247 then :
4248 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4250 done
4251 xm_file="$tx"
4253 count=a
4254 for f in $tm_file; do
4255 count=${count}x
4256 done
4257 if test $count = ax; then
4258 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4259 else
4260 echo "Using the following target machine macro files:"
4261 for f in $tm_file; do
4262 echo " $srcdir/config/$f"
4263 done
4266 count=a
4267 for f in $host_xm_file; do
4268 count=${count}x
4269 done
4270 if test $count = a; then
4272 elif test $count = ax; then
4273 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4274 else
4275 echo "Using the following host machine macro files:"
4276 for f in $host_xm_file; do
4277 echo " $srcdir/config/$f"
4278 done
4281 if test "$host_xm_file" != "$build_xm_file"; then
4282 count=a
4283 for f in $build_xm_file; do
4284 count=${count}x
4285 done
4286 if test $count = a; then
4288 elif test $count = ax; then
4289 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4290 else
4291 echo "Using the following build machine macro files:"
4292 for f in $build_xm_file; do
4293 echo " $srcdir/config/$f"
4294 done
4298 if test x$thread_file = x; then
4299 if test x$target_thread_file != x; then
4300 thread_file=$target_thread_file
4301 else
4302 thread_file='single'
4306 # auto-host.h is the file containing items generated by autoconf and is
4307 # the first file included by config.h.
4308 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} defaults.h hwint.h"
4310 # If host=build, it is correct to have hconfig include auto-host.h
4311 # as well. If host!=build, we are in error and need to do more
4312 # work to find out the build config parameters.
4313 if test x$host = x$build
4314 then
4315 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4316 else
4317 # We create a subdir, then run autoconf in the subdir.
4318 # To prevent recursion we set host and build for the new
4319 # invocation of configure to the build for this invocation
4320 # of configure.
4321 tempdir=build.$$
4322 rm -rf $tempdir
4323 mkdir $tempdir
4324 cd $tempdir
4325 case ${srcdir} in
4326 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4327 *) realsrcdir=../${srcdir};;
4328 esac
4329 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4330 --target=$target --host=$build --build=$build
4332 # We just finished tests for the build machine, so rename
4333 # the file auto-build.h in the gcc directory.
4334 mv auto-host.h ../auto-build.h
4335 cd ..
4336 rm -rf $tempdir
4337 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4340 xm_file="gansidecl.h ${xm_file} defaults.h"
4341 tm_file="gansidecl.h ${tm_file} defaults.h"
4343 # Truncate the target if necessary
4344 if test x$host_truncate_target != x; then
4345 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4348 # Get the version trigger filename from the toplevel
4349 if test "${with_gcc_version_trigger+set}" = set; then
4350 gcc_version_trigger=$with_gcc_version_trigger
4351 else
4352 gcc_version_trigger=${srcdir}/version.c
4354 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
4355 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4357 # Compile in configure arguments.
4358 if test -f configargs.h ; then
4359 # Being re-configured.
4360 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
4361 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4362 else
4363 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4365 cat > configargs.h <<EOF
4366 /* Generated automatically. */
4367 static const char configuration_arguments[] = "$gcc_config_arguments";
4368 static const char thread_model[] = "$thread_file";
4371 # Internationalization
4372 PACKAGE=gcc
4373 VERSION="$gcc_version"
4374 cat >> confdefs.h <<EOF
4375 #define PACKAGE "$PACKAGE"
4378 cat >> confdefs.h <<EOF
4379 #define VERSION "$VERSION"
4385 ALL_LINGUAS=
4387 # Enable NLS support by default
4388 # Check whether --enable-nls or --disable-nls was given.
4389 if test "${enable_nls+set}" = set; then
4390 enableval="$enable_nls"
4392 else
4393 enable_nls=yes
4397 # if cross compiling, disable NLS support.
4398 # It's not worth the trouble, at least for now.
4400 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4401 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4402 enable_nls=no
4405 # if NLS is enabled, also enable check in po subdir
4406 if test $enable_nls = yes; then
4407 CHECK_PO=check-po
4408 else
4409 CHECK_PO=""
4415 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4416 echo "configure:4417: checking for strerror in -lcposix" >&5
4417 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421 ac_save_LIBS="$LIBS"
4422 LIBS="-lcposix $LIBS"
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 /* Override any gcc2 internal prototype to avoid an error. */
4427 /* We use char because int might match the return type of a gcc2
4428 builtin and then its argument prototype would still apply. */
4429 char strerror();
4431 int main() {
4432 strerror()
4433 ; return 0; }
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436 rm -rf conftest*
4437 eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439 echo "configure: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
4441 rm -rf conftest*
4442 eval "ac_cv_lib_$ac_lib_var=no"
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449 echo "$ac_t""yes" 1>&6
4450 LIBS="$LIBS -lcposix"
4451 else
4452 echo "$ac_t""no" 1>&6
4457 echo $ac_n "checking for working const""... $ac_c" 1>&6
4458 echo "configure:4459: checking for working const" >&5
4459 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4460 echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4466 int main() {
4468 /* Ultrix mips cc rejects this. */
4469 typedef int charset[2]; const charset x;
4470 /* SunOS 4.1.1 cc rejects this. */
4471 char const *const *ccp;
4472 char **p;
4473 /* NEC SVR4.0.2 mips cc rejects this. */
4474 struct point {int x, y;};
4475 static struct point const zero = {0,0};
4476 /* AIX XL C 1.02.0.0 rejects this.
4477 It does not let you subtract one const X* pointer from another in an arm
4478 of an if-expression whose if-part is not a constant expression */
4479 const char *g = "string";
4480 ccp = &g + (g ? g-g : 0);
4481 /* HPUX 7.0 cc rejects these. */
4482 ++ccp;
4483 p = (char**) ccp;
4484 ccp = (char const *const *) p;
4485 { /* SCO 3.2v4 cc rejects this. */
4486 char *t;
4487 char const *s = 0 ? (char *) 0 : (char const *) 0;
4489 *t++ = 0;
4491 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4492 int x[] = {25, 17};
4493 const int *foo = &x[0];
4494 ++foo;
4496 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4497 typedef const int *iptr;
4498 iptr p = 0;
4499 ++p;
4501 { /* AIX XL C 1.02.0.0 rejects this saying
4502 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4503 struct s { int j; const int *ap[3]; };
4504 struct s *b; b->j = 5;
4506 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4507 const int foo = 10;
4510 ; return 0; }
4512 if { (eval echo configure:4513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4513 rm -rf conftest*
4514 ac_cv_c_const=yes
4515 else
4516 echo "configure: failed program was:" >&5
4517 cat conftest.$ac_ext >&5
4518 rm -rf conftest*
4519 ac_cv_c_const=no
4521 rm -f conftest*
4524 echo "$ac_t""$ac_cv_c_const" 1>&6
4525 if test $ac_cv_c_const = no; then
4526 cat >> confdefs.h <<\EOF
4527 #define const
4532 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4533 echo "configure:4534: checking for off_t" >&5
4534 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4535 echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537 cat > conftest.$ac_ext <<EOF
4538 #line 4539 "configure"
4539 #include "confdefs.h"
4540 #include <sys/types.h>
4541 #if STDC_HEADERS
4542 #include <stdlib.h>
4543 #include <stddef.h>
4544 #endif
4546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4547 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4548 rm -rf conftest*
4549 ac_cv_type_off_t=yes
4550 else
4551 rm -rf conftest*
4552 ac_cv_type_off_t=no
4554 rm -f conftest*
4557 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4558 if test $ac_cv_type_off_t = no; then
4559 cat >> confdefs.h <<\EOF
4560 #define off_t long
4565 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4566 echo "configure:4567: checking for size_t" >&5
4567 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4568 echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <sys/types.h>
4574 #if STDC_HEADERS
4575 #include <stdlib.h>
4576 #include <stddef.h>
4577 #endif
4579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4580 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4581 rm -rf conftest*
4582 ac_cv_type_size_t=yes
4583 else
4584 rm -rf conftest*
4585 ac_cv_type_size_t=no
4587 rm -f conftest*
4590 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4591 if test $ac_cv_type_size_t = no; then
4592 cat >> confdefs.h <<\EOF
4593 #define size_t unsigned
4598 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4599 # for constant arguments. Useless!
4600 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4601 echo "configure:4602: checking for working alloca.h" >&5
4602 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4603 echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <alloca.h>
4609 int main() {
4610 char *p = alloca(2 * sizeof(int));
4611 ; return 0; }
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4614 rm -rf conftest*
4615 ac_cv_header_alloca_h=yes
4616 else
4617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4619 rm -rf conftest*
4620 ac_cv_header_alloca_h=no
4622 rm -f conftest*
4625 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4626 if test $ac_cv_header_alloca_h = yes; then
4627 cat >> confdefs.h <<\EOF
4628 #define HAVE_ALLOCA_H 1
4633 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4634 echo "configure:4635: checking for alloca" >&5
4635 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4636 echo $ac_n "(cached) $ac_c" 1>&6
4637 else
4638 cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4642 #ifdef __GNUC__
4643 # define alloca __builtin_alloca
4644 #else
4645 # ifdef _MSC_VER
4646 # include <malloc.h>
4647 # define alloca _alloca
4648 # else
4649 # if HAVE_ALLOCA_H
4650 # include <alloca.h>
4651 # else
4652 # ifdef _AIX
4653 #pragma alloca
4654 # else
4655 # ifndef alloca /* predefined by HP cc +Olibcalls */
4656 char *alloca ();
4657 # endif
4658 # endif
4659 # endif
4660 # endif
4661 #endif
4663 int main() {
4664 char *p = (char *) alloca(1);
4665 ; return 0; }
4667 if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4668 rm -rf conftest*
4669 ac_cv_func_alloca_works=yes
4670 else
4671 echo "configure: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4673 rm -rf conftest*
4674 ac_cv_func_alloca_works=no
4676 rm -f conftest*
4679 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4680 if test $ac_cv_func_alloca_works = yes; then
4681 cat >> confdefs.h <<\EOF
4682 #define HAVE_ALLOCA 1
4687 if test $ac_cv_func_alloca_works = no; then
4688 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4689 # that cause trouble. Some versions do not even contain alloca or
4690 # contain a buggy version. If you still want to use their alloca,
4691 # use ar to extract alloca.o from them instead of compiling alloca.c.
4692 ALLOCA=alloca.${ac_objext}
4693 cat >> confdefs.h <<\EOF
4694 #define C_ALLOCA 1
4698 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4699 echo "configure:4700: checking whether alloca needs Cray hooks" >&5
4700 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4701 echo $ac_n "(cached) $ac_c" 1>&6
4702 else
4703 cat > conftest.$ac_ext <<EOF
4704 #line 4705 "configure"
4705 #include "confdefs.h"
4706 #if defined(CRAY) && ! defined(CRAY2)
4707 webecray
4708 #else
4709 wenotbecray
4710 #endif
4713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4714 egrep "webecray" >/dev/null 2>&1; then
4715 rm -rf conftest*
4716 ac_cv_os_cray=yes
4717 else
4718 rm -rf conftest*
4719 ac_cv_os_cray=no
4721 rm -f conftest*
4725 echo "$ac_t""$ac_cv_os_cray" 1>&6
4726 if test $ac_cv_os_cray = yes; then
4727 for ac_func in _getb67 GETB67 getb67; do
4728 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4729 echo "configure:4730: checking for $ac_func" >&5
4730 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4731 echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733 cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736 /* System header to define __stub macros and hopefully few prototypes,
4737 which can conflict with char $ac_func(); below. */
4738 #include <assert.h>
4739 /* Override any gcc2 internal prototype to avoid an error. */
4740 /* We use char because int might match the return type of a gcc2
4741 builtin and then its argument prototype would still apply. */
4742 char $ac_func();
4744 int main() {
4746 /* The GNU C library defines this for functions which it implements
4747 to always fail with ENOSYS. Some functions are actually named
4748 something starting with __ and the normal name is an alias. */
4749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4750 choke me
4751 #else
4752 $ac_func();
4753 #endif
4755 ; return 0; }
4757 if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4758 rm -rf conftest*
4759 eval "ac_cv_func_$ac_func=yes"
4760 else
4761 echo "configure: failed program was:" >&5
4762 cat conftest.$ac_ext >&5
4763 rm -rf conftest*
4764 eval "ac_cv_func_$ac_func=no"
4766 rm -f conftest*
4769 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4770 echo "$ac_t""yes" 1>&6
4771 cat >> confdefs.h <<EOF
4772 #define CRAY_STACKSEG_END $ac_func
4775 break
4776 else
4777 echo "$ac_t""no" 1>&6
4780 done
4783 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4784 echo "configure:4785: checking stack direction for C alloca" >&5
4785 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4786 echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788 if test "$cross_compiling" = yes; then
4789 ac_cv_c_stack_direction=0
4790 else
4791 cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 find_stack_direction ()
4796 static char *addr = 0;
4797 auto char dummy;
4798 if (addr == 0)
4800 addr = &dummy;
4801 return find_stack_direction ();
4803 else
4804 return (&dummy > addr) ? 1 : -1;
4806 main ()
4808 exit (find_stack_direction() < 0);
4811 if { (eval echo configure:4812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4812 then
4813 ac_cv_c_stack_direction=1
4814 else
4815 echo "configure: failed program was:" >&5
4816 cat conftest.$ac_ext >&5
4817 rm -fr conftest*
4818 ac_cv_c_stack_direction=-1
4820 rm -fr conftest*
4825 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4826 cat >> confdefs.h <<EOF
4827 #define STACK_DIRECTION $ac_cv_c_stack_direction
4833 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4834 unistd.h sys/param.h
4836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4838 echo "configure:4839: checking for $ac_hdr" >&5
4839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4840 echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842 cat > conftest.$ac_ext <<EOF
4843 #line 4844 "configure"
4844 #include "confdefs.h"
4845 #include <$ac_hdr>
4847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4848 { (eval echo configure:4849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4850 if test -z "$ac_err"; then
4851 rm -rf conftest*
4852 eval "ac_cv_header_$ac_safe=yes"
4853 else
4854 echo "$ac_err" >&5
4855 echo "configure: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 rm -rf conftest*
4858 eval "ac_cv_header_$ac_safe=no"
4860 rm -f conftest*
4862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4863 echo "$ac_t""yes" 1>&6
4864 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4865 cat >> confdefs.h <<EOF
4866 #define $ac_tr_hdr 1
4869 else
4870 echo "$ac_t""no" 1>&6
4872 done
4874 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4875 strdup __argz_count __argz_stringify __argz_next
4877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4878 echo "configure:4879: checking for $ac_func" >&5
4879 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4880 echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 /* System header to define __stub macros and hopefully few prototypes,
4886 which can conflict with char $ac_func(); below. */
4887 #include <assert.h>
4888 /* Override any gcc2 internal prototype to avoid an error. */
4889 /* We use char because int might match the return type of a gcc2
4890 builtin and then its argument prototype would still apply. */
4891 char $ac_func();
4893 int main() {
4895 /* The GNU C library defines this for functions which it implements
4896 to always fail with ENOSYS. Some functions are actually named
4897 something starting with __ and the normal name is an alias. */
4898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4899 choke me
4900 #else
4901 $ac_func();
4902 #endif
4904 ; return 0; }
4906 if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4907 rm -rf conftest*
4908 eval "ac_cv_func_$ac_func=yes"
4909 else
4910 echo "configure: failed program was:" >&5
4911 cat conftest.$ac_ext >&5
4912 rm -rf conftest*
4913 eval "ac_cv_func_$ac_func=no"
4915 rm -f conftest*
4918 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4919 echo "$ac_t""yes" 1>&6
4920 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4921 cat >> confdefs.h <<EOF
4922 #define $ac_tr_func 1
4925 else
4926 echo "$ac_t""no" 1>&6
4928 done
4931 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4932 for ac_func in stpcpy
4934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4935 echo "configure:4936: checking for $ac_func" >&5
4936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4937 echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939 cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942 /* System header to define __stub macros and hopefully few prototypes,
4943 which can conflict with char $ac_func(); below. */
4944 #include <assert.h>
4945 /* Override any gcc2 internal prototype to avoid an error. */
4946 /* We use char because int might match the return type of a gcc2
4947 builtin and then its argument prototype would still apply. */
4948 char $ac_func();
4950 int main() {
4952 /* The GNU C library defines this for functions which it implements
4953 to always fail with ENOSYS. Some functions are actually named
4954 something starting with __ and the normal name is an alias. */
4955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4956 choke me
4957 #else
4958 $ac_func();
4959 #endif
4961 ; return 0; }
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964 rm -rf conftest*
4965 eval "ac_cv_func_$ac_func=yes"
4966 else
4967 echo "configure: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 rm -rf conftest*
4970 eval "ac_cv_func_$ac_func=no"
4972 rm -f conftest*
4975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4976 echo "$ac_t""yes" 1>&6
4977 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4978 cat >> confdefs.h <<EOF
4979 #define $ac_tr_func 1
4982 else
4983 echo "$ac_t""no" 1>&6
4985 done
4988 if test "${ac_cv_func_stpcpy}" = "yes"; then
4989 cat >> confdefs.h <<\EOF
4990 #define HAVE_STPCPY 1
4995 if test $ac_cv_header_locale_h = yes; then
4996 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4997 echo "configure:4998: checking for LC_MESSAGES" >&5
4998 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4999 echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001 cat > conftest.$ac_ext <<EOF
5002 #line 5003 "configure"
5003 #include "confdefs.h"
5004 #include <locale.h>
5005 int main() {
5006 return LC_MESSAGES
5007 ; return 0; }
5009 if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010 rm -rf conftest*
5011 am_cv_val_LC_MESSAGES=yes
5012 else
5013 echo "configure: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
5015 rm -rf conftest*
5016 am_cv_val_LC_MESSAGES=no
5018 rm -f conftest*
5021 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5022 if test $am_cv_val_LC_MESSAGES = yes; then
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_LC_MESSAGES 1
5029 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5030 echo "configure:5031: checking whether NLS is requested" >&5
5031 # Check whether --enable-nls or --disable-nls was given.
5032 if test "${enable_nls+set}" = set; then
5033 enableval="$enable_nls"
5034 USE_NLS=$enableval
5035 else
5036 USE_NLS=yes
5039 echo "$ac_t""$USE_NLS" 1>&6
5042 USE_INCLUDED_LIBINTL=no
5044 if test "$USE_NLS" = "yes"; then
5045 cat >> confdefs.h <<\EOF
5046 #define ENABLE_NLS 1
5049 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5050 echo "configure:5051: checking whether included gettext is requested" >&5
5051 # Check whether --with-included-gettext or --without-included-gettext was given.
5052 if test "${with_included_gettext+set}" = set; then
5053 withval="$with_included_gettext"
5054 nls_cv_force_use_gnu_gettext=$withval
5055 else
5056 nls_cv_force_use_gnu_gettext=no
5059 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5061 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5062 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5063 nls_cv_header_intl=
5064 nls_cv_header_libgt=
5065 CATOBJEXT=NONE
5067 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5068 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5069 echo "configure:5070: checking for libintl.h" >&5
5070 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5071 echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 #include <libintl.h>
5078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5079 { (eval echo configure:5080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5081 if test -z "$ac_err"; then
5082 rm -rf conftest*
5083 eval "ac_cv_header_$ac_safe=yes"
5084 else
5085 echo "$ac_err" >&5
5086 echo "configure: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
5088 rm -rf conftest*
5089 eval "ac_cv_header_$ac_safe=no"
5091 rm -f conftest*
5093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5094 echo "$ac_t""yes" 1>&6
5095 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5096 echo "configure:5097: checking for gettext in libc" >&5
5097 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
5098 echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100 cat > conftest.$ac_ext <<EOF
5101 #line 5102 "configure"
5102 #include "confdefs.h"
5103 #include <libintl.h>
5104 int main() {
5105 return (int) gettext ("")
5106 ; return 0; }
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109 rm -rf conftest*
5110 gt_cv_func_gettext_libc=yes
5111 else
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115 gt_cv_func_gettext_libc=no
5117 rm -f conftest*
5120 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
5122 if test "$gt_cv_func_gettext_libc" != "yes"; then
5123 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5124 echo "configure:5125: checking for bindtextdomain in -lintl" >&5
5125 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5127 echo $ac_n "(cached) $ac_c" 1>&6
5128 else
5129 ac_save_LIBS="$LIBS"
5130 LIBS="-lintl $LIBS"
5131 cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134 /* Override any gcc2 internal prototype to avoid an error. */
5135 /* We use char because int might match the return type of a gcc2
5136 builtin and then its argument prototype would still apply. */
5137 char bindtextdomain();
5139 int main() {
5140 bindtextdomain()
5141 ; return 0; }
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5144 rm -rf conftest*
5145 eval "ac_cv_lib_$ac_lib_var=yes"
5146 else
5147 echo "configure: failed program was:" >&5
5148 cat conftest.$ac_ext >&5
5149 rm -rf conftest*
5150 eval "ac_cv_lib_$ac_lib_var=no"
5152 rm -f conftest*
5153 LIBS="$ac_save_LIBS"
5156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5157 echo "$ac_t""yes" 1>&6
5158 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5159 echo "configure:5160: checking for gettext in libintl" >&5
5160 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
5164 echo "configure:5165: checking for gettext in -lintl" >&5
5165 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5166 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5167 echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169 ac_save_LIBS="$LIBS"
5170 LIBS="-lintl $LIBS"
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174 /* Override any gcc2 internal prototype to avoid an error. */
5175 /* We use char because int might match the return type of a gcc2
5176 builtin and then its argument prototype would still apply. */
5177 char gettext();
5179 int main() {
5180 gettext()
5181 ; return 0; }
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184 rm -rf conftest*
5185 eval "ac_cv_lib_$ac_lib_var=yes"
5186 else
5187 echo "configure: failed program was:" >&5
5188 cat conftest.$ac_ext >&5
5189 rm -rf conftest*
5190 eval "ac_cv_lib_$ac_lib_var=no"
5192 rm -f conftest*
5193 LIBS="$ac_save_LIBS"
5196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5197 echo "$ac_t""yes" 1>&6
5198 gt_cv_func_gettext_libintl=yes
5199 else
5200 echo "$ac_t""no" 1>&6
5201 gt_cv_func_gettext_libintl=no
5206 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5207 else
5208 echo "$ac_t""no" 1>&6
5213 if test "$gt_cv_func_gettext_libintl" = "yes"; then
5214 LIBS="-lintl $LIBS"
5217 if test "$gt_cv_func_gettext_libc" = "yes" \
5218 || test "$gt_cv_func_gettext_libintl" = "yes"; then
5219 cat >> confdefs.h <<\EOF
5220 #define HAVE_GETTEXT 1
5223 # Extract the first word of "msgfmt", so it can be a program name with args.
5224 set dummy msgfmt; ac_word=$2
5225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5226 echo "configure:5227: checking for $ac_word" >&5
5227 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5228 echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230 case "$MSGFMT" in
5232 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5235 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5236 for ac_dir in $PATH; do
5237 test -z "$ac_dir" && ac_dir=.
5238 if test -f $ac_dir/$ac_word; then
5239 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5240 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5241 break
5244 done
5245 IFS="$ac_save_ifs"
5246 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
5248 esac
5250 MSGFMT="$gcc_cv_path_MSGFMT"
5251 if test -n "$MSGFMT"; then
5252 echo "$ac_t""$MSGFMT" 1>&6
5253 else
5254 echo "$ac_t""no" 1>&6
5256 if test "$MSGFMT" != "no"; then
5257 for ac_func in dcgettext
5259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5260 echo "configure:5261: checking for $ac_func" >&5
5261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5262 echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264 cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267 /* System header to define __stub macros and hopefully few prototypes,
5268 which can conflict with char $ac_func(); below. */
5269 #include <assert.h>
5270 /* Override any gcc2 internal prototype to avoid an error. */
5271 /* We use char because int might match the return type of a gcc2
5272 builtin and then its argument prototype would still apply. */
5273 char $ac_func();
5275 int main() {
5277 /* The GNU C library defines this for functions which it implements
5278 to always fail with ENOSYS. Some functions are actually named
5279 something starting with __ and the normal name is an alias. */
5280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5281 choke me
5282 #else
5283 $ac_func();
5284 #endif
5286 ; return 0; }
5288 if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5289 rm -rf conftest*
5290 eval "ac_cv_func_$ac_func=yes"
5291 else
5292 echo "configure: failed program was:" >&5
5293 cat conftest.$ac_ext >&5
5294 rm -rf conftest*
5295 eval "ac_cv_func_$ac_func=no"
5297 rm -f conftest*
5300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5301 echo "$ac_t""yes" 1>&6
5302 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5303 cat >> confdefs.h <<EOF
5304 #define $ac_tr_func 1
5307 else
5308 echo "$ac_t""no" 1>&6
5310 done
5312 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5313 set dummy gmsgfmt; ac_word=$2
5314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5315 echo "configure:5316: checking for $ac_word" >&5
5316 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5317 echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319 case "$GMSGFMT" in
5321 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5323 ?:/*)
5324 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5328 ac_dummy="$PATH"
5329 for ac_dir in $ac_dummy; do
5330 test -z "$ac_dir" && ac_dir=.
5331 if test -f $ac_dir/$ac_word; then
5332 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5333 break
5335 done
5336 IFS="$ac_save_ifs"
5337 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5339 esac
5341 GMSGFMT="$gcc_cv_path_GMSGFMT"
5342 if test -n "$GMSGFMT"; then
5343 echo "$ac_t""$GMSGFMT" 1>&6
5344 else
5345 echo "$ac_t""no" 1>&6
5348 # Extract the first word of "xgettext", so it can be a program name with args.
5349 set dummy xgettext; ac_word=$2
5350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5351 echo "configure:5352: checking for $ac_word" >&5
5352 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5353 echo $ac_n "(cached) $ac_c" 1>&6
5354 else
5355 case "$XGETTEXT" in
5357 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5360 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5361 for ac_dir in $PATH; do
5362 test -z "$ac_dir" && ac_dir=.
5363 if test -f $ac_dir/$ac_word; then
5364 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5365 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5366 break
5369 done
5370 IFS="$ac_save_ifs"
5371 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5373 esac
5375 XGETTEXT="$gcc_cv_path_XGETTEXT"
5376 if test -n "$XGETTEXT"; then
5377 echo "$ac_t""$XGETTEXT" 1>&6
5378 else
5379 echo "$ac_t""no" 1>&6
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5386 int main() {
5387 extern int _nl_msg_cat_cntr;
5388 return _nl_msg_cat_cntr
5389 ; return 0; }
5391 if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392 rm -rf conftest*
5393 CATOBJEXT=.gmo
5394 DATADIRNAME=share
5395 else
5396 echo "configure: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
5398 rm -rf conftest*
5399 CATOBJEXT=.mo
5400 DATADIRNAME=lib
5402 rm -f conftest*
5403 INSTOBJEXT=.mo
5404 else
5405 create_catalogs="no"
5409 else
5410 echo "$ac_t""no" 1>&6
5414 if test "$CATOBJEXT" = "NONE"; then
5415 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
5416 echo "configure:5417: checking whether catgets can be used" >&5
5417 # Check whether --with-catgets or --without-catgets was given.
5418 if test "${with_catgets+set}" = set; then
5419 withval="$with_catgets"
5420 nls_cv_use_catgets=$withval
5421 else
5422 nls_cv_use_catgets=no
5425 echo "$ac_t""$nls_cv_use_catgets" 1>&6
5427 if test "$nls_cv_use_catgets" = "yes"; then
5428 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
5429 echo "configure:5430: checking for main in -li" >&5
5430 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5432 echo $ac_n "(cached) $ac_c" 1>&6
5433 else
5434 ac_save_LIBS="$LIBS"
5435 LIBS="-li $LIBS"
5436 cat > conftest.$ac_ext <<EOF
5437 #line 5438 "configure"
5438 #include "confdefs.h"
5440 int main() {
5441 main()
5442 ; return 0; }
5444 if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5445 rm -rf conftest*
5446 eval "ac_cv_lib_$ac_lib_var=yes"
5447 else
5448 echo "configure: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
5450 rm -rf conftest*
5451 eval "ac_cv_lib_$ac_lib_var=no"
5453 rm -f conftest*
5454 LIBS="$ac_save_LIBS"
5457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5458 echo "$ac_t""yes" 1>&6
5459 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5460 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5461 cat >> confdefs.h <<EOF
5462 #define $ac_tr_lib 1
5465 LIBS="-li $LIBS"
5467 else
5468 echo "$ac_t""no" 1>&6
5471 echo $ac_n "checking for catgets""... $ac_c" 1>&6
5472 echo "configure:5473: checking for catgets" >&5
5473 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5474 echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476 cat > conftest.$ac_ext <<EOF
5477 #line 5478 "configure"
5478 #include "confdefs.h"
5479 /* System header to define __stub macros and hopefully few prototypes,
5480 which can conflict with char catgets(); below. */
5481 #include <assert.h>
5482 /* Override any gcc2 internal prototype to avoid an error. */
5483 /* We use char because int might match the return type of a gcc2
5484 builtin and then its argument prototype would still apply. */
5485 char catgets();
5487 int main() {
5489 /* The GNU C library defines this for functions which it implements
5490 to always fail with ENOSYS. Some functions are actually named
5491 something starting with __ and the normal name is an alias. */
5492 #if defined (__stub_catgets) || defined (__stub___catgets)
5493 choke me
5494 #else
5495 catgets();
5496 #endif
5498 ; return 0; }
5500 if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5501 rm -rf conftest*
5502 eval "ac_cv_func_catgets=yes"
5503 else
5504 echo "configure: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 rm -rf conftest*
5507 eval "ac_cv_func_catgets=no"
5509 rm -f conftest*
5512 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5513 echo "$ac_t""yes" 1>&6
5514 cat >> confdefs.h <<\EOF
5515 #define HAVE_CATGETS 1
5518 INTLOBJS="\$(CATOBJS)"
5519 # Extract the first word of "gencat", so it can be a program name with args.
5520 set dummy gencat; ac_word=$2
5521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5522 echo "configure:5523: checking for $ac_word" >&5
5523 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5524 echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526 case "$GENCAT" in
5528 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5530 ?:/*)
5531 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5535 ac_dummy="$PATH"
5536 for ac_dir in $ac_dummy; do
5537 test -z "$ac_dir" && ac_dir=.
5538 if test -f $ac_dir/$ac_word; then
5539 gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5540 break
5542 done
5543 IFS="$ac_save_ifs"
5544 test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5546 esac
5548 GENCAT="$gcc_cv_path_GENCAT"
5549 if test -n "$GENCAT"; then
5550 echo "$ac_t""$GENCAT" 1>&6
5551 else
5552 echo "$ac_t""no" 1>&6
5554 if test "$GENCAT" != "no"; then
5555 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5556 set dummy gmsgfmt; ac_word=$2
5557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5558 echo "configure:5559: checking for $ac_word" >&5
5559 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5560 echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562 case "$GMSGFMT" in
5564 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5566 ?:/*)
5567 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5570 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5571 ac_dummy="$PATH"
5572 for ac_dir in $ac_dummy; do
5573 test -z "$ac_dir" && ac_dir=.
5574 if test -f $ac_dir/$ac_word; then
5575 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5576 break
5578 done
5579 IFS="$ac_save_ifs"
5580 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5582 esac
5584 GMSGFMT="$gcc_cv_path_GMSGFMT"
5585 if test -n "$GMSGFMT"; then
5586 echo "$ac_t""$GMSGFMT" 1>&6
5587 else
5588 echo "$ac_t""no" 1>&6
5591 if test "$GMSGFMT" = "no"; then
5592 # Extract the first word of "msgfmt", so it can be a program name with args.
5593 set dummy msgfmt; ac_word=$2
5594 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5595 echo "configure:5596: checking for $ac_word" >&5
5596 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
5598 else
5599 case "$GMSGFMT" in
5601 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5604 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5605 for ac_dir in $PATH; do
5606 test -z "$ac_dir" && ac_dir=.
5607 if test -f $ac_dir/$ac_word; then
5608 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5609 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5610 break
5613 done
5614 IFS="$ac_save_ifs"
5615 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5617 esac
5619 GMSGFMT="$gcc_cv_path_GMSGFMT"
5620 if test -n "$GMSGFMT"; then
5621 echo "$ac_t""$GMSGFMT" 1>&6
5622 else
5623 echo "$ac_t""no" 1>&6
5626 if test "$GMSGFMT" = "msgfmt"; then
5627 create_catalogs="no"
5630 # Extract the first word of "xgettext", so it can be a program name with args.
5631 set dummy xgettext; ac_word=$2
5632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5633 echo "configure:5634: checking for $ac_word" >&5
5634 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5635 echo $ac_n "(cached) $ac_c" 1>&6
5636 else
5637 case "$XGETTEXT" in
5639 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5642 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5643 for ac_dir in $PATH; do
5644 test -z "$ac_dir" && ac_dir=.
5645 if test -f $ac_dir/$ac_word; then
5646 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5647 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5648 break
5651 done
5652 IFS="$ac_save_ifs"
5653 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5655 esac
5657 XGETTEXT="$gcc_cv_path_XGETTEXT"
5658 if test -n "$XGETTEXT"; then
5659 echo "$ac_t""$XGETTEXT" 1>&6
5660 else
5661 echo "$ac_t""no" 1>&6
5664 USE_INCLUDED_LIBINTL=yes
5665 CATOBJEXT=.cat
5666 INSTOBJEXT=.cat
5667 DATADIRNAME=lib
5668 INTLDEPS='$(top_builddir)/intl/libintl.a'
5669 INTLLIBS=$INTLDEPS
5670 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5671 nls_cv_header_intl=intl/libintl.h
5672 nls_cv_header_libgt=intl/libgettext.h
5674 else
5675 echo "$ac_t""no" 1>&6
5681 if test "$CATOBJEXT" = "NONE"; then
5682 nls_cv_use_gnu_gettext=yes
5686 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5687 INTLOBJS="\$(GETTOBJS)"
5688 # Extract the first word of "msgfmt", so it can be a program name with args.
5689 set dummy msgfmt; ac_word=$2
5690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5691 echo "configure:5692: checking for $ac_word" >&5
5692 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5693 echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695 case "$MSGFMT" in
5697 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5701 for ac_dir in $PATH; do
5702 test -z "$ac_dir" && ac_dir=.
5703 if test -f $ac_dir/$ac_word; then
5704 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5705 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5706 break
5709 done
5710 IFS="$ac_save_ifs"
5711 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5713 esac
5715 MSGFMT="$gcc_cv_path_MSGFMT"
5716 if test -n "$MSGFMT"; then
5717 echo "$ac_t""$MSGFMT" 1>&6
5718 else
5719 echo "$ac_t""no" 1>&6
5722 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5723 set dummy gmsgfmt; ac_word=$2
5724 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5725 echo "configure:5726: checking for $ac_word" >&5
5726 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5727 echo $ac_n "(cached) $ac_c" 1>&6
5728 else
5729 case "$GMSGFMT" in
5731 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5733 ?:/*)
5734 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5737 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5738 ac_dummy="$PATH"
5739 for ac_dir in $ac_dummy; do
5740 test -z "$ac_dir" && ac_dir=.
5741 if test -f $ac_dir/$ac_word; then
5742 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5743 break
5745 done
5746 IFS="$ac_save_ifs"
5747 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5749 esac
5751 GMSGFMT="$gcc_cv_path_GMSGFMT"
5752 if test -n "$GMSGFMT"; then
5753 echo "$ac_t""$GMSGFMT" 1>&6
5754 else
5755 echo "$ac_t""no" 1>&6
5758 if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5759 create_catalogs="no"
5761 # Extract the first word of "xgettext", so it can be a program name with args.
5762 set dummy xgettext; ac_word=$2
5763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5764 echo "configure:5765: checking for $ac_word" >&5
5765 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5766 echo $ac_n "(cached) $ac_c" 1>&6
5767 else
5768 case "$XGETTEXT" in
5770 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5773 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5774 for ac_dir in $PATH; do
5775 test -z "$ac_dir" && ac_dir=.
5776 if test -f $ac_dir/$ac_word; then
5777 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5778 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5779 break
5782 done
5783 IFS="$ac_save_ifs"
5784 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5786 esac
5788 XGETTEXT="$gcc_cv_path_XGETTEXT"
5789 if test -n "$XGETTEXT"; then
5790 echo "$ac_t""$XGETTEXT" 1>&6
5791 else
5792 echo "$ac_t""no" 1>&6
5796 USE_INCLUDED_LIBINTL=yes
5797 CATOBJEXT=.gmo
5798 INSTOBJEXT=.mo
5799 DATADIRNAME=share
5800 INTLDEPS='$(top_builddir)/intl/libintl.a'
5801 INTLLIBS=$INTLDEPS
5802 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5803 nls_cv_header_intl=intl/libintl.h
5804 nls_cv_header_libgt=intl/libgettext.h
5807 if test "$XGETTEXT" != ":"; then
5808 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5810 else
5811 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5812 XGETTEXT=":"
5818 # We need to process the po/ directory.
5819 POSUB=po
5820 else
5821 DATADIRNAME=share
5822 nls_cv_header_intl=intl/libintl.h
5823 nls_cv_header_libgt=intl/libgettext.h
5829 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5830 # because some of the sources are only built for this goal.
5831 if test "$PACKAGE" = gettext; then
5832 USE_NLS=yes
5833 USE_INCLUDED_LIBINTL=yes
5836 for lang in $ALL_LINGUAS; do
5837 GMOFILES="$GMOFILES $lang.gmo"
5838 POFILES="$POFILES $lang.po"
5839 done
5854 if test "x$create_catalogs" = "xno"; then
5855 echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5858 if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
5859 if test "x$ALL_LINGUAS" = "x"; then
5860 LINGUAS=
5861 else
5862 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5863 echo "configure:5864: checking for catalogs to be installed" >&5
5864 if test "x$LINGUAS" = "x"; then
5865 LINGUAS=$ALL_LINGUAS
5866 else
5867 NEW_LINGUAS=
5868 for lang in $ALL_LINGUAS; do
5869 case " $LINGUAS " in
5870 *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5871 esac
5872 done
5873 LINGUAS=$NEW_LINGUAS
5875 echo "$ac_t""$LINGUAS" 1>&6
5878 if test -n "$LINGUAS"; then
5879 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5883 if test $ac_cv_header_locale_h = yes; then
5884 INCLUDE_LOCALE_H="#include <locale.h>"
5885 else
5886 INCLUDE_LOCALE_H="\
5887 /* The system does not provide the header <locale.h>. Take care yourself. */"
5891 test -d intl || mkdir intl
5892 if test "$CATOBJEXT" = ".cat"; then
5893 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5894 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5895 echo "configure:5896: checking for linux/version.h" >&5
5896 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5897 echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 #include <linux/version.h>
5904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5905 { (eval echo configure:5906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5907 if test -z "$ac_err"; then
5908 rm -rf conftest*
5909 eval "ac_cv_header_$ac_safe=yes"
5910 else
5911 echo "$ac_err" >&5
5912 echo "configure: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 rm -rf conftest*
5915 eval "ac_cv_header_$ac_safe=no"
5917 rm -f conftest*
5919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5920 echo "$ac_t""yes" 1>&6
5921 msgformat=linux
5922 else
5923 echo "$ac_t""no" 1>&6
5924 msgformat=xopen
5928 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
5930 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5931 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
5933 if test "$PACKAGE" = "gettext"; then
5934 GT_NO="#NO#"
5935 GT_YES=
5936 else
5937 GT_NO=
5938 GT_YES="#YES#"
5943 MKINSTALLDIRS=
5944 if test -n "$ac_aux_dir"; then
5945 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5947 if test -z "$MKINSTALLDIRS"; then
5948 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5955 test -d po || mkdir po
5956 if test "x$srcdir" != "x."; then
5957 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5958 posrcprefix="$srcdir/"
5959 else
5960 posrcprefix="../$srcdir/"
5962 else
5963 posrcprefix="../"
5965 rm -f po/POTFILES
5966 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5967 < $srcdir/po/POTFILES.in > po/POTFILES
5969 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
5971 # Windows32 Registry support for specifying GCC installation paths.
5972 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5973 if test "${enable_win32_registry+set}" = set; then
5974 enableval="$enable_win32_registry"
5979 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5980 echo "configure:5981: checking whether windows registry support is requested" >&5
5981 if test x$enable_win32_registry != xno; then
5982 cat >> confdefs.h <<\EOF
5983 #define ENABLE_WIN32_REGISTRY 1
5986 echo "$ac_t""yes" 1>&6
5987 else
5988 echo "$ac_t""no" 1>&6
5991 # Check if user specified a different registry key.
5992 case x${enable_win32_registry} in
5993 x | xyes)
5994 # default.
5995 gcc_cv_win32_registry_key="$VERSION"
5997 xno)
5998 # no registry lookup.
5999 gcc_cv_win32_registry_key=''
6002 # user-specified key.
6003 gcc_cv_win32_registry_key="$enable_win32_registry"
6005 esac
6007 if test x$enable_win32_registry != xno; then
6008 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6009 echo "configure:6010: checking registry key on windows hosts" >&5
6010 cat >> confdefs.h <<EOF
6011 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6014 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6017 # Get an absolute path to the GCC top-level source directory
6018 holddir=`pwd`
6019 cd $srcdir
6020 topdir=`pwd`
6021 cd $holddir
6023 # Conditionalize the makefile for this host machine.
6024 # Make-host contains the concatenation of all host makefile fragments
6025 # [there can be more than one]. This file is built by configure.frag.
6026 host_overrides=Make-host
6027 dep_host_xmake_file=
6028 for f in .. ${host_xmake_file}
6030 if test -f ${srcdir}/config/$f
6031 then
6032 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6034 done
6036 # Conditionalize the makefile for this target machine.
6037 # Make-target contains the concatenation of all host makefile fragments
6038 # [there can be more than one]. This file is built by configure.frag.
6039 target_overrides=Make-target
6040 dep_tmake_file=
6041 for f in .. ${tmake_file}
6043 if test -f ${srcdir}/config/$f
6044 then
6045 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6047 done
6049 # If the host doesn't support symlinks, modify CC in
6050 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6051 # Otherwise, we can use "CC=$(CC)".
6052 rm -f symtest.tem
6053 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6054 then
6055 cc_set_by_configure="\$(CC)"
6056 quoted_cc_set_by_configure="\$(CC)"
6057 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6058 else
6059 rm -f symtest.tem
6060 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6061 then
6062 symbolic_link="cp -p"
6063 else
6064 symbolic_link="cp"
6066 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6067 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6068 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6070 rm -f symtest.tem
6072 out_object_file=`basename $out_file .c`.o
6074 tm_file_list=
6075 for f in $tm_file; do
6076 case $f in
6077 gansidecl.h | defaults.h )
6078 tm_file_list="${tm_file_list} $f" ;;
6079 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6080 esac
6081 done
6083 tm_p_file_list=
6084 for f in $tm_p_file; do
6085 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6086 done
6088 host_xm_file_list=
6089 for f in $host_xm_file; do
6090 case $f in
6091 auto-host.h | gansidecl.h | defaults.h | hwint.h )
6092 host_xm_file_list="${host_xm_file_list} $f" ;;
6093 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6094 esac
6095 done
6097 build_xm_file_list=
6098 for f in $build_xm_file; do
6099 case $f in
6100 auto-build.h | auto-host.h | gansidecl.h | defaults.h | hwint.h )
6101 build_xm_file_list="${build_xm_file_list} $f" ;;
6102 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6103 esac
6104 done
6106 # Define macro CROSS_COMPILE in compilation
6107 # if this is a cross-compiler.
6108 # Also use all.cross instead of all.internal
6109 # and add cross-make to Makefile.
6110 cross_overrides="/dev/null"
6111 if test x$host != x$target
6112 then
6113 cross_defines="CROSS=-DCROSS_COMPILE"
6114 cross_overrides="${topdir}/cross-make"
6117 # If this is a cross-compiler that does not
6118 # have its own set of headers then define
6119 # inhibit_libc
6121 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6122 # This prevents libgcc2 from containing any code which requires libc
6123 # support.
6124 inhibit_libc=
6125 if test x$host != x$target && test x$with_headers = x; then
6126 inhibit_libc=-Dinhibit_libc
6127 else
6128 if test x$with_newlib = xyes; then
6129 inhibit_libc=-Dinhibit_libc
6134 # When building gcc with a cross-compiler, we need to fix a few things.
6135 # This must come after cross-make as we want all.build to override
6136 # all.cross.
6137 build_overrides="/dev/null"
6138 if test x$build != x$host
6139 then
6140 build_overrides="${topdir}/build-make"
6143 # Expand extra_headers to include complete path.
6144 # This substitutes for lots of t-* files.
6145 extra_headers_list=
6146 if test "x$extra_headers" = x
6147 then true
6148 else
6149 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6150 for file in $extra_headers;
6152 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6153 done
6156 if test x$use_collect2 = xno; then
6157 use_collect2=
6160 # Add a definition of USE_COLLECT2 if system wants one.
6161 # Also tell toplev.c what to do.
6162 # This substitutes for lots of t-* files.
6163 if test x$use_collect2 = x
6164 then
6165 will_use_collect2=
6166 maybe_use_collect2=
6167 else
6168 will_use_collect2="collect2"
6169 maybe_use_collect2="-DUSE_COLLECT2"
6172 # If we have gas in the build tree, make a link to it.
6173 if test -f ../gas/Makefile; then
6174 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6177 # If we have nm in the build tree, make a link to it.
6178 if test -f ../binutils/Makefile; then
6179 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6182 # If we have ld in the build tree, make a link to it.
6183 if test -f ../ld/Makefile; then
6184 # if test x$use_collect2 = x; then
6185 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6186 # else
6187 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6188 # fi
6191 # Figure out what assembler we will be using.
6192 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6193 echo "configure:6194: checking what assembler to use" >&5
6194 gcc_cv_as=
6195 gcc_cv_gas_major_version=
6196 gcc_cv_gas_minor_version=
6197 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6198 if test -x "$DEFAULT_ASSEMBLER"; then
6199 gcc_cv_as="$DEFAULT_ASSEMBLER"
6200 elif test -x "$AS"; then
6201 gcc_cv_as="$AS"
6202 elif test -x as$host_exeext; then
6203 # Build using assembler in the current directory.
6204 gcc_cv_as=./as$host_exeext
6205 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6206 # Single tree build which includes gas.
6207 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6209 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6210 if test x$gcc_cv_gas_version != x; then
6211 break
6213 done
6214 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6215 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6218 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6219 # Native build.
6220 # Search the same directories that the installed compiler will
6221 # search. Else we may find the wrong assembler and lose. If we
6222 # do not find a suitable assembler binary, then try the user's
6223 # path.
6225 # Also note we have to check MD_EXEC_PREFIX before checking the
6226 # user's path. Unfortunately, there is no good way to get at the
6227 # value of MD_EXEC_PREFIX here. So we do a brute force search
6228 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6229 # to be fixed as part of the make/configure rewrite too.
6231 if test "x$exec_prefix" = xNONE; then
6232 if test "x$prefix" = xNONE; then
6233 test_prefix=/usr/local
6234 else
6235 test_prefix=$prefix
6237 else
6238 test_prefix=$exec_prefix
6241 # If the loop below does not find an assembler, then use whatever
6242 # one we can find in the users's path.
6243 # user's path.
6244 gcc_cv_as=as$host_exeext
6246 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6247 $test_prefix/lib/gcc-lib/$target \
6248 /usr/lib/gcc/$target/$gcc_version \
6249 /usr/lib/gcc/$target \
6250 $test_prefix/$target/bin/$target/$gcc_version \
6251 $test_prefix/$target/bin \
6252 /usr/libexec \
6253 /usr/ccs/gcc \
6254 /usr/ccs/bin \
6255 /udk/usr/ccs/bin \
6256 /bsd43/usr/lib/cmplrs/cc \
6257 /usr/cross64/usr/bin \
6258 /usr/lib/cmplrs/cc \
6259 /sysv/usr/lib/cmplrs/cc \
6260 /svr4/usr/lib/cmplrs/cc \
6261 /usr/bin"
6263 for dir in $test_dirs; do
6264 if test -f $dir/as$host_exeext; then
6265 gcc_cv_as=$dir/as$host_exeext
6266 break;
6268 done
6270 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6271 echo "$ac_t"""newly built gas"" 1>&6
6272 else
6273 echo "$ac_t""$gcc_cv_as" 1>&6
6276 # Figure out what nm we will be using.
6277 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6278 echo "configure:6279: checking what nm to use" >&5
6279 if test -x nm$host_exeext; then
6280 gcc_cv_nm=./nm$host_exeext
6281 elif test x$host = x$target; then
6282 # Native build.
6283 gcc_cv_nm=nm$host_exeext
6285 echo "$ac_t""$gcc_cv_nm" 1>&6
6287 # Figure out what assembler alignment features are present.
6288 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
6289 echo "configure:6290: checking assembler alignment features" >&5
6290 gcc_cv_as_alignment_features=none
6291 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6292 # Gas version 2.6 and later support for .balign and .p2align.
6293 # bytes to skip when using .p2align.
6294 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
6295 gcc_cv_as_alignment_features=".balign and .p2align"
6296 cat >> confdefs.h <<\EOF
6297 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6301 # Gas version 2.8 and later support specifying the maximum
6302 # bytes to skip when using .p2align.
6303 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
6304 gcc_cv_as_alignment_features=".p2align including maximum skip"
6305 cat >> confdefs.h <<\EOF
6306 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6310 elif test x$gcc_cv_as != x; then
6311 # Check if we have .balign and .p2align
6312 echo ".balign 4" > conftest.s
6313 echo ".p2align 2" >> conftest.s
6314 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6315 gcc_cv_as_alignment_features=".balign and .p2align"
6316 cat >> confdefs.h <<\EOF
6317 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6321 rm -f conftest.s conftest.o
6322 # Check if specifying the maximum bytes to skip when
6323 # using .p2align is supported.
6324 echo ".p2align 4,,7" > conftest.s
6325 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6326 gcc_cv_as_alignment_features=".p2align including maximum skip"
6327 cat >> confdefs.h <<\EOF
6328 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6332 rm -f conftest.s conftest.o
6334 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6336 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
6337 echo "configure:6338: checking assembler subsection support" >&5
6338 gcc_cv_as_subsections=no
6339 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6340 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
6341 gcc_cv_as_subsections="working .subsection -1"
6343 elif test x$gcc_cv_as != x; then
6344 # Check if we have .subsection
6345 echo ".subsection 1" > conftest.s
6346 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6347 gcc_cv_as_subsections=".subsection"
6348 if test x$gcc_cv_nm != x; then
6349 cat > conftest.s <<EOF
6350 conftest_label1: .word 0
6351 .subsection -1
6352 conftest_label2: .word 0
6353 .previous
6355 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6356 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6357 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6358 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6360 else
6361 gcc_cv_as_subsections="working .subsection -1"
6366 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6368 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6369 cat >> confdefs.h <<\EOF
6370 #define HAVE_GAS_SUBSECTION_ORDERING 1
6374 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6376 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
6377 echo "configure:6378: checking assembler weak support" >&5
6378 gcc_cv_as_weak=no
6379 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6380 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
6381 gcc_cv_as_weak="yes"
6383 elif test x$gcc_cv_as != x; then
6384 # Check if we have .weak
6385 echo " .weak foobar" > conftest.s
6386 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6387 gcc_cv_as_weak="yes"
6389 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6391 if test x"$gcc_cv_as_weak" = xyes; then
6392 cat >> confdefs.h <<\EOF
6393 #define HAVE_GAS_WEAK 1
6397 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6399 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
6400 echo "configure:6401: checking assembler hidden support" >&5
6401 gcc_cv_as_hidden=no
6402 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6403 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
6404 gcc_cv_as_hidden="yes"
6406 elif test x$gcc_cv_as != x; then
6407 # Check if we have .hidden
6408 echo " .hidden foobar" > conftest.s
6409 echo "foobar:" >> conftest.s
6410 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6411 gcc_cv_as_hidden="yes"
6413 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6415 if test x"$gcc_cv_as_hidden" = xyes; then
6416 cat >> confdefs.h <<\EOF
6417 #define HAVE_GAS_HIDDEN 1
6421 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6423 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
6424 echo "configure:6425: checking assembler leb128 support" >&5
6425 gcc_cv_as_leb128=no
6426 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6427 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
6428 gcc_cv_as_leb128="yes"
6430 elif test x$gcc_cv_as != x; then
6431 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6432 cat > conftest.s <<EOF
6433 .data
6434 .uleb128 L2 - L1
6436 .uleb128 1280
6437 .sleb128 -1010
6440 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6441 gcc_cv_as_leb128="yes"
6443 # GAS versions before 2.11 do not support uleb128,
6444 # despite appearing to.
6445 # ??? There exists an elf-specific test that will crash
6446 # the assembler. Perhaps it's better to figure out whether
6447 # arbitrary sections are supported and try the test.
6448 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
6449 if echo "$as_ver" | grep GNU > /dev/null; then
6450 as_ver=`echo $as_ver | sed -e 's/.* //'`
6451 as_major=`echo $as_ver | sed 's/\..*//'`
6452 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6453 if test $as_major -eq 2 -a $as_minor -lt 11; then
6454 gcc_cv_as_leb128="no"
6458 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6460 if test x"$gcc_cv_as_leb128" = xyes; then
6461 cat >> confdefs.h <<\EOF
6462 #define HAVE_AS_LEB128 1
6466 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6468 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
6469 echo "configure:6470: checking assembler eh_frame optimization" >&5
6470 gcc_cv_as_eh_frame=no
6471 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6472 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
6473 gcc_cv_as_eh_frame="yes"
6475 elif test x$gcc_cv_as != x; then
6476 # Check if this is GAS.
6477 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
6478 rm -f a.out 2> /dev/null
6479 if echo "$as_ver" | grep GNU > /dev/null; then
6480 # Versions up to and including 2.11.0 may mis-optimize
6481 # .eh_frame data. Try something.
6482 cat > conftest.s <<EOF
6483 .text
6484 .LFB1:
6485 .4byte 0
6486 .L1:
6487 .4byte 0
6488 .LFE1:
6489 .section .eh_frame,"aw",@progbits
6490 __FRAME_BEGIN__:
6491 .4byte .LECIE1-.LSCIE1
6492 .LSCIE1:
6493 .4byte 0x0
6494 .byte 0x1
6495 .ascii "z\0"
6496 .byte 0x1
6497 .byte 0x78
6498 .byte 0x1a
6499 .byte 0x0
6500 .byte 0x4
6501 .4byte 1
6502 .p2align 1
6503 .LECIE1:
6504 .LSFDE1:
6505 .4byte .LEFDE1-.LASFDE1
6506 .LASFDE1:
6507 .4byte .LASFDE1-__FRAME_BEGIN__
6508 .4byte .LFB1
6509 .4byte .LFE1-.LFB1
6510 .byte 0x4
6511 .4byte .LFE1-.LFB1
6512 .byte 0x4
6513 .4byte .L1-.LFB1
6514 .LEFDE1:
6516 cat > conftest.lit <<EOF
6517 0000 10000000 00000000 017a0001 781a0004 .........z..x...
6518 0010 01000000 12000000 18000000 00000000 ................
6519 0020 08000000 04080000 0044 .........D
6521 cat > conftest.big <<EOF
6522 0000 00000010 00000000 017a0001 781a0004 .........z..x...
6523 0010 00000001 00000012 00000018 00000000 ................
6524 0020 00000008 04000000 0844 .........D
6526 # If the assembler didn't choke, and we can objdump,
6527 # and we got the correct data, then succeed.
6528 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6529 && objdump -s -j .eh_frame conftest.o 2>/dev/null \
6530 | tail -3 > conftest.got \
6531 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
6532 || cmp conftest.big conftest.got > /dev/null 2>&1; }
6533 then
6534 gcc_cv_as_eh_frame="yes"
6535 else
6536 gcc_cv_as_eh_frame="bad"
6537 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
6538 cat >> confdefs.h <<\EOF
6539 #define USE_AS_TRADITIONAL_FORMAT 1
6545 rm -f conftest.*
6547 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
6549 case "$target" in
6550 sparc*-*-*)
6551 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
6552 echo "configure:6553: checking assembler .register pseudo-op support" >&5
6553 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6557 gcc_cv_as_register_pseudo_op=unknown
6558 if test x$gcc_cv_as != x; then
6559 # Check if we have .register
6560 echo ".register %g2, #scratch" > conftest.s
6561 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6562 gcc_cv_as_register_pseudo_op=yes
6563 else
6564 gcc_cv_as_register_pseudo_op=no
6566 rm -f conftest.s conftest.o
6571 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6572 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6573 cat >> confdefs.h <<\EOF
6574 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6579 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6580 echo "configure:6581: checking assembler supports -relax" >&5
6581 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6582 echo $ac_n "(cached) $ac_c" 1>&6
6583 else
6585 gcc_cv_as_relax_opt=unknown
6586 if test x$gcc_cv_as != x; then
6587 # Check if gas supports -relax
6588 echo ".text" > conftest.s
6589 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6590 gcc_cv_as_relax_opt=yes
6591 else
6592 gcc_cv_as_relax_opt=no
6594 rm -f conftest.s conftest.o
6599 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6600 if test "x$gcc_cv_as_relax_opt" = xyes; then
6601 cat >> confdefs.h <<\EOF
6602 #define HAVE_AS_RELAX_OPTION 1
6607 case "$tm_file" in
6608 *64*)
6609 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6610 echo "configure:6611: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6611 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6612 echo $ac_n "(cached) $ac_c" 1>&6
6613 else
6615 if test -n "$gcc_cv_as"; then
6616 echo ".xword foo" > conftest.s
6617 gcc_cv_as_flags64=no
6618 for flag in "-xarch=v9" "-64 -Av9"; do
6619 if $gcc_cv_as $flag -o conftest.o conftest.s \
6620 > /dev/null 2>&1; then
6621 gcc_cv_as_flags64=$flag
6622 break
6624 done
6625 rm -f conftest.s conftest.o
6626 else
6627 if test "$gas" = yes; then
6628 gcc_cv_as_flags64="-64 -Av9"
6629 else
6630 gcc_cv_as_flags64="-xarch=v9"
6636 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6637 if test "x$gcc_cv_as_flags64" = xno; then
6639 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6640 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6642 else
6643 cat >> confdefs.h <<EOF
6644 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6649 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6651 esac
6653 if test "x$gcc_cv_as_flags64" != xno; then
6654 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6655 echo "configure:6656: checking for assembler offsetable %lo() support" >&5
6656 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6657 echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6660 gcc_cv_as_offsetable_lo10=unknown
6661 if test "x$gcc_cv_as" != x; then
6662 # Check if assembler has offsetable %lo()
6663 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6664 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6665 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6666 > /dev/null 2>&1 &&
6667 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6668 > /dev/null 2>&1; then
6669 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6670 gcc_cv_as_offsetable_lo10=no
6671 else
6672 gcc_cv_as_offsetable_lo10=yes
6674 else
6675 gcc_cv_as_offsetable_lo10=no
6677 rm -f conftest.s conftest.o conftest1.s conftest1.o
6682 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6683 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6684 cat >> confdefs.h <<\EOF
6685 #define HAVE_AS_OFFSETABLE_LO10 1
6693 i[34567]86-*-*)
6694 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6695 echo "configure:6696: checking assembler instructions" >&5
6696 gcc_cv_as_instructions=
6697 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6698 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
6699 gcc_cv_as_instructions="filds fists"
6701 elif test x$gcc_cv_as != x; then
6702 set "filds fists" "filds mem; fists mem"
6703 while test $# -gt 0
6705 echo "$2" > conftest.s
6706 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6707 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6709 shift 2
6710 done
6711 rm -f conftest.s conftest.o
6713 if test x"$gcc_cv_as_instructions" != x; then
6714 cat >> confdefs.h <<EOF
6715 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6719 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6721 esac
6723 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6724 echo "configure:6725: checking assembler dwarf2 debug_line support" >&5
6725 gcc_cv_as_dwarf2_debug_line=no
6726 # ??? Not all targets support dwarf2 debug_line, even within a version
6727 # of gas. Moreover, we need to emit a valid instruction to trigger any
6728 # info to the output file. So, as supported targets are added to gas 2.11,
6729 # add some instruction here to (also) show we expect this might work.
6730 # ??? Once 2.11 is released, probably need to add first known working
6731 # version to the per-target configury.
6732 case "$target" in
6733 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-*)
6734 insn="nop"
6736 ia64*-*-*)
6737 insn="nop 0"
6739 esac
6740 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6741 then
6742 if test "$gcc_cv_gas_major_version" -eq 2 \
6743 -a "$gcc_cv_gas_minor_version" -ge 11 \
6744 -o "$gcc_cv_gas_major_version" -gt 2 \
6745 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6746 && test x"$insn" != x ; then
6747 gcc_cv_as_dwarf2_debug_line="yes"
6749 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6750 echo ' .file 1 "conftest.s"' > conftest.s
6751 echo ' .loc 1 3 0' >> conftest.s
6752 echo " $insn" >> conftest.s
6753 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6754 && grep debug_line conftest.o > /dev/null 2>&1 ; then
6755 # The .debug_line file table must be in the exact order that
6756 # we specified the files, since these indicies are also used
6757 # by DW_AT_decl_file. Approximate this test by testing if
6758 # the assembler bitches if the same index is assigned twice.
6759 echo ' .file 1 "foo.s"' > conftest.s
6760 echo ' .file 1 "bar.s"' >> conftest.s
6761 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6762 then
6763 gcc_cv_as_dwarf2_debug_line="no"
6764 else
6765 gcc_cv_as_dwarf2_debug_line="yes"
6768 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6770 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6771 cat >> confdefs.h <<\EOF
6772 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6776 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6778 # Figure out what language subdirectories are present.
6779 # Look if the user specified --enable-languages="..."; if not, use
6780 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6781 # go away some day.
6782 if test x"${enable_languages+set}" != xset; then
6783 if test x"${LANGUAGES+set}" = xset; then
6784 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6785 else
6786 enable_languages=all
6788 else
6789 if test x"${enable_languages}" = x; then
6790 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6794 # First scan to see if an enabled language requires some other language.
6795 # We assume that a given config-lang.in will list all the language
6796 # front ends it requires, even if some are required indirectly.
6797 for lang in ${srcdir}/*/config-lang.in ..
6799 case $lang in
6802 # The odd quoting in the next line works around
6803 # an apparent bug in bash 1.12 on linux.
6804 ${srcdir}/[*]/config-lang.in)
6807 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6808 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
6809 for other in $this_lang_requires
6811 case ,${enable_languages}, in
6812 *,$other,*)
6814 *,all,*)
6816 *,$lang_alias,*)
6817 enable_languages="$enable_languages,$other"
6819 esac
6820 done
6822 esac
6823 done
6825 subdirs=
6826 for lang in ${srcdir}/*/config-lang.in ..
6828 case $lang in
6829 ..) ;;
6830 # The odd quoting in the next line works around
6831 # an apparent bug in bash 1.12 on linux.
6832 ${srcdir}/[*]/config-lang.in) ;;
6834 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6835 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
6836 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
6837 if test "x$lang_alias" = x
6838 then
6839 echo "$lang doesn't set \$language." 1>&2
6840 exit 1
6842 case ${build_by_default},${enable_languages}, in
6843 *,$lang_alias,*) add_this_lang=yes ;;
6844 no,*) add_this_lang=no ;;
6845 *,all,*) add_this_lang=yes ;;
6846 *) add_this_lang=no ;;
6847 esac
6848 if test x"${add_this_lang}" = xyes; then
6849 case $lang in
6850 ${srcdir}/ada/config-lang.in)
6851 if test x$gnat = xyes ; then
6852 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6856 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6858 esac
6861 esac
6862 done
6864 # Make gthr-default.h if we have a thread file.
6865 gthread_flags=
6866 if test $thread_file != single; then
6867 rm -f gthr-default.h
6868 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6869 gthread_flags=-DHAVE_GTHR_DEFAULT
6873 # Find out what GC implementation we want, or may, use.
6874 # Check whether --with-gc or --without-gc was given.
6875 if test "${with_gc+set}" = set; then
6876 withval="$with_gc"
6877 case "$withval" in
6878 simple | page)
6879 GGC=ggc-$withval
6882 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6884 esac
6885 else
6886 GGC=ggc-page
6890 echo "Using $GGC for garbage collection."
6892 # Use the system's zlib library.
6893 zlibdir=-L../zlib
6894 zlibinc="-I\$(srcdir)/../zlib"
6895 # Check whether --with-system-zlib or --without-system-zlib was given.
6896 if test "${with_system_zlib+set}" = set; then
6897 withval="$with_system_zlib"
6898 zlibdir=
6899 zlibinc=
6906 cat >> confdefs.h <<EOF
6907 #define ENABLE_STD_NAMESPACE 1
6912 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6913 echo "configure:6914: checking whether to enable maintainer-specific portions of Makefiles" >&5
6914 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6915 if test "${enable_maintainer_mode+set}" = set; then
6916 enableval="$enable_maintainer_mode"
6917 maintainer_mode=$enableval
6918 else
6919 maintainer_mode=no
6923 echo "$ac_t""$maintainer_mode" 1>&6
6925 if test "$maintainer_mode" = "yes"; then
6926 MAINT=''
6927 else
6928 MAINT='#'
6931 # With Setjmp/Longjmp based exception handling.
6932 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
6933 if test "${enable_sjlj_exceptions+set}" = set; then
6934 enableval="$enable_sjlj_exceptions"
6935 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
6936 cat >> confdefs.h <<EOF
6937 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
6943 # Make empty files to contain the specs and options for each language.
6944 # Then add #include lines to for a compiler that has specs and/or options.
6946 lang_specs_files=
6947 lang_options_files=
6948 lang_tree_files=
6949 rm -f specs.h options.h gencheck.h
6950 touch specs.h options.h gencheck.h
6951 for subdir in . $subdirs
6953 if test -f $srcdir/$subdir/lang-specs.h; then
6954 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6955 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6957 if test -f $srcdir/$subdir/lang-options.h; then
6958 echo "#include \"$subdir/lang-options.h\"" >>options.h
6959 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6961 if test -f $srcdir/$subdir/$subdir-tree.def; then
6962 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6963 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6965 done
6967 # These (without "all_") are set in each config-lang.in.
6968 # `language' must be a single word so is spelled singularly.
6969 all_languages=
6970 all_boot_languages=
6971 all_compilers=
6972 all_stagestuff=
6973 all_diff_excludes=
6974 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
6975 # List of language makefile fragments.
6976 all_lang_makefiles=
6977 all_headers=
6978 all_lib2funcs=
6980 # Add the language fragments.
6981 # Languages are added via two mechanisms. Some information must be
6982 # recorded in makefile variables, these are defined in config-lang.in.
6983 # We accumulate them and plug them into the main Makefile.
6984 # The other mechanism is a set of hooks for each of the main targets
6985 # like `clean', `install', etc.
6987 language_fragments="Make-lang"
6988 language_hooks="Make-hooks"
6990 for s in .. $subdirs
6992 if test $s != ".."
6993 then
6994 language=
6995 boot_language=
6996 compilers=
6997 stagestuff=
6998 diff_excludes=
6999 headers=
7000 outputs=
7001 lib2funcs=
7002 . ${srcdir}/$s/config-lang.in
7003 if test "x$language" = x
7004 then
7005 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7006 exit 1
7008 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
7009 if test -f ${srcdir}/$s/Makefile.in
7010 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
7012 all_languages="$all_languages $language"
7013 if test "x$boot_language" = xyes
7014 then
7015 all_boot_languages="$all_boot_languages $language"
7017 all_compilers="$all_compilers $compilers"
7018 all_stagestuff="$all_stagestuff $stagestuff"
7019 all_diff_excludes="$all_diff_excludes $diff_excludes"
7020 all_headers="$all_headers $headers"
7021 all_outputs="$all_outputs $outputs"
7022 all_lib2funcs="$all_lib2funcs $lib2funcs"
7024 done
7026 # Since we can't use `::' targets, we link each language in
7027 # with a set of hooks, reached indirectly via lang.${target}.
7029 rm -f Make-hooks
7030 touch Make-hooks
7031 target_list="all.build all.cross start.encap rest.encap \
7032 info dvi \
7033 install-normal install-common install-info install-man \
7034 uninstall \
7035 mostlyclean clean distclean extraclean maintainer-clean \
7036 stage1 stage2 stage3 stage4"
7037 for t in $target_list
7040 for lang in .. $all_languages
7042 if test $lang != ".."; then
7043 x="$x $lang.$t"
7045 done
7046 echo "lang.$t: $x" >> Make-hooks
7047 done
7049 # If we're not building in srcdir, create .gdbinit.
7051 if test ! -f Makefile.in; then
7052 echo "dir ." > .gdbinit
7053 echo "dir ${srcdir}" >> .gdbinit
7054 if test x$gdb_needs_out_file_path = xyes
7055 then
7056 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7058 if test "x$subdirs" != x; then
7059 for s in $subdirs
7061 echo "dir ${srcdir}/$s" >> .gdbinit
7062 done
7064 echo "source ${srcdir}/.gdbinit" >> .gdbinit
7067 # Define variables host_canonical and build_canonical
7068 # because some Cygnus local changes in the Makefile depend on them.
7069 build_canonical=${build}
7070 host_canonical=${host}
7071 target_subdir=
7072 if test "${host}" != "${target}" ; then
7073 target_subdir=${target_alias}/
7079 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7080 # absolute path for gcc_tooldir based on inserting the number of up-directory
7081 # movements required to get from $(exec_prefix) to $(prefix) into the basic
7082 # $(libsubdir)/@(unlibsubdir) based path.
7083 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7084 # make and thus we'd get different behavior depending on where we built the
7085 # sources.
7086 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7087 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7088 else
7089 # An explanation of the sed strings:
7090 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
7091 # -e 's|/$||' match a trailing forward slash and eliminates it
7092 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
7093 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
7095 # (*) Note this pattern overwrites the first character of the string
7096 # with a forward slash if one is not already present. This is not a
7097 # problem because the exact names of the sub-directories concerned is
7098 # unimportant, just the number of them matters.
7100 # The practical upshot of these patterns is like this:
7102 # prefix exec_prefix result
7103 # ------ ----------- ------
7104 # /foo /foo/bar ../
7105 # /foo/ /foo/bar ../
7106 # /foo /foo/bar/ ../
7107 # /foo/ /foo/bar/ ../
7108 # /foo /foo/bar/ugg ../../
7110 dollar='$$'
7111 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7116 # Find a directory in which to install a shared libgcc.
7118 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7119 if test "${enable_version_specific_runtime_libs+set}" = set; then
7120 enableval="$enable_version_specific_runtime_libs"
7125 # Check whether --with-slibdir or --without-slibdir was given.
7126 if test "${with_slibdir+set}" = set; then
7127 withval="$with_slibdir"
7128 slibdir="$with_slibdir"
7129 else
7130 if test "${enable_version_specific_runtime_libs+set}" = set; then
7131 slibdir='$(libsubdir)'
7132 elif test "$host" != "$target"; then
7133 slibdir='$(build_tooldir)/lib'
7134 else
7135 slibdir='$(libdir)'
7141 # Nothing to do for FLOAT_H, float_format already handled.
7142 objdir=`pwd`
7145 # Process the language and host/target makefile fragments.
7146 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7148 # Substitute configuration variables
7217 # Echo that links are built
7218 if test x$host = x$target
7219 then
7220 str1="native "
7221 else
7222 str1="cross-"
7223 str2=" from $host"
7226 if test x$host != x$build
7227 then
7228 str3=" on a $build system"
7231 if test "x$str2" != x || test "x$str3" != x
7232 then
7233 str4=
7236 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7238 if test "x$str2" != x || test "x$str3" != x
7239 then
7240 echo " ${str2}${str3}." 1>&2
7243 # Truncate the target if necessary
7244 if test x$host_truncate_target != x; then
7245 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7248 # Configure the subdirectories
7249 # AC_CONFIG_SUBDIRS($subdirs)
7251 # Create the Makefile
7252 # and configure language subdirectories
7253 trap '' 1 2 15
7254 cat > confcache <<\EOF
7255 # This file is a shell script that caches the results of configure
7256 # tests run on this system so they can be shared between configure
7257 # scripts and configure runs. It is not useful on other systems.
7258 # If it contains results you don't want to keep, you may remove or edit it.
7260 # By default, configure uses ./config.cache as the cache file,
7261 # creating it if it does not exist already. You can give configure
7262 # the --cache-file=FILE option to use a different cache file; that is
7263 # what configure does when it calls configure scripts in
7264 # subdirectories, so they share the cache.
7265 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7266 # config.status only pays attention to the cache file if you give it the
7267 # --recheck option to rerun configure.
7270 # The following way of writing the cache mishandles newlines in values,
7271 # but we know of no workaround that is simple, portable, and efficient.
7272 # So, don't put newlines in cache variables' values.
7273 # Ultrix sh set writes to stderr and can't be redirected directly,
7274 # and sets the high bit in the cache file unless we assign to the vars.
7275 (set) 2>&1 |
7276 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7277 *ac_space=\ *)
7278 # `set' does not quote correctly, so add quotes (double-quote substitution
7279 # turns \\\\ into \\, and sed turns \\ into \).
7280 sed -n \
7281 -e "s/'/'\\\\''/g" \
7282 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7285 # `set' quotes correctly as required by POSIX, so do not add quotes.
7286 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7288 esac >> confcache
7289 if cmp -s $cache_file confcache; then
7291 else
7292 if test -w $cache_file; then
7293 echo "updating cache $cache_file"
7294 cat confcache > $cache_file
7295 else
7296 echo "not updating unwritable cache $cache_file"
7299 rm -f confcache
7301 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7304 # Let make expand exec_prefix.
7305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7307 # Any assignment to VPATH causes Sun make to only execute
7308 # the first set of double-colon rules, so remove it if not needed.
7309 # If there is a colon in the path, we need to keep it.
7310 if test "x$srcdir" = x.; then
7311 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7314 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7316 DEFS=-DHAVE_CONFIG_H
7318 # Without the "./", some shells look in PATH for config.status.
7319 : ${CONFIG_STATUS=./config.status}
7321 echo creating $CONFIG_STATUS
7322 rm -f $CONFIG_STATUS
7323 cat > $CONFIG_STATUS <<EOF
7324 #! /bin/sh
7325 # Generated automatically by configure.
7326 # Run this file to recreate the current configuration.
7327 # This directory was configured as follows,
7328 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7330 # $0 $ac_configure_args
7332 # Compiler output produced by configure, useful for debugging
7333 # configure, is in ./config.log if it exists.
7335 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7336 for ac_option
7338 case "\$ac_option" in
7339 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7340 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7341 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7342 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7343 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7344 exit 0 ;;
7345 -help | --help | --hel | --he | --h)
7346 echo "\$ac_cs_usage"; exit 0 ;;
7347 *) echo "\$ac_cs_usage"; exit 1 ;;
7348 esac
7349 done
7351 ac_given_srcdir=$srcdir
7353 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7355 cat >> $CONFIG_STATUS <<EOF
7357 # Protect against being on the right side of a sed subst in config.status.
7358 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7359 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7360 $ac_vpsub
7361 $extrasub
7362 s%@SHELL@%$SHELL%g
7363 s%@CFLAGS@%$CFLAGS%g
7364 s%@CPPFLAGS@%$CPPFLAGS%g
7365 s%@CXXFLAGS@%$CXXFLAGS%g
7366 s%@FFLAGS@%$FFLAGS%g
7367 s%@DEFS@%$DEFS%g
7368 s%@LDFLAGS@%$LDFLAGS%g
7369 s%@LIBS@%$LIBS%g
7370 s%@exec_prefix@%$exec_prefix%g
7371 s%@prefix@%$prefix%g
7372 s%@program_transform_name@%$program_transform_name%g
7373 s%@bindir@%$bindir%g
7374 s%@sbindir@%$sbindir%g
7375 s%@libexecdir@%$libexecdir%g
7376 s%@datadir@%$datadir%g
7377 s%@sysconfdir@%$sysconfdir%g
7378 s%@sharedstatedir@%$sharedstatedir%g
7379 s%@localstatedir@%$localstatedir%g
7380 s%@libdir@%$libdir%g
7381 s%@includedir@%$includedir%g
7382 s%@oldincludedir@%$oldincludedir%g
7383 s%@infodir@%$infodir%g
7384 s%@mandir@%$mandir%g
7385 s%@enable_multilib@%$enable_multilib%g
7386 s%@enable_shared@%$enable_shared%g
7387 s%@host@%$host%g
7388 s%@host_alias@%$host_alias%g
7389 s%@host_cpu@%$host_cpu%g
7390 s%@host_vendor@%$host_vendor%g
7391 s%@host_os@%$host_os%g
7392 s%@target@%$target%g
7393 s%@target_alias@%$target_alias%g
7394 s%@target_cpu@%$target_cpu%g
7395 s%@target_vendor@%$target_vendor%g
7396 s%@target_os@%$target_os%g
7397 s%@build@%$build%g
7398 s%@build_alias@%$build_alias%g
7399 s%@build_cpu@%$build_cpu%g
7400 s%@build_vendor@%$build_vendor%g
7401 s%@build_os@%$build_os%g
7402 s%@CC@%$CC%g
7403 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
7404 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7405 s%@strict1_warn@%$strict1_warn%g
7406 s%@warn_cflags@%$warn_cflags%g
7407 s%@stage1_cflags@%$stage1_cflags%g
7408 s%@SET_MAKE@%$SET_MAKE%g
7409 s%@AWK@%$AWK%g
7410 s%@LN@%$LN%g
7411 s%@LN_S@%$LN_S%g
7412 s%@RANLIB@%$RANLIB%g
7413 s%@INSTALL@%$INSTALL%g
7414 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7415 s%@INSTALL_DATA@%$INSTALL_DATA%g
7416 s%@CPP@%$CPP%g
7417 s%@gnat@%$gnat%g
7418 s%@have_mktemp_command@%$have_mktemp_command%g
7419 s%@MAKEINFO@%$MAKEINFO%g
7420 s%@BUILD_INFO@%$BUILD_INFO%g
7421 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
7422 s%@FLEX@%$FLEX%g
7423 s%@BISON@%$BISON%g
7424 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
7425 s%@vfprintf@%$vfprintf%g
7426 s%@doprint@%$doprint%g
7427 s%@strstr@%$strstr%g
7428 s%@LIBICONV@%$LIBICONV%g
7429 s%@manext@%$manext%g
7430 s%@objext@%$objext%g
7431 s%@PACKAGE@%$PACKAGE%g
7432 s%@VERSION@%$VERSION%g
7433 s%@CHECK_PO@%$CHECK_PO%g
7434 s%@ALLOCA@%$ALLOCA%g
7435 s%@USE_NLS@%$USE_NLS%g
7436 s%@MSGFMT@%$MSGFMT%g
7437 s%@GMSGFMT@%$GMSGFMT%g
7438 s%@XGETTEXT@%$XGETTEXT%g
7439 s%@GENCAT@%$GENCAT%g
7440 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7441 s%@CATALOGS@%$CATALOGS%g
7442 s%@CATOBJEXT@%$CATOBJEXT%g
7443 s%@DATADIRNAME@%$DATADIRNAME%g
7444 s%@GMOFILES@%$GMOFILES%g
7445 s%@INSTOBJEXT@%$INSTOBJEXT%g
7446 s%@INTLDEPS@%$INTLDEPS%g
7447 s%@INTLLIBS@%$INTLLIBS%g
7448 s%@INTLOBJS@%$INTLOBJS%g
7449 s%@POFILES@%$POFILES%g
7450 s%@POSUB@%$POSUB%g
7451 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7452 s%@GT_NO@%$GT_NO%g
7453 s%@GT_YES@%$GT_YES%g
7454 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7455 s%@l@%$l%g
7456 s%@inhibit_libc@%$inhibit_libc%g
7457 s%@gthread_flags@%$gthread_flags%g
7458 s%@GGC@%$GGC%g
7459 s%@zlibdir@%$zlibdir%g
7460 s%@zlibinc@%$zlibinc%g
7461 s%@MAINT@%$MAINT%g
7462 s%@build_canonical@%$build_canonical%g
7463 s%@host_canonical@%$host_canonical%g
7464 s%@target_subdir@%$target_subdir%g
7465 s%@gcc_tooldir@%$gcc_tooldir%g
7466 s%@dollar@%$dollar%g
7467 s%@slibdir@%$slibdir%g
7468 s%@objdir@%$objdir%g
7469 s%@subdirs@%$subdirs%g
7470 s%@all_boot_languages@%$all_boot_languages%g
7471 s%@all_compilers@%$all_compilers%g
7472 s%@all_diff_excludes@%$all_diff_excludes%g
7473 s%@all_headers@%$all_headers%g
7474 s%@all_lang_makefiles@%$all_lang_makefiles%g
7475 s%@all_languages@%$all_languages%g
7476 s%@all_lib2funcs@%$all_lib2funcs%g
7477 s%@all_stagestuff@%$all_stagestuff%g
7478 s%@build_exeext@%$build_exeext%g
7479 s%@build_install_headers_dir@%$build_install_headers_dir%g
7480 s%@build_xm_file_list@%$build_xm_file_list%g
7481 s%@build_xm_file@%$build_xm_file%g
7482 s%@build_xm_defines@%$build_xm_defines%g
7483 s%@cc_set_by_configure@%$cc_set_by_configure%g
7484 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
7485 s%@cpp_install_dir@%$cpp_install_dir%g
7486 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7487 s%@dep_tmake_file@%$dep_tmake_file%g
7488 s%@extra_c_flags@%$extra_c_flags%g
7489 s%@extra_headers_list@%$extra_headers_list%g
7490 s%@extra_objs@%$extra_objs%g
7491 s%@extra_parts@%$extra_parts%g
7492 s%@extra_passes@%$extra_passes%g
7493 s%@extra_programs@%$extra_programs%g
7494 s%@float_h_file@%$float_h_file%g
7495 s%@gcc_config_arguments@%$gcc_config_arguments%g
7496 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
7497 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
7498 s%@gcc_version@%$gcc_version%g
7499 s%@gcc_version_full@%$gcc_version_full%g
7500 s%@gcc_version_trigger@%$gcc_version_trigger%g
7501 s%@host_exeext@%$host_exeext%g
7502 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
7503 s%@host_xm_file_list@%$host_xm_file_list%g
7504 s%@host_xm_file@%$host_xm_file%g
7505 s%@host_xm_defines@%$host_xm_defines%g
7506 s%@install@%$install%g
7507 s%@lang_options_files@%$lang_options_files%g
7508 s%@lang_specs_files@%$lang_specs_files%g
7509 s%@lang_tree_files@%$lang_tree_files%g
7510 s%@local_prefix@%$local_prefix%g
7511 s%@maybe_use_collect2@%$maybe_use_collect2%g
7512 s%@md_file@%$md_file%g
7513 s%@objc_boehm_gc@%$objc_boehm_gc%g
7514 s%@out_file@%$out_file%g
7515 s%@out_object_file@%$out_object_file%g
7516 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
7517 s%@symbolic_link@%$symbolic_link%g
7518 s%@thread_file@%$thread_file%g
7519 s%@tm_file_list@%$tm_file_list%g
7520 s%@tm_file@%$tm_file%g
7521 s%@tm_p_file_list@%$tm_p_file_list%g
7522 s%@tm_p_file@%$tm_p_file%g
7523 s%@xm_file@%$xm_file%g
7524 s%@will_use_collect2@%$will_use_collect2%g
7525 s%@c_target_objs@%$c_target_objs%g
7526 s%@cxx_target_objs@%$cxx_target_objs%g
7527 s%@target_cpu_default@%$target_cpu_default%g
7528 /@target_overrides@/r $target_overrides
7529 s%@target_overrides@%%g
7530 /@host_overrides@/r $host_overrides
7531 s%@host_overrides@%%g
7532 s%@cross_defines@%$cross_defines%g
7533 /@cross_overrides@/r $cross_overrides
7534 s%@cross_overrides@%%g
7535 /@build_overrides@/r $build_overrides
7536 s%@build_overrides@%%g
7537 /@language_fragments@/r $language_fragments
7538 s%@language_fragments@%%g
7539 /@language_hooks@/r $language_hooks
7540 s%@language_hooks@%%g
7542 CEOF
7545 cat >> $CONFIG_STATUS <<\EOF
7547 # Split the substitutions into bite-sized pieces for seds with
7548 # small command number limits, like on Digital OSF/1 and HP-UX.
7549 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7550 ac_file=1 # Number of current file.
7551 ac_beg=1 # First line for current file.
7552 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7553 ac_more_lines=:
7554 ac_sed_cmds=""
7555 while $ac_more_lines; do
7556 if test $ac_beg -gt 1; then
7557 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7558 else
7559 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7561 if test ! -s conftest.s$ac_file; then
7562 ac_more_lines=false
7563 rm -f conftest.s$ac_file
7564 else
7565 if test -z "$ac_sed_cmds"; then
7566 ac_sed_cmds="sed -f conftest.s$ac_file"
7567 else
7568 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7570 ac_file=`expr $ac_file + 1`
7571 ac_beg=$ac_end
7572 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7574 done
7575 if test -z "$ac_sed_cmds"; then
7576 ac_sed_cmds=cat
7580 cat >> $CONFIG_STATUS <<EOF
7582 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7584 cat >> $CONFIG_STATUS <<\EOF
7585 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7586 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7587 case "$ac_file" in
7588 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7589 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7590 *) ac_file_in="${ac_file}.in" ;;
7591 esac
7593 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7595 # Remove last slash and all that follows it. Not all systems have dirname.
7596 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7597 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7598 # The file is in a subdirectory.
7599 test ! -d "$ac_dir" && mkdir "$ac_dir"
7600 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7601 # A "../" for each directory in $ac_dir_suffix.
7602 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7603 else
7604 ac_dir_suffix= ac_dots=
7607 case "$ac_given_srcdir" in
7608 .) srcdir=.
7609 if test -z "$ac_dots"; then top_srcdir=.
7610 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7611 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7612 *) # Relative path.
7613 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7614 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7615 esac
7618 echo creating "$ac_file"
7619 rm -f "$ac_file"
7620 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7621 case "$ac_file" in
7622 *Makefile*) ac_comsub="1i\\
7623 # $configure_input" ;;
7624 *) ac_comsub= ;;
7625 esac
7627 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7628 sed -e "$ac_comsub
7629 s%@configure_input@%$configure_input%g
7630 s%@srcdir@%$srcdir%g
7631 s%@top_srcdir@%$top_srcdir%g
7632 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7633 fi; done
7634 rm -f conftest.s*
7636 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7637 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7639 # ac_d sets the value in "#define NAME VALUE" lines.
7640 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7641 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7642 ac_dC='\3'
7643 ac_dD='%g'
7644 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7645 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7646 ac_uB='\([ ]\)%\1#\2define\3'
7647 ac_uC=' '
7648 ac_uD='\4%g'
7649 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7650 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7651 ac_eB='$%\1#\2define\3'
7652 ac_eC=' '
7653 ac_eD='%g'
7655 if test "${CONFIG_HEADERS+set}" != set; then
7657 cat >> $CONFIG_STATUS <<EOF
7658 CONFIG_HEADERS="auto-host.h:config.in"
7660 cat >> $CONFIG_STATUS <<\EOF
7662 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7663 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7664 case "$ac_file" in
7665 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7666 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7667 *) ac_file_in="${ac_file}.in" ;;
7668 esac
7670 echo creating $ac_file
7672 rm -f conftest.frag conftest.in conftest.out
7673 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7674 cat $ac_file_inputs > conftest.in
7678 # Transform confdefs.h into a sed script conftest.vals that substitutes
7679 # the proper values into config.h.in to produce config.h. And first:
7680 # Protect against being on the right side of a sed subst in config.status.
7681 # Protect against being in an unquoted here document in config.status.
7682 rm -f conftest.vals
7683 cat > conftest.hdr <<\EOF
7684 s/[\\&%]/\\&/g
7685 s%[\\$`]%\\&%g
7686 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7687 s%ac_d%ac_u%gp
7688 s%ac_u%ac_e%gp
7690 sed -n -f conftest.hdr confdefs.h > conftest.vals
7691 rm -f conftest.hdr
7693 # This sed command replaces #undef with comments. This is necessary, for
7694 # example, in the case of _POSIX_SOURCE, which is predefined and required
7695 # on some systems where configure will not decide to define it.
7696 cat >> conftest.vals <<\EOF
7697 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7700 # Break up conftest.vals because some shells have a limit on
7701 # the size of here documents, and old seds have small limits too.
7703 rm -f conftest.tail
7704 while :
7706 ac_lines=`grep -c . conftest.vals`
7707 # grep -c gives empty output for an empty file on some AIX systems.
7708 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7709 # Write a limited-size here document to conftest.frag.
7710 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7711 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7712 echo 'CEOF
7713 sed -f conftest.frag conftest.in > conftest.out
7714 rm -f conftest.in
7715 mv conftest.out conftest.in
7716 ' >> $CONFIG_STATUS
7717 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7718 rm -f conftest.vals
7719 mv conftest.tail conftest.vals
7720 done
7721 rm -f conftest.vals
7723 cat >> $CONFIG_STATUS <<\EOF
7724 rm -f conftest.frag conftest.h
7725 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7726 cat conftest.in >> conftest.h
7727 rm -f conftest.in
7728 if cmp -s $ac_file conftest.h 2>/dev/null; then
7729 echo "$ac_file is unchanged"
7730 rm -f conftest.h
7731 else
7732 # Remove last slash and all that follows it. Not all systems have dirname.
7733 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7734 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7735 # The file is in a subdirectory.
7736 test ! -d "$ac_dir" && mkdir "$ac_dir"
7738 rm -f $ac_file
7739 mv conftest.h $ac_file
7741 fi; done
7745 cat >> $CONFIG_STATUS <<EOF
7746 ac_sources="$nls_cv_header_libgt"
7747 ac_dests="$nls_cv_header_intl"
7750 cat >> $CONFIG_STATUS <<\EOF
7751 srcdir=$ac_given_srcdir
7752 while test -n "$ac_sources"; do
7753 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7754 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7756 echo "linking $srcdir/$ac_source to $ac_dest"
7758 if test ! -r $srcdir/$ac_source; then
7759 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7761 rm -f $ac_dest
7763 # Make relative symlinks.
7764 # Remove last slash and all that follows it. Not all systems have dirname.
7765 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7766 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7767 # The dest file is in a subdirectory.
7768 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7769 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7770 # A "../" for each directory in $ac_dest_dir_suffix.
7771 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7772 else
7773 ac_dest_dir_suffix= ac_dots=
7776 case "$srcdir" in
7777 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7778 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7779 esac
7781 # Make a symlink if possible; otherwise try a hard link.
7782 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7783 ln $srcdir/$ac_source $ac_dest; then :
7784 else
7785 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7787 done
7789 cat >> $CONFIG_STATUS <<EOF
7792 host='${host}'
7793 build='${build}'
7794 target='${target}'
7795 target_alias='${target_alias}'
7796 srcdir='${srcdir}'
7797 subdirs='${subdirs}'
7798 symbolic_link='${symbolic_link}'
7799 program_transform_set='${program_transform_set}'
7800 program_transform_name='${program_transform_name}'
7801 dep_host_xmake_file='${dep_host_xmake_file}'
7802 host_xmake_file='${host_xmake_file}'
7803 dep_tmake_file='${dep_tmake_file}'
7804 tmake_file='${tmake_file}'
7805 thread_file='${thread_file}'
7806 gcc_config_arguments='${gcc_config_arguments}'
7807 gcc_version='${gcc_version}'
7808 gcc_version_full='${gcc_version_full}'
7809 gcc_version_trigger='${gcc_version_trigger}'
7810 local_prefix='${local_prefix}'
7811 build_install_headers_dir='${build_install_headers_dir}'
7812 build_exeext='${build_exeext}'
7813 host_exeext='${host_exeext}'
7814 out_file='${out_file}'
7815 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7816 SET_MAKE='${SET_MAKE}'
7817 target_list='${target_list}'
7818 target_overrides='${target_overrides}'
7819 host_overrides='${host_overrides}'
7820 cross_defines='${cross_defines}'
7821 cross_overrides='${cross_overrides}'
7822 build_overrides='${build_overrides}'
7823 cpp_install_dir='${cpp_install_dir}'
7826 cat >> $CONFIG_STATUS <<\EOF
7827 case "$CONFIG_FILES" in *po/Makefile.in*)
7828 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7829 esac
7831 case x$CONFIG_HEADERS in
7832 xauto-host.h:config.in)
7833 echo > cstamp-h ;;
7834 esac
7835 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
7836 # bootstrapping and the installation procedure can still use
7837 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
7838 # FLAGS_TO_PASS has been modified to solve the problem there.
7839 # This is virtually a duplicate of what happens in configure.lang; we do
7840 # an extra check to make sure this only happens if ln -s can be used.
7841 if test "$symbolic_link" = "ln -s"; then
7842 for d in .. ${subdirs} ; do
7843 if test $d != ..; then
7844 STARTDIR=`pwd`
7845 cd $d
7846 for t in stage1 stage2 stage3 stage4 include
7848 rm -f $t
7849 $symbolic_link ../$t $t 2>/dev/null
7850 done
7851 cd $STARTDIR
7853 done
7854 else true ; fi
7855 # Avoid having to add intl to our include paths.
7856 if test -f intl/libintl.h; then
7857 echo creating libintl.h
7858 echo '#include "intl/libintl.h"' >libintl.h
7861 exit 0
7863 chmod +x $CONFIG_STATUS
7864 rm -fr confdefs* $ac_clean_files
7865 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1