Mark ChangeLog
[official-gcc.git] / gcc / configure
blob3fa8976f6eb83164792503db983d53493f4fc331
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 --enable-nls use Native Language Support (default)"
59 ac_help="$ac_help
60 --disable-nls do not use Native Language Support"
61 ac_help="$ac_help
62 --with-included-gettext use the GNU gettext library included here"
63 ac_help="$ac_help
64 --with-catgets use catgets functions if available"
65 ac_help="$ac_help
66 --disable-win32-registry
67 disable lookup of installation paths in the
68 Registry on Windows hosts
69 --enable-win32-registry enable registry lookup (default)
70 --enable-win32-registry=KEY
71 use KEY instead of GCC version as the last portion
72 of the registry key"
73 ac_help="$ac_help
74 --with-gc={simple,page} choose the garbage collection mechanism to use
75 with the compiler"
76 ac_help="$ac_help
77 --with-system-zlib use installed libz"
78 ac_help="$ac_help
79 --enable-maintainer-mode
80 enable make rules and dependencies not useful
81 (and sometimes confusing) to the casual installer"
82 ac_help="$ac_help
83 --enable-sjlj-exceptions
84 arrange to use setjmp/longjmp exception handling"
85 ac_help="$ac_help
86 --enable-version-specific-runtime-libs
87 specify that runtime libraries should be
88 installed in a compiler-specific directory"
89 ac_help="$ac_help
90 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
92 # Initialize some variables set by options.
93 # The variables have the same names as the options, with
94 # dashes changed to underlines.
95 build=NONE
96 cache_file=./config.cache
97 exec_prefix=NONE
98 host=NONE
99 no_create=
100 nonopt=NONE
101 no_recursion=
102 prefix=NONE
103 program_prefix=NONE
104 program_suffix=NONE
105 program_transform_name=s,x,x,
106 silent=
107 site=
108 sitefile=
109 srcdir=
110 target=NONE
111 verbose=
112 x_includes=NONE
113 x_libraries=NONE
114 bindir='${exec_prefix}/bin'
115 sbindir='${exec_prefix}/sbin'
116 libexecdir='${exec_prefix}/libexec'
117 datadir='${prefix}/share'
118 sysconfdir='${prefix}/etc'
119 sharedstatedir='${prefix}/com'
120 localstatedir='${prefix}/var'
121 libdir='${exec_prefix}/lib'
122 includedir='${prefix}/include'
123 oldincludedir='/usr/include'
124 infodir='${prefix}/info'
125 mandir='${prefix}/man'
127 # Initialize some other variables.
128 subdirs=
129 MFLAGS= MAKEFLAGS=
130 SHELL=${CONFIG_SHELL-/bin/sh}
131 # Maximum number of lines to put in a shell here document.
132 ac_max_here_lines=12
134 ac_prev=
135 for ac_option
138 # If the previous option needs an argument, assign it.
139 if test -n "$ac_prev"; then
140 eval "$ac_prev=\$ac_option"
141 ac_prev=
142 continue
145 case "$ac_option" in
146 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
147 *) ac_optarg= ;;
148 esac
150 # Accept the important Cygnus configure options, so we can diagnose typos.
152 case "$ac_option" in
154 -bindir | --bindir | --bindi | --bind | --bin | --bi)
155 ac_prev=bindir ;;
156 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
157 bindir="$ac_optarg" ;;
159 -build | --build | --buil | --bui | --bu)
160 ac_prev=build ;;
161 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
162 build="$ac_optarg" ;;
164 -cache-file | --cache-file | --cache-fil | --cache-fi \
165 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
166 ac_prev=cache_file ;;
167 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
168 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
169 cache_file="$ac_optarg" ;;
171 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
172 ac_prev=datadir ;;
173 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
174 | --da=*)
175 datadir="$ac_optarg" ;;
177 -disable-* | --disable-*)
178 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
179 # Reject names that are not valid shell variable names.
180 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
181 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
183 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
184 eval "enable_${ac_feature}=no" ;;
186 -enable-* | --enable-*)
187 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
188 # Reject names that are not valid shell variable names.
189 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
190 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
192 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
193 case "$ac_option" in
194 *=*) ;;
195 *) ac_optarg=yes ;;
196 esac
197 eval "enable_${ac_feature}='$ac_optarg'" ;;
199 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
200 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
201 | --exec | --exe | --ex)
202 ac_prev=exec_prefix ;;
203 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
204 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
205 | --exec=* | --exe=* | --ex=*)
206 exec_prefix="$ac_optarg" ;;
208 -gas | --gas | --ga | --g)
209 # Obsolete; use --with-gas.
210 with_gas=yes ;;
212 -help | --help | --hel | --he)
213 # Omit some internal or obsolete options to make the list less imposing.
214 # This message is too long to be a string in the A/UX 3.1 sh.
215 cat << EOF
216 Usage: configure [options] [host]
217 Options: [defaults in brackets after descriptions]
218 Configuration:
219 --cache-file=FILE cache test results in FILE
220 --help print this message
221 --no-create do not create output files
222 --quiet, --silent do not print \`checking...' messages
223 --site-file=FILE use FILE as the site file
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 -site-file | --site-file | --site-fil | --site-fi | --site-f)
395 ac_prev=sitefile ;;
396 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
397 sitefile="$ac_optarg" ;;
399 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
400 ac_prev=srcdir ;;
401 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
402 srcdir="$ac_optarg" ;;
404 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
405 | --syscon | --sysco | --sysc | --sys | --sy)
406 ac_prev=sysconfdir ;;
407 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
408 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
409 sysconfdir="$ac_optarg" ;;
411 -target | --target | --targe | --targ | --tar | --ta | --t)
412 ac_prev=target ;;
413 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
414 target="$ac_optarg" ;;
416 -v | -verbose | --verbose | --verbos | --verbo | --verb)
417 verbose=yes ;;
419 -version | --version | --versio | --versi | --vers)
420 echo "configure generated by autoconf version 2.13"
421 exit 0 ;;
423 -with-* | --with-*)
424 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
425 # Reject names that are not valid shell variable names.
426 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
427 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429 ac_package=`echo $ac_package| sed 's/-/_/g'`
430 case "$ac_option" in
431 *=*) ;;
432 *) ac_optarg=yes ;;
433 esac
434 eval "with_${ac_package}='$ac_optarg'" ;;
436 -without-* | --without-*)
437 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
438 # Reject names that are not valid shell variable names.
439 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
440 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
442 ac_package=`echo $ac_package| sed 's/-/_/g'`
443 eval "with_${ac_package}=no" ;;
445 --x)
446 # Obsolete; use --with-x.
447 with_x=yes ;;
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454 x_includes="$ac_optarg" ;;
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461 x_libraries="$ac_optarg" ;;
463 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
467 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
468 echo "configure: warning: $ac_option: invalid host type" 1>&2
470 if test "x$nonopt" != xNONE; then
471 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
473 nonopt="$ac_option"
476 esac
477 done
479 if test -n "$ac_prev"; then
480 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
485 # File descriptor usage:
486 # 0 standard input
487 # 1 file creation
488 # 2 errors and warnings
489 # 3 some systems may open it to /dev/tty
490 # 4 used on the Kubota Titan
491 # 6 checking for... messages and results
492 # 5 compiler messages saved in config.log
493 if test "$silent" = yes; then
494 exec 6>/dev/null
495 else
496 exec 6>&1
498 exec 5>./config.log
500 echo "\
501 This file contains any messages produced by compilers while
502 running configure, to aid debugging if configure makes a mistake.
503 " 1>&5
505 # Strip out --no-create and --no-recursion so they do not pile up.
506 # Also quote any args containing shell metacharacters.
507 ac_configure_args=
508 for ac_arg
510 case "$ac_arg" in
511 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
512 | --no-cr | --no-c) ;;
513 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
514 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
515 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
516 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
517 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
518 esac
519 done
521 # NLS nuisances.
522 # Only set these to C if already set. These must not be set unconditionally
523 # because not all systems understand e.g. LANG=C (notably SCO).
524 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
525 # Non-C LC_CTYPE values break the ctype check.
526 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
527 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
528 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
529 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
531 # confdefs.h avoids OS command line length limits that DEFS can exceed.
532 rm -rf conftest* confdefs.h
533 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 echo > confdefs.h
536 # A filename unique to this package, relative to the directory that
537 # configure is in, which we can look for to find out if srcdir is correct.
538 ac_unique_file=tree.c
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
544 ac_prog=$0
545 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=..
551 else
552 ac_srcdir_defaulted=no
554 if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
556 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
557 else
558 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
561 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
563 # Prefer explicitly selected file to automatically selected ones.
564 if test -z "$sitefile"; then
565 if test -z "$CONFIG_SITE"; then
566 if test "x$prefix" != xNONE; then
567 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
568 else
569 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
572 else
573 CONFIG_SITE="$sitefile"
575 for ac_site_file in $CONFIG_SITE; do
576 if test -r "$ac_site_file"; then
577 echo "loading site script $ac_site_file"
578 . "$ac_site_file"
580 done
582 if test -r "$cache_file"; then
583 echo "loading cache $cache_file"
584 . $cache_file
585 else
586 echo "creating cache $cache_file"
587 > $cache_file
590 ac_ext=c
591 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
592 ac_cpp='$CPP $CPPFLAGS'
593 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
594 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
595 cross_compiling=$ac_cv_prog_cc_cross
597 ac_exeext=
598 ac_objext=o
599 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
600 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
601 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
602 ac_n= ac_c='
603 ' ac_t=' '
604 else
605 ac_n=-n ac_c= ac_t=
607 else
608 ac_n= ac_c='\c' ac_t=
614 remove=rm
615 hard_link=ln
616 symbolic_link='ln -s'
617 copy=cp
619 # Check for bogus environment variables.
620 # Test if LIBRARY_PATH contains the notation for the current directory
621 # since this would lead to problems installing/building glibc.
622 # LIBRARY_PATH contains the current directory if one of the following
623 # is true:
624 # - one of the terminals (":" and ";") is the first or last sign
625 # - two terminals occur directly after each other
626 # - the path contains an element with a dot in it
627 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
628 echo "configure:629: checking LIBRARY_PATH variable" >&5
629 case ${LIBRARY_PATH} in
630 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
631 library_path_setting="contains current directory"
634 library_path_setting="ok"
636 esac
637 echo "$ac_t""$library_path_setting" 1>&6
638 if test "$library_path_setting" != "ok"; then
639 { echo "configure: error:
640 *** LIBRARY_PATH shouldn't contain the current directory when
641 *** building gcc. Please change the environment variable
642 *** and run configure again." 1>&2; exit 1; }
645 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
646 # since this would lead to problems installing/building glibc.
647 # GCC_EXEC_PREFIX contains the current directory if one of the following
648 # is true:
649 # - one of the terminals (":" and ";") is the first or last sign
650 # - two terminals occur directly after each other
651 # - the path contains an element with a dot in it
652 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
653 echo "configure:654: checking GCC_EXEC_PREFIX variable" >&5
654 case ${GCC_EXEC_PREFIX} in
655 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
656 gcc_exec_prefix_setting="contains current directory"
659 gcc_exec_prefix_setting="ok"
661 esac
662 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
663 if test "$gcc_exec_prefix_setting" != "ok"; then
664 { echo "configure: error:
665 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
666 *** building gcc. Please change the environment variable
667 *** and run configure again." 1>&2; exit 1; }
670 # Check for additional parameters
672 # With GNU ld
673 # Check whether --with-gnu-ld or --without-gnu-ld was given.
674 if test "${with_gnu_ld+set}" = set; then
675 withval="$with_gnu_ld"
676 gnu_ld_flag="$with_gnu_ld"
677 else
678 gnu_ld_flag=no
682 # With pre-defined ld
683 # Check whether --with-ld or --without-ld was given.
684 if test "${with_ld+set}" = set; then
685 withval="$with_ld"
686 DEFAULT_LINKER="$with_ld"
689 if test x"${DEFAULT_LINKER+set}" = x"set"; then
690 if test ! -x "$DEFAULT_LINKER"; then
691 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
692 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
693 gnu_ld_flag=yes
695 cat >> confdefs.h <<EOF
696 #define DEFAULT_LINKER "$DEFAULT_LINKER"
701 # With GNU as
702 # Check whether --with-gnu-as or --without-gnu-as was given.
703 if test "${with_gnu_as+set}" = set; then
704 withval="$with_gnu_as"
705 gas_flag="$with_gnu_as"
706 else
707 gas_flag=no
711 # Check whether --with-as or --without-as was given.
712 if test "${with_as+set}" = set; then
713 withval="$with_as"
714 DEFAULT_ASSEMBLER="$with_as"
717 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
718 if test ! -x "$DEFAULT_ASSEMBLER"; then
719 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
720 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
721 gas_flag=yes
723 cat >> confdefs.h <<EOF
724 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
729 # With stabs
730 # Check whether --with-stabs or --without-stabs was given.
731 if test "${with_stabs+set}" = set; then
732 withval="$with_stabs"
733 stabs="$with_stabs"
734 else
735 stabs=no
739 # With ELF
740 # Check whether --with-elf or --without-elf was given.
741 if test "${with_elf+set}" = set; then
742 withval="$with_elf"
743 elf="$with_elf"
744 else
745 elf=no
749 # Specify the local prefix
750 local_prefix=
751 # Check whether --with-local-prefix or --without-local-prefix was given.
752 if test "${with_local_prefix+set}" = set; then
753 withval="$with_local_prefix"
754 case "${withval}" in
755 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
756 no) ;;
757 *) local_prefix=$with_local_prefix ;;
758 esac
762 # Default local prefix if it is empty
763 if test x$local_prefix = x; then
764 local_prefix=/usr/local
767 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
768 # passed in by the toplevel make and thus we'd get different behavior
769 # depending on where we built the sources.
770 gcc_gxx_include_dir=
771 # Specify the g++ header file directory
772 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
773 if test "${with_gxx_include_dir+set}" = set; then
774 withval="$with_gxx_include_dir"
775 case "${withval}" in
776 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
777 no) ;;
778 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
779 esac
783 if test x${gcc_gxx_include_dir} = x; then
784 if test x${enable_version_specific_runtime_libs} = xyes; then
785 gcc_gxx_include_dir='${libsubdir}/include/g++'
786 else
787 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
788 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
792 # Determine whether or not multilibs are enabled.
793 # Check whether --enable-multilib or --disable-multilib was given.
794 if test "${enable_multilib+set}" = set; then
795 enableval="$enable_multilib"
797 else
798 enable_multilib=yes
803 # Enable expensive internal checks
804 # Check whether --enable-checking or --disable-checking was given.
805 if test "${enable_checking+set}" = set; then
806 enableval="$enable_checking"
807 ac_checking=
808 ac_tree_checking=
809 ac_rtl_checking=
810 ac_gc_checking=
811 ac_gc_always_collect=
812 case "${enableval}" in
813 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
814 no) ;;
815 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
816 set fnord $enableval; shift
817 IFS="$ac_save_IFS"
818 for check
820 case $check in
821 misc) ac_checking=1 ;;
822 tree) ac_tree_checking=1 ;;
823 rtl) ac_rtl_checking=1 ;;
824 gc) ac_gc_checking=1 ;;
825 gcac) ac_gc_always_collect=1 ;;
826 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
827 esac
828 done
830 esac
834 if test x$ac_checking != x ; then
835 cat >> confdefs.h <<\EOF
836 #define ENABLE_CHECKING 1
840 if test x$ac_tree_checking != x ; then
841 cat >> confdefs.h <<\EOF
842 #define ENABLE_TREE_CHECKING 1
846 if test x$ac_rtl_checking != x ; then
847 cat >> confdefs.h <<\EOF
848 #define ENABLE_RTL_CHECKING 1
852 if test x$ac_gc_checking != x ; then
853 cat >> confdefs.h <<\EOF
854 #define ENABLE_GC_CHECKING 1
858 if test x$ac_gc_always_collect != x ; then
859 cat >> confdefs.h <<\EOF
860 #define ENABLE_GC_ALWAYS_COLLECT 1
866 # Check whether --enable-cpp or --disable-cpp was given.
867 if test "${enable_cpp+set}" = set; then
868 enableval="$enable_cpp"
870 else
871 enable_cpp=yes
875 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
876 if test "${with_cpp_install_dir+set}" = set; then
877 withval="$with_cpp_install_dir"
878 if test x$withval = xyes; then
879 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
880 elif test x$withval != xno; then
881 cpp_install_dir=$withval
886 # Enable Multibyte Characters for C/C++
887 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
888 if test "${enable_c_mbchar+set}" = set; then
889 enableval="$enable_c_mbchar"
890 if test x$enable_c_mbchar != xno; then
891 cat >> confdefs.h <<\EOF
892 #define MULTIBYTE_CHARS 1
899 # Enable threads
900 # Pass with no value to take the default
901 # Pass with a value to specify a thread package
902 # Check whether --enable-threads or --disable-threads was given.
903 if test "${enable_threads+set}" = set; then
904 enableval="$enable_threads"
906 else
907 enable_threads=''
911 enable_threads_flag=$enable_threads
912 # Check if a valid thread package
913 case x${enable_threads_flag} in
914 x | xno)
915 # No threads
916 target_thread_file='single'
918 xyes)
919 # default
920 target_thread_file=''
922 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
923 xsolaris | xwin32 | xdce | xvxworks | xaix)
924 target_thread_file=$enable_threads_flag
927 echo "$enable_threads is an unknown thread package" 1>&2
928 exit 1
930 esac
932 # Check whether --enable-objc-gc or --disable-objc-gc was given.
933 if test "${enable_objc_gc+set}" = set; then
934 enableval="$enable_objc_gc"
935 if test x$enable_objc_gc = xno; then
936 objc_boehm_gc=''
937 else
938 objc_boehm_gc=1
940 else
941 objc_boehm_gc=''
945 # Check whether --with-dwarf2 or --without-dwarf2 was given.
946 if test "${with_dwarf2+set}" = set; then
947 withval="$with_dwarf2"
948 dwarf2="$with_dwarf2"
949 else
950 dwarf2=no
954 # Check whether --enable-shared or --disable-shared was given.
955 if test "${enable_shared+set}" = set; then
956 enableval="$enable_shared"
958 case $enable_shared in
959 yes | no) ;;
961 enable_shared=no
962 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
963 for pkg in $enableval; do
964 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
965 enable_shared=yes
967 done
968 IFS="$ac_save_ifs"
970 esac
972 else
973 enable_shared=yes
978 # Determine the host, build, and target systems
979 ac_aux_dir=
980 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
981 if test -f $ac_dir/install-sh; then
982 ac_aux_dir=$ac_dir
983 ac_install_sh="$ac_aux_dir/install-sh -c"
984 break
985 elif test -f $ac_dir/install.sh; then
986 ac_aux_dir=$ac_dir
987 ac_install_sh="$ac_aux_dir/install.sh -c"
988 break
990 done
991 if test -z "$ac_aux_dir"; then
992 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
994 ac_config_guess=$ac_aux_dir/config.guess
995 ac_config_sub=$ac_aux_dir/config.sub
996 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 # same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 # as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1020 # Make sure we can run config.sub.
1021 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1022 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1025 echo $ac_n "checking host system type""... $ac_c" 1>&6
1026 echo "configure:1027: checking host system type" >&5
1028 host_alias=$host
1029 case "$host_alias" in
1030 NONE)
1031 case $nonopt in
1032 NONE)
1033 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1034 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1035 fi ;;
1036 *) host_alias=$nonopt ;;
1037 esac ;;
1038 esac
1040 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1041 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1042 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1043 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1044 echo "$ac_t""$host" 1>&6
1046 echo $ac_n "checking target system type""... $ac_c" 1>&6
1047 echo "configure:1048: checking target system type" >&5
1049 target_alias=$target
1050 case "$target_alias" in
1051 NONE)
1052 case $nonopt in
1053 NONE) target_alias=$host_alias ;;
1054 *) target_alias=$nonopt ;;
1055 esac ;;
1056 esac
1058 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1059 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1060 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1061 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1062 echo "$ac_t""$target" 1>&6
1064 echo $ac_n "checking build system type""... $ac_c" 1>&6
1065 echo "configure:1066: checking build system type" >&5
1067 build_alias=$build
1068 case "$build_alias" in
1069 NONE)
1070 case $nonopt in
1071 NONE) build_alias=$host_alias ;;
1072 *) build_alias=$nonopt ;;
1073 esac ;;
1074 esac
1076 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1077 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1078 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1079 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1080 echo "$ac_t""$build" 1>&6
1082 test "$host_alias" != "$target_alias" &&
1083 test "$program_prefix$program_suffix$program_transform_name" = \
1084 NONENONEs,x,x, &&
1085 program_prefix=${target_alias}-
1088 # Find the native compiler
1089 # Extract the first word of "gcc", so it can be a program name with args.
1090 set dummy gcc; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096 if test -n "$CC"; then
1097 ac_cv_prog_CC="$CC" # Let the user override the test.
1098 else
1099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1100 ac_dummy="$PATH"
1101 for ac_dir in $ac_dummy; do
1102 test -z "$ac_dir" && ac_dir=.
1103 if test -f $ac_dir/$ac_word; then
1104 ac_cv_prog_CC="gcc"
1105 break
1107 done
1108 IFS="$ac_save_ifs"
1111 CC="$ac_cv_prog_CC"
1112 if test -n "$CC"; then
1113 echo "$ac_t""$CC" 1>&6
1114 else
1115 echo "$ac_t""no" 1>&6
1118 if test -z "$CC"; then
1119 # Extract the first word of "cc", so it can be a program name with args.
1120 set dummy cc; ac_word=$2
1121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1122 echo "configure:1123: checking for $ac_word" >&5
1123 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1124 echo $ac_n "(cached) $ac_c" 1>&6
1125 else
1126 if test -n "$CC"; then
1127 ac_cv_prog_CC="$CC" # Let the user override the test.
1128 else
1129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1130 ac_prog_rejected=no
1131 ac_dummy="$PATH"
1132 for ac_dir in $ac_dummy; do
1133 test -z "$ac_dir" && ac_dir=.
1134 if test -f $ac_dir/$ac_word; then
1135 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1136 ac_prog_rejected=yes
1137 continue
1139 ac_cv_prog_CC="cc"
1140 break
1142 done
1143 IFS="$ac_save_ifs"
1144 if test $ac_prog_rejected = yes; then
1145 # We found a bogon in the path, so make sure we never use it.
1146 set dummy $ac_cv_prog_CC
1147 shift
1148 if test $# -gt 0; then
1149 # We chose a different compiler from the bogus one.
1150 # However, it has the same basename, so the bogon will be chosen
1151 # first if we set CC to just the basename; use the full file name.
1152 shift
1153 set dummy "$ac_dir/$ac_word" "$@"
1154 shift
1155 ac_cv_prog_CC="$@"
1160 CC="$ac_cv_prog_CC"
1161 if test -n "$CC"; then
1162 echo "$ac_t""$CC" 1>&6
1163 else
1164 echo "$ac_t""no" 1>&6
1167 if test -z "$CC"; then
1168 case "`uname -s`" in
1169 *win32* | *WIN32*)
1170 # Extract the first word of "cl", so it can be a program name with args.
1171 set dummy cl; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 echo "configure:1174: checking for $ac_word" >&5
1174 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177 if test -n "$CC"; then
1178 ac_cv_prog_CC="$CC" # Let the user override the test.
1179 else
1180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1181 ac_dummy="$PATH"
1182 for ac_dir in $ac_dummy; do
1183 test -z "$ac_dir" && ac_dir=.
1184 if test -f $ac_dir/$ac_word; then
1185 ac_cv_prog_CC="cl"
1186 break
1188 done
1189 IFS="$ac_save_ifs"
1192 CC="$ac_cv_prog_CC"
1193 if test -n "$CC"; then
1194 echo "$ac_t""$CC" 1>&6
1195 else
1196 echo "$ac_t""no" 1>&6
1199 esac
1201 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1204 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1207 ac_ext=c
1208 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1209 ac_cpp='$CPP $CPPFLAGS'
1210 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1211 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1212 cross_compiling=$ac_cv_prog_cc_cross
1214 cat > conftest.$ac_ext << EOF
1216 #line 1217 "configure"
1217 #include "confdefs.h"
1219 main(){return(0);}
1221 if { (eval echo configure:1222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1222 ac_cv_prog_cc_works=yes
1223 # If we can't run a trivial program, we are probably using a cross compiler.
1224 if (./conftest; exit) 2>/dev/null; then
1225 ac_cv_prog_cc_cross=no
1226 else
1227 ac_cv_prog_cc_cross=yes
1229 else
1230 echo "configure: failed program was:" >&5
1231 cat conftest.$ac_ext >&5
1232 ac_cv_prog_cc_works=no
1234 rm -fr conftest*
1235 ac_ext=c
1236 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1237 ac_cpp='$CPP $CPPFLAGS'
1238 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1239 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1240 cross_compiling=$ac_cv_prog_cc_cross
1242 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1243 if test $ac_cv_prog_cc_works = no; then
1244 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1246 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1247 echo "configure:1248: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1248 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1249 cross_compiling=$ac_cv_prog_cc_cross
1251 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1252 echo "configure:1253: checking whether we are using GNU C" >&5
1253 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255 else
1256 cat > conftest.c <<EOF
1257 #ifdef __GNUC__
1258 yes;
1259 #endif
1261 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1262 ac_cv_prog_gcc=yes
1263 else
1264 ac_cv_prog_gcc=no
1268 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1270 if test $ac_cv_prog_gcc = yes; then
1271 GCC=yes
1272 else
1273 GCC=
1276 ac_test_CFLAGS="${CFLAGS+set}"
1277 ac_save_CFLAGS="$CFLAGS"
1278 CFLAGS=
1279 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1280 echo "configure:1281: checking whether ${CC-cc} accepts -g" >&5
1281 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284 echo 'void f(){}' > conftest.c
1285 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1286 ac_cv_prog_cc_g=yes
1287 else
1288 ac_cv_prog_cc_g=no
1290 rm -f conftest*
1294 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1295 if test "$ac_test_CFLAGS" = set; then
1296 CFLAGS="$ac_save_CFLAGS"
1297 elif test $ac_cv_prog_cc_g = yes; then
1298 if test "$GCC" = yes; then
1299 CFLAGS="-g -O2"
1300 else
1301 CFLAGS="-g"
1303 else
1304 if test "$GCC" = yes; then
1305 CFLAGS="-O2"
1306 else
1307 CFLAGS=
1311 if test "x$CC" != xcc; then
1312 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1313 echo "configure:1314: checking whether $CC and cc understand -c and -o together" >&5
1314 else
1315 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1316 echo "configure:1317: checking whether cc understands -c and -o together" >&5
1318 set dummy $CC; ac_cc="`echo $2 |
1319 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1320 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1321 echo $ac_n "(cached) $ac_c" 1>&6
1322 else
1323 echo 'foo(){}' > conftest.c
1324 # Make sure it works both with $CC and with simple cc.
1325 # We do the test twice because some compilers refuse to overwrite an
1326 # existing .o file with -o, though they will create one.
1327 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1328 if { (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1329 test -f conftest.o && { (eval echo configure:1330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1330 then
1331 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1332 if test "x$CC" != xcc; then
1333 # Test first that cc exists at all.
1334 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1335 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1336 if { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1337 test -f conftest.o && { (eval echo configure:1338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1338 then
1339 # cc works too.
1341 else
1342 # cc exists but doesn't like -o.
1343 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1347 else
1348 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1350 rm -f conftest*
1353 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1354 echo "$ac_t""yes" 1>&6
1355 else
1356 echo "$ac_t""no" 1>&6
1357 cat >> confdefs.h <<\EOF
1358 #define NO_MINUS_C_MINUS_O 1
1363 # autoconf is lame and doesn't give us any substitution variable for this.
1364 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1365 NO_MINUS_C_MINUS_O=yes
1366 else
1367 OUTPUT_OPTION='-o $@'
1372 echo $ac_n "checking for long double""... $ac_c" 1>&6
1373 echo "configure:1374: checking for long double" >&5
1374 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1375 echo $ac_n "(cached) $ac_c" 1>&6
1376 else
1377 if test "$GCC" = yes; then
1378 gcc_cv_c_long_double=yes
1379 else
1380 cat > conftest.$ac_ext <<EOF
1381 #line 1382 "configure"
1382 #include "confdefs.h"
1384 int main() {
1385 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1386 long double foo = 0.0;
1387 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1388 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1389 ; return 0; }
1391 if { (eval echo configure:1392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1392 rm -rf conftest*
1393 gcc_cv_c_long_double=yes
1394 else
1395 echo "configure: failed program was:" >&5
1396 cat conftest.$ac_ext >&5
1397 rm -rf conftest*
1398 gcc_cv_c_long_double=no
1400 rm -f conftest*
1404 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1405 if test $gcc_cv_c_long_double = yes; then
1406 cat >> confdefs.h <<\EOF
1407 #define HAVE_LONG_DOUBLE 1
1412 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1413 echo "configure:1414: checking for built-in _Bool" >&5
1414 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1415 echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417 cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1421 int main() {
1422 _Bool foo;
1423 ; return 0; }
1425 if { (eval echo configure:1426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1426 rm -rf conftest*
1427 gcc_cv_c__bool=yes
1428 else
1429 echo "configure: failed program was:" >&5
1430 cat conftest.$ac_ext >&5
1431 rm -rf conftest*
1432 gcc_cv_c__bool=no
1434 rm -f conftest*
1438 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1439 if test $gcc_cv_c__bool = yes; then
1440 cat >> confdefs.h <<\EOF
1441 #define HAVE__BOOL 1
1447 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1448 echo "configure:1449: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1449 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1450 echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452 save_CFLAGS="$CFLAGS"
1453 CFLAGS="-Wno-long-long"
1454 cat > conftest.$ac_ext <<EOF
1455 #line 1456 "configure"
1456 #include "confdefs.h"
1458 int main() {
1460 ; return 0; }
1462 if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1463 rm -rf conftest*
1464 ac_cv_prog_cc_no_long_long=yes
1465 else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 ac_cv_prog_cc_no_long_long=no
1471 rm -f conftest*
1472 CFLAGS="$save_CFLAGS"
1475 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1476 strict1_warn=
1477 if test $ac_cv_prog_cc_no_long_long = yes; then
1478 strict1_warn="-pedantic -Wno-long-long"
1482 # If the native compiler is GCC, we can enable warnings even in stage1.
1483 # That's useful for people building cross-compilers, or just running a
1484 # quick `make'.
1485 warn_cflags=
1486 if test "x$GCC" = "xyes"; then
1487 warn_cflags='$(GCC_WARN_CFLAGS)'
1491 # Stage specific cflags for build.
1492 stage1_cflags=
1493 case $build in
1494 vax-*-*)
1495 if test x$GCC = xyes
1496 then
1497 stage1_cflags="-Wa,-J"
1498 else
1499 stage1_cflags="-J"
1502 esac
1505 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1506 echo "configure:1507: checking whether ${MAKE-make} sets \${MAKE}" >&5
1507 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1508 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511 cat > conftestmake <<\EOF
1512 all:
1513 @echo 'ac_maketemp="${MAKE}"'
1515 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1516 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1517 if test -n "$ac_maketemp"; then
1518 eval ac_cv_prog_make_${ac_make}_set=yes
1519 else
1520 eval ac_cv_prog_make_${ac_make}_set=no
1522 rm -f conftestmake
1524 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1525 echo "$ac_t""yes" 1>&6
1526 SET_MAKE=
1527 else
1528 echo "$ac_t""no" 1>&6
1529 SET_MAKE="MAKE=${MAKE-make}"
1533 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1534 echo "configure:1535: checking whether a default assembler was specified" >&5
1535 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1536 if test x"$gas_flag" = x"no"; then
1537 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1538 else
1539 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1541 else
1542 echo "$ac_t""no" 1>&6
1545 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1546 echo "configure:1547: checking whether a default linker was specified" >&5
1547 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1548 if test x"$gnu_ld_flag" = x"no"; then
1549 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1550 else
1551 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1553 else
1554 echo "$ac_t""no" 1>&6
1557 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
1558 echo "configure:1559: checking for GNU C library" >&5
1559 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
1561 else
1562 cat > conftest.$ac_ext <<EOF
1563 #line 1564 "configure"
1564 #include "confdefs.h"
1565 #include <features.h>
1566 int main() {
1568 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
1569 #error Not a GNU C library system
1570 #endif
1571 ; return 0; }
1573 if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1574 rm -rf conftest*
1575 gcc_cv_glibc=yes
1576 else
1577 echo "configure: failed program was:" >&5
1578 cat conftest.$ac_ext >&5
1579 rm -rf conftest*
1580 gcc_cv_glibc=no
1582 rm -f conftest*
1585 echo "$ac_t""$gcc_cv_glibc" 1>&6
1586 if test $gcc_cv_glibc = yes; then
1587 cat >> confdefs.h <<\EOF
1588 #define _GNU_SOURCE 1
1593 echo $ac_n "checking for inline""... $ac_c" 1>&6
1594 echo "configure:1595: checking for inline" >&5
1595 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
1597 else
1598 ac_cv_c_inline=no
1599 for ac_kw in inline __inline__ __inline; do
1600 cat > conftest.$ac_ext <<EOF
1601 #line 1602 "configure"
1602 #include "confdefs.h"
1604 int main() {
1605 } $ac_kw foo() {
1606 ; return 0; }
1608 if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1609 rm -rf conftest*
1610 ac_cv_c_inline=$ac_kw; break
1611 else
1612 echo "configure: failed program was:" >&5
1613 cat conftest.$ac_ext >&5
1615 rm -f conftest*
1616 done
1620 echo "$ac_t""$ac_cv_c_inline" 1>&6
1621 case "$ac_cv_c_inline" in
1622 inline | yes) ;;
1623 no) cat >> confdefs.h <<\EOF
1624 #define inline
1627 *) cat >> confdefs.h <<EOF
1628 #define inline $ac_cv_c_inline
1631 esac
1634 # Find some useful tools
1635 for ac_prog in mawk gawk nawk awk
1637 # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1640 echo "configure:1641: checking for $ac_word" >&5
1641 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1642 echo $ac_n "(cached) $ac_c" 1>&6
1643 else
1644 if test -n "$AWK"; then
1645 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1646 else
1647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650 test -z "$ac_dir" && ac_dir=.
1651 if test -f $ac_dir/$ac_word; then
1652 ac_cv_prog_AWK="$ac_prog"
1653 break
1655 done
1656 IFS="$ac_save_ifs"
1659 AWK="$ac_cv_prog_AWK"
1660 if test -n "$AWK"; then
1661 echo "$ac_t""$AWK" 1>&6
1662 else
1663 echo "$ac_t""no" 1>&6
1666 test -n "$AWK" && break
1667 done
1669 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1670 echo "configure:1671: checking whether ln works" >&5
1671 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1672 echo $ac_n "(cached) $ac_c" 1>&6
1673 else
1674 rm -f conftestdata_t
1675 echo >conftestdata_f
1676 if ln conftestdata_f conftestdata_t 2>/dev/null
1677 then
1678 gcc_cv_prog_LN="ln"
1679 else
1680 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1681 then
1682 gcc_cv_prog_LN="ln -s"
1683 else
1684 gcc_cv_prog_LN=cp
1687 rm -f conftestdata_f conftestdata_t
1690 LN="$gcc_cv_prog_LN"
1691 if test "$gcc_cv_prog_LN" = "ln"; then
1692 echo "$ac_t""yes" 1>&6
1693 else
1694 if test "$gcc_cv_prog_LN" = "ln -s"; then
1695 echo "$ac_t""no, using ln -s" 1>&6
1696 else
1697 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1701 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1702 echo "configure:1703: checking whether ln -s works" >&5
1703 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706 rm -f conftestdata_t
1707 echo >conftestdata_f
1708 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1709 then
1710 gcc_cv_prog_LN_S="ln -s"
1711 else
1712 if ln conftestdata_f conftestdata_t 2>/dev/null
1713 then
1714 gcc_cv_prog_LN_S=ln
1715 else
1716 gcc_cv_prog_LN_S=cp
1719 rm -f conftestdata_f conftestdata_t
1722 LN_S="$gcc_cv_prog_LN_S"
1723 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1724 echo "$ac_t""yes" 1>&6
1725 else
1726 if test "$gcc_cv_prog_LN_S" = "ln"; then
1727 echo "$ac_t""no, using ln" 1>&6
1728 else
1729 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1733 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1734 echo "configure:1735: checking for volatile" >&5
1735 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1737 else
1738 cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1742 int main() {
1743 volatile int foo;
1744 ; return 0; }
1746 if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1747 rm -rf conftest*
1748 gcc_cv_c_volatile=yes
1749 else
1750 echo "configure: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 rm -rf conftest*
1753 gcc_cv_c_volatile=no
1755 rm -f conftest*
1758 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1759 if test $gcc_cv_c_volatile = yes ; then
1760 cat >> confdefs.h <<\EOF
1761 #define HAVE_VOLATILE 1
1766 # Extract the first word of "ranlib", so it can be a program name with args.
1767 set dummy ranlib; ac_word=$2
1768 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1769 echo "configure:1770: checking for $ac_word" >&5
1770 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1771 echo $ac_n "(cached) $ac_c" 1>&6
1772 else
1773 if test -n "$RANLIB"; then
1774 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1775 else
1776 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1777 ac_dummy="$PATH"
1778 for ac_dir in $ac_dummy; do
1779 test -z "$ac_dir" && ac_dir=.
1780 if test -f $ac_dir/$ac_word; then
1781 ac_cv_prog_RANLIB="ranlib"
1782 break
1784 done
1785 IFS="$ac_save_ifs"
1786 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1789 RANLIB="$ac_cv_prog_RANLIB"
1790 if test -n "$RANLIB"; then
1791 echo "$ac_t""$RANLIB" 1>&6
1792 else
1793 echo "$ac_t""no" 1>&6
1796 # Find a good install program. We prefer a C program (faster),
1797 # so one script is as good as another. But avoid the broken or
1798 # incompatible versions:
1799 # SysV /etc/install, /usr/sbin/install
1800 # SunOS /usr/etc/install
1801 # IRIX /sbin/install
1802 # AIX /bin/install
1803 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1804 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1805 # ./install, which can be erroneously created by make from ./install.sh.
1806 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1807 echo "configure:1808: checking for a BSD compatible install" >&5
1808 if test -z "$INSTALL"; then
1809 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1813 for ac_dir in $PATH; do
1814 # Account for people who put trailing slashes in PATH elements.
1815 case "$ac_dir/" in
1816 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1818 # OSF1 and SCO ODT 3.0 have their own names for install.
1819 for ac_prog in ginstall scoinst install; do
1820 if test -f $ac_dir/$ac_prog; then
1821 if test $ac_prog = install &&
1822 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1823 # AIX install. It has an incompatible calling convention.
1824 # OSF/1 installbsd also uses dspmsg, but is usable.
1826 else
1827 ac_cv_path_install="$ac_dir/$ac_prog -c"
1828 break 2
1831 done
1833 esac
1834 done
1835 IFS="$ac_save_IFS"
1838 if test "${ac_cv_path_install+set}" = set; then
1839 INSTALL="$ac_cv_path_install"
1840 else
1841 # As a last resort, use the slow shell script. We don't cache a
1842 # path for INSTALL within a source directory, because that will
1843 # break other packages using the cache if that directory is
1844 # removed, or if the path is relative.
1845 INSTALL="$ac_install_sh"
1848 echo "$ac_t""$INSTALL" 1>&6
1850 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1851 # It thinks the first close brace ends the variable substitution.
1852 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1854 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1857 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1858 echo "configure:1859: checking how to run the C preprocessor" >&5
1859 # On Suns, sometimes $CPP names a directory.
1860 if test -n "$CPP" && test -d "$CPP"; then
1861 CPP=
1863 if test -z "$CPP"; then
1864 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1865 echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867 # This must be in double quotes, not single quotes, because CPP may get
1868 # substituted into the Makefile and "${CC-cc}" will confuse make.
1869 CPP="${CC-cc} -E"
1870 # On the NeXT, cc -E runs the code through the compiler's parser,
1871 # not just through cpp.
1872 cat > conftest.$ac_ext <<EOF
1873 #line 1874 "configure"
1874 #include "confdefs.h"
1875 #include <assert.h>
1876 Syntax Error
1878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1879 { (eval echo configure:1880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1881 if test -z "$ac_err"; then
1883 else
1884 echo "$ac_err" >&5
1885 echo "configure: failed program was:" >&5
1886 cat conftest.$ac_ext >&5
1887 rm -rf conftest*
1888 CPP="${CC-cc} -E -traditional-cpp"
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 #include <assert.h>
1893 Syntax Error
1895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1896 { (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1898 if test -z "$ac_err"; then
1900 else
1901 echo "$ac_err" >&5
1902 echo "configure: failed program was:" >&5
1903 cat conftest.$ac_ext >&5
1904 rm -rf conftest*
1905 CPP="${CC-cc} -nologo -E"
1906 cat > conftest.$ac_ext <<EOF
1907 #line 1908 "configure"
1908 #include "confdefs.h"
1909 #include <assert.h>
1910 Syntax Error
1912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1913 { (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1915 if test -z "$ac_err"; then
1917 else
1918 echo "$ac_err" >&5
1919 echo "configure: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 rm -rf conftest*
1922 CPP=/lib/cpp
1924 rm -f conftest*
1926 rm -f conftest*
1928 rm -f conftest*
1929 ac_cv_prog_CPP="$CPP"
1931 CPP="$ac_cv_prog_CPP"
1932 else
1933 ac_cv_prog_CPP="$CPP"
1935 echo "$ac_t""$CPP" 1>&6
1937 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1938 echo "configure:1939: checking for ANSI C header files" >&5
1939 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1940 echo $ac_n "(cached) $ac_c" 1>&6
1941 else
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 #include <stdlib.h>
1946 #include <stdarg.h>
1947 #include <string.h>
1948 #include <float.h>
1950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1951 { (eval echo configure:1952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1953 if test -z "$ac_err"; then
1954 rm -rf conftest*
1955 ac_cv_header_stdc=yes
1956 else
1957 echo "$ac_err" >&5
1958 echo "configure: failed program was:" >&5
1959 cat conftest.$ac_ext >&5
1960 rm -rf conftest*
1961 ac_cv_header_stdc=no
1963 rm -f conftest*
1965 if test $ac_cv_header_stdc = yes; then
1966 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1967 cat > conftest.$ac_ext <<EOF
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970 #include <string.h>
1972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1973 egrep "memchr" >/dev/null 2>&1; then
1975 else
1976 rm -rf conftest*
1977 ac_cv_header_stdc=no
1979 rm -f conftest*
1983 if test $ac_cv_header_stdc = yes; then
1984 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1985 cat > conftest.$ac_ext <<EOF
1986 #line 1987 "configure"
1987 #include "confdefs.h"
1988 #include <stdlib.h>
1990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1991 egrep "free" >/dev/null 2>&1; then
1993 else
1994 rm -rf conftest*
1995 ac_cv_header_stdc=no
1997 rm -f conftest*
2001 if test $ac_cv_header_stdc = yes; then
2002 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2003 if test "$cross_compiling" = yes; then
2005 else
2006 cat > conftest.$ac_ext <<EOF
2007 #line 2008 "configure"
2008 #include "confdefs.h"
2009 #include <ctype.h>
2010 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2011 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2012 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2013 int main () { int i; for (i = 0; i < 256; i++)
2014 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2015 exit (0); }
2018 if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2019 then
2021 else
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -fr conftest*
2025 ac_cv_header_stdc=no
2027 rm -fr conftest*
2033 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2034 if test $ac_cv_header_stdc = yes; then
2035 cat >> confdefs.h <<\EOF
2036 #define STDC_HEADERS 1
2041 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2042 echo "configure:2043: checking whether time.h and sys/time.h may both be included" >&5
2043 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
2045 else
2046 cat > conftest.$ac_ext <<EOF
2047 #line 2048 "configure"
2048 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/time.h>
2051 #include <time.h>
2052 int main() {
2053 struct tm *tp;
2054 ; return 0; }
2056 if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2057 rm -rf conftest*
2058 ac_cv_header_time=yes
2059 else
2060 echo "configure: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 rm -rf conftest*
2063 ac_cv_header_time=no
2065 rm -f conftest*
2068 echo "$ac_t""$ac_cv_header_time" 1>&6
2069 if test $ac_cv_header_time = yes; then
2070 cat >> confdefs.h <<\EOF
2071 #define TIME_WITH_SYS_TIME 1
2076 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2077 echo "configure:2078: checking for working stdbool.h" >&5
2078 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080 else
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 #include <stdbool.h>
2085 int main() {
2086 bool foo = false;
2087 ; return 0; }
2089 if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2090 rm -rf conftest*
2091 ac_cv_header_stdbool_h=yes
2092 else
2093 echo "configure: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 rm -rf conftest*
2096 ac_cv_header_stdbool_h=no
2098 rm -f conftest*
2101 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2102 if test $ac_cv_header_stdbool_h = yes; then
2103 cat >> confdefs.h <<\EOF
2104 #define HAVE_STDBOOL_H 1
2109 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2110 echo "configure:2111: checking whether string.h and strings.h may both be included" >&5
2111 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2112 echo $ac_n "(cached) $ac_c" 1>&6
2113 else
2114 cat > conftest.$ac_ext <<EOF
2115 #line 2116 "configure"
2116 #include "confdefs.h"
2117 #include <string.h>
2118 #include <strings.h>
2119 int main() {
2121 ; return 0; }
2123 if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2124 rm -rf conftest*
2125 gcc_cv_header_string=yes
2126 else
2127 echo "configure: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2129 rm -rf conftest*
2130 gcc_cv_header_string=no
2132 rm -f conftest*
2135 echo "$ac_t""$gcc_cv_header_string" 1>&6
2136 if test $gcc_cv_header_string = yes; then
2137 cat >> confdefs.h <<\EOF
2138 #define STRING_WITH_STRINGS 1
2143 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2144 echo "configure:2145: checking for sys/wait.h that is POSIX.1 compatible" >&5
2145 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2146 echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148 cat > conftest.$ac_ext <<EOF
2149 #line 2150 "configure"
2150 #include "confdefs.h"
2151 #include <sys/types.h>
2152 #include <sys/wait.h>
2153 #ifndef WEXITSTATUS
2154 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2155 #endif
2156 #ifndef WIFEXITED
2157 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2158 #endif
2159 int main() {
2160 int s;
2161 wait (&s);
2162 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2163 ; return 0; }
2165 if { (eval echo configure:2166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2166 rm -rf conftest*
2167 ac_cv_header_sys_wait_h=yes
2168 else
2169 echo "configure: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 rm -rf conftest*
2172 ac_cv_header_sys_wait_h=no
2174 rm -f conftest*
2177 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2178 if test $ac_cv_header_sys_wait_h = yes; then
2179 cat >> confdefs.h <<\EOF
2180 #define HAVE_SYS_WAIT_H 1
2185 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2186 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2187 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2188 direct.h malloc.h langinfo.h iconv.h
2190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2192 echo "configure:2193: checking for $ac_hdr" >&5
2193 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2194 echo $ac_n "(cached) $ac_c" 1>&6
2195 else
2196 cat > conftest.$ac_ext <<EOF
2197 #line 2198 "configure"
2198 #include "confdefs.h"
2199 #include <$ac_hdr>
2201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2202 { (eval echo configure:2203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2204 if test -z "$ac_err"; then
2205 rm -rf conftest*
2206 eval "ac_cv_header_$ac_safe=yes"
2207 else
2208 echo "$ac_err" >&5
2209 echo "configure: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 rm -rf conftest*
2212 eval "ac_cv_header_$ac_safe=no"
2214 rm -f conftest*
2216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2219 cat >> confdefs.h <<EOF
2220 #define $ac_tr_hdr 1
2223 else
2224 echo "$ac_t""no" 1>&6
2226 done
2229 # Check for thread headers.
2230 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2231 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2232 echo "configure:2233: checking for thread.h" >&5
2233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 #include <thread.h>
2241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2242 { (eval echo configure:2243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2244 if test -z "$ac_err"; then
2245 rm -rf conftest*
2246 eval "ac_cv_header_$ac_safe=yes"
2247 else
2248 echo "$ac_err" >&5
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -rf conftest*
2252 eval "ac_cv_header_$ac_safe=no"
2254 rm -f conftest*
2256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2257 echo "$ac_t""yes" 1>&6
2258 have_thread_h=yes
2259 else
2260 echo "$ac_t""no" 1>&6
2261 have_thread_h=
2264 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2265 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2266 echo "configure:2267: checking for pthread.h" >&5
2267 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2268 echo $ac_n "(cached) $ac_c" 1>&6
2269 else
2270 cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 #include <pthread.h>
2275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2276 { (eval echo configure:2277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2278 if test -z "$ac_err"; then
2279 rm -rf conftest*
2280 eval "ac_cv_header_$ac_safe=yes"
2281 else
2282 echo "$ac_err" >&5
2283 echo "configure: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2285 rm -rf conftest*
2286 eval "ac_cv_header_$ac_safe=no"
2288 rm -f conftest*
2290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2291 echo "$ac_t""yes" 1>&6
2292 have_pthread_h=yes
2293 else
2294 echo "$ac_t""no" 1>&6
2295 have_pthread_h=
2299 # See if GNAT has been installed
2300 # Extract the first word of "gnatbind", so it can be a program name with args.
2301 set dummy gnatbind; ac_word=$2
2302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2303 echo "configure:2304: checking for $ac_word" >&5
2304 if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307 if test -n "$gnat"; then
2308 ac_cv_prog_gnat="$gnat" # Let the user override the test.
2309 else
2310 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2311 ac_dummy="$PATH"
2312 for ac_dir in $ac_dummy; do
2313 test -z "$ac_dir" && ac_dir=.
2314 if test -f $ac_dir/$ac_word; then
2315 ac_cv_prog_gnat="yes"
2316 break
2318 done
2319 IFS="$ac_save_ifs"
2320 test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
2323 gnat="$ac_cv_prog_gnat"
2324 if test -n "$gnat"; then
2325 echo "$ac_t""$gnat" 1>&6
2326 else
2327 echo "$ac_t""no" 1>&6
2331 # See if we have the mktemp command.
2332 # Extract the first word of "mktemp", so it can be a program name with args.
2333 set dummy mktemp; ac_word=$2
2334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2335 echo "configure:2336: checking for $ac_word" >&5
2336 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2338 else
2339 if test -n "$have_mktemp_command"; then
2340 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2341 else
2342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2343 ac_dummy="$PATH"
2344 for ac_dir in $ac_dummy; do
2345 test -z "$ac_dir" && ac_dir=.
2346 if test -f $ac_dir/$ac_word; then
2347 ac_cv_prog_have_mktemp_command="yes"
2348 break
2350 done
2351 IFS="$ac_save_ifs"
2352 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2355 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2356 if test -n "$have_mktemp_command"; then
2357 echo "$ac_t""$have_mktemp_command" 1>&6
2358 else
2359 echo "$ac_t""no" 1>&6
2363 # Do we have a single-tree copy of texinfo?
2364 if test -f $srcdir/../texinfo/Makefile.in; then
2365 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2366 gcc_cv_prog_makeinfo_modern=yes
2367 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2368 else
2369 # See if makeinfo has been installed and is modern enough
2370 # that we can use it.
2371 # Extract the first word of "makeinfo", so it can be a program name with args.
2372 set dummy makeinfo; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378 if test -n "$MAKEINFO"; then
2379 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2380 else
2381 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2382 ac_dummy="$PATH"
2383 for ac_dir in $ac_dummy; do
2384 test -z "$ac_dir" && ac_dir=.
2385 if test -f $ac_dir/$ac_word; then
2386 ac_cv_prog_MAKEINFO="makeinfo"
2387 break
2389 done
2390 IFS="$ac_save_ifs"
2393 MAKEINFO="$ac_cv_prog_MAKEINFO"
2394 if test -n "$MAKEINFO"; then
2395 echo "$ac_t""$MAKEINFO" 1>&6
2396 else
2397 echo "$ac_t""no" 1>&6
2400 if test -n "$MAKEINFO"; then
2401 # Found it, now check the version.
2402 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2403 echo "configure:2404: checking for modern makeinfo" >&5
2404 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2405 echo $ac_n "(cached) $ac_c" 1>&6
2406 else
2407 ac_prog_version=`$MAKEINFO --version 2>&1 |
2408 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2409 echo "configure:2410: version of makeinfo is $ac_prog_version" >&5
2410 case $ac_prog_version in
2411 '') gcc_cv_prog_makeinfo_modern=no;;
2412 4.*)
2413 gcc_cv_prog_makeinfo_modern=yes;;
2414 *) gcc_cv_prog_makeinfo_modern=no;;
2415 esac
2419 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2420 else
2421 gcc_cv_prog_makeinfo_modern=no
2426 if test $gcc_cv_prog_makeinfo_modern = no; then
2427 echo "configure: warning:
2428 *** Makeinfo is missing or too old.
2429 *** Info documentation will not be built." 1>&2
2430 BUILD_INFO=
2431 else
2432 BUILD_INFO=info
2435 # Is pod2man recent enough to regenerate manpages?
2436 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2437 echo "configure:2438: checking for recent Pod::Man" >&5
2438 if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
2439 echo "$ac_t""yes" 1>&6
2440 GENERATED_MANPAGES=generated-manpages
2441 else
2442 echo "$ac_t""no" 1>&6
2443 GENERATED_MANPAGES=
2446 # How about lex?
2447 if test -f $srcdir/../flex/skel.c; then
2448 FLEX='$(objdir)/../flex/flex'
2449 else
2450 # Extract the first word of "flex", so it can be a program name with args.
2451 set dummy flex; ac_word=$2
2452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2453 echo "configure:2454: checking for $ac_word" >&5
2454 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2455 echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457 if test -n "$FLEX"; then
2458 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2459 else
2460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2461 ac_dummy="$PATH"
2462 for ac_dir in $ac_dummy; do
2463 test -z "$ac_dir" && ac_dir=.
2464 if test -f $ac_dir/$ac_word; then
2465 ac_cv_prog_FLEX="flex"
2466 break
2468 done
2469 IFS="$ac_save_ifs"
2470 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2473 FLEX="$ac_cv_prog_FLEX"
2474 if test -n "$FLEX"; then
2475 echo "$ac_t""$FLEX" 1>&6
2476 else
2477 echo "$ac_t""no" 1>&6
2482 # Bison?
2483 # The -L switch is so bison can find its skeleton file.
2484 if test -f $srcdir/../bison/bison.simple; then
2485 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2486 else
2487 # Extract the first word of "bison", so it can be a program name with args.
2488 set dummy bison; ac_word=$2
2489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2490 echo "configure:2491: checking for $ac_word" >&5
2491 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2492 echo $ac_n "(cached) $ac_c" 1>&6
2493 else
2494 if test -n "$BISON"; then
2495 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2496 else
2497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2498 ac_dummy="$PATH"
2499 for ac_dir in $ac_dummy; do
2500 test -z "$ac_dir" && ac_dir=.
2501 if test -f $ac_dir/$ac_word; then
2502 ac_cv_prog_BISON="bison"
2503 break
2505 done
2506 IFS="$ac_save_ifs"
2507 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
2510 BISON="$ac_cv_prog_BISON"
2511 if test -n "$BISON"; then
2512 echo "$ac_t""$BISON" 1>&6
2513 else
2514 echo "$ac_t""no" 1>&6
2519 # See if the stage1 system preprocessor understands the ANSI C
2520 # preprocessor stringification operator.
2523 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
2524 echo "configure:2525: checking for preprocessor stringizing operator" >&5
2525 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
2526 echo $ac_n "(cached) $ac_c" 1>&6
2527 else
2528 cat > conftest.$ac_ext <<EOF
2529 #line 2530 "configure"
2530 #include "confdefs.h"
2532 #define x(y) #y
2534 char *s = x(teststring);
2537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2538 egrep "#teststring" >/dev/null 2>&1; then
2539 rm -rf conftest*
2540 ac_cv_c_stringize=no
2541 else
2542 rm -rf conftest*
2543 ac_cv_c_stringize=yes
2545 rm -f conftest*
2549 if test "${ac_cv_c_stringize}" = yes
2550 then
2551 cat >> confdefs.h <<\EOF
2552 #define HAVE_STRINGIZE 1
2556 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2559 # Use <inttypes.h> only if it exists,
2560 # doesn't clash with <sys/types.h>, and declares intmax_t.
2561 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2562 echo "configure:2563: checking for inttypes.h" >&5
2563 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566 cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2569 #include <sys/types.h>
2570 #include <inttypes.h>
2571 int main() {
2572 intmax_t i = -1;
2573 ; return 0; }
2575 if { (eval echo configure:2576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2576 rm -rf conftest*
2577 gcc_cv_header_inttypes_h=yes
2578 else
2579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 rm -rf conftest*
2582 gcc_cv_header_inttypes_h=no
2584 rm -f conftest*
2587 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2588 if test $gcc_cv_header_inttypes_h = yes; then
2589 cat >> confdefs.h <<\EOF
2590 #define HAVE_INTTYPES_H 1
2596 # Determine if enumerated bitfields are unsigned. ISO C says they can
2597 # be either signed or unsigned.
2599 echo $ac_n "checking for unsigned enumerated bitfields""... $ac_c" 1>&6
2600 echo "configure:2601: checking for unsigned enumerated bitfields" >&5
2601 if eval "test \"`echo '$''{'gcc_cv_enum_bf_unsigned'+set}'`\" = set"; then
2602 echo $ac_n "(cached) $ac_c" 1>&6
2603 else
2604 if test "$cross_compiling" = yes; then
2605 gcc_cv_enum_bf_unsigned=yes
2606 else
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 #include <stdlib.h>
2611 enum t { BLAH = 128 } ;
2612 struct s_t { enum t member : 8; } s ;
2613 int main(void)
2615 s.member = BLAH;
2616 if (s.member < 0) exit(1);
2617 exit(0);
2621 if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2622 then
2623 gcc_cv_enum_bf_unsigned=yes
2624 else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -fr conftest*
2628 gcc_cv_enum_bf_unsigned=no
2630 rm -fr conftest*
2635 echo "$ac_t""$gcc_cv_enum_bf_unsigned" 1>&6
2636 if test $gcc_cv_enum_bf_unsigned = yes; then
2637 cat >> confdefs.h <<\EOF
2638 #define ENUM_BITFIELDS_ARE_UNSIGNED 1
2643 for ac_func in strtoul bsearch putenv popen bcopy \
2644 strchr strrchr kill getrlimit setrlimit atoll atoq \
2645 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2646 fputs_unlocked getrusage iconv nl_langinfo lstat
2648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2649 echo "configure:2650: checking for $ac_func" >&5
2650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653 cat > conftest.$ac_ext <<EOF
2654 #line 2655 "configure"
2655 #include "confdefs.h"
2656 /* System header to define __stub macros and hopefully few prototypes,
2657 which can conflict with char $ac_func(); below. */
2658 #include <assert.h>
2659 /* Override any gcc2 internal prototype to avoid an error. */
2660 /* We use char because int might match the return type of a gcc2
2661 builtin and then its argument prototype would still apply. */
2662 char $ac_func();
2664 int main() {
2666 /* The GNU C library defines this for functions which it implements
2667 to always fail with ENOSYS. Some functions are actually named
2668 something starting with __ and the normal name is an alias. */
2669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2670 choke me
2671 #else
2672 $ac_func();
2673 #endif
2675 ; return 0; }
2677 if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2678 rm -rf conftest*
2679 eval "ac_cv_func_$ac_func=yes"
2680 else
2681 echo "configure: failed program was:" >&5
2682 cat conftest.$ac_ext >&5
2683 rm -rf conftest*
2684 eval "ac_cv_func_$ac_func=no"
2686 rm -f conftest*
2689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2690 echo "$ac_t""yes" 1>&6
2691 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2692 cat >> confdefs.h <<EOF
2693 #define $ac_tr_func 1
2696 else
2697 echo "$ac_t""no" 1>&6
2699 done
2702 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2703 echo "configure:2704: checking for ssize_t" >&5
2704 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
2706 else
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 #include <sys/types.h>
2711 #if STDC_HEADERS
2712 #include <stdlib.h>
2713 #include <stddef.h>
2714 #endif
2716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2717 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2718 rm -rf conftest*
2719 ac_cv_type_ssize_t=yes
2720 else
2721 rm -rf conftest*
2722 ac_cv_type_ssize_t=no
2724 rm -f conftest*
2727 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2728 if test $ac_cv_type_ssize_t = no; then
2729 cat >> confdefs.h <<\EOF
2730 #define ssize_t int
2736 # Try to determine the array type of the second argument of getgroups
2737 # for the target system (int or gid_t).
2738 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2739 echo "configure:2740: checking for uid_t in sys/types.h" >&5
2740 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743 cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746 #include <sys/types.h>
2748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2749 egrep "uid_t" >/dev/null 2>&1; then
2750 rm -rf conftest*
2751 ac_cv_type_uid_t=yes
2752 else
2753 rm -rf conftest*
2754 ac_cv_type_uid_t=no
2756 rm -f conftest*
2760 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2761 if test $ac_cv_type_uid_t = no; then
2762 cat >> confdefs.h <<\EOF
2763 #define uid_t int
2766 cat >> confdefs.h <<\EOF
2767 #define gid_t int
2772 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2773 echo "configure:2774: checking type of array argument to getgroups" >&5
2774 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2775 echo $ac_n "(cached) $ac_c" 1>&6
2776 else
2777 if test "$cross_compiling" = yes; then
2778 ac_cv_type_getgroups=cross
2779 else
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2784 /* Thanks to Mike Rendell for this test. */
2785 #include <sys/types.h>
2786 #define NGID 256
2787 #undef MAX
2788 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2789 main()
2791 gid_t gidset[NGID];
2792 int i, n;
2793 union { gid_t gval; long lval; } val;
2795 val.lval = -1;
2796 for (i = 0; i < NGID; i++)
2797 gidset[i] = val.gval;
2798 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2799 gidset);
2800 /* Exit non-zero if getgroups seems to require an array of ints. This
2801 happens when gid_t is short but getgroups modifies an array of ints. */
2802 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2806 if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2807 then
2808 ac_cv_type_getgroups=gid_t
2809 else
2810 echo "configure: failed program was:" >&5
2811 cat conftest.$ac_ext >&5
2812 rm -fr conftest*
2813 ac_cv_type_getgroups=int
2815 rm -fr conftest*
2818 if test $ac_cv_type_getgroups = cross; then
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 #include <unistd.h>
2824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2825 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2826 rm -rf conftest*
2827 ac_cv_type_getgroups=gid_t
2828 else
2829 rm -rf conftest*
2830 ac_cv_type_getgroups=int
2832 rm -f conftest*
2837 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2838 cat >> confdefs.h <<EOF
2839 #define GETGROUPS_T $ac_cv_type_getgroups
2843 if test "${target}" = "${build}"; then
2844 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
2845 else
2846 case "${target}" in
2847 # This condition may need some tweaking. It should include all
2848 # targets where the array type of the second argument of getgroups
2849 # is int and the type of gid_t is not equivalent to int.
2850 *-*-sunos* | *-*-ultrix*)
2851 TARGET_GETGROUPS_T=int
2854 TARGET_GETGROUPS_T=gid_t
2856 esac
2860 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2861 echo "configure:2862: checking for vprintf" >&5
2862 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2863 echo $ac_n "(cached) $ac_c" 1>&6
2864 else
2865 cat > conftest.$ac_ext <<EOF
2866 #line 2867 "configure"
2867 #include "confdefs.h"
2868 /* System header to define __stub macros and hopefully few prototypes,
2869 which can conflict with char vprintf(); below. */
2870 #include <assert.h>
2871 /* Override any gcc2 internal prototype to avoid an error. */
2872 /* We use char because int might match the return type of a gcc2
2873 builtin and then its argument prototype would still apply. */
2874 char vprintf();
2876 int main() {
2878 /* The GNU C library defines this for functions which it implements
2879 to always fail with ENOSYS. Some functions are actually named
2880 something starting with __ and the normal name is an alias. */
2881 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2882 choke me
2883 #else
2884 vprintf();
2885 #endif
2887 ; return 0; }
2889 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2890 rm -rf conftest*
2891 eval "ac_cv_func_vprintf=yes"
2892 else
2893 echo "configure: failed program was:" >&5
2894 cat conftest.$ac_ext >&5
2895 rm -rf conftest*
2896 eval "ac_cv_func_vprintf=no"
2898 rm -f conftest*
2901 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2902 echo "$ac_t""yes" 1>&6
2903 cat >> confdefs.h <<\EOF
2904 #define HAVE_VPRINTF 1
2907 else
2908 echo "$ac_t""no" 1>&6
2911 if test "$ac_cv_func_vprintf" != yes; then
2912 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2913 echo "configure:2914: checking for _doprnt" >&5
2914 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2915 echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 /* System header to define __stub macros and hopefully few prototypes,
2921 which can conflict with char _doprnt(); below. */
2922 #include <assert.h>
2923 /* Override any gcc2 internal prototype to avoid an error. */
2924 /* We use char because int might match the return type of a gcc2
2925 builtin and then its argument prototype would still apply. */
2926 char _doprnt();
2928 int main() {
2930 /* The GNU C library defines this for functions which it implements
2931 to always fail with ENOSYS. Some functions are actually named
2932 something starting with __ and the normal name is an alias. */
2933 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2934 choke me
2935 #else
2936 _doprnt();
2937 #endif
2939 ; return 0; }
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942 rm -rf conftest*
2943 eval "ac_cv_func__doprnt=yes"
2944 else
2945 echo "configure: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 rm -rf conftest*
2948 eval "ac_cv_func__doprnt=no"
2950 rm -f conftest*
2953 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2954 echo "$ac_t""yes" 1>&6
2955 cat >> confdefs.h <<\EOF
2956 #define HAVE_DOPRNT 1
2959 else
2960 echo "$ac_t""no" 1>&6
2965 vfprintf=
2966 doprint=
2967 if test $ac_cv_func_vprintf != yes ; then
2968 vfprintf=vfprintf.o
2969 if test $ac_cv_func__doprnt != yes ; then
2970 doprint=doprint.o
2976 for ac_func in strstr
2978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_func" >&5
2980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2981 echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 /* System header to define __stub macros and hopefully few prototypes,
2987 which can conflict with char $ac_func(); below. */
2988 #include <assert.h>
2989 /* Override any gcc2 internal prototype to avoid an error. */
2990 /* We use char because int might match the return type of a gcc2
2991 builtin and then its argument prototype would still apply. */
2992 char $ac_func();
2994 int main() {
2996 /* The GNU C library defines this for functions which it implements
2997 to always fail with ENOSYS. Some functions are actually named
2998 something starting with __ and the normal name is an alias. */
2999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3000 choke me
3001 #else
3002 $ac_func();
3003 #endif
3005 ; return 0; }
3007 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3008 rm -rf conftest*
3009 eval "ac_cv_func_$ac_func=yes"
3010 else
3011 echo "configure: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 rm -rf conftest*
3014 eval "ac_cv_func_$ac_func=no"
3016 rm -f conftest*
3019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3020 echo "$ac_t""yes" 1>&6
3021 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3022 cat >> confdefs.h <<EOF
3023 #define $ac_tr_func 1
3025 strstr=
3026 else
3027 echo "$ac_t""no" 1>&6
3028 strstr=strstr.o
3030 done
3033 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3034 echo "configure:3035: checking whether the printf functions support %p" >&5
3035 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3036 echo $ac_n "(cached) $ac_c" 1>&6
3037 else
3038 if test "$cross_compiling" = yes; then
3039 gcc_cv_func_printf_ptr=no
3040 else
3041 cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 #include <stdio.h>
3046 int main()
3048 char buf[64];
3049 char *p = buf, *q = NULL;
3050 sprintf(buf, "%p", p);
3051 sscanf(buf, "%p", &q);
3052 return (p != q);
3055 if { (eval echo configure:3056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3056 then
3057 gcc_cv_func_printf_ptr=yes
3058 else
3059 echo "configure: failed program was:" >&5
3060 cat conftest.$ac_ext >&5
3061 rm -fr conftest*
3062 gcc_cv_func_printf_ptr=no
3064 rm -fr conftest*
3067 rm -f core core.* *.core
3070 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3071 if test $gcc_cv_func_printf_ptr = yes ; then
3072 cat >> confdefs.h <<\EOF
3073 #define HAVE_PRINTF_PTR 1
3079 case "${host}" in
3080 *-*-uwin*)
3081 { echo "configure: error:
3082 *** UWIN may not be used as a host platform because
3083 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3085 esac
3086 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3087 echo "configure:3088: checking for pid_t" >&5
3088 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3089 echo $ac_n "(cached) $ac_c" 1>&6
3090 else
3091 cat > conftest.$ac_ext <<EOF
3092 #line 3093 "configure"
3093 #include "confdefs.h"
3094 #include <sys/types.h>
3095 #if STDC_HEADERS
3096 #include <stdlib.h>
3097 #include <stddef.h>
3098 #endif
3100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3101 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3102 rm -rf conftest*
3103 ac_cv_type_pid_t=yes
3104 else
3105 rm -rf conftest*
3106 ac_cv_type_pid_t=no
3108 rm -f conftest*
3111 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3112 if test $ac_cv_type_pid_t = no; then
3113 cat >> confdefs.h <<\EOF
3114 #define pid_t int
3119 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3120 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3121 echo "configure:3122: checking for vfork.h" >&5
3122 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3123 echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 #include <vfork.h>
3130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3131 { (eval echo configure:3132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3133 if test -z "$ac_err"; then
3134 rm -rf conftest*
3135 eval "ac_cv_header_$ac_safe=yes"
3136 else
3137 echo "$ac_err" >&5
3138 echo "configure: failed program was:" >&5
3139 cat conftest.$ac_ext >&5
3140 rm -rf conftest*
3141 eval "ac_cv_header_$ac_safe=no"
3143 rm -f conftest*
3145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3146 echo "$ac_t""yes" 1>&6
3147 cat >> confdefs.h <<\EOF
3148 #define HAVE_VFORK_H 1
3151 else
3152 echo "$ac_t""no" 1>&6
3155 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3156 echo "configure:3157: checking for working vfork" >&5
3157 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3158 echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160 if test "$cross_compiling" = yes; then
3161 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3162 echo "configure:3163: checking for vfork" >&5
3163 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3164 echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166 cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169 /* System header to define __stub macros and hopefully few prototypes,
3170 which can conflict with char vfork(); below. */
3171 #include <assert.h>
3172 /* Override any gcc2 internal prototype to avoid an error. */
3173 /* We use char because int might match the return type of a gcc2
3174 builtin and then its argument prototype would still apply. */
3175 char vfork();
3177 int main() {
3179 /* The GNU C library defines this for functions which it implements
3180 to always fail with ENOSYS. Some functions are actually named
3181 something starting with __ and the normal name is an alias. */
3182 #if defined (__stub_vfork) || defined (__stub___vfork)
3183 choke me
3184 #else
3185 vfork();
3186 #endif
3188 ; return 0; }
3190 if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3191 rm -rf conftest*
3192 eval "ac_cv_func_vfork=yes"
3193 else
3194 echo "configure: failed program was:" >&5
3195 cat conftest.$ac_ext >&5
3196 rm -rf conftest*
3197 eval "ac_cv_func_vfork=no"
3199 rm -f conftest*
3202 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3203 echo "$ac_t""yes" 1>&6
3205 else
3206 echo "$ac_t""no" 1>&6
3209 ac_cv_func_vfork_works=$ac_cv_func_vfork
3210 else
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 /* Thanks to Paul Eggert for this test. */
3215 #include <stdio.h>
3216 #include <sys/types.h>
3217 #include <sys/stat.h>
3218 #ifdef HAVE_UNISTD_H
3219 #include <unistd.h>
3220 #endif
3221 #ifdef HAVE_VFORK_H
3222 #include <vfork.h>
3223 #endif
3224 /* On some sparc systems, changes by the child to local and incoming
3225 argument registers are propagated back to the parent.
3226 The compiler is told about this with #include <vfork.h>,
3227 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3228 Test for this by using a static variable whose address
3229 is put into a register that is clobbered by the vfork. */
3230 static
3231 #ifdef __cplusplus
3232 sparc_address_test (int arg)
3233 #else
3234 sparc_address_test (arg) int arg;
3235 #endif
3237 static pid_t child;
3238 if (!child) {
3239 child = vfork ();
3240 if (child < 0) {
3241 perror ("vfork");
3242 _exit(2);
3244 if (!child) {
3245 arg = getpid();
3246 write(-1, "", 0);
3247 _exit (arg);
3251 main() {
3252 pid_t parent = getpid ();
3253 pid_t child;
3255 sparc_address_test ();
3257 child = vfork ();
3259 if (child == 0) {
3260 /* Here is another test for sparc vfork register problems.
3261 This test uses lots of local variables, at least
3262 as many local variables as main has allocated so far
3263 including compiler temporaries. 4 locals are enough for
3264 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3265 A buggy compiler should reuse the register of parent
3266 for one of the local variables, since it will think that
3267 parent can't possibly be used any more in this routine.
3268 Assigning to the local variable will thus munge parent
3269 in the parent process. */
3270 pid_t
3271 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3272 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3273 /* Convince the compiler that p..p7 are live; otherwise, it might
3274 use the same hardware register for all 8 local variables. */
3275 if (p != p1 || p != p2 || p != p3 || p != p4
3276 || p != p5 || p != p6 || p != p7)
3277 _exit(1);
3279 /* On some systems (e.g. IRIX 3.3),
3280 vfork doesn't separate parent from child file descriptors.
3281 If the child closes a descriptor before it execs or exits,
3282 this munges the parent's descriptor as well.
3283 Test for this by closing stdout in the child. */
3284 _exit(close(fileno(stdout)) != 0);
3285 } else {
3286 int status;
3287 struct stat st;
3289 while (wait(&status) != child)
3291 exit(
3292 /* Was there some problem with vforking? */
3293 child < 0
3295 /* Did the child fail? (This shouldn't happen.) */
3296 || status
3298 /* Did the vfork/compiler bug occur? */
3299 || parent != getpid()
3301 /* Did the file descriptor bug occur? */
3302 || fstat(fileno(stdout), &st) != 0
3307 if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3308 then
3309 ac_cv_func_vfork_works=yes
3310 else
3311 echo "configure: failed program was:" >&5
3312 cat conftest.$ac_ext >&5
3313 rm -fr conftest*
3314 ac_cv_func_vfork_works=no
3316 rm -fr conftest*
3321 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3322 if test $ac_cv_func_vfork_works = no; then
3323 cat >> confdefs.h <<\EOF
3324 #define vfork fork
3329 for ac_func in getpagesize
3331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3332 echo "configure:3333: checking for $ac_func" >&5
3333 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3334 echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336 cat > conftest.$ac_ext <<EOF
3337 #line 3338 "configure"
3338 #include "confdefs.h"
3339 /* System header to define __stub macros and hopefully few prototypes,
3340 which can conflict with char $ac_func(); below. */
3341 #include <assert.h>
3342 /* Override any gcc2 internal prototype to avoid an error. */
3343 /* We use char because int might match the return type of a gcc2
3344 builtin and then its argument prototype would still apply. */
3345 char $ac_func();
3347 int main() {
3349 /* The GNU C library defines this for functions which it implements
3350 to always fail with ENOSYS. Some functions are actually named
3351 something starting with __ and the normal name is an alias. */
3352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3353 choke me
3354 #else
3355 $ac_func();
3356 #endif
3358 ; return 0; }
3360 if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3361 rm -rf conftest*
3362 eval "ac_cv_func_$ac_func=yes"
3363 else
3364 echo "configure: failed program was:" >&5
3365 cat conftest.$ac_ext >&5
3366 rm -rf conftest*
3367 eval "ac_cv_func_$ac_func=no"
3369 rm -f conftest*
3372 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3373 echo "$ac_t""yes" 1>&6
3374 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3375 cat >> confdefs.h <<EOF
3376 #define $ac_tr_func 1
3379 else
3380 echo "$ac_t""no" 1>&6
3382 done
3384 # The test program for the next two tests is the same except for one
3385 # set of ifdefs.
3386 cat >ct-mmap.inc <<'EOF'
3387 #include <sys/types.h>
3388 #include <sys/mman.h>
3389 #include <fcntl.h>
3390 #include <signal.h>
3391 #include <setjmp.h>
3392 #include <stdio.h>
3394 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3395 # define MAP_ANONYMOUS MAP_ANON
3396 #endif
3398 /* This mess was copied from the GNU getpagesize.h. */
3399 #ifndef HAVE_GETPAGESIZE
3400 # ifdef HAVE_UNISTD_H
3401 # include <unistd.h>
3402 # endif
3404 /* Assume that all systems that can run configure have sys/param.h. */
3405 # ifndef HAVE_SYS_PARAM_H
3406 # define HAVE_SYS_PARAM_H 1
3407 # endif
3409 # ifdef _SC_PAGESIZE
3410 # define getpagesize() sysconf(_SC_PAGESIZE)
3411 # else /* no _SC_PAGESIZE */
3412 # ifdef HAVE_SYS_PARAM_H
3413 # include <sys/param.h>
3414 # ifdef EXEC_PAGESIZE
3415 # define getpagesize() EXEC_PAGESIZE
3416 # else /* no EXEC_PAGESIZE */
3417 # ifdef NBPG
3418 # define getpagesize() NBPG * CLSIZE
3419 # ifndef CLSIZE
3420 # define CLSIZE 1
3421 # endif /* no CLSIZE */
3422 # else /* no NBPG */
3423 # ifdef NBPC
3424 # define getpagesize() NBPC
3425 # else /* no NBPC */
3426 # ifdef PAGESIZE
3427 # define getpagesize() PAGESIZE
3428 # endif /* PAGESIZE */
3429 # endif /* no NBPC */
3430 # endif /* no NBPG */
3431 # endif /* no EXEC_PAGESIZE */
3432 # else /* no HAVE_SYS_PARAM_H */
3433 # define getpagesize() 8192 /* punt totally */
3434 # endif /* no HAVE_SYS_PARAM_H */
3435 # endif /* no _SC_PAGESIZE */
3437 #endif /* no HAVE_GETPAGESIZE */
3439 #ifndef MAP_FAILED
3440 # define MAP_FAILED -1
3441 #endif
3443 #undef perror_exit
3444 #define perror_exit(str, val) \
3445 do { perror(str); exit(val); } while (0)
3447 /* Some versions of cygwin mmap require that munmap is called with the
3448 same parameters as mmap. GCC expects that this is not the case.
3449 Test for various forms of this problem. Warning - icky signal games. */
3451 static sigset_t unblock_sigsegv;
3452 static jmp_buf r;
3453 static size_t pg;
3454 static int devzero;
3456 static char *
3457 anonmap (size)
3458 size_t size;
3460 #ifdef USE_MAP_ANON
3461 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3462 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3463 #else
3464 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3465 MAP_PRIVATE, devzero, 0);
3466 #endif
3469 static void
3470 sigsegv (unused)
3471 int unused;
3473 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3474 longjmp (r, 1);
3477 /* Basic functionality test. */
3478 void
3479 test_0 ()
3481 char *x = anonmap (pg);
3482 if (x == (char *) MAP_FAILED)
3483 perror_exit("test 0 mmap", 2);
3485 *(int *)x += 1;
3487 if (munmap(x, pg) < 0)
3488 perror_exit("test 0 munmap", 3);
3491 /* 1. If we map a 2-page region and unmap its second page, the first page
3492 must remain. */
3493 static void
3494 test_1 ()
3496 char *x = anonmap (pg * 2);
3497 if (x == (char *)MAP_FAILED)
3498 perror_exit ("test 1 mmap", 4);
3500 signal (SIGSEGV, sigsegv);
3501 if (setjmp (r))
3502 perror_exit ("test 1 fault", 5);
3504 x[0] = 1;
3505 x[pg] = 1;
3507 if (munmap (x + pg, pg) < 0)
3508 perror_exit ("test 1 munmap 1", 6);
3509 x[0] = 2;
3511 if (setjmp (r) == 0)
3513 x[pg] = 1;
3514 perror_exit ("test 1 no fault", 7);
3516 if (munmap (x, pg) < 0)
3517 perror_exit ("test 1 munmap 2", 8);
3520 /* 2. If we map a 2-page region and unmap its first page, the second
3521 page must remain. */
3522 static void
3523 test_2 ()
3525 char *x = anonmap (pg * 2);
3526 if (x == (char *)MAP_FAILED)
3527 perror_exit ("test 2 mmap", 9);
3529 signal (SIGSEGV, sigsegv);
3530 if (setjmp (r))
3531 perror_exit ("test 2 fault", 10);
3533 x[0] = 1;
3534 x[pg] = 1;
3536 if (munmap (x, pg) < 0)
3537 perror_exit ("test 2 munmap 1", 11);
3539 x[pg] = 2;
3541 if (setjmp (r) == 0)
3543 x[0] = 1;
3544 perror_exit ("test 2 no fault", 12);
3547 if (munmap (x+pg, pg) < 0)
3548 perror_exit ("test 2 munmap 2", 13);
3551 /* 3. If we map two adjacent 1-page regions and unmap them both with
3552 one munmap, both must go away.
3554 Getting two adjacent 1-page regions with two mmap calls is slightly
3555 tricky. All OS's tested skip over already-allocated blocks; therefore
3556 we have been careful to unmap all allocated regions in previous tests.
3557 HP/UX allocates pages backward in memory. No OS has yet been observed
3558 to be so perverse as to leave unmapped space between consecutive calls
3559 to mmap. */
3561 static void
3562 test_3 ()
3564 char *x, *y, *z;
3566 x = anonmap (pg);
3567 if (x == (char *)MAP_FAILED)
3568 perror_exit ("test 3 mmap 1", 14);
3569 y = anonmap (pg);
3570 if (y == (char *)MAP_FAILED)
3571 perror_exit ("test 3 mmap 2", 15);
3573 if (y != x + pg)
3575 if (y == x - pg)
3576 z = y, y = x, x = z;
3577 else
3579 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
3580 (unsigned long)x, (unsigned long)y);
3581 exit (16);
3585 signal (SIGSEGV, sigsegv);
3586 if (setjmp (r))
3587 perror_exit ("test 3 fault", 17);
3589 x[0] = 1;
3590 y[0] = 1;
3592 if (munmap (x, pg*2) < 0)
3593 perror_exit ("test 3 munmap", 18);
3595 if (setjmp (r) == 0)
3597 x[0] = 1;
3598 perror_exit ("test 3 no fault 1", 19);
3601 signal (SIGSEGV, sigsegv);
3602 if (setjmp (r) == 0)
3604 y[0] = 1;
3605 perror_exit ("test 3 no fault 2", 20);
3610 main ()
3612 sigemptyset (&unblock_sigsegv);
3613 sigaddset (&unblock_sigsegv, SIGSEGV);
3614 pg = getpagesize ();
3615 #ifndef USE_MAP_ANON
3616 devzero = open ("/dev/zero", O_RDWR);
3617 if (devzero < 0)
3618 perror_exit ("open /dev/zero", 1);
3619 #endif
3621 test_0();
3622 test_1();
3623 test_2();
3624 test_3();
3626 exit(0);
3630 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
3631 echo "configure:3632: checking for working mmap from /dev/zero" >&5
3632 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3633 echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635 if test "$cross_compiling" = yes; then
3636 # If this is not cygwin, and /dev/zero is a character device, it's probably
3637 # safe to assume it works.
3638 case "$host_os" in
3639 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
3640 * ) if test -c /dev/zero
3641 then ac_cv_func_mmap_dev_zero=yes
3642 else ac_cv_func_mmap_dev_zero=no
3643 fi ;;
3644 esac
3645 else
3646 cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include "ct-mmap.inc"
3651 if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3652 then
3653 ac_cv_func_mmap_dev_zero=yes
3654 else
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -fr conftest*
3658 if test $? -lt 4
3659 then ac_cv_func_mmap_dev_zero=no
3660 else ac_cv_func_mmap_dev_zero=buggy
3663 rm -fr conftest*
3669 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
3670 if test $ac_cv_func_mmap_dev_zero = yes; then
3671 cat >> confdefs.h <<\EOF
3672 #define HAVE_MMAP_DEV_ZERO 1
3677 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
3678 echo "configure:3679: checking for working mmap with MAP_ANON(YMOUS)" >&5
3679 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
3680 echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682 if test "$cross_compiling" = yes; then
3683 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
3684 # just because it's there. Some SCO Un*xen define it but don't implement it.
3685 ac_cv_func_mmap_anon=no
3686 else
3687 cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 #define USE_MAP_ANON
3691 #include "ct-mmap.inc"
3693 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3694 then
3695 ac_cv_func_mmap_anon=yes
3696 else
3697 echo "configure: failed program was:" >&5
3698 cat conftest.$ac_ext >&5
3699 rm -fr conftest*
3700 if test $? -lt 4
3701 then ac_cv_func_mmap_anon=no
3702 else ac_cv_func_mmap_anon=buggy
3705 rm -fr conftest*
3711 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
3712 if test $ac_cv_func_mmap_anon = yes; then
3713 cat >> confdefs.h <<\EOF
3714 #define HAVE_MMAP_ANON 1
3718 rm -f ct-mmap.inc
3720 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
3721 echo "configure:3722: checking for working mmap of a file" >&5
3722 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
3723 echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725 # Create a file one thousand bytes long.
3726 for i in 1 2 3 4 5 6 7 8 9 0
3727 do for j in 1 2 3 4 5 6 7 8 9 0
3728 do echo $i $j xxxxx
3729 done
3730 done > conftestdata$$
3732 if test "$cross_compiling" = yes; then
3733 ac_cv_func_mmap_file=no
3734 else
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3739 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
3740 Richard Henderson and Alexandre Oliva.
3741 Check whether read-only mmap of a plain file works. */
3742 #include <sys/types.h>
3743 #include <sys/stat.h>
3744 #include <fcntl.h>
3745 #include <sys/mman.h>
3747 int main()
3749 char *x;
3750 int fd;
3751 struct stat st;
3753 fd = open("conftestdata$$", O_RDONLY);
3754 if (fd < 0)
3755 exit(1);
3757 if (fstat (fd, &st))
3758 exit(2);
3760 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
3761 if (x == (char *) -1)
3762 exit(3);
3764 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
3765 exit(4);
3767 if (munmap(x, st.st_size) < 0)
3768 exit(5);
3770 exit(0);
3773 if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3774 then
3775 ac_cv_func_mmap_file=yes
3776 else
3777 echo "configure: failed program was:" >&5
3778 cat conftest.$ac_ext >&5
3779 rm -fr conftest*
3780 ac_cv_func_mmap_file=no
3782 rm -fr conftest*
3787 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
3788 if test $ac_cv_func_mmap_file = yes; then
3789 cat >> confdefs.h <<\EOF
3790 #define HAVE_MMAP_FILE 1
3796 # We will need to find libiberty.h and ansidecl.h
3797 saved_CFLAGS="$CFLAGS"
3798 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
3799 for ac_func in bcopy \
3800 getenv atol sbrk abort atof getcwd getwd \
3801 strsignal putc_unlocked fputs_unlocked strstr environ \
3802 malloc realloc calloc free basename getopt
3804 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3805 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3806 echo "configure:3807: checking whether $ac_func is declared" >&5
3807 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
3809 else
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #undef $ac_tr_decl
3814 #define $ac_tr_decl 1
3816 #include "gansidecl.h"
3817 #include "system.h"
3819 int main() {
3820 #ifndef $ac_func
3821 char *(*pfn) = (char *(*)) $ac_func ;
3822 #endif
3823 ; return 0; }
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826 rm -rf conftest*
3827 eval "gcc_cv_have_decl_$ac_func=yes"
3828 else
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 rm -rf conftest*
3832 eval "gcc_cv_have_decl_$ac_func=no"
3834 rm -f conftest*
3837 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3838 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3839 #define $ac_tr_decl 1
3842 else
3843 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3844 #define $ac_tr_decl 0
3849 done
3850 if test x = y ; then
3851 cat >> confdefs.h <<\EOF
3852 #define HAVE_DECL_BCOPY 1
3855 cat >> confdefs.h <<\EOF
3856 #define HAVE_DECL_GETENV 1
3858 cat >> confdefs.h <<\EOF
3859 #define HAVE_DECL_ATOL 1
3861 cat >> confdefs.h <<\EOF
3862 #define HAVE_DECL_SBRK 1
3864 cat >> confdefs.h <<\EOF
3865 #define HAVE_DECL_ABORT 1
3867 cat >> confdefs.h <<\EOF
3868 #define HAVE_DECL_ATOF 1
3870 cat >> confdefs.h <<\EOF
3871 #define HAVE_DECL_GETCWD 1
3873 cat >> confdefs.h <<\EOF
3874 #define HAVE_DECL_GETWD 1
3877 cat >> confdefs.h <<\EOF
3878 #define HAVE_DECL_STRSIGNAL 1
3880 cat >> confdefs.h <<\EOF
3881 #define HAVE_DECL_PUTC_UNLOCKED 1
3883 cat >> confdefs.h <<\EOF
3884 #define HAVE_DECL_FPUTS_UNLOCKED 1
3886 cat >> confdefs.h <<\EOF
3887 #define HAVE_DECL_STRSTR 1
3889 cat >> confdefs.h <<\EOF
3890 #define HAVE_DECL_ENVIRON 1
3893 cat >> confdefs.h <<\EOF
3894 #define HAVE_DECL_MALLOC 1
3896 cat >> confdefs.h <<\EOF
3897 #define HAVE_DECL_REALLOC 1
3899 cat >> confdefs.h <<\EOF
3900 #define HAVE_DECL_CALLOC 1
3902 cat >> confdefs.h <<\EOF
3903 #define HAVE_DECL_FREE 1
3905 cat >> confdefs.h <<\EOF
3906 #define HAVE_DECL_BASENAME 1
3908 cat >> confdefs.h <<\EOF
3909 #define HAVE_DECL_GETOPT 1
3914 for ac_func in getrlimit setrlimit getrusage
3916 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3917 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3918 echo "configure:3919: checking whether $ac_func is declared" >&5
3919 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3920 echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #undef $ac_tr_decl
3926 #define $ac_tr_decl 1
3928 #include "gansidecl.h"
3929 #include "system.h"
3930 #ifdef HAVE_SYS_RESOURCE_H
3931 #include <sys/resource.h>
3932 #endif
3935 int main() {
3936 #ifndef $ac_func
3937 char *(*pfn) = (char *(*)) $ac_func ;
3938 #endif
3939 ; return 0; }
3941 if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3942 rm -rf conftest*
3943 eval "gcc_cv_have_decl_$ac_func=yes"
3944 else
3945 echo "configure: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947 rm -rf conftest*
3948 eval "gcc_cv_have_decl_$ac_func=no"
3950 rm -f conftest*
3953 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3954 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3955 #define $ac_tr_decl 1
3958 else
3959 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3960 #define $ac_tr_decl 0
3965 done
3966 if test x = y ; then
3967 cat >> confdefs.h <<\EOF
3968 #define HAVE_DECL_GETRLIMIT 1
3970 cat >> confdefs.h <<\EOF
3971 #define HAVE_DECL_SETRLIMIT 1
3973 cat >> confdefs.h <<\EOF
3974 #define HAVE_DECL_GETRUSAGE 1
3979 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
3980 CFLAGS="$saved_CFLAGS"
3982 # mkdir takes a single argument on some systems.
3983 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
3984 echo "configure:3985: checking if mkdir takes one argument" >&5
3985 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
3986 echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3992 #include <sys/types.h>
3993 #ifdef HAVE_SYS_STAT_H
3994 # include <sys/stat.h>
3995 #endif
3996 #ifdef HAVE_UNISTD_H
3997 # include <unistd.h>
3998 #endif
3999 #ifdef HAVE_DIRECT_H
4000 # include <direct.h>
4001 #endif
4002 int main() {
4003 mkdir ("foo", 0);
4004 ; return 0; }
4006 if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4007 rm -rf conftest*
4008 gcc_cv_mkdir_takes_one_arg=no
4009 else
4010 echo "configure: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4012 rm -rf conftest*
4013 gcc_cv_mkdir_takes_one_arg=yes
4015 rm -f conftest*
4018 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4019 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4020 cat >> confdefs.h <<\EOF
4021 #define MKDIR_TAKES_ONE_ARG 1
4027 # File extensions
4028 manext='.1'
4029 objext='.o'
4033 build_xm_file=
4034 build_xm_defines=
4035 build_install_headers_dir=install-headers-tar
4036 build_exeext=
4037 host_xm_file=
4038 host_xm_defines=
4039 host_xmake_file=
4040 host_truncate_target=
4041 host_exeext=
4043 # Decode the host machine, then the target machine.
4044 # For the host machine, we save the xm_file variable as host_xm_file;
4045 # then we decode the target machine and forget everything else
4046 # that came from the host machine.
4047 for machine in $build $host $target; do
4048 . ${srcdir}/config.gcc
4049 done
4051 extra_objs="${host_extra_objs} ${extra_objs}"
4053 # Default the target-machine variables that were not explicitly set.
4054 if test x"$tm_file" = x
4055 then tm_file=$cpu_type/$cpu_type.h; fi
4057 if test x"$extra_headers" = x
4058 then extra_headers=; fi
4060 if test x"$xm_file" = x
4061 then xm_file=$cpu_type/xm-$cpu_type.h; fi
4063 if test x$md_file = x
4064 then md_file=$cpu_type/$cpu_type.md; fi
4066 if test x$out_file = x
4067 then out_file=$cpu_type/$cpu_type.c; fi
4069 if test x"$tmake_file" = x
4070 then tmake_file=$cpu_type/t-$cpu_type
4073 if test x"$dwarf2" = xyes
4074 then tm_file="$tm_file tm-dwarf2.h"
4077 if test x$float_format = x
4078 then float_format=i64
4081 if test $float_format = none
4082 then float_h_file=Makefile.in
4083 else float_h_file=float-$float_format.h
4086 # Handle cpp installation.
4087 if test x$enable_cpp != xno
4088 then
4089 tmake_file="$tmake_file t-install-cpp"
4092 # Say what files are being used for the output code and MD file.
4093 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4094 echo "Using \`$srcdir/config/$md_file' as machine description file."
4096 # If any of the xm_file variables contain nonexistent files, warn
4097 # about them and drop them. But $cpu/xm-$cpu.h is allowed not to
4098 # exist, if we have nothing for it to do.
4101 for x in $build_xm_file; do
4102 if test -f $srcdir/config/$x
4103 then bx="$bx $x"
4104 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4105 then :
4106 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4108 done
4109 build_xm_file="$bx"
4112 for x in $host_xm_file; do
4113 if test -f $srcdir/config/$x
4114 then hx="$hx $x"
4115 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4116 then :
4117 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4119 done
4120 host_xm_file="$hx"
4123 for x in $xm_file; do
4124 if test -f $srcdir/config/$x
4125 then tx="$tx $x"
4126 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4127 then :
4128 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4130 done
4131 xm_file="$tx"
4133 count=a
4134 for f in $tm_file; do
4135 count=${count}x
4136 done
4137 if test $count = ax; then
4138 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4139 else
4140 echo "Using the following target machine macro files:"
4141 for f in $tm_file; do
4142 echo " $srcdir/config/$f"
4143 done
4146 count=a
4147 for f in $host_xm_file; do
4148 count=${count}x
4149 done
4150 if test $count = a; then
4152 elif test $count = ax; then
4153 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4154 else
4155 echo "Using the following host machine macro files:"
4156 for f in $host_xm_file; do
4157 echo " $srcdir/config/$f"
4158 done
4161 if test "$host_xm_file" != "$build_xm_file"; then
4162 count=a
4163 for f in $build_xm_file; do
4164 count=${count}x
4165 done
4166 if test $count = a; then
4168 elif test $count = ax; then
4169 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4170 else
4171 echo "Using the following build machine macro files:"
4172 for f in $build_xm_file; do
4173 echo " $srcdir/config/$f"
4174 done
4178 if test x$thread_file = x; then
4179 if test x$target_thread_file != x; then
4180 thread_file=$target_thread_file
4181 else
4182 thread_file='single'
4186 # auto-host.h is the file containing items generated by autoconf and is
4187 # the first file included by config.h.
4188 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} defaults.h hwint.h"
4190 # If host=build, it is correct to have hconfig include auto-host.h
4191 # as well. If host!=build, we are in error and need to do more
4192 # work to find out the build config parameters.
4193 if test x$host = x$build
4194 then
4195 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4196 else
4197 # We create a subdir, then run autoconf in the subdir.
4198 # To prevent recursion we set host and build for the new
4199 # invocation of configure to the build for this invocation
4200 # of configure.
4201 tempdir=build.$$
4202 rm -rf $tempdir
4203 mkdir $tempdir
4204 cd $tempdir
4205 case ${srcdir} in
4206 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4207 *) realsrcdir=../${srcdir};;
4208 esac
4209 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4210 --target=$target --host=$build --build=$build
4212 # We just finished tests for the build machine, so rename
4213 # the file auto-build.h in the gcc directory.
4214 mv auto-host.h ../auto-build.h
4215 cd ..
4216 rm -rf $tempdir
4217 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4220 xm_file="gansidecl.h ${xm_file} defaults.h"
4221 tm_file="gansidecl.h ${tm_file} defaults.h"
4223 # Truncate the target if necessary
4224 if test x$host_truncate_target != x; then
4225 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4228 # Get the version trigger filename from the toplevel
4229 if test "${with_gcc_version_trigger+set}" = set; then
4230 gcc_version_trigger=$with_gcc_version_trigger
4231 else
4232 gcc_version_trigger=${srcdir}/version.c
4234 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
4235 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4237 # Compile in configure arguments.
4238 if test -f configargs.h ; then
4239 # Being re-configured.
4240 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
4241 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4242 else
4243 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4245 cat > configargs.h <<EOF
4246 /* Generated automatically. */
4247 static const char configuration_arguments[] = "$gcc_config_arguments";
4248 static const char thread_model[] = "$thread_file";
4251 # Internationalization
4252 PACKAGE=gcc
4253 VERSION="$gcc_version"
4254 cat >> confdefs.h <<EOF
4255 #define PACKAGE "$PACKAGE"
4258 cat >> confdefs.h <<EOF
4259 #define VERSION "$VERSION"
4265 ALL_LINGUAS=
4267 # Enable NLS support by default
4268 # Check whether --enable-nls or --disable-nls was given.
4269 if test "${enable_nls+set}" = set; then
4270 enableval="$enable_nls"
4272 else
4273 enable_nls=yes
4277 # if cross compiling, disable NLS support.
4278 # It's not worth the trouble, at least for now.
4280 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4281 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4282 enable_nls=no
4285 # if NLS is enabled, also enable check in po subdir
4286 if test $enable_nls = yes; then
4287 CHECK_PO=check-po
4288 else
4289 CHECK_PO=""
4295 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4296 echo "configure:4297: checking for strerror in -lcposix" >&5
4297 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4298 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4299 echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301 ac_save_LIBS="$LIBS"
4302 LIBS="-lcposix $LIBS"
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 /* Override any gcc2 internal prototype to avoid an error. */
4307 /* We use char because int might match the return type of a gcc2
4308 builtin and then its argument prototype would still apply. */
4309 char strerror();
4311 int main() {
4312 strerror()
4313 ; return 0; }
4315 if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4316 rm -rf conftest*
4317 eval "ac_cv_lib_$ac_lib_var=yes"
4318 else
4319 echo "configure: failed program was:" >&5
4320 cat conftest.$ac_ext >&5
4321 rm -rf conftest*
4322 eval "ac_cv_lib_$ac_lib_var=no"
4324 rm -f conftest*
4325 LIBS="$ac_save_LIBS"
4328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4329 echo "$ac_t""yes" 1>&6
4330 LIBS="$LIBS -lcposix"
4331 else
4332 echo "$ac_t""no" 1>&6
4337 echo $ac_n "checking for working const""... $ac_c" 1>&6
4338 echo "configure:4339: checking for working const" >&5
4339 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4340 echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4346 int main() {
4348 /* Ultrix mips cc rejects this. */
4349 typedef int charset[2]; const charset x;
4350 /* SunOS 4.1.1 cc rejects this. */
4351 char const *const *ccp;
4352 char **p;
4353 /* NEC SVR4.0.2 mips cc rejects this. */
4354 struct point {int x, y;};
4355 static struct point const zero = {0,0};
4356 /* AIX XL C 1.02.0.0 rejects this.
4357 It does not let you subtract one const X* pointer from another in an arm
4358 of an if-expression whose if-part is not a constant expression */
4359 const char *g = "string";
4360 ccp = &g + (g ? g-g : 0);
4361 /* HPUX 7.0 cc rejects these. */
4362 ++ccp;
4363 p = (char**) ccp;
4364 ccp = (char const *const *) p;
4365 { /* SCO 3.2v4 cc rejects this. */
4366 char *t;
4367 char const *s = 0 ? (char *) 0 : (char const *) 0;
4369 *t++ = 0;
4371 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4372 int x[] = {25, 17};
4373 const int *foo = &x[0];
4374 ++foo;
4376 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4377 typedef const int *iptr;
4378 iptr p = 0;
4379 ++p;
4381 { /* AIX XL C 1.02.0.0 rejects this saying
4382 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4383 struct s { int j; const int *ap[3]; };
4384 struct s *b; b->j = 5;
4386 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4387 const int foo = 10;
4390 ; return 0; }
4392 if { (eval echo configure:4393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4393 rm -rf conftest*
4394 ac_cv_c_const=yes
4395 else
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4398 rm -rf conftest*
4399 ac_cv_c_const=no
4401 rm -f conftest*
4404 echo "$ac_t""$ac_cv_c_const" 1>&6
4405 if test $ac_cv_c_const = no; then
4406 cat >> confdefs.h <<\EOF
4407 #define const
4412 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4413 echo "configure:4414: checking for off_t" >&5
4414 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 #include <sys/types.h>
4421 #if STDC_HEADERS
4422 #include <stdlib.h>
4423 #include <stddef.h>
4424 #endif
4426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4427 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4428 rm -rf conftest*
4429 ac_cv_type_off_t=yes
4430 else
4431 rm -rf conftest*
4432 ac_cv_type_off_t=no
4434 rm -f conftest*
4437 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4438 if test $ac_cv_type_off_t = no; then
4439 cat >> confdefs.h <<\EOF
4440 #define off_t long
4445 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4446 echo "configure:4447: checking for size_t" >&5
4447 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4448 echo $ac_n "(cached) $ac_c" 1>&6
4449 else
4450 cat > conftest.$ac_ext <<EOF
4451 #line 4452 "configure"
4452 #include "confdefs.h"
4453 #include <sys/types.h>
4454 #if STDC_HEADERS
4455 #include <stdlib.h>
4456 #include <stddef.h>
4457 #endif
4459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4460 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4461 rm -rf conftest*
4462 ac_cv_type_size_t=yes
4463 else
4464 rm -rf conftest*
4465 ac_cv_type_size_t=no
4467 rm -f conftest*
4470 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4471 if test $ac_cv_type_size_t = no; then
4472 cat >> confdefs.h <<\EOF
4473 #define size_t unsigned
4478 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4479 # for constant arguments. Useless!
4480 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4481 echo "configure:4482: checking for working alloca.h" >&5
4482 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4483 echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485 cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include <alloca.h>
4489 int main() {
4490 char *p = alloca(2 * sizeof(int));
4491 ; return 0; }
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4494 rm -rf conftest*
4495 ac_cv_header_alloca_h=yes
4496 else
4497 echo "configure: failed program was:" >&5
4498 cat conftest.$ac_ext >&5
4499 rm -rf conftest*
4500 ac_cv_header_alloca_h=no
4502 rm -f conftest*
4505 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4506 if test $ac_cv_header_alloca_h = yes; then
4507 cat >> confdefs.h <<\EOF
4508 #define HAVE_ALLOCA_H 1
4513 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4514 echo "configure:4515: checking for alloca" >&5
4515 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4516 echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518 cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4522 #ifdef __GNUC__
4523 # define alloca __builtin_alloca
4524 #else
4525 # ifdef _MSC_VER
4526 # include <malloc.h>
4527 # define alloca _alloca
4528 # else
4529 # if HAVE_ALLOCA_H
4530 # include <alloca.h>
4531 # else
4532 # ifdef _AIX
4533 #pragma alloca
4534 # else
4535 # ifndef alloca /* predefined by HP cc +Olibcalls */
4536 char *alloca ();
4537 # endif
4538 # endif
4539 # endif
4540 # endif
4541 #endif
4543 int main() {
4544 char *p = (char *) alloca(1);
4545 ; return 0; }
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4548 rm -rf conftest*
4549 ac_cv_func_alloca_works=yes
4550 else
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 ac_cv_func_alloca_works=no
4556 rm -f conftest*
4559 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4560 if test $ac_cv_func_alloca_works = yes; then
4561 cat >> confdefs.h <<\EOF
4562 #define HAVE_ALLOCA 1
4567 if test $ac_cv_func_alloca_works = no; then
4568 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4569 # that cause trouble. Some versions do not even contain alloca or
4570 # contain a buggy version. If you still want to use their alloca,
4571 # use ar to extract alloca.o from them instead of compiling alloca.c.
4572 ALLOCA=alloca.${ac_objext}
4573 cat >> confdefs.h <<\EOF
4574 #define C_ALLOCA 1
4578 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4579 echo "configure:4580: checking whether alloca needs Cray hooks" >&5
4580 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 #if defined(CRAY) && ! defined(CRAY2)
4587 webecray
4588 #else
4589 wenotbecray
4590 #endif
4593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4594 egrep "webecray" >/dev/null 2>&1; then
4595 rm -rf conftest*
4596 ac_cv_os_cray=yes
4597 else
4598 rm -rf conftest*
4599 ac_cv_os_cray=no
4601 rm -f conftest*
4605 echo "$ac_t""$ac_cv_os_cray" 1>&6
4606 if test $ac_cv_os_cray = yes; then
4607 for ac_func in _getb67 GETB67 getb67; do
4608 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4609 echo "configure:4610: checking for $ac_func" >&5
4610 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4611 echo $ac_n "(cached) $ac_c" 1>&6
4612 else
4613 cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 /* System header to define __stub macros and hopefully few prototypes,
4617 which can conflict with char $ac_func(); below. */
4618 #include <assert.h>
4619 /* Override any gcc2 internal prototype to avoid an error. */
4620 /* We use char because int might match the return type of a gcc2
4621 builtin and then its argument prototype would still apply. */
4622 char $ac_func();
4624 int main() {
4626 /* The GNU C library defines this for functions which it implements
4627 to always fail with ENOSYS. Some functions are actually named
4628 something starting with __ and the normal name is an alias. */
4629 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4630 choke me
4631 #else
4632 $ac_func();
4633 #endif
4635 ; return 0; }
4637 if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4638 rm -rf conftest*
4639 eval "ac_cv_func_$ac_func=yes"
4640 else
4641 echo "configure: failed program was:" >&5
4642 cat conftest.$ac_ext >&5
4643 rm -rf conftest*
4644 eval "ac_cv_func_$ac_func=no"
4646 rm -f conftest*
4649 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4650 echo "$ac_t""yes" 1>&6
4651 cat >> confdefs.h <<EOF
4652 #define CRAY_STACKSEG_END $ac_func
4655 break
4656 else
4657 echo "$ac_t""no" 1>&6
4660 done
4663 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4664 echo "configure:4665: checking stack direction for C alloca" >&5
4665 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4666 echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668 if test "$cross_compiling" = yes; then
4669 ac_cv_c_stack_direction=0
4670 else
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674 find_stack_direction ()
4676 static char *addr = 0;
4677 auto char dummy;
4678 if (addr == 0)
4680 addr = &dummy;
4681 return find_stack_direction ();
4683 else
4684 return (&dummy > addr) ? 1 : -1;
4686 main ()
4688 exit (find_stack_direction() < 0);
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4692 then
4693 ac_cv_c_stack_direction=1
4694 else
4695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -fr conftest*
4698 ac_cv_c_stack_direction=-1
4700 rm -fr conftest*
4705 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4706 cat >> confdefs.h <<EOF
4707 #define STACK_DIRECTION $ac_cv_c_stack_direction
4713 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4714 unistd.h sys/param.h
4716 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4717 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_hdr" >&5
4719 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 #include <$ac_hdr>
4727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4728 { (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4730 if test -z "$ac_err"; then
4731 rm -rf conftest*
4732 eval "ac_cv_header_$ac_safe=yes"
4733 else
4734 echo "$ac_err" >&5
4735 echo "configure: failed program was:" >&5
4736 cat conftest.$ac_ext >&5
4737 rm -rf conftest*
4738 eval "ac_cv_header_$ac_safe=no"
4740 rm -f conftest*
4742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4743 echo "$ac_t""yes" 1>&6
4744 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4745 cat >> confdefs.h <<EOF
4746 #define $ac_tr_hdr 1
4749 else
4750 echo "$ac_t""no" 1>&6
4752 done
4754 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4755 strdup __argz_count __argz_stringify __argz_next
4757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_func" >&5
4759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4760 echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 /* System header to define __stub macros and hopefully few prototypes,
4766 which can conflict with char $ac_func(); below. */
4767 #include <assert.h>
4768 /* Override any gcc2 internal prototype to avoid an error. */
4769 /* We use char because int might match the return type of a gcc2
4770 builtin and then its argument prototype would still apply. */
4771 char $ac_func();
4773 int main() {
4775 /* The GNU C library defines this for functions which it implements
4776 to always fail with ENOSYS. Some functions are actually named
4777 something starting with __ and the normal name is an alias. */
4778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4779 choke me
4780 #else
4781 $ac_func();
4782 #endif
4784 ; return 0; }
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787 rm -rf conftest*
4788 eval "ac_cv_func_$ac_func=yes"
4789 else
4790 echo "configure: failed program was:" >&5
4791 cat conftest.$ac_ext >&5
4792 rm -rf conftest*
4793 eval "ac_cv_func_$ac_func=no"
4795 rm -f conftest*
4798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4799 echo "$ac_t""yes" 1>&6
4800 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4801 cat >> confdefs.h <<EOF
4802 #define $ac_tr_func 1
4805 else
4806 echo "$ac_t""no" 1>&6
4808 done
4811 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4812 for ac_func in stpcpy
4814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_func" >&5
4816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4817 echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 /* System header to define __stub macros and hopefully few prototypes,
4823 which can conflict with char $ac_func(); below. */
4824 #include <assert.h>
4825 /* Override any gcc2 internal prototype to avoid an error. */
4826 /* We use char because int might match the return type of a gcc2
4827 builtin and then its argument prototype would still apply. */
4828 char $ac_func();
4830 int main() {
4832 /* The GNU C library defines this for functions which it implements
4833 to always fail with ENOSYS. Some functions are actually named
4834 something starting with __ and the normal name is an alias. */
4835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4836 choke me
4837 #else
4838 $ac_func();
4839 #endif
4841 ; return 0; }
4843 if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4844 rm -rf conftest*
4845 eval "ac_cv_func_$ac_func=yes"
4846 else
4847 echo "configure: failed program was:" >&5
4848 cat conftest.$ac_ext >&5
4849 rm -rf conftest*
4850 eval "ac_cv_func_$ac_func=no"
4852 rm -f conftest*
4855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4856 echo "$ac_t""yes" 1>&6
4857 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4858 cat >> confdefs.h <<EOF
4859 #define $ac_tr_func 1
4862 else
4863 echo "$ac_t""no" 1>&6
4865 done
4868 if test "${ac_cv_func_stpcpy}" = "yes"; then
4869 cat >> confdefs.h <<\EOF
4870 #define HAVE_STPCPY 1
4875 if test $ac_cv_header_locale_h = yes; then
4876 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4877 echo "configure:4878: checking for LC_MESSAGES" >&5
4878 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4879 echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881 cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884 #include <locale.h>
4885 int main() {
4886 return LC_MESSAGES
4887 ; return 0; }
4889 if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4890 rm -rf conftest*
4891 am_cv_val_LC_MESSAGES=yes
4892 else
4893 echo "configure: failed program was:" >&5
4894 cat conftest.$ac_ext >&5
4895 rm -rf conftest*
4896 am_cv_val_LC_MESSAGES=no
4898 rm -f conftest*
4901 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4902 if test $am_cv_val_LC_MESSAGES = yes; then
4903 cat >> confdefs.h <<\EOF
4904 #define HAVE_LC_MESSAGES 1
4909 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4910 echo "configure:4911: checking whether NLS is requested" >&5
4911 # Check whether --enable-nls or --disable-nls was given.
4912 if test "${enable_nls+set}" = set; then
4913 enableval="$enable_nls"
4914 USE_NLS=$enableval
4915 else
4916 USE_NLS=yes
4919 echo "$ac_t""$USE_NLS" 1>&6
4922 USE_INCLUDED_LIBINTL=no
4924 if test "$USE_NLS" = "yes"; then
4925 cat >> confdefs.h <<\EOF
4926 #define ENABLE_NLS 1
4929 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4930 echo "configure:4931: checking whether included gettext is requested" >&5
4931 # Check whether --with-included-gettext or --without-included-gettext was given.
4932 if test "${with_included_gettext+set}" = set; then
4933 withval="$with_included_gettext"
4934 nls_cv_force_use_gnu_gettext=$withval
4935 else
4936 nls_cv_force_use_gnu_gettext=no
4939 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
4941 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4942 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4943 nls_cv_header_intl=
4944 nls_cv_header_libgt=
4945 CATOBJEXT=NONE
4947 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4948 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4949 echo "configure:4950: checking for libintl.h" >&5
4950 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953 cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 #include <libintl.h>
4958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4959 { (eval echo configure:4960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4961 if test -z "$ac_err"; then
4962 rm -rf conftest*
4963 eval "ac_cv_header_$ac_safe=yes"
4964 else
4965 echo "$ac_err" >&5
4966 echo "configure: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 rm -rf conftest*
4969 eval "ac_cv_header_$ac_safe=no"
4971 rm -f conftest*
4973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4974 echo "$ac_t""yes" 1>&6
4975 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4976 echo "configure:4977: checking for gettext in libc" >&5
4977 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4978 echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980 cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 #include <libintl.h>
4984 int main() {
4985 return (int) gettext ("")
4986 ; return 0; }
4988 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4989 rm -rf conftest*
4990 gt_cv_func_gettext_libc=yes
4991 else
4992 echo "configure: failed program was:" >&5
4993 cat conftest.$ac_ext >&5
4994 rm -rf conftest*
4995 gt_cv_func_gettext_libc=no
4997 rm -f conftest*
5000 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
5002 if test "$gt_cv_func_gettext_libc" != "yes"; then
5003 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5004 echo "configure:5005: checking for bindtextdomain in -lintl" >&5
5005 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007 echo $ac_n "(cached) $ac_c" 1>&6
5008 else
5009 ac_save_LIBS="$LIBS"
5010 LIBS="-lintl $LIBS"
5011 cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* Override any gcc2 internal prototype to avoid an error. */
5015 /* We use char because int might match the return type of a gcc2
5016 builtin and then its argument prototype would still apply. */
5017 char bindtextdomain();
5019 int main() {
5020 bindtextdomain()
5021 ; return 0; }
5023 if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5024 rm -rf conftest*
5025 eval "ac_cv_lib_$ac_lib_var=yes"
5026 else
5027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 rm -rf conftest*
5030 eval "ac_cv_lib_$ac_lib_var=no"
5032 rm -f conftest*
5033 LIBS="$ac_save_LIBS"
5036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037 echo "$ac_t""yes" 1>&6
5038 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5039 echo "configure:5040: checking for gettext in libintl" >&5
5040 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5041 echo $ac_n "(cached) $ac_c" 1>&6
5042 else
5043 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
5044 echo "configure:5045: checking for gettext in -lintl" >&5
5045 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5047 echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049 ac_save_LIBS="$LIBS"
5050 LIBS="-lintl $LIBS"
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* Override any gcc2 internal prototype to avoid an error. */
5055 /* We use char because int might match the return type of a gcc2
5056 builtin and then its argument prototype would still apply. */
5057 char gettext();
5059 int main() {
5060 gettext()
5061 ; return 0; }
5063 if { (eval echo configure:5064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5064 rm -rf conftest*
5065 eval "ac_cv_lib_$ac_lib_var=yes"
5066 else
5067 echo "configure: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5069 rm -rf conftest*
5070 eval "ac_cv_lib_$ac_lib_var=no"
5072 rm -f conftest*
5073 LIBS="$ac_save_LIBS"
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5077 echo "$ac_t""yes" 1>&6
5078 gt_cv_func_gettext_libintl=yes
5079 else
5080 echo "$ac_t""no" 1>&6
5081 gt_cv_func_gettext_libintl=no
5086 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5087 else
5088 echo "$ac_t""no" 1>&6
5093 if test "$gt_cv_func_gettext_libintl" = "yes"; then
5094 LIBS="-lintl $LIBS"
5097 if test "$gt_cv_func_gettext_libc" = "yes" \
5098 || test "$gt_cv_func_gettext_libintl" = "yes"; then
5099 cat >> confdefs.h <<\EOF
5100 #define HAVE_GETTEXT 1
5103 # Extract the first word of "msgfmt", so it can be a program name with args.
5104 set dummy msgfmt; ac_word=$2
5105 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5106 echo "configure:5107: checking for $ac_word" >&5
5107 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5108 echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110 case "$MSGFMT" in
5112 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5116 for ac_dir in $PATH; do
5117 test -z "$ac_dir" && ac_dir=.
5118 if test -f $ac_dir/$ac_word; then
5119 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5120 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5121 break
5124 done
5125 IFS="$ac_save_ifs"
5126 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
5128 esac
5130 MSGFMT="$gcc_cv_path_MSGFMT"
5131 if test -n "$MSGFMT"; then
5132 echo "$ac_t""$MSGFMT" 1>&6
5133 else
5134 echo "$ac_t""no" 1>&6
5136 if test "$MSGFMT" != "no"; then
5137 for ac_func in dcgettext
5139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5140 echo "configure:5141: checking for $ac_func" >&5
5141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5142 echo $ac_n "(cached) $ac_c" 1>&6
5143 else
5144 cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147 /* System header to define __stub macros and hopefully few prototypes,
5148 which can conflict with char $ac_func(); below. */
5149 #include <assert.h>
5150 /* Override any gcc2 internal prototype to avoid an error. */
5151 /* We use char because int might match the return type of a gcc2
5152 builtin and then its argument prototype would still apply. */
5153 char $ac_func();
5155 int main() {
5157 /* The GNU C library defines this for functions which it implements
5158 to always fail with ENOSYS. Some functions are actually named
5159 something starting with __ and the normal name is an alias. */
5160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5161 choke me
5162 #else
5163 $ac_func();
5164 #endif
5166 ; return 0; }
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169 rm -rf conftest*
5170 eval "ac_cv_func_$ac_func=yes"
5171 else
5172 echo "configure: failed program was:" >&5
5173 cat conftest.$ac_ext >&5
5174 rm -rf conftest*
5175 eval "ac_cv_func_$ac_func=no"
5177 rm -f conftest*
5180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5181 echo "$ac_t""yes" 1>&6
5182 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5183 cat >> confdefs.h <<EOF
5184 #define $ac_tr_func 1
5187 else
5188 echo "$ac_t""no" 1>&6
5190 done
5192 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5193 set dummy gmsgfmt; ac_word=$2
5194 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5195 echo "configure:5196: checking for $ac_word" >&5
5196 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5197 echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199 case "$GMSGFMT" in
5201 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5203 ?:/*)
5204 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5207 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5208 ac_dummy="$PATH"
5209 for ac_dir in $ac_dummy; do
5210 test -z "$ac_dir" && ac_dir=.
5211 if test -f $ac_dir/$ac_word; then
5212 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5213 break
5215 done
5216 IFS="$ac_save_ifs"
5217 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5219 esac
5221 GMSGFMT="$gcc_cv_path_GMSGFMT"
5222 if test -n "$GMSGFMT"; then
5223 echo "$ac_t""$GMSGFMT" 1>&6
5224 else
5225 echo "$ac_t""no" 1>&6
5228 # Extract the first word of "xgettext", so it can be a program name with args.
5229 set dummy xgettext; ac_word=$2
5230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5231 echo "configure:5232: checking for $ac_word" >&5
5232 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5233 echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235 case "$XGETTEXT" in
5237 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5240 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5241 for ac_dir in $PATH; do
5242 test -z "$ac_dir" && ac_dir=.
5243 if test -f $ac_dir/$ac_word; then
5244 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5245 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5246 break
5249 done
5250 IFS="$ac_save_ifs"
5251 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5253 esac
5255 XGETTEXT="$gcc_cv_path_XGETTEXT"
5256 if test -n "$XGETTEXT"; then
5257 echo "$ac_t""$XGETTEXT" 1>&6
5258 else
5259 echo "$ac_t""no" 1>&6
5262 cat > conftest.$ac_ext <<EOF
5263 #line 5264 "configure"
5264 #include "confdefs.h"
5266 int main() {
5267 extern int _nl_msg_cat_cntr;
5268 return _nl_msg_cat_cntr
5269 ; return 0; }
5271 if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5272 rm -rf conftest*
5273 CATOBJEXT=.gmo
5274 DATADIRNAME=share
5275 else
5276 echo "configure: failed program was:" >&5
5277 cat conftest.$ac_ext >&5
5278 rm -rf conftest*
5279 CATOBJEXT=.mo
5280 DATADIRNAME=lib
5282 rm -f conftest*
5283 INSTOBJEXT=.mo
5284 else
5285 create_catalogs="no"
5289 else
5290 echo "$ac_t""no" 1>&6
5294 if test "$CATOBJEXT" = "NONE"; then
5295 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
5296 echo "configure:5297: checking whether catgets can be used" >&5
5297 # Check whether --with-catgets or --without-catgets was given.
5298 if test "${with_catgets+set}" = set; then
5299 withval="$with_catgets"
5300 nls_cv_use_catgets=$withval
5301 else
5302 nls_cv_use_catgets=no
5305 echo "$ac_t""$nls_cv_use_catgets" 1>&6
5307 if test "$nls_cv_use_catgets" = "yes"; then
5308 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
5309 echo "configure:5310: checking for main in -li" >&5
5310 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5312 echo $ac_n "(cached) $ac_c" 1>&6
5313 else
5314 ac_save_LIBS="$LIBS"
5315 LIBS="-li $LIBS"
5316 cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5320 int main() {
5321 main()
5322 ; return 0; }
5324 if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5325 rm -rf conftest*
5326 eval "ac_cv_lib_$ac_lib_var=yes"
5327 else
5328 echo "configure: failed program was:" >&5
5329 cat conftest.$ac_ext >&5
5330 rm -rf conftest*
5331 eval "ac_cv_lib_$ac_lib_var=no"
5333 rm -f conftest*
5334 LIBS="$ac_save_LIBS"
5337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5338 echo "$ac_t""yes" 1>&6
5339 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5340 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5341 cat >> confdefs.h <<EOF
5342 #define $ac_tr_lib 1
5345 LIBS="-li $LIBS"
5347 else
5348 echo "$ac_t""no" 1>&6
5351 echo $ac_n "checking for catgets""... $ac_c" 1>&6
5352 echo "configure:5353: checking for catgets" >&5
5353 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5354 echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356 cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 /* System header to define __stub macros and hopefully few prototypes,
5360 which can conflict with char catgets(); below. */
5361 #include <assert.h>
5362 /* Override any gcc2 internal prototype to avoid an error. */
5363 /* We use char because int might match the return type of a gcc2
5364 builtin and then its argument prototype would still apply. */
5365 char catgets();
5367 int main() {
5369 /* The GNU C library defines this for functions which it implements
5370 to always fail with ENOSYS. Some functions are actually named
5371 something starting with __ and the normal name is an alias. */
5372 #if defined (__stub_catgets) || defined (__stub___catgets)
5373 choke me
5374 #else
5375 catgets();
5376 #endif
5378 ; return 0; }
5380 if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5381 rm -rf conftest*
5382 eval "ac_cv_func_catgets=yes"
5383 else
5384 echo "configure: failed program was:" >&5
5385 cat conftest.$ac_ext >&5
5386 rm -rf conftest*
5387 eval "ac_cv_func_catgets=no"
5389 rm -f conftest*
5392 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5393 echo "$ac_t""yes" 1>&6
5394 cat >> confdefs.h <<\EOF
5395 #define HAVE_CATGETS 1
5398 INTLOBJS="\$(CATOBJS)"
5399 # Extract the first word of "gencat", so it can be a program name with args.
5400 set dummy gencat; ac_word=$2
5401 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5402 echo "configure:5403: checking for $ac_word" >&5
5403 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5404 echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406 case "$GENCAT" in
5408 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5410 ?:/*)
5411 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5415 ac_dummy="$PATH"
5416 for ac_dir in $ac_dummy; do
5417 test -z "$ac_dir" && ac_dir=.
5418 if test -f $ac_dir/$ac_word; then
5419 gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5420 break
5422 done
5423 IFS="$ac_save_ifs"
5424 test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5426 esac
5428 GENCAT="$gcc_cv_path_GENCAT"
5429 if test -n "$GENCAT"; then
5430 echo "$ac_t""$GENCAT" 1>&6
5431 else
5432 echo "$ac_t""no" 1>&6
5434 if test "$GENCAT" != "no"; then
5435 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5436 set dummy gmsgfmt; ac_word=$2
5437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5438 echo "configure:5439: checking for $ac_word" >&5
5439 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442 case "$GMSGFMT" in
5444 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5446 ?:/*)
5447 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5451 ac_dummy="$PATH"
5452 for ac_dir in $ac_dummy; do
5453 test -z "$ac_dir" && ac_dir=.
5454 if test -f $ac_dir/$ac_word; then
5455 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5456 break
5458 done
5459 IFS="$ac_save_ifs"
5460 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5462 esac
5464 GMSGFMT="$gcc_cv_path_GMSGFMT"
5465 if test -n "$GMSGFMT"; then
5466 echo "$ac_t""$GMSGFMT" 1>&6
5467 else
5468 echo "$ac_t""no" 1>&6
5471 if test "$GMSGFMT" = "no"; then
5472 # Extract the first word of "msgfmt", so it can be a program name with args.
5473 set dummy msgfmt; ac_word=$2
5474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5475 echo "configure:5476: checking for $ac_word" >&5
5476 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479 case "$GMSGFMT" in
5481 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5484 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5485 for ac_dir in $PATH; do
5486 test -z "$ac_dir" && ac_dir=.
5487 if test -f $ac_dir/$ac_word; then
5488 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5489 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5490 break
5493 done
5494 IFS="$ac_save_ifs"
5495 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5497 esac
5499 GMSGFMT="$gcc_cv_path_GMSGFMT"
5500 if test -n "$GMSGFMT"; then
5501 echo "$ac_t""$GMSGFMT" 1>&6
5502 else
5503 echo "$ac_t""no" 1>&6
5506 if test "$GMSGFMT" = "msgfmt"; then
5507 create_catalogs="no"
5510 # Extract the first word of "xgettext", so it can be a program name with args.
5511 set dummy xgettext; ac_word=$2
5512 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5513 echo "configure:5514: checking for $ac_word" >&5
5514 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 case "$XGETTEXT" in
5519 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5522 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5523 for ac_dir in $PATH; do
5524 test -z "$ac_dir" && ac_dir=.
5525 if test -f $ac_dir/$ac_word; then
5526 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5527 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5528 break
5531 done
5532 IFS="$ac_save_ifs"
5533 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5535 esac
5537 XGETTEXT="$gcc_cv_path_XGETTEXT"
5538 if test -n "$XGETTEXT"; then
5539 echo "$ac_t""$XGETTEXT" 1>&6
5540 else
5541 echo "$ac_t""no" 1>&6
5544 USE_INCLUDED_LIBINTL=yes
5545 CATOBJEXT=.cat
5546 INSTOBJEXT=.cat
5547 DATADIRNAME=lib
5548 INTLDEPS='$(top_builddir)/intl/libintl.a'
5549 INTLLIBS=$INTLDEPS
5550 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5551 nls_cv_header_intl=intl/libintl.h
5552 nls_cv_header_libgt=intl/libgettext.h
5554 else
5555 echo "$ac_t""no" 1>&6
5561 if test "$CATOBJEXT" = "NONE"; then
5562 nls_cv_use_gnu_gettext=yes
5566 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5567 INTLOBJS="\$(GETTOBJS)"
5568 # Extract the first word of "msgfmt", so it can be a program name with args.
5569 set dummy msgfmt; ac_word=$2
5570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5571 echo "configure:5572: checking for $ac_word" >&5
5572 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5573 echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575 case "$MSGFMT" in
5577 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5581 for ac_dir in $PATH; do
5582 test -z "$ac_dir" && ac_dir=.
5583 if test -f $ac_dir/$ac_word; then
5584 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5585 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5586 break
5589 done
5590 IFS="$ac_save_ifs"
5591 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5593 esac
5595 MSGFMT="$gcc_cv_path_MSGFMT"
5596 if test -n "$MSGFMT"; then
5597 echo "$ac_t""$MSGFMT" 1>&6
5598 else
5599 echo "$ac_t""no" 1>&6
5602 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5603 set dummy gmsgfmt; ac_word=$2
5604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5605 echo "configure:5606: checking for $ac_word" >&5
5606 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5607 echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609 case "$GMSGFMT" in
5611 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5613 ?:/*)
5614 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5618 ac_dummy="$PATH"
5619 for ac_dir in $ac_dummy; do
5620 test -z "$ac_dir" && ac_dir=.
5621 if test -f $ac_dir/$ac_word; then
5622 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5623 break
5625 done
5626 IFS="$ac_save_ifs"
5627 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5629 esac
5631 GMSGFMT="$gcc_cv_path_GMSGFMT"
5632 if test -n "$GMSGFMT"; then
5633 echo "$ac_t""$GMSGFMT" 1>&6
5634 else
5635 echo "$ac_t""no" 1>&6
5638 if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5639 create_catalogs="no"
5641 # Extract the first word of "xgettext", so it can be a program name with args.
5642 set dummy xgettext; ac_word=$2
5643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5644 echo "configure:5645: checking for $ac_word" >&5
5645 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5646 echo $ac_n "(cached) $ac_c" 1>&6
5647 else
5648 case "$XGETTEXT" in
5650 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5653 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5654 for ac_dir in $PATH; do
5655 test -z "$ac_dir" && ac_dir=.
5656 if test -f $ac_dir/$ac_word; then
5657 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5658 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5659 break
5662 done
5663 IFS="$ac_save_ifs"
5664 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5666 esac
5668 XGETTEXT="$gcc_cv_path_XGETTEXT"
5669 if test -n "$XGETTEXT"; then
5670 echo "$ac_t""$XGETTEXT" 1>&6
5671 else
5672 echo "$ac_t""no" 1>&6
5676 USE_INCLUDED_LIBINTL=yes
5677 CATOBJEXT=.gmo
5678 INSTOBJEXT=.mo
5679 DATADIRNAME=share
5680 INTLDEPS='$(top_builddir)/intl/libintl.a'
5681 INTLLIBS=$INTLDEPS
5682 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5683 nls_cv_header_intl=intl/libintl.h
5684 nls_cv_header_libgt=intl/libgettext.h
5687 if test "$XGETTEXT" != ":"; then
5688 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5690 else
5691 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5692 XGETTEXT=":"
5698 # We need to process the po/ directory.
5699 POSUB=po
5700 else
5701 DATADIRNAME=share
5702 nls_cv_header_intl=intl/libintl.h
5703 nls_cv_header_libgt=intl/libgettext.h
5709 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5710 # because some of the sources are only built for this goal.
5711 if test "$PACKAGE" = gettext; then
5712 USE_NLS=yes
5713 USE_INCLUDED_LIBINTL=yes
5716 for lang in $ALL_LINGUAS; do
5717 GMOFILES="$GMOFILES $lang.gmo"
5718 POFILES="$POFILES $lang.po"
5719 done
5734 if test "x$create_catalogs" = "xno"; then
5735 echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5738 if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
5739 if test "x$ALL_LINGUAS" = "x"; then
5740 LINGUAS=
5741 else
5742 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5743 echo "configure:5744: checking for catalogs to be installed" >&5
5744 if test "x$LINGUAS" = "x"; then
5745 LINGUAS=$ALL_LINGUAS
5746 else
5747 NEW_LINGUAS=
5748 for lang in $ALL_LINGUAS; do
5749 case " $LINGUAS " in
5750 *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5751 esac
5752 done
5753 LINGUAS=$NEW_LINGUAS
5755 echo "$ac_t""$LINGUAS" 1>&6
5758 if test -n "$LINGUAS"; then
5759 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5763 if test $ac_cv_header_locale_h = yes; then
5764 INCLUDE_LOCALE_H="#include <locale.h>"
5765 else
5766 INCLUDE_LOCALE_H="\
5767 /* The system does not provide the header <locale.h>. Take care yourself. */"
5771 test -d intl || mkdir intl
5772 if test "$CATOBJEXT" = ".cat"; then
5773 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5774 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5775 echo "configure:5776: checking for linux/version.h" >&5
5776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779 cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 #include <linux/version.h>
5784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5785 { (eval echo configure:5786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5787 if test -z "$ac_err"; then
5788 rm -rf conftest*
5789 eval "ac_cv_header_$ac_safe=yes"
5790 else
5791 echo "$ac_err" >&5
5792 echo "configure: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 rm -rf conftest*
5795 eval "ac_cv_header_$ac_safe=no"
5797 rm -f conftest*
5799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5800 echo "$ac_t""yes" 1>&6
5801 msgformat=linux
5802 else
5803 echo "$ac_t""no" 1>&6
5804 msgformat=xopen
5808 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
5810 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5811 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
5813 if test "$PACKAGE" = "gettext"; then
5814 GT_NO="#NO#"
5815 GT_YES=
5816 else
5817 GT_NO=
5818 GT_YES="#YES#"
5823 MKINSTALLDIRS=
5824 if test -n "$ac_aux_dir"; then
5825 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5827 if test -z "$MKINSTALLDIRS"; then
5828 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5835 test -d po || mkdir po
5836 if test "x$srcdir" != "x."; then
5837 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5838 posrcprefix="$srcdir/"
5839 else
5840 posrcprefix="../$srcdir/"
5842 else
5843 posrcprefix="../"
5845 rm -f po/POTFILES
5846 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5847 < $srcdir/po/POTFILES.in > po/POTFILES
5849 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
5851 # Windows32 Registry support for specifying GCC installation paths.
5852 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5853 if test "${enable_win32_registry+set}" = set; then
5854 enableval="$enable_win32_registry"
5859 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5860 echo "configure:5861: checking whether windows registry support is requested" >&5
5861 if test x$enable_win32_registry != xno; then
5862 cat >> confdefs.h <<\EOF
5863 #define ENABLE_WIN32_REGISTRY 1
5866 echo "$ac_t""yes" 1>&6
5867 else
5868 echo "$ac_t""no" 1>&6
5871 # Check if user specified a different registry key.
5872 case x${enable_win32_registry} in
5873 x | xyes)
5874 # default.
5875 gcc_cv_win32_registry_key="$VERSION"
5877 xno)
5878 # no registry lookup.
5879 gcc_cv_win32_registry_key=''
5882 # user-specified key.
5883 gcc_cv_win32_registry_key="$enable_win32_registry"
5885 esac
5887 if test x$enable_win32_registry != xno; then
5888 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
5889 echo "configure:5890: checking registry key on windows hosts" >&5
5890 cat >> confdefs.h <<EOF
5891 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
5894 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
5897 # Get an absolute path to the GCC top-level source directory
5898 holddir=`pwd`
5899 cd $srcdir
5900 topdir=`pwd`
5901 cd $holddir
5903 # Conditionalize the makefile for this host machine.
5904 # Make-host contains the concatenation of all host makefile fragments
5905 # [there can be more than one]. This file is built by configure.frag.
5906 host_overrides=Make-host
5907 dep_host_xmake_file=
5908 for f in .. ${host_xmake_file}
5910 if test -f ${srcdir}/config/$f
5911 then
5912 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
5914 done
5916 # Conditionalize the makefile for this target machine.
5917 # Make-target contains the concatenation of all host makefile fragments
5918 # [there can be more than one]. This file is built by configure.frag.
5919 target_overrides=Make-target
5920 dep_tmake_file=
5921 for f in .. ${tmake_file}
5923 if test -f ${srcdir}/config/$f
5924 then
5925 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
5927 done
5929 # If the host doesn't support symlinks, modify CC in
5930 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5931 # Otherwise, we can use "CC=$(CC)".
5932 rm -f symtest.tem
5933 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5934 then
5935 cc_set_by_configure="\$(CC)"
5936 quoted_cc_set_by_configure="\$(CC)"
5937 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5938 else
5939 rm -f symtest.tem
5940 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5941 then
5942 symbolic_link="cp -p"
5943 else
5944 symbolic_link="cp"
5946 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5947 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
5948 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5950 rm -f symtest.tem
5952 out_object_file=`basename $out_file .c`.o
5954 tm_file_list=
5955 for f in $tm_file; do
5956 case $f in
5957 gansidecl.h | defaults.h )
5958 tm_file_list="${tm_file_list} $f" ;;
5959 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
5960 esac
5961 done
5963 tm_p_file_list=
5964 for f in $tm_p_file; do
5965 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
5966 done
5968 host_xm_file_list=
5969 for f in $host_xm_file; do
5970 case $f in
5971 auto-host.h | gansidecl.h | defaults.h | hwint.h )
5972 host_xm_file_list="${host_xm_file_list} $f" ;;
5973 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
5974 esac
5975 done
5977 build_xm_file_list=
5978 for f in $build_xm_file; do
5979 case $f in
5980 auto-build.h | auto-host.h | gansidecl.h | defaults.h | hwint.h )
5981 build_xm_file_list="${build_xm_file_list} $f" ;;
5982 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
5983 esac
5984 done
5986 # Define macro CROSS_COMPILE in compilation
5987 # if this is a cross-compiler.
5988 # Also use all.cross instead of all.internal
5989 # and add cross-make to Makefile.
5990 cross_overrides="/dev/null"
5991 if test x$host != x$target
5992 then
5993 cross_defines="CROSS=-DCROSS_COMPILE"
5994 cross_overrides="${topdir}/cross-make"
5997 # If this is a cross-compiler that does not
5998 # have its own set of headers then define
5999 # inhibit_libc
6001 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6002 # This prevents libgcc2 from containing any code which requires libc
6003 # support.
6004 inhibit_libc=
6005 if test x$host != x$target && test x$with_headers = x; then
6006 inhibit_libc=-Dinhibit_libc
6007 else
6008 if test x$with_newlib = xyes; then
6009 inhibit_libc=-Dinhibit_libc
6014 # When building gcc with a cross-compiler, we need to fix a few things.
6015 # This must come after cross-make as we want all.build to override
6016 # all.cross.
6017 build_overrides="/dev/null"
6018 if test x$build != x$host
6019 then
6020 build_overrides="${topdir}/build-make"
6023 # Expand extra_headers to include complete path.
6024 # This substitutes for lots of t-* files.
6025 extra_headers_list=
6026 if test "x$extra_headers" = x
6027 then true
6028 else
6029 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6030 for file in $extra_headers;
6032 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6033 done
6036 if test x$use_collect2 = xno; then
6037 use_collect2=
6040 # Add a definition of USE_COLLECT2 if system wants one.
6041 # Also tell toplev.c what to do.
6042 # This substitutes for lots of t-* files.
6043 if test x$use_collect2 = x
6044 then
6045 will_use_collect2=
6046 maybe_use_collect2=
6047 else
6048 will_use_collect2="collect2"
6049 maybe_use_collect2="-DUSE_COLLECT2"
6052 # If we have gas in the build tree, make a link to it.
6053 if test -f ../gas/Makefile; then
6054 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6057 # If we have nm in the build tree, make a link to it.
6058 if test -f ../binutils/Makefile; then
6059 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6062 # If we have ld in the build tree, make a link to it.
6063 if test -f ../ld/Makefile; then
6064 # if test x$use_collect2 = x; then
6065 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6066 # else
6067 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6068 # fi
6071 # Figure out what assembler we will be using.
6072 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6073 echo "configure:6074: checking what assembler to use" >&5
6074 gcc_cv_as=
6075 gcc_cv_gas_major_version=
6076 gcc_cv_gas_minor_version=
6077 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6078 if test -x "$DEFAULT_ASSEMBLER"; then
6079 gcc_cv_as="$DEFAULT_ASSEMBLER"
6080 elif test -x "$AS"; then
6081 gcc_cv_as="$AS"
6082 elif test -x as$host_exeext; then
6083 # Build using assembler in the current directory.
6084 gcc_cv_as=./as$host_exeext
6085 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6086 # Single tree build which includes gas.
6087 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6089 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6090 if test x$gcc_cv_gas_version != x; then
6091 break
6093 done
6094 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6095 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6098 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6099 # Native build.
6100 # Search the same directories that the installed compiler will
6101 # search. Else we may find the wrong assembler and lose. If we
6102 # do not find a suitable assembler binary, then try the user's
6103 # path.
6105 # Also note we have to check MD_EXEC_PREFIX before checking the
6106 # user's path. Unfortunately, there is no good way to get at the
6107 # value of MD_EXEC_PREFIX here. So we do a brute force search
6108 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6109 # to be fixed as part of the make/configure rewrite too.
6111 if test "x$exec_prefix" = xNONE; then
6112 if test "x$prefix" = xNONE; then
6113 test_prefix=/usr/local
6114 else
6115 test_prefix=$prefix
6117 else
6118 test_prefix=$exec_prefix
6121 # If the loop below does not find an assembler, then use whatever
6122 # one we can find in the users's path.
6123 # user's path.
6124 gcc_cv_as=as$host_exeext
6126 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6127 $test_prefix/lib/gcc-lib/$target \
6128 /usr/lib/gcc/$target/$gcc_version \
6129 /usr/lib/gcc/$target \
6130 $test_prefix/$target/bin/$target/$gcc_version \
6131 $test_prefix/$target/bin \
6132 /usr/libexec \
6133 /usr/ccs/gcc \
6134 /usr/ccs/bin \
6135 /udk/usr/ccs/bin \
6136 /bsd43/usr/lib/cmplrs/cc \
6137 /usr/cross64/usr/bin \
6138 /usr/lib/cmplrs/cc \
6139 /sysv/usr/lib/cmplrs/cc \
6140 /svr4/usr/lib/cmplrs/cc \
6141 /usr/bin"
6143 for dir in $test_dirs; do
6144 if test -f $dir/as$host_exeext; then
6145 gcc_cv_as=$dir/as$host_exeext
6146 break;
6148 done
6150 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6151 echo "$ac_t"""newly built gas"" 1>&6
6152 else
6153 echo "$ac_t""$gcc_cv_as" 1>&6
6156 # Figure out what nm we will be using.
6157 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6158 echo "configure:6159: checking what nm to use" >&5
6159 if test -x nm$host_exeext; then
6160 gcc_cv_nm=./nm$host_exeext
6161 elif test x$host = x$target; then
6162 # Native build.
6163 gcc_cv_nm=nm$host_exeext
6165 echo "$ac_t""$gcc_cv_nm" 1>&6
6167 # Figure out what assembler alignment features are present.
6168 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
6169 echo "configure:6170: checking assembler alignment features" >&5
6170 gcc_cv_as_alignment_features=none
6171 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6172 # Gas version 2.6 and later support for .balign and .p2align.
6173 # bytes to skip when using .p2align.
6174 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
6175 gcc_cv_as_alignment_features=".balign and .p2align"
6176 cat >> confdefs.h <<\EOF
6177 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6181 # Gas version 2.8 and later support specifying the maximum
6182 # bytes to skip when using .p2align.
6183 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
6184 gcc_cv_as_alignment_features=".p2align including maximum skip"
6185 cat >> confdefs.h <<\EOF
6186 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6190 elif test x$gcc_cv_as != x; then
6191 # Check if we have .balign and .p2align
6192 echo ".balign 4" > conftest.s
6193 echo ".p2align 2" >> conftest.s
6194 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6195 gcc_cv_as_alignment_features=".balign and .p2align"
6196 cat >> confdefs.h <<\EOF
6197 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6201 rm -f conftest.s conftest.o
6202 # Check if specifying the maximum bytes to skip when
6203 # using .p2align is supported.
6204 echo ".p2align 4,,7" > conftest.s
6205 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6206 gcc_cv_as_alignment_features=".p2align including maximum skip"
6207 cat >> confdefs.h <<\EOF
6208 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6212 rm -f conftest.s conftest.o
6214 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6216 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
6217 echo "configure:6218: checking assembler subsection support" >&5
6218 gcc_cv_as_subsections=no
6219 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6220 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
6221 gcc_cv_as_subsections="working .subsection -1"
6223 elif test x$gcc_cv_as != x; then
6224 # Check if we have .subsection
6225 echo ".subsection 1" > conftest.s
6226 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6227 gcc_cv_as_subsections=".subsection"
6228 if test x$gcc_cv_nm != x; then
6229 cat > conftest.s <<EOF
6230 conftest_label1: .word 0
6231 .subsection -1
6232 conftest_label2: .word 0
6233 .previous
6235 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6236 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6237 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6238 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6240 else
6241 gcc_cv_as_subsections="working .subsection -1"
6246 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6248 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6249 cat >> confdefs.h <<\EOF
6250 #define HAVE_GAS_SUBSECTION_ORDERING 1
6254 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6256 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
6257 echo "configure:6258: checking assembler weak support" >&5
6258 gcc_cv_as_weak=no
6259 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6260 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
6261 gcc_cv_as_weak="yes"
6263 elif test x$gcc_cv_as != x; then
6264 # Check if we have .weak
6265 echo " .weak foobar" > conftest.s
6266 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6267 gcc_cv_as_weak="yes"
6269 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6271 if test x"$gcc_cv_as_weak" = xyes; then
6272 cat >> confdefs.h <<\EOF
6273 #define HAVE_GAS_WEAK 1
6277 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6279 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
6280 echo "configure:6281: checking assembler hidden support" >&5
6281 gcc_cv_as_hidden=no
6282 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6283 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
6284 gcc_cv_as_hidden="yes"
6286 elif test x$gcc_cv_as != x; then
6287 # Check if we have .hidden
6288 echo " .hidden foobar" > conftest.s
6289 echo "foobar:" >> conftest.s
6290 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6291 gcc_cv_as_hidden="yes"
6293 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6295 if test x"$gcc_cv_as_hidden" = xyes; then
6296 cat >> confdefs.h <<\EOF
6297 #define HAVE_GAS_HIDDEN 1
6301 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6303 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
6304 echo "configure:6305: checking assembler leb128 support" >&5
6305 gcc_cv_as_leb128=no
6306 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6307 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
6308 gcc_cv_as_leb128="yes"
6310 elif test x$gcc_cv_as != x; then
6311 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6312 cat > conftest.s <<EOF
6313 .data
6314 .uleb128 L2 - L1
6316 .uleb128 1280
6317 .sleb128 -1010
6320 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6321 gcc_cv_as_leb128="yes"
6323 # GAS versions before 2.11 do not support uleb128,
6324 # despite appearing to.
6325 # ??? There exists an elf-specific test that will crash
6326 # the assembler. Perhaps it's better to figure out whether
6327 # arbitrary sections are supported and try the test.
6328 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
6329 if echo "$as_ver" | grep GNU > /dev/null; then
6330 as_ver=`echo $as_ver | sed -e 's/.* //'`
6331 as_major=`echo $as_ver | sed 's/\..*//'`
6332 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6333 if test $as_major -eq 2 -a $as_minor -lt 11; then
6334 gcc_cv_as_leb128="no"
6338 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6340 if test x"$gcc_cv_as_leb128" = xyes; then
6341 cat >> confdefs.h <<\EOF
6342 #define HAVE_AS_LEB128 1
6346 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6348 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
6349 echo "configure:6350: checking assembler eh_frame optimization" >&5
6350 gcc_cv_as_eh_frame=no
6351 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6352 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
6353 gcc_cv_as_eh_frame="yes"
6355 elif test x$gcc_cv_as != x; then
6356 # Check if this is GAS.
6357 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
6358 rm -f a.out 2> /dev/null
6359 if echo "$as_ver" | grep GNU > /dev/null; then
6360 # Versions up to and including 2.11.0 may mis-optimize
6361 # .eh_frame data. Try something.
6362 cat > conftest.s <<EOF
6363 .text
6364 .LFB1:
6365 .4byte 0
6366 .L1:
6367 .4byte 0
6368 .LFE1:
6369 .section .eh_frame,"aw",@progbits
6370 __FRAME_BEGIN__:
6371 .4byte .LECIE1-.LSCIE1
6372 .LSCIE1:
6373 .4byte 0x0
6374 .byte 0x1
6375 .ascii "z\0"
6376 .byte 0x1
6377 .byte 0x78
6378 .byte 0x1a
6379 .byte 0x0
6380 .byte 0x4
6381 .4byte 1
6382 .p2align 1
6383 .LECIE1:
6384 .LSFDE1:
6385 .4byte .LEFDE1-.LASFDE1
6386 .LASFDE1:
6387 .4byte .LASFDE1-__FRAME_BEGIN__
6388 .4byte .LFB1
6389 .4byte .LFE1-.LFB1
6390 .byte 0x4
6391 .4byte .LFE1-.LFB1
6392 .byte 0x4
6393 .4byte .L1-.LFB1
6394 .LEFDE1:
6396 cat > conftest.exp <<EOF
6397 0000 10000000 00000000 017a0001 781a0004 .........z..x...
6398 0010 01000000 12000000 18000000 00000000 ................
6399 0020 08000000 04080000 0044 .........D
6401 # If the assembler didn't choke, and we can objdump,
6402 # and we got the correct data, then succeed.
6403 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6404 && objdump -s -j .eh_frame conftest.o 2>/dev/null \
6405 | tail -3 > conftest.got \
6406 && cmp conftest.exp conftest.got > /dev/null 2>&1
6407 then
6408 gcc_cv_as_eh_frame="yes"
6409 else
6410 gcc_cv_as_eh_frame="bad"
6411 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
6412 cat >> confdefs.h <<\EOF
6413 #define USE_AS_TRADITIONAL_FORMAT 1
6419 rm -f conftest.*
6421 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
6423 case "$target" in
6424 sparc*-*-*)
6425 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
6426 echo "configure:6427: checking assembler .register pseudo-op support" >&5
6427 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6428 echo $ac_n "(cached) $ac_c" 1>&6
6429 else
6431 gcc_cv_as_register_pseudo_op=unknown
6432 if test x$gcc_cv_as != x; then
6433 # Check if we have .register
6434 echo ".register %g2, #scratch" > conftest.s
6435 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6436 gcc_cv_as_register_pseudo_op=yes
6437 else
6438 gcc_cv_as_register_pseudo_op=no
6440 rm -f conftest.s conftest.o
6445 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6446 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6447 cat >> confdefs.h <<\EOF
6448 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6453 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6454 echo "configure:6455: checking assembler supports -relax" >&5
6455 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6456 echo $ac_n "(cached) $ac_c" 1>&6
6457 else
6459 gcc_cv_as_relax_opt=unknown
6460 if test x$gcc_cv_as != x; then
6461 # Check if gas supports -relax
6462 echo ".text" > conftest.s
6463 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6464 gcc_cv_as_relax_opt=yes
6465 else
6466 gcc_cv_as_relax_opt=no
6468 rm -f conftest.s conftest.o
6473 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6474 if test "x$gcc_cv_as_relax_opt" = xyes; then
6475 cat >> confdefs.h <<\EOF
6476 #define HAVE_AS_RELAX_OPTION 1
6481 case "$tm_file" in
6482 *64*)
6483 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6484 echo "configure:6485: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6485 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6486 echo $ac_n "(cached) $ac_c" 1>&6
6487 else
6489 if test -n "$gcc_cv_as"; then
6490 echo ".xword foo" > conftest.s
6491 gcc_cv_as_flags64=no
6492 for flag in "-xarch=v9" "-64 -Av9"; do
6493 if $gcc_cv_as $flag -o conftest.o conftest.s \
6494 > /dev/null 2>&1; then
6495 gcc_cv_as_flags64=$flag
6496 break
6498 done
6499 rm -f conftest.s conftest.o
6500 else
6501 if test "$gas" = yes; then
6502 gcc_cv_as_flags64="-64 -Av9"
6503 else
6504 gcc_cv_as_flags64="-xarch=v9"
6510 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6511 if test "x$gcc_cv_as_flags64" = xno; then
6513 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6514 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6516 else
6517 cat >> confdefs.h <<EOF
6518 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6523 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6525 esac
6527 if test "x$gcc_cv_as_flags64" != xno; then
6528 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6529 echo "configure:6530: checking for assembler offsetable %lo() support" >&5
6530 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6531 echo $ac_n "(cached) $ac_c" 1>&6
6532 else
6534 gcc_cv_as_offsetable_lo10=unknown
6535 if test "x$gcc_cv_as" != x; then
6536 # Check if assembler has offsetable %lo()
6537 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6538 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6539 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6540 > /dev/null 2>&1 &&
6541 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6542 > /dev/null 2>&1; then
6543 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6544 gcc_cv_as_offsetable_lo10=no
6545 else
6546 gcc_cv_as_offsetable_lo10=yes
6548 else
6549 gcc_cv_as_offsetable_lo10=no
6551 rm -f conftest.s conftest.o conftest1.s conftest1.o
6556 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6557 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6558 cat >> confdefs.h <<\EOF
6559 #define HAVE_AS_OFFSETABLE_LO10 1
6567 i[34567]86-*-*)
6568 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6569 echo "configure:6570: checking assembler instructions" >&5
6570 gcc_cv_as_instructions=
6571 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6572 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
6573 gcc_cv_as_instructions="filds fists"
6575 elif test x$gcc_cv_as != x; then
6576 set "filds fists" "filds mem; fists mem"
6577 while test $# -gt 0
6579 echo "$2" > conftest.s
6580 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6581 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6583 shift 2
6584 done
6585 rm -f conftest.s conftest.o
6587 if test x"$gcc_cv_as_instructions" != x; then
6588 cat >> confdefs.h <<EOF
6589 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6593 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6595 esac
6597 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6598 echo "configure:6599: checking assembler dwarf2 debug_line support" >&5
6599 gcc_cv_as_dwarf2_debug_line=no
6600 # ??? Not all targets support dwarf2 debug_line, even within a version
6601 # of gas. Moreover, we need to emit a valid instruction to trigger any
6602 # info to the output file. So, as supported targets are added to gas 2.11,
6603 # add some instruction here to (also) show we expect this might work.
6604 # ??? Once 2.11 is released, probably need to add first known working
6605 # version to the per-target configury.
6606 case "$target" in
6607 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
6608 insn="nop"
6610 ia64*-*-*)
6611 insn="nop 0"
6613 esac
6614 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6615 then
6616 if test "$gcc_cv_gas_major_version" -eq 2 \
6617 -a "$gcc_cv_gas_minor_version" -ge 11 \
6618 -o "$gcc_cv_gas_major_version" -gt 2 \
6619 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6620 && test x"$insn" != x ; then
6621 gcc_cv_as_dwarf2_debug_line="yes"
6623 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6624 echo ' .file 1 "conftest.s"' > conftest.s
6625 echo ' .loc 1 3 0' >> conftest.s
6626 echo " $insn" >> conftest.s
6627 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6628 && grep debug_line conftest.o > /dev/null 2>&1 ; then
6629 # The .debug_line file table must be in the exact order that
6630 # we specified the files, since these indicies are also used
6631 # by DW_AT_decl_file. Approximate this test by testing if
6632 # the assembler bitches if the same index is assigned twice.
6633 echo ' .file 1 "foo.s"' > conftest.s
6634 echo ' .file 1 "bar.s"' >> conftest.s
6635 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6636 then
6637 gcc_cv_as_dwarf2_debug_line="no"
6638 else
6639 gcc_cv_as_dwarf2_debug_line="yes"
6642 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6644 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6645 cat >> confdefs.h <<\EOF
6646 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6650 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6652 # Figure out what language subdirectories are present.
6653 # Look if the user specified --enable-languages="..."; if not, use
6654 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6655 # go away some day.
6656 if test x"${enable_languages+set}" != xset; then
6657 if test x"${LANGUAGES+set}" = xset; then
6658 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6659 else
6660 enable_languages=all
6662 else
6663 if test x"${enable_languages}" = x; then
6664 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6668 # First scan to see if an enabled language requires some other language.
6669 # We assume that a given config-lang.in will list all the language
6670 # front ends it requires, even if some are required indirectly.
6671 for lang in ${srcdir}/*/config-lang.in ..
6673 case $lang in
6676 # The odd quoting in the next line works around
6677 # an apparent bug in bash 1.12 on linux.
6678 ${srcdir}/[*]/config-lang.in)
6681 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6682 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
6683 for other in $this_lang_requires
6685 case ,${enable_languages}, in
6686 *,$other,*)
6688 *,all,*)
6690 *,$lang_alias,*)
6691 enable_languages="$enable_languages,$other"
6693 esac
6694 done
6696 esac
6697 done
6699 subdirs=
6700 for lang in ${srcdir}/*/config-lang.in ..
6702 case $lang in
6703 ..) ;;
6704 # The odd quoting in the next line works around
6705 # an apparent bug in bash 1.12 on linux.
6706 ${srcdir}/[*]/config-lang.in) ;;
6708 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6709 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
6710 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
6711 if test "x$lang_alias" = x
6712 then
6713 echo "$lang doesn't set \$language." 1>&2
6714 exit 1
6716 case ${build_by_default},${enable_languages}, in
6717 *,$lang_alias,*) add_this_lang=yes ;;
6718 no,*) add_this_lang=no ;;
6719 *,all,*) add_this_lang=yes ;;
6720 *) add_this_lang=no ;;
6721 esac
6722 if test x"${add_this_lang}" = xyes; then
6723 case $lang in
6724 ${srcdir}/ada/config-lang.in)
6725 if test x$gnat = xyes ; then
6726 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6730 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6732 esac
6735 esac
6736 done
6738 # Make gthr-default.h if we have a thread file.
6739 gthread_flags=
6740 if test $thread_file != single; then
6741 rm -f gthr-default.h
6742 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6743 gthread_flags=-DHAVE_GTHR_DEFAULT
6747 # Find out what GC implementation we want, or may, use.
6748 # Check whether --with-gc or --without-gc was given.
6749 if test "${with_gc+set}" = set; then
6750 withval="$with_gc"
6751 case "$withval" in
6752 simple | page)
6753 GGC=ggc-$withval
6756 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6758 esac
6759 else
6760 GGC=ggc-page
6764 echo "Using $GGC for garbage collection."
6766 # Use the system's zlib library.
6767 zlibdir=-L../zlib
6768 zlibinc="-I\$(srcdir)/../zlib"
6769 # Check whether --with-system-zlib or --without-system-zlib was given.
6770 if test "${with_system_zlib+set}" = set; then
6771 withval="$with_system_zlib"
6772 zlibdir=
6773 zlibinc=
6780 cat >> confdefs.h <<EOF
6781 #define ENABLE_STD_NAMESPACE 1
6786 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6787 echo "configure:6788: checking whether to enable maintainer-specific portions of Makefiles" >&5
6788 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6789 if test "${enable_maintainer_mode+set}" = set; then
6790 enableval="$enable_maintainer_mode"
6791 maintainer_mode=$enableval
6792 else
6793 maintainer_mode=no
6797 echo "$ac_t""$maintainer_mode" 1>&6
6799 if test "$maintainer_mode" = "yes"; then
6800 MAINT=''
6801 else
6802 MAINT='#'
6805 # With Setjmp/Longjmp based exception handling.
6806 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
6807 if test "${enable_sjlj_exceptions+set}" = set; then
6808 enableval="$enable_sjlj_exceptions"
6809 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
6810 cat >> confdefs.h <<EOF
6811 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
6817 # Make empty files to contain the specs and options for each language.
6818 # Then add #include lines to for a compiler that has specs and/or options.
6820 lang_specs_files=
6821 lang_options_files=
6822 lang_tree_files=
6823 rm -f specs.h options.h gencheck.h
6824 touch specs.h options.h gencheck.h
6825 for subdir in . $subdirs
6827 if test -f $srcdir/$subdir/lang-specs.h; then
6828 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6829 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6831 if test -f $srcdir/$subdir/lang-options.h; then
6832 echo "#include \"$subdir/lang-options.h\"" >>options.h
6833 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6835 if test -f $srcdir/$subdir/$subdir-tree.def; then
6836 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6837 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6839 done
6841 # These (without "all_") are set in each config-lang.in.
6842 # `language' must be a single word so is spelled singularly.
6843 all_languages=
6844 all_boot_languages=
6845 all_compilers=
6846 all_stagestuff=
6847 all_diff_excludes=
6848 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
6849 # List of language makefile fragments.
6850 all_lang_makefiles=
6851 all_headers=
6852 all_lib2funcs=
6854 # Add the language fragments.
6855 # Languages are added via two mechanisms. Some information must be
6856 # recorded in makefile variables, these are defined in config-lang.in.
6857 # We accumulate them and plug them into the main Makefile.
6858 # The other mechanism is a set of hooks for each of the main targets
6859 # like `clean', `install', etc.
6861 language_fragments="Make-lang"
6862 language_hooks="Make-hooks"
6864 for s in .. $subdirs
6866 if test $s != ".."
6867 then
6868 language=
6869 boot_language=
6870 compilers=
6871 stagestuff=
6872 diff_excludes=
6873 headers=
6874 outputs=
6875 lib2funcs=
6876 . ${srcdir}/$s/config-lang.in
6877 if test "x$language" = x
6878 then
6879 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6880 exit 1
6882 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
6883 if test -f ${srcdir}/$s/Makefile.in
6884 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
6886 all_languages="$all_languages $language"
6887 if test "x$boot_language" = xyes
6888 then
6889 all_boot_languages="$all_boot_languages $language"
6891 all_compilers="$all_compilers $compilers"
6892 all_stagestuff="$all_stagestuff $stagestuff"
6893 all_diff_excludes="$all_diff_excludes $diff_excludes"
6894 all_headers="$all_headers $headers"
6895 all_outputs="$all_outputs $outputs"
6896 all_lib2funcs="$all_lib2funcs $lib2funcs"
6898 done
6900 # Since we can't use `::' targets, we link each language in
6901 # with a set of hooks, reached indirectly via lang.${target}.
6903 rm -f Make-hooks
6904 touch Make-hooks
6905 target_list="all.build all.cross start.encap rest.encap \
6906 info dvi \
6907 install-normal install-common install-info install-man \
6908 uninstall \
6909 mostlyclean clean distclean extraclean maintainer-clean \
6910 stage1 stage2 stage3 stage4"
6911 for t in $target_list
6914 for lang in .. $all_languages
6916 if test $lang != ".."; then
6917 x="$x $lang.$t"
6919 done
6920 echo "lang.$t: $x" >> Make-hooks
6921 done
6923 # If we're not building in srcdir, create .gdbinit.
6925 if test ! -f Makefile.in; then
6926 echo "dir ." > .gdbinit
6927 echo "dir ${srcdir}" >> .gdbinit
6928 if test x$gdb_needs_out_file_path = xyes
6929 then
6930 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6932 if test "x$subdirs" != x; then
6933 for s in $subdirs
6935 echo "dir ${srcdir}/$s" >> .gdbinit
6936 done
6938 echo "source ${srcdir}/.gdbinit" >> .gdbinit
6941 # Define variables host_canonical and build_canonical
6942 # because some Cygnus local changes in the Makefile depend on them.
6943 build_canonical=${build}
6944 host_canonical=${host}
6945 target_subdir=
6946 if test "${host}" != "${target}" ; then
6947 target_subdir=${target_alias}/
6953 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
6954 # absolute path for gcc_tooldir based on inserting the number of up-directory
6955 # movements required to get from $(exec_prefix) to $(prefix) into the basic
6956 # $(libsubdir)/@(unlibsubdir) based path.
6957 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
6958 # make and thus we'd get different behavior depending on where we built the
6959 # sources.
6960 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
6961 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
6962 else
6963 # An explanation of the sed strings:
6964 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
6965 # -e 's|/$||' match a trailing forward slash and eliminates it
6966 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
6967 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
6969 # (*) Note this pattern overwrites the first character of the string
6970 # with a forward slash if one is not already present. This is not a
6971 # problem because the exact names of the sub-directories concerned is
6972 # unimportant, just the number of them matters.
6974 # The practical upshot of these patterns is like this:
6976 # prefix exec_prefix result
6977 # ------ ----------- ------
6978 # /foo /foo/bar ../
6979 # /foo/ /foo/bar ../
6980 # /foo /foo/bar/ ../
6981 # /foo/ /foo/bar/ ../
6982 # /foo /foo/bar/ugg ../../
6984 dollar='$$'
6985 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
6990 # Find a directory in which to install a shared libgcc.
6992 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
6993 if test "${enable_version_specific_runtime_libs+set}" = set; then
6994 enableval="$enable_version_specific_runtime_libs"
6999 # Check whether --with-slibdir or --without-slibdir was given.
7000 if test "${with_slibdir+set}" = set; then
7001 withval="$with_slibdir"
7002 slibdir="$with_slibdir"
7003 else
7004 if test "${enable_version_specific_runtime_libs+set}" = set; then
7005 slibdir='$(libsubdir)'
7006 elif test "$host" != "$target"; then
7007 slibdir='$(build_tooldir)/lib'
7008 else
7009 slibdir='$(libdir)'
7015 # Nothing to do for FLOAT_H, float_format already handled.
7016 objdir=`pwd`
7019 # Process the language and host/target makefile fragments.
7020 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7022 # Substitute configuration variables
7091 # Echo that links are built
7092 if test x$host = x$target
7093 then
7094 str1="native "
7095 else
7096 str1="cross-"
7097 str2=" from $host"
7100 if test x$host != x$build
7101 then
7102 str3=" on a $build system"
7105 if test "x$str2" != x || test "x$str3" != x
7106 then
7107 str4=
7110 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7112 if test "x$str2" != x || test "x$str3" != x
7113 then
7114 echo " ${str2}${str3}." 1>&2
7117 # Truncate the target if necessary
7118 if test x$host_truncate_target != x; then
7119 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7122 # Configure the subdirectories
7123 # AC_CONFIG_SUBDIRS($subdirs)
7125 # Create the Makefile
7126 # and configure language subdirectories
7127 trap '' 1 2 15
7128 cat > confcache <<\EOF
7129 # This file is a shell script that caches the results of configure
7130 # tests run on this system so they can be shared between configure
7131 # scripts and configure runs. It is not useful on other systems.
7132 # If it contains results you don't want to keep, you may remove or edit it.
7134 # By default, configure uses ./config.cache as the cache file,
7135 # creating it if it does not exist already. You can give configure
7136 # the --cache-file=FILE option to use a different cache file; that is
7137 # what configure does when it calls configure scripts in
7138 # subdirectories, so they share the cache.
7139 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7140 # config.status only pays attention to the cache file if you give it the
7141 # --recheck option to rerun configure.
7144 # The following way of writing the cache mishandles newlines in values,
7145 # but we know of no workaround that is simple, portable, and efficient.
7146 # So, don't put newlines in cache variables' values.
7147 # Ultrix sh set writes to stderr and can't be redirected directly,
7148 # and sets the high bit in the cache file unless we assign to the vars.
7149 (set) 2>&1 |
7150 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7151 *ac_space=\ *)
7152 # `set' does not quote correctly, so add quotes (double-quote substitution
7153 # turns \\\\ into \\, and sed turns \\ into \).
7154 sed -n \
7155 -e "s/'/'\\\\''/g" \
7156 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7159 # `set' quotes correctly as required by POSIX, so do not add quotes.
7160 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7162 esac >> confcache
7163 if cmp -s $cache_file confcache; then
7165 else
7166 if test -w $cache_file; then
7167 echo "updating cache $cache_file"
7168 cat confcache > $cache_file
7169 else
7170 echo "not updating unwritable cache $cache_file"
7173 rm -f confcache
7175 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7177 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7178 # Let make expand exec_prefix.
7179 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7181 # Any assignment to VPATH causes Sun make to only execute
7182 # the first set of double-colon rules, so remove it if not needed.
7183 # If there is a colon in the path, we need to keep it.
7184 if test "x$srcdir" = x.; then
7185 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7188 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7190 DEFS=-DHAVE_CONFIG_H
7192 # Without the "./", some shells look in PATH for config.status.
7193 : ${CONFIG_STATUS=./config.status}
7195 echo creating $CONFIG_STATUS
7196 rm -f $CONFIG_STATUS
7197 cat > $CONFIG_STATUS <<EOF
7198 #! /bin/sh
7199 # Generated automatically by configure.
7200 # Run this file to recreate the current configuration.
7201 # This directory was configured as follows,
7202 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7204 # $0 $ac_configure_args
7206 # Compiler output produced by configure, useful for debugging
7207 # configure, is in ./config.log if it exists.
7209 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7210 for ac_option
7212 case "\$ac_option" in
7213 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7214 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7215 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7216 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7217 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7218 exit 0 ;;
7219 -help | --help | --hel | --he | --h)
7220 echo "\$ac_cs_usage"; exit 0 ;;
7221 *) echo "\$ac_cs_usage"; exit 1 ;;
7222 esac
7223 done
7225 ac_given_srcdir=$srcdir
7227 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7229 cat >> $CONFIG_STATUS <<EOF
7231 # Protect against being on the right side of a sed subst in config.status.
7232 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7233 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7234 $ac_vpsub
7235 $extrasub
7236 s%@SHELL@%$SHELL%g
7237 s%@CFLAGS@%$CFLAGS%g
7238 s%@CPPFLAGS@%$CPPFLAGS%g
7239 s%@CXXFLAGS@%$CXXFLAGS%g
7240 s%@FFLAGS@%$FFLAGS%g
7241 s%@DEFS@%$DEFS%g
7242 s%@LDFLAGS@%$LDFLAGS%g
7243 s%@LIBS@%$LIBS%g
7244 s%@exec_prefix@%$exec_prefix%g
7245 s%@prefix@%$prefix%g
7246 s%@program_transform_name@%$program_transform_name%g
7247 s%@bindir@%$bindir%g
7248 s%@sbindir@%$sbindir%g
7249 s%@libexecdir@%$libexecdir%g
7250 s%@datadir@%$datadir%g
7251 s%@sysconfdir@%$sysconfdir%g
7252 s%@sharedstatedir@%$sharedstatedir%g
7253 s%@localstatedir@%$localstatedir%g
7254 s%@libdir@%$libdir%g
7255 s%@includedir@%$includedir%g
7256 s%@oldincludedir@%$oldincludedir%g
7257 s%@infodir@%$infodir%g
7258 s%@mandir@%$mandir%g
7259 s%@enable_multilib@%$enable_multilib%g
7260 s%@enable_shared@%$enable_shared%g
7261 s%@host@%$host%g
7262 s%@host_alias@%$host_alias%g
7263 s%@host_cpu@%$host_cpu%g
7264 s%@host_vendor@%$host_vendor%g
7265 s%@host_os@%$host_os%g
7266 s%@target@%$target%g
7267 s%@target_alias@%$target_alias%g
7268 s%@target_cpu@%$target_cpu%g
7269 s%@target_vendor@%$target_vendor%g
7270 s%@target_os@%$target_os%g
7271 s%@build@%$build%g
7272 s%@build_alias@%$build_alias%g
7273 s%@build_cpu@%$build_cpu%g
7274 s%@build_vendor@%$build_vendor%g
7275 s%@build_os@%$build_os%g
7276 s%@CC@%$CC%g
7277 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
7278 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7279 s%@strict1_warn@%$strict1_warn%g
7280 s%@warn_cflags@%$warn_cflags%g
7281 s%@stage1_cflags@%$stage1_cflags%g
7282 s%@SET_MAKE@%$SET_MAKE%g
7283 s%@AWK@%$AWK%g
7284 s%@LN@%$LN%g
7285 s%@LN_S@%$LN_S%g
7286 s%@RANLIB@%$RANLIB%g
7287 s%@INSTALL@%$INSTALL%g
7288 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7289 s%@INSTALL_DATA@%$INSTALL_DATA%g
7290 s%@CPP@%$CPP%g
7291 s%@gnat@%$gnat%g
7292 s%@have_mktemp_command@%$have_mktemp_command%g
7293 s%@MAKEINFO@%$MAKEINFO%g
7294 s%@BUILD_INFO@%$BUILD_INFO%g
7295 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
7296 s%@FLEX@%$FLEX%g
7297 s%@BISON@%$BISON%g
7298 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
7299 s%@vfprintf@%$vfprintf%g
7300 s%@doprint@%$doprint%g
7301 s%@strstr@%$strstr%g
7302 s%@manext@%$manext%g
7303 s%@objext@%$objext%g
7304 s%@PACKAGE@%$PACKAGE%g
7305 s%@VERSION@%$VERSION%g
7306 s%@CHECK_PO@%$CHECK_PO%g
7307 s%@ALLOCA@%$ALLOCA%g
7308 s%@USE_NLS@%$USE_NLS%g
7309 s%@MSGFMT@%$MSGFMT%g
7310 s%@GMSGFMT@%$GMSGFMT%g
7311 s%@XGETTEXT@%$XGETTEXT%g
7312 s%@GENCAT@%$GENCAT%g
7313 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7314 s%@CATALOGS@%$CATALOGS%g
7315 s%@CATOBJEXT@%$CATOBJEXT%g
7316 s%@DATADIRNAME@%$DATADIRNAME%g
7317 s%@GMOFILES@%$GMOFILES%g
7318 s%@INSTOBJEXT@%$INSTOBJEXT%g
7319 s%@INTLDEPS@%$INTLDEPS%g
7320 s%@INTLLIBS@%$INTLLIBS%g
7321 s%@INTLOBJS@%$INTLOBJS%g
7322 s%@POFILES@%$POFILES%g
7323 s%@POSUB@%$POSUB%g
7324 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7325 s%@GT_NO@%$GT_NO%g
7326 s%@GT_YES@%$GT_YES%g
7327 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7328 s%@l@%$l%g
7329 s%@inhibit_libc@%$inhibit_libc%g
7330 s%@gthread_flags@%$gthread_flags%g
7331 s%@GGC@%$GGC%g
7332 s%@zlibdir@%$zlibdir%g
7333 s%@zlibinc@%$zlibinc%g
7334 s%@MAINT@%$MAINT%g
7335 s%@build_canonical@%$build_canonical%g
7336 s%@host_canonical@%$host_canonical%g
7337 s%@target_subdir@%$target_subdir%g
7338 s%@gcc_tooldir@%$gcc_tooldir%g
7339 s%@dollar@%$dollar%g
7340 s%@slibdir@%$slibdir%g
7341 s%@objdir@%$objdir%g
7342 s%@subdirs@%$subdirs%g
7343 s%@all_boot_languages@%$all_boot_languages%g
7344 s%@all_compilers@%$all_compilers%g
7345 s%@all_diff_excludes@%$all_diff_excludes%g
7346 s%@all_headers@%$all_headers%g
7347 s%@all_lang_makefiles@%$all_lang_makefiles%g
7348 s%@all_languages@%$all_languages%g
7349 s%@all_lib2funcs@%$all_lib2funcs%g
7350 s%@all_stagestuff@%$all_stagestuff%g
7351 s%@build_exeext@%$build_exeext%g
7352 s%@build_install_headers_dir@%$build_install_headers_dir%g
7353 s%@build_xm_file_list@%$build_xm_file_list%g
7354 s%@build_xm_file@%$build_xm_file%g
7355 s%@build_xm_defines@%$build_xm_defines%g
7356 s%@cc_set_by_configure@%$cc_set_by_configure%g
7357 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
7358 s%@cpp_install_dir@%$cpp_install_dir%g
7359 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7360 s%@dep_tmake_file@%$dep_tmake_file%g
7361 s%@extra_c_flags@%$extra_c_flags%g
7362 s%@extra_headers_list@%$extra_headers_list%g
7363 s%@extra_objs@%$extra_objs%g
7364 s%@extra_parts@%$extra_parts%g
7365 s%@extra_passes@%$extra_passes%g
7366 s%@extra_programs@%$extra_programs%g
7367 s%@float_h_file@%$float_h_file%g
7368 s%@gcc_config_arguments@%$gcc_config_arguments%g
7369 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
7370 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
7371 s%@gcc_version@%$gcc_version%g
7372 s%@gcc_version_full@%$gcc_version_full%g
7373 s%@gcc_version_trigger@%$gcc_version_trigger%g
7374 s%@host_exeext@%$host_exeext%g
7375 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
7376 s%@host_xm_file_list@%$host_xm_file_list%g
7377 s%@host_xm_file@%$host_xm_file%g
7378 s%@host_xm_defines@%$host_xm_defines%g
7379 s%@install@%$install%g
7380 s%@lang_options_files@%$lang_options_files%g
7381 s%@lang_specs_files@%$lang_specs_files%g
7382 s%@lang_tree_files@%$lang_tree_files%g
7383 s%@local_prefix@%$local_prefix%g
7384 s%@maybe_use_collect2@%$maybe_use_collect2%g
7385 s%@md_file@%$md_file%g
7386 s%@objc_boehm_gc@%$objc_boehm_gc%g
7387 s%@out_file@%$out_file%g
7388 s%@out_object_file@%$out_object_file%g
7389 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
7390 s%@symbolic_link@%$symbolic_link%g
7391 s%@thread_file@%$thread_file%g
7392 s%@tm_file_list@%$tm_file_list%g
7393 s%@tm_file@%$tm_file%g
7394 s%@tm_p_file_list@%$tm_p_file_list%g
7395 s%@tm_p_file@%$tm_p_file%g
7396 s%@xm_file@%$xm_file%g
7397 s%@will_use_collect2@%$will_use_collect2%g
7398 s%@c_target_objs@%$c_target_objs%g
7399 s%@cxx_target_objs@%$cxx_target_objs%g
7400 s%@target_cpu_default@%$target_cpu_default%g
7401 /@target_overrides@/r $target_overrides
7402 s%@target_overrides@%%g
7403 /@host_overrides@/r $host_overrides
7404 s%@host_overrides@%%g
7405 s%@cross_defines@%$cross_defines%g
7406 /@cross_overrides@/r $cross_overrides
7407 s%@cross_overrides@%%g
7408 /@build_overrides@/r $build_overrides
7409 s%@build_overrides@%%g
7410 /@language_fragments@/r $language_fragments
7411 s%@language_fragments@%%g
7412 /@language_hooks@/r $language_hooks
7413 s%@language_hooks@%%g
7415 CEOF
7418 cat >> $CONFIG_STATUS <<\EOF
7420 # Split the substitutions into bite-sized pieces for seds with
7421 # small command number limits, like on Digital OSF/1 and HP-UX.
7422 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7423 ac_file=1 # Number of current file.
7424 ac_beg=1 # First line for current file.
7425 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7426 ac_more_lines=:
7427 ac_sed_cmds=""
7428 while $ac_more_lines; do
7429 if test $ac_beg -gt 1; then
7430 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7431 else
7432 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7434 if test ! -s conftest.s$ac_file; then
7435 ac_more_lines=false
7436 rm -f conftest.s$ac_file
7437 else
7438 if test -z "$ac_sed_cmds"; then
7439 ac_sed_cmds="sed -f conftest.s$ac_file"
7440 else
7441 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7443 ac_file=`expr $ac_file + 1`
7444 ac_beg=$ac_end
7445 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7447 done
7448 if test -z "$ac_sed_cmds"; then
7449 ac_sed_cmds=cat
7453 cat >> $CONFIG_STATUS <<EOF
7455 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7457 cat >> $CONFIG_STATUS <<\EOF
7458 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7459 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7460 case "$ac_file" in
7461 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7462 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7463 *) ac_file_in="${ac_file}.in" ;;
7464 esac
7466 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7468 # Remove last slash and all that follows it. Not all systems have dirname.
7469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7471 # The file is in a subdirectory.
7472 test ! -d "$ac_dir" && mkdir "$ac_dir"
7473 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7474 # A "../" for each directory in $ac_dir_suffix.
7475 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7476 else
7477 ac_dir_suffix= ac_dots=
7480 case "$ac_given_srcdir" in
7481 .) srcdir=.
7482 if test -z "$ac_dots"; then top_srcdir=.
7483 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7484 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7485 *) # Relative path.
7486 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7487 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7488 esac
7491 echo creating "$ac_file"
7492 rm -f "$ac_file"
7493 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7494 case "$ac_file" in
7495 *Makefile*) ac_comsub="1i\\
7496 # $configure_input" ;;
7497 *) ac_comsub= ;;
7498 esac
7500 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7501 sed -e "$ac_comsub
7502 s%@configure_input@%$configure_input%g
7503 s%@srcdir@%$srcdir%g
7504 s%@top_srcdir@%$top_srcdir%g
7505 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7506 fi; done
7507 rm -f conftest.s*
7509 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7510 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7512 # ac_d sets the value in "#define NAME VALUE" lines.
7513 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7514 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7515 ac_dC='\3'
7516 ac_dD='%g'
7517 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7518 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7519 ac_uB='\([ ]\)%\1#\2define\3'
7520 ac_uC=' '
7521 ac_uD='\4%g'
7522 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7523 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7524 ac_eB='$%\1#\2define\3'
7525 ac_eC=' '
7526 ac_eD='%g'
7528 if test "${CONFIG_HEADERS+set}" != set; then
7530 cat >> $CONFIG_STATUS <<EOF
7531 CONFIG_HEADERS="auto-host.h:config.in"
7533 cat >> $CONFIG_STATUS <<\EOF
7535 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7536 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7537 case "$ac_file" in
7538 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7539 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7540 *) ac_file_in="${ac_file}.in" ;;
7541 esac
7543 echo creating $ac_file
7545 rm -f conftest.frag conftest.in conftest.out
7546 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7547 cat $ac_file_inputs > conftest.in
7551 # Transform confdefs.h into a sed script conftest.vals that substitutes
7552 # the proper values into config.h.in to produce config.h. And first:
7553 # Protect against being on the right side of a sed subst in config.status.
7554 # Protect against being in an unquoted here document in config.status.
7555 rm -f conftest.vals
7556 cat > conftest.hdr <<\EOF
7557 s/[\\&%]/\\&/g
7558 s%[\\$`]%\\&%g
7559 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7560 s%ac_d%ac_u%gp
7561 s%ac_u%ac_e%gp
7563 sed -n -f conftest.hdr confdefs.h > conftest.vals
7564 rm -f conftest.hdr
7566 # This sed command replaces #undef with comments. This is necessary, for
7567 # example, in the case of _POSIX_SOURCE, which is predefined and required
7568 # on some systems where configure will not decide to define it.
7569 cat >> conftest.vals <<\EOF
7570 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7573 # Break up conftest.vals because some shells have a limit on
7574 # the size of here documents, and old seds have small limits too.
7576 rm -f conftest.tail
7577 while :
7579 ac_lines=`grep -c . conftest.vals`
7580 # grep -c gives empty output for an empty file on some AIX systems.
7581 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7582 # Write a limited-size here document to conftest.frag.
7583 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7584 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7585 echo 'CEOF
7586 sed -f conftest.frag conftest.in > conftest.out
7587 rm -f conftest.in
7588 mv conftest.out conftest.in
7589 ' >> $CONFIG_STATUS
7590 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7591 rm -f conftest.vals
7592 mv conftest.tail conftest.vals
7593 done
7594 rm -f conftest.vals
7596 cat >> $CONFIG_STATUS <<\EOF
7597 rm -f conftest.frag conftest.h
7598 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7599 cat conftest.in >> conftest.h
7600 rm -f conftest.in
7601 if cmp -s $ac_file conftest.h 2>/dev/null; then
7602 echo "$ac_file is unchanged"
7603 rm -f conftest.h
7604 else
7605 # Remove last slash and all that follows it. Not all systems have dirname.
7606 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7607 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7608 # The file is in a subdirectory.
7609 test ! -d "$ac_dir" && mkdir "$ac_dir"
7611 rm -f $ac_file
7612 mv conftest.h $ac_file
7614 fi; done
7618 cat >> $CONFIG_STATUS <<EOF
7619 ac_sources="$nls_cv_header_libgt"
7620 ac_dests="$nls_cv_header_intl"
7623 cat >> $CONFIG_STATUS <<\EOF
7624 srcdir=$ac_given_srcdir
7625 while test -n "$ac_sources"; do
7626 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7627 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7629 echo "linking $srcdir/$ac_source to $ac_dest"
7631 if test ! -r $srcdir/$ac_source; then
7632 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7634 rm -f $ac_dest
7636 # Make relative symlinks.
7637 # Remove last slash and all that follows it. Not all systems have dirname.
7638 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7639 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7640 # The dest file is in a subdirectory.
7641 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7642 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7643 # A "../" for each directory in $ac_dest_dir_suffix.
7644 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7645 else
7646 ac_dest_dir_suffix= ac_dots=
7649 case "$srcdir" in
7650 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7651 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7652 esac
7654 # Make a symlink if possible; otherwise try a hard link.
7655 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7656 ln $srcdir/$ac_source $ac_dest; then :
7657 else
7658 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7660 done
7662 cat >> $CONFIG_STATUS <<EOF
7665 host='${host}'
7666 build='${build}'
7667 target='${target}'
7668 target_alias='${target_alias}'
7669 srcdir='${srcdir}'
7670 subdirs='${subdirs}'
7671 symbolic_link='${symbolic_link}'
7672 program_transform_set='${program_transform_set}'
7673 program_transform_name='${program_transform_name}'
7674 dep_host_xmake_file='${dep_host_xmake_file}'
7675 host_xmake_file='${host_xmake_file}'
7676 dep_tmake_file='${dep_tmake_file}'
7677 tmake_file='${tmake_file}'
7678 thread_file='${thread_file}'
7679 gcc_config_arguments='${gcc_config_arguments}'
7680 gcc_version='${gcc_version}'
7681 gcc_version_full='${gcc_version_full}'
7682 gcc_version_trigger='${gcc_version_trigger}'
7683 local_prefix='${local_prefix}'
7684 build_install_headers_dir='${build_install_headers_dir}'
7685 build_exeext='${build_exeext}'
7686 host_exeext='${host_exeext}'
7687 out_file='${out_file}'
7688 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7689 SET_MAKE='${SET_MAKE}'
7690 target_list='${target_list}'
7691 target_overrides='${target_overrides}'
7692 host_overrides='${host_overrides}'
7693 cross_defines='${cross_defines}'
7694 cross_overrides='${cross_overrides}'
7695 build_overrides='${build_overrides}'
7696 cpp_install_dir='${cpp_install_dir}'
7699 cat >> $CONFIG_STATUS <<\EOF
7700 case "$CONFIG_FILES" in *po/Makefile.in*)
7701 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7702 esac
7704 case x$CONFIG_HEADERS in
7705 xauto-host.h:config.in)
7706 echo > cstamp-h ;;
7707 esac
7708 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
7709 # bootstrapping and the installation procedure can still use
7710 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
7711 # FLAGS_TO_PASS has been modified to solve the problem there.
7712 # This is virtually a duplicate of what happens in configure.lang; we do
7713 # an extra check to make sure this only happens if ln -s can be used.
7714 if test "$symbolic_link" = "ln -s"; then
7715 for d in .. ${subdirs} ; do
7716 if test $d != ..; then
7717 STARTDIR=`pwd`
7718 cd $d
7719 for t in stage1 stage2 stage3 stage4 include
7721 rm -f $t
7722 $symbolic_link ../$t $t 2>/dev/null
7723 done
7724 cd $STARTDIR
7726 done
7727 else true ; fi
7728 # Avoid having to add intl to our include paths.
7729 if test -f intl/libintl.h; then
7730 echo creating libintl.h
7731 echo '#include "intl/libintl.h"' >libintl.h
7734 exit 0
7736 chmod +x $CONFIG_STATUS
7737 rm -fr confdefs* $ac_clean_files
7738 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1