* expr.c (store_field): Don't set MEM_ALIAS_SET for a field
[official-gcc.git] / gcc / configure
blob963f5a1db0e7b886d327ab3b43440e73eb066092
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 srcdir=
109 target=NONE
110 verbose=
111 x_includes=NONE
112 x_libraries=NONE
113 bindir='${exec_prefix}/bin'
114 sbindir='${exec_prefix}/sbin'
115 libexecdir='${exec_prefix}/libexec'
116 datadir='${prefix}/share'
117 sysconfdir='${prefix}/etc'
118 sharedstatedir='${prefix}/com'
119 localstatedir='${prefix}/var'
120 libdir='${exec_prefix}/lib'
121 includedir='${prefix}/include'
122 oldincludedir='/usr/include'
123 infodir='${prefix}/info'
124 mandir='${prefix}/man'
126 # Initialize some other variables.
127 subdirs=
128 MFLAGS= MAKEFLAGS=
129 SHELL=${CONFIG_SHELL-/bin/sh}
130 # Maximum number of lines to put in a shell here document.
131 ac_max_here_lines=12
133 ac_prev=
134 for ac_option
137 # If the previous option needs an argument, assign it.
138 if test -n "$ac_prev"; then
139 eval "$ac_prev=\$ac_option"
140 ac_prev=
141 continue
144 case "$ac_option" in
145 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
146 *) ac_optarg= ;;
147 esac
149 # Accept the important Cygnus configure options, so we can diagnose typos.
151 case "$ac_option" in
153 -bindir | --bindir | --bindi | --bind | --bin | --bi)
154 ac_prev=bindir ;;
155 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
156 bindir="$ac_optarg" ;;
158 -build | --build | --buil | --bui | --bu)
159 ac_prev=build ;;
160 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
161 build="$ac_optarg" ;;
163 -cache-file | --cache-file | --cache-fil | --cache-fi \
164 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
165 ac_prev=cache_file ;;
166 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
167 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
168 cache_file="$ac_optarg" ;;
170 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
171 ac_prev=datadir ;;
172 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
173 | --da=*)
174 datadir="$ac_optarg" ;;
176 -disable-* | --disable-*)
177 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
178 # Reject names that are not valid shell variable names.
179 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
180 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
182 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183 eval "enable_${ac_feature}=no" ;;
185 -enable-* | --enable-*)
186 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
187 # Reject names that are not valid shell variable names.
188 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
189 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
191 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
192 case "$ac_option" in
193 *=*) ;;
194 *) ac_optarg=yes ;;
195 esac
196 eval "enable_${ac_feature}='$ac_optarg'" ;;
198 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
199 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
200 | --exec | --exe | --ex)
201 ac_prev=exec_prefix ;;
202 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
203 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
204 | --exec=* | --exe=* | --ex=*)
205 exec_prefix="$ac_optarg" ;;
207 -gas | --gas | --ga | --g)
208 # Obsolete; use --with-gas.
209 with_gas=yes ;;
211 -help | --help | --hel | --he)
212 # Omit some internal or obsolete options to make the list less imposing.
213 # This message is too long to be a string in the A/UX 3.1 sh.
214 cat << EOF
215 Usage: configure [options] [host]
216 Options: [defaults in brackets after descriptions]
217 Configuration:
218 --cache-file=FILE cache test results in FILE
219 --help print this message
220 --no-create do not create output files
221 --quiet, --silent do not print \`checking...' messages
222 --version print the version of autoconf that created configure
223 Directory and file names:
224 --prefix=PREFIX install architecture-independent files in PREFIX
225 [$ac_default_prefix]
226 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
227 [same as prefix]
228 --bindir=DIR user executables in DIR [EPREFIX/bin]
229 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
230 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
231 --datadir=DIR read-only architecture-independent data in DIR
232 [PREFIX/share]
233 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
234 --sharedstatedir=DIR modifiable architecture-independent data in DIR
235 [PREFIX/com]
236 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
237 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
238 --includedir=DIR C header files in DIR [PREFIX/include]
239 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
240 --infodir=DIR info documentation in DIR [PREFIX/info]
241 --mandir=DIR man documentation in DIR [PREFIX/man]
242 --srcdir=DIR find the sources in DIR [configure dir or ..]
243 --program-prefix=PREFIX prepend PREFIX to installed program names
244 --program-suffix=SUFFIX append SUFFIX to installed program names
245 --program-transform-name=PROGRAM
246 run sed PROGRAM on installed program names
248 cat << EOF
249 Host type:
250 --build=BUILD configure for building on BUILD [BUILD=HOST]
251 --host=HOST configure for HOST [guessed]
252 --target=TARGET configure for TARGET [TARGET=HOST]
253 Features and packages:
254 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
255 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
256 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
257 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
258 --x-includes=DIR X include files are in DIR
259 --x-libraries=DIR X library files are in DIR
261 if test -n "$ac_help"; then
262 echo "--enable and --with options recognized:$ac_help"
264 exit 0 ;;
266 -host | --host | --hos | --ho)
267 ac_prev=host ;;
268 -host=* | --host=* | --hos=* | --ho=*)
269 host="$ac_optarg" ;;
271 -includedir | --includedir | --includedi | --included | --include \
272 | --includ | --inclu | --incl | --inc)
273 ac_prev=includedir ;;
274 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
275 | --includ=* | --inclu=* | --incl=* | --inc=*)
276 includedir="$ac_optarg" ;;
278 -infodir | --infodir | --infodi | --infod | --info | --inf)
279 ac_prev=infodir ;;
280 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
281 infodir="$ac_optarg" ;;
283 -libdir | --libdir | --libdi | --libd)
284 ac_prev=libdir ;;
285 -libdir=* | --libdir=* | --libdi=* | --libd=*)
286 libdir="$ac_optarg" ;;
288 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
289 | --libexe | --libex | --libe)
290 ac_prev=libexecdir ;;
291 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
292 | --libexe=* | --libex=* | --libe=*)
293 libexecdir="$ac_optarg" ;;
295 -localstatedir | --localstatedir | --localstatedi | --localstated \
296 | --localstate | --localstat | --localsta | --localst \
297 | --locals | --local | --loca | --loc | --lo)
298 ac_prev=localstatedir ;;
299 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
300 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
301 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
302 localstatedir="$ac_optarg" ;;
304 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
305 ac_prev=mandir ;;
306 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
307 mandir="$ac_optarg" ;;
309 -nfp | --nfp | --nf)
310 # Obsolete; use --without-fp.
311 with_fp=no ;;
313 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314 | --no-cr | --no-c)
315 no_create=yes ;;
317 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
318 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
319 no_recursion=yes ;;
321 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
322 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
323 | --oldin | --oldi | --old | --ol | --o)
324 ac_prev=oldincludedir ;;
325 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
326 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
327 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
328 oldincludedir="$ac_optarg" ;;
330 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
331 ac_prev=prefix ;;
332 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
333 prefix="$ac_optarg" ;;
335 -program-prefix | --program-prefix | --program-prefi | --program-pref \
336 | --program-pre | --program-pr | --program-p)
337 ac_prev=program_prefix ;;
338 -program-prefix=* | --program-prefix=* | --program-prefi=* \
339 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
340 program_prefix="$ac_optarg" ;;
342 -program-suffix | --program-suffix | --program-suffi | --program-suff \
343 | --program-suf | --program-su | --program-s)
344 ac_prev=program_suffix ;;
345 -program-suffix=* | --program-suffix=* | --program-suffi=* \
346 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
347 program_suffix="$ac_optarg" ;;
349 -program-transform-name | --program-transform-name \
350 | --program-transform-nam | --program-transform-na \
351 | --program-transform-n | --program-transform- \
352 | --program-transform | --program-transfor \
353 | --program-transfo | --program-transf \
354 | --program-trans | --program-tran \
355 | --progr-tra | --program-tr | --program-t)
356 ac_prev=program_transform_name ;;
357 -program-transform-name=* | --program-transform-name=* \
358 | --program-transform-nam=* | --program-transform-na=* \
359 | --program-transform-n=* | --program-transform-=* \
360 | --program-transform=* | --program-transfor=* \
361 | --program-transfo=* | --program-transf=* \
362 | --program-trans=* | --program-tran=* \
363 | --progr-tra=* | --program-tr=* | --program-t=*)
364 program_transform_name="$ac_optarg" ;;
366 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
367 | -silent | --silent | --silen | --sile | --sil)
368 silent=yes ;;
370 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
371 ac_prev=sbindir ;;
372 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
373 | --sbi=* | --sb=*)
374 sbindir="$ac_optarg" ;;
376 -sharedstatedir | --sharedstatedir | --sharedstatedi \
377 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
378 | --sharedst | --shareds | --shared | --share | --shar \
379 | --sha | --sh)
380 ac_prev=sharedstatedir ;;
381 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
382 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
383 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
384 | --sha=* | --sh=*)
385 sharedstatedir="$ac_optarg" ;;
387 -site | --site | --sit)
388 ac_prev=site ;;
389 -site=* | --site=* | --sit=*)
390 site="$ac_optarg" ;;
392 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
393 ac_prev=srcdir ;;
394 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
395 srcdir="$ac_optarg" ;;
397 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
398 | --syscon | --sysco | --sysc | --sys | --sy)
399 ac_prev=sysconfdir ;;
400 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
401 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
402 sysconfdir="$ac_optarg" ;;
404 -target | --target | --targe | --targ | --tar | --ta | --t)
405 ac_prev=target ;;
406 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
407 target="$ac_optarg" ;;
409 -v | -verbose | --verbose | --verbos | --verbo | --verb)
410 verbose=yes ;;
412 -version | --version | --versio | --versi | --vers)
413 echo "configure generated by autoconf version 2.13"
414 exit 0 ;;
416 -with-* | --with-*)
417 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
418 # Reject names that are not valid shell variable names.
419 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
420 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422 ac_package=`echo $ac_package| sed 's/-/_/g'`
423 case "$ac_option" in
424 *=*) ;;
425 *) ac_optarg=yes ;;
426 esac
427 eval "with_${ac_package}='$ac_optarg'" ;;
429 -without-* | --without-*)
430 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
431 # Reject names that are not valid shell variable names.
432 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
433 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
435 ac_package=`echo $ac_package| sed 's/-/_/g'`
436 eval "with_${ac_package}=no" ;;
438 --x)
439 # Obsolete; use --with-x.
440 with_x=yes ;;
442 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
443 | --x-incl | --x-inc | --x-in | --x-i)
444 ac_prev=x_includes ;;
445 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
446 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
447 x_includes="$ac_optarg" ;;
449 -x-libraries | --x-libraries | --x-librarie | --x-librari \
450 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
451 ac_prev=x_libraries ;;
452 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
453 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
454 x_libraries="$ac_optarg" ;;
456 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
460 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
461 echo "configure: warning: $ac_option: invalid host type" 1>&2
463 if test "x$nonopt" != xNONE; then
464 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
466 nonopt="$ac_option"
469 esac
470 done
472 if test -n "$ac_prev"; then
473 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
476 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
478 # File descriptor usage:
479 # 0 standard input
480 # 1 file creation
481 # 2 errors and warnings
482 # 3 some systems may open it to /dev/tty
483 # 4 used on the Kubota Titan
484 # 6 checking for... messages and results
485 # 5 compiler messages saved in config.log
486 if test "$silent" = yes; then
487 exec 6>/dev/null
488 else
489 exec 6>&1
491 exec 5>./config.log
493 echo "\
494 This file contains any messages produced by compilers while
495 running configure, to aid debugging if configure makes a mistake.
496 " 1>&5
498 # Strip out --no-create and --no-recursion so they do not pile up.
499 # Also quote any args containing shell metacharacters.
500 ac_configure_args=
501 for ac_arg
503 case "$ac_arg" in
504 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
505 | --no-cr | --no-c) ;;
506 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
507 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
508 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
509 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
510 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
511 esac
512 done
514 # NLS nuisances.
515 # Only set these to C if already set. These must not be set unconditionally
516 # because not all systems understand e.g. LANG=C (notably SCO).
517 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
518 # Non-C LC_CTYPE values break the ctype check.
519 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
520 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
521 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
522 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
524 # confdefs.h avoids OS command line length limits that DEFS can exceed.
525 rm -rf conftest* confdefs.h
526 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
527 echo > confdefs.h
529 # A filename unique to this package, relative to the directory that
530 # configure is in, which we can look for to find out if srcdir is correct.
531 ac_unique_file=tree.c
533 # Find the source files, if location was not specified.
534 if test -z "$srcdir"; then
535 ac_srcdir_defaulted=yes
536 # Try the directory containing this script, then its parent.
537 ac_prog=$0
538 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
539 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
540 srcdir=$ac_confdir
541 if test ! -r $srcdir/$ac_unique_file; then
542 srcdir=..
544 else
545 ac_srcdir_defaulted=no
547 if test ! -r $srcdir/$ac_unique_file; then
548 if test "$ac_srcdir_defaulted" = yes; then
549 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
550 else
551 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
554 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
556 # Prefer explicitly selected file to automatically selected ones.
557 if test -z "$CONFIG_SITE"; then
558 if test "x$prefix" != xNONE; then
559 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
560 else
561 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
564 for ac_site_file in $CONFIG_SITE; do
565 if test -r "$ac_site_file"; then
566 echo "loading site script $ac_site_file"
567 . "$ac_site_file"
569 done
571 if test -r "$cache_file"; then
572 echo "loading cache $cache_file"
573 . $cache_file
574 else
575 echo "creating cache $cache_file"
576 > $cache_file
579 ac_ext=c
580 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
581 ac_cpp='$CPP $CPPFLAGS'
582 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
583 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
584 cross_compiling=$ac_cv_prog_cc_cross
586 ac_exeext=
587 ac_objext=o
588 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
589 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
590 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
591 ac_n= ac_c='
592 ' ac_t=' '
593 else
594 ac_n=-n ac_c= ac_t=
596 else
597 ac_n= ac_c='\c' ac_t=
603 remove=rm
604 hard_link=ln
605 symbolic_link='ln -s'
606 copy=cp
608 # Check for bogus environment variables.
609 # Test if LIBRARY_PATH contains the notation for the current directory
610 # since this would lead to problems installing/building glibc.
611 # LIBRARY_PATH contains the current directory if one of the following
612 # is true:
613 # - one of the terminals (":" and ";") is the first or last sign
614 # - two terminals occur directly after each other
615 # - the path contains an element with a dot in it
616 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
617 echo "configure:618: checking LIBRARY_PATH variable" >&5
618 case ${LIBRARY_PATH} in
619 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
620 library_path_setting="contains current directory"
623 library_path_setting="ok"
625 esac
626 echo "$ac_t""$library_path_setting" 1>&6
627 if test "$library_path_setting" != "ok"; then
628 { echo "configure: error:
629 *** LIBRARY_PATH shouldn't contain the current directory when
630 *** building gcc. Please change the environment variable
631 *** and run configure again." 1>&2; exit 1; }
634 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
635 # since this would lead to problems installing/building glibc.
636 # GCC_EXEC_PREFIX contains the current directory if one of the following
637 # is true:
638 # - one of the terminals (":" and ";") is the first or last sign
639 # - two terminals occur directly after each other
640 # - the path contains an element with a dot in it
641 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
642 echo "configure:643: checking GCC_EXEC_PREFIX variable" >&5
643 case ${GCC_EXEC_PREFIX} in
644 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
645 gcc_exec_prefix_setting="contains current directory"
648 gcc_exec_prefix_setting="ok"
650 esac
651 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
652 if test "$gcc_exec_prefix_setting" != "ok"; then
653 { echo "configure: error:
654 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
655 *** building gcc. Please change the environment variable
656 *** and run configure again." 1>&2; exit 1; }
659 # Check for additional parameters
661 # With GNU ld
662 # Check whether --with-gnu-ld or --without-gnu-ld was given.
663 if test "${with_gnu_ld+set}" = set; then
664 withval="$with_gnu_ld"
665 gnu_ld_flag="$with_gnu_ld"
666 else
667 gnu_ld_flag=no
671 # With pre-defined ld
672 # Check whether --with-ld or --without-ld was given.
673 if test "${with_ld+set}" = set; then
674 withval="$with_ld"
675 DEFAULT_LINKER="$with_ld"
678 if test x"${DEFAULT_LINKER+set}" = x"set"; then
679 if test ! -x "$DEFAULT_LINKER"; then
680 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
681 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
682 gnu_ld_flag=yes
684 cat >> confdefs.h <<EOF
685 #define DEFAULT_LINKER "$DEFAULT_LINKER"
690 # With GNU as
691 # Check whether --with-gnu-as or --without-gnu-as was given.
692 if test "${with_gnu_as+set}" = set; then
693 withval="$with_gnu_as"
694 gas_flag="$with_gnu_as"
695 else
696 gas_flag=no
700 # Check whether --with-as or --without-as was given.
701 if test "${with_as+set}" = set; then
702 withval="$with_as"
703 DEFAULT_ASSEMBLER="$with_as"
706 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
707 if test ! -x "$DEFAULT_ASSEMBLER"; then
708 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
709 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
710 gas_flag=yes
712 cat >> confdefs.h <<EOF
713 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
718 # With stabs
719 # Check whether --with-stabs or --without-stabs was given.
720 if test "${with_stabs+set}" = set; then
721 withval="$with_stabs"
722 stabs="$with_stabs"
723 else
724 stabs=no
728 # With ELF
729 # Check whether --with-elf or --without-elf was given.
730 if test "${with_elf+set}" = set; then
731 withval="$with_elf"
732 elf="$with_elf"
733 else
734 elf=no
738 # Specify the local prefix
739 local_prefix=
740 # Check whether --with-local-prefix or --without-local-prefix was given.
741 if test "${with_local_prefix+set}" = set; then
742 withval="$with_local_prefix"
743 case "${withval}" in
744 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
745 no) ;;
746 *) local_prefix=$with_local_prefix ;;
747 esac
751 # Default local prefix if it is empty
752 if test x$local_prefix = x; then
753 local_prefix=/usr/local
756 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
757 # passed in by the toplevel make and thus we'd get different behavior
758 # depending on where we built the sources.
759 gcc_gxx_include_dir=
760 # Specify the g++ header file directory
761 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
762 if test "${with_gxx_include_dir+set}" = set; then
763 withval="$with_gxx_include_dir"
764 case "${withval}" in
765 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
766 no) ;;
767 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
768 esac
772 if test x${gcc_gxx_include_dir} = x; then
773 if test x${enable_version_specific_runtime_libs} = xyes; then
774 gcc_gxx_include_dir='${libsubdir}/include/g++'
775 else
776 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
777 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
781 # Determine whether or not multilibs are enabled.
782 # Check whether --enable-multilib or --disable-multilib was given.
783 if test "${enable_multilib+set}" = set; then
784 enableval="$enable_multilib"
786 else
787 enable_multilib=yes
792 # Enable expensive internal checks
793 # Check whether --enable-checking or --disable-checking was given.
794 if test "${enable_checking+set}" = set; then
795 enableval="$enable_checking"
796 ac_checking=
797 ac_tree_checking=
798 ac_rtl_checking=
799 ac_gc_checking=
800 ac_gc_always_collect=
801 case "${enableval}" in
802 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
803 no) ;;
804 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
805 set fnord $enableval; shift
806 IFS="$ac_save_IFS"
807 for check
809 case $check in
810 misc) ac_checking=1 ;;
811 tree) ac_tree_checking=1 ;;
812 rtl) ac_rtl_checking=1 ;;
813 gc) ac_gc_checking=1 ;;
814 gcac) ac_gc_always_collect=1 ;;
815 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
816 esac
817 done
819 esac
823 if test x$ac_checking != x ; then
824 cat >> confdefs.h <<\EOF
825 #define ENABLE_CHECKING 1
829 if test x$ac_tree_checking != x ; then
830 cat >> confdefs.h <<\EOF
831 #define ENABLE_TREE_CHECKING 1
835 if test x$ac_rtl_checking != x ; then
836 cat >> confdefs.h <<\EOF
837 #define ENABLE_RTL_CHECKING 1
841 if test x$ac_gc_checking != x ; then
842 cat >> confdefs.h <<\EOF
843 #define ENABLE_GC_CHECKING 1
847 if test x$ac_gc_always_collect != x ; then
848 cat >> confdefs.h <<\EOF
849 #define ENABLE_GC_ALWAYS_COLLECT 1
855 # Check whether --enable-cpp or --disable-cpp was given.
856 if test "${enable_cpp+set}" = set; then
857 enableval="$enable_cpp"
859 else
860 enable_cpp=yes
864 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
865 if test "${with_cpp_install_dir+set}" = set; then
866 withval="$with_cpp_install_dir"
867 if test x$withval = xyes; then
868 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
869 elif test x$withval != xno; then
870 cpp_install_dir=$withval
875 # Enable Multibyte Characters for C/C++
876 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
877 if test "${enable_c_mbchar+set}" = set; then
878 enableval="$enable_c_mbchar"
879 if test x$enable_c_mbchar != xno; then
880 cat >> confdefs.h <<\EOF
881 #define MULTIBYTE_CHARS 1
888 # Enable threads
889 # Pass with no value to take the default
890 # Pass with a value to specify a thread package
891 # Check whether --enable-threads or --disable-threads was given.
892 if test "${enable_threads+set}" = set; then
893 enableval="$enable_threads"
895 else
896 enable_threads=''
900 enable_threads_flag=$enable_threads
901 # Check if a valid thread package
902 case x${enable_threads_flag} in
903 x | xno)
904 # No threads
905 target_thread_file='single'
907 xyes)
908 # default
909 target_thread_file=''
911 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
912 xsolaris | xwin32 | xdce | xvxworks | xaix)
913 target_thread_file=$enable_threads_flag
916 echo "$enable_threads is an unknown thread package" 1>&2
917 exit 1
919 esac
921 # Check whether --enable-objc-gc or --disable-objc-gc was given.
922 if test "${enable_objc_gc+set}" = set; then
923 enableval="$enable_objc_gc"
924 if test x$enable_objc_gc = xno; then
925 objc_boehm_gc=''
926 else
927 objc_boehm_gc=1
929 else
930 objc_boehm_gc=''
934 # Check whether --with-dwarf2 or --without-dwarf2 was given.
935 if test "${with_dwarf2+set}" = set; then
936 withval="$with_dwarf2"
937 dwarf2="$with_dwarf2"
938 else
939 dwarf2=no
943 # Check whether --enable-shared or --disable-shared was given.
944 if test "${enable_shared+set}" = set; then
945 enableval="$enable_shared"
947 case $enable_shared in
948 yes | no) ;;
950 enable_shared=no
951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
952 for pkg in $enableval; do
953 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
954 enable_shared=yes
956 done
957 IFS="$ac_save_ifs"
959 esac
961 else
962 enable_shared=yes
967 # Determine the host, build, and target systems
968 ac_aux_dir=
969 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
970 if test -f $ac_dir/install-sh; then
971 ac_aux_dir=$ac_dir
972 ac_install_sh="$ac_aux_dir/install-sh -c"
973 break
974 elif test -f $ac_dir/install.sh; then
975 ac_aux_dir=$ac_dir
976 ac_install_sh="$ac_aux_dir/install.sh -c"
977 break
979 done
980 if test -z "$ac_aux_dir"; then
981 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
983 ac_config_guess=$ac_aux_dir/config.guess
984 ac_config_sub=$ac_aux_dir/config.sub
985 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
988 # Do some error checking and defaulting for the host and target type.
989 # The inputs are:
990 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
992 # The rules are:
993 # 1. You are not allowed to specify --host, --target, and nonopt at the
994 # same time.
995 # 2. Host defaults to nonopt.
996 # 3. If nonopt is not specified, then host defaults to the current host,
997 # as determined by config.guess.
998 # 4. Target and build default to nonopt.
999 # 5. If nonopt is not specified, then target and build default to host.
1001 # The aliases save the names the user supplied, while $host etc.
1002 # will get canonicalized.
1003 case $host---$target---$nonopt in
1004 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1005 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1006 esac
1009 # Make sure we can run config.sub.
1010 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1011 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1014 echo $ac_n "checking host system type""... $ac_c" 1>&6
1015 echo "configure:1016: checking host system type" >&5
1017 host_alias=$host
1018 case "$host_alias" in
1019 NONE)
1020 case $nonopt in
1021 NONE)
1022 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1023 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1024 fi ;;
1025 *) host_alias=$nonopt ;;
1026 esac ;;
1027 esac
1029 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1030 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1031 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1032 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1033 echo "$ac_t""$host" 1>&6
1035 echo $ac_n "checking target system type""... $ac_c" 1>&6
1036 echo "configure:1037: checking target system type" >&5
1038 target_alias=$target
1039 case "$target_alias" in
1040 NONE)
1041 case $nonopt in
1042 NONE) target_alias=$host_alias ;;
1043 *) target_alias=$nonopt ;;
1044 esac ;;
1045 esac
1047 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1048 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1049 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1050 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1051 echo "$ac_t""$target" 1>&6
1053 echo $ac_n "checking build system type""... $ac_c" 1>&6
1054 echo "configure:1055: checking build system type" >&5
1056 build_alias=$build
1057 case "$build_alias" in
1058 NONE)
1059 case $nonopt in
1060 NONE) build_alias=$host_alias ;;
1061 *) build_alias=$nonopt ;;
1062 esac ;;
1063 esac
1065 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1066 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1067 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1068 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1069 echo "$ac_t""$build" 1>&6
1071 test "$host_alias" != "$target_alias" &&
1072 test "$program_prefix$program_suffix$program_transform_name" = \
1073 NONENONEs,x,x, &&
1074 program_prefix=${target_alias}-
1077 # Find the native compiler
1078 # Extract the first word of "gcc", so it can be a program name with args.
1079 set dummy gcc; ac_word=$2
1080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1081 echo "configure:1082: checking for $ac_word" >&5
1082 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085 if test -n "$CC"; then
1086 ac_cv_prog_CC="$CC" # Let the user override the test.
1087 else
1088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1089 ac_dummy="$PATH"
1090 for ac_dir in $ac_dummy; do
1091 test -z "$ac_dir" && ac_dir=.
1092 if test -f $ac_dir/$ac_word; then
1093 ac_cv_prog_CC="gcc"
1094 break
1096 done
1097 IFS="$ac_save_ifs"
1100 CC="$ac_cv_prog_CC"
1101 if test -n "$CC"; then
1102 echo "$ac_t""$CC" 1>&6
1103 else
1104 echo "$ac_t""no" 1>&6
1107 if test -z "$CC"; then
1108 # Extract the first word of "cc", so it can be a program name with args.
1109 set dummy cc; ac_word=$2
1110 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1111 echo "configure:1112: checking for $ac_word" >&5
1112 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
1114 else
1115 if test -n "$CC"; then
1116 ac_cv_prog_CC="$CC" # Let the user override the test.
1117 else
1118 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1119 ac_prog_rejected=no
1120 ac_dummy="$PATH"
1121 for ac_dir in $ac_dummy; do
1122 test -z "$ac_dir" && ac_dir=.
1123 if test -f $ac_dir/$ac_word; then
1124 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1125 ac_prog_rejected=yes
1126 continue
1128 ac_cv_prog_CC="cc"
1129 break
1131 done
1132 IFS="$ac_save_ifs"
1133 if test $ac_prog_rejected = yes; then
1134 # We found a bogon in the path, so make sure we never use it.
1135 set dummy $ac_cv_prog_CC
1136 shift
1137 if test $# -gt 0; then
1138 # We chose a different compiler from the bogus one.
1139 # However, it has the same basename, so the bogon will be chosen
1140 # first if we set CC to just the basename; use the full file name.
1141 shift
1142 set dummy "$ac_dir/$ac_word" "$@"
1143 shift
1144 ac_cv_prog_CC="$@"
1149 CC="$ac_cv_prog_CC"
1150 if test -n "$CC"; then
1151 echo "$ac_t""$CC" 1>&6
1152 else
1153 echo "$ac_t""no" 1>&6
1156 if test -z "$CC"; then
1157 case "`uname -s`" in
1158 *win32* | *WIN32*)
1159 # Extract the first word of "cl", so it can be a program name with args.
1160 set dummy cl; ac_word=$2
1161 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1162 echo "configure:1163: checking for $ac_word" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166 if test -n "$CC"; then
1167 ac_cv_prog_CC="$CC" # Let the user override the test.
1168 else
1169 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1170 ac_dummy="$PATH"
1171 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 if test -f $ac_dir/$ac_word; then
1174 ac_cv_prog_CC="cl"
1175 break
1177 done
1178 IFS="$ac_save_ifs"
1181 CC="$ac_cv_prog_CC"
1182 if test -n "$CC"; then
1183 echo "$ac_t""$CC" 1>&6
1184 else
1185 echo "$ac_t""no" 1>&6
1188 esac
1190 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1193 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1196 ac_ext=c
1197 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1198 ac_cpp='$CPP $CPPFLAGS'
1199 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1200 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1201 cross_compiling=$ac_cv_prog_cc_cross
1203 cat > conftest.$ac_ext << EOF
1205 #line 1206 "configure"
1206 #include "confdefs.h"
1208 main(){return(0);}
1210 if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1211 ac_cv_prog_cc_works=yes
1212 # If we can't run a trivial program, we are probably using a cross compiler.
1213 if (./conftest; exit) 2>/dev/null; then
1214 ac_cv_prog_cc_cross=no
1215 else
1216 ac_cv_prog_cc_cross=yes
1218 else
1219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
1221 ac_cv_prog_cc_works=no
1223 rm -fr conftest*
1224 ac_ext=c
1225 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1226 ac_cpp='$CPP $CPPFLAGS'
1227 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1228 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1229 cross_compiling=$ac_cv_prog_cc_cross
1231 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1232 if test $ac_cv_prog_cc_works = no; then
1233 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1235 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1236 echo "configure:1237: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1237 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1238 cross_compiling=$ac_cv_prog_cc_cross
1240 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1241 echo "configure:1242: checking whether we are using GNU C" >&5
1242 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1243 echo $ac_n "(cached) $ac_c" 1>&6
1244 else
1245 cat > conftest.c <<EOF
1246 #ifdef __GNUC__
1247 yes;
1248 #endif
1250 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1251 ac_cv_prog_gcc=yes
1252 else
1253 ac_cv_prog_gcc=no
1257 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1259 if test $ac_cv_prog_gcc = yes; then
1260 GCC=yes
1261 else
1262 GCC=
1265 ac_test_CFLAGS="${CFLAGS+set}"
1266 ac_save_CFLAGS="$CFLAGS"
1267 CFLAGS=
1268 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1269 echo "configure:1270: checking whether ${CC-cc} accepts -g" >&5
1270 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1271 echo $ac_n "(cached) $ac_c" 1>&6
1272 else
1273 echo 'void f(){}' > conftest.c
1274 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1275 ac_cv_prog_cc_g=yes
1276 else
1277 ac_cv_prog_cc_g=no
1279 rm -f conftest*
1283 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1284 if test "$ac_test_CFLAGS" = set; then
1285 CFLAGS="$ac_save_CFLAGS"
1286 elif test $ac_cv_prog_cc_g = yes; then
1287 if test "$GCC" = yes; then
1288 CFLAGS="-g -O2"
1289 else
1290 CFLAGS="-g"
1292 else
1293 if test "$GCC" = yes; then
1294 CFLAGS="-O2"
1295 else
1296 CFLAGS=
1300 if test "x$CC" != xcc; then
1301 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1302 echo "configure:1303: checking whether $CC and cc understand -c and -o together" >&5
1303 else
1304 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether cc understands -c and -o together" >&5
1307 set dummy $CC; ac_cc="`echo $2 |
1308 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1309 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1310 echo $ac_n "(cached) $ac_c" 1>&6
1311 else
1312 echo 'foo(){}' > conftest.c
1313 # Make sure it works both with $CC and with simple cc.
1314 # We do the test twice because some compilers refuse to overwrite an
1315 # existing .o file with -o, though they will create one.
1316 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1317 if { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1318 test -f conftest.o && { (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1319 then
1320 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1321 if test "x$CC" != xcc; then
1322 # Test first that cc exists at all.
1323 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1324 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1325 if { (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1326 test -f conftest.o && { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1327 then
1328 # cc works too.
1330 else
1331 # cc exists but doesn't like -o.
1332 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1336 else
1337 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1339 rm -f conftest*
1342 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1343 echo "$ac_t""yes" 1>&6
1344 else
1345 echo "$ac_t""no" 1>&6
1346 cat >> confdefs.h <<\EOF
1347 #define NO_MINUS_C_MINUS_O 1
1352 # autoconf is lame and doesn't give us any substitution variable for this.
1353 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1354 NO_MINUS_C_MINUS_O=yes
1355 else
1356 OUTPUT_OPTION='-o $@'
1361 echo $ac_n "checking for long double""... $ac_c" 1>&6
1362 echo "configure:1363: checking for long double" >&5
1363 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366 if test "$GCC" = yes; then
1367 gcc_cv_c_long_double=yes
1368 else
1369 cat > conftest.$ac_ext <<EOF
1370 #line 1371 "configure"
1371 #include "confdefs.h"
1373 int main() {
1374 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1375 long double foo = 0.0;
1376 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1377 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1378 ; return 0; }
1380 if { (eval echo configure:1381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1381 rm -rf conftest*
1382 gcc_cv_c_long_double=yes
1383 else
1384 echo "configure: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 rm -rf conftest*
1387 gcc_cv_c_long_double=no
1389 rm -f conftest*
1393 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1394 if test $gcc_cv_c_long_double = yes; then
1395 cat >> confdefs.h <<\EOF
1396 #define HAVE_LONG_DOUBLE 1
1401 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1402 echo "configure:1403: checking for built-in _Bool" >&5
1403 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1404 echo $ac_n "(cached) $ac_c" 1>&6
1405 else
1406 cat > conftest.$ac_ext <<EOF
1407 #line 1408 "configure"
1408 #include "confdefs.h"
1410 int main() {
1411 _Bool foo;
1412 ; return 0; }
1414 if { (eval echo configure:1415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1415 rm -rf conftest*
1416 gcc_cv_c__bool=yes
1417 else
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 rm -rf conftest*
1421 gcc_cv_c__bool=no
1423 rm -f conftest*
1427 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1428 if test $gcc_cv_c__bool = yes; then
1429 cat >> confdefs.h <<\EOF
1430 #define HAVE__BOOL 1
1436 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1437 echo "configure:1438: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1438 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1439 echo $ac_n "(cached) $ac_c" 1>&6
1440 else
1441 save_CFLAGS="$CFLAGS"
1442 CFLAGS="-Wno-long-long"
1443 cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1447 int main() {
1449 ; return 0; }
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452 rm -rf conftest*
1453 ac_cv_prog_cc_no_long_long=yes
1454 else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_prog_cc_no_long_long=no
1460 rm -f conftest*
1461 CFLAGS="$save_CFLAGS"
1464 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1465 strict1_warn=
1466 if test $ac_cv_prog_cc_no_long_long = yes; then
1467 strict1_warn="-pedantic -Wno-long-long"
1471 # If the native compiler is GCC, we can enable warnings even in stage1.
1472 # That's useful for people building cross-compilers, or just running a
1473 # quick `make'.
1474 warn_cflags=
1475 if test "x$GCC" = "xyes"; then
1476 warn_cflags='$(GCC_WARN_CFLAGS)'
1480 # Stage specific cflags for build.
1481 stage1_cflags=
1482 case $build in
1483 vax-*-*)
1484 if test x$GCC = xyes
1485 then
1486 stage1_cflags="-Wa,-J"
1487 else
1488 stage1_cflags="-J"
1491 esac
1494 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1495 echo "configure:1496: checking whether ${MAKE-make} sets \${MAKE}" >&5
1496 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1497 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1498 echo $ac_n "(cached) $ac_c" 1>&6
1499 else
1500 cat > conftestmake <<\EOF
1501 all:
1502 @echo 'ac_maketemp="${MAKE}"'
1504 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1505 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1506 if test -n "$ac_maketemp"; then
1507 eval ac_cv_prog_make_${ac_make}_set=yes
1508 else
1509 eval ac_cv_prog_make_${ac_make}_set=no
1511 rm -f conftestmake
1513 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1514 echo "$ac_t""yes" 1>&6
1515 SET_MAKE=
1516 else
1517 echo "$ac_t""no" 1>&6
1518 SET_MAKE="MAKE=${MAKE-make}"
1522 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
1523 echo "configure:1524: checking whether a default assembler was specified" >&5
1524 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1525 if test x"$gas_flag" = x"no"; then
1526 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
1527 else
1528 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
1530 else
1531 echo "$ac_t""no" 1>&6
1534 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
1535 echo "configure:1536: checking whether a default linker was specified" >&5
1536 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1537 if test x"$gnu_ld_flag" = x"no"; then
1538 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
1539 else
1540 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
1542 else
1543 echo "$ac_t""no" 1>&6
1546 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
1547 echo "configure:1548: checking for GNU C library" >&5
1548 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
1549 echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551 cat > conftest.$ac_ext <<EOF
1552 #line 1553 "configure"
1553 #include "confdefs.h"
1554 #include <features.h>
1555 int main() {
1557 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
1558 #error Not a GNU C library system
1559 #endif
1560 ; return 0; }
1562 if { (eval echo configure:1563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1563 rm -rf conftest*
1564 gcc_cv_glibc=yes
1565 else
1566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
1568 rm -rf conftest*
1569 gcc_cv_glibc=no
1571 rm -f conftest*
1574 echo "$ac_t""$gcc_cv_glibc" 1>&6
1575 if test $gcc_cv_glibc = yes; then
1576 cat >> confdefs.h <<\EOF
1577 #define _GNU_SOURCE 1
1582 echo $ac_n "checking for inline""... $ac_c" 1>&6
1583 echo "configure:1584: checking for inline" >&5
1584 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1585 echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587 ac_cv_c_inline=no
1588 for ac_kw in inline __inline__ __inline; do
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1593 int main() {
1594 } $ac_kw foo() {
1595 ; return 0; }
1597 if { (eval echo configure:1598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1598 rm -rf conftest*
1599 ac_cv_c_inline=$ac_kw; break
1600 else
1601 echo "configure: failed program was:" >&5
1602 cat conftest.$ac_ext >&5
1604 rm -f conftest*
1605 done
1609 echo "$ac_t""$ac_cv_c_inline" 1>&6
1610 case "$ac_cv_c_inline" in
1611 inline | yes) ;;
1612 no) cat >> confdefs.h <<\EOF
1613 #define inline
1616 *) cat >> confdefs.h <<EOF
1617 #define inline $ac_cv_c_inline
1620 esac
1623 # Find some useful tools
1624 for ac_prog in mawk gawk nawk awk
1626 # Extract the first word of "$ac_prog", so it can be a program name with args.
1627 set dummy $ac_prog; ac_word=$2
1628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1629 echo "configure:1630: checking for $ac_word" >&5
1630 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1631 echo $ac_n "(cached) $ac_c" 1>&6
1632 else
1633 if test -n "$AWK"; then
1634 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1635 else
1636 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1637 ac_dummy="$PATH"
1638 for ac_dir in $ac_dummy; do
1639 test -z "$ac_dir" && ac_dir=.
1640 if test -f $ac_dir/$ac_word; then
1641 ac_cv_prog_AWK="$ac_prog"
1642 break
1644 done
1645 IFS="$ac_save_ifs"
1648 AWK="$ac_cv_prog_AWK"
1649 if test -n "$AWK"; then
1650 echo "$ac_t""$AWK" 1>&6
1651 else
1652 echo "$ac_t""no" 1>&6
1655 test -n "$AWK" && break
1656 done
1658 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
1659 echo "configure:1660: checking whether ln works" >&5
1660 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
1661 echo $ac_n "(cached) $ac_c" 1>&6
1662 else
1663 rm -f conftestdata_t
1664 echo >conftestdata_f
1665 if ln conftestdata_f conftestdata_t 2>/dev/null
1666 then
1667 gcc_cv_prog_LN="ln"
1668 else
1669 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1670 then
1671 gcc_cv_prog_LN="ln -s"
1672 else
1673 gcc_cv_prog_LN=cp
1676 rm -f conftestdata_f conftestdata_t
1679 LN="$gcc_cv_prog_LN"
1680 if test "$gcc_cv_prog_LN" = "ln"; then
1681 echo "$ac_t""yes" 1>&6
1682 else
1683 if test "$gcc_cv_prog_LN" = "ln -s"; then
1684 echo "$ac_t""no, using ln -s" 1>&6
1685 else
1686 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
1690 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1691 echo "configure:1692: checking whether ln -s works" >&5
1692 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694 else
1695 rm -f conftestdata_t
1696 echo >conftestdata_f
1697 if ln -s conftestdata_f conftestdata_t 2>/dev/null
1698 then
1699 gcc_cv_prog_LN_S="ln -s"
1700 else
1701 if ln conftestdata_f conftestdata_t 2>/dev/null
1702 then
1703 gcc_cv_prog_LN_S=ln
1704 else
1705 gcc_cv_prog_LN_S=cp
1708 rm -f conftestdata_f conftestdata_t
1711 LN_S="$gcc_cv_prog_LN_S"
1712 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
1713 echo "$ac_t""yes" 1>&6
1714 else
1715 if test "$gcc_cv_prog_LN_S" = "ln"; then
1716 echo "$ac_t""no, using ln" 1>&6
1717 else
1718 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
1722 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1723 echo "configure:1724: checking for volatile" >&5
1724 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1731 int main() {
1732 volatile int foo;
1733 ; return 0; }
1735 if { (eval echo configure:1736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1736 rm -rf conftest*
1737 gcc_cv_c_volatile=yes
1738 else
1739 echo "configure: failed program was:" >&5
1740 cat conftest.$ac_ext >&5
1741 rm -rf conftest*
1742 gcc_cv_c_volatile=no
1744 rm -f conftest*
1747 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1748 if test $gcc_cv_c_volatile = yes ; then
1749 cat >> confdefs.h <<\EOF
1750 #define HAVE_VOLATILE 1
1755 # Extract the first word of "ranlib", so it can be a program name with args.
1756 set dummy ranlib; ac_word=$2
1757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1758 echo "configure:1759: checking for $ac_word" >&5
1759 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1760 echo $ac_n "(cached) $ac_c" 1>&6
1761 else
1762 if test -n "$RANLIB"; then
1763 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1764 else
1765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1766 ac_dummy="$PATH"
1767 for ac_dir in $ac_dummy; do
1768 test -z "$ac_dir" && ac_dir=.
1769 if test -f $ac_dir/$ac_word; then
1770 ac_cv_prog_RANLIB="ranlib"
1771 break
1773 done
1774 IFS="$ac_save_ifs"
1775 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1778 RANLIB="$ac_cv_prog_RANLIB"
1779 if test -n "$RANLIB"; then
1780 echo "$ac_t""$RANLIB" 1>&6
1781 else
1782 echo "$ac_t""no" 1>&6
1785 # Find a good install program. We prefer a C program (faster),
1786 # so one script is as good as another. But avoid the broken or
1787 # incompatible versions:
1788 # SysV /etc/install, /usr/sbin/install
1789 # SunOS /usr/etc/install
1790 # IRIX /sbin/install
1791 # AIX /bin/install
1792 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1793 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1794 # ./install, which can be erroneously created by make from ./install.sh.
1795 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1796 echo "configure:1797: checking for a BSD compatible install" >&5
1797 if test -z "$INSTALL"; then
1798 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1799 echo $ac_n "(cached) $ac_c" 1>&6
1800 else
1801 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1802 for ac_dir in $PATH; do
1803 # Account for people who put trailing slashes in PATH elements.
1804 case "$ac_dir/" in
1805 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1807 # OSF1 and SCO ODT 3.0 have their own names for install.
1808 for ac_prog in ginstall scoinst install; do
1809 if test -f $ac_dir/$ac_prog; then
1810 if test $ac_prog = install &&
1811 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1812 # AIX install. It has an incompatible calling convention.
1813 # OSF/1 installbsd also uses dspmsg, but is usable.
1815 else
1816 ac_cv_path_install="$ac_dir/$ac_prog -c"
1817 break 2
1820 done
1822 esac
1823 done
1824 IFS="$ac_save_IFS"
1827 if test "${ac_cv_path_install+set}" = set; then
1828 INSTALL="$ac_cv_path_install"
1829 else
1830 # As a last resort, use the slow shell script. We don't cache a
1831 # path for INSTALL within a source directory, because that will
1832 # break other packages using the cache if that directory is
1833 # removed, or if the path is relative.
1834 INSTALL="$ac_install_sh"
1837 echo "$ac_t""$INSTALL" 1>&6
1839 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1840 # It thinks the first close brace ends the variable substitution.
1841 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1843 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1846 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1847 echo "configure:1848: checking how to run the C preprocessor" >&5
1848 # On Suns, sometimes $CPP names a directory.
1849 if test -n "$CPP" && test -d "$CPP"; then
1850 CPP=
1852 if test -z "$CPP"; then
1853 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856 # This must be in double quotes, not single quotes, because CPP may get
1857 # substituted into the Makefile and "${CC-cc}" will confuse make.
1858 CPP="${CC-cc} -E"
1859 # On the NeXT, cc -E runs the code through the compiler's parser,
1860 # not just through cpp.
1861 cat > conftest.$ac_ext <<EOF
1862 #line 1863 "configure"
1863 #include "confdefs.h"
1864 #include <assert.h>
1865 Syntax Error
1867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1868 { (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1870 if test -z "$ac_err"; then
1872 else
1873 echo "$ac_err" >&5
1874 echo "configure: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 rm -rf conftest*
1877 CPP="${CC-cc} -E -traditional-cpp"
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1880 "configure"
1880 #include "confdefs.h"
1881 #include <assert.h>
1882 Syntax Error
1884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1885 { (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1887 if test -z "$ac_err"; then
1889 else
1890 echo "$ac_err" >&5
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 rm -rf conftest*
1894 CPP="${CC-cc} -nologo -E"
1895 cat > conftest.$ac_ext <<EOF
1896 #line 1897 "configure"
1897 #include "confdefs.h"
1898 #include <assert.h>
1899 Syntax Error
1901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1902 { (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1904 if test -z "$ac_err"; then
1906 else
1907 echo "$ac_err" >&5
1908 echo "configure: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 rm -rf conftest*
1911 CPP=/lib/cpp
1913 rm -f conftest*
1915 rm -f conftest*
1917 rm -f conftest*
1918 ac_cv_prog_CPP="$CPP"
1920 CPP="$ac_cv_prog_CPP"
1921 else
1922 ac_cv_prog_CPP="$CPP"
1924 echo "$ac_t""$CPP" 1>&6
1926 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1927 echo "configure:1928: checking for ANSI C header files" >&5
1928 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1929 echo $ac_n "(cached) $ac_c" 1>&6
1930 else
1931 cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1934 #include <stdlib.h>
1935 #include <stdarg.h>
1936 #include <string.h>
1937 #include <float.h>
1939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1940 { (eval echo configure:1941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1942 if test -z "$ac_err"; then
1943 rm -rf conftest*
1944 ac_cv_header_stdc=yes
1945 else
1946 echo "$ac_err" >&5
1947 echo "configure: failed program was:" >&5
1948 cat conftest.$ac_ext >&5
1949 rm -rf conftest*
1950 ac_cv_header_stdc=no
1952 rm -f conftest*
1954 if test $ac_cv_header_stdc = yes; then
1955 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 #include <string.h>
1961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1962 egrep "memchr" >/dev/null 2>&1; then
1964 else
1965 rm -rf conftest*
1966 ac_cv_header_stdc=no
1968 rm -f conftest*
1972 if test $ac_cv_header_stdc = yes; then
1973 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1974 cat > conftest.$ac_ext <<EOF
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977 #include <stdlib.h>
1979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1980 egrep "free" >/dev/null 2>&1; then
1982 else
1983 rm -rf conftest*
1984 ac_cv_header_stdc=no
1986 rm -f conftest*
1990 if test $ac_cv_header_stdc = yes; then
1991 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1992 if test "$cross_compiling" = yes; then
1994 else
1995 cat > conftest.$ac_ext <<EOF
1996 #line 1997 "configure"
1997 #include "confdefs.h"
1998 #include <ctype.h>
1999 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2000 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2001 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2002 int main () { int i; for (i = 0; i < 256; i++)
2003 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2004 exit (0); }
2007 if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2008 then
2010 else
2011 echo "configure: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2013 rm -fr conftest*
2014 ac_cv_header_stdc=no
2016 rm -fr conftest*
2022 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2023 if test $ac_cv_header_stdc = yes; then
2024 cat >> confdefs.h <<\EOF
2025 #define STDC_HEADERS 1
2030 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2031 echo "configure:2032: checking whether time.h and sys/time.h may both be included" >&5
2032 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2033 echo $ac_n "(cached) $ac_c" 1>&6
2034 else
2035 cat > conftest.$ac_ext <<EOF
2036 #line 2037 "configure"
2037 #include "confdefs.h"
2038 #include <sys/types.h>
2039 #include <sys/time.h>
2040 #include <time.h>
2041 int main() {
2042 struct tm *tp;
2043 ; return 0; }
2045 if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2046 rm -rf conftest*
2047 ac_cv_header_time=yes
2048 else
2049 echo "configure: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 rm -rf conftest*
2052 ac_cv_header_time=no
2054 rm -f conftest*
2057 echo "$ac_t""$ac_cv_header_time" 1>&6
2058 if test $ac_cv_header_time = yes; then
2059 cat >> confdefs.h <<\EOF
2060 #define TIME_WITH_SYS_TIME 1
2065 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2066 echo "configure:2067: checking for working stdbool.h" >&5
2067 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2068 echo $ac_n "(cached) $ac_c" 1>&6
2069 else
2070 cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 #include <stdbool.h>
2074 int main() {
2075 bool foo = false;
2076 ; return 0; }
2078 if { (eval echo configure:2079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2079 rm -rf conftest*
2080 ac_cv_header_stdbool_h=yes
2081 else
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 rm -rf conftest*
2085 ac_cv_header_stdbool_h=no
2087 rm -f conftest*
2090 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2091 if test $ac_cv_header_stdbool_h = yes; then
2092 cat >> confdefs.h <<\EOF
2093 #define HAVE_STDBOOL_H 1
2098 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2099 echo "configure:2100: checking whether string.h and strings.h may both be included" >&5
2100 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2101 echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103 cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 #include <string.h>
2107 #include <strings.h>
2108 int main() {
2110 ; return 0; }
2112 if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2113 rm -rf conftest*
2114 gcc_cv_header_string=yes
2115 else
2116 echo "configure: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
2118 rm -rf conftest*
2119 gcc_cv_header_string=no
2121 rm -f conftest*
2124 echo "$ac_t""$gcc_cv_header_string" 1>&6
2125 if test $gcc_cv_header_string = yes; then
2126 cat >> confdefs.h <<\EOF
2127 #define STRING_WITH_STRINGS 1
2132 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2133 echo "configure:2134: checking for sys/wait.h that is POSIX.1 compatible" >&5
2134 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2136 else
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <sys/types.h>
2141 #include <sys/wait.h>
2142 #ifndef WEXITSTATUS
2143 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2144 #endif
2145 #ifndef WIFEXITED
2146 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2147 #endif
2148 int main() {
2149 int s;
2150 wait (&s);
2151 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2152 ; return 0; }
2154 if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2155 rm -rf conftest*
2156 ac_cv_header_sys_wait_h=yes
2157 else
2158 echo "configure: failed program was:" >&5
2159 cat conftest.$ac_ext >&5
2160 rm -rf conftest*
2161 ac_cv_header_sys_wait_h=no
2163 rm -f conftest*
2166 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2167 if test $ac_cv_header_sys_wait_h = yes; then
2168 cat >> confdefs.h <<\EOF
2169 #define HAVE_SYS_WAIT_H 1
2174 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2175 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
2176 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2177 direct.h malloc.h langinfo.h iconv.h
2179 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2180 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2181 echo "configure:2182: checking for $ac_hdr" >&5
2182 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2183 echo $ac_n "(cached) $ac_c" 1>&6
2184 else
2185 cat > conftest.$ac_ext <<EOF
2186 #line 2187 "configure"
2187 #include "confdefs.h"
2188 #include <$ac_hdr>
2190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2191 { (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2193 if test -z "$ac_err"; then
2194 rm -rf conftest*
2195 eval "ac_cv_header_$ac_safe=yes"
2196 else
2197 echo "$ac_err" >&5
2198 echo "configure: failed program was:" >&5
2199 cat conftest.$ac_ext >&5
2200 rm -rf conftest*
2201 eval "ac_cv_header_$ac_safe=no"
2203 rm -f conftest*
2205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2206 echo "$ac_t""yes" 1>&6
2207 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2208 cat >> confdefs.h <<EOF
2209 #define $ac_tr_hdr 1
2212 else
2213 echo "$ac_t""no" 1>&6
2215 done
2218 # Check for thread headers.
2219 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2220 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2221 echo "configure:2222: checking for thread.h" >&5
2222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2223 echo $ac_n "(cached) $ac_c" 1>&6
2224 else
2225 cat > conftest.$ac_ext <<EOF
2226 #line 2227 "configure"
2227 #include "confdefs.h"
2228 #include <thread.h>
2230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2231 { (eval echo configure:2232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2233 if test -z "$ac_err"; then
2234 rm -rf conftest*
2235 eval "ac_cv_header_$ac_safe=yes"
2236 else
2237 echo "$ac_err" >&5
2238 echo "configure: failed program was:" >&5
2239 cat conftest.$ac_ext >&5
2240 rm -rf conftest*
2241 eval "ac_cv_header_$ac_safe=no"
2243 rm -f conftest*
2245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2246 echo "$ac_t""yes" 1>&6
2247 have_thread_h=yes
2248 else
2249 echo "$ac_t""no" 1>&6
2250 have_thread_h=
2253 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2254 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2255 echo "configure:2256: checking for pthread.h" >&5
2256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2257 echo $ac_n "(cached) $ac_c" 1>&6
2258 else
2259 cat > conftest.$ac_ext <<EOF
2260 #line 2261 "configure"
2261 #include "confdefs.h"
2262 #include <pthread.h>
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2267 if test -z "$ac_err"; then
2268 rm -rf conftest*
2269 eval "ac_cv_header_$ac_safe=yes"
2270 else
2271 echo "$ac_err" >&5
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2274 rm -rf conftest*
2275 eval "ac_cv_header_$ac_safe=no"
2277 rm -f conftest*
2279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2280 echo "$ac_t""yes" 1>&6
2281 have_pthread_h=yes
2282 else
2283 echo "$ac_t""no" 1>&6
2284 have_pthread_h=
2288 # See if GNAT has been installed
2289 # Extract the first word of "gnatbind", so it can be a program name with args.
2290 set dummy gnatbind; ac_word=$2
2291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2292 echo "configure:2293: checking for $ac_word" >&5
2293 if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296 if test -n "$gnat"; then
2297 ac_cv_prog_gnat="$gnat" # Let the user override the test.
2298 else
2299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2300 ac_dummy="$PATH"
2301 for ac_dir in $ac_dummy; do
2302 test -z "$ac_dir" && ac_dir=.
2303 if test -f $ac_dir/$ac_word; then
2304 ac_cv_prog_gnat="yes"
2305 break
2307 done
2308 IFS="$ac_save_ifs"
2309 test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
2312 gnat="$ac_cv_prog_gnat"
2313 if test -n "$gnat"; then
2314 echo "$ac_t""$gnat" 1>&6
2315 else
2316 echo "$ac_t""no" 1>&6
2320 # See if we have the mktemp command.
2321 # Extract the first word of "mktemp", so it can be a program name with args.
2322 set dummy mktemp; ac_word=$2
2323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2324 echo "configure:2325: checking for $ac_word" >&5
2325 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
2326 echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328 if test -n "$have_mktemp_command"; then
2329 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
2330 else
2331 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2332 ac_dummy="$PATH"
2333 for ac_dir in $ac_dummy; do
2334 test -z "$ac_dir" && ac_dir=.
2335 if test -f $ac_dir/$ac_word; then
2336 ac_cv_prog_have_mktemp_command="yes"
2337 break
2339 done
2340 IFS="$ac_save_ifs"
2341 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
2344 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
2345 if test -n "$have_mktemp_command"; then
2346 echo "$ac_t""$have_mktemp_command" 1>&6
2347 else
2348 echo "$ac_t""no" 1>&6
2352 # Do we have a single-tree copy of texinfo?
2353 if test -f $srcdir/../texinfo/Makefile.in; then
2354 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
2355 gcc_cv_prog_makeinfo_modern=yes
2356 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
2357 else
2358 # See if makeinfo has been installed and is modern enough
2359 # that we can use it.
2360 # Extract the first word of "makeinfo", so it can be a program name with args.
2361 set dummy makeinfo; ac_word=$2
2362 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2363 echo "configure:2364: checking for $ac_word" >&5
2364 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
2366 else
2367 if test -n "$MAKEINFO"; then
2368 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2369 else
2370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2371 ac_dummy="$PATH"
2372 for ac_dir in $ac_dummy; do
2373 test -z "$ac_dir" && ac_dir=.
2374 if test -f $ac_dir/$ac_word; then
2375 ac_cv_prog_MAKEINFO="makeinfo"
2376 break
2378 done
2379 IFS="$ac_save_ifs"
2382 MAKEINFO="$ac_cv_prog_MAKEINFO"
2383 if test -n "$MAKEINFO"; then
2384 echo "$ac_t""$MAKEINFO" 1>&6
2385 else
2386 echo "$ac_t""no" 1>&6
2389 if test -n "$MAKEINFO"; then
2390 # Found it, now check the version.
2391 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
2392 echo "configure:2393: checking for modern makeinfo" >&5
2393 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
2394 echo $ac_n "(cached) $ac_c" 1>&6
2395 else
2396 ac_prog_version=`$MAKEINFO --version 2>&1 |
2397 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
2398 echo "configure:2399: version of makeinfo is $ac_prog_version" >&5
2399 case $ac_prog_version in
2400 '') gcc_cv_prog_makeinfo_modern=no;;
2401 4.*)
2402 gcc_cv_prog_makeinfo_modern=yes;;
2403 *) gcc_cv_prog_makeinfo_modern=no;;
2404 esac
2408 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
2409 else
2410 gcc_cv_prog_makeinfo_modern=no
2415 if test $gcc_cv_prog_makeinfo_modern = no; then
2416 echo "configure: warning:
2417 *** Makeinfo is missing or too old.
2418 *** Info documentation will not be built." 1>&2
2419 BUILD_INFO=
2420 else
2421 BUILD_INFO=info
2424 # Is pod2man recent enough to regenerate manpages?
2425 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
2426 echo "configure:2427: checking for recent Pod::Man" >&5
2427 if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
2428 echo "$ac_t""yes" 1>&6
2429 GENERATED_MANPAGES=generated-manpages
2430 else
2431 echo "$ac_t""no" 1>&6
2432 GENERATED_MANPAGES=
2435 # How about lex?
2436 if test -f $srcdir/../flex/skel.c; then
2437 FLEX='$(objdir)/../flex/flex'
2438 else
2439 # Extract the first word of "flex", so it can be a program name with args.
2440 set dummy flex; ac_word=$2
2441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2442 echo "configure:2443: checking for $ac_word" >&5
2443 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445 else
2446 if test -n "$FLEX"; then
2447 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
2448 else
2449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2450 ac_dummy="$PATH"
2451 for ac_dir in $ac_dummy; do
2452 test -z "$ac_dir" && ac_dir=.
2453 if test -f $ac_dir/$ac_word; then
2454 ac_cv_prog_FLEX="flex"
2455 break
2457 done
2458 IFS="$ac_save_ifs"
2459 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
2462 FLEX="$ac_cv_prog_FLEX"
2463 if test -n "$FLEX"; then
2464 echo "$ac_t""$FLEX" 1>&6
2465 else
2466 echo "$ac_t""no" 1>&6
2471 # Bison?
2472 # The -L switch is so bison can find its skeleton file.
2473 if test -f $srcdir/../bison/bison.simple; then
2474 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
2475 else
2476 # Extract the first word of "bison", so it can be a program name with args.
2477 set dummy bison; ac_word=$2
2478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2479 echo "configure:2480: checking for $ac_word" >&5
2480 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
2481 echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483 if test -n "$BISON"; then
2484 ac_cv_prog_BISON="$BISON" # Let the user override the test.
2485 else
2486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2487 ac_dummy="$PATH"
2488 for ac_dir in $ac_dummy; do
2489 test -z "$ac_dir" && ac_dir=.
2490 if test -f $ac_dir/$ac_word; then
2491 ac_cv_prog_BISON="bison"
2492 break
2494 done
2495 IFS="$ac_save_ifs"
2496 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
2499 BISON="$ac_cv_prog_BISON"
2500 if test -n "$BISON"; then
2501 echo "$ac_t""$BISON" 1>&6
2502 else
2503 echo "$ac_t""no" 1>&6
2508 # See if the stage1 system preprocessor understands the ANSI C
2509 # preprocessor stringification operator.
2512 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
2513 echo "configure:2514: checking for preprocessor stringizing operator" >&5
2514 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
2515 echo $ac_n "(cached) $ac_c" 1>&6
2516 else
2517 cat > conftest.$ac_ext <<EOF
2518 #line 2519 "configure"
2519 #include "confdefs.h"
2521 #define x(y) #y
2523 char *s = x(teststring);
2526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2527 egrep "#teststring" >/dev/null 2>&1; then
2528 rm -rf conftest*
2529 ac_cv_c_stringize=no
2530 else
2531 rm -rf conftest*
2532 ac_cv_c_stringize=yes
2534 rm -f conftest*
2538 if test "${ac_cv_c_stringize}" = yes
2539 then
2540 cat >> confdefs.h <<\EOF
2541 #define HAVE_STRINGIZE 1
2545 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
2548 # Use <inttypes.h> only if it exists,
2549 # doesn't clash with <sys/types.h>, and declares intmax_t.
2550 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
2551 echo "configure:2552: checking for inttypes.h" >&5
2552 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2554 else
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2558 #include <sys/types.h>
2559 #include <inttypes.h>
2560 int main() {
2561 intmax_t i = -1;
2562 ; return 0; }
2564 if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2565 rm -rf conftest*
2566 gcc_cv_header_inttypes_h=yes
2567 else
2568 echo "configure: failed program was:" >&5
2569 cat conftest.$ac_ext >&5
2570 rm -rf conftest*
2571 gcc_cv_header_inttypes_h=no
2573 rm -f conftest*
2576 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
2577 if test $gcc_cv_header_inttypes_h = yes; then
2578 cat >> confdefs.h <<\EOF
2579 #define HAVE_INTTYPES_H 1
2585 # Determine if enumerated bitfields are unsigned. ISO C says they can
2586 # be either signed or unsigned.
2588 echo $ac_n "checking for unsigned enumerated bitfields""... $ac_c" 1>&6
2589 echo "configure:2590: checking for unsigned enumerated bitfields" >&5
2590 if eval "test \"`echo '$''{'gcc_cv_enum_bf_unsigned'+set}'`\" = set"; then
2591 echo $ac_n "(cached) $ac_c" 1>&6
2592 else
2593 if test "$cross_compiling" = yes; then
2594 gcc_cv_enum_bf_unsigned=yes
2595 else
2596 cat > conftest.$ac_ext <<EOF
2597 #line 2598 "configure"
2598 #include "confdefs.h"
2599 #include <stdlib.h>
2600 enum t { BLAH = 128 } ;
2601 struct s_t { enum t member : 8; } s ;
2602 int main(void)
2604 s.member = BLAH;
2605 if (s.member < 0) exit(1);
2606 exit(0);
2610 if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2611 then
2612 gcc_cv_enum_bf_unsigned=yes
2613 else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -fr conftest*
2617 gcc_cv_enum_bf_unsigned=no
2619 rm -fr conftest*
2624 echo "$ac_t""$gcc_cv_enum_bf_unsigned" 1>&6
2625 if test $gcc_cv_enum_bf_unsigned = yes; then
2626 cat >> confdefs.h <<\EOF
2627 #define ENUM_BITFIELDS_ARE_UNSIGNED 1
2632 for ac_func in strtoul bsearch putenv popen bcopy \
2633 strchr strrchr kill getrlimit setrlimit atoll atoq \
2634 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
2635 fputs_unlocked getrusage iconv nl_langinfo lstat
2637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2638 echo "configure:2639: checking for $ac_func" >&5
2639 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2640 echo $ac_n "(cached) $ac_c" 1>&6
2641 else
2642 cat > conftest.$ac_ext <<EOF
2643 #line 2644 "configure"
2644 #include "confdefs.h"
2645 /* System header to define __stub macros and hopefully few prototypes,
2646 which can conflict with char $ac_func(); below. */
2647 #include <assert.h>
2648 /* Override any gcc2 internal prototype to avoid an error. */
2649 /* We use char because int might match the return type of a gcc2
2650 builtin and then its argument prototype would still apply. */
2651 char $ac_func();
2653 int main() {
2655 /* The GNU C library defines this for functions which it implements
2656 to always fail with ENOSYS. Some functions are actually named
2657 something starting with __ and the normal name is an alias. */
2658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2659 choke me
2660 #else
2661 $ac_func();
2662 #endif
2664 ; return 0; }
2666 if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667 rm -rf conftest*
2668 eval "ac_cv_func_$ac_func=yes"
2669 else
2670 echo "configure: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 rm -rf conftest*
2673 eval "ac_cv_func_$ac_func=no"
2675 rm -f conftest*
2678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2679 echo "$ac_t""yes" 1>&6
2680 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2681 cat >> confdefs.h <<EOF
2682 #define $ac_tr_func 1
2685 else
2686 echo "$ac_t""no" 1>&6
2688 done
2691 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2692 echo "configure:2693: checking for ssize_t" >&5
2693 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2698 "configure"
2698 #include "confdefs.h"
2699 #include <sys/types.h>
2700 #if STDC_HEADERS
2701 #include <stdlib.h>
2702 #include <stddef.h>
2703 #endif
2705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2706 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2707 rm -rf conftest*
2708 eval "ac_cv_type_ssize_t=yes"
2709 else
2710 rm -rf conftest*
2711 eval "ac_cv_type_ssize_t=no"
2713 rm -f conftest*
2716 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
2717 echo "$ac_t""yes" 1>&6
2718 else
2719 echo "$ac_t""no" 1>&6
2720 cat >> confdefs.h <<EOF
2721 #define ssize_t int
2727 # Try to determine the array type of the second argument of getgroups
2728 # for the target system (int or gid_t).
2729 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2730 echo "configure:2731: checking for uid_t in sys/types.h" >&5
2731 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2732 echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734 cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737 #include <sys/types.h>
2739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2740 egrep "uid_t" >/dev/null 2>&1; then
2741 rm -rf conftest*
2742 ac_cv_type_uid_t=yes
2743 else
2744 rm -rf conftest*
2745 ac_cv_type_uid_t=no
2747 rm -f conftest*
2751 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2752 if test $ac_cv_type_uid_t = no; then
2753 cat >> confdefs.h <<\EOF
2754 #define uid_t int
2757 cat >> confdefs.h <<\EOF
2758 #define gid_t int
2763 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2764 echo "configure:2765: checking type of array argument to getgroups" >&5
2765 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768 if test "$cross_compiling" = yes; then
2769 ac_cv_type_getgroups=cross
2770 else
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2775 /* Thanks to Mike Rendell for this test. */
2776 #include <sys/types.h>
2777 #define NGID 256
2778 #undef MAX
2779 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2780 main()
2782 gid_t gidset[NGID];
2783 int i, n;
2784 union { gid_t gval; long lval; } val;
2786 val.lval = -1;
2787 for (i = 0; i < NGID; i++)
2788 gidset[i] = val.gval;
2789 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2790 gidset);
2791 /* Exit non-zero if getgroups seems to require an array of ints. This
2792 happens when gid_t is short but getgroups modifies an array of ints. */
2793 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2797 if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2798 then
2799 ac_cv_type_getgroups=gid_t
2800 else
2801 echo "configure: failed program was:" >&5
2802 cat conftest.$ac_ext >&5
2803 rm -fr conftest*
2804 ac_cv_type_getgroups=int
2806 rm -fr conftest*
2809 if test $ac_cv_type_getgroups = cross; then
2810 cat > conftest.$ac_ext <<EOF
2811 #line 2812 "configure"
2812 #include "confdefs.h"
2813 #include <unistd.h>
2815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2816 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2817 rm -rf conftest*
2818 ac_cv_type_getgroups=gid_t
2819 else
2820 rm -rf conftest*
2821 ac_cv_type_getgroups=int
2823 rm -f conftest*
2828 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2829 cat >> confdefs.h <<EOF
2830 #define GETGROUPS_T $ac_cv_type_getgroups
2834 if test "${target}" = "${build}"; then
2835 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
2836 else
2837 case "${target}" in
2838 # This condition may need some tweaking. It should include all
2839 # targets where the array type of the second argument of getgroups
2840 # is int and the type of gid_t is not equivalent to int.
2841 *-*-sunos* | *-*-ultrix*)
2842 TARGET_GETGROUPS_T=int
2845 TARGET_GETGROUPS_T=gid_t
2847 esac
2851 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2852 echo "configure:2853: checking for vprintf" >&5
2853 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2854 echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856 cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 /* System header to define __stub macros and hopefully few prototypes,
2860 which can conflict with char vprintf(); below. */
2861 #include <assert.h>
2862 /* Override any gcc2 internal prototype to avoid an error. */
2863 /* We use char because int might match the return type of a gcc2
2864 builtin and then its argument prototype would still apply. */
2865 char vprintf();
2867 int main() {
2869 /* The GNU C library defines this for functions which it implements
2870 to always fail with ENOSYS. Some functions are actually named
2871 something starting with __ and the normal name is an alias. */
2872 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2873 choke me
2874 #else
2875 vprintf();
2876 #endif
2878 ; return 0; }
2880 if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2881 rm -rf conftest*
2882 eval "ac_cv_func_vprintf=yes"
2883 else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 eval "ac_cv_func_vprintf=no"
2889 rm -f conftest*
2892 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2893 echo "$ac_t""yes" 1>&6
2894 cat >> confdefs.h <<\EOF
2895 #define HAVE_VPRINTF 1
2898 else
2899 echo "$ac_t""no" 1>&6
2902 if test "$ac_cv_func_vprintf" != yes; then
2903 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2904 echo "configure:2905: checking for _doprnt" >&5
2905 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2906 echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908 cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911 /* System header to define __stub macros and hopefully few prototypes,
2912 which can conflict with char _doprnt(); below. */
2913 #include <assert.h>
2914 /* Override any gcc2 internal prototype to avoid an error. */
2915 /* We use char because int might match the return type of a gcc2
2916 builtin and then its argument prototype would still apply. */
2917 char _doprnt();
2919 int main() {
2921 /* The GNU C library defines this for functions which it implements
2922 to always fail with ENOSYS. Some functions are actually named
2923 something starting with __ and the normal name is an alias. */
2924 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2925 choke me
2926 #else
2927 _doprnt();
2928 #endif
2930 ; return 0; }
2932 if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2933 rm -rf conftest*
2934 eval "ac_cv_func__doprnt=yes"
2935 else
2936 echo "configure: failed program was:" >&5
2937 cat conftest.$ac_ext >&5
2938 rm -rf conftest*
2939 eval "ac_cv_func__doprnt=no"
2941 rm -f conftest*
2944 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2945 echo "$ac_t""yes" 1>&6
2946 cat >> confdefs.h <<\EOF
2947 #define HAVE_DOPRNT 1
2950 else
2951 echo "$ac_t""no" 1>&6
2956 vfprintf=
2957 doprint=
2958 if test $ac_cv_func_vprintf != yes ; then
2959 vfprintf=vfprintf.o
2960 if test $ac_cv_func__doprnt != yes ; then
2961 doprint=doprint.o
2967 for ac_func in strstr
2969 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2970 echo "configure:2971: checking for $ac_func" >&5
2971 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2972 echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974 cat > conftest.$ac_ext <<EOF
2975 #line 2976 "configure"
2976 #include "confdefs.h"
2977 /* System header to define __stub macros and hopefully few prototypes,
2978 which can conflict with char $ac_func(); below. */
2979 #include <assert.h>
2980 /* Override any gcc2 internal prototype to avoid an error. */
2981 /* We use char because int might match the return type of a gcc2
2982 builtin and then its argument prototype would still apply. */
2983 char $ac_func();
2985 int main() {
2987 /* The GNU C library defines this for functions which it implements
2988 to always fail with ENOSYS. Some functions are actually named
2989 something starting with __ and the normal name is an alias. */
2990 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2991 choke me
2992 #else
2993 $ac_func();
2994 #endif
2996 ; return 0; }
2998 if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2999 rm -rf conftest*
3000 eval "ac_cv_func_$ac_func=yes"
3001 else
3002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 rm -rf conftest*
3005 eval "ac_cv_func_$ac_func=no"
3007 rm -f conftest*
3010 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3011 echo "$ac_t""yes" 1>&6
3012 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3013 cat >> confdefs.h <<EOF
3014 #define $ac_tr_func 1
3016 strstr=
3017 else
3018 echo "$ac_t""no" 1>&6
3019 strstr=strstr.o
3021 done
3024 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3025 echo "configure:3026: checking whether the printf functions support %p" >&5
3026 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3027 echo $ac_n "(cached) $ac_c" 1>&6
3028 else
3029 if test "$cross_compiling" = yes; then
3030 gcc_cv_func_printf_ptr=no
3031 else
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 #include <stdio.h>
3037 int main()
3039 char buf[64];
3040 char *p = buf, *q = NULL;
3041 sprintf(buf, "%p", p);
3042 sscanf(buf, "%p", &q);
3043 return (p != q);
3046 if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3047 then
3048 gcc_cv_func_printf_ptr=yes
3049 else
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 rm -fr conftest*
3053 gcc_cv_func_printf_ptr=no
3055 rm -fr conftest*
3058 rm -f core core.* *.core
3061 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3062 if test $gcc_cv_func_printf_ptr = yes ; then
3063 cat >> confdefs.h <<\EOF
3064 #define HAVE_PRINTF_PTR 1
3070 case "${host}" in
3071 *-*-uwin*)
3072 { echo "configure: error:
3073 *** UWIN may not be used as a host platform because
3074 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3076 esac
3077 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3078 echo "configure:3079: checking for pid_t" >&5
3079 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3080 echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082 cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085 #include <sys/types.h>
3086 #if STDC_HEADERS
3087 #include <stdlib.h>
3088 #include <stddef.h>
3089 #endif
3091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3092 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3093 rm -rf conftest*
3094 eval "ac_cv_type_pid_t=yes"
3095 else
3096 rm -rf conftest*
3097 eval "ac_cv_type_pid_t=no"
3099 rm -f conftest*
3102 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
3103 echo "$ac_t""yes" 1>&6
3104 else
3105 echo "$ac_t""no" 1>&6
3106 cat >> confdefs.h <<EOF
3107 #define pid_t int
3112 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3113 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3114 echo "configure:3115: checking for vfork.h" >&5
3115 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3116 echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <vfork.h>
3123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3124 { (eval echo configure:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3126 if test -z "$ac_err"; then
3127 rm -rf conftest*
3128 eval "ac_cv_header_$ac_safe=yes"
3129 else
3130 echo "$ac_err" >&5
3131 echo "configure: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 rm -rf conftest*
3134 eval "ac_cv_header_$ac_safe=no"
3136 rm -f conftest*
3138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3139 echo "$ac_t""yes" 1>&6
3140 cat >> confdefs.h <<\EOF
3141 #define HAVE_VFORK_H 1
3144 else
3145 echo "$ac_t""no" 1>&6
3148 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3149 echo "configure:3150: checking for working vfork" >&5
3150 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152 else
3153 if test "$cross_compiling" = yes; then
3154 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3155 echo "configure:3156: checking for vfork" >&5
3156 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3157 echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159 cat > conftest.$ac_ext <<EOF
3160 #line 3161 "configure"
3161 #include "confdefs.h"
3162 /* System header to define __stub macros and hopefully few prototypes,
3163 which can conflict with char vfork(); below. */
3164 #include <assert.h>
3165 /* Override any gcc2 internal prototype to avoid an error. */
3166 /* We use char because int might match the return type of a gcc2
3167 builtin and then its argument prototype would still apply. */
3168 char vfork();
3170 int main() {
3172 /* The GNU C library defines this for functions which it implements
3173 to always fail with ENOSYS. Some functions are actually named
3174 something starting with __ and the normal name is an alias. */
3175 #if defined (__stub_vfork) || defined (__stub___vfork)
3176 choke me
3177 #else
3178 vfork();
3179 #endif
3181 ; return 0; }
3183 if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3184 rm -rf conftest*
3185 eval "ac_cv_func_vfork=yes"
3186 else
3187 echo "configure: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 rm -rf conftest*
3190 eval "ac_cv_func_vfork=no"
3192 rm -f conftest*
3195 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3196 echo "$ac_t""yes" 1>&6
3198 else
3199 echo "$ac_t""no" 1>&6
3202 ac_cv_func_vfork_works=$ac_cv_func_vfork
3203 else
3204 cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207 /* Thanks to Paul Eggert for this test. */
3208 #include <stdio.h>
3209 #include <sys/types.h>
3210 #include <sys/stat.h>
3211 #ifdef HAVE_UNISTD_H
3212 #include <unistd.h>
3213 #endif
3214 #ifdef HAVE_VFORK_H
3215 #include <vfork.h>
3216 #endif
3217 /* On some sparc systems, changes by the child to local and incoming
3218 argument registers are propagated back to the parent.
3219 The compiler is told about this with #include <vfork.h>,
3220 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3221 Test for this by using a static variable whose address
3222 is put into a register that is clobbered by the vfork. */
3223 static
3224 #ifdef __cplusplus
3225 sparc_address_test (int arg)
3226 #else
3227 sparc_address_test (arg) int arg;
3228 #endif
3230 static pid_t child;
3231 if (!child) {
3232 child = vfork ();
3233 if (child < 0) {
3234 perror ("vfork");
3235 _exit(2);
3237 if (!child) {
3238 arg = getpid();
3239 write(-1, "", 0);
3240 _exit (arg);
3244 main() {
3245 pid_t parent = getpid ();
3246 pid_t child;
3248 sparc_address_test ();
3250 child = vfork ();
3252 if (child == 0) {
3253 /* Here is another test for sparc vfork register problems.
3254 This test uses lots of local variables, at least
3255 as many local variables as main has allocated so far
3256 including compiler temporaries. 4 locals are enough for
3257 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3258 A buggy compiler should reuse the register of parent
3259 for one of the local variables, since it will think that
3260 parent can't possibly be used any more in this routine.
3261 Assigning to the local variable will thus munge parent
3262 in the parent process. */
3263 pid_t
3264 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3265 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3266 /* Convince the compiler that p..p7 are live; otherwise, it might
3267 use the same hardware register for all 8 local variables. */
3268 if (p != p1 || p != p2 || p != p3 || p != p4
3269 || p != p5 || p != p6 || p != p7)
3270 _exit(1);
3272 /* On some systems (e.g. IRIX 3.3),
3273 vfork doesn't separate parent from child file descriptors.
3274 If the child closes a descriptor before it execs or exits,
3275 this munges the parent's descriptor as well.
3276 Test for this by closing stdout in the child. */
3277 _exit(close(fileno(stdout)) != 0);
3278 } else {
3279 int status;
3280 struct stat st;
3282 while (wait(&status) != child)
3284 exit(
3285 /* Was there some problem with vforking? */
3286 child < 0
3288 /* Did the child fail? (This shouldn't happen.) */
3289 || status
3291 /* Did the vfork/compiler bug occur? */
3292 || parent != getpid()
3294 /* Did the file descriptor bug occur? */
3295 || fstat(fileno(stdout), &st) != 0
3300 if { (eval echo configure:3301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3301 then
3302 ac_cv_func_vfork_works=yes
3303 else
3304 echo "configure: failed program was:" >&5
3305 cat conftest.$ac_ext >&5
3306 rm -fr conftest*
3307 ac_cv_func_vfork_works=no
3309 rm -fr conftest*
3314 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3315 if test $ac_cv_func_vfork_works = no; then
3316 cat >> confdefs.h <<\EOF
3317 #define vfork fork
3322 for ac_func in getpagesize
3324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_func" >&5
3326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3327 echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329 cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332 /* System header to define __stub macros and hopefully few prototypes,
3333 which can conflict with char $ac_func(); below. */
3334 #include <assert.h>
3335 /* Override any gcc2 internal prototype to avoid an error. */
3336 /* We use char because int might match the return type of a gcc2
3337 builtin and then its argument prototype would still apply. */
3338 char $ac_func();
3340 int main() {
3342 /* The GNU C library defines this for functions which it implements
3343 to always fail with ENOSYS. Some functions are actually named
3344 something starting with __ and the normal name is an alias. */
3345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3346 choke me
3347 #else
3348 $ac_func();
3349 #endif
3351 ; return 0; }
3353 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354 rm -rf conftest*
3355 eval "ac_cv_func_$ac_func=yes"
3356 else
3357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 rm -rf conftest*
3360 eval "ac_cv_func_$ac_func=no"
3362 rm -f conftest*
3365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3366 echo "$ac_t""yes" 1>&6
3367 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3368 cat >> confdefs.h <<EOF
3369 #define $ac_tr_func 1
3372 else
3373 echo "$ac_t""no" 1>&6
3375 done
3377 # The test program for the next two tests is the same except for one
3378 # set of ifdefs.
3379 cat >ct-mmap.inc <<'EOF'
3380 #include <sys/types.h>
3381 #include <sys/mman.h>
3382 #include <fcntl.h>
3383 #include <signal.h>
3384 #include <setjmp.h>
3385 #include <stdio.h>
3387 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3388 # define MAP_ANONYMOUS MAP_ANON
3389 #endif
3391 /* This mess was copied from the GNU getpagesize.h. */
3392 #ifndef HAVE_GETPAGESIZE
3393 # ifdef HAVE_UNISTD_H
3394 # include <unistd.h>
3395 # endif
3397 /* Assume that all systems that can run configure have sys/param.h. */
3398 # ifndef HAVE_SYS_PARAM_H
3399 # define HAVE_SYS_PARAM_H 1
3400 # endif
3402 # ifdef _SC_PAGESIZE
3403 # define getpagesize() sysconf(_SC_PAGESIZE)
3404 # else /* no _SC_PAGESIZE */
3405 # ifdef HAVE_SYS_PARAM_H
3406 # include <sys/param.h>
3407 # ifdef EXEC_PAGESIZE
3408 # define getpagesize() EXEC_PAGESIZE
3409 # else /* no EXEC_PAGESIZE */
3410 # ifdef NBPG
3411 # define getpagesize() NBPG * CLSIZE
3412 # ifndef CLSIZE
3413 # define CLSIZE 1
3414 # endif /* no CLSIZE */
3415 # else /* no NBPG */
3416 # ifdef NBPC
3417 # define getpagesize() NBPC
3418 # else /* no NBPC */
3419 # ifdef PAGESIZE
3420 # define getpagesize() PAGESIZE
3421 # endif /* PAGESIZE */
3422 # endif /* no NBPC */
3423 # endif /* no NBPG */
3424 # endif /* no EXEC_PAGESIZE */
3425 # else /* no HAVE_SYS_PARAM_H */
3426 # define getpagesize() 8192 /* punt totally */
3427 # endif /* no HAVE_SYS_PARAM_H */
3428 # endif /* no _SC_PAGESIZE */
3430 #endif /* no HAVE_GETPAGESIZE */
3432 #ifndef MAP_FAILED
3433 # define MAP_FAILED -1
3434 #endif
3436 #undef perror_exit
3437 #define perror_exit(str, val) \
3438 do { perror(str); exit(val); } while (0)
3440 /* Some versions of cygwin mmap require that munmap is called with the
3441 same parameters as mmap. GCC expects that this is not the case.
3442 Test for various forms of this problem. Warning - icky signal games. */
3444 static sigset_t unblock_sigsegv;
3445 static jmp_buf r;
3446 static size_t pg;
3447 static int devzero;
3449 static char *
3450 anonmap (size)
3451 size_t size;
3453 #ifdef USE_MAP_ANON
3454 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3455 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
3456 #else
3457 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
3458 MAP_PRIVATE, devzero, 0);
3459 #endif
3462 static void
3463 sigsegv (unused)
3464 int unused;
3466 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
3467 longjmp (r, 1);
3470 /* Basic functionality test. */
3471 void
3472 test_0 ()
3474 char *x = anonmap (pg);
3475 if (x == (char *) MAP_FAILED)
3476 perror_exit("test 0 mmap", 2);
3478 *(int *)x += 1;
3480 if (munmap(x, pg) < 0)
3481 perror_exit("test 0 munmap", 3);
3484 /* 1. If we map a 2-page region and unmap its second page, the first page
3485 must remain. */
3486 static void
3487 test_1 ()
3489 char *x = anonmap (pg * 2);
3490 if (x == (char *)MAP_FAILED)
3491 perror_exit ("test 1 mmap", 4);
3493 signal (SIGSEGV, sigsegv);
3494 if (setjmp (r))
3495 perror_exit ("test 1 fault", 5);
3497 x[0] = 1;
3498 x[pg] = 1;
3500 if (munmap (x + pg, pg) < 0)
3501 perror_exit ("test 1 munmap 1", 6);
3502 x[0] = 2;
3504 if (setjmp (r) == 0)
3506 x[pg] = 1;
3507 perror_exit ("test 1 no fault", 7);
3509 if (munmap (x, pg) < 0)
3510 perror_exit ("test 1 munmap 2", 8);
3513 /* 2. If we map a 2-page region and unmap its first page, the second
3514 page must remain. */
3515 static void
3516 test_2 ()
3518 char *x = anonmap (pg * 2);
3519 if (x == (char *)MAP_FAILED)
3520 perror_exit ("test 2 mmap", 9);
3522 signal (SIGSEGV, sigsegv);
3523 if (setjmp (r))
3524 perror_exit ("test 2 fault", 10);
3526 x[0] = 1;
3527 x[pg] = 1;
3529 if (munmap (x, pg) < 0)
3530 perror_exit ("test 2 munmap 1", 11);
3532 x[pg] = 2;
3534 if (setjmp (r) == 0)
3536 x[0] = 1;
3537 perror_exit ("test 2 no fault", 12);
3540 if (munmap (x+pg, pg) < 0)
3541 perror_exit ("test 2 munmap 2", 13);
3544 /* 3. If we map two adjacent 1-page regions and unmap them both with
3545 one munmap, both must go away.
3547 Getting two adjacent 1-page regions with two mmap calls is slightly
3548 tricky. All OS's tested skip over already-allocated blocks; therefore
3549 we have been careful to unmap all allocated regions in previous tests.
3550 HP/UX allocates pages backward in memory. No OS has yet been observed
3551 to be so perverse as to leave unmapped space between consecutive calls
3552 to mmap. */
3554 static void
3555 test_3 ()
3557 char *x, *y, *z;
3559 x = anonmap (pg);
3560 if (x == (char *)MAP_FAILED)
3561 perror_exit ("test 3 mmap 1", 14);
3562 y = anonmap (pg);
3563 if (y == (char *)MAP_FAILED)
3564 perror_exit ("test 3 mmap 2", 15);
3566 if (y != x + pg)
3568 if (y == x - pg)
3569 z = y, y = x, x = z;
3570 else
3572 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
3573 (unsigned long)x, (unsigned long)y);
3574 exit (16);
3578 signal (SIGSEGV, sigsegv);
3579 if (setjmp (r))
3580 perror_exit ("test 3 fault", 17);
3582 x[0] = 1;
3583 y[0] = 1;
3585 if (munmap (x, pg*2) < 0)
3586 perror_exit ("test 3 munmap", 18);
3588 if (setjmp (r) == 0)
3590 x[0] = 1;
3591 perror_exit ("test 3 no fault 1", 19);
3594 signal (SIGSEGV, sigsegv);
3595 if (setjmp (r) == 0)
3597 y[0] = 1;
3598 perror_exit ("test 3 no fault 2", 20);
3603 main ()
3605 sigemptyset (&unblock_sigsegv);
3606 sigaddset (&unblock_sigsegv, SIGSEGV);
3607 pg = getpagesize ();
3608 #ifndef USE_MAP_ANON
3609 devzero = open ("/dev/zero", O_RDWR);
3610 if (devzero < 0)
3611 perror_exit ("open /dev/zero", 1);
3612 #endif
3614 test_0();
3615 test_1();
3616 test_2();
3617 test_3();
3619 exit(0);
3623 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
3624 echo "configure:3625: checking for working mmap from /dev/zero" >&5
3625 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
3626 echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628 if test "$cross_compiling" = yes; then
3629 # If this is not cygwin, and /dev/zero is a character device, it's probably
3630 # safe to assume it works.
3631 case "$host_os" in
3632 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
3633 * ) if test -c /dev/zero
3634 then ac_cv_func_mmap_dev_zero=yes
3635 else ac_cv_func_mmap_dev_zero=no
3636 fi ;;
3637 esac
3638 else
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include "ct-mmap.inc"
3644 if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3645 then
3646 ac_cv_func_mmap_dev_zero=yes
3647 else
3648 echo "configure: failed program was:" >&5
3649 cat conftest.$ac_ext >&5
3650 rm -fr conftest*
3651 if test $? -lt 4
3652 then ac_cv_func_mmap_dev_zero=no
3653 else ac_cv_func_mmap_dev_zero=buggy
3656 rm -fr conftest*
3662 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
3663 if test $ac_cv_func_mmap_dev_zero = yes; then
3664 cat >> confdefs.h <<\EOF
3665 #define HAVE_MMAP_DEV_ZERO 1
3670 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
3671 echo "configure:3672: checking for working mmap with MAP_ANON(YMOUS)" >&5
3672 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
3673 echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675 if test "$cross_compiling" = yes; then
3676 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
3677 # just because it's there. Some SCO Un*xen define it but don't implement it.
3678 ac_cv_func_mmap_anon=no
3679 else
3680 cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 #define USE_MAP_ANON
3684 #include "ct-mmap.inc"
3686 if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3687 then
3688 ac_cv_func_mmap_anon=yes
3689 else
3690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 rm -fr conftest*
3693 if test $? -lt 4
3694 then ac_cv_func_mmap_anon=no
3695 else ac_cv_func_mmap_anon=buggy
3698 rm -fr conftest*
3704 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
3705 if test $ac_cv_func_mmap_anon = yes; then
3706 cat >> confdefs.h <<\EOF
3707 #define HAVE_MMAP_ANON 1
3711 rm -f ct-mmap.inc
3713 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
3714 echo "configure:3715: checking for working mmap of a file" >&5
3715 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
3716 echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718 # Create a file one thousand bytes long.
3719 for i in 1 2 3 4 5 6 7 8 9 0
3720 do for j in 1 2 3 4 5 6 7 8 9 0
3721 do echo $i $j xxxxx
3722 done
3723 done > conftestdata$$
3725 if test "$cross_compiling" = yes; then
3726 ac_cv_func_mmap_file=no
3727 else
3728 cat > conftest.$ac_ext <<EOF
3729 #line 3730 "configure"
3730 #include "confdefs.h"
3732 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
3733 Richard Henderson and Alexandre Oliva.
3734 Check whether read-only mmap of a plain file works. */
3735 #include <sys/types.h>
3736 #include <sys/stat.h>
3737 #include <fcntl.h>
3738 #include <sys/mman.h>
3740 int main()
3742 char *x;
3743 int fd;
3744 struct stat st;
3746 fd = open("conftestdata$$", O_RDONLY);
3747 if (fd < 0)
3748 exit(1);
3750 if (fstat (fd, &st))
3751 exit(2);
3753 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
3754 if (x == (char *) -1)
3755 exit(3);
3757 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
3758 exit(4);
3760 if (munmap(x, st.st_size) < 0)
3761 exit(5);
3763 exit(0);
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3767 then
3768 ac_cv_func_mmap_file=yes
3769 else
3770 echo "configure: failed program was:" >&5
3771 cat conftest.$ac_ext >&5
3772 rm -fr conftest*
3773 ac_cv_func_mmap_file=no
3775 rm -fr conftest*
3780 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
3781 if test $ac_cv_func_mmap_file = yes; then
3782 cat >> confdefs.h <<\EOF
3783 #define HAVE_MMAP_FILE 1
3789 # We will need to find libiberty.h and ansidecl.h
3790 saved_CFLAGS="$CFLAGS"
3791 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
3792 for ac_func in bcopy \
3793 getenv atol sbrk abort atof getcwd getwd \
3794 strsignal putc_unlocked fputs_unlocked strstr environ \
3795 malloc realloc calloc free basename getopt
3797 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3798 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3799 echo "configure:3800: checking whether $ac_func is declared" >&5
3800 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803 cat > conftest.$ac_ext <<EOF
3804 #line 3805 "configure"
3805 #include "confdefs.h"
3806 #undef $ac_tr_decl
3807 #define $ac_tr_decl 1
3809 #include "gansidecl.h"
3810 #include "system.h"
3812 int main() {
3813 #ifndef $ac_func
3814 char *(*pfn) = (char *(*)) $ac_func ;
3815 #endif
3816 ; return 0; }
3818 if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3819 rm -rf conftest*
3820 eval "gcc_cv_have_decl_$ac_func=yes"
3821 else
3822 echo "configure: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
3824 rm -rf conftest*
3825 eval "gcc_cv_have_decl_$ac_func=no"
3827 rm -f conftest*
3830 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3831 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3832 #define $ac_tr_decl 1
3835 else
3836 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3837 #define $ac_tr_decl 0
3842 done
3843 if test x = y ; then
3844 cat >> confdefs.h <<\EOF
3845 #define HAVE_DECL_BCOPY 1
3848 cat >> confdefs.h <<\EOF
3849 #define HAVE_DECL_GETENV 1
3851 cat >> confdefs.h <<\EOF
3852 #define HAVE_DECL_ATOL 1
3854 cat >> confdefs.h <<\EOF
3855 #define HAVE_DECL_SBRK 1
3857 cat >> confdefs.h <<\EOF
3858 #define HAVE_DECL_ABORT 1
3860 cat >> confdefs.h <<\EOF
3861 #define HAVE_DECL_ATOF 1
3863 cat >> confdefs.h <<\EOF
3864 #define HAVE_DECL_GETCWD 1
3866 cat >> confdefs.h <<\EOF
3867 #define HAVE_DECL_GETWD 1
3870 cat >> confdefs.h <<\EOF
3871 #define HAVE_DECL_STRSIGNAL 1
3873 cat >> confdefs.h <<\EOF
3874 #define HAVE_DECL_PUTC_UNLOCKED 1
3876 cat >> confdefs.h <<\EOF
3877 #define HAVE_DECL_FPUTS_UNLOCKED 1
3879 cat >> confdefs.h <<\EOF
3880 #define HAVE_DECL_STRSTR 1
3882 cat >> confdefs.h <<\EOF
3883 #define HAVE_DECL_ENVIRON 1
3886 cat >> confdefs.h <<\EOF
3887 #define HAVE_DECL_MALLOC 1
3889 cat >> confdefs.h <<\EOF
3890 #define HAVE_DECL_REALLOC 1
3892 cat >> confdefs.h <<\EOF
3893 #define HAVE_DECL_CALLOC 1
3895 cat >> confdefs.h <<\EOF
3896 #define HAVE_DECL_FREE 1
3898 cat >> confdefs.h <<\EOF
3899 #define HAVE_DECL_BASENAME 1
3901 cat >> confdefs.h <<\EOF
3902 #define HAVE_DECL_GETOPT 1
3907 for ac_func in getrlimit setrlimit getrusage
3909 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3910 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
3911 echo "configure:3912: checking whether $ac_func is declared" >&5
3912 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 #undef $ac_tr_decl
3919 #define $ac_tr_decl 1
3921 #include "gansidecl.h"
3922 #include "system.h"
3923 #ifdef HAVE_SYS_RESOURCE_H
3924 #include <sys/resource.h>
3925 #endif
3928 int main() {
3929 #ifndef $ac_func
3930 char *(*pfn) = (char *(*)) $ac_func ;
3931 #endif
3932 ; return 0; }
3934 if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3935 rm -rf conftest*
3936 eval "gcc_cv_have_decl_$ac_func=yes"
3937 else
3938 echo "configure: failed program was:" >&5
3939 cat conftest.$ac_ext >&5
3940 rm -rf conftest*
3941 eval "gcc_cv_have_decl_$ac_func=no"
3943 rm -f conftest*
3946 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
3947 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
3948 #define $ac_tr_decl 1
3951 else
3952 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
3953 #define $ac_tr_decl 0
3958 done
3959 if test x = y ; then
3960 cat >> confdefs.h <<\EOF
3961 #define HAVE_DECL_GETRLIMIT 1
3963 cat >> confdefs.h <<\EOF
3964 #define HAVE_DECL_SETRLIMIT 1
3966 cat >> confdefs.h <<\EOF
3967 #define HAVE_DECL_GETRUSAGE 1
3972 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
3973 CFLAGS="$saved_CFLAGS"
3975 # mkdir takes a single argument on some systems.
3976 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
3977 echo "configure:3978: checking if mkdir takes one argument" >&5
3978 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
3979 echo $ac_n "(cached) $ac_c" 1>&6
3980 else
3981 cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3985 #include <sys/types.h>
3986 #ifdef HAVE_SYS_STAT_H
3987 # include <sys/stat.h>
3988 #endif
3989 #ifdef HAVE_UNISTD_H
3990 # include <unistd.h>
3991 #endif
3992 #ifdef HAVE_DIRECT_H
3993 # include <direct.h>
3994 #endif
3995 int main() {
3996 mkdir ("foo", 0);
3997 ; return 0; }
3999 if { (eval echo configure:4000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4000 rm -rf conftest*
4001 gcc_cv_mkdir_takes_one_arg=no
4002 else
4003 echo "configure: failed program was:" >&5
4004 cat conftest.$ac_ext >&5
4005 rm -rf conftest*
4006 gcc_cv_mkdir_takes_one_arg=yes
4008 rm -f conftest*
4011 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4012 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4013 cat >> confdefs.h <<\EOF
4014 #define MKDIR_TAKES_ONE_ARG 1
4020 # File extensions
4021 manext='.1'
4022 objext='.o'
4026 build_xm_file=
4027 build_xm_defines=
4028 build_install_headers_dir=install-headers-tar
4029 build_exeext=
4030 host_xm_file=
4031 host_xm_defines=
4032 host_xmake_file=
4033 host_truncate_target=
4034 host_exeext=
4036 # Decode the host machine, then the target machine.
4037 # For the host machine, we save the xm_file variable as host_xm_file;
4038 # then we decode the target machine and forget everything else
4039 # that came from the host machine.
4040 for machine in $build $host $target; do
4041 . ${srcdir}/config.gcc
4042 done
4044 extra_objs="${host_extra_objs} ${extra_objs}"
4046 # Default the target-machine variables that were not explicitly set.
4047 if test x"$tm_file" = x
4048 then tm_file=$cpu_type/$cpu_type.h; fi
4050 if test x"$extra_headers" = x
4051 then extra_headers=; fi
4053 if test x"$xm_file" = x
4054 then xm_file=$cpu_type/xm-$cpu_type.h; fi
4056 if test x$md_file = x
4057 then md_file=$cpu_type/$cpu_type.md; fi
4059 if test x$out_file = x
4060 then out_file=$cpu_type/$cpu_type.c; fi
4062 if test x"$tmake_file" = x
4063 then tmake_file=$cpu_type/t-$cpu_type
4066 if test x"$dwarf2" = xyes
4067 then tm_file="$tm_file tm-dwarf2.h"
4070 if test x$float_format = x
4071 then float_format=i64
4074 if test $float_format = none
4075 then float_h_file=Makefile.in
4076 else float_h_file=float-$float_format.h
4079 # Handle cpp installation.
4080 if test x$enable_cpp != xno
4081 then
4082 tmake_file="$tmake_file t-install-cpp"
4085 # Say what files are being used for the output code and MD file.
4086 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
4087 echo "Using \`$srcdir/config/$md_file' as machine description file."
4089 # If any of the xm_file variables contain nonexistent files, warn
4090 # about them and drop them. But $cpu/xm-$cpu.h is allowed not to
4091 # exist, if we have nothing for it to do.
4094 for x in $build_xm_file; do
4095 if test -f $srcdir/config/$x
4096 then bx="$bx $x"
4097 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4098 then :
4099 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4101 done
4102 build_xm_file="$bx"
4105 for x in $host_xm_file; do
4106 if test -f $srcdir/config/$x
4107 then hx="$hx $x"
4108 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4109 then :
4110 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4112 done
4113 host_xm_file="$hx"
4116 for x in $xm_file; do
4117 if test -f $srcdir/config/$x
4118 then tx="$tx $x"
4119 elif echo $x | grep '\(a-z0-9a-z0-9*\)/xm-\1\.h' >/dev/null
4120 then :
4121 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4123 done
4124 xm_file="$tx"
4126 count=a
4127 for f in $tm_file; do
4128 count=${count}x
4129 done
4130 if test $count = ax; then
4131 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4132 else
4133 echo "Using the following target machine macro files:"
4134 for f in $tm_file; do
4135 echo " $srcdir/config/$f"
4136 done
4139 count=a
4140 for f in $host_xm_file; do
4141 count=${count}x
4142 done
4143 if test $count = a; then
4145 elif test $count = ax; then
4146 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
4147 else
4148 echo "Using the following host machine macro files:"
4149 for f in $host_xm_file; do
4150 echo " $srcdir/config/$f"
4151 done
4154 if test "$host_xm_file" != "$build_xm_file"; then
4155 count=a
4156 for f in $build_xm_file; do
4157 count=${count}x
4158 done
4159 if test $count = a; then
4161 elif test $count = ax; then
4162 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
4163 else
4164 echo "Using the following build machine macro files:"
4165 for f in $build_xm_file; do
4166 echo " $srcdir/config/$f"
4167 done
4171 if test x$thread_file = x; then
4172 if test x$target_thread_file != x; then
4173 thread_file=$target_thread_file
4174 else
4175 thread_file='single'
4179 # auto-host.h is the file containing items generated by autoconf and is
4180 # the first file included by config.h.
4181 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} defaults.h hwint.h"
4183 # If host=build, it is correct to have hconfig include auto-host.h
4184 # as well. If host!=build, we are in error and need to do more
4185 # work to find out the build config parameters.
4186 if test x$host = x$build
4187 then
4188 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4189 else
4190 # We create a subdir, then run autoconf in the subdir.
4191 # To prevent recursion we set host and build for the new
4192 # invocation of configure to the build for this invocation
4193 # of configure.
4194 tempdir=build.$$
4195 rm -rf $tempdir
4196 mkdir $tempdir
4197 cd $tempdir
4198 case ${srcdir} in
4199 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
4200 *) realsrcdir=../${srcdir};;
4201 esac
4202 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
4203 --target=$target --host=$build --build=$build
4205 # We just finished tests for the build machine, so rename
4206 # the file auto-build.h in the gcc directory.
4207 mv auto-host.h ../auto-build.h
4208 cd ..
4209 rm -rf $tempdir
4210 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} defaults.h hwint.h"
4213 xm_file="gansidecl.h ${xm_file} defaults.h"
4214 tm_file="gansidecl.h ${tm_file} defaults.h"
4216 # Truncate the target if necessary
4217 if test x$host_truncate_target != x; then
4218 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4221 # Get the version trigger filename from the toplevel
4222 if test "${with_gcc_version_trigger+set}" = set; then
4223 gcc_version_trigger=$with_gcc_version_trigger
4224 else
4225 gcc_version_trigger=${srcdir}/version.c
4227 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
4228 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4230 # Compile in configure arguments.
4231 if test -f configargs.h ; then
4232 # Being re-configured.
4233 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
4234 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
4235 else
4236 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
4238 cat > configargs.h <<EOF
4239 /* Generated automatically. */
4240 static const char configuration_arguments[] = "$gcc_config_arguments";
4241 static const char thread_model[] = "$thread_file";
4244 # Internationalization
4245 PACKAGE=gcc
4246 VERSION="$gcc_version"
4247 cat >> confdefs.h <<EOF
4248 #define PACKAGE "$PACKAGE"
4251 cat >> confdefs.h <<EOF
4252 #define VERSION "$VERSION"
4258 ALL_LINGUAS="sv"
4260 # Enable NLS support by default
4261 # Check whether --enable-nls or --disable-nls was given.
4262 if test "${enable_nls+set}" = set; then
4263 enableval="$enable_nls"
4265 else
4266 enable_nls=yes
4270 # if cross compiling, disable NLS support.
4271 # It's not worth the trouble, at least for now.
4273 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
4274 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
4275 enable_nls=no
4278 # if NLS is enabled, also enable check in po subdir
4279 if test $enable_nls = yes; then
4280 CHECK_PO=check-po
4281 else
4282 CHECK_PO=""
4288 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
4289 echo "configure:4290: checking for strerror in -lcposix" >&5
4290 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
4291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4292 echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294 ac_save_LIBS="$LIBS"
4295 LIBS="-lcposix $LIBS"
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299 /* Override any gcc2 internal prototype to avoid an error. */
4300 /* We use char because int might match the return type of a gcc2
4301 builtin and then its argument prototype would still apply. */
4302 char strerror();
4304 int main() {
4305 strerror()
4306 ; return 0; }
4308 if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4309 rm -rf conftest*
4310 eval "ac_cv_lib_$ac_lib_var=yes"
4311 else
4312 echo "configure: failed program was:" >&5
4313 cat conftest.$ac_ext >&5
4314 rm -rf conftest*
4315 eval "ac_cv_lib_$ac_lib_var=no"
4317 rm -f conftest*
4318 LIBS="$ac_save_LIBS"
4321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4322 echo "$ac_t""yes" 1>&6
4323 LIBS="$LIBS -lcposix"
4324 else
4325 echo "$ac_t""no" 1>&6
4330 echo $ac_n "checking for working const""... $ac_c" 1>&6
4331 echo "configure:4332: checking for working const" >&5
4332 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4333 echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335 cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4339 int main() {
4341 /* Ultrix mips cc rejects this. */
4342 typedef int charset[2]; const charset x;
4343 /* SunOS 4.1.1 cc rejects this. */
4344 char const *const *ccp;
4345 char **p;
4346 /* NEC SVR4.0.2 mips cc rejects this. */
4347 struct point {int x, y;};
4348 static struct point const zero = {0,0};
4349 /* AIX XL C 1.02.0.0 rejects this.
4350 It does not let you subtract one const X* pointer from another in an arm
4351 of an if-expression whose if-part is not a constant expression */
4352 const char *g = "string";
4353 ccp = &g + (g ? g-g : 0);
4354 /* HPUX 7.0 cc rejects these. */
4355 ++ccp;
4356 p = (char**) ccp;
4357 ccp = (char const *const *) p;
4358 { /* SCO 3.2v4 cc rejects this. */
4359 char *t;
4360 char const *s = 0 ? (char *) 0 : (char const *) 0;
4362 *t++ = 0;
4364 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4365 int x[] = {25, 17};
4366 const int *foo = &x[0];
4367 ++foo;
4369 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4370 typedef const int *iptr;
4371 iptr p = 0;
4372 ++p;
4374 { /* AIX XL C 1.02.0.0 rejects this saying
4375 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4376 struct s { int j; const int *ap[3]; };
4377 struct s *b; b->j = 5;
4379 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4380 const int foo = 10;
4383 ; return 0; }
4385 if { (eval echo configure:4386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4386 rm -rf conftest*
4387 ac_cv_c_const=yes
4388 else
4389 echo "configure: failed program was:" >&5
4390 cat conftest.$ac_ext >&5
4391 rm -rf conftest*
4392 ac_cv_c_const=no
4394 rm -f conftest*
4397 echo "$ac_t""$ac_cv_c_const" 1>&6
4398 if test $ac_cv_c_const = no; then
4399 cat >> confdefs.h <<\EOF
4400 #define const
4405 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4406 echo "configure:4407: checking for off_t" >&5
4407 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4408 echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410 cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 #include <sys/types.h>
4414 #if STDC_HEADERS
4415 #include <stdlib.h>
4416 #include <stddef.h>
4417 #endif
4419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4420 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4421 rm -rf conftest*
4422 eval "ac_cv_type_off_t=yes"
4423 else
4424 rm -rf conftest*
4425 eval "ac_cv_type_off_t=no"
4427 rm -f conftest*
4430 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
4431 echo "$ac_t""yes" 1>&6
4432 else
4433 echo "$ac_t""no" 1>&6
4434 cat >> confdefs.h <<EOF
4435 #define off_t long
4440 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4441 echo "configure:4442: checking for size_t" >&5
4442 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4443 echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #include <sys/types.h>
4449 #if STDC_HEADERS
4450 #include <stdlib.h>
4451 #include <stddef.h>
4452 #endif
4454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4455 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4456 rm -rf conftest*
4457 eval "ac_cv_type_size_t=yes"
4458 else
4459 rm -rf conftest*
4460 eval "ac_cv_type_size_t=no"
4462 rm -f conftest*
4465 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
4466 echo "$ac_t""yes" 1>&6
4467 else
4468 echo "$ac_t""no" 1>&6
4469 cat >> confdefs.h <<EOF
4470 #define size_t unsigned
4475 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4476 # for constant arguments. Useless!
4477 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4478 echo "configure:4479: checking for working alloca.h" >&5
4479 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4480 echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482 cat > conftest.$ac_ext <<EOF
4483 #line 4484 "configure"
4484 #include "confdefs.h"
4485 #include <alloca.h>
4486 int main() {
4487 char *p = alloca(2 * sizeof(int));
4488 ; return 0; }
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4491 rm -rf conftest*
4492 ac_cv_header_alloca_h=yes
4493 else
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4496 rm -rf conftest*
4497 ac_cv_header_alloca_h=no
4499 rm -f conftest*
4502 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4503 if test $ac_cv_header_alloca_h = yes; then
4504 cat >> confdefs.h <<\EOF
4505 #define HAVE_ALLOCA_H 1
4510 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4511 echo "configure:4512: checking for alloca" >&5
4512 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4519 #ifdef __GNUC__
4520 # define alloca __builtin_alloca
4521 #else
4522 # ifdef _MSC_VER
4523 # include <malloc.h>
4524 # define alloca _alloca
4525 # else
4526 # if HAVE_ALLOCA_H
4527 # include <alloca.h>
4528 # else
4529 # ifdef _AIX
4530 #pragma alloca
4531 # else
4532 # ifndef alloca /* predefined by HP cc +Olibcalls */
4533 char *alloca ();
4534 # endif
4535 # endif
4536 # endif
4537 # endif
4538 #endif
4540 int main() {
4541 char *p = (char *) alloca(1);
4542 ; return 0; }
4544 if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4545 rm -rf conftest*
4546 ac_cv_func_alloca_works=yes
4547 else
4548 echo "configure: failed program was:" >&5
4549 cat conftest.$ac_ext >&5
4550 rm -rf conftest*
4551 ac_cv_func_alloca_works=no
4553 rm -f conftest*
4556 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4557 if test $ac_cv_func_alloca_works = yes; then
4558 cat >> confdefs.h <<\EOF
4559 #define HAVE_ALLOCA 1
4564 if test $ac_cv_func_alloca_works = no; then
4565 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4566 # that cause trouble. Some versions do not even contain alloca or
4567 # contain a buggy version. If you still want to use their alloca,
4568 # use ar to extract alloca.o from them instead of compiling alloca.c.
4569 ALLOCA=alloca.${ac_objext}
4570 cat >> confdefs.h <<\EOF
4571 #define C_ALLOCA 1
4575 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4576 echo "configure:4577: checking whether alloca needs Cray hooks" >&5
4577 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583 #if defined(CRAY) && ! defined(CRAY2)
4584 webecray
4585 #else
4586 wenotbecray
4587 #endif
4590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4591 egrep "webecray" >/dev/null 2>&1; then
4592 rm -rf conftest*
4593 ac_cv_os_cray=yes
4594 else
4595 rm -rf conftest*
4596 ac_cv_os_cray=no
4598 rm -f conftest*
4602 echo "$ac_t""$ac_cv_os_cray" 1>&6
4603 if test $ac_cv_os_cray = yes; then
4604 for ac_func in _getb67 GETB67 getb67; do
4605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4606 echo "configure:4607: checking for $ac_func" >&5
4607 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4608 echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610 cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 /* System header to define __stub macros and hopefully few prototypes,
4614 which can conflict with char $ac_func(); below. */
4615 #include <assert.h>
4616 /* Override any gcc2 internal prototype to avoid an error. */
4617 /* We use char because int might match the return type of a gcc2
4618 builtin and then its argument prototype would still apply. */
4619 char $ac_func();
4621 int main() {
4623 /* The GNU C library defines this for functions which it implements
4624 to always fail with ENOSYS. Some functions are actually named
4625 something starting with __ and the normal name is an alias. */
4626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4627 choke me
4628 #else
4629 $ac_func();
4630 #endif
4632 ; return 0; }
4634 if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4635 rm -rf conftest*
4636 eval "ac_cv_func_$ac_func=yes"
4637 else
4638 echo "configure: failed program was:" >&5
4639 cat conftest.$ac_ext >&5
4640 rm -rf conftest*
4641 eval "ac_cv_func_$ac_func=no"
4643 rm -f conftest*
4646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4647 echo "$ac_t""yes" 1>&6
4648 cat >> confdefs.h <<EOF
4649 #define CRAY_STACKSEG_END $ac_func
4652 break
4653 else
4654 echo "$ac_t""no" 1>&6
4657 done
4660 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4661 echo "configure:4662: checking stack direction for C alloca" >&5
4662 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4663 echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665 if test "$cross_compiling" = yes; then
4666 ac_cv_c_stack_direction=0
4667 else
4668 cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 find_stack_direction ()
4673 static char *addr = 0;
4674 auto char dummy;
4675 if (addr == 0)
4677 addr = &dummy;
4678 return find_stack_direction ();
4680 else
4681 return (&dummy > addr) ? 1 : -1;
4683 main ()
4685 exit (find_stack_direction() < 0);
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4689 then
4690 ac_cv_c_stack_direction=1
4691 else
4692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
4694 rm -fr conftest*
4695 ac_cv_c_stack_direction=-1
4697 rm -fr conftest*
4702 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4703 cat >> confdefs.h <<EOF
4704 #define STACK_DIRECTION $ac_cv_c_stack_direction
4710 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4711 unistd.h sys/param.h
4713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4715 echo "configure:4716: checking for $ac_hdr" >&5
4716 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4717 echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719 cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include <$ac_hdr>
4724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4725 { (eval echo configure:4726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4727 if test -z "$ac_err"; then
4728 rm -rf conftest*
4729 eval "ac_cv_header_$ac_safe=yes"
4730 else
4731 echo "$ac_err" >&5
4732 echo "configure: failed program was:" >&5
4733 cat conftest.$ac_ext >&5
4734 rm -rf conftest*
4735 eval "ac_cv_header_$ac_safe=no"
4737 rm -f conftest*
4739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4740 echo "$ac_t""yes" 1>&6
4741 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4742 cat >> confdefs.h <<EOF
4743 #define $ac_tr_hdr 1
4746 else
4747 echo "$ac_t""no" 1>&6
4749 done
4751 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4752 strdup __argz_count __argz_stringify __argz_next
4754 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4755 echo "configure:4756: checking for $ac_func" >&5
4756 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 /* System header to define __stub macros and hopefully few prototypes,
4763 which can conflict with char $ac_func(); below. */
4764 #include <assert.h>
4765 /* Override any gcc2 internal prototype to avoid an error. */
4766 /* We use char because int might match the return type of a gcc2
4767 builtin and then its argument prototype would still apply. */
4768 char $ac_func();
4770 int main() {
4772 /* The GNU C library defines this for functions which it implements
4773 to always fail with ENOSYS. Some functions are actually named
4774 something starting with __ and the normal name is an alias. */
4775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4776 choke me
4777 #else
4778 $ac_func();
4779 #endif
4781 ; return 0; }
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784 rm -rf conftest*
4785 eval "ac_cv_func_$ac_func=yes"
4786 else
4787 echo "configure: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4789 rm -rf conftest*
4790 eval "ac_cv_func_$ac_func=no"
4792 rm -f conftest*
4795 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4796 echo "$ac_t""yes" 1>&6
4797 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4798 cat >> confdefs.h <<EOF
4799 #define $ac_tr_func 1
4802 else
4803 echo "$ac_t""no" 1>&6
4805 done
4808 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4809 for ac_func in stpcpy
4811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4812 echo "configure:4813: checking for $ac_func" >&5
4813 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819 /* System header to define __stub macros and hopefully few prototypes,
4820 which can conflict with char $ac_func(); below. */
4821 #include <assert.h>
4822 /* Override any gcc2 internal prototype to avoid an error. */
4823 /* We use char because int might match the return type of a gcc2
4824 builtin and then its argument prototype would still apply. */
4825 char $ac_func();
4827 int main() {
4829 /* The GNU C library defines this for functions which it implements
4830 to always fail with ENOSYS. Some functions are actually named
4831 something starting with __ and the normal name is an alias. */
4832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4833 choke me
4834 #else
4835 $ac_func();
4836 #endif
4838 ; return 0; }
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841 rm -rf conftest*
4842 eval "ac_cv_func_$ac_func=yes"
4843 else
4844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 rm -rf conftest*
4847 eval "ac_cv_func_$ac_func=no"
4849 rm -f conftest*
4852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4853 echo "$ac_t""yes" 1>&6
4854 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4855 cat >> confdefs.h <<EOF
4856 #define $ac_tr_func 1
4859 else
4860 echo "$ac_t""no" 1>&6
4862 done
4865 if test "${ac_cv_func_stpcpy}" = "yes"; then
4866 cat >> confdefs.h <<\EOF
4867 #define HAVE_STPCPY 1
4872 if test $ac_cv_header_locale_h = yes; then
4873 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4874 echo "configure:4875: checking for LC_MESSAGES" >&5
4875 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4876 echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878 cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881 #include <locale.h>
4882 int main() {
4883 return LC_MESSAGES
4884 ; return 0; }
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887 rm -rf conftest*
4888 am_cv_val_LC_MESSAGES=yes
4889 else
4890 echo "configure: failed program was:" >&5
4891 cat conftest.$ac_ext >&5
4892 rm -rf conftest*
4893 am_cv_val_LC_MESSAGES=no
4895 rm -f conftest*
4898 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4899 if test $am_cv_val_LC_MESSAGES = yes; then
4900 cat >> confdefs.h <<\EOF
4901 #define HAVE_LC_MESSAGES 1
4906 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4907 echo "configure:4908: checking whether NLS is requested" >&5
4908 # Check whether --enable-nls or --disable-nls was given.
4909 if test "${enable_nls+set}" = set; then
4910 enableval="$enable_nls"
4911 USE_NLS=$enableval
4912 else
4913 USE_NLS=yes
4916 echo "$ac_t""$USE_NLS" 1>&6
4919 USE_INCLUDED_LIBINTL=no
4921 if test "$USE_NLS" = "yes"; then
4922 cat >> confdefs.h <<\EOF
4923 #define ENABLE_NLS 1
4926 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4927 echo "configure:4928: checking whether included gettext is requested" >&5
4928 # Check whether --with-included-gettext or --without-included-gettext was given.
4929 if test "${with_included_gettext+set}" = set; then
4930 withval="$with_included_gettext"
4931 nls_cv_force_use_gnu_gettext=$withval
4932 else
4933 nls_cv_force_use_gnu_gettext=no
4936 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
4938 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4939 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4940 nls_cv_header_intl=
4941 nls_cv_header_libgt=
4942 CATOBJEXT=NONE
4944 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4945 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4946 echo "configure:4947: checking for libintl.h" >&5
4947 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4948 echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950 cat > conftest.$ac_ext <<EOF
4951 #line 4952 "configure"
4952 #include "confdefs.h"
4953 #include <libintl.h>
4955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4956 { (eval echo configure:4957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4958 if test -z "$ac_err"; then
4959 rm -rf conftest*
4960 eval "ac_cv_header_$ac_safe=yes"
4961 else
4962 echo "$ac_err" >&5
4963 echo "configure: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 rm -rf conftest*
4966 eval "ac_cv_header_$ac_safe=no"
4968 rm -f conftest*
4970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4971 echo "$ac_t""yes" 1>&6
4972 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4973 echo "configure:4974: checking for gettext in libc" >&5
4974 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4975 echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977 cat > conftest.$ac_ext <<EOF
4978 #line 4979 "configure"
4979 #include "confdefs.h"
4980 #include <libintl.h>
4981 int main() {
4982 return (int) gettext ("")
4983 ; return 0; }
4985 if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4986 rm -rf conftest*
4987 gt_cv_func_gettext_libc=yes
4988 else
4989 echo "configure: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 rm -rf conftest*
4992 gt_cv_func_gettext_libc=no
4994 rm -f conftest*
4997 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4999 if test "$gt_cv_func_gettext_libc" != "yes"; then
5000 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5001 echo "configure:5002: checking for bindtextdomain in -lintl" >&5
5002 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
5003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5004 echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006 ac_save_LIBS="$LIBS"
5007 LIBS="-lintl $LIBS"
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error. */
5012 /* We use char because int might match the return type of a gcc2
5013 builtin and then its argument prototype would still apply. */
5014 char bindtextdomain();
5016 int main() {
5017 bindtextdomain()
5018 ; return 0; }
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021 rm -rf conftest*
5022 eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024 echo "configure: failed program was:" >&5
5025 cat conftest.$ac_ext >&5
5026 rm -rf conftest*
5027 eval "ac_cv_lib_$ac_lib_var=no"
5029 rm -f conftest*
5030 LIBS="$ac_save_LIBS"
5033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5034 echo "$ac_t""yes" 1>&6
5035 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5036 echo "configure:5037: checking for gettext in libintl" >&5
5037 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
5038 echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
5041 echo "configure:5042: checking for gettext in -lintl" >&5
5042 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
5043 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5044 echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046 ac_save_LIBS="$LIBS"
5047 LIBS="-lintl $LIBS"
5048 cat > conftest.$ac_ext <<EOF
5049 #line 5050 "configure"
5050 #include "confdefs.h"
5051 /* Override any gcc2 internal prototype to avoid an error. */
5052 /* We use char because int might match the return type of a gcc2
5053 builtin and then its argument prototype would still apply. */
5054 char gettext();
5056 int main() {
5057 gettext()
5058 ; return 0; }
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061 rm -rf conftest*
5062 eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064 echo "configure: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 rm -rf conftest*
5067 eval "ac_cv_lib_$ac_lib_var=no"
5069 rm -f conftest*
5070 LIBS="$ac_save_LIBS"
5073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5074 echo "$ac_t""yes" 1>&6
5075 gt_cv_func_gettext_libintl=yes
5076 else
5077 echo "$ac_t""no" 1>&6
5078 gt_cv_func_gettext_libintl=no
5083 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
5084 else
5085 echo "$ac_t""no" 1>&6
5090 if test "$gt_cv_func_gettext_libintl" = "yes"; then
5091 LIBS="-lintl $LIBS"
5094 if test "$gt_cv_func_gettext_libc" = "yes" \
5095 || test "$gt_cv_func_gettext_libintl" = "yes"; then
5096 cat >> confdefs.h <<\EOF
5097 #define HAVE_GETTEXT 1
5100 # Extract the first word of "msgfmt", so it can be a program name with args.
5101 set dummy msgfmt; ac_word=$2
5102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5103 echo "configure:5104: checking for $ac_word" >&5
5104 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5105 echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107 case "$MSGFMT" in
5109 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5112 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5113 for ac_dir in $PATH; do
5114 test -z "$ac_dir" && ac_dir=.
5115 if test -f $ac_dir/$ac_word; then
5116 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5117 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5118 break
5121 done
5122 IFS="$ac_save_ifs"
5123 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="no"
5125 esac
5127 MSGFMT="$gcc_cv_path_MSGFMT"
5128 if test -n "$MSGFMT"; then
5129 echo "$ac_t""$MSGFMT" 1>&6
5130 else
5131 echo "$ac_t""no" 1>&6
5133 if test "$MSGFMT" != "no"; then
5134 for ac_func in dcgettext
5136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5137 echo "configure:5138: checking for $ac_func" >&5
5138 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5139 echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141 cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144 /* System header to define __stub macros and hopefully few prototypes,
5145 which can conflict with char $ac_func(); below. */
5146 #include <assert.h>
5147 /* Override any gcc2 internal prototype to avoid an error. */
5148 /* We use char because int might match the return type of a gcc2
5149 builtin and then its argument prototype would still apply. */
5150 char $ac_func();
5152 int main() {
5154 /* The GNU C library defines this for functions which it implements
5155 to always fail with ENOSYS. Some functions are actually named
5156 something starting with __ and the normal name is an alias. */
5157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5158 choke me
5159 #else
5160 $ac_func();
5161 #endif
5163 ; return 0; }
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166 rm -rf conftest*
5167 eval "ac_cv_func_$ac_func=yes"
5168 else
5169 echo "configure: failed program was:" >&5
5170 cat conftest.$ac_ext >&5
5171 rm -rf conftest*
5172 eval "ac_cv_func_$ac_func=no"
5174 rm -f conftest*
5177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5178 echo "$ac_t""yes" 1>&6
5179 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5180 cat >> confdefs.h <<EOF
5181 #define $ac_tr_func 1
5184 else
5185 echo "$ac_t""no" 1>&6
5187 done
5189 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5190 set dummy gmsgfmt; ac_word=$2
5191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5192 echo "configure:5193: checking for $ac_word" >&5
5193 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5194 echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196 case "$GMSGFMT" in
5198 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5200 ?:/*)
5201 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5205 ac_dummy="$PATH"
5206 for ac_dir in $ac_dummy; do
5207 test -z "$ac_dir" && ac_dir=.
5208 if test -f $ac_dir/$ac_word; then
5209 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5210 break
5212 done
5213 IFS="$ac_save_ifs"
5214 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5216 esac
5218 GMSGFMT="$gcc_cv_path_GMSGFMT"
5219 if test -n "$GMSGFMT"; then
5220 echo "$ac_t""$GMSGFMT" 1>&6
5221 else
5222 echo "$ac_t""no" 1>&6
5225 # Extract the first word of "xgettext", so it can be a program name with args.
5226 set dummy xgettext; ac_word=$2
5227 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5228 echo "configure:5229: checking for $ac_word" >&5
5229 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5230 echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232 case "$XGETTEXT" in
5234 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5237 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5238 for ac_dir in $PATH; do
5239 test -z "$ac_dir" && ac_dir=.
5240 if test -f $ac_dir/$ac_word; then
5241 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5242 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5243 break
5246 done
5247 IFS="$ac_save_ifs"
5248 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5250 esac
5252 XGETTEXT="$gcc_cv_path_XGETTEXT"
5253 if test -n "$XGETTEXT"; then
5254 echo "$ac_t""$XGETTEXT" 1>&6
5255 else
5256 echo "$ac_t""no" 1>&6
5259 cat > conftest.$ac_ext <<EOF
5260 #line 5261 "configure"
5261 #include "confdefs.h"
5263 int main() {
5264 extern int _nl_msg_cat_cntr;
5265 return _nl_msg_cat_cntr
5266 ; return 0; }
5268 if { (eval echo configure:5269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5269 rm -rf conftest*
5270 CATOBJEXT=.gmo
5271 DATADIRNAME=share
5272 else
5273 echo "configure: failed program was:" >&5
5274 cat conftest.$ac_ext >&5
5275 rm -rf conftest*
5276 CATOBJEXT=.mo
5277 DATADIRNAME=lib
5279 rm -f conftest*
5280 INSTOBJEXT=.mo
5281 else
5282 create_catalogs="no"
5286 else
5287 echo "$ac_t""no" 1>&6
5291 if test "$CATOBJEXT" = "NONE"; then
5292 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
5293 echo "configure:5294: checking whether catgets can be used" >&5
5294 # Check whether --with-catgets or --without-catgets was given.
5295 if test "${with_catgets+set}" = set; then
5296 withval="$with_catgets"
5297 nls_cv_use_catgets=$withval
5298 else
5299 nls_cv_use_catgets=no
5302 echo "$ac_t""$nls_cv_use_catgets" 1>&6
5304 if test "$nls_cv_use_catgets" = "yes"; then
5305 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
5306 echo "configure:5307: checking for main in -li" >&5
5307 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
5308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5309 echo $ac_n "(cached) $ac_c" 1>&6
5310 else
5311 ac_save_LIBS="$LIBS"
5312 LIBS="-li $LIBS"
5313 cat > conftest.$ac_ext <<EOF
5314 #line 5315 "configure"
5315 #include "confdefs.h"
5317 int main() {
5318 main()
5319 ; return 0; }
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322 rm -rf conftest*
5323 eval "ac_cv_lib_$ac_lib_var=yes"
5324 else
5325 echo "configure: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 rm -rf conftest*
5328 eval "ac_cv_lib_$ac_lib_var=no"
5330 rm -f conftest*
5331 LIBS="$ac_save_LIBS"
5334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5335 echo "$ac_t""yes" 1>&6
5336 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5337 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5338 cat >> confdefs.h <<EOF
5339 #define $ac_tr_lib 1
5342 LIBS="-li $LIBS"
5344 else
5345 echo "$ac_t""no" 1>&6
5348 echo $ac_n "checking for catgets""... $ac_c" 1>&6
5349 echo "configure:5350: checking for catgets" >&5
5350 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
5351 echo $ac_n "(cached) $ac_c" 1>&6
5352 else
5353 cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356 /* System header to define __stub macros and hopefully few prototypes,
5357 which can conflict with char catgets(); below. */
5358 #include <assert.h>
5359 /* Override any gcc2 internal prototype to avoid an error. */
5360 /* We use char because int might match the return type of a gcc2
5361 builtin and then its argument prototype would still apply. */
5362 char catgets();
5364 int main() {
5366 /* The GNU C library defines this for functions which it implements
5367 to always fail with ENOSYS. Some functions are actually named
5368 something starting with __ and the normal name is an alias. */
5369 #if defined (__stub_catgets) || defined (__stub___catgets)
5370 choke me
5371 #else
5372 catgets();
5373 #endif
5375 ; return 0; }
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378 rm -rf conftest*
5379 eval "ac_cv_func_catgets=yes"
5380 else
5381 echo "configure: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 rm -rf conftest*
5384 eval "ac_cv_func_catgets=no"
5386 rm -f conftest*
5389 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5391 cat >> confdefs.h <<\EOF
5392 #define HAVE_CATGETS 1
5395 INTLOBJS="\$(CATOBJS)"
5396 # Extract the first word of "gencat", so it can be a program name with args.
5397 set dummy gencat; ac_word=$2
5398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_word" >&5
5400 if eval "test \"`echo '$''{'gcc_cv_path_GENCAT'+set}'`\" = set"; then
5401 echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403 case "$GENCAT" in
5405 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
5407 ?:/*)
5408 gcc_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
5411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5412 ac_dummy="$PATH"
5413 for ac_dir in $ac_dummy; do
5414 test -z "$ac_dir" && ac_dir=.
5415 if test -f $ac_dir/$ac_word; then
5416 gcc_cv_path_GENCAT="$ac_dir/$ac_word"
5417 break
5419 done
5420 IFS="$ac_save_ifs"
5421 test -z "$gcc_cv_path_GENCAT" && gcc_cv_path_GENCAT="no"
5423 esac
5425 GENCAT="$gcc_cv_path_GENCAT"
5426 if test -n "$GENCAT"; then
5427 echo "$ac_t""$GENCAT" 1>&6
5428 else
5429 echo "$ac_t""no" 1>&6
5431 if test "$GENCAT" != "no"; then
5432 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5433 set dummy gmsgfmt; ac_word=$2
5434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5435 echo "configure:5436: checking for $ac_word" >&5
5436 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5437 echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439 case "$GMSGFMT" in
5441 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5443 ?:/*)
5444 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5447 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5448 ac_dummy="$PATH"
5449 for ac_dir in $ac_dummy; do
5450 test -z "$ac_dir" && ac_dir=.
5451 if test -f $ac_dir/$ac_word; then
5452 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5453 break
5455 done
5456 IFS="$ac_save_ifs"
5457 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="no"
5459 esac
5461 GMSGFMT="$gcc_cv_path_GMSGFMT"
5462 if test -n "$GMSGFMT"; then
5463 echo "$ac_t""$GMSGFMT" 1>&6
5464 else
5465 echo "$ac_t""no" 1>&6
5468 if test "$GMSGFMT" = "no"; then
5469 # Extract the first word of "msgfmt", so it can be a program name with args.
5470 set dummy msgfmt; ac_word=$2
5471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5472 echo "configure:5473: checking for $ac_word" >&5
5473 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5474 echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476 case "$GMSGFMT" in
5478 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5481 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5482 for ac_dir in $PATH; do
5483 test -z "$ac_dir" && ac_dir=.
5484 if test -f $ac_dir/$ac_word; then
5485 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5486 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5487 break
5490 done
5491 IFS="$ac_save_ifs"
5492 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="msgfmt"
5494 esac
5496 GMSGFMT="$gcc_cv_path_GMSGFMT"
5497 if test -n "$GMSGFMT"; then
5498 echo "$ac_t""$GMSGFMT" 1>&6
5499 else
5500 echo "$ac_t""no" 1>&6
5503 if test "$GMSGFMT" = "msgfmt"; then
5504 create_catalogs="no"
5507 # Extract the first word of "xgettext", so it can be a program name with args.
5508 set dummy xgettext; ac_word=$2
5509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5510 echo "configure:5511: checking for $ac_word" >&5
5511 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5512 echo $ac_n "(cached) $ac_c" 1>&6
5513 else
5514 case "$XGETTEXT" in
5516 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5519 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5520 for ac_dir in $PATH; do
5521 test -z "$ac_dir" && ac_dir=.
5522 if test -f $ac_dir/$ac_word; then
5523 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5524 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5525 break
5528 done
5529 IFS="$ac_save_ifs"
5530 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5532 esac
5534 XGETTEXT="$gcc_cv_path_XGETTEXT"
5535 if test -n "$XGETTEXT"; then
5536 echo "$ac_t""$XGETTEXT" 1>&6
5537 else
5538 echo "$ac_t""no" 1>&6
5541 USE_INCLUDED_LIBINTL=yes
5542 CATOBJEXT=.cat
5543 INSTOBJEXT=.cat
5544 DATADIRNAME=lib
5545 INTLDEPS='$(top_builddir)/intl/libintl.a'
5546 INTLLIBS=$INTLDEPS
5547 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5548 nls_cv_header_intl=intl/libintl.h
5549 nls_cv_header_libgt=intl/libgettext.h
5551 else
5552 echo "$ac_t""no" 1>&6
5558 if test "$CATOBJEXT" = "NONE"; then
5559 nls_cv_use_gnu_gettext=yes
5563 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5564 INTLOBJS="\$(GETTOBJS)"
5565 # Extract the first word of "msgfmt", so it can be a program name with args.
5566 set dummy msgfmt; ac_word=$2
5567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5568 echo "configure:5569: checking for $ac_word" >&5
5569 if eval "test \"`echo '$''{'gcc_cv_path_MSGFMT'+set}'`\" = set"; then
5570 echo $ac_n "(cached) $ac_c" 1>&6
5571 else
5572 case "$MSGFMT" in
5574 gcc_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5577 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5578 for ac_dir in $PATH; do
5579 test -z "$ac_dir" && ac_dir=.
5580 if test -f $ac_dir/$ac_word; then
5581 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
5582 gcc_cv_path_MSGFMT="$ac_dir/$ac_word"
5583 break
5586 done
5587 IFS="$ac_save_ifs"
5588 test -z "$gcc_cv_path_MSGFMT" && gcc_cv_path_MSGFMT="msgfmt"
5590 esac
5592 MSGFMT="$gcc_cv_path_MSGFMT"
5593 if test -n "$MSGFMT"; then
5594 echo "$ac_t""$MSGFMT" 1>&6
5595 else
5596 echo "$ac_t""no" 1>&6
5599 # Extract the first word of "gmsgfmt", so it can be a program name with args.
5600 set dummy gmsgfmt; ac_word=$2
5601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5602 echo "configure:5603: checking for $ac_word" >&5
5603 if eval "test \"`echo '$''{'gcc_cv_path_GMSGFMT'+set}'`\" = set"; then
5604 echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606 case "$GMSGFMT" in
5608 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
5610 ?:/*)
5611 gcc_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
5614 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5615 ac_dummy="$PATH"
5616 for ac_dir in $ac_dummy; do
5617 test -z "$ac_dir" && ac_dir=.
5618 if test -f $ac_dir/$ac_word; then
5619 gcc_cv_path_GMSGFMT="$ac_dir/$ac_word"
5620 break
5622 done
5623 IFS="$ac_save_ifs"
5624 test -z "$gcc_cv_path_GMSGFMT" && gcc_cv_path_GMSGFMT="$MSGFMT"
5626 esac
5628 GMSGFMT="$gcc_cv_path_GMSGFMT"
5629 if test -n "$GMSGFMT"; then
5630 echo "$ac_t""$GMSGFMT" 1>&6
5631 else
5632 echo "$ac_t""no" 1>&6
5635 if test "$MSGFMT" = "msgfmt" && test "$GMSGFMT" = "msgfmt"; then
5636 create_catalogs="no"
5638 # Extract the first word of "xgettext", so it can be a program name with args.
5639 set dummy xgettext; ac_word=$2
5640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5641 echo "configure:5642: checking for $ac_word" >&5
5642 if eval "test \"`echo '$''{'gcc_cv_path_XGETTEXT'+set}'`\" = set"; then
5643 echo $ac_n "(cached) $ac_c" 1>&6
5644 else
5645 case "$XGETTEXT" in
5647 gcc_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5651 for ac_dir in $PATH; do
5652 test -z "$ac_dir" && ac_dir=.
5653 if test -f $ac_dir/$ac_word; then
5654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5655 gcc_cv_path_XGETTEXT="$ac_dir/$ac_word"
5656 break
5659 done
5660 IFS="$ac_save_ifs"
5661 test -z "$gcc_cv_path_XGETTEXT" && gcc_cv_path_XGETTEXT=":"
5663 esac
5665 XGETTEXT="$gcc_cv_path_XGETTEXT"
5666 if test -n "$XGETTEXT"; then
5667 echo "$ac_t""$XGETTEXT" 1>&6
5668 else
5669 echo "$ac_t""no" 1>&6
5673 USE_INCLUDED_LIBINTL=yes
5674 CATOBJEXT=.gmo
5675 INSTOBJEXT=.mo
5676 DATADIRNAME=share
5677 INTLDEPS='$(top_builddir)/intl/libintl.a'
5678 INTLLIBS=$INTLDEPS
5679 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5680 nls_cv_header_intl=intl/libintl.h
5681 nls_cv_header_libgt=intl/libgettext.h
5684 if test "$XGETTEXT" != ":"; then
5685 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5687 else
5688 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
5689 XGETTEXT=":"
5695 # We need to process the po/ directory.
5696 POSUB=po
5697 else
5698 DATADIRNAME=share
5699 nls_cv_header_intl=intl/libintl.h
5700 nls_cv_header_libgt=intl/libgettext.h
5706 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5707 # because some of the sources are only built for this goal.
5708 if test "$PACKAGE" = gettext; then
5709 USE_NLS=yes
5710 USE_INCLUDED_LIBINTL=yes
5713 for lang in $ALL_LINGUAS; do
5714 GMOFILES="$GMOFILES $lang.gmo"
5715 POFILES="$POFILES $lang.po"
5716 done
5731 if test "x$create_catalogs" = "xno"; then
5732 echo "configure: warning: No program for building catalogs found -> building disabled" 1>&2
5735 if test "x$CATOBJEXT" != "x" && test "x$create_catalogs" != "xno" ; then
5736 if test "x$ALL_LINGUAS" = "x"; then
5737 LINGUAS=
5738 else
5739 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5740 echo "configure:5741: checking for catalogs to be installed" >&5
5741 if test "x$LINGUAS" = "x"; then
5742 LINGUAS=$ALL_LINGUAS
5743 else
5744 NEW_LINGUAS=
5745 for lang in $ALL_LINGUAS; do
5746 case " $LINGUAS " in
5747 *" $lang "*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5748 esac
5749 done
5750 LINGUAS=$NEW_LINGUAS
5752 echo "$ac_t""$LINGUAS" 1>&6
5755 if test -n "$LINGUAS"; then
5756 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5760 if test $ac_cv_header_locale_h = yes; then
5761 INCLUDE_LOCALE_H="#include <locale.h>"
5762 else
5763 INCLUDE_LOCALE_H="\
5764 /* The system does not provide the header <locale.h>. Take care yourself. */"
5768 test -d intl || mkdir intl
5769 if test "$CATOBJEXT" = ".cat"; then
5770 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5771 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5772 echo "configure:5773: checking for linux/version.h" >&5
5773 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5774 echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776 cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 #include <linux/version.h>
5781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5782 { (eval echo configure:5783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5784 if test -z "$ac_err"; then
5785 rm -rf conftest*
5786 eval "ac_cv_header_$ac_safe=yes"
5787 else
5788 echo "$ac_err" >&5
5789 echo "configure: failed program was:" >&5
5790 cat conftest.$ac_ext >&5
5791 rm -rf conftest*
5792 eval "ac_cv_header_$ac_safe=no"
5794 rm -f conftest*
5796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5797 echo "$ac_t""yes" 1>&6
5798 msgformat=linux
5799 else
5800 echo "$ac_t""no" 1>&6
5801 msgformat=xopen
5805 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
5807 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5808 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
5810 if test "$PACKAGE" = "gettext"; then
5811 GT_NO="#NO#"
5812 GT_YES=
5813 else
5814 GT_NO=
5815 GT_YES="#YES#"
5820 MKINSTALLDIRS=
5821 if test -n "$ac_aux_dir"; then
5822 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5824 if test -z "$MKINSTALLDIRS"; then
5825 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5832 test -d po || mkdir po
5833 if test "x$srcdir" != "x."; then
5834 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5835 posrcprefix="$srcdir/"
5836 else
5837 posrcprefix="../$srcdir/"
5839 else
5840 posrcprefix="../"
5842 rm -f po/POTFILES
5843 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5844 < $srcdir/po/POTFILES.in > po/POTFILES
5846 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
5848 # Windows32 Registry support for specifying GCC installation paths.
5849 # Check whether --enable-win32-registry or --disable-win32-registry was given.
5850 if test "${enable_win32_registry+set}" = set; then
5851 enableval="$enable_win32_registry"
5856 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
5857 echo "configure:5858: checking whether windows registry support is requested" >&5
5858 if test x$enable_win32_registry != xno; then
5859 cat >> confdefs.h <<\EOF
5860 #define ENABLE_WIN32_REGISTRY 1
5863 echo "$ac_t""yes" 1>&6
5864 else
5865 echo "$ac_t""no" 1>&6
5868 # Check if user specified a different registry key.
5869 case x${enable_win32_registry} in
5870 x | xyes)
5871 # default.
5872 gcc_cv_win32_registry_key="$VERSION"
5874 xno)
5875 # no registry lookup.
5876 gcc_cv_win32_registry_key=''
5879 # user-specified key.
5880 gcc_cv_win32_registry_key="$enable_win32_registry"
5882 esac
5884 if test x$enable_win32_registry != xno; then
5885 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
5886 echo "configure:5887: checking registry key on windows hosts" >&5
5887 cat >> confdefs.h <<EOF
5888 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
5891 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
5894 # Get an absolute path to the GCC top-level source directory
5895 holddir=`pwd`
5896 cd $srcdir
5897 topdir=`pwd`
5898 cd $holddir
5900 # Conditionalize the makefile for this host machine.
5901 # Make-host contains the concatenation of all host makefile fragments
5902 # [there can be more than one]. This file is built by configure.frag.
5903 host_overrides=Make-host
5904 dep_host_xmake_file=
5905 for f in .. ${host_xmake_file}
5907 if test -f ${srcdir}/config/$f
5908 then
5909 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
5911 done
5913 # Conditionalize the makefile for this target machine.
5914 # Make-target contains the concatenation of all host makefile fragments
5915 # [there can be more than one]. This file is built by configure.frag.
5916 target_overrides=Make-target
5917 dep_tmake_file=
5918 for f in .. ${tmake_file}
5920 if test -f ${srcdir}/config/$f
5921 then
5922 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
5924 done
5926 # If the host doesn't support symlinks, modify CC in
5927 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
5928 # Otherwise, we can use "CC=$(CC)".
5929 rm -f symtest.tem
5930 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
5931 then
5932 cc_set_by_configure="\$(CC)"
5933 quoted_cc_set_by_configure="\$(CC)"
5934 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
5935 else
5936 rm -f symtest.tem
5937 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
5938 then
5939 symbolic_link="cp -p"
5940 else
5941 symbolic_link="cp"
5943 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5944 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
5945 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
5947 rm -f symtest.tem
5949 out_object_file=`basename $out_file .c`.o
5951 tm_file_list=
5952 for f in $tm_file; do
5953 case $f in
5954 gansidecl.h | defaults.h )
5955 tm_file_list="${tm_file_list} $f" ;;
5956 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
5957 esac
5958 done
5960 tm_p_file_list=
5961 for f in $tm_p_file; do
5962 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
5963 done
5965 host_xm_file_list=
5966 for f in $host_xm_file; do
5967 case $f in
5968 auto-host.h | gansidecl.h | defaults.h | hwint.h )
5969 host_xm_file_list="${host_xm_file_list} $f" ;;
5970 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
5971 esac
5972 done
5974 build_xm_file_list=
5975 for f in $build_xm_file; do
5976 case $f in
5977 auto-build.h | auto-host.h | gansidecl.h | defaults.h | hwint.h )
5978 build_xm_file_list="${build_xm_file_list} $f" ;;
5979 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
5980 esac
5981 done
5983 # Define macro CROSS_COMPILE in compilation
5984 # if this is a cross-compiler.
5985 # Also use all.cross instead of all.internal
5986 # and add cross-make to Makefile.
5987 cross_overrides="/dev/null"
5988 if test x$host != x$target
5989 then
5990 cross_defines="CROSS=-DCROSS_COMPILE"
5991 cross_overrides="${topdir}/cross-make"
5994 # If this is a cross-compiler that does not
5995 # have its own set of headers then define
5996 # inhibit_libc
5998 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
5999 # This prevents libgcc2 from containing any code which requires libc
6000 # support.
6001 inhibit_libc=
6002 if test x$host != x$target && test x$with_headers = x; then
6003 inhibit_libc=-Dinhibit_libc
6004 else
6005 if test x$with_newlib = xyes; then
6006 inhibit_libc=-Dinhibit_libc
6011 # When building gcc with a cross-compiler, we need to fix a few things.
6012 # This must come after cross-make as we want all.build to override
6013 # all.cross.
6014 build_overrides="/dev/null"
6015 if test x$build != x$host
6016 then
6017 build_overrides="${topdir}/build-make"
6020 # Expand extra_headers to include complete path.
6021 # This substitutes for lots of t-* files.
6022 extra_headers_list=
6023 if test "x$extra_headers" = x
6024 then true
6025 else
6026 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6027 for file in $extra_headers;
6029 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6030 done
6033 if test x$use_collect2 = xno; then
6034 use_collect2=
6037 # Add a definition of USE_COLLECT2 if system wants one.
6038 # Also tell toplev.c what to do.
6039 # This substitutes for lots of t-* files.
6040 if test x$use_collect2 = x
6041 then
6042 will_use_collect2=
6043 maybe_use_collect2=
6044 else
6045 will_use_collect2="collect2"
6046 maybe_use_collect2="-DUSE_COLLECT2"
6049 # If we have gas in the build tree, make a link to it.
6050 if test -f ../gas/Makefile; then
6051 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6054 # If we have nm in the build tree, make a link to it.
6055 if test -f ../binutils/Makefile; then
6056 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
6059 # If we have ld in the build tree, make a link to it.
6060 if test -f ../ld/Makefile; then
6061 # if test x$use_collect2 = x; then
6062 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
6063 # else
6064 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
6065 # fi
6068 # Figure out what assembler we will be using.
6069 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
6070 echo "configure:6071: checking what assembler to use" >&5
6071 gcc_cv_as=
6072 gcc_cv_gas_major_version=
6073 gcc_cv_gas_minor_version=
6074 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
6075 if test -x "$DEFAULT_ASSEMBLER"; then
6076 gcc_cv_as="$DEFAULT_ASSEMBLER"
6077 elif test -x "$AS"; then
6078 gcc_cv_as="$AS"
6079 elif test -x as$host_exeext; then
6080 # Build using assembler in the current directory.
6081 gcc_cv_as=./as$host_exeext
6082 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6083 # Single tree build which includes gas.
6084 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
6086 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6087 if test x$gcc_cv_gas_version != x; then
6088 break
6090 done
6091 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6092 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
6095 if test "x$gcc_cv_as" = x -a x$host = x$target; then
6096 # Native build.
6097 # Search the same directories that the installed compiler will
6098 # search. Else we may find the wrong assembler and lose. If we
6099 # do not find a suitable assembler binary, then try the user's
6100 # path.
6102 # Also note we have to check MD_EXEC_PREFIX before checking the
6103 # user's path. Unfortunately, there is no good way to get at the
6104 # value of MD_EXEC_PREFIX here. So we do a brute force search
6105 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6106 # to be fixed as part of the make/configure rewrite too.
6108 if test "x$exec_prefix" = xNONE; then
6109 if test "x$prefix" = xNONE; then
6110 test_prefix=/usr/local
6111 else
6112 test_prefix=$prefix
6114 else
6115 test_prefix=$exec_prefix
6118 # If the loop below does not find an assembler, then use whatever
6119 # one we can find in the users's path.
6120 # user's path.
6121 gcc_cv_as=as$host_exeext
6123 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6124 $test_prefix/lib/gcc-lib/$target \
6125 /usr/lib/gcc/$target/$gcc_version \
6126 /usr/lib/gcc/$target \
6127 $test_prefix/$target/bin/$target/$gcc_version \
6128 $test_prefix/$target/bin \
6129 /usr/libexec \
6130 /usr/ccs/gcc \
6131 /usr/ccs/bin \
6132 /udk/usr/ccs/bin \
6133 /bsd43/usr/lib/cmplrs/cc \
6134 /usr/cross64/usr/bin \
6135 /usr/lib/cmplrs/cc \
6136 /sysv/usr/lib/cmplrs/cc \
6137 /svr4/usr/lib/cmplrs/cc \
6138 /usr/bin"
6140 for dir in $test_dirs; do
6141 if test -f $dir/as$host_exeext; then
6142 gcc_cv_as=$dir/as$host_exeext
6143 break;
6145 done
6147 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6148 echo "$ac_t"""newly built gas"" 1>&6
6149 else
6150 echo "$ac_t""$gcc_cv_as" 1>&6
6153 # Figure out what nm we will be using.
6154 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
6155 echo "configure:6156: checking what nm to use" >&5
6156 if test -x nm$host_exeext; then
6157 gcc_cv_nm=./nm$host_exeext
6158 elif test x$host = x$target; then
6159 # Native build.
6160 gcc_cv_nm=nm$host_exeext
6162 echo "$ac_t""$gcc_cv_nm" 1>&6
6164 # Figure out what assembler alignment features are present.
6165 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
6166 echo "configure:6167: checking assembler alignment features" >&5
6167 gcc_cv_as_alignment_features=none
6168 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6169 # Gas version 2.6 and later support for .balign and .p2align.
6170 # bytes to skip when using .p2align.
6171 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
6172 gcc_cv_as_alignment_features=".balign and .p2align"
6173 cat >> confdefs.h <<\EOF
6174 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6178 # Gas version 2.8 and later support specifying the maximum
6179 # bytes to skip when using .p2align.
6180 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
6181 gcc_cv_as_alignment_features=".p2align including maximum skip"
6182 cat >> confdefs.h <<\EOF
6183 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6187 elif test x$gcc_cv_as != x; then
6188 # Check if we have .balign and .p2align
6189 echo ".balign 4" > conftest.s
6190 echo ".p2align 2" >> conftest.s
6191 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6192 gcc_cv_as_alignment_features=".balign and .p2align"
6193 cat >> confdefs.h <<\EOF
6194 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6198 rm -f conftest.s conftest.o
6199 # Check if specifying the maximum bytes to skip when
6200 # using .p2align is supported.
6201 echo ".p2align 4,,7" > conftest.s
6202 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6203 gcc_cv_as_alignment_features=".p2align including maximum skip"
6204 cat >> confdefs.h <<\EOF
6205 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6209 rm -f conftest.s conftest.o
6211 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6213 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
6214 echo "configure:6215: checking assembler subsection support" >&5
6215 gcc_cv_as_subsections=no
6216 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6217 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
6218 gcc_cv_as_subsections="working .subsection -1"
6220 elif test x$gcc_cv_as != x; then
6221 # Check if we have .subsection
6222 echo ".subsection 1" > conftest.s
6223 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6224 gcc_cv_as_subsections=".subsection"
6225 if test x$gcc_cv_nm != x; then
6226 cat > conftest.s <<EOF
6227 conftest_label1: .word 0
6228 .subsection -1
6229 conftest_label2: .word 0
6230 .previous
6232 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6233 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6234 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
6235 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6237 else
6238 gcc_cv_as_subsections="working .subsection -1"
6243 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6245 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6246 cat >> confdefs.h <<\EOF
6247 #define HAVE_GAS_SUBSECTION_ORDERING 1
6251 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6253 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
6254 echo "configure:6255: checking assembler weak support" >&5
6255 gcc_cv_as_weak=no
6256 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6257 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
6258 gcc_cv_as_weak="yes"
6260 elif test x$gcc_cv_as != x; then
6261 # Check if we have .weak
6262 echo " .weak foobar" > conftest.s
6263 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6264 gcc_cv_as_weak="yes"
6266 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6268 if test x"$gcc_cv_as_weak" = xyes; then
6269 cat >> confdefs.h <<\EOF
6270 #define HAVE_GAS_WEAK 1
6274 echo "$ac_t""$gcc_cv_as_weak" 1>&6
6276 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
6277 echo "configure:6278: checking assembler hidden support" >&5
6278 gcc_cv_as_hidden=no
6279 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6280 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
6281 gcc_cv_as_hidden="yes"
6283 elif test x$gcc_cv_as != x; then
6284 # Check if we have .hidden
6285 echo " .hidden foobar" > conftest.s
6286 echo "foobar:" >> conftest.s
6287 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6288 gcc_cv_as_hidden="yes"
6290 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6292 if test x"$gcc_cv_as_hidden" = xyes; then
6293 cat >> confdefs.h <<\EOF
6294 #define HAVE_GAS_HIDDEN 1
6298 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
6300 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
6301 echo "configure:6302: checking assembler leb128 support" >&5
6302 gcc_cv_as_leb128=no
6303 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6304 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
6305 gcc_cv_as_leb128="yes"
6307 elif test x$gcc_cv_as != x; then
6308 # Check if we have .[us]leb128, and support symbol arithmetic with it.
6309 cat > conftest.s <<EOF
6310 .data
6311 .uleb128 L2 - L1
6313 .uleb128 1280
6314 .sleb128 -1010
6317 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6318 gcc_cv_as_leb128="yes"
6320 # GAS versions before 2.11 do not support uleb128,
6321 # despite appearing to.
6322 # ??? There exists an elf-specific test that will crash
6323 # the assembler. Perhaps it's better to figure out whether
6324 # arbitrary sections are supported and try the test.
6325 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
6326 if echo "$as_ver" | grep GNU > /dev/null; then
6327 as_ver=`echo $as_ver | sed -e 's/.* //'`
6328 as_major=`echo $as_ver | sed 's/\..*//'`
6329 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
6330 if test $as_major -eq 2 -a $as_minor -lt 11; then
6331 gcc_cv_as_leb128="no"
6335 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6337 if test x"$gcc_cv_as_leb128" = xyes; then
6338 cat >> confdefs.h <<\EOF
6339 #define HAVE_AS_LEB128 1
6343 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
6345 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
6346 echo "configure:6347: checking assembler eh_frame optimization" >&5
6347 gcc_cv_as_eh_frame=no
6348 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6349 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
6350 gcc_cv_as_eh_frame="yes"
6352 elif test x$gcc_cv_as != x; then
6353 # Check if this is GAS.
6354 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
6355 rm -f a.out 2> /dev/null
6356 if echo "$as_ver" | grep GNU > /dev/null; then
6357 # Versions up to and including 2.11.0 may mis-optimize
6358 # .eh_frame data. Try something.
6359 cat > conftest.s <<EOF
6360 .text
6361 .LFB1:
6362 .4byte 0
6363 .L1:
6364 .4byte 0
6365 .LFE1:
6366 .section .eh_frame,"aw",@progbits
6367 __FRAME_BEGIN__:
6368 .4byte .LECIE1-.LSCIE1
6369 .LSCIE1:
6370 .4byte 0x0
6371 .byte 0x1
6372 .ascii "z\0"
6373 .byte 0x1
6374 .byte 0x78
6375 .byte 0x1a
6376 .byte 0x0
6377 .byte 0x4
6378 .4byte 1
6379 .p2align 1
6380 .LECIE1:
6381 .LSFDE1:
6382 .4byte .LEFDE1-.LASFDE1
6383 .LASFDE1:
6384 .4byte .LASFDE1-__FRAME_BEGIN__
6385 .4byte .LFB1
6386 .4byte .LFE1-.LFB1
6387 .byte 0x4
6388 .4byte .LFE1-.LFB1
6389 .byte 0x4
6390 .4byte .L1-.LFB1
6391 .LEFDE1:
6393 cat > conftest.exp <<EOF
6394 0000 10000000 00000000 017a0001 781a0004 .........z..x...
6395 0010 01000000 12000000 18000000 00000000 ................
6396 0020 08000000 04080000 0044 .........D
6398 # If the assembler didn't choke, and we can objdump,
6399 # and we got the correct data, then succeed.
6400 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6401 && objdump -s -j .eh_frame conftest.o 2>/dev/null \
6402 | tail -3 > conftest.got \
6403 && cmp conftest.exp conftest.got > /dev/null 2>&1
6404 then
6405 gcc_cv_as_eh_frame="yes"
6406 else
6407 gcc_cv_as_eh_frame="bad"
6408 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
6409 cat >> confdefs.h <<\EOF
6410 #define USE_AS_TRADITIONAL_FORMAT 1
6416 rm -f conftest.*
6418 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
6420 case "$target" in
6421 sparc*-*-*)
6422 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
6423 echo "configure:6424: checking assembler .register pseudo-op support" >&5
6424 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6428 gcc_cv_as_register_pseudo_op=unknown
6429 if test x$gcc_cv_as != x; then
6430 # Check if we have .register
6431 echo ".register %g2, #scratch" > conftest.s
6432 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6433 gcc_cv_as_register_pseudo_op=yes
6434 else
6435 gcc_cv_as_register_pseudo_op=no
6437 rm -f conftest.s conftest.o
6442 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
6443 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
6444 cat >> confdefs.h <<\EOF
6445 #define HAVE_AS_REGISTER_PSEUDO_OP 1
6450 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
6451 echo "configure:6452: checking assembler supports -relax" >&5
6452 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
6453 echo $ac_n "(cached) $ac_c" 1>&6
6454 else
6456 gcc_cv_as_relax_opt=unknown
6457 if test x$gcc_cv_as != x; then
6458 # Check if gas supports -relax
6459 echo ".text" > conftest.s
6460 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
6461 gcc_cv_as_relax_opt=yes
6462 else
6463 gcc_cv_as_relax_opt=no
6465 rm -f conftest.s conftest.o
6470 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
6471 if test "x$gcc_cv_as_relax_opt" = xyes; then
6472 cat >> confdefs.h <<\EOF
6473 #define HAVE_AS_RELAX_OPTION 1
6478 case "$tm_file" in
6479 *64*)
6480 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
6481 echo "configure:6482: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
6482 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
6483 echo $ac_n "(cached) $ac_c" 1>&6
6484 else
6486 if test -n "$gcc_cv_as"; then
6487 echo ".xword foo" > conftest.s
6488 gcc_cv_as_flags64=no
6489 for flag in "-xarch=v9" "-64 -Av9"; do
6490 if $gcc_cv_as $flag -o conftest.o conftest.s \
6491 > /dev/null 2>&1; then
6492 gcc_cv_as_flags64=$flag
6493 break
6495 done
6496 rm -f conftest.s conftest.o
6497 else
6498 if test "$gas" = yes; then
6499 gcc_cv_as_flags64="-64 -Av9"
6500 else
6501 gcc_cv_as_flags64="-xarch=v9"
6507 echo "$ac_t""$gcc_cv_as_flags64" 1>&6
6508 if test "x$gcc_cv_as_flags64" = xno; then
6510 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6511 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
6513 else
6514 cat >> confdefs.h <<EOF
6515 #define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
6520 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
6522 esac
6524 if test "x$gcc_cv_as_flags64" != xno; then
6525 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
6526 echo "configure:6527: checking for assembler offsetable %lo() support" >&5
6527 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
6528 echo $ac_n "(cached) $ac_c" 1>&6
6529 else
6531 gcc_cv_as_offsetable_lo10=unknown
6532 if test "x$gcc_cv_as" != x; then
6533 # Check if assembler has offsetable %lo()
6534 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
6535 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
6536 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
6537 > /dev/null 2>&1 &&
6538 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
6539 > /dev/null 2>&1; then
6540 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
6541 gcc_cv_as_offsetable_lo10=no
6542 else
6543 gcc_cv_as_offsetable_lo10=yes
6545 else
6546 gcc_cv_as_offsetable_lo10=no
6548 rm -f conftest.s conftest.o conftest1.s conftest1.o
6553 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
6554 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
6555 cat >> confdefs.h <<\EOF
6556 #define HAVE_AS_OFFSETABLE_LO10 1
6561 echo $ac_n "checking assembler R_SPARC_UA32 relocation support""... $ac_c" 1>&6
6562 echo "configure:6563: checking assembler R_SPARC_UA32 relocation support" >&5
6563 if eval "test \"`echo '$''{'gcc_cv_as_ua32_reloc'+set}'`\" = set"; then
6564 echo $ac_n "(cached) $ac_c" 1>&6
6565 else
6567 gcc_cv_as_ua32_reloc=
6568 cat >conftest.s << EOF
6569 .byte 0x1
6570 .uaword foo
6572 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6573 if (readelf -r conftest.o > conftest.elf) 2>/dev/null ; then
6574 true
6575 elif (elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then
6576 true
6577 elif (`dirname $gcc_cv_as`/readelf -r conftest.o > conftest.elf) 2>/dev/null ; then
6578 true
6579 elif (`dirname $gcc_cv_as`/elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then
6580 true
6581 else
6582 gcc_cv_as_ua32_reloc=unknown
6584 if test x$gcc_cv_as_ua32_reloc = x && test `grep -c R_SPARC_UA32 conftest.elf` = 1 ; then
6585 gcc_cv_as_ua32_reloc=yes
6586 else
6587 gcc_cv_as_ua32_reloc=no
6589 else
6590 gcc_cv_as_ua32_reloc=unknown
6592 rm -f conftest.s conftest.o conftest.elf
6596 echo "$ac_t""$gcc_cv_as_ua32_reloc" 1>&6
6597 if test "x$gcc_cv_as_ua32_reloc" = xno; then
6598 { echo "configure: error: Assembler does not support R_SPARC_UA32 correctly.
6599 Please use native assembler or upgrade to binutils >= 2.11.1" 1>&2; exit 1; }
6600 elif test "x$gcc_cv_as_ua32_reloc" != xyes ; then
6601 echo "configure: warning: Cannot determine whether assembler supports R_SPARC_UA32 correctly.
6602 The resulting compiler might not produce useable executables." 1>&2
6606 i[34567]86-*-*)
6607 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
6608 echo "configure:6609: checking assembler instructions" >&5
6609 gcc_cv_as_instructions=
6610 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6611 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
6612 gcc_cv_as_instructions="filds fists"
6614 elif test x$gcc_cv_as != x; then
6615 set "filds fists" "filds mem; fists mem"
6616 while test $# -gt 0
6618 echo "$2" > conftest.s
6619 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6620 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
6622 shift 2
6623 done
6624 rm -f conftest.s conftest.o
6626 if test x"$gcc_cv_as_instructions" != x; then
6627 cat >> confdefs.h <<EOF
6628 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
6632 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
6634 esac
6636 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
6637 echo "configure:6638: checking assembler dwarf2 debug_line support" >&5
6638 gcc_cv_as_dwarf2_debug_line=no
6639 # ??? Not all targets support dwarf2 debug_line, even within a version
6640 # of gas. Moreover, we need to emit a valid instruction to trigger any
6641 # info to the output file. So, as supported targets are added to gas 2.11,
6642 # add some instruction here to (also) show we expect this might work.
6643 # ??? Once 2.11 is released, probably need to add first known working
6644 # version to the per-target configury.
6645 case "$target" in
6646 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
6647 insn="nop"
6649 ia64*-*-*)
6650 insn="nop 0"
6652 esac
6653 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
6654 then
6655 if test "$gcc_cv_gas_major_version" -eq 2 \
6656 -a "$gcc_cv_gas_minor_version" -ge 11 \
6657 -o "$gcc_cv_gas_major_version" -gt 2 \
6658 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
6659 && test x"$insn" != x ; then
6660 gcc_cv_as_dwarf2_debug_line="yes"
6662 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
6663 echo ' .file 1 "conftest.s"' > conftest.s
6664 echo ' .loc 1 3 0' >> conftest.s
6665 echo " $insn" >> conftest.s
6666 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
6667 && grep debug_line conftest.o > /dev/null 2>&1 ; then
6668 # The .debug_line file table must be in the exact order that
6669 # we specified the files, since these indicies are also used
6670 # by DW_AT_decl_file. Approximate this test by testing if
6671 # the assembler bitches if the same index is assigned twice.
6672 echo ' .file 1 "foo.s"' > conftest.s
6673 echo ' .file 1 "bar.s"' >> conftest.s
6674 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
6675 then
6676 gcc_cv_as_dwarf2_debug_line="no"
6677 else
6678 gcc_cv_as_dwarf2_debug_line="yes"
6681 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
6683 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
6684 cat >> confdefs.h <<\EOF
6685 #define HAVE_AS_DWARF2_DEBUG_LINE 1
6689 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
6691 # Figure out what language subdirectories are present.
6692 # Look if the user specified --enable-languages="..."; if not, use
6693 # the environment variable $LANGUAGES if defined. $LANGUAGES might
6694 # go away some day.
6695 if test x"${enable_languages+set}" != xset; then
6696 if test x"${LANGUAGES+set}" = xset; then
6697 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
6698 else
6699 enable_languages=all
6701 else
6702 if test x"${enable_languages}" = x; then
6703 { echo "configure: error: --enable-languages needs at least one argument" 1>&2; exit 1; }
6707 # First scan to see if an enabled language requires some other language.
6708 # We assume that a given config-lang.in will list all the language
6709 # front ends it requires, even if some are required indirectly.
6710 for lang in ${srcdir}/*/config-lang.in ..
6712 case $lang in
6715 # The odd quoting in the next line works around
6716 # an apparent bug in bash 1.12 on linux.
6717 ${srcdir}/[*]/config-lang.in)
6720 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6721 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
6722 for other in $this_lang_requires
6724 case ,${enable_languages}, in
6725 *,$other,*)
6727 *,all,*)
6729 *,$lang_alias,*)
6730 enable_languages="$enable_languages,$other"
6732 esac
6733 done
6735 esac
6736 done
6738 subdirs=
6739 for lang in ${srcdir}/*/config-lang.in ..
6741 case $lang in
6742 ..) ;;
6743 # The odd quoting in the next line works around
6744 # an apparent bug in bash 1.12 on linux.
6745 ${srcdir}/[*]/config-lang.in) ;;
6747 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
6748 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
6749 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
6750 if test "x$lang_alias" = x
6751 then
6752 echo "$lang doesn't set \$language." 1>&2
6753 exit 1
6755 case ${build_by_default},${enable_languages}, in
6756 *,$lang_alias,*) add_this_lang=yes ;;
6757 no,*) add_this_lang=no ;;
6758 *,all,*) add_this_lang=yes ;;
6759 *) add_this_lang=no ;;
6760 esac
6761 if test x"${add_this_lang}" = xyes; then
6762 case $lang in
6763 ${srcdir}/ada/config-lang.in)
6764 if test x$gnat = xyes ; then
6765 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6769 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
6771 esac
6774 esac
6775 done
6777 # Make gthr-default.h if we have a thread file.
6778 gthread_flags=
6779 if test $thread_file != single; then
6780 rm -f gthr-default.h
6781 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
6782 gthread_flags=-DHAVE_GTHR_DEFAULT
6786 # Find out what GC implementation we want, or may, use.
6787 # Check whether --with-gc or --without-gc was given.
6788 if test "${with_gc+set}" = set; then
6789 withval="$with_gc"
6790 case "$withval" in
6791 simple | page)
6792 GGC=ggc-$withval
6795 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
6797 esac
6798 else
6799 GGC=ggc-page
6803 echo "Using $GGC for garbage collection."
6805 # Use the system's zlib library.
6806 zlibdir=-L../zlib
6807 zlibinc="-I\$(srcdir)/../zlib"
6808 # Check whether --with-system-zlib or --without-system-zlib was given.
6809 if test "${with_system_zlib+set}" = set; then
6810 withval="$with_system_zlib"
6811 zlibdir=
6812 zlibinc=
6819 cat >> confdefs.h <<EOF
6820 #define ENABLE_STD_NAMESPACE 1
6825 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
6826 echo "configure:6827: checking whether to enable maintainer-specific portions of Makefiles" >&5
6827 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6828 if test "${enable_maintainer_mode+set}" = set; then
6829 enableval="$enable_maintainer_mode"
6830 maintainer_mode=$enableval
6831 else
6832 maintainer_mode=no
6836 echo "$ac_t""$maintainer_mode" 1>&6
6838 if test "$maintainer_mode" = "yes"; then
6839 MAINT=''
6840 else
6841 MAINT='#'
6844 # With Setjmp/Longjmp based exception handling.
6845 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
6846 if test "${enable_sjlj_exceptions+set}" = set; then
6847 enableval="$enable_sjlj_exceptions"
6848 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
6849 cat >> confdefs.h <<EOF
6850 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
6856 # Make empty files to contain the specs and options for each language.
6857 # Then add #include lines to for a compiler that has specs and/or options.
6859 lang_specs_files=
6860 lang_options_files=
6861 lang_tree_files=
6862 rm -f specs.h options.h gencheck.h
6863 touch specs.h options.h gencheck.h
6864 for subdir in . $subdirs
6866 if test -f $srcdir/$subdir/lang-specs.h; then
6867 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
6868 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
6870 if test -f $srcdir/$subdir/lang-options.h; then
6871 echo "#include \"$subdir/lang-options.h\"" >>options.h
6872 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
6874 if test -f $srcdir/$subdir/$subdir-tree.def; then
6875 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
6876 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
6878 done
6880 # These (without "all_") are set in each config-lang.in.
6881 # `language' must be a single word so is spelled singularly.
6882 all_languages=
6883 all_boot_languages=
6884 all_compilers=
6885 all_stagestuff=
6886 all_diff_excludes=
6887 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
6888 # List of language makefile fragments.
6889 all_lang_makefiles=
6890 all_headers=
6891 all_lib2funcs=
6893 # Add the language fragments.
6894 # Languages are added via two mechanisms. Some information must be
6895 # recorded in makefile variables, these are defined in config-lang.in.
6896 # We accumulate them and plug them into the main Makefile.
6897 # The other mechanism is a set of hooks for each of the main targets
6898 # like `clean', `install', etc.
6900 language_fragments="Make-lang"
6901 language_hooks="Make-hooks"
6903 for s in .. $subdirs
6905 if test $s != ".."
6906 then
6907 language=
6908 boot_language=
6909 compilers=
6910 stagestuff=
6911 diff_excludes=
6912 headers=
6913 outputs=
6914 lib2funcs=
6915 . ${srcdir}/$s/config-lang.in
6916 if test "x$language" = x
6917 then
6918 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
6919 exit 1
6921 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
6922 if test -f ${srcdir}/$s/Makefile.in
6923 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
6925 all_languages="$all_languages $language"
6926 if test "x$boot_language" = xyes
6927 then
6928 all_boot_languages="$all_boot_languages $language"
6930 all_compilers="$all_compilers $compilers"
6931 all_stagestuff="$all_stagestuff $stagestuff"
6932 all_diff_excludes="$all_diff_excludes $diff_excludes"
6933 all_headers="$all_headers $headers"
6934 all_outputs="$all_outputs $outputs"
6935 all_lib2funcs="$all_lib2funcs $lib2funcs"
6937 done
6939 # Since we can't use `::' targets, we link each language in
6940 # with a set of hooks, reached indirectly via lang.${target}.
6942 rm -f Make-hooks
6943 touch Make-hooks
6944 target_list="all.build all.cross start.encap rest.encap \
6945 info dvi \
6946 install-normal install-common install-info install-man \
6947 uninstall \
6948 mostlyclean clean distclean extraclean maintainer-clean \
6949 stage1 stage2 stage3 stage4"
6950 for t in $target_list
6953 for lang in .. $all_languages
6955 if test $lang != ".."; then
6956 x="$x $lang.$t"
6958 done
6959 echo "lang.$t: $x" >> Make-hooks
6960 done
6962 # If we're not building in srcdir, create .gdbinit.
6964 if test ! -f Makefile.in; then
6965 echo "dir ." > .gdbinit
6966 echo "dir ${srcdir}" >> .gdbinit
6967 if test x$gdb_needs_out_file_path = xyes
6968 then
6969 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
6971 if test "x$subdirs" != x; then
6972 for s in $subdirs
6974 echo "dir ${srcdir}/$s" >> .gdbinit
6975 done
6977 echo "source ${srcdir}/.gdbinit" >> .gdbinit
6980 # Define variables host_canonical and build_canonical
6981 # because some Cygnus local changes in the Makefile depend on them.
6982 build_canonical=${build}
6983 host_canonical=${host}
6984 target_subdir=
6985 if test "${host}" != "${target}" ; then
6986 target_subdir=${target_alias}/
6992 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
6993 # absolute path for gcc_tooldir based on inserting the number of up-directory
6994 # movements required to get from $(exec_prefix) to $(prefix) into the basic
6995 # $(libsubdir)/@(unlibsubdir) based path.
6996 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
6997 # make and thus we'd get different behavior depending on where we built the
6998 # sources.
6999 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
7000 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7001 else
7002 # An explanation of the sed strings:
7003 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
7004 # -e 's|/$||' match a trailing forward slash and eliminates it
7005 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
7006 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
7008 # (*) Note this pattern overwrites the first character of the string
7009 # with a forward slash if one is not already present. This is not a
7010 # problem because the exact names of the sub-directories concerned is
7011 # unimportant, just the number of them matters.
7013 # The practical upshot of these patterns is like this:
7015 # prefix exec_prefix result
7016 # ------ ----------- ------
7017 # /foo /foo/bar ../
7018 # /foo/ /foo/bar ../
7019 # /foo /foo/bar/ ../
7020 # /foo/ /foo/bar/ ../
7021 # /foo /foo/bar/ugg ../../
7023 dollar='$$'
7024 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
7029 # Find a directory in which to install a shared libgcc.
7031 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7032 if test "${enable_version_specific_runtime_libs+set}" = set; then
7033 enableval="$enable_version_specific_runtime_libs"
7038 # Check whether --with-slibdir or --without-slibdir was given.
7039 if test "${with_slibdir+set}" = set; then
7040 withval="$with_slibdir"
7041 slibdir="$with_slibdir"
7042 else
7043 if test "${enable_version_specific_runtime_libs+set}" = set; then
7044 slibdir='$(libsubdir)'
7045 elif test "$host" != "$target"; then
7046 slibdir='$(build_tooldir)/lib'
7047 else
7048 slibdir='$(libdir)'
7054 # Nothing to do for FLOAT_H, float_format already handled.
7055 objdir=`pwd`
7058 # Process the language and host/target makefile fragments.
7059 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7061 # Substitute configuration variables
7130 # Echo that links are built
7131 if test x$host = x$target
7132 then
7133 str1="native "
7134 else
7135 str1="cross-"
7136 str2=" from $host"
7139 if test x$host != x$build
7140 then
7141 str3=" on a $build system"
7144 if test "x$str2" != x || test "x$str3" != x
7145 then
7146 str4=
7149 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7151 if test "x$str2" != x || test "x$str3" != x
7152 then
7153 echo " ${str2}${str3}." 1>&2
7156 # Truncate the target if necessary
7157 if test x$host_truncate_target != x; then
7158 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7161 # Configure the subdirectories
7162 # AC_CONFIG_SUBDIRS($subdirs)
7164 # Create the Makefile
7165 # and configure language subdirectories
7166 trap '' 1 2 15
7167 cat > confcache <<\EOF
7168 # This file is a shell script that caches the results of configure
7169 # tests run on this system so they can be shared between configure
7170 # scripts and configure runs. It is not useful on other systems.
7171 # If it contains results you don't want to keep, you may remove or edit it.
7173 # By default, configure uses ./config.cache as the cache file,
7174 # creating it if it does not exist already. You can give configure
7175 # the --cache-file=FILE option to use a different cache file; that is
7176 # what configure does when it calls configure scripts in
7177 # subdirectories, so they share the cache.
7178 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7179 # config.status only pays attention to the cache file if you give it the
7180 # --recheck option to rerun configure.
7183 # The following way of writing the cache mishandles newlines in values,
7184 # but we know of no workaround that is simple, portable, and efficient.
7185 # So, don't put newlines in cache variables' values.
7186 # Ultrix sh set writes to stderr and can't be redirected directly,
7187 # and sets the high bit in the cache file unless we assign to the vars.
7188 (set) 2>&1 |
7189 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7190 *ac_space=\ *)
7191 # `set' does not quote correctly, so add quotes (double-quote substitution
7192 # turns \\\\ into \\, and sed turns \\ into \).
7193 sed -n \
7194 -e "s/'/'\\\\''/g" \
7195 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7198 # `set' quotes correctly as required by POSIX, so do not add quotes.
7199 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7201 esac >> confcache
7202 if cmp -s $cache_file confcache; then
7204 else
7205 if test -w $cache_file; then
7206 echo "updating cache $cache_file"
7207 cat confcache > $cache_file
7208 else
7209 echo "not updating unwritable cache $cache_file"
7212 rm -f confcache
7214 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7216 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7217 # Let make expand exec_prefix.
7218 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7220 # Any assignment to VPATH causes Sun make to only execute
7221 # the first set of double-colon rules, so remove it if not needed.
7222 # If there is a colon in the path, we need to keep it.
7223 if test "x$srcdir" = x.; then
7224 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7227 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7229 DEFS=-DHAVE_CONFIG_H
7231 # Without the "./", some shells look in PATH for config.status.
7232 : ${CONFIG_STATUS=./config.status}
7234 echo creating $CONFIG_STATUS
7235 rm -f $CONFIG_STATUS
7236 cat > $CONFIG_STATUS <<EOF
7237 #! /bin/sh
7238 # Generated automatically by configure.
7239 # Run this file to recreate the current configuration.
7240 # This directory was configured as follows,
7241 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7243 # $0 $ac_configure_args
7245 # Compiler output produced by configure, useful for debugging
7246 # configure, is in ./config.log if it exists.
7248 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7249 for ac_option
7251 case "\$ac_option" in
7252 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7253 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7254 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7255 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7256 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7257 exit 0 ;;
7258 -help | --help | --hel | --he | --h)
7259 echo "\$ac_cs_usage"; exit 0 ;;
7260 *) echo "\$ac_cs_usage"; exit 1 ;;
7261 esac
7262 done
7264 ac_given_srcdir=$srcdir
7266 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7268 cat >> $CONFIG_STATUS <<EOF
7270 # Protect against being on the right side of a sed subst in config.status.
7271 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7272 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7273 $ac_vpsub
7274 $extrasub
7275 s%@SHELL@%$SHELL%g
7276 s%@CFLAGS@%$CFLAGS%g
7277 s%@CPPFLAGS@%$CPPFLAGS%g
7278 s%@CXXFLAGS@%$CXXFLAGS%g
7279 s%@FFLAGS@%$FFLAGS%g
7280 s%@DEFS@%$DEFS%g
7281 s%@LDFLAGS@%$LDFLAGS%g
7282 s%@LIBS@%$LIBS%g
7283 s%@exec_prefix@%$exec_prefix%g
7284 s%@prefix@%$prefix%g
7285 s%@program_transform_name@%$program_transform_name%g
7286 s%@bindir@%$bindir%g
7287 s%@sbindir@%$sbindir%g
7288 s%@libexecdir@%$libexecdir%g
7289 s%@datadir@%$datadir%g
7290 s%@sysconfdir@%$sysconfdir%g
7291 s%@sharedstatedir@%$sharedstatedir%g
7292 s%@localstatedir@%$localstatedir%g
7293 s%@libdir@%$libdir%g
7294 s%@includedir@%$includedir%g
7295 s%@oldincludedir@%$oldincludedir%g
7296 s%@infodir@%$infodir%g
7297 s%@mandir@%$mandir%g
7298 s%@enable_multilib@%$enable_multilib%g
7299 s%@enable_shared@%$enable_shared%g
7300 s%@host@%$host%g
7301 s%@host_alias@%$host_alias%g
7302 s%@host_cpu@%$host_cpu%g
7303 s%@host_vendor@%$host_vendor%g
7304 s%@host_os@%$host_os%g
7305 s%@target@%$target%g
7306 s%@target_alias@%$target_alias%g
7307 s%@target_cpu@%$target_cpu%g
7308 s%@target_vendor@%$target_vendor%g
7309 s%@target_os@%$target_os%g
7310 s%@build@%$build%g
7311 s%@build_alias@%$build_alias%g
7312 s%@build_cpu@%$build_cpu%g
7313 s%@build_vendor@%$build_vendor%g
7314 s%@build_os@%$build_os%g
7315 s%@CC@%$CC%g
7316 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
7317 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
7318 s%@strict1_warn@%$strict1_warn%g
7319 s%@warn_cflags@%$warn_cflags%g
7320 s%@stage1_cflags@%$stage1_cflags%g
7321 s%@SET_MAKE@%$SET_MAKE%g
7322 s%@AWK@%$AWK%g
7323 s%@LN@%$LN%g
7324 s%@LN_S@%$LN_S%g
7325 s%@RANLIB@%$RANLIB%g
7326 s%@INSTALL@%$INSTALL%g
7327 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7328 s%@INSTALL_DATA@%$INSTALL_DATA%g
7329 s%@CPP@%$CPP%g
7330 s%@gnat@%$gnat%g
7331 s%@have_mktemp_command@%$have_mktemp_command%g
7332 s%@MAKEINFO@%$MAKEINFO%g
7333 s%@BUILD_INFO@%$BUILD_INFO%g
7334 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
7335 s%@FLEX@%$FLEX%g
7336 s%@BISON@%$BISON%g
7337 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
7338 s%@vfprintf@%$vfprintf%g
7339 s%@doprint@%$doprint%g
7340 s%@strstr@%$strstr%g
7341 s%@manext@%$manext%g
7342 s%@objext@%$objext%g
7343 s%@PACKAGE@%$PACKAGE%g
7344 s%@VERSION@%$VERSION%g
7345 s%@CHECK_PO@%$CHECK_PO%g
7346 s%@ALLOCA@%$ALLOCA%g
7347 s%@USE_NLS@%$USE_NLS%g
7348 s%@MSGFMT@%$MSGFMT%g
7349 s%@GMSGFMT@%$GMSGFMT%g
7350 s%@XGETTEXT@%$XGETTEXT%g
7351 s%@GENCAT@%$GENCAT%g
7352 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
7353 s%@CATALOGS@%$CATALOGS%g
7354 s%@CATOBJEXT@%$CATOBJEXT%g
7355 s%@DATADIRNAME@%$DATADIRNAME%g
7356 s%@GMOFILES@%$GMOFILES%g
7357 s%@INSTOBJEXT@%$INSTOBJEXT%g
7358 s%@INTLDEPS@%$INTLDEPS%g
7359 s%@INTLLIBS@%$INTLLIBS%g
7360 s%@INTLOBJS@%$INTLOBJS%g
7361 s%@POFILES@%$POFILES%g
7362 s%@POSUB@%$POSUB%g
7363 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
7364 s%@GT_NO@%$GT_NO%g
7365 s%@GT_YES@%$GT_YES%g
7366 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
7367 s%@l@%$l%g
7368 s%@inhibit_libc@%$inhibit_libc%g
7369 s%@gthread_flags@%$gthread_flags%g
7370 s%@GGC@%$GGC%g
7371 s%@zlibdir@%$zlibdir%g
7372 s%@zlibinc@%$zlibinc%g
7373 s%@MAINT@%$MAINT%g
7374 s%@build_canonical@%$build_canonical%g
7375 s%@host_canonical@%$host_canonical%g
7376 s%@target_subdir@%$target_subdir%g
7377 s%@gcc_tooldir@%$gcc_tooldir%g
7378 s%@dollar@%$dollar%g
7379 s%@slibdir@%$slibdir%g
7380 s%@objdir@%$objdir%g
7381 s%@subdirs@%$subdirs%g
7382 s%@all_boot_languages@%$all_boot_languages%g
7383 s%@all_compilers@%$all_compilers%g
7384 s%@all_diff_excludes@%$all_diff_excludes%g
7385 s%@all_headers@%$all_headers%g
7386 s%@all_lang_makefiles@%$all_lang_makefiles%g
7387 s%@all_languages@%$all_languages%g
7388 s%@all_lib2funcs@%$all_lib2funcs%g
7389 s%@all_stagestuff@%$all_stagestuff%g
7390 s%@build_exeext@%$build_exeext%g
7391 s%@build_install_headers_dir@%$build_install_headers_dir%g
7392 s%@build_xm_file_list@%$build_xm_file_list%g
7393 s%@build_xm_file@%$build_xm_file%g
7394 s%@build_xm_defines@%$build_xm_defines%g
7395 s%@cc_set_by_configure@%$cc_set_by_configure%g
7396 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
7397 s%@cpp_install_dir@%$cpp_install_dir%g
7398 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
7399 s%@dep_tmake_file@%$dep_tmake_file%g
7400 s%@extra_c_flags@%$extra_c_flags%g
7401 s%@extra_headers_list@%$extra_headers_list%g
7402 s%@extra_objs@%$extra_objs%g
7403 s%@extra_parts@%$extra_parts%g
7404 s%@extra_passes@%$extra_passes%g
7405 s%@extra_programs@%$extra_programs%g
7406 s%@float_h_file@%$float_h_file%g
7407 s%@gcc_config_arguments@%$gcc_config_arguments%g
7408 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
7409 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
7410 s%@gcc_version@%$gcc_version%g
7411 s%@gcc_version_full@%$gcc_version_full%g
7412 s%@gcc_version_trigger@%$gcc_version_trigger%g
7413 s%@host_exeext@%$host_exeext%g
7414 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
7415 s%@host_xm_file_list@%$host_xm_file_list%g
7416 s%@host_xm_file@%$host_xm_file%g
7417 s%@host_xm_defines@%$host_xm_defines%g
7418 s%@install@%$install%g
7419 s%@lang_options_files@%$lang_options_files%g
7420 s%@lang_specs_files@%$lang_specs_files%g
7421 s%@lang_tree_files@%$lang_tree_files%g
7422 s%@local_prefix@%$local_prefix%g
7423 s%@maybe_use_collect2@%$maybe_use_collect2%g
7424 s%@md_file@%$md_file%g
7425 s%@objc_boehm_gc@%$objc_boehm_gc%g
7426 s%@out_file@%$out_file%g
7427 s%@out_object_file@%$out_object_file%g
7428 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
7429 s%@symbolic_link@%$symbolic_link%g
7430 s%@thread_file@%$thread_file%g
7431 s%@tm_file_list@%$tm_file_list%g
7432 s%@tm_file@%$tm_file%g
7433 s%@tm_p_file_list@%$tm_p_file_list%g
7434 s%@tm_p_file@%$tm_p_file%g
7435 s%@xm_file@%$xm_file%g
7436 s%@will_use_collect2@%$will_use_collect2%g
7437 s%@c_target_objs@%$c_target_objs%g
7438 s%@cxx_target_objs@%$cxx_target_objs%g
7439 s%@target_cpu_default@%$target_cpu_default%g
7440 /@target_overrides@/r $target_overrides
7441 s%@target_overrides@%%g
7442 /@host_overrides@/r $host_overrides
7443 s%@host_overrides@%%g
7444 s%@cross_defines@%$cross_defines%g
7445 /@cross_overrides@/r $cross_overrides
7446 s%@cross_overrides@%%g
7447 /@build_overrides@/r $build_overrides
7448 s%@build_overrides@%%g
7449 /@language_fragments@/r $language_fragments
7450 s%@language_fragments@%%g
7451 /@language_hooks@/r $language_hooks
7452 s%@language_hooks@%%g
7454 CEOF
7457 cat >> $CONFIG_STATUS <<\EOF
7459 # Split the substitutions into bite-sized pieces for seds with
7460 # small command number limits, like on Digital OSF/1 and HP-UX.
7461 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7462 ac_file=1 # Number of current file.
7463 ac_beg=1 # First line for current file.
7464 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7465 ac_more_lines=:
7466 ac_sed_cmds=""
7467 while $ac_more_lines; do
7468 if test $ac_beg -gt 1; then
7469 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7470 else
7471 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7473 if test ! -s conftest.s$ac_file; then
7474 ac_more_lines=false
7475 rm -f conftest.s$ac_file
7476 else
7477 if test -z "$ac_sed_cmds"; then
7478 ac_sed_cmds="sed -f conftest.s$ac_file"
7479 else
7480 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7482 ac_file=`expr $ac_file + 1`
7483 ac_beg=$ac_end
7484 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7486 done
7487 if test -z "$ac_sed_cmds"; then
7488 ac_sed_cmds=cat
7492 cat >> $CONFIG_STATUS <<EOF
7494 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
7496 cat >> $CONFIG_STATUS <<\EOF
7497 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7498 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7499 case "$ac_file" in
7500 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7501 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7502 *) ac_file_in="${ac_file}.in" ;;
7503 esac
7505 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7507 # Remove last slash and all that follows it. Not all systems have dirname.
7508 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7509 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7510 # The file is in a subdirectory.
7511 test ! -d "$ac_dir" && mkdir "$ac_dir"
7512 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7513 # A "../" for each directory in $ac_dir_suffix.
7514 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7515 else
7516 ac_dir_suffix= ac_dots=
7519 case "$ac_given_srcdir" in
7520 .) srcdir=.
7521 if test -z "$ac_dots"; then top_srcdir=.
7522 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7523 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7524 *) # Relative path.
7525 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7526 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7527 esac
7530 echo creating "$ac_file"
7531 rm -f "$ac_file"
7532 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7533 case "$ac_file" in
7534 *Makefile*) ac_comsub="1i\\
7535 # $configure_input" ;;
7536 *) ac_comsub= ;;
7537 esac
7539 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7540 sed -e "$ac_comsub
7541 s%@configure_input@%$configure_input%g
7542 s%@srcdir@%$srcdir%g
7543 s%@top_srcdir@%$top_srcdir%g
7544 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7545 fi; done
7546 rm -f conftest.s*
7548 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7549 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7551 # ac_d sets the value in "#define NAME VALUE" lines.
7552 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7553 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7554 ac_dC='\3'
7555 ac_dD='%g'
7556 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7557 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7558 ac_uB='\([ ]\)%\1#\2define\3'
7559 ac_uC=' '
7560 ac_uD='\4%g'
7561 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7562 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7563 ac_eB='$%\1#\2define\3'
7564 ac_eC=' '
7565 ac_eD='%g'
7567 if test "${CONFIG_HEADERS+set}" != set; then
7569 cat >> $CONFIG_STATUS <<EOF
7570 CONFIG_HEADERS="auto-host.h:config.in"
7572 cat >> $CONFIG_STATUS <<\EOF
7574 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7575 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7576 case "$ac_file" in
7577 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7578 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7579 *) ac_file_in="${ac_file}.in" ;;
7580 esac
7582 echo creating $ac_file
7584 rm -f conftest.frag conftest.in conftest.out
7585 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7586 cat $ac_file_inputs > conftest.in
7590 # Transform confdefs.h into a sed script conftest.vals that substitutes
7591 # the proper values into config.h.in to produce config.h. And first:
7592 # Protect against being on the right side of a sed subst in config.status.
7593 # Protect against being in an unquoted here document in config.status.
7594 rm -f conftest.vals
7595 cat > conftest.hdr <<\EOF
7596 s/[\\&%]/\\&/g
7597 s%[\\$`]%\\&%g
7598 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7599 s%ac_d%ac_u%gp
7600 s%ac_u%ac_e%gp
7602 sed -n -f conftest.hdr confdefs.h > conftest.vals
7603 rm -f conftest.hdr
7605 # This sed command replaces #undef with comments. This is necessary, for
7606 # example, in the case of _POSIX_SOURCE, which is predefined and required
7607 # on some systems where configure will not decide to define it.
7608 cat >> conftest.vals <<\EOF
7609 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7612 # Break up conftest.vals because some shells have a limit on
7613 # the size of here documents, and old seds have small limits too.
7615 rm -f conftest.tail
7616 while :
7618 ac_lines=`grep -c . conftest.vals`
7619 # grep -c gives empty output for an empty file on some AIX systems.
7620 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7621 # Write a limited-size here document to conftest.frag.
7622 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7623 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7624 echo 'CEOF
7625 sed -f conftest.frag conftest.in > conftest.out
7626 rm -f conftest.in
7627 mv conftest.out conftest.in
7628 ' >> $CONFIG_STATUS
7629 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7630 rm -f conftest.vals
7631 mv conftest.tail conftest.vals
7632 done
7633 rm -f conftest.vals
7635 cat >> $CONFIG_STATUS <<\EOF
7636 rm -f conftest.frag conftest.h
7637 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7638 cat conftest.in >> conftest.h
7639 rm -f conftest.in
7640 if cmp -s $ac_file conftest.h 2>/dev/null; then
7641 echo "$ac_file is unchanged"
7642 rm -f conftest.h
7643 else
7644 # Remove last slash and all that follows it. Not all systems have dirname.
7645 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7646 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7647 # The file is in a subdirectory.
7648 test ! -d "$ac_dir" && mkdir "$ac_dir"
7650 rm -f $ac_file
7651 mv conftest.h $ac_file
7653 fi; done
7657 cat >> $CONFIG_STATUS <<EOF
7658 ac_sources="$nls_cv_header_libgt"
7659 ac_dests="$nls_cv_header_intl"
7662 cat >> $CONFIG_STATUS <<\EOF
7663 srcdir=$ac_given_srcdir
7664 while test -n "$ac_sources"; do
7665 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7666 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7668 echo "linking $srcdir/$ac_source to $ac_dest"
7670 if test ! -r $srcdir/$ac_source; then
7671 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7673 rm -f $ac_dest
7675 # Make relative symlinks.
7676 # Remove last slash and all that follows it. Not all systems have dirname.
7677 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7678 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7679 # The dest file is in a subdirectory.
7680 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7681 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7682 # A "../" for each directory in $ac_dest_dir_suffix.
7683 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7684 else
7685 ac_dest_dir_suffix= ac_dots=
7688 case "$srcdir" in
7689 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7690 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7691 esac
7693 # Make a symlink if possible; otherwise try a hard link.
7694 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7695 ln $srcdir/$ac_source $ac_dest; then :
7696 else
7697 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7699 done
7701 cat >> $CONFIG_STATUS <<EOF
7704 host='${host}'
7705 build='${build}'
7706 target='${target}'
7707 target_alias='${target_alias}'
7708 srcdir='${srcdir}'
7709 subdirs='${subdirs}'
7710 symbolic_link='${symbolic_link}'
7711 program_transform_set='${program_transform_set}'
7712 program_transform_name='${program_transform_name}'
7713 dep_host_xmake_file='${dep_host_xmake_file}'
7714 host_xmake_file='${host_xmake_file}'
7715 dep_tmake_file='${dep_tmake_file}'
7716 tmake_file='${tmake_file}'
7717 thread_file='${thread_file}'
7718 gcc_config_arguments='${gcc_config_arguments}'
7719 gcc_version='${gcc_version}'
7720 gcc_version_full='${gcc_version_full}'
7721 gcc_version_trigger='${gcc_version_trigger}'
7722 local_prefix='${local_prefix}'
7723 build_install_headers_dir='${build_install_headers_dir}'
7724 build_exeext='${build_exeext}'
7725 host_exeext='${host_exeext}'
7726 out_file='${out_file}'
7727 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
7728 SET_MAKE='${SET_MAKE}'
7729 target_list='${target_list}'
7730 target_overrides='${target_overrides}'
7731 host_overrides='${host_overrides}'
7732 cross_defines='${cross_defines}'
7733 cross_overrides='${cross_overrides}'
7734 build_overrides='${build_overrides}'
7735 cpp_install_dir='${cpp_install_dir}'
7738 cat >> $CONFIG_STATUS <<\EOF
7739 case "$CONFIG_FILES" in *po/Makefile.in*)
7740 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7741 esac
7743 case x$CONFIG_HEADERS in
7744 xauto-host.h:config.in)
7745 echo > cstamp-h ;;
7746 esac
7747 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
7748 # bootstrapping and the installation procedure can still use
7749 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
7750 # FLAGS_TO_PASS has been modified to solve the problem there.
7751 # This is virtually a duplicate of what happens in configure.lang; we do
7752 # an extra check to make sure this only happens if ln -s can be used.
7753 if test "$symbolic_link" = "ln -s"; then
7754 for d in .. ${subdirs} ; do
7755 if test $d != ..; then
7756 STARTDIR=`pwd`
7757 cd $d
7758 for t in stage1 stage2 stage3 stage4 include
7760 rm -f $t
7761 $symbolic_link ../$t $t 2>/dev/null
7762 done
7763 cd $STARTDIR
7765 done
7766 else true ; fi
7767 # Avoid having to add intl to our include paths.
7768 if test -f intl/libintl.h; then
7769 echo creating libintl.h
7770 echo '#include "intl/libintl.h"' >libintl.h
7773 exit 0
7775 chmod +x $CONFIG_STATUS
7776 rm -fr confdefs* $ac_clean_files
7777 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1