re PR libstdc++/8716 (std::string( NULL, 0 ) throws exception also on zero length)
[official-gcc.git] / gcc / configure
blob1e3dc129c6c1e1b95c4968b4e337bed054247f53
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-gnu-ld arrange to work with GNU ld."
16 ac_help="$ac_help
17 --with-ld arrange to use the specified ld (full pathname)"
18 ac_help="$ac_help
19 --with-gnu-as arrange to work with GNU as"
20 ac_help="$ac_help
21 --with-as arrange to use the specified as (full pathname)"
22 ac_help="$ac_help
23 --with-stabs arrange to use stabs instead of host debug format"
24 ac_help="$ac_help
25 --with-elf arrange to use ELF instead of host debug format"
26 ac_help="$ac_help
27 --with-local-prefix=DIR specifies directory to put local include"
28 ac_help="$ac_help
29 --with-gxx-include-dir=DIR
30 specifies directory to put g++ header files"
31 ac_help="$ac_help
32 --enable-multilib enable library support for multiple ABIs"
33 ac_help="$ac_help
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,rtlflag,gc,gcac;
38 default is misc,tree,gc,rtlflag"
39 ac_help="$ac_help
40 --enable-coverage[=LEVEL]
41 enable compiler\'s code coverage collection.
42 Use to measure compiler performance and locate
43 unused parts of the compiler. With LEVEL, specificy
44 optimization. Values are opt, noopt,
45 default is noopt"
46 ac_help="$ac_help
47 --with-cpp-install-dir=DIR
48 install the user visible C preprocessor in DIR
49 (relative to PREFIX) as well as PREFIX/bin"
50 ac_help="$ac_help
51 --enable-__cxa_atexit enable __cxa_atexit for C++"
52 ac_help="$ac_help
53 --enable-c-mbchar enable multibyte characters for C and C++"
54 ac_help="$ac_help
55 --enable-threads enable thread usage for target GCC
56 --enable-threads=LIB use LIB thread package for target GCC"
57 ac_help="$ac_help
58 --enable-objc-gc enable the use of Boehm's garbage collector with
59 the GNU Objective-C runtime"
60 ac_help="$ac_help
61 --with-dwarf2 force the default debug format to be DWARF 2"
62 ac_help="$ac_help
63 --disable-shared don't provide a shared libgcc"
64 ac_help="$ac_help
65 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
66 ac_help="$ac_help
67 --enable-initfini-array use .init_array/.fini_array sections"
68 ac_help="$ac_help
69 --enable-nls use Native Language Support (default)"
70 ac_help="$ac_help
71 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
72 ac_help="$ac_help
73 --disable-nls do not use Native Language Support"
74 ac_help="$ac_help
75 --with-included-gettext use the GNU gettext library included here"
76 ac_help="$ac_help
77 --disable-win32-registry
78 disable lookup of installation paths in the
79 Registry on Windows hosts
80 --enable-win32-registry enable registry lookup (default)
81 --enable-win32-registry=KEY
82 use KEY instead of GCC version as the last portion
83 of the registry key"
84 ac_help="$ac_help
85 --with-gc={simple,page} choose the garbage collection mechanism to use
86 with the compiler"
87 ac_help="$ac_help
88 --with-system-zlib use installed libz"
89 ac_help="$ac_help
90 --enable-maintainer-mode
91 enable make rules and dependencies not useful
92 (and sometimes confusing) to the casual installer"
93 ac_help="$ac_help
94 --enable-sjlj-exceptions
95 arrange to use setjmp/longjmp exception handling"
96 ac_help="$ac_help
97 --enable-libunwind-exceptions force use libunwind for exceptions"
98 ac_help="$ac_help
99 --enable-version-specific-runtime-libs
100 specify that runtime libraries should be
101 installed in a compiler-specific directory"
102 ac_help="$ac_help
103 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
105 # Initialize some variables set by options.
106 # The variables have the same names as the options, with
107 # dashes changed to underlines.
108 build=NONE
109 cache_file=./config.cache
110 exec_prefix=NONE
111 host=NONE
112 no_create=
113 nonopt=NONE
114 no_recursion=
115 prefix=NONE
116 program_prefix=NONE
117 program_suffix=NONE
118 program_transform_name=s,x,x,
119 silent=
120 site=
121 srcdir=
122 target=NONE
123 verbose=
124 x_includes=NONE
125 x_libraries=NONE
126 bindir='${exec_prefix}/bin'
127 sbindir='${exec_prefix}/sbin'
128 libexecdir='${exec_prefix}/libexec'
129 datadir='${prefix}/share'
130 sysconfdir='${prefix}/etc'
131 sharedstatedir='${prefix}/com'
132 localstatedir='${prefix}/var'
133 libdir='${exec_prefix}/lib'
134 includedir='${prefix}/include'
135 oldincludedir='/usr/include'
136 infodir='${prefix}/info'
137 mandir='${prefix}/man'
139 # Initialize some other variables.
140 subdirs=
141 MFLAGS= MAKEFLAGS=
142 SHELL=${CONFIG_SHELL-/bin/sh}
143 # Maximum number of lines to put in a shell here document.
144 ac_max_here_lines=12
146 ac_prev=
147 for ac_option
150 # If the previous option needs an argument, assign it.
151 if test -n "$ac_prev"; then
152 eval "$ac_prev=\$ac_option"
153 ac_prev=
154 continue
157 case "$ac_option" in
158 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
159 *) ac_optarg= ;;
160 esac
162 # Accept the important Cygnus configure options, so we can diagnose typos.
164 case "$ac_option" in
166 -bindir | --bindir | --bindi | --bind | --bin | --bi)
167 ac_prev=bindir ;;
168 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
169 bindir="$ac_optarg" ;;
171 -build | --build | --buil | --bui | --bu)
172 ac_prev=build ;;
173 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
174 build="$ac_optarg" ;;
176 -cache-file | --cache-file | --cache-fil | --cache-fi \
177 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
178 ac_prev=cache_file ;;
179 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
180 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
181 cache_file="$ac_optarg" ;;
183 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
184 ac_prev=datadir ;;
185 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
186 | --da=*)
187 datadir="$ac_optarg" ;;
189 -disable-* | --disable-*)
190 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
191 # Reject names that are not valid shell variable names.
192 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
193 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
195 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196 eval "enable_${ac_feature}=no" ;;
198 -enable-* | --enable-*)
199 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
200 # Reject names that are not valid shell variable names.
201 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
202 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
204 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205 case "$ac_option" in
206 *=*) ;;
207 *) ac_optarg=yes ;;
208 esac
209 eval "enable_${ac_feature}='$ac_optarg'" ;;
211 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
212 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
213 | --exec | --exe | --ex)
214 ac_prev=exec_prefix ;;
215 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
216 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
217 | --exec=* | --exe=* | --ex=*)
218 exec_prefix="$ac_optarg" ;;
220 -gas | --gas | --ga | --g)
221 # Obsolete; use --with-gas.
222 with_gas=yes ;;
224 -help | --help | --hel | --he)
225 # Omit some internal or obsolete options to make the list less imposing.
226 # This message is too long to be a string in the A/UX 3.1 sh.
227 cat << EOF
228 Usage: configure [options] [host]
229 Options: [defaults in brackets after descriptions]
230 Configuration:
231 --cache-file=FILE cache test results in FILE
232 --help print this message
233 --no-create do not create output files
234 --quiet, --silent do not print \`checking...' messages
235 --version print the version of autoconf that created configure
236 Directory and file names:
237 --prefix=PREFIX install architecture-independent files in PREFIX
238 [$ac_default_prefix]
239 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
240 [same as prefix]
241 --bindir=DIR user executables in DIR [EPREFIX/bin]
242 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
243 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
244 --datadir=DIR read-only architecture-independent data in DIR
245 [PREFIX/share]
246 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
247 --sharedstatedir=DIR modifiable architecture-independent data in DIR
248 [PREFIX/com]
249 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
250 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
251 --includedir=DIR C header files in DIR [PREFIX/include]
252 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
253 --infodir=DIR info documentation in DIR [PREFIX/info]
254 --mandir=DIR man documentation in DIR [PREFIX/man]
255 --srcdir=DIR find the sources in DIR [configure dir or ..]
256 --program-prefix=PREFIX prepend PREFIX to installed program names
257 --program-suffix=SUFFIX append SUFFIX to installed program names
258 --program-transform-name=PROGRAM
259 run sed PROGRAM on installed program names
261 cat << EOF
262 Host type:
263 --build=BUILD configure for building on BUILD [BUILD=HOST]
264 --host=HOST configure for HOST [guessed]
265 --target=TARGET configure for TARGET [TARGET=HOST]
266 Features and packages:
267 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
268 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
269 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
270 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
271 --x-includes=DIR X include files are in DIR
272 --x-libraries=DIR X library files are in DIR
274 if test -n "$ac_help"; then
275 echo "--enable and --with options recognized:$ac_help"
277 exit 0 ;;
279 -host | --host | --hos | --ho)
280 ac_prev=host ;;
281 -host=* | --host=* | --hos=* | --ho=*)
282 host="$ac_optarg" ;;
284 -includedir | --includedir | --includedi | --included | --include \
285 | --includ | --inclu | --incl | --inc)
286 ac_prev=includedir ;;
287 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
288 | --includ=* | --inclu=* | --incl=* | --inc=*)
289 includedir="$ac_optarg" ;;
291 -infodir | --infodir | --infodi | --infod | --info | --inf)
292 ac_prev=infodir ;;
293 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
294 infodir="$ac_optarg" ;;
296 -libdir | --libdir | --libdi | --libd)
297 ac_prev=libdir ;;
298 -libdir=* | --libdir=* | --libdi=* | --libd=*)
299 libdir="$ac_optarg" ;;
301 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
302 | --libexe | --libex | --libe)
303 ac_prev=libexecdir ;;
304 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
305 | --libexe=* | --libex=* | --libe=*)
306 libexecdir="$ac_optarg" ;;
308 -localstatedir | --localstatedir | --localstatedi | --localstated \
309 | --localstate | --localstat | --localsta | --localst \
310 | --locals | --local | --loca | --loc | --lo)
311 ac_prev=localstatedir ;;
312 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
313 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
314 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
315 localstatedir="$ac_optarg" ;;
317 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
318 ac_prev=mandir ;;
319 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
320 mandir="$ac_optarg" ;;
322 -nfp | --nfp | --nf)
323 # Obsolete; use --without-fp.
324 with_fp=no ;;
326 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
327 | --no-cr | --no-c)
328 no_create=yes ;;
330 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
331 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
332 no_recursion=yes ;;
334 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
335 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
336 | --oldin | --oldi | --old | --ol | --o)
337 ac_prev=oldincludedir ;;
338 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
339 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
340 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
341 oldincludedir="$ac_optarg" ;;
343 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
344 ac_prev=prefix ;;
345 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
346 prefix="$ac_optarg" ;;
348 -program-prefix | --program-prefix | --program-prefi | --program-pref \
349 | --program-pre | --program-pr | --program-p)
350 ac_prev=program_prefix ;;
351 -program-prefix=* | --program-prefix=* | --program-prefi=* \
352 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
353 program_prefix="$ac_optarg" ;;
355 -program-suffix | --program-suffix | --program-suffi | --program-suff \
356 | --program-suf | --program-su | --program-s)
357 ac_prev=program_suffix ;;
358 -program-suffix=* | --program-suffix=* | --program-suffi=* \
359 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
360 program_suffix="$ac_optarg" ;;
362 -program-transform-name | --program-transform-name \
363 | --program-transform-nam | --program-transform-na \
364 | --program-transform-n | --program-transform- \
365 | --program-transform | --program-transfor \
366 | --program-transfo | --program-transf \
367 | --program-trans | --program-tran \
368 | --progr-tra | --program-tr | --program-t)
369 ac_prev=program_transform_name ;;
370 -program-transform-name=* | --program-transform-name=* \
371 | --program-transform-nam=* | --program-transform-na=* \
372 | --program-transform-n=* | --program-transform-=* \
373 | --program-transform=* | --program-transfor=* \
374 | --program-transfo=* | --program-transf=* \
375 | --program-trans=* | --program-tran=* \
376 | --progr-tra=* | --program-tr=* | --program-t=*)
377 program_transform_name="$ac_optarg" ;;
379 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
380 | -silent | --silent | --silen | --sile | --sil)
381 silent=yes ;;
383 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
384 ac_prev=sbindir ;;
385 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
386 | --sbi=* | --sb=*)
387 sbindir="$ac_optarg" ;;
389 -sharedstatedir | --sharedstatedir | --sharedstatedi \
390 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
391 | --sharedst | --shareds | --shared | --share | --shar \
392 | --sha | --sh)
393 ac_prev=sharedstatedir ;;
394 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
395 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
396 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
397 | --sha=* | --sh=*)
398 sharedstatedir="$ac_optarg" ;;
400 -site | --site | --sit)
401 ac_prev=site ;;
402 -site=* | --site=* | --sit=*)
403 site="$ac_optarg" ;;
405 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
406 ac_prev=srcdir ;;
407 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
408 srcdir="$ac_optarg" ;;
410 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
411 | --syscon | --sysco | --sysc | --sys | --sy)
412 ac_prev=sysconfdir ;;
413 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
414 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
415 sysconfdir="$ac_optarg" ;;
417 -target | --target | --targe | --targ | --tar | --ta | --t)
418 ac_prev=target ;;
419 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
420 target="$ac_optarg" ;;
422 -v | -verbose | --verbose | --verbos | --verbo | --verb)
423 verbose=yes ;;
425 -version | --version | --versio | --versi | --vers)
426 echo "configure generated by autoconf version 2.13"
427 exit 0 ;;
429 -with-* | --with-*)
430 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
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 case "$ac_option" in
437 *=*) ;;
438 *) ac_optarg=yes ;;
439 esac
440 eval "with_${ac_package}='$ac_optarg'" ;;
442 -without-* | --without-*)
443 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
444 # Reject names that are not valid shell variable names.
445 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
446 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
449 eval "with_${ac_package}=no" ;;
451 --x)
452 # Obsolete; use --with-x.
453 with_x=yes ;;
455 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
456 | --x-incl | --x-inc | --x-in | --x-i)
457 ac_prev=x_includes ;;
458 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
459 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
460 x_includes="$ac_optarg" ;;
462 -x-libraries | --x-libraries | --x-librarie | --x-librari \
463 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
464 ac_prev=x_libraries ;;
465 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
466 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
467 x_libraries="$ac_optarg" ;;
469 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
474 echo "configure: warning: $ac_option: invalid host type" 1>&2
476 if test "x$nonopt" != xNONE; then
477 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
479 nonopt="$ac_option"
482 esac
483 done
485 if test -n "$ac_prev"; then
486 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
489 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
491 # File descriptor usage:
492 # 0 standard input
493 # 1 file creation
494 # 2 errors and warnings
495 # 3 some systems may open it to /dev/tty
496 # 4 used on the Kubota Titan
497 # 6 checking for... messages and results
498 # 5 compiler messages saved in config.log
499 if test "$silent" = yes; then
500 exec 6>/dev/null
501 else
502 exec 6>&1
504 exec 5>./config.log
506 echo "\
507 This file contains any messages produced by compilers while
508 running configure, to aid debugging if configure makes a mistake.
509 " 1>&5
511 # Strip out --no-create and --no-recursion so they do not pile up.
512 # Also quote any args containing shell metacharacters.
513 ac_configure_args=
514 for ac_arg
516 case "$ac_arg" in
517 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
518 | --no-cr | --no-c) ;;
519 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
520 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
521 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
522 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
523 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
524 esac
525 done
527 # NLS nuisances.
528 # Only set these to C if already set. These must not be set unconditionally
529 # because not all systems understand e.g. LANG=C (notably SCO).
530 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
531 # Non-C LC_CTYPE values break the ctype check.
532 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
533 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
534 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
535 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
537 # confdefs.h avoids OS command line length limits that DEFS can exceed.
538 rm -rf conftest* confdefs.h
539 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
540 echo > confdefs.h
542 # A filename unique to this package, relative to the directory that
543 # configure is in, which we can look for to find out if srcdir is correct.
544 ac_unique_file=tree.c
546 # Find the source files, if location was not specified.
547 if test -z "$srcdir"; then
548 ac_srcdir_defaulted=yes
549 # Try the directory containing this script, then its parent.
550 ac_prog=$0
551 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
552 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
553 srcdir=$ac_confdir
554 if test ! -r $srcdir/$ac_unique_file; then
555 srcdir=..
557 else
558 ac_srcdir_defaulted=no
560 if test ! -r $srcdir/$ac_unique_file; then
561 if test "$ac_srcdir_defaulted" = yes; then
562 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
563 else
564 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
567 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
569 # Prefer explicitly selected file to automatically selected ones.
570 if test -z "$CONFIG_SITE"; then
571 if test "x$prefix" != xNONE; then
572 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
573 else
574 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
577 for ac_site_file in $CONFIG_SITE; do
578 if test -r "$ac_site_file"; then
579 echo "loading site script $ac_site_file"
580 . "$ac_site_file"
582 done
584 if test -r "$cache_file"; then
585 echo "loading cache $cache_file"
586 . $cache_file
587 else
588 echo "creating cache $cache_file"
589 > $cache_file
592 ac_ext=c
593 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
594 ac_cpp='$CPP $CPPFLAGS'
595 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
596 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
597 cross_compiling=$ac_cv_prog_cc_cross
599 ac_exeext=
600 ac_objext=o
601 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
602 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
603 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
604 ac_n= ac_c='
605 ' ac_t=' '
606 else
607 ac_n=-n ac_c= ac_t=
609 else
610 ac_n= ac_c='\c' ac_t=
616 remove=rm
617 hard_link=ln
618 symbolic_link='ln -s'
619 copy=cp
621 # Check for bogus environment variables.
622 # Test if LIBRARY_PATH contains the notation for the current directory
623 # since this would lead to problems installing/building glibc.
624 # LIBRARY_PATH contains the current directory if one of the following
625 # is true:
626 # - one of the terminals (":" and ";") is the first or last sign
627 # - two terminals occur directly after each other
628 # - the path contains an element with a dot in it
629 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
630 echo "configure:631: checking LIBRARY_PATH variable" >&5
631 case ${LIBRARY_PATH} in
632 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
633 library_path_setting="contains current directory"
636 library_path_setting="ok"
638 esac
639 echo "$ac_t""$library_path_setting" 1>&6
640 if test "$library_path_setting" != "ok"; then
641 { echo "configure: error:
642 *** LIBRARY_PATH shouldn't contain the current directory when
643 *** building gcc. Please change the environment variable
644 *** and run configure again." 1>&2; exit 1; }
647 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
648 # since this would lead to problems installing/building glibc.
649 # GCC_EXEC_PREFIX contains the current directory if one of the following
650 # is true:
651 # - one of the terminals (":" and ";") is the first or last sign
652 # - two terminals occur directly after each other
653 # - the path contains an element with a dot in it
654 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
655 echo "configure:656: checking GCC_EXEC_PREFIX variable" >&5
656 case ${GCC_EXEC_PREFIX} in
657 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
658 gcc_exec_prefix_setting="contains current directory"
661 gcc_exec_prefix_setting="ok"
663 esac
664 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
665 if test "$gcc_exec_prefix_setting" != "ok"; then
666 { echo "configure: error:
667 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
668 *** building gcc. Please change the environment variable
669 *** and run configure again." 1>&2; exit 1; }
672 # Check for additional parameters
674 # With GNU ld
675 # Check whether --with-gnu-ld or --without-gnu-ld was given.
676 if test "${with_gnu_ld+set}" = set; then
677 withval="$with_gnu_ld"
678 gnu_ld_flag="$with_gnu_ld"
679 else
680 gnu_ld_flag=no
684 # With pre-defined ld
685 # Check whether --with-ld or --without-ld was given.
686 if test "${with_ld+set}" = set; then
687 withval="$with_ld"
688 DEFAULT_LINKER="$with_ld"
691 if test x"${DEFAULT_LINKER+set}" = x"set"; then
692 if test ! -x "$DEFAULT_LINKER"; then
693 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
694 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
695 gnu_ld_flag=yes
697 cat >> confdefs.h <<EOF
698 #define DEFAULT_LINKER "$DEFAULT_LINKER"
703 # With GNU as
704 # Check whether --with-gnu-as or --without-gnu-as was given.
705 if test "${with_gnu_as+set}" = set; then
706 withval="$with_gnu_as"
707 gas_flag="$with_gnu_as"
708 else
709 gas_flag=no
713 # Check whether --with-as or --without-as was given.
714 if test "${with_as+set}" = set; then
715 withval="$with_as"
716 DEFAULT_ASSEMBLER="$with_as"
719 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
720 if test ! -x "$DEFAULT_ASSEMBLER"; then
721 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
722 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
723 gas_flag=yes
725 cat >> confdefs.h <<EOF
726 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
731 # With stabs
732 # Check whether --with-stabs or --without-stabs was given.
733 if test "${with_stabs+set}" = set; then
734 withval="$with_stabs"
735 stabs="$with_stabs"
736 else
737 stabs=no
741 # With ELF
742 # Check whether --with-elf or --without-elf was given.
743 if test "${with_elf+set}" = set; then
744 withval="$with_elf"
745 elf="$with_elf"
746 else
747 elf=no
751 # Specify the local prefix
752 local_prefix=
753 # Check whether --with-local-prefix or --without-local-prefix was given.
754 if test "${with_local_prefix+set}" = set; then
755 withval="$with_local_prefix"
756 case "${withval}" in
757 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
758 no) ;;
759 *) local_prefix=$with_local_prefix ;;
760 esac
764 # Default local prefix if it is empty
765 if test x$local_prefix = x; then
766 local_prefix=/usr/local
769 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
770 # passed in by the toplevel make and thus we'd get different behavior
771 # depending on where we built the sources.
772 gcc_gxx_include_dir=
773 # Specify the g++ header file directory
774 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
775 if test "${with_gxx_include_dir+set}" = set; then
776 withval="$with_gxx_include_dir"
777 case "${withval}" in
778 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
779 no) ;;
780 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
781 esac
785 if test x${gcc_gxx_include_dir} = x; then
786 if test x${enable_version_specific_runtime_libs} = xyes; then
787 gcc_gxx_include_dir='${libsubdir}/include/c++'
788 else
789 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
790 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
794 # Determine the host, build, and target systems
795 ac_aux_dir=
796 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
797 if test -f $ac_dir/install-sh; then
798 ac_aux_dir=$ac_dir
799 ac_install_sh="$ac_aux_dir/install-sh -c"
800 break
801 elif test -f $ac_dir/install.sh; then
802 ac_aux_dir=$ac_dir
803 ac_install_sh="$ac_aux_dir/install.sh -c"
804 break
806 done
807 if test -z "$ac_aux_dir"; then
808 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
810 ac_config_guess=$ac_aux_dir/config.guess
811 ac_config_sub=$ac_aux_dir/config.sub
812 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
815 # Do some error checking and defaulting for the host and target type.
816 # The inputs are:
817 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
819 # The rules are:
820 # 1. You are not allowed to specify --host, --target, and nonopt at the
821 # same time.
822 # 2. Host defaults to nonopt.
823 # 3. If nonopt is not specified, then host defaults to the current host,
824 # as determined by config.guess.
825 # 4. Target and build default to nonopt.
826 # 5. If nonopt is not specified, then target and build default to host.
828 # The aliases save the names the user supplied, while $host etc.
829 # will get canonicalized.
830 case $host---$target---$nonopt in
831 NONE---*---* | *---NONE---* | *---*---NONE) ;;
832 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
833 esac
836 # Make sure we can run config.sub.
837 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
838 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
841 echo $ac_n "checking host system type""... $ac_c" 1>&6
842 echo "configure:843: checking host system type" >&5
844 host_alias=$host
845 case "$host_alias" in
846 NONE)
847 case $nonopt in
848 NONE)
849 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
850 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
851 fi ;;
852 *) host_alias=$nonopt ;;
853 esac ;;
854 esac
856 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
857 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
858 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
859 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
860 echo "$ac_t""$host" 1>&6
862 echo $ac_n "checking target system type""... $ac_c" 1>&6
863 echo "configure:864: checking target system type" >&5
865 target_alias=$target
866 case "$target_alias" in
867 NONE)
868 case $nonopt in
869 NONE) target_alias=$host_alias ;;
870 *) target_alias=$nonopt ;;
871 esac ;;
872 esac
874 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
875 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
876 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
877 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
878 echo "$ac_t""$target" 1>&6
880 echo $ac_n "checking build system type""... $ac_c" 1>&6
881 echo "configure:882: checking build system type" >&5
883 build_alias=$build
884 case "$build_alias" in
885 NONE)
886 case $nonopt in
887 NONE) build_alias=$host_alias ;;
888 *) build_alias=$nonopt ;;
889 esac ;;
890 esac
892 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
893 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
894 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
895 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
896 echo "$ac_t""$build" 1>&6
898 test "$host_alias" != "$target_alias" &&
899 test "$program_prefix$program_suffix$program_transform_name" = \
900 NONENONEs,x,x, &&
901 program_prefix=${target_alias}-
904 # Set program_transform_name
905 if test "$program_transform_name" = s,x,x,; then
906 program_transform_name=
907 else
908 # Double any \ or $. echo might interpret backslashes.
909 cat <<\EOF_SED > conftestsed
910 s,\\,\\\\,g; s,\$,$$,g
911 EOF_SED
912 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
913 rm -f conftestsed
915 test "$program_prefix" != NONE &&
916 program_transform_name="s,^,${program_prefix},; $program_transform_name"
917 # Use a double $ so make ignores it.
918 test "$program_suffix" != NONE &&
919 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
921 # sed with no file args requires a program.
922 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
925 # Find the native compiler
926 # Extract the first word of "gcc", so it can be a program name with args.
927 set dummy gcc; ac_word=$2
928 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
929 echo "configure:799: checking for $ac_word" >&5
930 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
931 echo $ac_n "(cached) $ac_c" 1>&6
932 else
933 if test -n "$CC"; then
934 ac_cv_prog_CC="$CC" # Let the user override the test.
935 else
936 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
937 ac_dummy="$PATH"
938 for ac_dir in $ac_dummy; do
939 test -z "$ac_dir" && ac_dir=.
940 if test -f $ac_dir/$ac_word; then
941 ac_cv_prog_CC="gcc"
942 break
944 done
945 IFS="$ac_save_ifs"
948 CC="$ac_cv_prog_CC"
949 if test -n "$CC"; then
950 echo "$ac_t""$CC" 1>&6
951 else
952 echo "$ac_t""no" 1>&6
955 if test -z "$CC"; then
956 # Extract the first word of "cc", so it can be a program name with args.
957 set dummy cc; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:829: checking for $ac_word" >&5
960 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
961 echo $ac_n "(cached) $ac_c" 1>&6
962 else
963 if test -n "$CC"; then
964 ac_cv_prog_CC="$CC" # Let the user override the test.
965 else
966 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
967 ac_prog_rejected=no
968 ac_dummy="$PATH"
969 for ac_dir in $ac_dummy; do
970 test -z "$ac_dir" && ac_dir=.
971 if test -f $ac_dir/$ac_word; then
972 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
973 ac_prog_rejected=yes
974 continue
976 ac_cv_prog_CC="cc"
977 break
979 done
980 IFS="$ac_save_ifs"
981 if test $ac_prog_rejected = yes; then
982 # We found a bogon in the path, so make sure we never use it.
983 set dummy $ac_cv_prog_CC
984 shift
985 if test $# -gt 0; then
986 # We chose a different compiler from the bogus one.
987 # However, it has the same basename, so the bogon will be chosen
988 # first if we set CC to just the basename; use the full file name.
989 shift
990 set dummy "$ac_dir/$ac_word" "$@"
991 shift
992 ac_cv_prog_CC="$@"
997 CC="$ac_cv_prog_CC"
998 if test -n "$CC"; then
999 echo "$ac_t""$CC" 1>&6
1000 else
1001 echo "$ac_t""no" 1>&6
1004 if test -z "$CC"; then
1005 case "`uname -s`" in
1006 *win32* | *WIN32*)
1007 # Extract the first word of "cl", so it can be a program name with args.
1008 set dummy cl; ac_word=$2
1009 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1010 echo "configure:880: checking for $ac_word" >&5
1011 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1012 echo $ac_n "(cached) $ac_c" 1>&6
1013 else
1014 if test -n "$CC"; then
1015 ac_cv_prog_CC="$CC" # Let the user override the test.
1016 else
1017 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1018 ac_dummy="$PATH"
1019 for ac_dir in $ac_dummy; do
1020 test -z "$ac_dir" && ac_dir=.
1021 if test -f $ac_dir/$ac_word; then
1022 ac_cv_prog_CC="cl"
1023 break
1025 done
1026 IFS="$ac_save_ifs"
1029 CC="$ac_cv_prog_CC"
1030 if test -n "$CC"; then
1031 echo "$ac_t""$CC" 1>&6
1032 else
1033 echo "$ac_t""no" 1>&6
1036 esac
1038 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1041 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1042 echo "configure:912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1044 ac_ext=c
1045 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1046 ac_cpp='$CPP $CPPFLAGS'
1047 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1048 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1049 cross_compiling=$ac_cv_prog_cc_cross
1051 cat > conftest.$ac_ext << EOF
1053 #line 923 "configure"
1054 #include "confdefs.h"
1056 main(){return(0);}
1058 if { (eval echo configure:928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1059 ac_cv_prog_cc_works=yes
1060 # If we can't run a trivial program, we are probably using a cross compiler.
1061 if (./conftest; exit) 2>/dev/null; then
1062 ac_cv_prog_cc_cross=no
1063 else
1064 ac_cv_prog_cc_cross=yes
1066 else
1067 echo "configure: failed program was:" >&5
1068 cat conftest.$ac_ext >&5
1069 ac_cv_prog_cc_works=no
1071 rm -fr conftest*
1072 ac_ext=c
1073 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1074 ac_cpp='$CPP $CPPFLAGS'
1075 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1076 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1077 cross_compiling=$ac_cv_prog_cc_cross
1079 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1080 if test $ac_cv_prog_cc_works = no; then
1081 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1083 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1084 echo "configure:954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1085 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1086 cross_compiling=$ac_cv_prog_cc_cross
1088 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1089 echo "configure:959: checking whether we are using GNU C" >&5
1090 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092 else
1093 cat > conftest.c <<EOF
1094 #ifdef __GNUC__
1095 yes;
1096 #endif
1098 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1099 ac_cv_prog_gcc=yes
1100 else
1101 ac_cv_prog_gcc=no
1105 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1107 if test $ac_cv_prog_gcc = yes; then
1108 GCC=yes
1109 else
1110 GCC=
1113 ac_test_CFLAGS="${CFLAGS+set}"
1114 ac_save_CFLAGS="$CFLAGS"
1115 CFLAGS=
1116 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1117 echo "configure:987: checking whether ${CC-cc} accepts -g" >&5
1118 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1119 echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121 echo 'void f(){}' > conftest.c
1122 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1123 ac_cv_prog_cc_g=yes
1124 else
1125 ac_cv_prog_cc_g=no
1127 rm -f conftest*
1131 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1132 if test "$ac_test_CFLAGS" = set; then
1133 CFLAGS="$ac_save_CFLAGS"
1134 elif test $ac_cv_prog_cc_g = yes; then
1135 if test "$GCC" = yes; then
1136 CFLAGS="-g -O2"
1137 else
1138 CFLAGS="-g"
1140 else
1141 if test "$GCC" = yes; then
1142 CFLAGS="-O2"
1143 else
1144 CFLAGS=
1148 if test "x$CC" != xcc; then
1149 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1150 echo "configure:1020: checking whether $CC and cc understand -c and -o together" >&5
1151 else
1152 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1153 echo "configure:1023: checking whether cc understands -c and -o together" >&5
1155 set dummy $CC; ac_cc="`echo $2 |
1156 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1157 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1158 echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160 echo 'foo(){}' > conftest.c
1161 # Make sure it works both with $CC and with simple cc.
1162 # We do the test twice because some compilers refuse to overwrite an
1163 # existing .o file with -o, though they will create one.
1164 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1165 if { (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1166 test -f conftest.o && { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1167 then
1168 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1169 if test "x$CC" != xcc; then
1170 # Test first that cc exists at all.
1171 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1172 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1173 if { (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1174 test -f conftest.o && { (eval echo configure:1044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1175 then
1176 # cc works too.
1178 else
1179 # cc exists but doesn't like -o.
1180 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1184 else
1185 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1187 rm -f conftest*
1190 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1191 echo "$ac_t""yes" 1>&6
1192 else
1193 echo "$ac_t""no" 1>&6
1194 cat >> confdefs.h <<\EOF
1195 #define NO_MINUS_C_MINUS_O 1
1200 # autoconf is lame and doesn't give us any substitution variable for this.
1201 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1202 NO_MINUS_C_MINUS_O=yes
1203 else
1204 OUTPUT_OPTION='-o $@'
1209 # See if GNAT has been installed
1210 if test $host != $build; then
1211 ac_tool_prefix=${host_alias}-
1212 else
1213 ac_tool_prefix=
1217 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1218 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1220 echo "configure:1154: checking for $ac_word" >&5
1221 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223 else
1224 if test -n "$GNATBIND"; then
1225 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1226 else
1227 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1228 ac_dummy="$PATH"
1229 for ac_dir in $ac_dummy; do
1230 test -z "$ac_dir" && ac_dir=.
1231 if test -f $ac_dir/$ac_word; then
1232 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1233 break
1235 done
1236 IFS="$ac_save_ifs"
1239 GNATBIND="$ac_cv_prog_GNATBIND"
1240 if test -n "$GNATBIND"; then
1241 echo "$ac_t""$GNATBIND" 1>&6
1242 else
1243 echo "$ac_t""no" 1>&6
1247 if test -z "$ac_cv_prog_GNATBIND"; then
1248 if test -n "$ac_tool_prefix"; then
1249 # Extract the first word of "gnatbind", so it can be a program name with args.
1250 set dummy gnatbind; ac_word=$2
1251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1252 echo "configure:1186: checking for $ac_word" >&5
1253 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255 else
1256 if test -n "$GNATBIND"; then
1257 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1258 else
1259 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1260 ac_dummy="$PATH"
1261 for ac_dir in $ac_dummy; do
1262 test -z "$ac_dir" && ac_dir=.
1263 if test -f $ac_dir/$ac_word; then
1264 ac_cv_prog_GNATBIND="gnatbind"
1265 break
1267 done
1268 IFS="$ac_save_ifs"
1269 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1272 GNATBIND="$ac_cv_prog_GNATBIND"
1273 if test -n "$GNATBIND"; then
1274 echo "$ac_t""$GNATBIND" 1>&6
1275 else
1276 echo "$ac_t""no" 1>&6
1279 else
1280 GNATBIND="no"
1284 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1285 echo "configure:1219: checking for compiler driver that understands Ada" >&5
1286 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1287 echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289 cat >conftest.adb <<EOF
1290 procedure conftest is begin null; end conftest;
1292 gcc_cv_prog_adac=no
1293 # Have to do ac_tool_prefix and user overrides by hand.
1294 user_adac=$ADAC
1295 user_cc=$CC
1296 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1297 ${ac_tool_prefix}$user_cc $user_cc \
1298 ${ac_tool_prefix}gcc gcc \
1299 ${ac_tool_prefix}cc cc \
1300 ${ac_tool_prefix}gnatgcc gnatgcc \
1301 ${ac_tool_prefix}gnatcc gnatcc \
1302 ${ac_tool_prefix}adagcc adagcc \
1303 ${ac_tool_prefix}adacc adacc ; do
1304 # There is a bug in all released versions of GCC which causes the
1305 # driver to exit successfully when the appropriate language module
1306 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1307 # Therefore we must check for the error message as well as an
1308 # unsuccessful exit.
1309 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1310 if test x"$errors" = x; then
1311 gcc_cv_prog_adac=$cand
1312 break
1314 done
1315 rm -f conftest.*
1318 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1319 ADAC=$gcc_cv_prog_adac
1322 if test x$GNATBIND != xno && test x$ADAC != xno; then
1323 have_gnat=yes
1324 else
1325 have_gnat=no
1329 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1330 echo "configure:1264: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1331 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1332 echo $ac_n "(cached) $ac_c" 1>&6
1333 else
1334 save_CFLAGS="$CFLAGS"
1335 CFLAGS="-Wno-long-long"
1336 cat > conftest.$ac_ext <<EOF
1337 #line 1271 "configure"
1338 #include "confdefs.h"
1340 int main() {
1342 ; return 0; }
1344 if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1345 rm -rf conftest*
1346 ac_cv_prog_cc_no_long_long=yes
1347 else
1348 echo "configure: failed program was:" >&5
1349 cat conftest.$ac_ext >&5
1350 rm -rf conftest*
1351 ac_cv_prog_cc_no_long_long=no
1353 rm -f conftest*
1354 CFLAGS="$save_CFLAGS"
1357 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1359 if test x$have_gnat != xno ; then
1360 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1361 echo "configure:1295: checking whether ${ADAC} accepts -Wno-long-long" >&5
1362 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1363 echo $ac_n "(cached) $ac_c" 1>&6
1364 else
1365 cat >conftest.adb <<EOF
1366 procedure conftest is begin null; end conftest;
1368 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1369 ac_cv_prog_adac_no_long_long=yes
1370 else
1371 ac_cv_prog_adac_no_long_long=no
1373 rm -f conftest*
1376 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1377 else
1378 ac_cv_prog_adac_no_long_long=yes
1381 strict1_warn=
1382 if test $ac_cv_prog_cc_no_long_long = yes && \
1383 test $ac_cv_prog_adac_no_long_long = yes ; then
1384 strict1_warn="-pedantic -Wno-long-long"
1388 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1389 echo "configure:1323: checking how to run the C preprocessor" >&5
1390 # On Suns, sometimes $CPP names a directory.
1391 if test -n "$CPP" && test -d "$CPP"; then
1392 CPP=
1394 if test -z "$CPP"; then
1395 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1396 echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398 # This must be in double quotes, not single quotes, because CPP may get
1399 # substituted into the Makefile and "${CC-cc}" will confuse make.
1400 CPP="${CC-cc} -E"
1401 # On the NeXT, cc -E runs the code through the compiler's parser,
1402 # not just through cpp.
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1338 "configure"
1405 #include "confdefs.h"
1406 #include <assert.h>
1407 Syntax Error
1409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1410 { (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1412 if test -z "$ac_err"; then
1414 else
1415 echo "$ac_err" >&5
1416 echo "configure: failed program was:" >&5
1417 cat conftest.$ac_ext >&5
1418 rm -rf conftest*
1419 CPP="${CC-cc} -E -traditional-cpp"
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1355 "configure"
1422 #include "confdefs.h"
1423 #include <assert.h>
1424 Syntax Error
1426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1427 { (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1429 if test -z "$ac_err"; then
1431 else
1432 echo "$ac_err" >&5
1433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
1435 rm -rf conftest*
1436 CPP="${CC-cc} -nologo -E"
1437 cat > conftest.$ac_ext <<EOF
1438 #line 1372 "configure"
1439 #include "confdefs.h"
1440 #include <assert.h>
1441 Syntax Error
1443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1444 { (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1446 if test -z "$ac_err"; then
1448 else
1449 echo "$ac_err" >&5
1450 echo "configure: failed program was:" >&5
1451 cat conftest.$ac_ext >&5
1452 rm -rf conftest*
1453 CPP=/lib/cpp
1455 rm -f conftest*
1457 rm -f conftest*
1459 rm -f conftest*
1460 ac_cv_prog_CPP="$CPP"
1462 CPP="$ac_cv_prog_CPP"
1463 else
1464 ac_cv_prog_CPP="$CPP"
1466 echo "$ac_t""$CPP" 1>&6
1468 echo $ac_n "checking for inline""... $ac_c" 1>&6
1469 echo "configure:1403: checking for inline" >&5
1470 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1471 echo $ac_n "(cached) $ac_c" 1>&6
1472 else
1473 ac_cv_c_inline=no
1474 for ac_kw in inline __inline__ __inline; do
1475 cat > conftest.$ac_ext <<EOF
1476 #line 1410 "configure"
1477 #include "confdefs.h"
1479 int main() {
1480 } $ac_kw foo() {
1481 ; return 0; }
1483 if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484 rm -rf conftest*
1485 ac_cv_c_inline=$ac_kw; break
1486 else
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1490 rm -f conftest*
1491 done
1495 echo "$ac_t""$ac_cv_c_inline" 1>&6
1496 case "$ac_cv_c_inline" in
1497 inline | yes) ;;
1498 no) cat >> confdefs.h <<\EOF
1499 #define inline
1502 *) cat >> confdefs.h <<EOF
1503 #define inline $ac_cv_c_inline
1506 esac
1508 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1509 echo "configure:1443: checking for volatile" >&5
1510 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1512 else
1513 cat > conftest.$ac_ext <<EOF
1514 #line 1448 "configure"
1515 #include "confdefs.h"
1517 int main() {
1518 volatile int foo;
1519 ; return 0; }
1521 if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1522 rm -rf conftest*
1523 gcc_cv_c_volatile=yes
1524 else
1525 echo "configure: failed program was:" >&5
1526 cat conftest.$ac_ext >&5
1527 rm -rf conftest*
1528 gcc_cv_c_volatile=no
1530 rm -f conftest*
1533 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1534 if test $gcc_cv_c_volatile = yes ; then
1535 cat >> confdefs.h <<\EOF
1536 #define HAVE_VOLATILE 1
1542 echo $ac_n "checking for long double""... $ac_c" 1>&6
1543 echo "configure:1477: checking for long double" >&5
1544 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547 if test "$GCC" = yes; then
1548 gcc_cv_c_long_double=yes
1549 else
1550 cat > conftest.$ac_ext <<EOF
1551 #line 1485 "configure"
1552 #include "confdefs.h"
1554 int main() {
1555 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1556 long double foo = 0.0;
1557 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1558 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1559 ; return 0; }
1561 if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1562 rm -rf conftest*
1563 gcc_cv_c_long_double=yes
1564 else
1565 echo "configure: failed program was:" >&5
1566 cat conftest.$ac_ext >&5
1567 rm -rf conftest*
1568 gcc_cv_c_long_double=no
1570 rm -f conftest*
1574 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1575 if test $gcc_cv_c_long_double = yes; then
1576 cat >> confdefs.h <<\EOF
1577 #define HAVE_LONG_DOUBLE 1
1582 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1583 echo "configure:1517: checking for long long int" >&5
1584 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1585 echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1522 "configure"
1589 #include "confdefs.h"
1591 int main() {
1592 long long int i;
1593 ; return 0; }
1595 if { (eval echo configure:1529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1596 rm -rf conftest*
1597 ac_cv_c_long_long=yes
1598 else
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1601 rm -rf conftest*
1602 ac_cv_c_long_long=no
1604 rm -f conftest*
1607 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1608 if test $ac_cv_c_long_long = yes; then
1609 cat >> confdefs.h <<\EOF
1610 #define HAVE_LONG_LONG 1
1614 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1615 echo "configure:1549: checking for __int64" >&5
1616 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
1618 else
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1554 "configure"
1621 #include "confdefs.h"
1623 int main() {
1624 __int64 i;
1625 ; return 0; }
1627 if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1628 rm -rf conftest*
1629 ac_cv_c___int64=yes
1630 else
1631 echo "configure: failed program was:" >&5
1632 cat conftest.$ac_ext >&5
1633 rm -rf conftest*
1634 ac_cv_c___int64=no
1636 rm -f conftest*
1639 echo "$ac_t""$ac_cv_c___int64" 1>&6
1640 if test $ac_cv_c___int64 = yes; then
1641 cat >> confdefs.h <<\EOF
1642 #define HAVE___INT64 1
1647 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1648 echo "configure:1582: checking for built-in _Bool" >&5
1649 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1650 echo $ac_n "(cached) $ac_c" 1>&6
1651 else
1652 cat > conftest.$ac_ext <<EOF
1653 #line 1587 "configure"
1654 #include "confdefs.h"
1656 int main() {
1657 _Bool foo;
1658 ; return 0; }
1660 if { (eval echo configure:1594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1661 rm -rf conftest*
1662 gcc_cv_c__bool=yes
1663 else
1664 echo "configure: failed program was:" >&5
1665 cat conftest.$ac_ext >&5
1666 rm -rf conftest*
1667 gcc_cv_c__bool=no
1669 rm -f conftest*
1673 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1674 if test $gcc_cv_c__bool = yes; then
1675 cat >> confdefs.h <<\EOF
1676 #define HAVE__BOOL 1
1682 # sizeof(char) is 1 by definition.
1683 echo $ac_n "checking size of short""... $ac_c" 1>&6
1684 echo "configure:1618: checking size of short" >&5
1685 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1686 echo $ac_n "(cached) $ac_c" 1>&6
1687 else
1688 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1689 cat > conftest.$ac_ext <<EOF
1690 #line 1624 "configure"
1691 #include "confdefs.h"
1692 #include "confdefs.h"
1693 #include <sys/types.h>
1696 int main() {
1697 switch (0) case 0: case (sizeof (short) == $ac_size):;
1698 ; return 0; }
1700 if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701 rm -rf conftest*
1702 ac_cv_sizeof_short=$ac_size
1703 else
1704 echo "configure: failed program was:" >&5
1705 cat conftest.$ac_ext >&5
1707 rm -f conftest*
1708 if test x$ac_cv_sizeof_short != x ; then break; fi
1709 done
1713 if test x$ac_cv_sizeof_short = x ; then
1714 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1716 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1717 cat >> confdefs.h <<EOF
1718 #define SIZEOF_SHORT $ac_cv_sizeof_short
1722 echo $ac_n "checking size of int""... $ac_c" 1>&6
1723 echo "configure:1657: checking size of int" >&5
1724 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1728 cat > conftest.$ac_ext <<EOF
1729 #line 1663 "configure"
1730 #include "confdefs.h"
1731 #include "confdefs.h"
1732 #include <sys/types.h>
1735 int main() {
1736 switch (0) case 0: case (sizeof (int) == $ac_size):;
1737 ; return 0; }
1739 if { (eval echo configure:1673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1740 rm -rf conftest*
1741 ac_cv_sizeof_int=$ac_size
1742 else
1743 echo "configure: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1746 rm -f conftest*
1747 if test x$ac_cv_sizeof_int != x ; then break; fi
1748 done
1752 if test x$ac_cv_sizeof_int = x ; then
1753 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1755 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1756 cat >> confdefs.h <<EOF
1757 #define SIZEOF_INT $ac_cv_sizeof_int
1761 echo $ac_n "checking size of long""... $ac_c" 1>&6
1762 echo "configure:1696: checking size of long" >&5
1763 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1764 echo $ac_n "(cached) $ac_c" 1>&6
1765 else
1766 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1767 cat > conftest.$ac_ext <<EOF
1768 #line 1702 "configure"
1769 #include "confdefs.h"
1770 #include "confdefs.h"
1771 #include <sys/types.h>
1774 int main() {
1775 switch (0) case 0: case (sizeof (long) == $ac_size):;
1776 ; return 0; }
1778 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1779 rm -rf conftest*
1780 ac_cv_sizeof_long=$ac_size
1781 else
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
1785 rm -f conftest*
1786 if test x$ac_cv_sizeof_long != x ; then break; fi
1787 done
1791 if test x$ac_cv_sizeof_long = x ; then
1792 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1794 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1795 cat >> confdefs.h <<EOF
1796 #define SIZEOF_LONG $ac_cv_sizeof_long
1800 if test $ac_cv_c_long_long = yes; then
1801 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1802 echo "configure:1736: checking size of long long" >&5
1803 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1807 cat > conftest.$ac_ext <<EOF
1808 #line 1742 "configure"
1809 #include "confdefs.h"
1810 #include "confdefs.h"
1811 #include <sys/types.h>
1814 int main() {
1815 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1816 ; return 0; }
1818 if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1819 rm -rf conftest*
1820 ac_cv_sizeof_long_long=$ac_size
1821 else
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1825 rm -f conftest*
1826 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1827 done
1831 if test x$ac_cv_sizeof_long_long = x ; then
1832 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1834 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1835 cat >> confdefs.h <<EOF
1836 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1841 if test $ac_cv_c___int64 = yes; then
1842 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1843 echo "configure:1777: checking size of __int64" >&5
1844 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1783 "configure"
1850 #include "confdefs.h"
1851 #include "confdefs.h"
1852 #include <sys/types.h>
1855 int main() {
1856 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1857 ; return 0; }
1859 if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860 rm -rf conftest*
1861 ac_cv_sizeof___int64=$ac_size
1862 else
1863 echo "configure: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1866 rm -f conftest*
1867 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1868 done
1872 if test x$ac_cv_sizeof___int64 = x ; then
1873 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1875 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1876 cat >> confdefs.h <<EOF
1877 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1883 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1884 echo "configure:1818: checking execution character set" >&5
1885 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 cat > conftest.$ac_ext <<EOF
1889 #line 1823 "configure"
1890 #include "confdefs.h"
1891 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1892 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1893 ASCII
1894 #endif
1896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1897 egrep "ASCII" >/dev/null 2>&1; then
1898 rm -rf conftest*
1899 ac_cv_c_charset=ASCII
1901 rm -f conftest*
1903 if test x${ac_cv_c_charset+set} != xset; then
1904 cat > conftest.$ac_ext <<EOF
1905 #line 1839 "configure"
1906 #include "confdefs.h"
1907 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1908 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1909 EBCDIC
1910 #endif
1912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1913 egrep "EBCDIC" >/dev/null 2>&1; then
1914 rm -rf conftest*
1915 ac_cv_c_charset=EBCDIC
1917 rm -f conftest*
1920 if test x${ac_cv_c_charset+set} != xset; then
1921 ac_cv_c_charset=unknown
1925 echo "$ac_t""$ac_cv_c_charset" 1>&6
1926 if test $ac_cv_c_charset = unknown; then
1927 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1928 elif test $ac_cv_c_charset = EBCDIC; then
1929 cat >> confdefs.h <<\EOF
1930 #define HOST_EBCDIC 1
1935 # If the native compiler is GCC, we can enable warnings even in stage1.
1936 # That's useful for people building cross-compilers, or just running a
1937 # quick `make'.
1938 warn_cflags=
1939 if test "x$GCC" = "xyes"; then
1940 warn_cflags='$(GCC_WARN_CFLAGS)'
1944 # Determine whether or not multilibs are enabled.
1945 # Check whether --enable-multilib or --disable-multilib was given.
1946 if test "${enable_multilib+set}" = set; then
1947 enableval="$enable_multilib"
1949 else
1950 enable_multilib=yes
1955 # Enable expensive internal checks
1956 # Check whether --enable-checking or --disable-checking was given.
1957 if test "${enable_checking+set}" = set; then
1958 enableval="$enable_checking"
1959 ac_checking=
1960 ac_tree_checking=
1961 ac_rtl_checking=
1962 ac_rtlflag_checking=
1963 ac_gc_checking=
1964 ac_gc_always_collect=
1965 case "${enableval}" in
1966 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1967 ac_rtlflag_checking=1 ;;
1968 no) ;;
1969 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1970 set fnord $enableval; shift
1971 IFS="$ac_save_IFS"
1972 for check
1974 case $check in
1975 misc) ac_checking=1 ;;
1976 tree) ac_tree_checking=1 ;;
1977 rtlflag) ac_rtlflag_checking=1 ;;
1978 rtl) ac_rtl_checking=1 ;;
1979 gc) ac_gc_checking=1 ;;
1980 gcac) ac_gc_always_collect=1 ;;
1981 valgrind) ac_checking_valgrind=1 ;;
1982 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1983 esac
1984 done
1986 esac
1988 else
1989 # Enable some checks by default for development versions of GCC
1990 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1993 nocommon_flag=""
1994 if test x$ac_checking != x ; then
1995 cat >> confdefs.h <<\EOF
1996 #define ENABLE_CHECKING 1
1999 nocommon_flag=-fno-common
2002 if test x$ac_tree_checking != x ; then
2003 cat >> confdefs.h <<\EOF
2004 #define ENABLE_TREE_CHECKING 1
2008 if test x$ac_rtl_checking != x ; then
2009 cat >> confdefs.h <<\EOF
2010 #define ENABLE_RTL_CHECKING 1
2014 if test x$ac_rtlflag_checking != x ; then
2015 cat >> confdefs.h <<\EOF
2016 #define ENABLE_RTL_FLAG_CHECKING 1
2020 if test x$ac_gc_checking != x ; then
2021 cat >> confdefs.h <<\EOF
2022 #define ENABLE_GC_CHECKING 1
2026 if test x$ac_gc_always_collect != x ; then
2027 cat >> confdefs.h <<\EOF
2028 #define ENABLE_GC_ALWAYS_COLLECT 1
2032 valgrind_path_defines=
2033 valgrind_command=
2034 if test x$ac_checking_valgrind != x ; then
2035 # It is certainly possible that there's valgrind but no valgrind.h.
2036 # GCC relies on making annotations so we must have both.
2037 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2038 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2039 echo "configure:1973: checking for valgrind.h" >&5
2040 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2041 echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043 cat > conftest.$ac_ext <<EOF
2044 #line 1978 "configure"
2045 #include "confdefs.h"
2046 #include <valgrind.h>
2048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2049 { (eval echo configure:1983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2051 if test -z "$ac_err"; then
2052 rm -rf conftest*
2053 eval "ac_cv_header_$ac_safe=yes"
2054 else
2055 echo "$ac_err" >&5
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 rm -rf conftest*
2059 eval "ac_cv_header_$ac_safe=no"
2061 rm -f conftest*
2063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2064 echo "$ac_t""yes" 1>&6
2065 have_valgrind_h=yes
2066 else
2067 echo "$ac_t""no" 1>&6
2068 have_valgrind_h=no
2071 # Extract the first word of "valgrind", so it can be a program name with args.
2072 set dummy valgrind; ac_word=$2
2073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2074 echo "configure:2008: checking for $ac_word" >&5
2075 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2076 echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078 case "$valgrind_path" in
2080 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2083 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2084 for ac_dir in $PATH; do
2085 test -z "$ac_dir" && ac_dir=.
2086 if test -f $ac_dir/$ac_word; then
2087 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2088 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2089 break
2092 done
2093 IFS="$ac_save_ifs"
2095 esac
2097 valgrind_path="$ac_cv_path_valgrind_path"
2098 if test -n "$valgrind_path"; then
2099 echo "$ac_t""$valgrind_path" 1>&6
2100 else
2101 echo "$ac_t""no" 1>&6
2104 if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
2105 { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
2107 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2108 valgrind_command="$valgrind_path -q"
2109 cat >> confdefs.h <<\EOF
2110 #define ENABLE_VALGRIND_CHECKING 1
2117 # Enable code coverage collection
2118 # Check whether --enable-coverage or --disable-coverage was given.
2119 if test "${enable_coverage+set}" = set; then
2120 enableval="$enable_coverage"
2121 case "${enableval}" in
2122 yes|noopt)
2123 coverage_flags="-fprofile-arcs -ftest-coverage -O0"
2125 opt)
2126 coverage_flags="-fprofile-arcs -ftest-coverage -O2"
2129 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2131 esac
2132 else
2133 coverage_flags=""
2138 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
2139 if test "${with_cpp_install_dir+set}" = set; then
2140 withval="$with_cpp_install_dir"
2141 if test x$withval = xyes; then
2142 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
2143 elif test x$withval != xno; then
2144 cpp_install_dir=$withval
2149 # Enable __cxa_atexit for C++.
2150 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2151 if test "${enable___cxa_atexit+set}" = set; then
2152 enableval="$enable___cxa_atexit"
2156 if test x$enable___cxa_atexit = xyes; then
2157 cat >> confdefs.h <<\EOF
2158 #define DEFAULT_USE_CXA_ATEXIT 1
2163 # Enable Multibyte Characters for C/C++
2164 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2165 if test "${enable_c_mbchar+set}" = set; then
2166 enableval="$enable_c_mbchar"
2167 if test x$enable_c_mbchar != xno; then
2168 cat >> confdefs.h <<\EOF
2169 #define MULTIBYTE_CHARS 1
2176 # Enable threads
2177 # Pass with no value to take the default
2178 # Pass with a value to specify a thread package
2179 # Check whether --enable-threads or --disable-threads was given.
2180 if test "${enable_threads+set}" = set; then
2181 enableval="$enable_threads"
2183 else
2184 enable_threads=''
2188 enable_threads_flag=$enable_threads
2189 # Check if a valid thread package
2190 case x${enable_threads_flag} in
2191 x | xno)
2192 # No threads
2193 target_thread_file='single'
2195 xyes)
2196 # default
2197 target_thread_file=''
2199 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2200 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
2201 target_thread_file=$enable_threads_flag
2204 echo "$enable_threads is an unknown thread package" 1>&2
2205 exit 1
2207 esac
2209 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2210 if test "${enable_objc_gc+set}" = set; then
2211 enableval="$enable_objc_gc"
2212 if test x$enable_objc_gc = xno; then
2213 objc_boehm_gc=''
2214 else
2215 objc_boehm_gc=1
2217 else
2218 objc_boehm_gc=''
2222 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2223 if test "${with_dwarf2+set}" = set; then
2224 withval="$with_dwarf2"
2225 dwarf2="$with_dwarf2"
2226 else
2227 dwarf2=no
2231 # Check whether --enable-shared or --disable-shared was given.
2232 if test "${enable_shared+set}" = set; then
2233 enableval="$enable_shared"
2235 case $enable_shared in
2236 yes | no) ;;
2238 enable_shared=no
2239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2240 for pkg in $enableval; do
2241 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2242 enable_shared=yes
2244 done
2245 IFS="$ac_save_ifs"
2247 esac
2249 else
2250 enable_shared=yes
2255 # Stage specific cflags for build.
2256 stage1_cflags=
2257 case $build in
2258 vax-*-*)
2259 if test x$GCC = xyes
2260 then
2261 stage1_cflags="-Wa,-J"
2262 else
2263 stage1_cflags="-J"
2266 powerpc-*-darwin*)
2267 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2268 # sources; use -no-cpp-precomp to get to GNU cpp.
2269 # Apple's GCC has bugs in designated initializer handling, so disable
2270 # that too.
2271 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2273 esac
2276 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2277 echo "configure:2323: checking whether ${MAKE-make} sets \${MAKE}" >&5
2278 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2279 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2280 echo $ac_n "(cached) $ac_c" 1>&6
2281 else
2282 cat > conftestmake <<\EOF
2283 all:
2284 @echo 'ac_maketemp="${MAKE}"'
2286 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2287 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2288 if test -n "$ac_maketemp"; then
2289 eval ac_cv_prog_make_${ac_make}_set=yes
2290 else
2291 eval ac_cv_prog_make_${ac_make}_set=no
2293 rm -f conftestmake
2295 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2296 echo "$ac_t""yes" 1>&6
2297 SET_MAKE=
2298 else
2299 echo "$ac_t""no" 1>&6
2300 SET_MAKE="MAKE=${MAKE-make}"
2304 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2305 echo "configure:2351: checking whether a default assembler was specified" >&5
2306 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2307 if test x"$gas_flag" = x"no"; then
2308 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2309 else
2310 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2312 else
2313 echo "$ac_t""no" 1>&6
2316 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2317 echo "configure:2363: checking whether a default linker was specified" >&5
2318 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2319 if test x"$gnu_ld_flag" = x"no"; then
2320 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2321 else
2322 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2324 else
2325 echo "$ac_t""no" 1>&6
2328 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2329 echo "configure:2375: checking for GNU C library" >&5
2330 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2331 echo $ac_n "(cached) $ac_c" 1>&6
2332 else
2333 cat > conftest.$ac_ext <<EOF
2334 #line 2380 "configure"
2335 #include "confdefs.h"
2336 #include <features.h>
2337 int main() {
2339 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2340 #error Not a GNU C library system
2341 #endif
2342 ; return 0; }
2344 if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2345 rm -rf conftest*
2346 gcc_cv_glibc=yes
2347 else
2348 echo "configure: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350 rm -rf conftest*
2351 gcc_cv_glibc=no
2353 rm -f conftest*
2356 echo "$ac_t""$gcc_cv_glibc" 1>&6
2357 if test $gcc_cv_glibc = yes; then
2358 cat >> confdefs.h <<\EOF
2359 #define _GNU_SOURCE 1
2364 # Find some useful tools
2365 for ac_prog in mawk gawk nawk awk
2367 # Extract the first word of "$ac_prog", so it can be a program name with args.
2368 set dummy $ac_prog; ac_word=$2
2369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2370 echo "configure:2416: checking for $ac_word" >&5
2371 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373 else
2374 if test -n "$AWK"; then
2375 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2376 else
2377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2378 ac_dummy="$PATH"
2379 for ac_dir in $ac_dummy; do
2380 test -z "$ac_dir" && ac_dir=.
2381 if test -f $ac_dir/$ac_word; then
2382 ac_cv_prog_AWK="$ac_prog"
2383 break
2385 done
2386 IFS="$ac_save_ifs"
2389 AWK="$ac_cv_prog_AWK"
2390 if test -n "$AWK"; then
2391 echo "$ac_t""$AWK" 1>&6
2392 else
2393 echo "$ac_t""no" 1>&6
2396 test -n "$AWK" && break
2397 done
2399 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2400 echo "configure:2446: checking whether ln works" >&5
2401 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2402 echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404 rm -f conftestdata_t
2405 echo >conftestdata_f
2406 if ln conftestdata_f conftestdata_t 2>/dev/null
2407 then
2408 gcc_cv_prog_LN="ln"
2409 else
2410 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2411 then
2412 gcc_cv_prog_LN="ln -s"
2413 else
2414 gcc_cv_prog_LN=cp
2417 rm -f conftestdata_f conftestdata_t
2420 LN="$gcc_cv_prog_LN"
2421 if test "$gcc_cv_prog_LN" = "ln"; then
2422 echo "$ac_t""yes" 1>&6
2423 else
2424 if test "$gcc_cv_prog_LN" = "ln -s"; then
2425 echo "$ac_t""no, using ln -s" 1>&6
2426 else
2427 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2431 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2432 echo "configure:2478: checking whether ln -s works" >&5
2433 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436 rm -f conftestdata_t
2437 echo >conftestdata_f
2438 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2439 then
2440 gcc_cv_prog_LN_S="ln -s"
2441 else
2442 if ln conftestdata_f conftestdata_t 2>/dev/null
2443 then
2444 gcc_cv_prog_LN_S=ln
2445 else
2446 gcc_cv_prog_LN_S=cp
2449 rm -f conftestdata_f conftestdata_t
2452 LN_S="$gcc_cv_prog_LN_S"
2453 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2454 echo "$ac_t""yes" 1>&6
2455 else
2456 if test "$gcc_cv_prog_LN_S" = "ln"; then
2457 echo "$ac_t""no, using ln" 1>&6
2458 else
2459 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2463 # Extract the first word of "ranlib", so it can be a program name with args.
2464 set dummy ranlib; ac_word=$2
2465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2466 echo "configure:2512: checking for $ac_word" >&5
2467 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2468 echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470 if test -n "$RANLIB"; then
2471 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2472 else
2473 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2474 ac_dummy="$PATH"
2475 for ac_dir in $ac_dummy; do
2476 test -z "$ac_dir" && ac_dir=.
2477 if test -f $ac_dir/$ac_word; then
2478 ac_cv_prog_RANLIB="ranlib"
2479 break
2481 done
2482 IFS="$ac_save_ifs"
2483 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2486 RANLIB="$ac_cv_prog_RANLIB"
2487 if test -n "$RANLIB"; then
2488 echo "$ac_t""$RANLIB" 1>&6
2489 else
2490 echo "$ac_t""no" 1>&6
2493 # Find a good install program. We prefer a C program (faster),
2494 # so one script is as good as another. But avoid the broken or
2495 # incompatible versions:
2496 # SysV /etc/install, /usr/sbin/install
2497 # SunOS /usr/etc/install
2498 # IRIX /sbin/install
2499 # AIX /bin/install
2500 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2501 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2502 # ./install, which can be erroneously created by make from ./install.sh.
2503 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2504 echo "configure:2550: checking for a BSD compatible install" >&5
2505 if test -z "$INSTALL"; then
2506 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2507 echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2510 for ac_dir in $PATH; do
2511 # Account for people who put trailing slashes in PATH elements.
2512 case "$ac_dir/" in
2513 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2515 # OSF1 and SCO ODT 3.0 have their own names for install.
2516 for ac_prog in ginstall scoinst install; do
2517 if test -f $ac_dir/$ac_prog; then
2518 if test $ac_prog = install &&
2519 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2520 # AIX install. It has an incompatible calling convention.
2521 # OSF/1 installbsd also uses dspmsg, but is usable.
2523 else
2524 ac_cv_path_install="$ac_dir/$ac_prog -c"
2525 break 2
2528 done
2530 esac
2531 done
2532 IFS="$ac_save_IFS"
2535 if test "${ac_cv_path_install+set}" = set; then
2536 INSTALL="$ac_cv_path_install"
2537 else
2538 # As a last resort, use the slow shell script. We don't cache a
2539 # path for INSTALL within a source directory, because that will
2540 # break other packages using the cache if that directory is
2541 # removed, or if the path is relative.
2542 INSTALL="$ac_install_sh"
2545 echo "$ac_t""$INSTALL" 1>&6
2547 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2548 # It thinks the first close brace ends the variable substitution.
2549 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2551 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2554 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2555 echo "configure:2601: checking for ANSI C header files" >&5
2556 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2557 echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559 cat > conftest.$ac_ext <<EOF
2560 #line 2606 "configure"
2561 #include "confdefs.h"
2562 #include <stdlib.h>
2563 #include <stdarg.h>
2564 #include <string.h>
2565 #include <float.h>
2567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2568 { (eval echo configure:2614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2570 if test -z "$ac_err"; then
2571 rm -rf conftest*
2572 ac_cv_header_stdc=yes
2573 else
2574 echo "$ac_err" >&5
2575 echo "configure: failed program was:" >&5
2576 cat conftest.$ac_ext >&5
2577 rm -rf conftest*
2578 ac_cv_header_stdc=no
2580 rm -f conftest*
2582 if test $ac_cv_header_stdc = yes; then
2583 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2584 cat > conftest.$ac_ext <<EOF
2585 #line 2631 "configure"
2586 #include "confdefs.h"
2587 #include <string.h>
2589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2590 egrep "memchr" >/dev/null 2>&1; then
2592 else
2593 rm -rf conftest*
2594 ac_cv_header_stdc=no
2596 rm -f conftest*
2600 if test $ac_cv_header_stdc = yes; then
2601 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2602 cat > conftest.$ac_ext <<EOF
2603 #line 2649 "configure"
2604 #include "confdefs.h"
2605 #include <stdlib.h>
2607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2608 egrep "free" >/dev/null 2>&1; then
2610 else
2611 rm -rf conftest*
2612 ac_cv_header_stdc=no
2614 rm -f conftest*
2618 if test $ac_cv_header_stdc = yes; then
2619 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2620 if test "$cross_compiling" = yes; then
2622 else
2623 cat > conftest.$ac_ext <<EOF
2624 #line 2670 "configure"
2625 #include "confdefs.h"
2626 #include <ctype.h>
2627 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2628 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2629 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2630 int main () { int i; for (i = 0; i < 256; i++)
2631 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2632 exit (0); }
2635 if { (eval echo configure:2681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2636 then
2638 else
2639 echo "configure: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 rm -fr conftest*
2642 ac_cv_header_stdc=no
2644 rm -fr conftest*
2650 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2651 if test $ac_cv_header_stdc = yes; then
2652 cat >> confdefs.h <<\EOF
2653 #define STDC_HEADERS 1
2658 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2659 echo "configure:2705: checking whether time.h and sys/time.h may both be included" >&5
2660 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2661 echo $ac_n "(cached) $ac_c" 1>&6
2662 else
2663 cat > conftest.$ac_ext <<EOF
2664 #line 2710 "configure"
2665 #include "confdefs.h"
2666 #include <sys/types.h>
2667 #include <sys/time.h>
2668 #include <time.h>
2669 int main() {
2670 struct tm *tp;
2671 ; return 0; }
2673 if { (eval echo configure:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2674 rm -rf conftest*
2675 ac_cv_header_time=yes
2676 else
2677 echo "configure: failed program was:" >&5
2678 cat conftest.$ac_ext >&5
2679 rm -rf conftest*
2680 ac_cv_header_time=no
2682 rm -f conftest*
2685 echo "$ac_t""$ac_cv_header_time" 1>&6
2686 if test $ac_cv_header_time = yes; then
2687 cat >> confdefs.h <<\EOF
2688 #define TIME_WITH_SYS_TIME 1
2693 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2694 echo "configure:2740: checking for working stdbool.h" >&5
2695 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2696 echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698 cat > conftest.$ac_ext <<EOF
2699 #line 2745 "configure"
2700 #include "confdefs.h"
2701 #include <stdbool.h>
2702 int main() {
2703 bool foo = false;
2704 ; return 0; }
2706 if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2707 rm -rf conftest*
2708 ac_cv_header_stdbool_h=yes
2709 else
2710 echo "configure: failed program was:" >&5
2711 cat conftest.$ac_ext >&5
2712 rm -rf conftest*
2713 ac_cv_header_stdbool_h=no
2715 rm -f conftest*
2718 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2719 if test $ac_cv_header_stdbool_h = yes; then
2720 cat >> confdefs.h <<\EOF
2721 #define HAVE_STDBOOL_H 1
2726 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2727 echo "configure:2773: checking whether string.h and strings.h may both be included" >&5
2728 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2729 echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731 cat > conftest.$ac_ext <<EOF
2732 #line 2778 "configure"
2733 #include "confdefs.h"
2734 #include <string.h>
2735 #include <strings.h>
2736 int main() {
2738 ; return 0; }
2740 if { (eval echo configure:2786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2741 rm -rf conftest*
2742 gcc_cv_header_string=yes
2743 else
2744 echo "configure: failed program was:" >&5
2745 cat conftest.$ac_ext >&5
2746 rm -rf conftest*
2747 gcc_cv_header_string=no
2749 rm -f conftest*
2752 echo "$ac_t""$gcc_cv_header_string" 1>&6
2753 if test $gcc_cv_header_string = yes; then
2754 cat >> confdefs.h <<\EOF
2755 #define STRING_WITH_STRINGS 1
2760 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2761 echo "configure:2807: checking for sys/wait.h that is POSIX.1 compatible" >&5
2762 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2763 echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765 cat > conftest.$ac_ext <<EOF
2766 #line 2812 "configure"
2767 #include "confdefs.h"
2768 #include <sys/types.h>
2769 #include <sys/wait.h>
2770 #ifndef WEXITSTATUS
2771 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2772 #endif
2773 #ifndef WIFEXITED
2774 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2775 #endif
2776 int main() {
2777 int s;
2778 wait (&s);
2779 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2780 ; return 0; }
2782 if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2783 rm -rf conftest*
2784 ac_cv_header_sys_wait_h=yes
2785 else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -rf conftest*
2789 ac_cv_header_sys_wait_h=no
2791 rm -f conftest*
2794 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2795 if test $ac_cv_header_sys_wait_h = yes; then
2796 cat >> confdefs.h <<\EOF
2797 #define HAVE_SYS_WAIT_H 1
2802 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2803 fcntl.h unistd.h sys/file.h sys/time.h \
2804 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2805 direct.h malloc.h langinfo.h
2807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2809 echo "configure:2855: checking for $ac_hdr" >&5
2810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2811 echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813 cat > conftest.$ac_ext <<EOF
2814 #line 2860 "configure"
2815 #include "confdefs.h"
2816 #include <$ac_hdr>
2818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2819 { (eval echo configure:2865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2821 if test -z "$ac_err"; then
2822 rm -rf conftest*
2823 eval "ac_cv_header_$ac_safe=yes"
2824 else
2825 echo "$ac_err" >&5
2826 echo "configure: failed program was:" >&5
2827 cat conftest.$ac_ext >&5
2828 rm -rf conftest*
2829 eval "ac_cv_header_$ac_safe=no"
2831 rm -f conftest*
2833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2834 echo "$ac_t""yes" 1>&6
2835 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2836 cat >> confdefs.h <<EOF
2837 #define $ac_tr_hdr 1
2840 else
2841 echo "$ac_t""no" 1>&6
2843 done
2846 # Check for thread headers.
2847 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2848 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2849 echo "configure:2895: checking for thread.h" >&5
2850 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2851 echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853 cat > conftest.$ac_ext <<EOF
2854 #line 2900 "configure"
2855 #include "confdefs.h"
2856 #include <thread.h>
2858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2859 { (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2861 if test -z "$ac_err"; then
2862 rm -rf conftest*
2863 eval "ac_cv_header_$ac_safe=yes"
2864 else
2865 echo "$ac_err" >&5
2866 echo "configure: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 rm -rf conftest*
2869 eval "ac_cv_header_$ac_safe=no"
2871 rm -f conftest*
2873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2874 echo "$ac_t""yes" 1>&6
2875 have_thread_h=yes
2876 else
2877 echo "$ac_t""no" 1>&6
2878 have_thread_h=
2881 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2882 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2883 echo "configure:2929: checking for pthread.h" >&5
2884 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2885 echo $ac_n "(cached) $ac_c" 1>&6
2886 else
2887 cat > conftest.$ac_ext <<EOF
2888 #line 2934 "configure"
2889 #include "confdefs.h"
2890 #include <pthread.h>
2892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2893 { (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2895 if test -z "$ac_err"; then
2896 rm -rf conftest*
2897 eval "ac_cv_header_$ac_safe=yes"
2898 else
2899 echo "$ac_err" >&5
2900 echo "configure: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2902 rm -rf conftest*
2903 eval "ac_cv_header_$ac_safe=no"
2905 rm -f conftest*
2907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2908 echo "$ac_t""yes" 1>&6
2909 have_pthread_h=yes
2910 else
2911 echo "$ac_t""no" 1>&6
2912 have_pthread_h=
2916 # These tests can't be done till we know if we have limits.h.
2917 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2918 echo "configure:2964: checking for CHAR_BIT" >&5
2919 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2920 echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922 cat > conftest.$ac_ext <<EOF
2923 #line 2969 "configure"
2924 #include "confdefs.h"
2925 #ifdef HAVE_LIMITS_H
2926 #include <limits.h>
2927 #endif
2928 #ifdef CHAR_BIT
2929 found
2930 #endif
2932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2933 egrep "found" >/dev/null 2>&1; then
2934 rm -rf conftest*
2935 gcc_cv_decl_char_bit=yes
2936 else
2937 rm -rf conftest*
2938 gcc_cv_decl_char_bit=no
2940 rm -f conftest*
2945 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2946 if test $gcc_cv_decl_char_bit = no; then
2947 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2948 echo "configure:2994: checking number of bits in a byte" >&5
2949 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2953 gcc_cv_c_nbby=
2954 while test $i -lt 65; do
2955 cat > conftest.$ac_ext <<EOF
2956 #line 3002 "configure"
2957 #include "confdefs.h"
2959 int main() {
2960 switch(0) {
2961 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2962 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2964 ; return 0; }
2966 if { (eval echo configure:3012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2967 rm -rf conftest*
2968 gcc_cv_c_nbby=$i; break
2969 else
2970 echo "configure: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2973 rm -f conftest*
2974 i=`expr $i + 1`
2975 done
2976 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2980 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2981 if test $gcc_cv_c_nbby = failed; then
2982 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2983 else
2984 cat >> confdefs.h <<EOF
2985 #define CHAR_BIT $gcc_cv_c_nbby
2990 echo $ac_n "checking byte ordering""... $ac_c" 1>&6
2991 echo "configure:3037: checking byte ordering" >&5
2992 if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
2993 echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995 ac_cv_c_compile_endian=unknown
2997 ac_ext=c
2998 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3001 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3002 cross_compiling=$ac_cv_prog_cc_cross
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3051 "configure"
3006 #include "confdefs.h"
3008 #ifdef HAVE_LIMITS_H
3009 # include <limits.h>
3010 #endif
3011 /* This structure must have no internal padding. */
3012 struct {
3013 char prefix[sizeof "\nendian:" - 1];
3014 short word;
3015 char postfix[2];
3016 } tester = {
3017 "\nendian:",
3018 #if SIZEOF_SHORT == 4
3019 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
3020 #endif
3021 ('A' << CHAR_BIT) | 'B',
3022 'X', '\n'
3025 if { (eval echo configure:3071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3026 od -c conftest.o |
3027 sed 's/^[0-7]*[ ]*/ /
3028 s/\*/./g
3029 s/ \\n/*/g
3030 s/ [0-9][0-9][0-9]/./g
3031 s/ \\[^ ]/./g' |
3032 tr -d '
3033 ' | tr -s '*' '
3034 ' | fold | sed '$a\
3035 ' > conftest.dmp
3036 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
3037 ac_cv_c_compile_endian=big-endian
3038 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
3039 ac_cv_c_compile_endian=little-endian
3042 rm -rf conftest*
3043 ac_ext=c
3044 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3047 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3048 cross_compiling=$ac_cv_prog_cc_cross
3053 echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
3054 if test $ac_cv_c_compile_endian = unknown; then
3055 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
3056 elif test $ac_cv_c_compile_endian = big-endian; then
3057 cat >> confdefs.h <<\EOF
3058 #define HOST_WORDS_BIG_ENDIAN 1
3063 echo $ac_n "checking floating point format""... $ac_c" 1>&6
3064 echo "configure:3110: checking floating point format" >&5
3065 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
3066 echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3069 ac_ext=c
3070 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3071 ac_cpp='$CPP $CPPFLAGS'
3072 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3073 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3074 cross_compiling=$ac_cv_prog_cc_cross
3076 cat > conftest.$ac_ext <<EOF
3077 #line 3123 "configure"
3078 #include "confdefs.h"
3079 /* This will not work unless sizeof(double) == 8. */
3080 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
3082 /* This structure must have no internal padding. */
3083 struct possibility {
3084 char prefix[8];
3085 double candidate;
3086 char postfix[8];
3089 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3090 struct possibility table [] =
3092 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3093 C( 3.53802595280598432000e+18), /* D__float - VAX */
3094 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3095 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3096 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3099 if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3100 od -c conftest.o |
3101 sed 's/^[0-7]*[ ]*/ /
3102 s/\*/./g
3103 s/ \\n/*/g
3104 s/ [0-9][0-9][0-9]/./g
3105 s/ \\[^ ]/./g' |
3106 tr -d '
3107 ' | tr -s '*' '
3108 ' | fold | sed '$a\
3109 ' > conftest.dmp
3110 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3111 ac_cv_c_float_format='IEEE (big-endian)'
3112 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3113 ac_cv_c_float_format='IEEE (big-endian)'
3114 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3115 ac_cv_c_float_format='IEEE (little-endian)'
3116 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3117 ac_cv_c_float_format='IEEE (little-endian)'
3118 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3119 ac_cv_c_float_format='VAX D-float'
3120 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3121 ac_cv_c_float_format='PDP-10'
3122 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3123 ac_cv_c_float_format='IBM 370 hex'
3124 else
3125 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3127 else
3128 { echo "configure: error: compile failed" 1>&2; exit 1; }
3130 rm -rf conftest*
3131 ac_ext=c
3132 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3133 ac_cpp='$CPP $CPPFLAGS'
3134 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3135 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3136 cross_compiling=$ac_cv_prog_cc_cross
3141 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3142 # IEEE is the default format. If the float endianness isn't the same
3143 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3144 # (which is a tristate: yes, no, default). This is only an issue with
3145 # IEEE; the other formats are only supported by a few machines each,
3146 # all with the same endianness.
3147 format=
3148 fbigend=
3149 case $ac_cv_c_float_format in
3150 'IEEE (big-endian)' )
3151 if test $ac_cv_c_compile_endian = little-endian; then
3152 fbigend=1
3155 'IEEE (little-endian)' )
3156 if test $ac_cv_c_compile_endian = big-endian; then
3157 fbigend=0
3160 'VAX D-float' )
3161 format=VAX_FLOAT_FORMAT
3163 'PDP-10' )
3164 format=PDP10_FLOAT_FORMAT
3166 'IBM 370 hex' )
3167 format=IBM_FLOAT_FORMAT
3169 esac
3170 if test -n "$format"; then
3171 cat >> confdefs.h <<EOF
3172 #define HOST_FLOAT_FORMAT $format
3176 if test -n "$fbigend"; then
3177 cat >> confdefs.h <<EOF
3178 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3184 # See if we have the mktemp command.
3185 # Extract the first word of "mktemp", so it can be a program name with args.
3186 set dummy mktemp; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3234: checking for $ac_word" >&5
3189 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3190 echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192 if test -n "$have_mktemp_command"; then
3193 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3194 else
3195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3196 ac_dummy="$PATH"
3197 for ac_dir in $ac_dummy; do
3198 test -z "$ac_dir" && ac_dir=.
3199 if test -f $ac_dir/$ac_word; then
3200 ac_cv_prog_have_mktemp_command="yes"
3201 break
3203 done
3204 IFS="$ac_save_ifs"
3205 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3208 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3209 if test -n "$have_mktemp_command"; then
3210 echo "$ac_t""$have_mktemp_command" 1>&6
3211 else
3212 echo "$ac_t""no" 1>&6
3216 # Do we have a single-tree copy of texinfo?
3217 if test -f $srcdir/../texinfo/Makefile.in; then
3218 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3219 gcc_cv_prog_makeinfo_modern=yes
3220 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3221 else
3222 # See if makeinfo has been installed and is modern enough
3223 # that we can use it.
3224 # Extract the first word of "makeinfo", so it can be a program name with args.
3225 set dummy makeinfo; ac_word=$2
3226 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3227 echo "configure:3273: checking for $ac_word" >&5
3228 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3229 echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231 if test -n "$MAKEINFO"; then
3232 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3233 else
3234 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3235 ac_dummy="$PATH"
3236 for ac_dir in $ac_dummy; do
3237 test -z "$ac_dir" && ac_dir=.
3238 if test -f $ac_dir/$ac_word; then
3239 ac_cv_prog_MAKEINFO="makeinfo"
3240 break
3242 done
3243 IFS="$ac_save_ifs"
3246 MAKEINFO="$ac_cv_prog_MAKEINFO"
3247 if test -n "$MAKEINFO"; then
3248 echo "$ac_t""$MAKEINFO" 1>&6
3249 else
3250 echo "$ac_t""no" 1>&6
3253 if test -n "$MAKEINFO"; then
3254 # Found it, now check the version.
3255 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3256 echo "configure:3302: checking for modern makeinfo" >&5
3257 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3258 echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260 ac_prog_version=`$MAKEINFO --version 2>&1 |
3261 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3262 echo "configure:3308: version of makeinfo is $ac_prog_version" >&5
3263 case $ac_prog_version in
3264 '') gcc_cv_prog_makeinfo_modern=no;;
3265 4.[1-9]*)
3266 gcc_cv_prog_makeinfo_modern=yes;;
3267 *) gcc_cv_prog_makeinfo_modern=no;;
3268 esac
3272 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3273 else
3274 gcc_cv_prog_makeinfo_modern=no
3279 if test $gcc_cv_prog_makeinfo_modern = no; then
3280 echo "configure: warning:
3281 *** Makeinfo is missing or too old.
3282 *** Info documentation will not be built." 1>&2
3283 BUILD_INFO=
3284 else
3285 BUILD_INFO=info
3288 # Is pod2man recent enough to regenerate manpages?
3289 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3290 echo "configure:3336: checking for recent Pod::Man" >&5
3291 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3292 echo "$ac_t""yes" 1>&6
3293 GENERATED_MANPAGES=generated-manpages
3294 else
3295 echo "$ac_t""no" 1>&6
3296 GENERATED_MANPAGES=
3299 # How about lex?
3300 if test -f $srcdir/../flex/skel.c; then
3301 FLEX='$(objdir)/../flex/flex'
3302 else
3303 # Extract the first word of "flex", so it can be a program name with args.
3304 set dummy flex; ac_word=$2
3305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3306 echo "configure:3352: checking for $ac_word" >&5
3307 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3308 echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310 if test -n "$FLEX"; then
3311 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3312 else
3313 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3314 ac_dummy="$PATH"
3315 for ac_dir in $ac_dummy; do
3316 test -z "$ac_dir" && ac_dir=.
3317 if test -f $ac_dir/$ac_word; then
3318 ac_cv_prog_FLEX="flex"
3319 break
3321 done
3322 IFS="$ac_save_ifs"
3323 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3326 FLEX="$ac_cv_prog_FLEX"
3327 if test -n "$FLEX"; then
3328 echo "$ac_t""$FLEX" 1>&6
3329 else
3330 echo "$ac_t""no" 1>&6
3335 # Bison?
3336 # The -L switch is so bison can find its skeleton file.
3337 if test -f $srcdir/../bison/bison.simple; then
3338 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3339 else
3340 # Extract the first word of "bison", so it can be a program name with args.
3341 set dummy bison; ac_word=$2
3342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3343 echo "configure:3389: checking for $ac_word" >&5
3344 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3345 echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347 if test -n "$BISON"; then
3348 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3349 else
3350 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3351 ac_dummy="$PATH"
3352 for ac_dir in $ac_dummy; do
3353 test -z "$ac_dir" && ac_dir=.
3354 if test -f $ac_dir/$ac_word; then
3355 ac_cv_prog_BISON="bison"
3356 break
3358 done
3359 IFS="$ac_save_ifs"
3360 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3363 BISON="$ac_cv_prog_BISON"
3364 if test -n "$BISON"; then
3365 echo "$ac_t""$BISON" 1>&6
3366 else
3367 echo "$ac_t""no" 1>&6
3372 # These libraries may be used by collect2.
3373 # We may need a special search path to get them linked.
3374 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3375 echo "configure:3421: checking for collect2 libraries" >&5
3376 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3377 echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379 save_LIBS="$LIBS"
3380 for libs in '' -lld -lmld \
3381 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3382 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3384 LIBS="$libs"
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3432 "configure"
3387 #include "confdefs.h"
3388 /* Override any gcc2 internal prototype to avoid an error. */
3389 /* We use char because int might match the return type of a gcc2
3390 builtin and then its argument prototype would still apply. */
3391 char ldopen();
3393 int main() {
3394 ldopen()
3395 ; return 0; }
3397 if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3398 rm -rf conftest*
3399 gcc_cv_collect2_libs="$libs"; break
3400 else
3401 echo "configure: failed program was:" >&5
3402 cat conftest.$ac_ext >&5
3404 rm -f conftest*
3405 done
3406 LIBS="$save_LIBS"
3407 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3410 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3411 case $gcc_cv_collect2_libs in
3412 "none required") ;;
3413 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3414 esac
3417 # When building Ada code on Alpha, we need exc_resume which is usually in
3418 # -lexc. So test for it.
3419 save_LIBS="$LIBS"
3420 LIBS=
3422 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3423 echo "configure:3469: checking for library containing exc_resume" >&5
3424 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3425 echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427 ac_func_search_save_LIBS="$LIBS"
3428 ac_cv_search_exc_resume="no"
3429 cat > conftest.$ac_ext <<EOF
3430 #line 3476 "configure"
3431 #include "confdefs.h"
3432 /* Override any gcc2 internal prototype to avoid an error. */
3433 /* We use char because int might match the return type of a gcc2
3434 builtin and then its argument prototype would still apply. */
3435 char exc_resume();
3437 int main() {
3438 exc_resume()
3439 ; return 0; }
3441 if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3442 rm -rf conftest*
3443 ac_cv_search_exc_resume="none required"
3444 else
3445 echo "configure: failed program was:" >&5
3446 cat conftest.$ac_ext >&5
3448 rm -f conftest*
3449 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3450 LIBS="-l$i $ac_func_search_save_LIBS"
3451 cat > conftest.$ac_ext <<EOF
3452 #line 3498 "configure"
3453 #include "confdefs.h"
3454 /* Override any gcc2 internal prototype to avoid an error. */
3455 /* We use char because int might match the return type of a gcc2
3456 builtin and then its argument prototype would still apply. */
3457 char exc_resume();
3459 int main() {
3460 exc_resume()
3461 ; return 0; }
3463 if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3464 rm -rf conftest*
3465 ac_cv_search_exc_resume="-l$i"
3466 break
3467 else
3468 echo "configure: failed program was:" >&5
3469 cat conftest.$ac_ext >&5
3471 rm -f conftest*
3472 done
3473 LIBS="$ac_func_search_save_LIBS"
3476 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3477 if test "$ac_cv_search_exc_resume" != "no"; then
3478 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3480 else :
3483 GNAT_LIBEXC="$LIBS"
3484 LIBS="$save_LIBS"
3487 # See if the stage1 system preprocessor understands the ANSI C
3488 # preprocessor stringification operator. (Used by symcat.h.)
3491 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3492 echo "configure:3538: checking for preprocessor stringizing operator" >&5
3493 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3494 echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3543 "configure"
3498 #include "confdefs.h"
3500 #define x(y) #y
3502 char *s = x(teststring);
3505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3506 egrep "#teststring" >/dev/null 2>&1; then
3507 rm -rf conftest*
3508 ac_cv_c_stringize=no
3509 else
3510 rm -rf conftest*
3511 ac_cv_c_stringize=yes
3513 rm -f conftest*
3517 if test "${ac_cv_c_stringize}" = yes
3518 then
3519 cat >> confdefs.h <<\EOF
3520 #define HAVE_STRINGIZE 1
3524 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3527 # Use <inttypes.h> only if it exists,
3528 # doesn't clash with <sys/types.h>, and declares intmax_t.
3529 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3530 echo "configure:3576: checking for inttypes.h" >&5
3531 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3532 echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3581 "configure"
3536 #include "confdefs.h"
3537 #include <sys/types.h>
3538 #include <inttypes.h>
3539 int main() {
3540 intmax_t i = -1;
3541 ; return 0; }
3543 if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3544 rm -rf conftest*
3545 gcc_cv_header_inttypes_h=yes
3546 else
3547 echo "configure: failed program was:" >&5
3548 cat conftest.$ac_ext >&5
3549 rm -rf conftest*
3550 gcc_cv_header_inttypes_h=no
3552 rm -f conftest*
3555 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3556 if test $gcc_cv_header_inttypes_h = yes; then
3557 cat >> confdefs.h <<\EOF
3558 #define HAVE_INTTYPES_H 1
3564 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3565 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3566 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3567 scandir alphasort
3569 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3570 echo "configure:3616: checking for $ac_func" >&5
3571 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3621 "configure"
3576 #include "confdefs.h"
3577 /* System header to define __stub macros and hopefully few prototypes,
3578 which can conflict with char $ac_func(); below. */
3579 #include <assert.h>
3580 /* Override any gcc2 internal prototype to avoid an error. */
3581 /* We use char because int might match the return type of a gcc2
3582 builtin and then its argument prototype would still apply. */
3583 char $ac_func();
3585 int main() {
3587 /* The GNU C library defines this for functions which it implements
3588 to always fail with ENOSYS. Some functions are actually named
3589 something starting with __ and the normal name is an alias. */
3590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3591 choke me
3592 #else
3593 $ac_func();
3594 #endif
3596 ; return 0; }
3598 if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3599 rm -rf conftest*
3600 eval "ac_cv_func_$ac_func=yes"
3601 else
3602 echo "configure: failed program was:" >&5
3603 cat conftest.$ac_ext >&5
3604 rm -rf conftest*
3605 eval "ac_cv_func_$ac_func=no"
3607 rm -f conftest*
3610 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3611 echo "$ac_t""yes" 1>&6
3612 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3613 cat >> confdefs.h <<EOF
3614 #define $ac_tr_func 1
3617 else
3618 echo "$ac_t""no" 1>&6
3620 done
3623 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3624 echo "configure:3670: checking for ssize_t" >&5
3625 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3626 echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628 cat > conftest.$ac_ext <<EOF
3629 #line 3675 "configure"
3630 #include "confdefs.h"
3631 #include <sys/types.h>
3632 #if STDC_HEADERS
3633 #include <stdlib.h>
3634 #include <stddef.h>
3635 #endif
3637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3638 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3639 rm -rf conftest*
3640 ac_cv_type_ssize_t=yes
3641 else
3642 rm -rf conftest*
3643 ac_cv_type_ssize_t=no
3645 rm -f conftest*
3648 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3649 if test $ac_cv_type_ssize_t = no; then
3650 cat >> confdefs.h <<\EOF
3651 #define ssize_t int
3657 # Try to determine the array type of the second argument of getgroups
3658 # for the target system (int or gid_t).
3659 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3660 echo "configure:3706: checking for uid_t in sys/types.h" >&5
3661 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3662 echo $ac_n "(cached) $ac_c" 1>&6
3663 else
3664 cat > conftest.$ac_ext <<EOF
3665 #line 3711 "configure"
3666 #include "confdefs.h"
3667 #include <sys/types.h>
3669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3670 egrep "uid_t" >/dev/null 2>&1; then
3671 rm -rf conftest*
3672 ac_cv_type_uid_t=yes
3673 else
3674 rm -rf conftest*
3675 ac_cv_type_uid_t=no
3677 rm -f conftest*
3681 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3682 if test $ac_cv_type_uid_t = no; then
3683 cat >> confdefs.h <<\EOF
3684 #define uid_t int
3687 cat >> confdefs.h <<\EOF
3688 #define gid_t int
3693 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3694 echo "configure:3740: checking type of array argument to getgroups" >&5
3695 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3696 echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698 if test "$cross_compiling" = yes; then
3699 ac_cv_type_getgroups=cross
3700 else
3701 cat > conftest.$ac_ext <<EOF
3702 #line 3748 "configure"
3703 #include "confdefs.h"
3705 /* Thanks to Mike Rendell for this test. */
3706 #include <sys/types.h>
3707 #define NGID 256
3708 #undef MAX
3709 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3710 main()
3712 gid_t gidset[NGID];
3713 int i, n;
3714 union { gid_t gval; long lval; } val;
3716 val.lval = -1;
3717 for (i = 0; i < NGID; i++)
3718 gidset[i] = val.gval;
3719 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3720 gidset);
3721 /* Exit non-zero if getgroups seems to require an array of ints. This
3722 happens when gid_t is short but getgroups modifies an array of ints. */
3723 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3727 if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3728 then
3729 ac_cv_type_getgroups=gid_t
3730 else
3731 echo "configure: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3733 rm -fr conftest*
3734 ac_cv_type_getgroups=int
3736 rm -fr conftest*
3739 if test $ac_cv_type_getgroups = cross; then
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3787 "configure"
3742 #include "confdefs.h"
3743 #include <unistd.h>
3745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3746 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3747 rm -rf conftest*
3748 ac_cv_type_getgroups=gid_t
3749 else
3750 rm -rf conftest*
3751 ac_cv_type_getgroups=int
3753 rm -f conftest*
3758 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3759 cat >> confdefs.h <<EOF
3760 #define GETGROUPS_T $ac_cv_type_getgroups
3764 if test "${target}" = "${build}"; then
3765 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3766 else
3767 case "${target}" in
3768 # This condition may need some tweaking. It should include all
3769 # targets where the array type of the second argument of getgroups
3770 # is int and the type of gid_t is not equivalent to int.
3771 *-*-sunos* | *-*-ultrix*)
3772 TARGET_GETGROUPS_T=int
3775 TARGET_GETGROUPS_T=gid_t
3777 esac
3781 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3782 echo "configure:3828: checking whether the printf functions support %p" >&5
3783 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3784 echo $ac_n "(cached) $ac_c" 1>&6
3785 else
3786 if test "$cross_compiling" = yes; then
3787 gcc_cv_func_printf_ptr=no
3788 else
3789 cat > conftest.$ac_ext <<EOF
3790 #line 3836 "configure"
3791 #include "confdefs.h"
3792 #include <stdio.h>
3794 int main()
3796 char buf[64];
3797 char *p = buf, *q = NULL;
3798 sprintf(buf, "%p", p);
3799 sscanf(buf, "%p", &q);
3800 return (p != q);
3803 if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3804 then
3805 gcc_cv_func_printf_ptr=yes
3806 else
3807 echo "configure: failed program was:" >&5
3808 cat conftest.$ac_ext >&5
3809 rm -fr conftest*
3810 gcc_cv_func_printf_ptr=no
3812 rm -fr conftest*
3815 rm -f core core.* *.core
3818 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3819 if test $gcc_cv_func_printf_ptr = yes ; then
3820 cat >> confdefs.h <<\EOF
3821 #define HAVE_PRINTF_PTR 1
3827 case "${host}" in
3828 *-*-uwin*)
3829 { echo "configure: error:
3830 *** UWIN may not be used as a host platform because
3831 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3833 *-*-*vms*)
3834 # Under VMS, vfork works very different than on Unix. The standard test
3835 # won't work, and it isn't easily adaptable. It makes more sense to
3836 # just force it.
3837 ac_cv_func_vfork_works=yes
3839 esac
3840 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3841 echo "configure:3887: checking for pid_t" >&5
3842 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3843 echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3892 "configure"
3847 #include "confdefs.h"
3848 #include <sys/types.h>
3849 #if STDC_HEADERS
3850 #include <stdlib.h>
3851 #include <stddef.h>
3852 #endif
3854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3855 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3856 rm -rf conftest*
3857 ac_cv_type_pid_t=yes
3858 else
3859 rm -rf conftest*
3860 ac_cv_type_pid_t=no
3862 rm -f conftest*
3865 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3866 if test $ac_cv_type_pid_t = no; then
3867 cat >> confdefs.h <<\EOF
3868 #define pid_t int
3873 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3874 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3875 echo "configure:3921: checking for vfork.h" >&5
3876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3877 echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3926 "configure"
3881 #include "confdefs.h"
3882 #include <vfork.h>
3884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3885 { (eval echo configure:3931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3887 if test -z "$ac_err"; then
3888 rm -rf conftest*
3889 eval "ac_cv_header_$ac_safe=yes"
3890 else
3891 echo "$ac_err" >&5
3892 echo "configure: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3894 rm -rf conftest*
3895 eval "ac_cv_header_$ac_safe=no"
3897 rm -f conftest*
3899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3900 echo "$ac_t""yes" 1>&6
3901 cat >> confdefs.h <<\EOF
3902 #define HAVE_VFORK_H 1
3905 else
3906 echo "$ac_t""no" 1>&6
3909 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3910 echo "configure:3956: checking for working vfork" >&5
3911 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3912 echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914 if test "$cross_compiling" = yes; then
3915 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3916 echo "configure:3962: checking for vfork" >&5
3917 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3918 echo $ac_n "(cached) $ac_c" 1>&6
3919 else
3920 cat > conftest.$ac_ext <<EOF
3921 #line 3967 "configure"
3922 #include "confdefs.h"
3923 /* System header to define __stub macros and hopefully few prototypes,
3924 which can conflict with char vfork(); below. */
3925 #include <assert.h>
3926 /* Override any gcc2 internal prototype to avoid an error. */
3927 /* We use char because int might match the return type of a gcc2
3928 builtin and then its argument prototype would still apply. */
3929 char vfork();
3931 int main() {
3933 /* The GNU C library defines this for functions which it implements
3934 to always fail with ENOSYS. Some functions are actually named
3935 something starting with __ and the normal name is an alias. */
3936 #if defined (__stub_vfork) || defined (__stub___vfork)
3937 choke me
3938 #else
3939 vfork();
3940 #endif
3942 ; return 0; }
3944 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945 rm -rf conftest*
3946 eval "ac_cv_func_vfork=yes"
3947 else
3948 echo "configure: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950 rm -rf conftest*
3951 eval "ac_cv_func_vfork=no"
3953 rm -f conftest*
3956 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3957 echo "$ac_t""yes" 1>&6
3959 else
3960 echo "$ac_t""no" 1>&6
3963 ac_cv_func_vfork_works=$ac_cv_func_vfork
3964 else
3965 cat > conftest.$ac_ext <<EOF
3966 #line 4012 "configure"
3967 #include "confdefs.h"
3968 /* Thanks to Paul Eggert for this test. */
3969 #include <stdio.h>
3970 #include <sys/types.h>
3971 #include <sys/stat.h>
3972 #ifdef HAVE_UNISTD_H
3973 #include <unistd.h>
3974 #endif
3975 #ifdef HAVE_VFORK_H
3976 #include <vfork.h>
3977 #endif
3978 /* On some sparc systems, changes by the child to local and incoming
3979 argument registers are propagated back to the parent.
3980 The compiler is told about this with #include <vfork.h>,
3981 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3982 Test for this by using a static variable whose address
3983 is put into a register that is clobbered by the vfork. */
3984 static
3985 #ifdef __cplusplus
3986 sparc_address_test (int arg)
3987 #else
3988 sparc_address_test (arg) int arg;
3989 #endif
3991 static pid_t child;
3992 if (!child) {
3993 child = vfork ();
3994 if (child < 0) {
3995 perror ("vfork");
3996 _exit(2);
3998 if (!child) {
3999 arg = getpid();
4000 write(-1, "", 0);
4001 _exit (arg);
4005 main() {
4006 pid_t parent = getpid ();
4007 pid_t child;
4009 sparc_address_test ();
4011 child = vfork ();
4013 if (child == 0) {
4014 /* Here is another test for sparc vfork register problems.
4015 This test uses lots of local variables, at least
4016 as many local variables as main has allocated so far
4017 including compiler temporaries. 4 locals are enough for
4018 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4019 A buggy compiler should reuse the register of parent
4020 for one of the local variables, since it will think that
4021 parent can't possibly be used any more in this routine.
4022 Assigning to the local variable will thus munge parent
4023 in the parent process. */
4024 pid_t
4025 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4026 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4027 /* Convince the compiler that p..p7 are live; otherwise, it might
4028 use the same hardware register for all 8 local variables. */
4029 if (p != p1 || p != p2 || p != p3 || p != p4
4030 || p != p5 || p != p6 || p != p7)
4031 _exit(1);
4033 /* On some systems (e.g. IRIX 3.3),
4034 vfork doesn't separate parent from child file descriptors.
4035 If the child closes a descriptor before it execs or exits,
4036 this munges the parent's descriptor as well.
4037 Test for this by closing stdout in the child. */
4038 _exit(close(fileno(stdout)) != 0);
4039 } else {
4040 int status;
4041 struct stat st;
4043 while (wait(&status) != child)
4045 exit(
4046 /* Was there some problem with vforking? */
4047 child < 0
4049 /* Did the child fail? (This shouldn't happen.) */
4050 || status
4052 /* Did the vfork/compiler bug occur? */
4053 || parent != getpid()
4055 /* Did the file descriptor bug occur? */
4056 || fstat(fileno(stdout), &st) != 0
4061 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4062 then
4063 ac_cv_func_vfork_works=yes
4064 else
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -fr conftest*
4068 ac_cv_func_vfork_works=no
4070 rm -fr conftest*
4075 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4076 if test $ac_cv_func_vfork_works = no; then
4077 cat >> confdefs.h <<\EOF
4078 #define vfork fork
4083 for ac_func in getpagesize
4085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4086 echo "configure:4132: checking for $ac_func" >&5
4087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4088 echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4137 "configure"
4092 #include "confdefs.h"
4093 /* System header to define __stub macros and hopefully few prototypes,
4094 which can conflict with char $ac_func(); below. */
4095 #include <assert.h>
4096 /* Override any gcc2 internal prototype to avoid an error. */
4097 /* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
4099 char $ac_func();
4101 int main() {
4103 /* The GNU C library defines this for functions which it implements
4104 to always fail with ENOSYS. Some functions are actually named
4105 something starting with __ and the normal name is an alias. */
4106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4107 choke me
4108 #else
4109 $ac_func();
4110 #endif
4112 ; return 0; }
4114 if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4115 rm -rf conftest*
4116 eval "ac_cv_func_$ac_func=yes"
4117 else
4118 echo "configure: failed program was:" >&5
4119 cat conftest.$ac_ext >&5
4120 rm -rf conftest*
4121 eval "ac_cv_func_$ac_func=no"
4123 rm -f conftest*
4126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4127 echo "$ac_t""yes" 1>&6
4128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4129 cat >> confdefs.h <<EOF
4130 #define $ac_tr_func 1
4133 else
4134 echo "$ac_t""no" 1>&6
4136 done
4138 # The test program for the next two tests is the same except for one
4139 # set of ifdefs.
4140 cat >ct-mmap.inc <<'EOF'
4141 #include <sys/types.h>
4142 #include <sys/mman.h>
4143 #include <fcntl.h>
4144 #include <signal.h>
4145 #include <setjmp.h>
4146 #include <stdio.h>
4148 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4149 # define MAP_ANONYMOUS MAP_ANON
4150 #endif
4152 /* This mess was copied from the GNU getpagesize.h. */
4153 #ifndef HAVE_GETPAGESIZE
4154 # ifdef HAVE_UNISTD_H
4155 # include <unistd.h>
4156 # endif
4158 /* Assume that all systems that can run configure have sys/param.h. */
4159 # ifndef HAVE_SYS_PARAM_H
4160 # define HAVE_SYS_PARAM_H 1
4161 # endif
4163 # ifdef _SC_PAGESIZE
4164 # define getpagesize() sysconf(_SC_PAGESIZE)
4165 # else /* no _SC_PAGESIZE */
4166 # ifdef HAVE_SYS_PARAM_H
4167 # include <sys/param.h>
4168 # ifdef EXEC_PAGESIZE
4169 # define getpagesize() EXEC_PAGESIZE
4170 # else /* no EXEC_PAGESIZE */
4171 # ifdef NBPG
4172 # define getpagesize() NBPG * CLSIZE
4173 # ifndef CLSIZE
4174 # define CLSIZE 1
4175 # endif /* no CLSIZE */
4176 # else /* no NBPG */
4177 # ifdef NBPC
4178 # define getpagesize() NBPC
4179 # else /* no NBPC */
4180 # ifdef PAGESIZE
4181 # define getpagesize() PAGESIZE
4182 # endif /* PAGESIZE */
4183 # endif /* no NBPC */
4184 # endif /* no NBPG */
4185 # endif /* no EXEC_PAGESIZE */
4186 # else /* no HAVE_SYS_PARAM_H */
4187 # define getpagesize() 8192 /* punt totally */
4188 # endif /* no HAVE_SYS_PARAM_H */
4189 # endif /* no _SC_PAGESIZE */
4191 #endif /* no HAVE_GETPAGESIZE */
4193 #ifndef MAP_FAILED
4194 # define MAP_FAILED -1
4195 #endif
4197 #undef perror_exit
4198 #define perror_exit(str, val) \
4199 do { perror(str); exit(val); } while (0)
4201 /* Some versions of cygwin mmap require that munmap is called with the
4202 same parameters as mmap. GCC expects that this is not the case.
4203 Test for various forms of this problem. Warning - icky signal games. */
4205 static sigset_t unblock_sigsegv;
4206 static jmp_buf r;
4207 static size_t pg;
4208 static int devzero;
4210 static char *
4211 anonmap (size)
4212 size_t size;
4214 #ifdef USE_MAP_ANON
4215 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4216 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4217 #else
4218 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4219 MAP_PRIVATE, devzero, 0);
4220 #endif
4223 static void
4224 sigsegv (unused)
4225 int unused;
4227 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4228 longjmp (r, 1);
4231 /* Basic functionality test. */
4232 void
4233 test_0 ()
4235 char *x = anonmap (pg);
4236 if (x == (char *) MAP_FAILED)
4237 perror_exit("test 0 mmap", 2);
4239 *(int *)x += 1;
4241 if (munmap(x, pg) < 0)
4242 perror_exit("test 0 munmap", 3);
4245 /* 1. If we map a 2-page region and unmap its second page, the first page
4246 must remain. */
4247 static void
4248 test_1 ()
4250 char *x = anonmap (pg * 2);
4251 if (x == (char *)MAP_FAILED)
4252 perror_exit ("test 1 mmap", 4);
4254 signal (SIGSEGV, sigsegv);
4255 if (setjmp (r))
4256 perror_exit ("test 1 fault", 5);
4258 x[0] = 1;
4259 x[pg] = 1;
4261 if (munmap (x + pg, pg) < 0)
4262 perror_exit ("test 1 munmap 1", 6);
4263 x[0] = 2;
4265 if (setjmp (r) == 0)
4267 x[pg] = 1;
4268 perror_exit ("test 1 no fault", 7);
4270 if (munmap (x, pg) < 0)
4271 perror_exit ("test 1 munmap 2", 8);
4274 /* 2. If we map a 2-page region and unmap its first page, the second
4275 page must remain. */
4276 static void
4277 test_2 ()
4279 char *x = anonmap (pg * 2);
4280 if (x == (char *)MAP_FAILED)
4281 perror_exit ("test 2 mmap", 9);
4283 signal (SIGSEGV, sigsegv);
4284 if (setjmp (r))
4285 perror_exit ("test 2 fault", 10);
4287 x[0] = 1;
4288 x[pg] = 1;
4290 if (munmap (x, pg) < 0)
4291 perror_exit ("test 2 munmap 1", 11);
4293 x[pg] = 2;
4295 if (setjmp (r) == 0)
4297 x[0] = 1;
4298 perror_exit ("test 2 no fault", 12);
4301 if (munmap (x+pg, pg) < 0)
4302 perror_exit ("test 2 munmap 2", 13);
4305 /* 3. If we map two adjacent 1-page regions and unmap them both with
4306 one munmap, both must go away.
4308 Getting two adjacent 1-page regions with two mmap calls is slightly
4309 tricky. All OS's tested skip over already-allocated blocks; therefore
4310 we have been careful to unmap all allocated regions in previous tests.
4311 HP/UX allocates pages backward in memory. No OS has yet been observed
4312 to be so perverse as to leave unmapped space between consecutive calls
4313 to mmap. */
4315 static void
4316 test_3 ()
4318 char *x, *y, *z;
4320 x = anonmap (pg);
4321 if (x == (char *)MAP_FAILED)
4322 perror_exit ("test 3 mmap 1", 14);
4323 y = anonmap (pg);
4324 if (y == (char *)MAP_FAILED)
4325 perror_exit ("test 3 mmap 2", 15);
4327 if (y != x + pg)
4329 if (y == x - pg)
4330 z = y, y = x, x = z;
4331 else
4333 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4334 (unsigned long)x, (unsigned long)y);
4335 exit (16);
4339 signal (SIGSEGV, sigsegv);
4340 if (setjmp (r))
4341 perror_exit ("test 3 fault", 17);
4343 x[0] = 1;
4344 y[0] = 1;
4346 if (munmap (x, pg*2) < 0)
4347 perror_exit ("test 3 munmap", 18);
4349 if (setjmp (r) == 0)
4351 x[0] = 1;
4352 perror_exit ("test 3 no fault 1", 19);
4355 signal (SIGSEGV, sigsegv);
4356 if (setjmp (r) == 0)
4358 y[0] = 1;
4359 perror_exit ("test 3 no fault 2", 20);
4364 main ()
4366 sigemptyset (&unblock_sigsegv);
4367 sigaddset (&unblock_sigsegv, SIGSEGV);
4368 pg = getpagesize ();
4369 #ifndef USE_MAP_ANON
4370 devzero = open ("/dev/zero", O_RDWR);
4371 if (devzero < 0)
4372 perror_exit ("open /dev/zero", 1);
4373 #endif
4375 test_0();
4376 test_1();
4377 test_2();
4378 test_3();
4380 exit(0);
4384 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4385 echo "configure:4431: checking for working mmap from /dev/zero" >&5
4386 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4387 echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389 if test "$cross_compiling" = yes; then
4390 # When cross-building, assume that this works, unless we know it
4391 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4392 # on the host, let alone whether mmap will work on it.
4393 case "$host_os" in
4394 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4395 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4396 * ) ac_cv_func_mmap_dev_zero=yes ;;
4397 esac
4398 else
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4446 "configure"
4401 #include "confdefs.h"
4402 #include "ct-mmap.inc"
4404 if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4405 then
4406 ac_cv_func_mmap_dev_zero=yes
4407 else
4408 echo "configure: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 rm -fr conftest*
4411 if test $? -lt 4
4412 then ac_cv_func_mmap_dev_zero=no
4413 else ac_cv_func_mmap_dev_zero=buggy
4416 rm -fr conftest*
4422 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4423 if test $ac_cv_func_mmap_dev_zero = yes; then
4424 cat >> confdefs.h <<\EOF
4425 #define HAVE_MMAP_DEV_ZERO 1
4430 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4431 echo "configure:4477: checking for working mmap with MAP_ANON(YMOUS)" >&5
4432 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4433 echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435 if test "$cross_compiling" = yes; then
4436 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4437 # just because it's there. Some SCO Un*xen define it but don't implement it.
4438 case "$host_os" in
4439 darwin* ) ac_cv_func_mmap_anon=yes ;;
4440 * ) ac_cv_func_mmap_anon=no ;;
4441 esac
4442 else
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4490 "configure"
4445 #include "confdefs.h"
4446 #define USE_MAP_ANON
4447 #include "ct-mmap.inc"
4449 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4450 then
4451 ac_cv_func_mmap_anon=yes
4452 else
4453 echo "configure: failed program was:" >&5
4454 cat conftest.$ac_ext >&5
4455 rm -fr conftest*
4456 if test $? -lt 4
4457 then ac_cv_func_mmap_anon=no
4458 else ac_cv_func_mmap_anon=buggy
4461 rm -fr conftest*
4467 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4468 if test $ac_cv_func_mmap_anon = yes; then
4469 cat >> confdefs.h <<\EOF
4470 #define HAVE_MMAP_ANON 1
4474 rm -f ct-mmap.inc
4476 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4477 echo "configure:4523: checking for working mmap of a file" >&5
4478 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4479 echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481 # Create a file one thousand bytes long.
4482 for i in 1 2 3 4 5 6 7 8 9 0
4483 do for j in 1 2 3 4 5 6 7 8 9 0
4484 do echo $i $j xxxxx
4485 done
4486 done > conftestdata$$
4488 if test "$cross_compiling" = yes; then
4489 case "$host_os" in
4490 darwin* ) ac_cv_func_mmap_file=yes ;;
4491 * ) ac_cv_func_mmap_file=no ;;
4492 esac
4493 else
4494 cat > conftest.$ac_ext <<EOF
4495 #line 4541 "configure"
4496 #include "confdefs.h"
4498 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4499 Richard Henderson and Alexandre Oliva.
4500 Check whether read-only mmap of a plain file works. */
4501 #include <sys/types.h>
4502 #include <sys/stat.h>
4503 #include <fcntl.h>
4504 #include <sys/mman.h>
4506 int main()
4508 char *x;
4509 int fd;
4510 struct stat st;
4512 fd = open("conftestdata$$", O_RDONLY);
4513 if (fd < 0)
4514 exit(1);
4516 if (fstat (fd, &st))
4517 exit(2);
4519 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4520 if (x == (char *) -1)
4521 exit(3);
4523 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4524 exit(4);
4526 if (munmap(x, st.st_size) < 0)
4527 exit(5);
4529 exit(0);
4532 if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4533 then
4534 ac_cv_func_mmap_file=yes
4535 else
4536 echo "configure: failed program was:" >&5
4537 cat conftest.$ac_ext >&5
4538 rm -fr conftest*
4539 ac_cv_func_mmap_file=no
4541 rm -fr conftest*
4546 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4547 if test $ac_cv_func_mmap_file = yes; then
4548 cat >> confdefs.h <<\EOF
4549 #define HAVE_MMAP_FILE 1
4557 am_cv_lib_iconv_ldpath=
4558 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4559 if test "${with_libiconv_prefix+set}" = set; then
4560 withval="$with_libiconv_prefix"
4562 for dir in `echo "$withval" | tr : ' '`; do
4563 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4564 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4565 done
4570 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4571 echo "configure:4617: checking for iconv" >&5
4572 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4576 am_cv_func_iconv="no, consider installing GNU libiconv"
4577 am_cv_lib_iconv=no
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4625 "configure"
4580 #include "confdefs.h"
4581 #include <stdlib.h>
4582 #include <iconv.h>
4583 int main() {
4584 iconv_t cd = iconv_open("","");
4585 iconv(cd,NULL,NULL,NULL,NULL);
4586 iconv_close(cd);
4587 ; return 0; }
4589 if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590 rm -rf conftest*
4591 am_cv_func_iconv=yes
4592 else
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
4596 rm -f conftest*
4597 if test "$am_cv_func_iconv" != yes; then
4598 am_save_LIBS="$LIBS"
4599 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4600 cat > conftest.$ac_ext <<EOF
4601 #line 4647 "configure"
4602 #include "confdefs.h"
4603 #include <stdlib.h>
4604 #include <iconv.h>
4605 int main() {
4606 iconv_t cd = iconv_open("","");
4607 iconv(cd,NULL,NULL,NULL,NULL);
4608 iconv_close(cd);
4609 ; return 0; }
4611 if { (eval echo configure:4657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4612 rm -rf conftest*
4613 am_cv_lib_iconv=yes
4614 am_cv_func_iconv=yes
4615 else
4616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4619 rm -f conftest*
4620 LIBS="$am_save_LIBS"
4625 echo "$ac_t""$am_cv_func_iconv" 1>&6
4626 if test "$am_cv_func_iconv" = yes; then
4627 cat >> confdefs.h <<\EOF
4628 #define HAVE_ICONV 1
4631 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4632 echo "configure:4678: checking for iconv declaration" >&5
4633 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4634 echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4637 cat > conftest.$ac_ext <<EOF
4638 #line 4684 "configure"
4639 #include "confdefs.h"
4641 #include <stdlib.h>
4642 #include <iconv.h>
4643 extern
4644 #ifdef __cplusplus
4646 #endif
4647 #if defined(__STDC__) || defined(__cplusplus)
4648 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4649 #else
4650 size_t iconv();
4651 #endif
4653 int main() {
4655 ; return 0; }
4657 if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4658 rm -rf conftest*
4659 am_cv_proto_iconv_arg1=""
4660 else
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 am_cv_proto_iconv_arg1="const"
4666 rm -f conftest*
4667 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
4670 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4671 echo "$ac_t""${ac_t:-
4672 }$am_cv_proto_iconv" 1>&6
4673 cat >> confdefs.h <<EOF
4674 #define ICONV_CONST $am_cv_proto_iconv_arg1
4678 LIBICONV=
4679 if test "$am_cv_lib_iconv" = yes; then
4680 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4685 # We will need to find libiberty.h and ansidecl.h
4686 saved_CFLAGS="$CFLAGS"
4687 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4688 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4689 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4690 fprintf_unlocked strstr errno vasprintf \
4691 malloc realloc calloc free basename getopt clock
4693 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4694 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4695 echo "configure:4741: checking whether $ac_func is declared" >&5
4696 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4697 echo $ac_n "(cached) $ac_c" 1>&6
4698 else
4699 cat > conftest.$ac_ext <<EOF
4700 #line 4746 "configure"
4701 #include "confdefs.h"
4702 #undef $ac_tr_decl
4703 #define $ac_tr_decl 1
4705 #include "ansidecl.h"
4706 #include "system.h"
4708 int main() {
4709 #ifndef $ac_func
4710 char *(*pfn) = (char *(*)) $ac_func ;
4711 #endif
4712 ; return 0; }
4714 if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4715 rm -rf conftest*
4716 eval "gcc_cv_have_decl_$ac_func=yes"
4717 else
4718 echo "configure: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4720 rm -rf conftest*
4721 eval "gcc_cv_have_decl_$ac_func=no"
4723 rm -f conftest*
4726 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4727 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4728 #define $ac_tr_decl 1
4731 else
4732 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4733 #define $ac_tr_decl 0
4738 done
4739 if test x = y ; then
4740 cat >> confdefs.h <<\EOF
4741 #define HAVE_DECL_GETENV 1
4743 cat >> confdefs.h <<\EOF
4744 #define HAVE_DECL_ATOL 1
4746 cat >> confdefs.h <<\EOF
4747 #define HAVE_DECL_SBRK 1
4749 cat >> confdefs.h <<\EOF
4750 #define HAVE_DECL_ABORT 1
4752 cat >> confdefs.h <<\EOF
4753 #define HAVE_DECL_ATOF 1
4755 cat >> confdefs.h <<\EOF
4756 #define HAVE_DECL_GETCWD 1
4758 cat >> confdefs.h <<\EOF
4759 #define HAVE_DECL_GETWD 1
4762 cat >> confdefs.h <<\EOF
4763 #define HAVE_DECL_STRSIGNAL 1
4765 cat >> confdefs.h <<\EOF
4766 #define HAVE_DECL_PUTC_UNLOCKED 1
4768 cat >> confdefs.h <<\EOF
4769 #define HAVE_DECL_FPUTS_UNLOCKED 1
4771 cat >> confdefs.h <<\EOF
4772 #define HAVE_DECL_FWRITE_UNLOCKED 1
4775 cat >> confdefs.h <<\EOF
4776 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4778 cat >> confdefs.h <<\EOF
4779 #define HAVE_DECL_STRSTR 1
4781 cat >> confdefs.h <<\EOF
4782 #define HAVE_DECL_ERRNO 1
4784 cat >> confdefs.h <<\EOF
4785 #define HAVE_DECL_VASPRINTF 1
4788 cat >> confdefs.h <<\EOF
4789 #define HAVE_DECL_MALLOC 1
4791 cat >> confdefs.h <<\EOF
4792 #define HAVE_DECL_REALLOC 1
4794 cat >> confdefs.h <<\EOF
4795 #define HAVE_DECL_CALLOC 1
4797 cat >> confdefs.h <<\EOF
4798 #define HAVE_DECL_FREE 1
4800 cat >> confdefs.h <<\EOF
4801 #define HAVE_DECL_BASENAME 1
4803 cat >> confdefs.h <<\EOF
4804 #define HAVE_DECL_GETOPT 1
4806 cat >> confdefs.h <<\EOF
4807 #define HAVE_DECL_CLOCK 1
4812 for ac_func in getrlimit setrlimit getrusage
4814 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4815 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4816 echo "configure:4862: checking whether $ac_func is declared" >&5
4817 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4818 echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820 cat > conftest.$ac_ext <<EOF
4821 #line 4867 "configure"
4822 #include "confdefs.h"
4823 #undef $ac_tr_decl
4824 #define $ac_tr_decl 1
4826 #include "ansidecl.h"
4827 #include "system.h"
4828 #ifdef HAVE_SYS_RESOURCE_H
4829 #include <sys/resource.h>
4830 #endif
4833 int main() {
4834 #ifndef $ac_func
4835 char *(*pfn) = (char *(*)) $ac_func ;
4836 #endif
4837 ; return 0; }
4839 if { (eval echo configure:4885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4840 rm -rf conftest*
4841 eval "gcc_cv_have_decl_$ac_func=yes"
4842 else
4843 echo "configure: failed program was:" >&5
4844 cat conftest.$ac_ext >&5
4845 rm -rf conftest*
4846 eval "gcc_cv_have_decl_$ac_func=no"
4848 rm -f conftest*
4851 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4852 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4853 #define $ac_tr_decl 1
4856 else
4857 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4858 #define $ac_tr_decl 0
4863 done
4864 if test x = y ; then
4865 cat >> confdefs.h <<\EOF
4866 #define HAVE_DECL_GETRLIMIT 1
4868 cat >> confdefs.h <<\EOF
4869 #define HAVE_DECL_SETRLIMIT 1
4871 cat >> confdefs.h <<\EOF
4872 #define HAVE_DECL_GETRUSAGE 1
4877 for ac_func in times
4879 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4880 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4881 echo "configure:4927: checking whether $ac_func is declared" >&5
4882 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4883 echo $ac_n "(cached) $ac_c" 1>&6
4884 else
4885 cat > conftest.$ac_ext <<EOF
4886 #line 4932 "configure"
4887 #include "confdefs.h"
4888 #undef $ac_tr_decl
4889 #define $ac_tr_decl 1
4891 #include "ansidecl.h"
4892 #include "system.h"
4893 #ifdef HAVE_SYS_TIMES_H
4894 #include <sys/times.h>
4895 #endif
4898 int main() {
4899 #ifndef $ac_func
4900 char *(*pfn) = (char *(*)) $ac_func ;
4901 #endif
4902 ; return 0; }
4904 if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4905 rm -rf conftest*
4906 eval "gcc_cv_have_decl_$ac_func=yes"
4907 else
4908 echo "configure: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910 rm -rf conftest*
4911 eval "gcc_cv_have_decl_$ac_func=no"
4913 rm -f conftest*
4916 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4917 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4918 #define $ac_tr_decl 1
4921 else
4922 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4923 #define $ac_tr_decl 0
4928 done
4929 if test x = y ; then
4930 cat >> confdefs.h <<\EOF
4931 #define HAVE_DECL_TIMES 1
4936 # More time-related stuff.
4937 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
4938 echo "configure:4984: checking for struct tms" >&5
4939 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4940 echo $ac_n "(cached) $ac_c" 1>&6
4941 else
4943 cat > conftest.$ac_ext <<EOF
4944 #line 4990 "configure"
4945 #include "confdefs.h"
4947 #include "ansidecl.h"
4948 #include "system.h"
4949 #ifdef HAVE_SYS_TIMES_H
4950 #include <sys/times.h>
4951 #endif
4953 int main() {
4954 struct tms tms;
4955 ; return 0; }
4957 if { (eval echo configure:5003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4958 rm -rf conftest*
4959 ac_cv_struct_tms=yes
4960 else
4961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
4963 rm -rf conftest*
4964 ac_cv_struct_tms=no
4966 rm -f conftest*
4969 echo "$ac_t""$ac_cv_struct_tms" 1>&6
4970 if test $ac_cv_struct_tms = yes; then
4971 cat >> confdefs.h <<\EOF
4972 #define HAVE_STRUCT_TMS 1
4977 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4978 # revisit after autoconf 2.50.
4979 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
4980 echo "configure:5026: checking for clock_t" >&5
4981 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4982 echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4985 cat > conftest.$ac_ext <<EOF
4986 #line 5032 "configure"
4987 #include "confdefs.h"
4989 #include "ansidecl.h"
4990 #include "system.h"
4992 int main() {
4993 clock_t x;
4994 ; return 0; }
4996 if { (eval echo configure:5042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4997 rm -rf conftest*
4998 gcc_cv_type_clock_t=yes
4999 else
5000 echo "configure: failed program was:" >&5
5001 cat conftest.$ac_ext >&5
5002 rm -rf conftest*
5003 gcc_cv_type_clock_t=no
5005 rm -f conftest*
5008 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5009 if test $gcc_cv_type_clock_t = yes; then
5010 cat >> confdefs.h <<\EOF
5011 #define HAVE_CLOCK_T 1
5016 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5017 if test "${enable_initfini_array+set}" = set; then
5018 enableval="$enable_initfini_array"
5019 gcc_cv_initfinit_array=$enableval
5020 else
5021 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5022 echo "configure:5068: checking for .preinit_array/.init_array/.fini_array support" >&5
5023 if eval "test \"`echo '$''{'gcc_cv_initfinit_array'+set}'`\" = set"; then
5024 echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026 cat > conftest.c <<EOF
5027 static int x = -1;
5028 int main (void) { return x; }
5029 int foo (void) { x = 0; }
5030 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5032 if { ac_try='${CC-cc} -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD'; { (eval echo configure:5078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
5033 then
5034 if ./conftest; then
5035 gcc_cv_initfinit_array=yes
5036 else
5037 gcc_cv_initfinit_array=no
5039 else
5040 gcc_cv_initfinit_array=no
5042 rm -f conftest*
5045 echo "$ac_t""$gcc_cv_initfinit_array" 1>&6
5047 if test $gcc_cv_initfinit_array = yes; then
5048 cat >> confdefs.h <<\EOF
5049 #define HAVE_INITFINI_ARRAY 1
5056 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5057 CFLAGS="$saved_CFLAGS"
5059 # mkdir takes a single argument on some systems.
5060 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5061 echo "configure:5107: checking if mkdir takes one argument" >&5
5062 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5063 echo $ac_n "(cached) $ac_c" 1>&6
5064 else
5065 cat > conftest.$ac_ext <<EOF
5066 #line 5112 "configure"
5067 #include "confdefs.h"
5069 #include <sys/types.h>
5070 #ifdef HAVE_SYS_STAT_H
5071 # include <sys/stat.h>
5072 #endif
5073 #ifdef HAVE_UNISTD_H
5074 # include <unistd.h>
5075 #endif
5076 #ifdef HAVE_DIRECT_H
5077 # include <direct.h>
5078 #endif
5079 int main() {
5080 mkdir ("foo", 0);
5081 ; return 0; }
5083 if { (eval echo configure:5129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5084 rm -rf conftest*
5085 gcc_cv_mkdir_takes_one_arg=no
5086 else
5087 echo "configure: failed program was:" >&5
5088 cat conftest.$ac_ext >&5
5089 rm -rf conftest*
5090 gcc_cv_mkdir_takes_one_arg=yes
5092 rm -f conftest*
5095 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5096 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5097 cat >> confdefs.h <<\EOF
5098 #define MKDIR_TAKES_ONE_ARG 1
5104 # File extensions
5105 manext='.1'
5106 objext='.o'
5110 target_gtfiles=
5111 build_xm_file=
5112 build_xm_defines=
5113 build_install_headers_dir=install-headers-tar
5114 build_exeext=
5115 host_xm_file=
5116 host_xm_defines=
5117 host_xmake_file=
5118 host_truncate_target=
5119 host_exeext=
5121 # Decode the host machine, then the target machine.
5122 # For the host machine, we save the xm_file variable as host_xm_file;
5123 # then we decode the target machine and forget everything else
5124 # that came from the host machine.
5125 for machine in $build $host $target; do
5126 . ${srcdir}/config.gcc
5127 done
5129 extra_objs="${host_extra_objs} ${extra_objs}"
5131 # Default the target-machine variables that were not explicitly set.
5132 if test x"$tm_file" = x
5133 then tm_file=$cpu_type/$cpu_type.h; fi
5135 if test x"$extra_headers" = x
5136 then extra_headers=; fi
5138 if test x$md_file = x
5139 then md_file=$cpu_type/$cpu_type.md; fi
5141 if test x$out_file = x
5142 then out_file=$cpu_type/$cpu_type.c; fi
5144 if test x"$tmake_file" = x
5145 then tmake_file=$cpu_type/t-$cpu_type
5148 if test x"$dwarf2" = xyes
5149 then tm_file="$tm_file tm-dwarf2.h"
5152 # Say what files are being used for the output code and MD file.
5153 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5154 echo "Using \`$srcdir/config/$md_file' as machine description file."
5156 # If any of the xm_file variables contain nonexistent files, warn
5157 # about them and drop them.
5160 for x in $build_xm_file; do
5161 if test -f $srcdir/config/$x
5162 then bx="$bx $x"
5163 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5165 done
5166 build_xm_file="$bx"
5169 for x in $host_xm_file; do
5170 if test -f $srcdir/config/$x
5171 then hx="$hx $x"
5172 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5174 done
5175 host_xm_file="$hx"
5178 for x in $xm_file; do
5179 if test -f $srcdir/config/$x
5180 then tx="$tx $x"
5181 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5183 done
5184 xm_file="$tx"
5186 count=a
5187 for f in $tm_file; do
5188 count=${count}x
5189 done
5190 if test $count = ax; then
5191 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5192 else
5193 echo "Using the following target machine macro files:"
5194 for f in $tm_file; do
5195 echo " $srcdir/config/$f"
5196 done
5199 count=a
5200 for f in $host_xm_file; do
5201 count=${count}x
5202 done
5203 if test $count = a; then
5205 elif test $count = ax; then
5206 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5207 else
5208 echo "Using the following host machine macro files:"
5209 for f in $host_xm_file; do
5210 echo " $srcdir/config/$f"
5211 done
5214 if test "$host_xm_file" != "$build_xm_file"; then
5215 count=a
5216 for f in $build_xm_file; do
5217 count=${count}x
5218 done
5219 if test $count = a; then
5221 elif test $count = ax; then
5222 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5223 else
5224 echo "Using the following build machine macro files:"
5225 for f in $build_xm_file; do
5226 echo " $srcdir/config/$f"
5227 done
5231 if test x$thread_file = x; then
5232 if test x$target_thread_file != x; then
5233 thread_file=$target_thread_file
5234 else
5235 thread_file='single'
5239 # Look for a file containing extra machine modes.
5240 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5241 extra_modes_file='$(srcdir)'/config/${extra_modes}
5243 cat >> confdefs.h <<EOF
5244 #define EXTRA_MODES_FILE "$extra_modes"
5247 cat >> confdefs.h <<\EOF
5248 #define EXTRA_CC_MODES 1
5253 # auto-host.h is the file containing items generated by autoconf and is
5254 # the first file included by config.h.
5255 # If host=build, it is correct to have hconfig include auto-host.h
5256 # as well. If host!=build, we are in error and need to do more
5257 # work to find out the build config parameters.
5258 if test x$host = x$build
5259 then
5260 build_auto=auto-host.h
5261 FORBUILD=..
5262 else
5263 # We create a subdir, then run autoconf in the subdir.
5264 # To prevent recursion we set host and build for the new
5265 # invocation of configure to the build for this invocation
5266 # of configure.
5267 tempdir=build.$$
5268 rm -rf $tempdir
5269 mkdir $tempdir
5270 cd $tempdir
5271 case ${srcdir} in
5272 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5273 *) realsrcdir=../${srcdir};;
5274 esac
5275 saved_CFLAGS="${CFLAGS}"
5276 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5277 ${realsrcdir}/configure \
5278 --target=$target_alias --host=$build_alias --build=$build_alias
5279 CFLAGS="${saved_CFLAGS}"
5281 # We just finished tests for the build machine, so rename
5282 # the file auto-build.h in the gcc directory.
5283 mv auto-host.h ../auto-build.h
5284 cd ..
5285 rm -rf $tempdir
5286 build_auto=auto-build.h
5287 FORBUILD=../$build_alias
5291 tm_file="${tm_file} defaults.h"
5292 host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5293 build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5294 xm_file="ansidecl.h ${xm_file} ${tm_file}"
5296 # Truncate the target if necessary
5297 if test x$host_truncate_target != x; then
5298 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5301 # Get the version trigger filename from the toplevel
5302 if test "${with_gcc_version_trigger+set}" = set; then
5303 gcc_version_trigger=$with_gcc_version_trigger
5304 else
5305 gcc_version_trigger=${srcdir}/version.c
5307 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5308 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5310 # Compile in configure arguments.
5311 if test -f configargs.h ; then
5312 # Being re-configured.
5313 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5314 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5315 else
5316 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5318 cat > configargs.h <<EOF
5319 /* Generated automatically. */
5320 static const char configuration_arguments[] = "$gcc_config_arguments";
5321 static const char thread_model[] = "$thread_file";
5324 # Internationalization
5325 PACKAGE=gcc
5326 VERSION="$gcc_version"
5330 # Enable NLS support by default
5331 # Check whether --enable-nls or --disable-nls was given.
5332 if test "${enable_nls+set}" = set; then
5333 enableval="$enable_nls"
5335 else
5336 enable_nls=yes
5340 # if cross compiling, disable NLS support.
5341 # It's not worth the trouble, at least for now.
5343 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5344 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5345 enable_nls=no
5350 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5351 echo "configure:5397: checking for library containing strerror" >&5
5352 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5353 echo $ac_n "(cached) $ac_c" 1>&6
5354 else
5355 ac_func_search_save_LIBS="$LIBS"
5356 ac_cv_search_strerror="no"
5357 cat > conftest.$ac_ext <<EOF
5358 #line 5404 "configure"
5359 #include "confdefs.h"
5360 /* Override any gcc2 internal prototype to avoid an error. */
5361 /* We use char because int might match the return type of a gcc2
5362 builtin and then its argument prototype would still apply. */
5363 char strerror();
5365 int main() {
5366 strerror()
5367 ; return 0; }
5369 if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5370 rm -rf conftest*
5371 ac_cv_search_strerror="none required"
5372 else
5373 echo "configure: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5376 rm -f conftest*
5377 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5378 LIBS="-l$i $ac_func_search_save_LIBS"
5379 cat > conftest.$ac_ext <<EOF
5380 #line 5426 "configure"
5381 #include "confdefs.h"
5382 /* Override any gcc2 internal prototype to avoid an error. */
5383 /* We use char because int might match the return type of a gcc2
5384 builtin and then its argument prototype would still apply. */
5385 char strerror();
5387 int main() {
5388 strerror()
5389 ; return 0; }
5391 if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392 rm -rf conftest*
5393 ac_cv_search_strerror="-l$i"
5394 break
5395 else
5396 echo "configure: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
5399 rm -f conftest*
5400 done
5401 LIBS="$ac_func_search_save_LIBS"
5404 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5405 if test "$ac_cv_search_strerror" != "no"; then
5406 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5408 else :
5413 echo $ac_n "checking for working const""... $ac_c" 1>&6
5414 echo "configure:5460: checking for working const" >&5
5415 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5416 echo $ac_n "(cached) $ac_c" 1>&6
5417 else
5418 cat > conftest.$ac_ext <<EOF
5419 #line 5465 "configure"
5420 #include "confdefs.h"
5422 int main() {
5424 /* Ultrix mips cc rejects this. */
5425 typedef int charset[2]; const charset x;
5426 /* SunOS 4.1.1 cc rejects this. */
5427 char const *const *ccp;
5428 char **p;
5429 /* NEC SVR4.0.2 mips cc rejects this. */
5430 struct point {int x, y;};
5431 static struct point const zero = {0,0};
5432 /* AIX XL C 1.02.0.0 rejects this.
5433 It does not let you subtract one const X* pointer from another in an arm
5434 of an if-expression whose if-part is not a constant expression */
5435 const char *g = "string";
5436 ccp = &g + (g ? g-g : 0);
5437 /* HPUX 7.0 cc rejects these. */
5438 ++ccp;
5439 p = (char**) ccp;
5440 ccp = (char const *const *) p;
5441 { /* SCO 3.2v4 cc rejects this. */
5442 char *t;
5443 char const *s = 0 ? (char *) 0 : (char const *) 0;
5445 *t++ = 0;
5447 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5448 int x[] = {25, 17};
5449 const int *foo = &x[0];
5450 ++foo;
5452 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5453 typedef const int *iptr;
5454 iptr p = 0;
5455 ++p;
5457 { /* AIX XL C 1.02.0.0 rejects this saying
5458 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5459 struct s { int j; const int *ap[3]; };
5460 struct s *b; b->j = 5;
5462 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5463 const int foo = 10;
5466 ; return 0; }
5468 if { (eval echo configure:5514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5469 rm -rf conftest*
5470 ac_cv_c_const=yes
5471 else
5472 echo "configure: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
5474 rm -rf conftest*
5475 ac_cv_c_const=no
5477 rm -f conftest*
5480 echo "$ac_t""$ac_cv_c_const" 1>&6
5481 if test $ac_cv_c_const = no; then
5482 cat >> confdefs.h <<\EOF
5483 #define const
5488 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5489 echo "configure:5535: checking for off_t" >&5
5490 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5491 echo $ac_n "(cached) $ac_c" 1>&6
5492 else
5493 cat > conftest.$ac_ext <<EOF
5494 #line 5540 "configure"
5495 #include "confdefs.h"
5496 #include <sys/types.h>
5497 #if STDC_HEADERS
5498 #include <stdlib.h>
5499 #include <stddef.h>
5500 #endif
5502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5503 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5504 rm -rf conftest*
5505 ac_cv_type_off_t=yes
5506 else
5507 rm -rf conftest*
5508 ac_cv_type_off_t=no
5510 rm -f conftest*
5513 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5514 if test $ac_cv_type_off_t = no; then
5515 cat >> confdefs.h <<\EOF
5516 #define off_t long
5521 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5522 echo "configure:5568: checking for size_t" >&5
5523 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5524 echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526 cat > conftest.$ac_ext <<EOF
5527 #line 5573 "configure"
5528 #include "confdefs.h"
5529 #include <sys/types.h>
5530 #if STDC_HEADERS
5531 #include <stdlib.h>
5532 #include <stddef.h>
5533 #endif
5535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5536 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5537 rm -rf conftest*
5538 ac_cv_type_size_t=yes
5539 else
5540 rm -rf conftest*
5541 ac_cv_type_size_t=no
5543 rm -f conftest*
5546 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5547 if test $ac_cv_type_size_t = no; then
5548 cat >> confdefs.h <<\EOF
5549 #define size_t unsigned
5554 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5555 # for constant arguments. Useless!
5556 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5557 echo "configure:5603: checking for working alloca.h" >&5
5558 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5559 echo $ac_n "(cached) $ac_c" 1>&6
5560 else
5561 cat > conftest.$ac_ext <<EOF
5562 #line 5608 "configure"
5563 #include "confdefs.h"
5564 #include <alloca.h>
5565 int main() {
5566 char *p = alloca(2 * sizeof(int));
5567 ; return 0; }
5569 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570 rm -rf conftest*
5571 ac_cv_header_alloca_h=yes
5572 else
5573 echo "configure: failed program was:" >&5
5574 cat conftest.$ac_ext >&5
5575 rm -rf conftest*
5576 ac_cv_header_alloca_h=no
5578 rm -f conftest*
5581 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5582 if test $ac_cv_header_alloca_h = yes; then
5583 cat >> confdefs.h <<\EOF
5584 #define HAVE_ALLOCA_H 1
5589 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5590 echo "configure:5636: checking for alloca" >&5
5591 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5592 echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594 cat > conftest.$ac_ext <<EOF
5595 #line 5641 "configure"
5596 #include "confdefs.h"
5598 #ifdef __GNUC__
5599 # define alloca __builtin_alloca
5600 #else
5601 # ifdef _MSC_VER
5602 # include <malloc.h>
5603 # define alloca _alloca
5604 # else
5605 # if HAVE_ALLOCA_H
5606 # include <alloca.h>
5607 # else
5608 # ifdef _AIX
5609 #pragma alloca
5610 # else
5611 # ifndef alloca /* predefined by HP cc +Olibcalls */
5612 char *alloca ();
5613 # endif
5614 # endif
5615 # endif
5616 # endif
5617 #endif
5619 int main() {
5620 char *p = (char *) alloca(1);
5621 ; return 0; }
5623 if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5624 rm -rf conftest*
5625 ac_cv_func_alloca_works=yes
5626 else
5627 echo "configure: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 rm -rf conftest*
5630 ac_cv_func_alloca_works=no
5632 rm -f conftest*
5635 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5636 if test $ac_cv_func_alloca_works = yes; then
5637 cat >> confdefs.h <<\EOF
5638 #define HAVE_ALLOCA 1
5643 if test $ac_cv_func_alloca_works = no; then
5644 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5645 # that cause trouble. Some versions do not even contain alloca or
5646 # contain a buggy version. If you still want to use their alloca,
5647 # use ar to extract alloca.o from them instead of compiling alloca.c.
5648 ALLOCA=alloca.${ac_objext}
5649 cat >> confdefs.h <<\EOF
5650 #define C_ALLOCA 1
5654 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5655 echo "configure:5701: checking whether alloca needs Cray hooks" >&5
5656 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5657 echo $ac_n "(cached) $ac_c" 1>&6
5658 else
5659 cat > conftest.$ac_ext <<EOF
5660 #line 5706 "configure"
5661 #include "confdefs.h"
5662 #if defined(CRAY) && ! defined(CRAY2)
5663 webecray
5664 #else
5665 wenotbecray
5666 #endif
5669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5670 egrep "webecray" >/dev/null 2>&1; then
5671 rm -rf conftest*
5672 ac_cv_os_cray=yes
5673 else
5674 rm -rf conftest*
5675 ac_cv_os_cray=no
5677 rm -f conftest*
5681 echo "$ac_t""$ac_cv_os_cray" 1>&6
5682 if test $ac_cv_os_cray = yes; then
5683 for ac_func in _getb67 GETB67 getb67; do
5684 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5685 echo "configure:5731: checking for $ac_func" >&5
5686 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5687 echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689 cat > conftest.$ac_ext <<EOF
5690 #line 5736 "configure"
5691 #include "confdefs.h"
5692 /* System header to define __stub macros and hopefully few prototypes,
5693 which can conflict with char $ac_func(); below. */
5694 #include <assert.h>
5695 /* Override any gcc2 internal prototype to avoid an error. */
5696 /* We use char because int might match the return type of a gcc2
5697 builtin and then its argument prototype would still apply. */
5698 char $ac_func();
5700 int main() {
5702 /* The GNU C library defines this for functions which it implements
5703 to always fail with ENOSYS. Some functions are actually named
5704 something starting with __ and the normal name is an alias. */
5705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5706 choke me
5707 #else
5708 $ac_func();
5709 #endif
5711 ; return 0; }
5713 if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5714 rm -rf conftest*
5715 eval "ac_cv_func_$ac_func=yes"
5716 else
5717 echo "configure: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 rm -rf conftest*
5720 eval "ac_cv_func_$ac_func=no"
5722 rm -f conftest*
5725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5726 echo "$ac_t""yes" 1>&6
5727 cat >> confdefs.h <<EOF
5728 #define CRAY_STACKSEG_END $ac_func
5731 break
5732 else
5733 echo "$ac_t""no" 1>&6
5736 done
5739 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5740 echo "configure:5786: checking stack direction for C alloca" >&5
5741 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5742 echo $ac_n "(cached) $ac_c" 1>&6
5743 else
5744 if test "$cross_compiling" = yes; then
5745 ac_cv_c_stack_direction=0
5746 else
5747 cat > conftest.$ac_ext <<EOF
5748 #line 5794 "configure"
5749 #include "confdefs.h"
5750 find_stack_direction ()
5752 static char *addr = 0;
5753 auto char dummy;
5754 if (addr == 0)
5756 addr = &dummy;
5757 return find_stack_direction ();
5759 else
5760 return (&dummy > addr) ? 1 : -1;
5762 main ()
5764 exit (find_stack_direction() < 0);
5767 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5768 then
5769 ac_cv_c_stack_direction=1
5770 else
5771 echo "configure: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 rm -fr conftest*
5774 ac_cv_c_stack_direction=-1
5776 rm -fr conftest*
5781 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5782 cat >> confdefs.h <<EOF
5783 #define STACK_DIRECTION $ac_cv_c_stack_direction
5789 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5790 echo "configure:5836: checking whether we are using the GNU C Library 2.1 or newer" >&5
5791 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5792 echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794 cat > conftest.$ac_ext <<EOF
5795 #line 5841 "configure"
5796 #include "confdefs.h"
5798 #include <features.h>
5799 #ifdef __GNU_LIBRARY__
5800 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5801 Lucky GNU user
5802 #endif
5803 #endif
5806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5807 egrep "Lucky GNU user" >/dev/null 2>&1; then
5808 rm -rf conftest*
5809 ac_cv_gnu_library_2_1=yes
5810 else
5811 rm -rf conftest*
5812 ac_cv_gnu_library_2_1=no
5814 rm -f conftest*
5820 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5822 GLIBC21="$ac_cv_gnu_library_2_1"
5826 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5827 stdlib.h string.h unistd.h sys/param.h
5829 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5830 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5831 echo "configure:5877: checking for $ac_hdr" >&5
5832 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5834 else
5835 cat > conftest.$ac_ext <<EOF
5836 #line 5882 "configure"
5837 #include "confdefs.h"
5838 #include <$ac_hdr>
5840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5841 { (eval echo configure:5887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5843 if test -z "$ac_err"; then
5844 rm -rf conftest*
5845 eval "ac_cv_header_$ac_safe=yes"
5846 else
5847 echo "$ac_err" >&5
5848 echo "configure: failed program was:" >&5
5849 cat conftest.$ac_ext >&5
5850 rm -rf conftest*
5851 eval "ac_cv_header_$ac_safe=no"
5853 rm -f conftest*
5855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5856 echo "$ac_t""yes" 1>&6
5857 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5858 cat >> confdefs.h <<EOF
5859 #define $ac_tr_hdr 1
5862 else
5863 echo "$ac_t""no" 1>&6
5865 done
5867 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5868 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5869 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5872 echo "configure:5918: checking for $ac_func" >&5
5873 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5874 echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876 cat > conftest.$ac_ext <<EOF
5877 #line 5923 "configure"
5878 #include "confdefs.h"
5879 /* System header to define __stub macros and hopefully few prototypes,
5880 which can conflict with char $ac_func(); below. */
5881 #include <assert.h>
5882 /* Override any gcc2 internal prototype to avoid an error. */
5883 /* We use char because int might match the return type of a gcc2
5884 builtin and then its argument prototype would still apply. */
5885 char $ac_func();
5887 int main() {
5889 /* The GNU C library defines this for functions which it implements
5890 to always fail with ENOSYS. Some functions are actually named
5891 something starting with __ and the normal name is an alias. */
5892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5893 choke me
5894 #else
5895 $ac_func();
5896 #endif
5898 ; return 0; }
5900 if { (eval echo configure:5946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901 rm -rf conftest*
5902 eval "ac_cv_func_$ac_func=yes"
5903 else
5904 echo "configure: failed program was:" >&5
5905 cat conftest.$ac_ext >&5
5906 rm -rf conftest*
5907 eval "ac_cv_func_$ac_func=no"
5909 rm -f conftest*
5912 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5913 echo "$ac_t""yes" 1>&6
5914 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5915 cat >> confdefs.h <<EOF
5916 #define $ac_tr_func 1
5919 else
5920 echo "$ac_t""no" 1>&6
5922 done
5927 am_cv_lib_iconv_ldpath=
5928 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5929 if test "${with_libiconv_prefix+set}" = set; then
5930 withval="$with_libiconv_prefix"
5932 for dir in `echo "$withval" | tr : ' '`; do
5933 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5934 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5935 done
5940 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5941 echo "configure:5987: checking for iconv" >&5
5942 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5943 echo $ac_n "(cached) $ac_c" 1>&6
5944 else
5946 am_cv_func_iconv="no, consider installing GNU libiconv"
5947 am_cv_lib_iconv=no
5948 cat > conftest.$ac_ext <<EOF
5949 #line 5995 "configure"
5950 #include "confdefs.h"
5951 #include <stdlib.h>
5952 #include <iconv.h>
5953 int main() {
5954 iconv_t cd = iconv_open("","");
5955 iconv(cd,NULL,NULL,NULL,NULL);
5956 iconv_close(cd);
5957 ; return 0; }
5959 if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5960 rm -rf conftest*
5961 am_cv_func_iconv=yes
5962 else
5963 echo "configure: failed program was:" >&5
5964 cat conftest.$ac_ext >&5
5966 rm -f conftest*
5967 if test "$am_cv_func_iconv" != yes; then
5968 am_save_LIBS="$LIBS"
5969 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5970 cat > conftest.$ac_ext <<EOF
5971 #line 6017 "configure"
5972 #include "confdefs.h"
5973 #include <stdlib.h>
5974 #include <iconv.h>
5975 int main() {
5976 iconv_t cd = iconv_open("","");
5977 iconv(cd,NULL,NULL,NULL,NULL);
5978 iconv_close(cd);
5979 ; return 0; }
5981 if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5982 rm -rf conftest*
5983 am_cv_lib_iconv=yes
5984 am_cv_func_iconv=yes
5985 else
5986 echo "configure: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5989 rm -f conftest*
5990 LIBS="$am_save_LIBS"
5995 echo "$ac_t""$am_cv_func_iconv" 1>&6
5996 if test "$am_cv_func_iconv" = yes; then
5997 cat >> confdefs.h <<\EOF
5998 #define HAVE_ICONV 1
6001 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6002 echo "configure:6048: checking for iconv declaration" >&5
6003 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6007 cat > conftest.$ac_ext <<EOF
6008 #line 6054 "configure"
6009 #include "confdefs.h"
6011 #include <stdlib.h>
6012 #include <iconv.h>
6013 extern
6014 #ifdef __cplusplus
6016 #endif
6017 #if defined(__STDC__) || defined(__cplusplus)
6018 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6019 #else
6020 size_t iconv();
6021 #endif
6023 int main() {
6025 ; return 0; }
6027 if { (eval echo configure:6073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6028 rm -rf conftest*
6029 am_cv_proto_iconv_arg1=""
6030 else
6031 echo "configure: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
6033 rm -rf conftest*
6034 am_cv_proto_iconv_arg1="const"
6036 rm -f conftest*
6037 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
6040 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6041 echo "$ac_t""${ac_t:-
6042 }$am_cv_proto_iconv" 1>&6
6043 cat >> confdefs.h <<EOF
6044 #define ICONV_CONST $am_cv_proto_iconv_arg1
6048 LIBICONV=
6049 if test "$am_cv_lib_iconv" = yes; then
6050 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6055 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6056 echo "configure:6102: checking for nl_langinfo and CODESET" >&5
6057 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6058 echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060 cat > conftest.$ac_ext <<EOF
6061 #line 6107 "configure"
6062 #include "confdefs.h"
6063 #include <langinfo.h>
6064 int main() {
6065 char* cs = nl_langinfo(CODESET);
6066 ; return 0; }
6068 if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069 rm -rf conftest*
6070 am_cv_langinfo_codeset=yes
6071 else
6072 echo "configure: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 rm -rf conftest*
6075 am_cv_langinfo_codeset=no
6077 rm -f conftest*
6081 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6082 if test $am_cv_langinfo_codeset = yes; then
6083 cat >> confdefs.h <<\EOF
6084 #define HAVE_LANGINFO_CODESET 1
6089 if test $ac_cv_header_locale_h = yes; then
6090 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6091 echo "configure:6137: checking for LC_MESSAGES" >&5
6092 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6093 echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6142 "configure"
6097 #include "confdefs.h"
6098 #include <locale.h>
6099 int main() {
6100 return LC_MESSAGES
6101 ; return 0; }
6103 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104 rm -rf conftest*
6105 am_cv_val_LC_MESSAGES=yes
6106 else
6107 echo "configure: failed program was:" >&5
6108 cat conftest.$ac_ext >&5
6109 rm -rf conftest*
6110 am_cv_val_LC_MESSAGES=no
6112 rm -f conftest*
6115 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6116 if test $am_cv_val_LC_MESSAGES = yes; then
6117 cat >> confdefs.h <<\EOF
6118 #define HAVE_LC_MESSAGES 1
6123 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6124 echo "configure:6170: checking whether NLS is requested" >&5
6125 # Check whether --enable-nls or --disable-nls was given.
6126 if test "${enable_nls+set}" = set; then
6127 enableval="$enable_nls"
6128 USE_NLS=$enableval
6129 else
6130 USE_NLS=yes
6133 echo "$ac_t""$USE_NLS" 1>&6
6136 BUILD_INCLUDED_LIBINTL=no
6137 USE_INCLUDED_LIBINTL=no
6138 INTLLIBS=
6139 INTLDEPS=
6141 if test "$USE_NLS" = "yes"; then
6142 cat >> confdefs.h <<\EOF
6143 #define ENABLE_NLS 1
6146 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6147 echo "configure:6193: checking whether included gettext is requested" >&5
6148 # Check whether --with-included-gettext or --without-included-gettext was given.
6149 if test "${with_included_gettext+set}" = set; then
6150 withval="$with_included_gettext"
6151 nls_cv_force_use_gnu_gettext=$withval
6152 else
6153 nls_cv_force_use_gnu_gettext=no
6156 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6158 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6159 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6160 CATOBJEXT=NONE
6165 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6166 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6167 echo "configure:6213: checking for libintl.h" >&5
6168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6169 echo $ac_n "(cached) $ac_c" 1>&6
6170 else
6171 cat > conftest.$ac_ext <<EOF
6172 #line 6218 "configure"
6173 #include "confdefs.h"
6174 #include <libintl.h>
6176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6177 { (eval echo configure:6223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6179 if test -z "$ac_err"; then
6180 rm -rf conftest*
6181 eval "ac_cv_header_$ac_safe=yes"
6182 else
6183 echo "$ac_err" >&5
6184 echo "configure: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6186 rm -rf conftest*
6187 eval "ac_cv_header_$ac_safe=no"
6189 rm -f conftest*
6191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6192 echo "$ac_t""yes" 1>&6
6193 cat >> confdefs.h <<\EOF
6194 #define HAVE_LIBINTL_H 1
6197 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6198 echo "configure:6244: checking for GNU gettext in libc" >&5
6199 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6200 echo $ac_n "(cached) $ac_c" 1>&6
6201 else
6202 cat > conftest.$ac_ext <<EOF
6203 #line 6249 "configure"
6204 #include "confdefs.h"
6205 #include <libintl.h>
6206 extern int _nl_msg_cat_cntr;
6207 int main() {
6208 bindtextdomain ("", "");
6209 return (int) gettext ("") + _nl_msg_cat_cntr
6210 ; return 0; }
6212 if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6213 rm -rf conftest*
6214 gt_cv_func_gnugettext1_libc=yes
6215 else
6216 echo "configure: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6218 rm -rf conftest*
6219 gt_cv_func_gnugettext1_libc=no
6221 rm -f conftest*
6224 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6226 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6227 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6228 echo "configure:6274: checking for GNU gettext in libintl" >&5
6229 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6230 echo $ac_n "(cached) $ac_c" 1>&6
6231 else
6232 gt_save_LIBS="$LIBS"
6233 LIBS="$LIBS -lintl $LIBICONV"
6234 cat > conftest.$ac_ext <<EOF
6235 #line 6281 "configure"
6236 #include "confdefs.h"
6237 #include <libintl.h>
6238 extern int _nl_msg_cat_cntr;
6239 int main() {
6240 bindtextdomain ("", "");
6241 return (int) gettext ("") + _nl_msg_cat_cntr
6242 ; return 0; }
6244 if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245 rm -rf conftest*
6246 gt_cv_func_gnugettext1_libintl=yes
6247 else
6248 echo "configure: failed program was:" >&5
6249 cat conftest.$ac_ext >&5
6250 rm -rf conftest*
6251 gt_cv_func_gnugettext1_libintl=no
6253 rm -f conftest*
6254 LIBS="$gt_save_LIBS"
6257 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6260 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6261 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6262 && test "$PACKAGE" != gettext; }; then
6263 cat >> confdefs.h <<\EOF
6264 #define HAVE_GETTEXT 1
6268 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6269 INTLLIBS="-lintl $LIBICONV"
6272 gt_save_LIBS="$LIBS"
6273 LIBS="$LIBS $INTLLIBS"
6274 for ac_func in dcgettext
6276 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6277 echo "configure:6323: checking for $ac_func" >&5
6278 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6279 echo $ac_n "(cached) $ac_c" 1>&6
6280 else
6281 cat > conftest.$ac_ext <<EOF
6282 #line 6328 "configure"
6283 #include "confdefs.h"
6284 /* System header to define __stub macros and hopefully few prototypes,
6285 which can conflict with char $ac_func(); below. */
6286 #include <assert.h>
6287 /* Override any gcc2 internal prototype to avoid an error. */
6288 /* We use char because int might match the return type of a gcc2
6289 builtin and then its argument prototype would still apply. */
6290 char $ac_func();
6292 int main() {
6294 /* The GNU C library defines this for functions which it implements
6295 to always fail with ENOSYS. Some functions are actually named
6296 something starting with __ and the normal name is an alias. */
6297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6298 choke me
6299 #else
6300 $ac_func();
6301 #endif
6303 ; return 0; }
6305 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6306 rm -rf conftest*
6307 eval "ac_cv_func_$ac_func=yes"
6308 else
6309 echo "configure: failed program was:" >&5
6310 cat conftest.$ac_ext >&5
6311 rm -rf conftest*
6312 eval "ac_cv_func_$ac_func=no"
6314 rm -f conftest*
6317 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6318 echo "$ac_t""yes" 1>&6
6319 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6320 cat >> confdefs.h <<EOF
6321 #define $ac_tr_func 1
6324 else
6325 echo "$ac_t""no" 1>&6
6327 done
6329 LIBS="$gt_save_LIBS"
6331 # Extract the first word of "msgfmt", so it can be a program name with args.
6332 set dummy msgfmt; ac_word=$2
6333 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6334 echo "configure:6380: checking for $ac_word" >&5
6335 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6336 echo $ac_n "(cached) $ac_c" 1>&6
6337 else
6338 case "$MSGFMT" in
6340 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6344 for ac_dir in $PATH; do
6345 test -z "$ac_dir" && ac_dir=.
6346 if test -f $ac_dir/$ac_word; then
6347 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6348 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6349 break
6352 done
6353 IFS="$ac_save_ifs"
6354 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6356 esac
6358 MSGFMT="$ac_cv_path_MSGFMT"
6359 if test "$MSGFMT" != ":"; then
6360 echo "$ac_t""$MSGFMT" 1>&6
6361 else
6362 echo "$ac_t""no" 1>&6
6365 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6366 set dummy gmsgfmt; ac_word=$2
6367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6368 echo "configure:6414: checking for $ac_word" >&5
6369 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6370 echo $ac_n "(cached) $ac_c" 1>&6
6371 else
6372 case "$GMSGFMT" in
6374 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6376 ?:/*)
6377 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6380 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6381 ac_dummy="$PATH"
6382 for ac_dir in $ac_dummy; do
6383 test -z "$ac_dir" && ac_dir=.
6384 if test -f $ac_dir/$ac_word; then
6385 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6386 break
6388 done
6389 IFS="$ac_save_ifs"
6390 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6392 esac
6394 GMSGFMT="$ac_cv_path_GMSGFMT"
6395 if test -n "$GMSGFMT"; then
6396 echo "$ac_t""$GMSGFMT" 1>&6
6397 else
6398 echo "$ac_t""no" 1>&6
6402 # Extract the first word of "xgettext", so it can be a program name with args.
6403 set dummy xgettext; ac_word=$2
6404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6405 echo "configure:6451: checking for $ac_word" >&5
6406 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6407 echo $ac_n "(cached) $ac_c" 1>&6
6408 else
6409 case "$XGETTEXT" in
6411 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6415 for ac_dir in $PATH; do
6416 test -z "$ac_dir" && ac_dir=.
6417 if test -f $ac_dir/$ac_word; then
6418 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6419 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6420 break
6423 done
6424 IFS="$ac_save_ifs"
6425 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6427 esac
6429 XGETTEXT="$ac_cv_path_XGETTEXT"
6430 if test "$XGETTEXT" != ":"; then
6431 echo "$ac_t""$XGETTEXT" 1>&6
6432 else
6433 echo "$ac_t""no" 1>&6
6437 CATOBJEXT=.gmo
6440 else
6441 echo "$ac_t""no" 1>&6
6445 if test "$CATOBJEXT" = "NONE"; then
6446 nls_cv_use_gnu_gettext=yes
6450 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6451 INTLOBJS="\$(GETTOBJS)"
6452 # Extract the first word of "msgfmt", so it can be a program name with args.
6453 set dummy msgfmt; ac_word=$2
6454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6455 echo "configure:6501: checking for $ac_word" >&5
6456 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6457 echo $ac_n "(cached) $ac_c" 1>&6
6458 else
6459 case "$MSGFMT" in
6461 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6465 for ac_dir in $PATH; do
6466 test -z "$ac_dir" && ac_dir=.
6467 if test -f $ac_dir/$ac_word; then
6468 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6469 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6470 break
6473 done
6474 IFS="$ac_save_ifs"
6475 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6477 esac
6479 MSGFMT="$ac_cv_path_MSGFMT"
6480 if test "$MSGFMT" != ":"; then
6481 echo "$ac_t""$MSGFMT" 1>&6
6482 else
6483 echo "$ac_t""no" 1>&6
6486 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6487 set dummy gmsgfmt; ac_word=$2
6488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6489 echo "configure:6535: checking for $ac_word" >&5
6490 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6491 echo $ac_n "(cached) $ac_c" 1>&6
6492 else
6493 case "$GMSGFMT" in
6495 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6497 ?:/*)
6498 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6501 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6502 ac_dummy="$PATH"
6503 for ac_dir in $ac_dummy; do
6504 test -z "$ac_dir" && ac_dir=.
6505 if test -f $ac_dir/$ac_word; then
6506 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6507 break
6509 done
6510 IFS="$ac_save_ifs"
6511 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6513 esac
6515 GMSGFMT="$ac_cv_path_GMSGFMT"
6516 if test -n "$GMSGFMT"; then
6517 echo "$ac_t""$GMSGFMT" 1>&6
6518 else
6519 echo "$ac_t""no" 1>&6
6522 # Extract the first word of "xgettext", so it can be a program name with args.
6523 set dummy xgettext; ac_word=$2
6524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6525 echo "configure:6571: checking for $ac_word" >&5
6526 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6527 echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529 case "$XGETTEXT" in
6531 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6535 for ac_dir in $PATH; do
6536 test -z "$ac_dir" && ac_dir=.
6537 if test -f $ac_dir/$ac_word; then
6538 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6539 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6540 break
6543 done
6544 IFS="$ac_save_ifs"
6545 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6547 esac
6549 XGETTEXT="$ac_cv_path_XGETTEXT"
6550 if test "$XGETTEXT" != ":"; then
6551 echo "$ac_t""$XGETTEXT" 1>&6
6552 else
6553 echo "$ac_t""no" 1>&6
6557 BUILD_INCLUDED_LIBINTL=yes
6558 USE_INCLUDED_LIBINTL=yes
6559 CATOBJEXT=.gmo
6560 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6561 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6562 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6565 if test "$GMSGFMT" != ":"; then
6566 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6568 else
6569 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6570 GMSGFMT=":"
6574 if test "$XGETTEXT" != ":"; then
6575 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6577 else
6578 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6579 XGETTEXT=":"
6583 POSUB=po
6588 if test "$PACKAGE" = gettext; then
6589 BUILD_INCLUDED_LIBINTL=yes
6592 for ac_prog in bison
6594 # Extract the first word of "$ac_prog", so it can be a program name with args.
6595 set dummy $ac_prog; ac_word=$2
6596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6597 echo "configure:6643: checking for $ac_word" >&5
6598 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6599 echo $ac_n "(cached) $ac_c" 1>&6
6600 else
6601 if test -n "$INTLBISON"; then
6602 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6603 else
6604 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6605 ac_dummy="$PATH"
6606 for ac_dir in $ac_dummy; do
6607 test -z "$ac_dir" && ac_dir=.
6608 if test -f $ac_dir/$ac_word; then
6609 ac_cv_prog_INTLBISON="$ac_prog"
6610 break
6612 done
6613 IFS="$ac_save_ifs"
6616 INTLBISON="$ac_cv_prog_INTLBISON"
6617 if test -n "$INTLBISON"; then
6618 echo "$ac_t""$INTLBISON" 1>&6
6619 else
6620 echo "$ac_t""no" 1>&6
6623 test -n "$INTLBISON" && break
6624 done
6626 if test -z "$INTLBISON"; then
6627 ac_verc_fail=yes
6628 else
6629 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6630 echo "configure:6676: checking version of bison" >&5
6631 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6632 case $ac_prog_version in
6633 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6634 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6635 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6636 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6637 esac
6638 echo "$ac_t""$ac_prog_version" 1>&6
6640 if test $ac_verc_fail = yes; then
6641 INTLBISON=:
6653 if test $USE_INCLUDED_LIBINTL = yes; then
6654 cat >> confdefs.h <<\EOF
6655 #define USE_INCLUDED_LIBINTL 1
6660 nls_cv_header_intl=
6661 nls_cv_header_libgt=
6663 DATADIRNAME=share
6666 INSTOBJEXT=.mo
6669 GENCAT=gencat
6673 if test "x$CATOBJEXT" != x; then
6674 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6675 echo "configure:6721: checking for catalogs to be installed" >&5
6676 # Look for .po and .gmo files in the source directory.
6677 CATALOGS=
6678 XLINGUAS=
6679 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6680 # If there aren't any .gmo files the shell will give us the
6681 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6682 # weeded out.
6683 case "$cat" in *\**)
6684 continue;;
6685 esac
6686 # The quadruple backslash is collapsed to a double backslash
6687 # by the backticks, then collapsed again by the double quotes,
6688 # leaving us with one backslash in the sed expression (right
6689 # before the dot that mustn't act as a wildcard). The dot to
6690 # be escaped in the second expression is hiding inside CATOBJEXT.
6691 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6692 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6693 # The user is allowed to set LINGUAS to a list of languages to
6694 # install catalogs for. If it's empty that means "all of them."
6695 if test "x$LINGUAS" = x; then
6696 CATALOGS="$CATALOGS $cat"
6697 XLINGUAS="$XLINGUAS $lang"
6698 else
6699 case "$LINGUAS" in *$lang*)
6700 CATALOGS="$CATALOGS $cat"
6701 XLINGUAS="$XLINGUAS $lang"
6703 esac
6705 done
6706 LINGUAS="$XLINGUAS"
6707 echo "$ac_t""$LINGUAS" 1>&6
6710 MKINSTALLDIRS=
6711 if test -n "$ac_aux_dir"; then
6712 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6714 if test -z "$MKINSTALLDIRS"; then
6715 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6719 INTL_LIBTOOL_SUFFIX_PREFIX=
6723 # Windows32 Registry support for specifying GCC installation paths.
6724 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6725 if test "${enable_win32_registry+set}" = set; then
6726 enableval="$enable_win32_registry"
6730 case $host_os in
6731 win32 | pe | cygwin* | mingw32* | uwin*)
6732 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6733 echo "configure:6779: checking whether windows registry support is requested" >&5
6734 if test "x$enable_win32_registry" != xno; then
6735 cat >> confdefs.h <<\EOF
6736 #define ENABLE_WIN32_REGISTRY 1
6739 echo "$ac_t""yes" 1>&6
6741 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6742 echo "configure:6788: checking for library containing RegOpenKeyExA" >&5
6743 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6744 echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746 ac_func_search_save_LIBS="$LIBS"
6747 ac_cv_search_RegOpenKeyExA="no"
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6795 "configure"
6750 #include "confdefs.h"
6751 /* Override any gcc2 internal prototype to avoid an error. */
6752 /* We use char because int might match the return type of a gcc2
6753 builtin and then its argument prototype would still apply. */
6754 char RegOpenKeyExA();
6756 int main() {
6757 RegOpenKeyExA()
6758 ; return 0; }
6760 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6761 rm -rf conftest*
6762 ac_cv_search_RegOpenKeyExA="none required"
6763 else
6764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6767 rm -f conftest*
6768 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6769 LIBS="-l$i $ac_func_search_save_LIBS"
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6817 "configure"
6772 #include "confdefs.h"
6773 /* Override any gcc2 internal prototype to avoid an error. */
6774 /* We use char because int might match the return type of a gcc2
6775 builtin and then its argument prototype would still apply. */
6776 char RegOpenKeyExA();
6778 int main() {
6779 RegOpenKeyExA()
6780 ; return 0; }
6782 if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6783 rm -rf conftest*
6784 ac_cv_search_RegOpenKeyExA="-l$i"
6785 break
6786 else
6787 echo "configure: failed program was:" >&5
6788 cat conftest.$ac_ext >&5
6790 rm -f conftest*
6791 done
6792 LIBS="$ac_func_search_save_LIBS"
6795 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6796 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6797 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6799 else :
6802 else
6803 echo "$ac_t""no" 1>&6
6806 # Check if user specified a different registry key.
6807 case "x${enable_win32_registry}" in
6808 x | xyes)
6809 # default.
6810 gcc_cv_win32_registry_key="$VERSION"
6812 xno)
6813 # no registry lookup.
6814 gcc_cv_win32_registry_key=''
6817 # user-specified key.
6818 gcc_cv_win32_registry_key="$enable_win32_registry"
6820 esac
6822 if test "x$enable_win32_registry" != xno; then
6823 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6824 echo "configure:6870: checking registry key on windows hosts" >&5
6825 cat >> confdefs.h <<EOF
6826 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6829 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6832 esac
6834 # Get an absolute path to the GCC top-level source directory
6835 holddir=`${PWDCMD-pwd}`
6836 cd $srcdir
6837 topdir=`${PWDCMD-pwd}`
6838 cd $holddir
6840 # Conditionalize the makefile for this host machine.
6841 # Make-host contains the concatenation of all host makefile fragments
6842 # [there can be more than one]. This file is built by configure.frag.
6843 host_overrides=Make-host
6844 dep_host_xmake_file=
6845 for f in .. ${host_xmake_file}
6847 if test -f ${srcdir}/config/$f
6848 then
6849 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6851 done
6853 # Conditionalize the makefile for this target machine.
6854 # Make-target contains the concatenation of all host makefile fragments
6855 # [there can be more than one]. This file is built by configure.frag.
6856 target_overrides=Make-target
6857 dep_tmake_file=
6858 for f in .. ${tmake_file}
6860 if test -f ${srcdir}/config/$f
6861 then
6862 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6864 done
6866 # If the host doesn't support symlinks, modify CC in
6867 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6868 # Otherwise, we can use "CC=$(CC)".
6869 rm -f symtest.tem
6870 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6871 then
6872 cc_set_by_configure="\$(CC)"
6873 quoted_cc_set_by_configure="\$(CC)"
6874 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6875 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6876 else
6877 rm -f symtest.tem
6878 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6879 then
6880 symbolic_link="cp -p"
6881 else
6882 symbolic_link="cp"
6884 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
6885 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
6886 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6887 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
6889 rm -f symtest.tem
6891 out_object_file=`basename $out_file .c`.o
6893 tm_file_list=
6894 for f in $tm_file; do
6895 case $f in
6896 ansidecl.h )
6897 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6898 defaults.h )
6899 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
6900 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6901 esac
6902 done
6904 tm_p_file_list=
6905 for f in $tm_p_file; do
6906 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6907 done
6909 host_xm_file_list=
6910 for f in $host_xm_file; do
6911 case $f in
6912 ansidecl.h )
6913 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6914 auto-host.h )
6915 host_xm_file_list="${host_xm_file_list} $f" ;;
6916 defaults.h )
6917 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6918 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6919 esac
6920 done
6922 build_xm_file_list=
6923 for f in $build_xm_file; do
6924 case $f in
6925 ansidecl.h )
6926 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6927 auto-build.h | auto-host.h )
6928 build_xm_file_list="${build_xm_file_list} $f" ;;
6929 defaults.h )
6930 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
6931 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6932 esac
6933 done
6935 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
6936 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
6937 CROSS=
6938 ALL=all.internal
6939 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
6940 if test x$host != x$target
6941 then
6942 CROSS="-DCROSS_COMPILE"
6943 ALL=all.cross
6944 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
6945 case "$host","$target" in
6946 i?86-*-*,x86_64-*-* \
6947 | powerpc*-*-*,powerpc64*-*-*)
6948 CROSS="$CROSS -DNATIVE_CROSS" ;;
6949 esac
6952 # If this is a cross-compiler that does not
6953 # have its own set of headers then define
6954 # inhibit_libc
6956 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6957 # This prevents libgcc2 from containing any code which requires libc
6958 # support.
6959 inhibit_libc=
6960 if test x$host != x$target && test x$with_headers = x; then
6961 inhibit_libc=-Dinhibit_libc
6962 else
6963 if test x$with_newlib = xyes; then
6964 inhibit_libc=-Dinhibit_libc
6969 # When building gcc with a cross-compiler, we need to adjust things so
6970 # that the generator programs are still built with the native compiler.
6971 # Also, we cannot run fixincludes or fix-header.
6972 # Note that the terminology here is wrong; it should be BUILD_* throughout.
6973 # FIXME.
6975 # These are the normal (build=host) settings:
6976 BUILD_PREFIX=
6977 BUILD_PREFIX_1=ignore-
6978 HOST_CC='$(CC)'
6979 HOST_CFLAGS='$(ALL_CFLAGS)'
6981 STMP_FIXINC=stmp-fixinc
6982 STMP_FIXPROTO=stmp-fixproto
6984 # And these apply if build != host.
6985 if test x$build != x$host
6986 then
6987 BUILD_PREFIX=build-
6988 BUILD_PREFIX_1=build-
6989 HOST_CC='$(CC_FOR_BUILD)'
6990 HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
6992 STMP_FIXINC=
6993 STMP_FIXPROTO=
6996 # Expand extra_headers to include complete path.
6997 # This substitutes for lots of t-* files.
6998 extra_headers_list=
6999 if test "x$extra_headers" = x
7000 then true
7001 else
7002 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7003 for file in $extra_headers;
7005 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7006 done
7009 if test x$use_collect2 = xno; then
7010 use_collect2=
7013 # Add a definition of USE_COLLECT2 if system wants one.
7014 if test x$use_collect2 != x
7015 then
7016 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7017 xm_defines="${xm_defines} USE_COLLECT2"
7020 # If we have gas in the build tree, make a link to it.
7021 if test -f ../gas/Makefile; then
7022 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7025 # If we have nm and objdump in the build tree, make a link to them.
7026 if test -f ../binutils/Makefile; then
7027 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7028 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
7031 # If we have ld in the build tree, make a link to it.
7032 if test -f ../ld/Makefile; then
7033 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7036 # Figure out what assembler we will be using.
7037 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7038 echo "configure:7084: checking what assembler to use" >&5
7039 gcc_cv_as=
7040 gcc_cv_gas_major_version=
7041 gcc_cv_gas_minor_version=
7042 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7043 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7044 if test -x "$DEFAULT_ASSEMBLER"; then
7045 gcc_cv_as="$DEFAULT_ASSEMBLER"
7046 elif test -x "$AS"; then
7047 gcc_cv_as="$AS"
7048 elif test -x as$host_exeext; then
7049 # Build using assembler in the current directory.
7050 gcc_cv_as=./as$host_exeext
7051 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
7052 # Single tree build which includes gas.
7053 for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
7055 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7056 if test x$gcc_cv_gas_version != x; then
7057 break
7059 done
7060 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7061 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7062 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7065 if test "x$gcc_cv_as" = x; then
7066 # Search the same directories that the installed compiler will
7067 # search. Else we may find the wrong assembler and lose. If we
7068 # do not find a suitable assembler binary, then try the user's
7069 # path.
7071 # Also note we have to check MD_EXEC_PREFIX before checking the
7072 # user's path. Unfortunately, there is no good way to get at the
7073 # value of MD_EXEC_PREFIX here. So we do a brute force search
7074 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7075 # to be fixed as part of the make/configure rewrite too.
7077 if test "x$exec_prefix" = xNONE; then
7078 if test "x$prefix" = xNONE; then
7079 test_prefix=/usr/local
7080 else
7081 test_prefix=$prefix
7083 else
7084 test_prefix=$exec_prefix
7087 # If the loop below does not find an assembler, then use whatever
7088 # one we can find in the users's path.
7089 # user's path.
7090 if test "x$program_prefix" != xNONE; then
7091 gcc_cv_as=${program_prefix}as$host_exeext
7092 else
7093 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7096 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7097 $test_prefix/lib/gcc-lib/$target_alias \
7098 /usr/lib/gcc/$target_alias/$gcc_version \
7099 /usr/lib/gcc/$target_alias \
7100 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7101 $test_prefix/$target_alias/bin"
7103 if test x$host = x$target; then
7104 test_dirs="$test_dirs \
7105 /usr/libexec \
7106 /usr/ccs/gcc \
7107 /usr/ccs/bin \
7108 /udk/usr/ccs/bin \
7109 /bsd43/usr/lib/cmplrs/cc \
7110 /usr/cross64/usr/bin \
7111 /usr/lib/cmplrs/cc \
7112 /sysv/usr/lib/cmplrs/cc \
7113 /svr4/usr/lib/cmplrs/cc \
7114 /usr/bin"
7117 for dir in $test_dirs; do
7118 if test -x $dir/as$host_exeext; then
7119 gcc_cv_as=$dir/as$host_exeext
7120 break;
7122 done
7124 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7125 echo "$ac_t"""newly built gas"" 1>&6
7126 else
7127 echo "$ac_t""$gcc_cv_as" 1>&6
7130 # Figure out what linker we will be using.
7131 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7132 echo "configure:7178: checking what linker to use" >&5
7133 gcc_cv_ld=
7134 gcc_cv_gld_major_version=
7135 gcc_cv_gld_minor_version=
7136 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7137 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7138 if test -x "$DEFAULT_LINKER"; then
7139 gcc_cv_ld="$DEFAULT_LINKER"
7140 elif test -x "$LD"; then
7141 gcc_cv_ld="$LD"
7142 elif test -x ld$host_exeext; then
7143 # Build using linker in the current directory.
7144 gcc_cv_ld=./ld$host_exeext
7145 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
7146 # Single tree build which includes ld.
7147 for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
7149 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7150 if test x$gcc_cv_gld_version != x; then
7151 break
7153 done
7154 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7155 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7158 if test "x$gcc_cv_ld" = x; then
7159 # Search the same directories that the installed compiler will
7160 # search. Else we may find the wrong linker and lose. If we
7161 # do not find a suitable linker binary, then try the user's
7162 # path.
7164 # Also note we have to check MD_EXEC_PREFIX before checking the
7165 # user's path. Unfortunately, there is no good way to get at the
7166 # value of MD_EXEC_PREFIX here. So we do a brute force search
7167 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7168 # to be fixed as part of the make/configure rewrite too.
7170 if test "x$exec_prefix" = xNONE; then
7171 if test "x$prefix" = xNONE; then
7172 test_prefix=/usr/local
7173 else
7174 test_prefix=$prefix
7176 else
7177 test_prefix=$exec_prefix
7180 # If the loop below does not find an linker, then use whatever
7181 # one we can find in the users's path.
7182 # user's path.
7183 if test "x$program_prefix" != xNONE; then
7184 gcc_cv_ld=${program_prefix}ld$host_exeext
7185 else
7186 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7189 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7190 $test_prefix/lib/gcc-lib/$target_alias \
7191 /usr/lib/gcc/$target_alias/$gcc_version \
7192 /usr/lib/gcc/$target_alias \
7193 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7194 $test_prefix/$target_alias/bin"
7196 if test x$host = x$target; then
7197 test_dirs="$test_dirs \
7198 /usr/libexec \
7199 /usr/ccs/gcc \
7200 /usr/ccs/bin \
7201 /udk/usr/ccs/bin \
7202 /bsd43/usr/lib/cmplrs/cc \
7203 /usr/cross64/usr/bin \
7204 /usr/lib/cmplrs/cc \
7205 /sysv/usr/lib/cmplrs/cc \
7206 /svr4/usr/lib/cmplrs/cc \
7207 /usr/bin"
7210 for dir in $test_dirs; do
7211 if test -x $dir/ld$host_exeext; then
7212 gcc_cv_ld=$dir/ld$host_exeext
7213 break;
7215 done
7217 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7218 echo "$ac_t"""newly built ld"" 1>&6
7219 else
7220 echo "$ac_t""$gcc_cv_ld" 1>&6
7223 # Figure out what nm we will be using.
7224 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7225 echo "configure:7271: checking what nm to use" >&5
7226 if test -x nm$host_exeext; then
7227 gcc_cv_nm=./nm$host_exeext
7228 elif test "x$program_prefix" != xNONE; then
7229 gcc_cv_nm=${program_prefix}nm$host_exeext
7230 else
7231 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7233 echo "$ac_t""$gcc_cv_nm" 1>&6
7235 # Figure out what objdump we will be using.
7236 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7237 echo "configure:7283: checking what objdump to use" >&5
7238 if test -x objdump$host_exeext; then
7239 gcc_cv_objdump=./objdump$host_exeext
7240 elif test "x$program_prefix" != xNONE; then
7241 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7242 else
7243 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7245 echo "$ac_t""$gcc_cv_objdump" 1>&6
7247 # Figure out what assembler alignment features are present.
7248 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7249 echo "configure:7295: checking assembler alignment features" >&5
7250 gcc_cv_as_alignment_features=none
7251 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7252 # Gas version 2.6 and later support for .balign and .p2align.
7253 # bytes to skip when using .p2align.
7254 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
7255 gcc_cv_as_alignment_features=".balign and .p2align"
7256 cat >> confdefs.h <<\EOF
7257 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7261 # Gas version 2.8 and later support specifying the maximum
7262 # bytes to skip when using .p2align.
7263 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
7264 gcc_cv_as_alignment_features=".p2align including maximum skip"
7265 cat >> confdefs.h <<\EOF
7266 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7270 elif test x$gcc_cv_as != x; then
7271 # Check if we have .balign and .p2align
7272 echo ".balign 4" > conftest.s
7273 echo ".p2align 2" >> conftest.s
7274 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7275 gcc_cv_as_alignment_features=".balign and .p2align"
7276 cat >> confdefs.h <<\EOF
7277 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7281 rm -f conftest.s conftest.o
7282 # Check if specifying the maximum bytes to skip when
7283 # using .p2align is supported.
7284 echo ".p2align 4,,7" > conftest.s
7285 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7286 gcc_cv_as_alignment_features=".p2align including maximum skip"
7287 cat >> confdefs.h <<\EOF
7288 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7292 rm -f conftest.s conftest.o
7294 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7296 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7297 echo "configure:7343: checking assembler subsection support" >&5
7298 gcc_cv_as_subsections=no
7299 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7300 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
7301 gcc_cv_as_subsections="working .subsection -1"
7303 elif test x$gcc_cv_as != x; then
7304 # Check if we have .subsection
7305 echo ".subsection 1" > conftest.s
7306 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7307 gcc_cv_as_subsections=".subsection"
7308 if test x$gcc_cv_nm != x; then
7309 cat > conftest.s <<EOF
7310 conftest_label1: .word 0
7311 .subsection -1
7312 conftest_label2: .word 0
7313 .previous
7315 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7316 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7317 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7318 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7320 else
7321 gcc_cv_as_subsections="working .subsection -1"
7326 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7328 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7329 cat >> confdefs.h <<\EOF
7330 #define HAVE_GAS_SUBSECTION_ORDERING 1
7334 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7336 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7337 echo "configure:7383: checking assembler weak support" >&5
7338 gcc_cv_as_weak=no
7339 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7340 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
7341 gcc_cv_as_weak="yes"
7343 elif test x$gcc_cv_as != x; then
7344 # Check if we have .weak
7345 echo " .weak foobar" > conftest.s
7346 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7347 gcc_cv_as_weak="yes"
7349 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7351 if test x"$gcc_cv_as_weak" = xyes; then
7352 cat >> confdefs.h <<\EOF
7353 #define HAVE_GAS_WEAK 1
7357 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7359 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7360 echo "configure:7406: checking assembler hidden support" >&5
7361 gcc_cv_as_hidden=no
7362 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7363 if test "$gcc_cv_gas_major_version" -eq 2 \
7364 -a "$gcc_cv_gas_minor_version" -eq 12 \
7365 -a "$gcc_cv_gas_patch_version" -ge 1 \
7366 -o "$gcc_cv_gas_major_version" -eq 2 \
7367 -a "$gcc_cv_gas_minor_version" -gt 12 \
7368 -o "$gcc_cv_gas_major_version" -gt 2 \
7369 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7370 gcc_cv_as_hidden="yes"
7372 elif test x$gcc_cv_as != x; then
7373 # Check if we have .hidden
7374 echo " .hidden foobar" > conftest.s
7375 echo "foobar:" >> conftest.s
7376 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7377 gcc_cv_as_hidden="yes"
7379 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7381 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7382 # This is irritatingly difficult to feature test for. Look for
7383 # the date string after the version number.
7384 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7385 if echo "$ld_ver" | grep GNU > /dev/null; then
7386 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7387 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
7388 if test 0"$ld_date" -lt 20020404; then
7389 if test -n "$ld_date"; then
7390 # If there was date string, but was earlier than 2002-04-04, fail
7391 gcc_cv_as_hidden="no"
7392 elif test -z "$ld_vers"; then
7393 # If there was no date string nor ld version number, something is wrong
7394 gcc_cv_as_hidden="no"
7395 else
7396 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7397 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7398 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7399 test -z "$ld_vers_patch" && ld_vers_patch=0
7400 if test "$ld_vers_major" -lt 2; then
7401 gcc_cv_as_hidden="no"
7402 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7403 gcc_cv_as_hidden="no"
7404 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7405 -a "$ld_vers_patch" -eq 0; then
7406 gcc_cv_as_hidden="no"
7412 if test x"$gcc_cv_as_hidden" = xyes; then
7413 cat >> confdefs.h <<\EOF
7414 #define HAVE_GAS_HIDDEN 1
7418 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7419 libgcc_visibility=$gcc_cv_as_hidden
7420 case "$target" in
7421 mips-sgi-irix6*o32)
7422 if test x"$gnu_ld_flag" = x"no"; then
7423 # Even if using gas with .hidden support, the resulting object files
7424 # cannot be linked with the IRIX 6 O32 linker.
7425 libgcc_visibility=no
7428 esac
7431 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7432 echo "configure:7478: checking assembler leb128 support" >&5
7433 gcc_cv_as_leb128=no
7434 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7435 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
7436 gcc_cv_as_leb128="yes"
7438 elif test x$gcc_cv_as != x; then
7439 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7440 cat > conftest.s <<EOF
7441 .data
7442 .uleb128 L2 - L1
7444 .uleb128 1280
7445 .sleb128 -1010
7448 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7449 gcc_cv_as_leb128="yes"
7451 # GAS versions before 2.11 do not support uleb128,
7452 # despite appearing to.
7453 # ??? There exists an elf-specific test that will crash
7454 # the assembler. Perhaps it's better to figure out whether
7455 # arbitrary sections are supported and try the test.
7456 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7457 if echo "$as_ver" | grep GNU > /dev/null; then
7458 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7459 as_major=`echo $as_ver | sed 's/\..*//'`
7460 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7461 if test $as_major -eq 2 -a $as_minor -lt 11; then
7462 gcc_cv_as_leb128="no"
7466 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7468 if test x"$gcc_cv_as_leb128" = xyes; then
7469 cat >> confdefs.h <<\EOF
7470 #define HAVE_AS_LEB128 1
7474 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7476 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7477 echo "configure:7523: checking assembler eh_frame optimization" >&5
7478 gcc_cv_as_eh_frame=no
7479 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7480 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
7481 gcc_cv_as_eh_frame="yes"
7483 elif test x$gcc_cv_as != x; then
7484 # Check if this is GAS.
7485 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7486 rm -f a.out 2> /dev/null
7487 if echo "$as_ver" | grep GNU > /dev/null; then
7488 # Versions up to and including 2.11.0 may mis-optimize
7489 # .eh_frame data. Try something.
7490 cat > conftest.s <<EOF
7491 .text
7492 .LFB1:
7493 .4byte 0
7494 .L1:
7495 .4byte 0
7496 .LFE1:
7497 .section .eh_frame,"aw",@progbits
7498 __FRAME_BEGIN__:
7499 .4byte .LECIE1-.LSCIE1
7500 .LSCIE1:
7501 .4byte 0x0
7502 .byte 0x1
7503 .ascii "z\0"
7504 .byte 0x1
7505 .byte 0x78
7506 .byte 0x1a
7507 .byte 0x0
7508 .byte 0x4
7509 .4byte 1
7510 .p2align 1
7511 .LECIE1:
7512 .LSFDE1:
7513 .4byte .LEFDE1-.LASFDE1
7514 .LASFDE1:
7515 .4byte .LASFDE1-__FRAME_BEGIN__
7516 .4byte .LFB1
7517 .4byte .LFE1-.LFB1
7518 .byte 0x4
7519 .4byte .LFE1-.LFB1
7520 .byte 0x4
7521 .4byte .L1-.LFB1
7522 .LEFDE1:
7524 cat > conftest.lit <<EOF
7525 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7526 0010 01000000 12000000 18000000 00000000 ................
7527 0020 08000000 04080000 0044 .........D
7529 cat > conftest.big <<EOF
7530 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7531 0010 00000001 00000012 00000018 00000000 ................
7532 0020 00000008 04000000 0844 .........D
7534 # If the assembler didn't choke, and we can objdump,
7535 # and we got the correct data, then succeed.
7536 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7537 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7538 | tail -3 > conftest.got \
7539 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7540 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7541 then
7542 gcc_cv_as_eh_frame="yes"
7543 else
7544 gcc_cv_as_eh_frame="bad"
7545 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7546 cat >> confdefs.h <<\EOF
7547 #define USE_AS_TRADITIONAL_FORMAT 1
7553 rm -f conftest.*
7555 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7557 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7558 echo "configure:7604: checking assembler section merging support" >&5
7559 gcc_cv_as_shf_merge=no
7560 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7561 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
7562 gcc_cv_as_shf_merge=yes
7564 elif test x$gcc_cv_as != x; then
7565 # Check if we support SHF_MERGE sections
7566 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7567 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7568 gcc_cv_as_shf_merge=yes
7570 rm -f conftest.s conftest.o
7572 if test x"$gcc_cv_as_shf_merge" = xyes; then
7573 cat >> confdefs.h <<\EOF
7574 #define HAVE_GAS_SHF_MERGE 1
7578 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7580 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7581 echo "configure:7627: checking assembler thread-local storage support" >&5
7582 gcc_cv_as_tls=no
7583 conftest_s=
7584 tls_first_major=
7585 tls_first_minor=
7586 case "$target" in
7587 alpha*-*-*)
7588 conftest_s='
7589 .section ".tdata","awT",@progbits
7590 foo: .long 25
7591 .text
7592 ldq $27,__tls_get_addr($29) !literal!1
7593 lda $16,foo($29) !tlsgd!1
7594 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7595 ldq $27,__tls_get_addr($29) !literal!2
7596 lda $16,foo($29) !tlsldm!2
7597 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7598 ldq $1,foo($29) !gotdtprel
7599 ldah $2,foo($29) !dtprelhi
7600 lda $3,foo($2) !dtprello
7601 lda $4,foo($29) !dtprel
7602 ldq $1,foo($29) !gottprel
7603 ldah $2,foo($29) !tprelhi
7604 lda $3,foo($2) !tprello
7605 lda $4,foo($29) !tprel'
7606 tls_first_major=2
7607 tls_first_minor=13
7609 i[34567]86-*-*)
7610 conftest_s='
7611 .section ".tdata","awT",@progbits
7612 foo: .long 25
7613 .text
7614 movl %gs:0, %eax
7615 leal foo@TLSGD(,%ebx,1), %eax
7616 leal foo@TLSLDM(%ebx), %eax
7617 leal foo@DTPOFF(%eax), %edx
7618 movl foo@GOTTPOFF(%ebx), %eax
7619 subl foo@GOTTPOFF(%ebx), %eax
7620 addl foo@GOTNTPOFF(%ebx), %eax
7621 movl foo@INDNTPOFF, %eax
7622 movl $foo@TPOFF, %eax
7623 subl $foo@TPOFF, %eax
7624 leal foo@NTPOFF(%ecx), %eax'
7625 tls_first_major=2
7626 tls_first_minor=14
7628 x86_64-*-*)
7629 conftest_s='
7630 .section ".tdata","awT",@progbits
7631 foo: .long 25
7632 .text
7633 movq %fs:0, %rax
7634 leaq foo@TLSGD(%rip), %rdi
7635 leaq foo@TLSLD(%rip), %rdi
7636 leaq foo@DTPOFF(%rax), %rdx
7637 movq foo@GOTTPOFF(%rip), %rax
7638 movq $foo@TPOFF, %rax'
7639 tls_first_major=2
7640 tls_first_minor=14
7642 ia64-*-*)
7643 conftest_s='
7644 .section ".tdata","awT",@progbits
7645 foo: data8 25
7646 .text
7647 addl r16 = @ltoff(@dtpmod(foo#)), gp
7648 addl r17 = @ltoff(@dtprel(foo#)), gp
7649 addl r18 = @ltoff(@tprel(foo#)), gp
7650 addl r19 = @dtprel(foo#), gp
7651 adds r21 = @dtprel(foo#), r13
7652 movl r23 = @dtprel(foo#)
7653 addl r20 = @tprel(foo#), gp
7654 adds r22 = @tprel(foo#), r13
7655 movl r24 = @tprel(foo#)'
7656 tls_first_major=2
7657 tls_first_minor=13
7659 esac
7660 if test -z "$tls_first_major"; then
7662 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7663 then
7664 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7665 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7666 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7667 gcc_cv_as_tls=yes
7669 elif test x$gcc_cv_as != x; then
7670 echo "$conftest_s" > conftest.s
7671 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7672 then
7673 gcc_cv_as_tls=yes
7675 rm -f conftest.s conftest.o
7677 if test "$gcc_cv_as_tls" = yes; then
7678 cat >> confdefs.h <<\EOF
7679 #define HAVE_AS_TLS 1
7683 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7685 case "$target" in
7686 # All TARGET_ABI_OSF targets.
7687 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7688 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7689 echo "configure:7735: checking assembler supports explicit relocations" >&5
7690 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7691 echo $ac_n "(cached) $ac_c" 1>&6
7692 else
7694 gcc_cv_as_explicit_relocs=unknown
7695 if test x$gcc_cv_gas_major_version != x \
7696 -a x$gcc_cv_gas_minor_version != x
7697 then
7698 if test "$gcc_cv_gas_major_version" -eq 2 \
7699 -a "$gcc_cv_gas_minor_version" -ge 12 \
7700 -o "$gcc_cv_gas_major_version" -gt 2; then
7701 gcc_cv_as_explicit_relocs=yes
7703 elif test x$gcc_cv_as != x; then
7704 cat > conftest.s << 'EOF'
7705 .set nomacro
7706 .text
7707 extbl $3, $2, $3 !lituse_bytoff!1
7708 ldq $2, a($29) !literal!1
7709 ldq $4, b($29) !literal!2
7710 ldq_u $3, 0($2) !lituse_base!1
7711 ldq $27, f($29) !literal!5
7712 jsr $26, ($27), f !lituse_jsr!5
7713 ldah $29, 0($26) !gpdisp!3
7714 lda $0, c($29) !gprel
7715 ldah $1, d($29) !gprelhigh
7716 lda $1, d($1) !gprellow
7717 lda $29, 0($29) !gpdisp!3
7719 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7720 gcc_cv_as_explicit_relocs=yes
7721 else
7722 gcc_cv_as_explicit_relocs=no
7724 rm -f conftest.s conftest.o
7729 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7730 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7731 cat >> confdefs.h <<\EOF
7732 #define HAVE_AS_EXPLICIT_RELOCS 1
7737 sparc*-*-*)
7738 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7739 echo "configure:7785: checking assembler .register pseudo-op support" >&5
7740 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7741 echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7744 gcc_cv_as_register_pseudo_op=unknown
7745 if test x$gcc_cv_as != x; then
7746 # Check if we have .register
7747 echo ".register %g2, #scratch" > conftest.s
7748 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7749 gcc_cv_as_register_pseudo_op=yes
7750 else
7751 gcc_cv_as_register_pseudo_op=no
7753 rm -f conftest.s conftest.o
7758 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7759 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7760 cat >> confdefs.h <<\EOF
7761 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7766 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7767 echo "configure:7813: checking assembler supports -relax" >&5
7768 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7769 echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7772 gcc_cv_as_relax_opt=unknown
7773 if test x$gcc_cv_as != x; then
7774 # Check if gas supports -relax
7775 echo ".text" > conftest.s
7776 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7777 gcc_cv_as_relax_opt=yes
7778 else
7779 gcc_cv_as_relax_opt=no
7781 rm -f conftest.s conftest.o
7786 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7787 if test "x$gcc_cv_as_relax_opt" = xyes; then
7788 cat >> confdefs.h <<\EOF
7789 #define HAVE_AS_RELAX_OPTION 1
7794 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7795 echo "configure:7841: checking assembler and linker support unaligned pc related relocs" >&5
7796 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7797 echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7800 gcc_cv_as_sparc_ua_pcrel=unknown
7801 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7802 gcc_cv_as_sparc_ua_pcrel=no
7803 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7804 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7805 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7806 gcc_cv_as_sparc_ua_pcrel=yes
7808 rm -f conftest.s conftest.o conftest
7813 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7814 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7815 cat >> confdefs.h <<\EOF
7816 #define HAVE_AS_SPARC_UA_PCREL 1
7821 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7822 echo "configure:7868: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7823 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7824 echo $ac_n "(cached) $ac_c" 1>&6
7825 else
7827 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7828 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7829 if test x$gcc_cv_objdump != x; then
7830 gcc_cv_as_sparc_ua_pcrel_hidden=no
7831 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
7832 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
7833 echo "foo: .skip 4" >> conftest.s
7834 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7835 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
7836 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
7837 | grep ' 31000000 07323334' > /dev/null 2>&1; then
7838 if $gcc_cv_objdump -R conftest 2> /dev/null \
7839 | grep 'DISP32' > /dev/null 2>&1; then
7841 else
7842 gcc_cv_as_sparc_ua_pcrel_hidden=yes
7846 rm -f conftest.s conftest.o conftest
7847 else
7848 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
7853 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
7854 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
7855 cat >> confdefs.h <<\EOF
7856 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
7861 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
7862 echo "configure:7908: checking for assembler offsetable %lo() support" >&5
7863 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7864 echo $ac_n "(cached) $ac_c" 1>&6
7865 else
7867 gcc_cv_as_offsetable_lo10=unknown
7868 if test "x$gcc_cv_as" != x; then
7869 # Check if assembler has offsetable %lo()
7870 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7871 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7872 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
7873 > /dev/null 2>&1 &&
7874 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
7875 > /dev/null 2>&1; then
7876 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7877 gcc_cv_as_offsetable_lo10=no
7878 else
7879 gcc_cv_as_offsetable_lo10=yes
7881 else
7882 gcc_cv_as_offsetable_lo10=no
7884 rm -f conftest.s conftest.o conftest1.s conftest1.o
7889 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7890 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7891 cat >> confdefs.h <<\EOF
7892 #define HAVE_AS_OFFSETABLE_LO10 1
7899 i[34567]86-*-* | x86_64-*-*)
7900 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
7901 echo "configure:7947: checking assembler instructions" >&5
7902 gcc_cv_as_instructions=
7903 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7904 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
7905 gcc_cv_as_instructions="filds fists"
7907 elif test x$gcc_cv_as != x; then
7908 set "filds fists" "filds mem; fists mem"
7909 while test $# -gt 0
7911 echo "$2" > conftest.s
7912 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7913 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
7915 shift 2
7916 done
7917 rm -f conftest.s conftest.o
7919 if test x"$gcc_cv_as_instructions" != x; then
7920 cat >> confdefs.h <<EOF
7921 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
7925 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
7927 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
7928 echo "configure:7974: checking assembler GOTOFF in data directives" >&5
7929 gcc_cv_as_gotoff_in_data=no
7930 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7931 then
7932 if test "$gcc_cv_gas_major_version" -eq 2 \
7933 -a "$gcc_cv_gas_minor_version" -ge 11 \
7934 -o "$gcc_cv_gas_major_version" -gt 2; then
7935 gcc_cv_as_gotoff_in_data=yes
7937 elif test x$gcc_cv_as != x; then
7938 cat > conftest.s <<EOF
7939 .text
7940 .L0:
7942 .data
7943 .long .L0@GOTOFF
7945 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7946 gcc_cv_as_gotoff_in_data=yes
7949 cat >> confdefs.h <<EOF
7950 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7953 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
7955 esac
7957 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
7958 echo "configure:8004: checking assembler dwarf2 debug_line support" >&5
7959 gcc_cv_as_dwarf2_debug_line=no
7960 # ??? Not all targets support dwarf2 debug_line, even within a version
7961 # of gas. Moreover, we need to emit a valid instruction to trigger any
7962 # info to the output file. So, as supported targets are added to gas 2.11,
7963 # add some instruction here to (also) show we expect this might work.
7964 # ??? Once 2.11 is released, probably need to add first known working
7965 # version to the per-target configury.
7966 case "$target" in
7967 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
7968 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
7969 insn="nop"
7971 ia64*-*-*)
7972 insn="nop 0"
7974 esac
7975 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7976 then
7977 if test "$gcc_cv_gas_major_version" -eq 2 \
7978 -a "$gcc_cv_gas_minor_version" -ge 11 \
7979 -o "$gcc_cv_gas_major_version" -gt 2 \
7980 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7981 && test x"$insn" != x ; then
7982 gcc_cv_as_dwarf2_debug_line="yes"
7984 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7985 echo ' .file 1 "conftest.s"' > conftest.s
7986 echo ' .loc 1 3 0' >> conftest.s
7987 echo " $insn" >> conftest.s
7988 # ??? This fails with non-gnu grep.
7989 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7990 && grep debug_line conftest.o > /dev/null 2>&1 ; then
7991 # The .debug_line file table must be in the exact order that
7992 # we specified the files, since these indices are also used
7993 # by DW_AT_decl_file. Approximate this test by testing if
7994 # the assembler bitches if the same index is assigned twice.
7995 echo ' .file 1 "foo.s"' > conftest.s
7996 echo ' .file 1 "bar.s"' >> conftest.s
7997 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7998 then
7999 gcc_cv_as_dwarf2_debug_line="no"
8000 else
8001 gcc_cv_as_dwarf2_debug_line="yes"
8004 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8006 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8007 cat >> confdefs.h <<\EOF
8008 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8012 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8014 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8015 echo "configure:8061: checking assembler --gdwarf2 support" >&5
8016 gcc_cv_as_gdwarf2_flag=no
8017 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8018 then
8019 if test "$gcc_cv_gas_major_version" -eq 2 \
8020 -a "$gcc_cv_gas_minor_version" -ge 11 \
8021 -o "$gcc_cv_gas_major_version" -gt 2 \
8022 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8023 && test x"$insn" != x ; then
8024 gcc_cv_as_gdwarf2_flag="yes"
8026 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8027 echo '' > conftest.s
8028 # ??? This fails with non-gnu grep.
8029 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8030 then
8031 gcc_cv_as_gdwarf2_flag="yes"
8033 rm -f conftest.s conftest.o
8035 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8036 cat >> confdefs.h <<\EOF
8037 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8041 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8043 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8044 echo "configure:8090: checking assembler --gstabs support" >&5
8045 gcc_cv_as_gstabs_flag=no
8046 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8047 then
8048 if test "$gcc_cv_gas_major_version" -eq 2 \
8049 -a "$gcc_cv_gas_minor_version" -ge 11 \
8050 -o "$gcc_cv_gas_major_version" -gt 2 \
8051 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8052 && test x"$insn" != x ; then
8053 gcc_cv_as_gstabs_flag="yes"
8055 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8056 echo '' > conftest.s
8057 # ??? This fails with non-gnu grep.
8058 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8059 gcc_cv_as_gstabs_flag="yes"
8061 rm -f conftest.s conftest.o
8063 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8064 cat >> confdefs.h <<\EOF
8065 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8069 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8071 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8072 echo "configure:8118: checking linker read-only and read-write section mixing" >&5
8073 gcc_cv_ld_ro_rw_mix=unknown
8074 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8075 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8076 gcc_cv_ld_ro_rw_mix=read-write
8078 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8079 echo '.section "myfoosect", "a"' > conftest1.s
8080 echo '.section "myfoosect", "aw"' > conftest2.s
8081 echo '.byte 1' >> conftest2.s
8082 echo '.section "myfoosect", "a"' > conftest3.s
8083 echo '.byte 0' >> conftest3.s
8084 if $gcc_cv_as -o conftest1.o conftest1.s \
8085 && $gcc_cv_as -o conftest2.o conftest2.s \
8086 && $gcc_cv_as -o conftest3.o conftest3.s \
8087 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8088 conftest2.o conftest3.o; then
8089 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8090 | grep -A1 myfoosect`
8091 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8092 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8093 gcc_cv_ld_ro_rw_mix=read-only
8094 else
8095 gcc_cv_ld_ro_rw_mix=read-write
8099 rm -f conftest.* conftest[123].*
8101 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8102 cat >> confdefs.h <<\EOF
8103 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8107 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8109 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8110 echo "configure:8118: checking linker PT_GNU_EH_FRAME support" >&5
8111 gcc_cv_ld_eh_frame_hdr=no
8112 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8113 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
8114 gcc_cv_ld_eh_frame_hdr=yes
8116 elif test x$gcc_cv_ld != x; then
8117 # Check if linker supports --eh-frame-hdr option
8118 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8119 gcc_cv_ld_eh_frame_hdr=yes
8122 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8123 cat >> confdefs.h <<\EOF
8124 #define HAVE_LD_EH_FRAME_HDR 1
8128 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8130 # Miscellaneous target-specific checks.
8131 case "$target" in
8132 mips*-*-*)
8133 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8134 echo "configure:8142: checking whether libgloss uses STARTUP directives consistently" >&5
8135 gcc_cv_mips_libgloss_startup=no
8136 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8137 if test "x$exec_prefix" = xNONE; then
8138 if test "x$prefix" = xNONE; then
8139 test_prefix=/usr/local
8140 else
8141 test_prefix=$prefix
8143 else
8144 test_prefix=$exec_prefix
8146 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8148 if grep '^STARTUP' $f > /dev/null 2>&1; then
8149 gcc_cv_mips_libgloss_startup=yes
8150 break
8152 done
8153 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8154 cat >> confdefs.h <<\EOF
8155 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8159 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8161 esac
8163 if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8164 cat >> confdefs.h <<EOF
8165 #define PREFIX_INCLUDE_DIR "$prefix/include"
8170 # Figure out what language subdirectories are present.
8171 # Look if the user specified --enable-languages="..."; if not, use
8172 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8173 # go away some day.
8174 # NB: embedded tabs in this IF block -- do not untabify
8175 if test x"${enable_languages+set}" != xset; then
8176 if test x"${LANGUAGES+set}" = xset; then
8177 enable_languages="${LANGUAGES}"
8178 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8180 else
8181 enable_languages=all
8183 else
8184 if test x"${enable_languages}" = x \
8185 || test x"${enable_languages}" = xyes;
8186 then
8187 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8190 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8192 # First scan to see if an enabled language requires some other language.
8193 # We assume that a given config-lang.in will list all the language
8194 # front ends it requires, even if some are required indirectly.
8195 for lang in ${srcdir}/*/config-lang.in ..
8197 case $lang in
8200 # The odd quoting in the next line works around
8201 # an apparent bug in bash 1.12 on linux.
8202 ${srcdir}/[*]/config-lang.in)
8205 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8206 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8207 for other in $this_lang_requires
8209 case ,${enable_languages}, in
8210 *,$other,*)
8212 *,all,*)
8214 *,$lang_alias,*)
8215 enable_languages="$enable_languages,$other"
8217 esac
8218 done
8220 esac
8221 done
8223 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8224 found_languages=
8225 subdirs=
8226 for lang in ${srcdir}/*/config-lang.in ..
8228 case $lang in
8229 ..) ;;
8230 # The odd quoting in the next line works around
8231 # an apparent bug in bash 1.12 on linux.
8232 ${srcdir}/[*]/config-lang.in) ;;
8234 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8235 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8236 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8237 if test "x$lang_alias" = x
8238 then
8239 echo "$lang doesn't set \$language." 1>&2
8240 exit 1
8242 case ${build_by_default},${enable_languages}, in
8243 *,$lang_alias,*) add_this_lang=yes ;;
8244 no,*) add_this_lang=no ;;
8245 *,all,*) add_this_lang=yes ;;
8246 *) add_this_lang=no ;;
8247 esac
8248 found_languages="${found_languages} ${lang_alias}"
8249 if test x"${add_this_lang}" = xyes; then
8250 case $lang in
8251 ${srcdir}/ada/config-lang.in)
8252 if test x$have_gnat = xyes ; then
8253 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8257 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8259 esac
8262 esac
8263 done
8265 missing_languages=
8266 for expected_language in ${expected_languages} ..
8268 if test "${expected_language}" != ..; then
8269 missing_language="${expected_language}"
8270 if test "${expected_language}" = "c" \
8271 || test "${expected_language}" = "all"; then
8272 missing_language=
8274 for found_language in ${found_languages} ..
8276 if test "${found_language}" != ..; then
8277 if test "${expected_language}" = "${found_language}"; then
8278 missing_language=
8281 done
8282 if test "x${missing_language}" != x; then
8283 missing_languages="${missing_languages} ${missing_language}"
8286 done
8288 if test "x$missing_languages" != x; then
8289 { echo "configure: error:
8290 The following requested languages were not found:${missing_languages}
8291 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8294 # Make gthr-default.h if we have a thread file.
8295 gthread_flags=
8296 if test $thread_file != single; then
8297 rm -f gthr-default.h
8298 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8299 gthread_flags=-DHAVE_GTHR_DEFAULT
8303 # Find out what GC implementation we want, or may, use.
8304 # Check whether --with-gc or --without-gc was given.
8305 if test "${with_gc+set}" = set; then
8306 withval="$with_gc"
8307 case "$withval" in
8308 simple | page)
8309 GGC=ggc-$withval
8312 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8314 esac
8315 else
8316 GGC=ggc-page
8320 echo "Using $GGC for garbage collection."
8322 # Use the system's zlib library.
8323 zlibdir=-L../zlib
8324 zlibinc="-I\$(srcdir)/../zlib"
8325 # Check whether --with-system-zlib or --without-system-zlib was given.
8326 if test "${with_system_zlib+set}" = set; then
8327 withval="$with_system_zlib"
8328 zlibdir=
8329 zlibinc=
8337 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8338 echo "configure:8346: checking whether to enable maintainer-specific portions of Makefiles" >&5
8339 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8340 if test "${enable_maintainer_mode+set}" = set; then
8341 enableval="$enable_maintainer_mode"
8342 maintainer_mode=$enableval
8343 else
8344 maintainer_mode=no
8348 echo "$ac_t""$maintainer_mode" 1>&6
8350 if test "$maintainer_mode" = "yes"; then
8351 MAINT=''
8352 else
8353 MAINT='#'
8356 # With Setjmp/Longjmp based exception handling.
8357 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8358 if test "${enable_sjlj_exceptions+set}" = set; then
8359 enableval="$enable_sjlj_exceptions"
8360 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
8361 cat >> confdefs.h <<EOF
8362 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
8368 # Use libunwind based exception handling.
8369 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8370 if test "${enable_libunwind_exceptions+set}" = set; then
8371 enableval="$enable_libunwind_exceptions"
8372 use_libunwind_exceptions=$enableval
8373 else
8374 use_libunwind_exceptions=no
8377 if test x"$use_libunwind_exceptions" = xyes; then
8378 cat >> confdefs.h <<\EOF
8379 #define USE_LIBUNWIND_EXCEPTIONS 1
8384 # Make empty files to contain the specs and options for each language.
8385 # Then add #include lines to for a compiler that has specs and/or options.
8387 lang_specs_files=
8388 lang_options_files=
8389 lang_tree_files=
8390 for subdir in . $subdirs
8392 if test -f $srcdir/$subdir/lang-specs.h; then
8393 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8395 if test -f $srcdir/$subdir/lang-options.h; then
8396 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8398 if test -f $srcdir/$subdir/$subdir-tree.def; then
8399 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8401 done
8403 # These (without "all_") are set in each config-lang.in.
8404 # `language' must be a single word so is spelled singularly.
8405 all_languages=
8406 all_boot_languages=
8407 all_compilers=
8408 all_stagestuff=
8409 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8410 # List of language makefile fragments.
8411 all_lang_makefiles=
8412 # Files for gengtype
8413 all_gtfiles="$target_gtfiles"
8414 # Files for gengtype with language
8415 all_gtfiles_files_langs=
8416 all_gtfiles_files_files=
8418 # Add the language fragments.
8419 # Languages are added via two mechanisms. Some information must be
8420 # recorded in makefile variables, these are defined in config-lang.in.
8421 # We accumulate them and plug them into the main Makefile.
8422 # The other mechanism is a set of hooks for each of the main targets
8423 # like `clean', `install', etc.
8425 language_fragments="Make-lang"
8426 language_hooks="Make-hooks"
8428 for s in .. $subdirs
8430 if test $s != ".."
8431 then
8432 language=
8433 boot_language=
8434 compilers=
8435 stagestuff=
8436 outputs=
8437 gtfiles=
8438 . ${srcdir}/$s/config-lang.in
8439 if test "x$language" = x
8440 then
8441 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8442 exit 1
8444 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8445 if test -f ${srcdir}/$s/Makefile.in
8446 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8448 all_languages="$all_languages $language"
8449 if test "x$boot_language" = xyes
8450 then
8451 all_boot_languages="$all_boot_languages $language"
8453 all_compilers="$all_compilers $compilers"
8454 all_stagestuff="$all_stagestuff $stagestuff"
8455 all_outputs="$all_outputs $outputs"
8456 all_gtfiles="$all_gtfiles $gtfiles"
8457 for f in .. $gtfiles
8459 if test $f != ".."
8460 then
8461 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8462 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8464 done
8466 done
8468 # Pick up gtfiles for c
8469 gtfiles=
8470 s="c"
8471 . ${srcdir}/c-config-lang.in
8472 all_gtfiles="$all_gtfiles $gtfiles"
8473 for f in .. $gtfiles
8475 if test $f != ".."
8476 then
8477 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8478 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8480 done
8482 check_languages=
8483 for language in .. $all_languages
8485 if test $language != ".."
8486 then
8487 check_languages="$check_languages check-$language"
8489 done
8491 # Since we can't use `::' targets, we link each language in
8492 # with a set of hooks, reached indirectly via lang.${target}.
8494 rm -f Make-hooks
8495 touch Make-hooks
8496 target_list="all.build all.cross start.encap rest.encap \
8497 info dvi generated-manpages \
8498 install-normal install-common install-info install-man \
8499 uninstall \
8500 mostlyclean clean distclean extraclean maintainer-clean \
8501 stage1 stage2 stage3 stage4"
8502 for t in $target_list
8505 for lang in .. $all_languages
8507 if test $lang != ".."; then
8508 x="$x $lang.$t"
8510 done
8511 echo "lang.$t: $x" >> Make-hooks
8512 done
8514 # Create .gdbinit.
8516 echo "dir ." > .gdbinit
8517 echo "dir ${srcdir}" >> .gdbinit
8518 if test x$gdb_needs_out_file_path = xyes
8519 then
8520 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8522 if test "x$subdirs" != x; then
8523 for s in $subdirs
8525 echo "dir ${srcdir}/$s" >> .gdbinit
8526 done
8528 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8530 # Define variables host_canonical and build_canonical
8531 # because some Cygnus local changes in the Makefile depend on them.
8532 build_canonical=${build}
8533 host_canonical=${host}
8534 target_subdir=
8535 if test "${host}" != "${target}" ; then
8536 target_subdir=${target_alias}/
8542 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8543 # absolute path for gcc_tooldir based on inserting the number of up-directory
8544 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8545 # $(libsubdir)/@(unlibsubdir) based path.
8546 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8547 # make and thus we'd get different behavior depending on where we built the
8548 # sources.
8549 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8550 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8551 else
8552 # An explanation of the sed strings:
8553 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8554 # -e 's|/$||' match a trailing forward slash and eliminates it
8555 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8556 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8558 # (*) Note this pattern overwrites the first character of the string
8559 # with a forward slash if one is not already present. This is not a
8560 # problem because the exact names of the sub-directories concerned is
8561 # unimportant, just the number of them matters.
8563 # The practical upshot of these patterns is like this:
8565 # prefix exec_prefix result
8566 # ------ ----------- ------
8567 # /foo /foo/bar ../
8568 # /foo/ /foo/bar ../
8569 # /foo /foo/bar/ ../
8570 # /foo/ /foo/bar/ ../
8571 # /foo /foo/bar/ugg ../../
8573 dollar='$$'
8574 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8579 # Find a directory in which to install a shared libgcc.
8581 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8582 if test "${enable_version_specific_runtime_libs+set}" = set; then
8583 enableval="$enable_version_specific_runtime_libs"
8588 # Check whether --with-slibdir or --without-slibdir was given.
8589 if test "${with_slibdir+set}" = set; then
8590 withval="$with_slibdir"
8591 slibdir="$with_slibdir"
8592 else
8593 if test "${enable_version_specific_runtime_libs+set}" = set; then
8594 slibdir='$(libsubdir)'
8595 elif test "$host" != "$target"; then
8596 slibdir='$(build_tooldir)/lib'
8597 else
8598 slibdir='$(libdir)'
8604 objdir=`${PWDCMD-pwd}`
8607 # Process the language and host/target makefile fragments.
8608 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8610 # Substitute configuration variables
8679 # Echo that links are built
8680 if test x$host = x$target
8681 then
8682 str1="native "
8683 else
8684 str1="cross-"
8685 str2=" from $host"
8688 if test x$host != x$build
8689 then
8690 str3=" on a $build system"
8693 if test "x$str2" != x || test "x$str3" != x
8694 then
8695 str4=
8698 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8700 if test "x$str2" != x || test "x$str3" != x
8701 then
8702 echo " ${str2}${str3}." 1>&2
8705 # Truncate the target if necessary
8706 if test x$host_truncate_target != x; then
8707 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8710 # Configure the subdirectories
8711 # AC_CONFIG_SUBDIRS($subdirs)
8713 # Create the Makefile
8714 # and configure language subdirectories
8715 trap '' 1 2 15
8716 cat > confcache <<\EOF
8717 # This file is a shell script that caches the results of configure
8718 # tests run on this system so they can be shared between configure
8719 # scripts and configure runs. It is not useful on other systems.
8720 # If it contains results you don't want to keep, you may remove or edit it.
8722 # By default, configure uses ./config.cache as the cache file,
8723 # creating it if it does not exist already. You can give configure
8724 # the --cache-file=FILE option to use a different cache file; that is
8725 # what configure does when it calls configure scripts in
8726 # subdirectories, so they share the cache.
8727 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8728 # config.status only pays attention to the cache file if you give it the
8729 # --recheck option to rerun configure.
8732 # The following way of writing the cache mishandles newlines in values,
8733 # but we know of no workaround that is simple, portable, and efficient.
8734 # So, don't put newlines in cache variables' values.
8735 # Ultrix sh set writes to stderr and can't be redirected directly,
8736 # and sets the high bit in the cache file unless we assign to the vars.
8737 (set) 2>&1 |
8738 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8739 *ac_space=\ *)
8740 # `set' does not quote correctly, so add quotes (double-quote substitution
8741 # turns \\\\ into \\, and sed turns \\ into \).
8742 sed -n \
8743 -e "s/'/'\\\\''/g" \
8744 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8747 # `set' quotes correctly as required by POSIX, so do not add quotes.
8748 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8750 esac >> confcache
8751 if cmp -s $cache_file confcache; then
8753 else
8754 if test -w $cache_file; then
8755 echo "updating cache $cache_file"
8756 cat confcache > $cache_file
8757 else
8758 echo "not updating unwritable cache $cache_file"
8761 rm -f confcache
8763 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8765 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8766 # Let make expand exec_prefix.
8767 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8769 # Any assignment to VPATH causes Sun make to only execute
8770 # the first set of double-colon rules, so remove it if not needed.
8771 # If there is a colon in the path, we need to keep it.
8772 if test "x$srcdir" = x.; then
8773 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8776 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8778 DEFS=-DHAVE_CONFIG_H
8780 # Without the "./", some shells look in PATH for config.status.
8781 : ${CONFIG_STATUS=./config.status}
8783 echo creating $CONFIG_STATUS
8784 rm -f $CONFIG_STATUS
8785 cat > $CONFIG_STATUS <<EOF
8786 #! /bin/sh
8787 # Generated automatically by configure.
8788 # Run this file to recreate the current configuration.
8789 # This directory was configured as follows,
8790 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8792 # $0 $ac_configure_args
8794 # Compiler output produced by configure, useful for debugging
8795 # configure, is in ./config.log if it exists.
8797 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8798 for ac_option
8800 case "\$ac_option" in
8801 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8802 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8803 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8804 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8805 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8806 exit 0 ;;
8807 -help | --help | --hel | --he | --h)
8808 echo "\$ac_cs_usage"; exit 0 ;;
8809 *) echo "\$ac_cs_usage"; exit 1 ;;
8810 esac
8811 done
8813 ac_given_srcdir=$srcdir
8815 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8817 cat >> $CONFIG_STATUS <<EOF
8819 # Protect against being on the right side of a sed subst in config.status.
8820 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8821 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8822 $ac_vpsub
8823 $extrasub
8824 s%@SHELL@%$SHELL%g
8825 s%@CFLAGS@%$CFLAGS%g
8826 s%@CPPFLAGS@%$CPPFLAGS%g
8827 s%@CXXFLAGS@%$CXXFLAGS%g
8828 s%@FFLAGS@%$FFLAGS%g
8829 s%@DEFS@%$DEFS%g
8830 s%@LDFLAGS@%$LDFLAGS%g
8831 s%@LIBS@%$LIBS%g
8832 s%@exec_prefix@%$exec_prefix%g
8833 s%@prefix@%$prefix%g
8834 s%@program_transform_name@%$program_transform_name%g
8835 s%@bindir@%$bindir%g
8836 s%@sbindir@%$sbindir%g
8837 s%@libexecdir@%$libexecdir%g
8838 s%@datadir@%$datadir%g
8839 s%@sysconfdir@%$sysconfdir%g
8840 s%@sharedstatedir@%$sharedstatedir%g
8841 s%@localstatedir@%$localstatedir%g
8842 s%@libdir@%$libdir%g
8843 s%@includedir@%$includedir%g
8844 s%@oldincludedir@%$oldincludedir%g
8845 s%@infodir@%$infodir%g
8846 s%@mandir@%$mandir%g
8847 s%@host@%$host%g
8848 s%@host_alias@%$host_alias%g
8849 s%@host_cpu@%$host_cpu%g
8850 s%@host_vendor@%$host_vendor%g
8851 s%@host_os@%$host_os%g
8852 s%@target@%$target%g
8853 s%@target_alias@%$target_alias%g
8854 s%@target_cpu@%$target_cpu%g
8855 s%@target_vendor@%$target_vendor%g
8856 s%@target_os@%$target_os%g
8857 s%@build@%$build%g
8858 s%@build_alias@%$build_alias%g
8859 s%@build_cpu@%$build_cpu%g
8860 s%@build_vendor@%$build_vendor%g
8861 s%@build_os@%$build_os%g
8862 s%@CC@%$CC%g
8863 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
8864 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8865 s%@GNATBIND@%$GNATBIND%g
8866 s%@ADAC@%$ADAC%g
8867 s%@strict1_warn@%$strict1_warn%g
8868 s%@CPP@%$CPP%g
8869 s%@warn_cflags@%$warn_cflags%g
8870 s%@enable_multilib@%$enable_multilib%g
8871 s%@nocommon_flag@%$nocommon_flag%g
8872 s%@valgrind_path@%$valgrind_path%g
8873 s%@valgrind_path_defines@%$valgrind_path_defines%g
8874 s%@valgrind_command@%$valgrind_command%g
8875 s%@coverage_flags@%$coverage_flags%g
8876 s%@enable_shared@%$enable_shared%g
8877 s%@stage1_cflags@%$stage1_cflags%g
8878 s%@SET_MAKE@%$SET_MAKE%g
8879 s%@AWK@%$AWK%g
8880 s%@LN@%$LN%g
8881 s%@LN_S@%$LN_S%g
8882 s%@RANLIB@%$RANLIB%g
8883 s%@INSTALL@%$INSTALL%g
8884 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8885 s%@INSTALL_DATA@%$INSTALL_DATA%g
8886 s%@have_mktemp_command@%$have_mktemp_command%g
8887 s%@MAKEINFO@%$MAKEINFO%g
8888 s%@BUILD_INFO@%$BUILD_INFO%g
8889 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
8890 s%@FLEX@%$FLEX%g
8891 s%@BISON@%$BISON%g
8892 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
8893 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
8894 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
8895 s%@LIBICONV@%$LIBICONV%g
8896 s%@gcc_cv_initfinit_array@%$gcc_cv_initfinit_array%g
8897 s%@manext@%$manext%g
8898 s%@objext@%$objext%g
8899 s%@extra_modes_file@%$extra_modes_file%g
8900 s%@FORBUILD@%$FORBUILD%g
8901 s%@PACKAGE@%$PACKAGE%g
8902 s%@VERSION@%$VERSION%g
8903 s%@ALLOCA@%$ALLOCA%g
8904 s%@GLIBC21@%$GLIBC21%g
8905 s%@USE_NLS@%$USE_NLS%g
8906 s%@MSGFMT@%$MSGFMT%g
8907 s%@GMSGFMT@%$GMSGFMT%g
8908 s%@XGETTEXT@%$XGETTEXT%g
8909 s%@INTLBISON@%$INTLBISON%g
8910 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8911 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8912 s%@CATALOGS@%$CATALOGS%g
8913 s%@CATOBJEXT@%$CATOBJEXT%g
8914 s%@INTLLIBS@%$INTLLIBS%g
8915 s%@INTLDEPS@%$INTLDEPS%g
8916 s%@INTLOBJS@%$INTLOBJS%g
8917 s%@POSUB@%$POSUB%g
8918 s%@DATADIRNAME@%$DATADIRNAME%g
8919 s%@INSTOBJEXT@%$INSTOBJEXT%g
8920 s%@GENCAT@%$GENCAT%g
8921 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8922 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8923 s%@CROSS@%$CROSS%g
8924 s%@ALL@%$ALL%g
8925 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
8926 s%@inhibit_libc@%$inhibit_libc%g
8927 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
8928 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
8929 s%@HOST_CC@%$HOST_CC%g
8930 s%@HOST_CFLAGS@%$HOST_CFLAGS%g
8931 s%@STMP_FIXINC@%$STMP_FIXINC%g
8932 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
8933 s%@libgcc_visibility@%$libgcc_visibility%g
8934 s%@gthread_flags@%$gthread_flags%g
8935 s%@GGC@%$GGC%g
8936 s%@zlibdir@%$zlibdir%g
8937 s%@zlibinc@%$zlibinc%g
8938 s%@MAINT@%$MAINT%g
8939 s%@build_canonical@%$build_canonical%g
8940 s%@host_canonical@%$host_canonical%g
8941 s%@target_subdir@%$target_subdir%g
8942 s%@gcc_tooldir@%$gcc_tooldir%g
8943 s%@dollar@%$dollar%g
8944 s%@slibdir@%$slibdir%g
8945 s%@objdir@%$objdir%g
8946 s%@subdirs@%$subdirs%g
8947 s%@srcdir@%$srcdir%g
8948 s%@all_boot_languages@%$all_boot_languages%g
8949 s%@all_compilers@%$all_compilers%g
8950 s%@all_gtfiles@%$all_gtfiles%g
8951 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
8952 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
8953 s%@all_lang_makefiles@%$all_lang_makefiles%g
8954 s%@all_languages@%$all_languages%g
8955 s%@all_stagestuff@%$all_stagestuff%g
8956 s%@build_exeext@%$build_exeext%g
8957 s%@build_install_headers_dir@%$build_install_headers_dir%g
8958 s%@build_xm_file_list@%$build_xm_file_list%g
8959 s%@build_xm_file@%$build_xm_file%g
8960 s%@build_xm_defines@%$build_xm_defines%g
8961 s%@check_languages@%$check_languages%g
8962 s%@cc_set_by_configure@%$cc_set_by_configure%g
8963 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
8964 s%@cpp_install_dir@%$cpp_install_dir%g
8965 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8966 s%@dep_tmake_file@%$dep_tmake_file%g
8967 s%@extra_headers_list@%$extra_headers_list%g
8968 s%@extra_objs@%$extra_objs%g
8969 s%@extra_parts@%$extra_parts%g
8970 s%@extra_passes@%$extra_passes%g
8971 s%@extra_programs@%$extra_programs%g
8972 s%@float_h_file@%$float_h_file%g
8973 s%@gcc_config_arguments@%$gcc_config_arguments%g
8974 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
8975 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
8976 s%@gcc_version@%$gcc_version%g
8977 s%@gcc_version_full@%$gcc_version_full%g
8978 s%@gcc_version_trigger@%$gcc_version_trigger%g
8979 s%@host_exeext@%$host_exeext%g
8980 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
8981 s%@host_xm_file_list@%$host_xm_file_list%g
8982 s%@host_xm_file@%$host_xm_file%g
8983 s%@host_xm_defines@%$host_xm_defines%g
8984 s%@install@%$install%g
8985 s%@lang_options_files@%$lang_options_files%g
8986 s%@lang_specs_files@%$lang_specs_files%g
8987 s%@lang_tree_files@%$lang_tree_files%g
8988 s%@local_prefix@%$local_prefix%g
8989 s%@md_file@%$md_file%g
8990 s%@objc_boehm_gc@%$objc_boehm_gc%g
8991 s%@out_file@%$out_file%g
8992 s%@out_object_file@%$out_object_file%g
8993 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
8994 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
8995 s%@symbolic_link@%$symbolic_link%g
8996 s%@thread_file@%$thread_file%g
8997 s%@tm_file_list@%$tm_file_list%g
8998 s%@tm_file@%$tm_file%g
8999 s%@tm_defines@%$tm_defines%g
9000 s%@tm_p_file_list@%$tm_p_file_list%g
9001 s%@tm_p_file@%$tm_p_file%g
9002 s%@xm_file@%$xm_file%g
9003 s%@xm_defines@%$xm_defines%g
9004 s%@c_target_objs@%$c_target_objs%g
9005 s%@cxx_target_objs@%$cxx_target_objs%g
9006 s%@target_cpu_default@%$target_cpu_default%g
9007 /@target_overrides@/r $target_overrides
9008 s%@target_overrides@%%g
9009 /@host_overrides@/r $host_overrides
9010 s%@host_overrides@%%g
9011 /@language_fragments@/r $language_fragments
9012 s%@language_fragments@%%g
9013 /@language_hooks@/r $language_hooks
9014 s%@language_hooks@%%g
9016 CEOF
9019 cat >> $CONFIG_STATUS <<\EOF
9021 # Split the substitutions into bite-sized pieces for seds with
9022 # small command number limits, like on Digital OSF/1 and HP-UX.
9023 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9024 ac_file=1 # Number of current file.
9025 ac_beg=1 # First line for current file.
9026 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9027 ac_more_lines=:
9028 ac_sed_cmds=""
9029 while $ac_more_lines; do
9030 if test $ac_beg -gt 1; then
9031 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9032 else
9033 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9035 if test ! -s conftest.s$ac_file; then
9036 ac_more_lines=false
9037 rm -f conftest.s$ac_file
9038 else
9039 if test -z "$ac_sed_cmds"; then
9040 ac_sed_cmds="sed -f conftest.s$ac_file"
9041 else
9042 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9044 ac_file=`expr $ac_file + 1`
9045 ac_beg=$ac_end
9046 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9048 done
9049 if test -z "$ac_sed_cmds"; then
9050 ac_sed_cmds=cat
9054 cat >> $CONFIG_STATUS <<EOF
9056 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9058 cat >> $CONFIG_STATUS <<\EOF
9059 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9060 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9061 case "$ac_file" in
9062 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9063 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9064 *) ac_file_in="${ac_file}.in" ;;
9065 esac
9067 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9069 # Remove last slash and all that follows it. Not all systems have dirname.
9070 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9071 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9072 # The file is in a subdirectory.
9073 test ! -d "$ac_dir" && mkdir "$ac_dir"
9074 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9075 # A "../" for each directory in $ac_dir_suffix.
9076 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9077 else
9078 ac_dir_suffix= ac_dots=
9081 case "$ac_given_srcdir" in
9082 .) srcdir=.
9083 if test -z "$ac_dots"; then top_srcdir=.
9084 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9085 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9086 *) # Relative path.
9087 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9088 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9089 esac
9092 echo creating "$ac_file"
9093 rm -f "$ac_file"
9094 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9095 case "$ac_file" in
9096 *Makefile*) ac_comsub="1i\\
9097 # $configure_input" ;;
9098 *) ac_comsub= ;;
9099 esac
9101 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9102 sed -e "$ac_comsub
9103 s%@configure_input@%$configure_input%g
9104 s%@srcdir@%$srcdir%g
9105 s%@top_srcdir@%$top_srcdir%g
9106 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9107 fi; done
9108 rm -f conftest.s*
9110 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9111 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9113 # ac_d sets the value in "#define NAME VALUE" lines.
9114 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9115 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9116 ac_dC='\3'
9117 ac_dD='%g'
9118 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9119 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9120 ac_uB='\([ ]\)%\1#\2define\3'
9121 ac_uC=' '
9122 ac_uD='\4%g'
9123 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9124 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9125 ac_eB='$%\1#\2define\3'
9126 ac_eC=' '
9127 ac_eD='%g'
9129 if test "${CONFIG_HEADERS+set}" != set; then
9131 cat >> $CONFIG_STATUS <<EOF
9132 CONFIG_HEADERS="auto-host.h:config.in"
9134 cat >> $CONFIG_STATUS <<\EOF
9136 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9137 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9138 case "$ac_file" in
9139 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9140 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9141 *) ac_file_in="${ac_file}.in" ;;
9142 esac
9144 echo creating $ac_file
9146 rm -f conftest.frag conftest.in conftest.out
9147 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9148 cat $ac_file_inputs > conftest.in
9152 # Transform confdefs.h into a sed script conftest.vals that substitutes
9153 # the proper values into config.h.in to produce config.h. And first:
9154 # Protect against being on the right side of a sed subst in config.status.
9155 # Protect against being in an unquoted here document in config.status.
9156 rm -f conftest.vals
9157 cat > conftest.hdr <<\EOF
9158 s/[\\&%]/\\&/g
9159 s%[\\$`]%\\&%g
9160 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9161 s%ac_d%ac_u%gp
9162 s%ac_u%ac_e%gp
9164 sed -n -f conftest.hdr confdefs.h > conftest.vals
9165 rm -f conftest.hdr
9167 # This sed command replaces #undef with comments. This is necessary, for
9168 # example, in the case of _POSIX_SOURCE, which is predefined and required
9169 # on some systems where configure will not decide to define it.
9170 cat >> conftest.vals <<\EOF
9171 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9174 # Break up conftest.vals because some shells have a limit on
9175 # the size of here documents, and old seds have small limits too.
9177 rm -f conftest.tail
9178 while :
9180 ac_lines=`grep -c . conftest.vals`
9181 # grep -c gives empty output for an empty file on some AIX systems.
9182 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9183 # Write a limited-size here document to conftest.frag.
9184 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9185 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9186 echo 'CEOF
9187 sed -f conftest.frag conftest.in > conftest.out
9188 rm -f conftest.in
9189 mv conftest.out conftest.in
9190 ' >> $CONFIG_STATUS
9191 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9192 rm -f conftest.vals
9193 mv conftest.tail conftest.vals
9194 done
9195 rm -f conftest.vals
9197 cat >> $CONFIG_STATUS <<\EOF
9198 rm -f conftest.frag conftest.h
9199 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9200 cat conftest.in >> conftest.h
9201 rm -f conftest.in
9202 if cmp -s $ac_file conftest.h 2>/dev/null; then
9203 echo "$ac_file is unchanged"
9204 rm -f conftest.h
9205 else
9206 # Remove last slash and all that follows it. Not all systems have dirname.
9207 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9208 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9209 # The file is in a subdirectory.
9210 test ! -d "$ac_dir" && mkdir "$ac_dir"
9212 rm -f $ac_file
9213 mv conftest.h $ac_file
9215 fi; done
9218 cat >> $CONFIG_STATUS <<EOF
9220 subdirs='$subdirs'
9221 symbolic_link='$symbolic_link'
9224 cat >> $CONFIG_STATUS <<\EOF
9225 for ac_file in $CONFIG_FILES; do
9226 # Support "outfile[:infile[:infile...]]"
9227 case "$ac_file" in
9228 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9229 esac
9230 # PO directories have a Makefile.in generated from Makefile.in.in.
9231 case "$ac_file" in */Makefile.in)
9232 # Adjust a relative srcdir.
9233 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9234 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9235 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9236 # In autoconf-2.13 it is called $ac_given_srcdir.
9237 # In autoconf-2.50 it is called $srcdir.
9238 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9239 case "$ac_given_srcdir" in
9240 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9241 /*) top_srcdir="$ac_given_srcdir" ;;
9242 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9243 esac
9244 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9245 rm -f "$ac_dir/POTFILES"
9246 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9247 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9248 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9249 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9252 esac
9253 done
9255 case x$CONFIG_HEADERS in
9256 xauto-host.h:config.in)
9257 echo > cstamp-h ;;
9258 esac
9259 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9260 # bootstrapping and the installation procedure can still use
9261 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9262 # FLAGS_TO_PASS has been modified to solve the problem there.
9263 # This is virtually a duplicate of what happens in configure.lang; we do
9264 # an extra check to make sure this only happens if ln -s can be used.
9265 if test "$symbolic_link" = "ln -s"; then
9266 for d in .. ${subdirs} fixinc ; do
9267 if test $d != ..; then
9268 STARTDIR=`${PWDCMD-pwd}`
9269 cd $d
9270 for t in stage1 stage2 stage3 stage4 include
9272 rm -f $t
9273 $symbolic_link ../$t $t 2>/dev/null
9274 done
9275 cd $STARTDIR
9277 done
9278 else true ; fi
9279 # Avoid having to add intl to our include paths.
9280 if test -f intl/libintl.h; then
9281 echo creating libintl.h
9282 echo '#include "intl/libintl.h"' >libintl.h
9285 exit 0
9287 chmod +x $CONFIG_STATUS
9288 rm -fr confdefs* $ac_clean_files
9289 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1