re PR target/8343 ([m68k] [3.2 regression] m68k-elf/rtems ICE at instantiate_virtual_...
[official-gcc.git] / gcc / configure
blob4e876410515e824e6b058c39629f6e583f71d19d
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, specify
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-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR."
66 ac_help="$ac_help
67 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
68 ac_help="$ac_help
69 --enable-initfini-array use .init_array/.fini_array sections"
70 ac_help="$ac_help
71 --enable-sjlj-exceptions
72 arrange to use setjmp/longjmp exception handling"
73 ac_help="$ac_help
74 --enable-libunwind-exceptions force use libunwind for exceptions"
75 ac_help="$ac_help
76 --enable-nls use Native Language Support (default)"
77 ac_help="$ac_help
78 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
79 ac_help="$ac_help
80 --disable-nls do not use Native Language Support"
81 ac_help="$ac_help
82 --with-included-gettext use the GNU gettext library included here"
83 ac_help="$ac_help
84 --disable-win32-registry
85 disable lookup of installation paths in the
86 Registry on Windows hosts
87 --enable-win32-registry enable registry lookup (default)
88 --enable-win32-registry=KEY
89 use KEY instead of GCC version as the last portion
90 of the registry key"
91 ac_help="$ac_help
92 --with-gc={simple,page} choose the garbage collection mechanism to use
93 with the compiler"
94 ac_help="$ac_help
95 --with-system-zlib use installed libz"
96 ac_help="$ac_help
97 --enable-maintainer-mode
98 enable make rules and dependencies not useful
99 (and sometimes confusing) to the casual installer"
100 ac_help="$ac_help
101 --enable-version-specific-runtime-libs
102 specify that runtime libraries should be
103 installed in a compiler-specific directory"
104 ac_help="$ac_help
105 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
107 # Initialize some variables set by options.
108 # The variables have the same names as the options, with
109 # dashes changed to underlines.
110 build=NONE
111 cache_file=./config.cache
112 exec_prefix=NONE
113 host=NONE
114 no_create=
115 nonopt=NONE
116 no_recursion=
117 prefix=NONE
118 program_prefix=NONE
119 program_suffix=NONE
120 program_transform_name=s,x,x,
121 silent=
122 site=
123 srcdir=
124 target=NONE
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128 bindir='${exec_prefix}/bin'
129 sbindir='${exec_prefix}/sbin'
130 libexecdir='${exec_prefix}/libexec'
131 datadir='${prefix}/share'
132 sysconfdir='${prefix}/etc'
133 sharedstatedir='${prefix}/com'
134 localstatedir='${prefix}/var'
135 libdir='${exec_prefix}/lib'
136 includedir='${prefix}/include'
137 oldincludedir='/usr/include'
138 infodir='${prefix}/info'
139 mandir='${prefix}/man'
141 # Initialize some other variables.
142 subdirs=
143 MFLAGS= MAKEFLAGS=
144 SHELL=${CONFIG_SHELL-/bin/sh}
145 # Maximum number of lines to put in a shell here document.
146 ac_max_here_lines=12
148 ac_prev=
149 for ac_option
152 # If the previous option needs an argument, assign it.
153 if test -n "$ac_prev"; then
154 eval "$ac_prev=\$ac_option"
155 ac_prev=
156 continue
159 case "$ac_option" in
160 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
161 *) ac_optarg= ;;
162 esac
164 # Accept the important Cygnus configure options, so we can diagnose typos.
166 case "$ac_option" in
168 -bindir | --bindir | --bindi | --bind | --bin | --bi)
169 ac_prev=bindir ;;
170 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
171 bindir="$ac_optarg" ;;
173 -build | --build | --buil | --bui | --bu)
174 ac_prev=build ;;
175 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
176 build="$ac_optarg" ;;
178 -cache-file | --cache-file | --cache-fil | --cache-fi \
179 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
180 ac_prev=cache_file ;;
181 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
182 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
183 cache_file="$ac_optarg" ;;
185 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
186 ac_prev=datadir ;;
187 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
188 | --da=*)
189 datadir="$ac_optarg" ;;
191 -disable-* | --disable-*)
192 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
193 # Reject names that are not valid shell variable names.
194 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
195 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198 eval "enable_${ac_feature}=no" ;;
200 -enable-* | --enable-*)
201 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
202 # Reject names that are not valid shell variable names.
203 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
204 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
207 case "$ac_option" in
208 *=*) ;;
209 *) ac_optarg=yes ;;
210 esac
211 eval "enable_${ac_feature}='$ac_optarg'" ;;
213 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
214 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
215 | --exec | --exe | --ex)
216 ac_prev=exec_prefix ;;
217 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
218 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
219 | --exec=* | --exe=* | --ex=*)
220 exec_prefix="$ac_optarg" ;;
222 -gas | --gas | --ga | --g)
223 # Obsolete; use --with-gas.
224 with_gas=yes ;;
226 -help | --help | --hel | --he)
227 # Omit some internal or obsolete options to make the list less imposing.
228 # This message is too long to be a string in the A/UX 3.1 sh.
229 cat << EOF
230 Usage: configure [options] [host]
231 Options: [defaults in brackets after descriptions]
232 Configuration:
233 --cache-file=FILE cache test results in FILE
234 --help print this message
235 --no-create do not create output files
236 --quiet, --silent do not print \`checking...' messages
237 --version print the version of autoconf that created configure
238 Directory and file names:
239 --prefix=PREFIX install architecture-independent files in PREFIX
240 [$ac_default_prefix]
241 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
242 [same as prefix]
243 --bindir=DIR user executables in DIR [EPREFIX/bin]
244 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
245 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
246 --datadir=DIR read-only architecture-independent data in DIR
247 [PREFIX/share]
248 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
249 --sharedstatedir=DIR modifiable architecture-independent data in DIR
250 [PREFIX/com]
251 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
252 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
253 --includedir=DIR C header files in DIR [PREFIX/include]
254 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
255 --infodir=DIR info documentation in DIR [PREFIX/info]
256 --mandir=DIR man documentation in DIR [PREFIX/man]
257 --srcdir=DIR find the sources in DIR [configure dir or ..]
258 --program-prefix=PREFIX prepend PREFIX to installed program names
259 --program-suffix=SUFFIX append SUFFIX to installed program names
260 --program-transform-name=PROGRAM
261 run sed PROGRAM on installed program names
263 cat << EOF
264 Host type:
265 --build=BUILD configure for building on BUILD [BUILD=HOST]
266 --host=HOST configure for HOST [guessed]
267 --target=TARGET configure for TARGET [TARGET=HOST]
268 Features and packages:
269 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
270 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
271 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
272 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
273 --x-includes=DIR X include files are in DIR
274 --x-libraries=DIR X library files are in DIR
276 if test -n "$ac_help"; then
277 echo "--enable and --with options recognized:$ac_help"
279 exit 0 ;;
281 -host | --host | --hos | --ho)
282 ac_prev=host ;;
283 -host=* | --host=* | --hos=* | --ho=*)
284 host="$ac_optarg" ;;
286 -includedir | --includedir | --includedi | --included | --include \
287 | --includ | --inclu | --incl | --inc)
288 ac_prev=includedir ;;
289 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
290 | --includ=* | --inclu=* | --incl=* | --inc=*)
291 includedir="$ac_optarg" ;;
293 -infodir | --infodir | --infodi | --infod | --info | --inf)
294 ac_prev=infodir ;;
295 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
296 infodir="$ac_optarg" ;;
298 -libdir | --libdir | --libdi | --libd)
299 ac_prev=libdir ;;
300 -libdir=* | --libdir=* | --libdi=* | --libd=*)
301 libdir="$ac_optarg" ;;
303 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
304 | --libexe | --libex | --libe)
305 ac_prev=libexecdir ;;
306 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
307 | --libexe=* | --libex=* | --libe=*)
308 libexecdir="$ac_optarg" ;;
310 -localstatedir | --localstatedir | --localstatedi | --localstated \
311 | --localstate | --localstat | --localsta | --localst \
312 | --locals | --local | --loca | --loc | --lo)
313 ac_prev=localstatedir ;;
314 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
315 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
316 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
317 localstatedir="$ac_optarg" ;;
319 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
320 ac_prev=mandir ;;
321 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
322 mandir="$ac_optarg" ;;
324 -nfp | --nfp | --nf)
325 # Obsolete; use --without-fp.
326 with_fp=no ;;
328 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
329 | --no-cr | --no-c)
330 no_create=yes ;;
332 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
333 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
334 no_recursion=yes ;;
336 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
337 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
338 | --oldin | --oldi | --old | --ol | --o)
339 ac_prev=oldincludedir ;;
340 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
341 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
342 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
343 oldincludedir="$ac_optarg" ;;
345 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
346 ac_prev=prefix ;;
347 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
348 prefix="$ac_optarg" ;;
350 -program-prefix | --program-prefix | --program-prefi | --program-pref \
351 | --program-pre | --program-pr | --program-p)
352 ac_prev=program_prefix ;;
353 -program-prefix=* | --program-prefix=* | --program-prefi=* \
354 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
355 program_prefix="$ac_optarg" ;;
357 -program-suffix | --program-suffix | --program-suffi | --program-suff \
358 | --program-suf | --program-su | --program-s)
359 ac_prev=program_suffix ;;
360 -program-suffix=* | --program-suffix=* | --program-suffi=* \
361 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
362 program_suffix="$ac_optarg" ;;
364 -program-transform-name | --program-transform-name \
365 | --program-transform-nam | --program-transform-na \
366 | --program-transform-n | --program-transform- \
367 | --program-transform | --program-transfor \
368 | --program-transfo | --program-transf \
369 | --program-trans | --program-tran \
370 | --progr-tra | --program-tr | --program-t)
371 ac_prev=program_transform_name ;;
372 -program-transform-name=* | --program-transform-name=* \
373 | --program-transform-nam=* | --program-transform-na=* \
374 | --program-transform-n=* | --program-transform-=* \
375 | --program-transform=* | --program-transfor=* \
376 | --program-transfo=* | --program-transf=* \
377 | --program-trans=* | --program-tran=* \
378 | --progr-tra=* | --program-tr=* | --program-t=*)
379 program_transform_name="$ac_optarg" ;;
381 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
382 | -silent | --silent | --silen | --sile | --sil)
383 silent=yes ;;
385 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
386 ac_prev=sbindir ;;
387 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
388 | --sbi=* | --sb=*)
389 sbindir="$ac_optarg" ;;
391 -sharedstatedir | --sharedstatedir | --sharedstatedi \
392 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
393 | --sharedst | --shareds | --shared | --share | --shar \
394 | --sha | --sh)
395 ac_prev=sharedstatedir ;;
396 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
397 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
398 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
399 | --sha=* | --sh=*)
400 sharedstatedir="$ac_optarg" ;;
402 -site | --site | --sit)
403 ac_prev=site ;;
404 -site=* | --site=* | --sit=*)
405 site="$ac_optarg" ;;
407 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
408 ac_prev=srcdir ;;
409 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
410 srcdir="$ac_optarg" ;;
412 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
413 | --syscon | --sysco | --sysc | --sys | --sy)
414 ac_prev=sysconfdir ;;
415 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
416 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
417 sysconfdir="$ac_optarg" ;;
419 -target | --target | --targe | --targ | --tar | --ta | --t)
420 ac_prev=target ;;
421 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
422 target="$ac_optarg" ;;
424 -v | -verbose | --verbose | --verbos | --verbo | --verb)
425 verbose=yes ;;
427 -version | --version | --versio | --versi | --vers)
428 echo "configure generated by autoconf version 2.13"
429 exit 0 ;;
431 -with-* | --with-*)
432 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 case "$ac_option" in
439 *=*) ;;
440 *) ac_optarg=yes ;;
441 esac
442 eval "with_${ac_package}='$ac_optarg'" ;;
444 -without-* | --without-*)
445 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
446 # Reject names that are not valid shell variable names.
447 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
448 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450 ac_package=`echo $ac_package| sed 's/-/_/g'`
451 eval "with_${ac_package}=no" ;;
453 --x)
454 # Obsolete; use --with-x.
455 with_x=yes ;;
457 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458 | --x-incl | --x-inc | --x-in | --x-i)
459 ac_prev=x_includes ;;
460 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462 x_includes="$ac_optarg" ;;
464 -x-libraries | --x-libraries | --x-librarie | --x-librari \
465 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466 ac_prev=x_libraries ;;
467 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469 x_libraries="$ac_optarg" ;;
471 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
475 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
476 echo "configure: warning: $ac_option: invalid host type" 1>&2
478 if test "x$nonopt" != xNONE; then
479 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
481 nonopt="$ac_option"
484 esac
485 done
487 if test -n "$ac_prev"; then
488 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
491 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493 # File descriptor usage:
494 # 0 standard input
495 # 1 file creation
496 # 2 errors and warnings
497 # 3 some systems may open it to /dev/tty
498 # 4 used on the Kubota Titan
499 # 6 checking for... messages and results
500 # 5 compiler messages saved in config.log
501 if test "$silent" = yes; then
502 exec 6>/dev/null
503 else
504 exec 6>&1
506 exec 5>./config.log
508 echo "\
509 This file contains any messages produced by compilers while
510 running configure, to aid debugging if configure makes a mistake.
511 " 1>&5
513 # Strip out --no-create and --no-recursion so they do not pile up.
514 # Also quote any args containing shell metacharacters.
515 ac_configure_args=
516 for ac_arg
518 case "$ac_arg" in
519 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
520 | --no-cr | --no-c) ;;
521 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
522 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
523 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
524 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
525 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
526 esac
527 done
529 # NLS nuisances.
530 # Only set these to C if already set. These must not be set unconditionally
531 # because not all systems understand e.g. LANG=C (notably SCO).
532 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
533 # Non-C LC_CTYPE values break the ctype check.
534 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
535 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
536 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
537 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
539 # confdefs.h avoids OS command line length limits that DEFS can exceed.
540 rm -rf conftest* confdefs.h
541 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
542 echo > confdefs.h
544 # A filename unique to this package, relative to the directory that
545 # configure is in, which we can look for to find out if srcdir is correct.
546 ac_unique_file=tree.c
548 # Find the source files, if location was not specified.
549 if test -z "$srcdir"; then
550 ac_srcdir_defaulted=yes
551 # Try the directory containing this script, then its parent.
552 ac_prog=$0
553 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
554 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555 srcdir=$ac_confdir
556 if test ! -r $srcdir/$ac_unique_file; then
557 srcdir=..
559 else
560 ac_srcdir_defaulted=no
562 if test ! -r $srcdir/$ac_unique_file; then
563 if test "$ac_srcdir_defaulted" = yes; then
564 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
565 else
566 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
569 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571 # Prefer explicitly selected file to automatically selected ones.
572 if test -z "$CONFIG_SITE"; then
573 if test "x$prefix" != xNONE; then
574 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
575 else
576 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
579 for ac_site_file in $CONFIG_SITE; do
580 if test -r "$ac_site_file"; then
581 echo "loading site script $ac_site_file"
582 . "$ac_site_file"
584 done
586 if test -r "$cache_file"; then
587 echo "loading cache $cache_file"
588 . $cache_file
589 else
590 echo "creating cache $cache_file"
591 > $cache_file
594 ac_ext=c
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
599 cross_compiling=$ac_cv_prog_cc_cross
601 ac_exeext=
602 ac_objext=o
603 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
604 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
605 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
606 ac_n= ac_c='
607 ' ac_t=' '
608 else
609 ac_n=-n ac_c= ac_t=
611 else
612 ac_n= ac_c='\c' ac_t=
618 remove=rm
619 hard_link=ln
620 symbolic_link='ln -s'
621 copy=cp
623 # Check for bogus environment variables.
624 # Test if LIBRARY_PATH contains the notation for the current directory
625 # since this would lead to problems installing/building glibc.
626 # LIBRARY_PATH contains the current directory if one of the following
627 # is true:
628 # - one of the terminals (":" and ";") is the first or last sign
629 # - two terminals occur directly after each other
630 # - the path contains an element with a dot in it
631 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
632 echo "configure:633: checking LIBRARY_PATH variable" >&5
633 case ${LIBRARY_PATH} in
634 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
635 library_path_setting="contains current directory"
638 library_path_setting="ok"
640 esac
641 echo "$ac_t""$library_path_setting" 1>&6
642 if test "$library_path_setting" != "ok"; then
643 { echo "configure: error:
644 *** LIBRARY_PATH shouldn't contain the current directory when
645 *** building gcc. Please change the environment variable
646 *** and run configure again." 1>&2; exit 1; }
649 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
650 # since this would lead to problems installing/building glibc.
651 # GCC_EXEC_PREFIX contains the current directory if one of the following
652 # is true:
653 # - one of the terminals (":" and ";") is the first or last sign
654 # - two terminals occur directly after each other
655 # - the path contains an element with a dot in it
656 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
657 echo "configure:658: checking GCC_EXEC_PREFIX variable" >&5
658 case ${GCC_EXEC_PREFIX} in
659 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
660 gcc_exec_prefix_setting="contains current directory"
663 gcc_exec_prefix_setting="ok"
665 esac
666 echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
667 if test "$gcc_exec_prefix_setting" != "ok"; then
668 { echo "configure: error:
669 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
670 *** building gcc. Please change the environment variable
671 *** and run configure again." 1>&2; exit 1; }
674 # Check for additional parameters
676 # With GNU ld
677 # Check whether --with-gnu-ld or --without-gnu-ld was given.
678 if test "${with_gnu_ld+set}" = set; then
679 withval="$with_gnu_ld"
680 gnu_ld_flag="$with_gnu_ld"
681 else
682 gnu_ld_flag=no
686 # With pre-defined ld
687 # Check whether --with-ld or --without-ld was given.
688 if test "${with_ld+set}" = set; then
689 withval="$with_ld"
690 DEFAULT_LINKER="$with_ld"
693 if test x"${DEFAULT_LINKER+set}" = x"set"; then
694 if test ! -x "$DEFAULT_LINKER"; then
695 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
696 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
697 gnu_ld_flag=yes
699 cat >> confdefs.h <<EOF
700 #define DEFAULT_LINKER "$DEFAULT_LINKER"
705 # With GNU as
706 # Check whether --with-gnu-as or --without-gnu-as was given.
707 if test "${with_gnu_as+set}" = set; then
708 withval="$with_gnu_as"
709 gas_flag="$with_gnu_as"
710 else
711 gas_flag=no
715 # Check whether --with-as or --without-as was given.
716 if test "${with_as+set}" = set; then
717 withval="$with_as"
718 DEFAULT_ASSEMBLER="$with_as"
721 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
722 if test ! -x "$DEFAULT_ASSEMBLER"; then
723 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
724 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
725 gas_flag=yes
727 cat >> confdefs.h <<EOF
728 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
733 # With stabs
734 # Check whether --with-stabs or --without-stabs was given.
735 if test "${with_stabs+set}" = set; then
736 withval="$with_stabs"
737 stabs="$with_stabs"
738 else
739 stabs=no
743 # With ELF
744 # Check whether --with-elf or --without-elf was given.
745 if test "${with_elf+set}" = set; then
746 withval="$with_elf"
747 elf="$with_elf"
748 else
749 elf=no
753 # Specify the local prefix
754 local_prefix=
755 # Check whether --with-local-prefix or --without-local-prefix was given.
756 if test "${with_local_prefix+set}" = set; then
757 withval="$with_local_prefix"
758 case "${withval}" in
759 yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
760 no) ;;
761 *) local_prefix=$with_local_prefix ;;
762 esac
766 # Default local prefix if it is empty
767 if test x$local_prefix = x; then
768 local_prefix=/usr/local
771 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
772 # passed in by the toplevel make and thus we'd get different behavior
773 # depending on where we built the sources.
774 gcc_gxx_include_dir=
775 # Specify the g++ header file directory
776 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
777 if test "${with_gxx_include_dir+set}" = set; then
778 withval="$with_gxx_include_dir"
779 case "${withval}" in
780 yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
781 no) ;;
782 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
783 esac
787 if test x${gcc_gxx_include_dir} = x; then
788 if test x${enable_version_specific_runtime_libs} = xyes; then
789 gcc_gxx_include_dir='${libsubdir}/include/c++'
790 else
791 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
792 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
796 # Determine the host, build, and target systems
797 ac_aux_dir=
798 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
799 if test -f $ac_dir/install-sh; then
800 ac_aux_dir=$ac_dir
801 ac_install_sh="$ac_aux_dir/install-sh -c"
802 break
803 elif test -f $ac_dir/install.sh; then
804 ac_aux_dir=$ac_dir
805 ac_install_sh="$ac_aux_dir/install.sh -c"
806 break
808 done
809 if test -z "$ac_aux_dir"; then
810 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
812 ac_config_guess=$ac_aux_dir/config.guess
813 ac_config_sub=$ac_aux_dir/config.sub
814 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
817 # Do some error checking and defaulting for the host and target type.
818 # The inputs are:
819 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
821 # The rules are:
822 # 1. You are not allowed to specify --host, --target, and nonopt at the
823 # same time.
824 # 2. Host defaults to nonopt.
825 # 3. If nonopt is not specified, then host defaults to the current host,
826 # as determined by config.guess.
827 # 4. Target and build default to nonopt.
828 # 5. If nonopt is not specified, then target and build default to host.
830 # The aliases save the names the user supplied, while $host etc.
831 # will get canonicalized.
832 case $host---$target---$nonopt in
833 NONE---*---* | *---NONE---* | *---*---NONE) ;;
834 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
835 esac
838 # Make sure we can run config.sub.
839 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
840 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
843 echo $ac_n "checking host system type""... $ac_c" 1>&6
844 echo "configure:845: checking host system type" >&5
846 host_alias=$host
847 case "$host_alias" in
848 NONE)
849 case $nonopt in
850 NONE)
851 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
852 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
853 fi ;;
854 *) host_alias=$nonopt ;;
855 esac ;;
856 esac
858 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
859 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
860 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
861 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
862 echo "$ac_t""$host" 1>&6
864 echo $ac_n "checking target system type""... $ac_c" 1>&6
865 echo "configure:866: checking target system type" >&5
867 target_alias=$target
868 case "$target_alias" in
869 NONE)
870 case $nonopt in
871 NONE) target_alias=$host_alias ;;
872 *) target_alias=$nonopt ;;
873 esac ;;
874 esac
876 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
877 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
878 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
879 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
880 echo "$ac_t""$target" 1>&6
882 echo $ac_n "checking build system type""... $ac_c" 1>&6
883 echo "configure:884: checking build system type" >&5
885 build_alias=$build
886 case "$build_alias" in
887 NONE)
888 case $nonopt in
889 NONE) build_alias=$host_alias ;;
890 *) build_alias=$nonopt ;;
891 esac ;;
892 esac
894 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
895 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
896 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
897 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
898 echo "$ac_t""$build" 1>&6
900 test "$host_alias" != "$target_alias" &&
901 test "$program_prefix$program_suffix$program_transform_name" = \
902 NONENONEs,x,x, &&
903 program_prefix=${target_alias}-
906 # Set program_transform_name
907 if test "$program_transform_name" = s,x,x,; then
908 program_transform_name=
909 else
910 # Double any \ or $. echo might interpret backslashes.
911 cat <<\EOF_SED > conftestsed
912 s,\\,\\\\,g; s,\$,$$,g
913 EOF_SED
914 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
915 rm -f conftestsed
917 test "$program_prefix" != NONE &&
918 program_transform_name="s,^,${program_prefix},; $program_transform_name"
919 # Use a double $ so make ignores it.
920 test "$program_suffix" != NONE &&
921 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
923 # sed with no file args requires a program.
924 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
927 # Find the native compiler
928 # Extract the first word of "gcc", so it can be a program name with args.
929 set dummy gcc; ac_word=$2
930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931 echo "configure:932: checking for $ac_word" >&5
932 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
933 echo $ac_n "(cached) $ac_c" 1>&6
934 else
935 if test -n "$CC"; then
936 ac_cv_prog_CC="$CC" # Let the user override the test.
937 else
938 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
939 ac_dummy="$PATH"
940 for ac_dir in $ac_dummy; do
941 test -z "$ac_dir" && ac_dir=.
942 if test -f $ac_dir/$ac_word; then
943 ac_cv_prog_CC="gcc"
944 break
946 done
947 IFS="$ac_save_ifs"
950 CC="$ac_cv_prog_CC"
951 if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
953 else
954 echo "$ac_t""no" 1>&6
957 if test -z "$CC"; then
958 # Extract the first word of "cc", so it can be a program name with args.
959 set dummy cc; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964 else
965 if test -n "$CC"; then
966 ac_cv_prog_CC="$CC" # Let the user override the test.
967 else
968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
969 ac_prog_rejected=no
970 ac_dummy="$PATH"
971 for ac_dir in $ac_dummy; do
972 test -z "$ac_dir" && ac_dir=.
973 if test -f $ac_dir/$ac_word; then
974 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
975 ac_prog_rejected=yes
976 continue
978 ac_cv_prog_CC="cc"
979 break
981 done
982 IFS="$ac_save_ifs"
983 if test $ac_prog_rejected = yes; then
984 # We found a bogon in the path, so make sure we never use it.
985 set dummy $ac_cv_prog_CC
986 shift
987 if test $# -gt 0; then
988 # We chose a different compiler from the bogus one.
989 # However, it has the same basename, so the bogon will be chosen
990 # first if we set CC to just the basename; use the full file name.
991 shift
992 set dummy "$ac_dir/$ac_word" "$@"
993 shift
994 ac_cv_prog_CC="$@"
999 CC="$ac_cv_prog_CC"
1000 if test -n "$CC"; then
1001 echo "$ac_t""$CC" 1>&6
1002 else
1003 echo "$ac_t""no" 1>&6
1006 if test -z "$CC"; then
1007 case "`uname -s`" in
1008 *win32* | *WIN32*)
1009 # Extract the first word of "cl", so it can be a program name with args.
1010 set dummy cl; ac_word=$2
1011 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1012 echo "configure:1013: checking for $ac_word" >&5
1013 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
1015 else
1016 if test -n "$CC"; then
1017 ac_cv_prog_CC="$CC" # Let the user override the test.
1018 else
1019 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1020 ac_dummy="$PATH"
1021 for ac_dir in $ac_dummy; do
1022 test -z "$ac_dir" && ac_dir=.
1023 if test -f $ac_dir/$ac_word; then
1024 ac_cv_prog_CC="cl"
1025 break
1027 done
1028 IFS="$ac_save_ifs"
1031 CC="$ac_cv_prog_CC"
1032 if test -n "$CC"; then
1033 echo "$ac_t""$CC" 1>&6
1034 else
1035 echo "$ac_t""no" 1>&6
1038 esac
1040 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1043 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1046 ac_ext=c
1047 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1048 ac_cpp='$CPP $CPPFLAGS'
1049 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1050 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1051 cross_compiling=$ac_cv_prog_cc_cross
1053 cat > conftest.$ac_ext << EOF
1055 #line 1056 "configure"
1056 #include "confdefs.h"
1058 main(){return(0);}
1060 if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1061 ac_cv_prog_cc_works=yes
1062 # If we can't run a trivial program, we are probably using a cross compiler.
1063 if (./conftest; exit) 2>/dev/null; then
1064 ac_cv_prog_cc_cross=no
1065 else
1066 ac_cv_prog_cc_cross=yes
1068 else
1069 echo "configure: failed program was:" >&5
1070 cat conftest.$ac_ext >&5
1071 ac_cv_prog_cc_works=no
1073 rm -fr conftest*
1074 ac_ext=c
1075 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1076 ac_cpp='$CPP $CPPFLAGS'
1077 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1078 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1079 cross_compiling=$ac_cv_prog_cc_cross
1081 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1082 if test $ac_cv_prog_cc_works = no; then
1083 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1085 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1086 echo "configure:1087: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1087 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1088 cross_compiling=$ac_cv_prog_cc_cross
1090 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether we are using GNU C" >&5
1092 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1093 echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095 cat > conftest.c <<EOF
1096 #ifdef __GNUC__
1097 yes;
1098 #endif
1100 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1101 ac_cv_prog_gcc=yes
1102 else
1103 ac_cv_prog_gcc=no
1107 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1109 if test $ac_cv_prog_gcc = yes; then
1110 GCC=yes
1111 else
1112 GCC=
1115 ac_test_CFLAGS="${CFLAGS+set}"
1116 ac_save_CFLAGS="$CFLAGS"
1117 CFLAGS=
1118 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1119 echo "configure:1120: checking whether ${CC-cc} accepts -g" >&5
1120 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1121 echo $ac_n "(cached) $ac_c" 1>&6
1122 else
1123 echo 'void f(){}' > conftest.c
1124 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1125 ac_cv_prog_cc_g=yes
1126 else
1127 ac_cv_prog_cc_g=no
1129 rm -f conftest*
1133 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1134 if test "$ac_test_CFLAGS" = set; then
1135 CFLAGS="$ac_save_CFLAGS"
1136 elif test $ac_cv_prog_cc_g = yes; then
1137 if test "$GCC" = yes; then
1138 CFLAGS="-g -O2"
1139 else
1140 CFLAGS="-g"
1142 else
1143 if test "$GCC" = yes; then
1144 CFLAGS="-O2"
1145 else
1146 CFLAGS=
1150 if test "x$CC" != xcc; then
1151 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1152 echo "configure:1153: checking whether $CC and cc understand -c and -o together" >&5
1153 else
1154 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1155 echo "configure:1156: checking whether cc understands -c and -o together" >&5
1157 set dummy $CC; ac_cc="`echo $2 |
1158 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1159 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162 echo 'foo(){}' > conftest.c
1163 # Make sure it works both with $CC and with simple cc.
1164 # We do the test twice because some compilers refuse to overwrite an
1165 # existing .o file with -o, though they will create one.
1166 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1167 if { (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1168 test -f conftest.o && { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1169 then
1170 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1171 if test "x$CC" != xcc; then
1172 # Test first that cc exists at all.
1173 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1174 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1175 if { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1176 test -f conftest.o && { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1177 then
1178 # cc works too.
1180 else
1181 # cc exists but doesn't like -o.
1182 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1186 else
1187 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1189 rm -f conftest*
1192 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1193 echo "$ac_t""yes" 1>&6
1194 else
1195 echo "$ac_t""no" 1>&6
1196 cat >> confdefs.h <<\EOF
1197 #define NO_MINUS_C_MINUS_O 1
1202 # autoconf is lame and doesn't give us any substitution variable for this.
1203 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1204 NO_MINUS_C_MINUS_O=yes
1205 else
1206 OUTPUT_OPTION='-o $@'
1211 # See if GNAT has been installed
1212 if test $host != $build; then
1213 ac_tool_prefix=${host_alias}-
1214 else
1215 ac_tool_prefix=
1219 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
1220 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
1221 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1222 echo "configure:1223: checking for $ac_word" >&5
1223 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1225 else
1226 if test -n "$GNATBIND"; then
1227 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1228 else
1229 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1230 ac_dummy="$PATH"
1231 for ac_dir in $ac_dummy; do
1232 test -z "$ac_dir" && ac_dir=.
1233 if test -f $ac_dir/$ac_word; then
1234 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
1235 break
1237 done
1238 IFS="$ac_save_ifs"
1241 GNATBIND="$ac_cv_prog_GNATBIND"
1242 if test -n "$GNATBIND"; then
1243 echo "$ac_t""$GNATBIND" 1>&6
1244 else
1245 echo "$ac_t""no" 1>&6
1249 if test -z "$ac_cv_prog_GNATBIND"; then
1250 if test -n "$ac_tool_prefix"; then
1251 # Extract the first word of "gnatbind", so it can be a program name with args.
1252 set dummy gnatbind; ac_word=$2
1253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1254 echo "configure:1255: checking for $ac_word" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258 if test -n "$GNATBIND"; then
1259 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
1260 else
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_GNATBIND="gnatbind"
1267 break
1269 done
1270 IFS="$ac_save_ifs"
1271 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
1274 GNATBIND="$ac_cv_prog_GNATBIND"
1275 if test -n "$GNATBIND"; then
1276 echo "$ac_t""$GNATBIND" 1>&6
1277 else
1278 echo "$ac_t""no" 1>&6
1281 else
1282 GNATBIND="no"
1286 echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
1287 echo "configure:1288: checking for compiler driver that understands Ada" >&5
1288 if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290 else
1291 cat >conftest.adb <<EOF
1292 procedure conftest is begin null; end conftest;
1294 gcc_cv_prog_adac=no
1295 # Have to do ac_tool_prefix and user overrides by hand.
1296 user_adac=$ADAC
1297 user_cc=$CC
1298 for cand in ${ac_tool_prefix}$user_adac $user_adac \
1299 ${ac_tool_prefix}$user_cc $user_cc \
1300 ${ac_tool_prefix}gcc gcc \
1301 ${ac_tool_prefix}cc cc \
1302 ${ac_tool_prefix}gnatgcc gnatgcc \
1303 ${ac_tool_prefix}gnatcc gnatcc \
1304 ${ac_tool_prefix}adagcc adagcc \
1305 ${ac_tool_prefix}adacc adacc ; do
1306 # There is a bug in all released versions of GCC which causes the
1307 # driver to exit successfully when the appropriate language module
1308 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
1309 # Therefore we must check for the error message as well as an
1310 # unsuccessful exit.
1311 errors=`($cand -c conftest.adb) 2>&1 || echo failure`
1312 if test x"$errors" = x; then
1313 gcc_cv_prog_adac=$cand
1314 break
1316 done
1317 rm -f conftest.*
1320 echo "$ac_t""$gcc_cv_prog_adac" 1>&6
1321 ADAC=$gcc_cv_prog_adac
1324 if test x$GNATBIND != xno && test x$ADAC != xno; then
1325 have_gnat=yes
1326 else
1327 have_gnat=no
1331 echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
1332 echo "configure:1333: checking whether ${CC-cc} accepts -Wno-long-long" >&5
1333 if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1334 echo $ac_n "(cached) $ac_c" 1>&6
1335 else
1336 save_CFLAGS="$CFLAGS"
1337 CFLAGS="-Wno-long-long"
1338 cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1342 int main() {
1344 ; return 0; }
1346 if { (eval echo configure:1347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1347 rm -rf conftest*
1348 ac_cv_prog_cc_no_long_long=yes
1349 else
1350 echo "configure: failed program was:" >&5
1351 cat conftest.$ac_ext >&5
1352 rm -rf conftest*
1353 ac_cv_prog_cc_no_long_long=no
1355 rm -f conftest*
1356 CFLAGS="$save_CFLAGS"
1359 echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1361 if test x$have_gnat != xno ; then
1362 echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
1363 echo "configure:1364: checking whether ${ADAC} accepts -Wno-long-long" >&5
1364 if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
1365 echo $ac_n "(cached) $ac_c" 1>&6
1366 else
1367 cat >conftest.adb <<EOF
1368 procedure conftest is begin null; end conftest;
1370 if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
1371 ac_cv_prog_adac_no_long_long=yes
1372 else
1373 ac_cv_prog_adac_no_long_long=no
1375 rm -f conftest*
1378 echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6
1379 else
1380 ac_cv_prog_adac_no_long_long=yes
1383 strict1_warn=
1384 if test $ac_cv_prog_cc_no_long_long = yes && \
1385 test $ac_cv_prog_adac_no_long_long = yes ; then
1386 strict1_warn="-pedantic -Wno-long-long"
1390 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1391 echo "configure:1392: checking how to run the C preprocessor" >&5
1392 # On Suns, sometimes $CPP names a directory.
1393 if test -n "$CPP" && test -d "$CPP"; then
1394 CPP=
1396 if test -z "$CPP"; then
1397 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400 # This must be in double quotes, not single quotes, because CPP may get
1401 # substituted into the Makefile and "${CC-cc}" will confuse make.
1402 CPP="${CC-cc} -E"
1403 # On the NeXT, cc -E runs the code through the compiler's parser,
1404 # not just through cpp.
1405 cat > conftest.$ac_ext <<EOF
1406 #line 1407 "configure"
1407 #include "confdefs.h"
1408 #include <assert.h>
1409 Syntax Error
1411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1412 { (eval echo configure:1413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1414 if test -z "$ac_err"; then
1416 else
1417 echo "$ac_err" >&5
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 rm -rf conftest*
1421 CPP="${CC-cc} -E -traditional-cpp"
1422 cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425 #include <assert.h>
1426 Syntax Error
1428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1429 { (eval echo configure:1430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1431 if test -z "$ac_err"; then
1433 else
1434 echo "$ac_err" >&5
1435 echo "configure: failed program was:" >&5
1436 cat conftest.$ac_ext >&5
1437 rm -rf conftest*
1438 CPP="${CC-cc} -nologo -E"
1439 cat > conftest.$ac_ext <<EOF
1440 #line 1441 "configure"
1441 #include "confdefs.h"
1442 #include <assert.h>
1443 Syntax Error
1445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1446 { (eval echo configure:1447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1448 if test -z "$ac_err"; then
1450 else
1451 echo "$ac_err" >&5
1452 echo "configure: failed program was:" >&5
1453 cat conftest.$ac_ext >&5
1454 rm -rf conftest*
1455 CPP=/lib/cpp
1457 rm -f conftest*
1459 rm -f conftest*
1461 rm -f conftest*
1462 ac_cv_prog_CPP="$CPP"
1464 CPP="$ac_cv_prog_CPP"
1465 else
1466 ac_cv_prog_CPP="$CPP"
1468 echo "$ac_t""$CPP" 1>&6
1470 echo $ac_n "checking for inline""... $ac_c" 1>&6
1471 echo "configure:1472: checking for inline" >&5
1472 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1473 echo $ac_n "(cached) $ac_c" 1>&6
1474 else
1475 ac_cv_c_inline=no
1476 for ac_kw in inline __inline__ __inline; do
1477 cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1481 int main() {
1482 } $ac_kw foo() {
1483 ; return 0; }
1485 if { (eval echo configure:1486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1486 rm -rf conftest*
1487 ac_cv_c_inline=$ac_kw; break
1488 else
1489 echo "configure: failed program was:" >&5
1490 cat conftest.$ac_ext >&5
1492 rm -f conftest*
1493 done
1497 echo "$ac_t""$ac_cv_c_inline" 1>&6
1498 case "$ac_cv_c_inline" in
1499 inline | yes) ;;
1500 no) cat >> confdefs.h <<\EOF
1501 #define inline
1504 *) cat >> confdefs.h <<EOF
1505 #define inline $ac_cv_c_inline
1508 esac
1510 echo $ac_n "checking for volatile""... $ac_c" 1>&6
1511 echo "configure:1512: checking for volatile" >&5
1512 if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
1514 else
1515 cat > conftest.$ac_ext <<EOF
1516 #line 1517 "configure"
1517 #include "confdefs.h"
1519 int main() {
1520 volatile int foo;
1521 ; return 0; }
1523 if { (eval echo configure:1524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1524 rm -rf conftest*
1525 gcc_cv_c_volatile=yes
1526 else
1527 echo "configure: failed program was:" >&5
1528 cat conftest.$ac_ext >&5
1529 rm -rf conftest*
1530 gcc_cv_c_volatile=no
1532 rm -f conftest*
1535 echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1536 if test $gcc_cv_c_volatile = yes ; then
1537 cat >> confdefs.h <<\EOF
1538 #define HAVE_VOLATILE 1
1544 echo $ac_n "checking for long double""... $ac_c" 1>&6
1545 echo "configure:1546: checking for long double" >&5
1546 if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548 else
1549 if test "$GCC" = yes; then
1550 gcc_cv_c_long_double=yes
1551 else
1552 cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1556 int main() {
1557 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
1558 long double foo = 0.0;
1559 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1560 switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1561 ; return 0; }
1563 if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1564 rm -rf conftest*
1565 gcc_cv_c_long_double=yes
1566 else
1567 echo "configure: failed program was:" >&5
1568 cat conftest.$ac_ext >&5
1569 rm -rf conftest*
1570 gcc_cv_c_long_double=no
1572 rm -f conftest*
1576 echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1577 if test $gcc_cv_c_long_double = yes; then
1578 cat >> confdefs.h <<\EOF
1579 #define HAVE_LONG_DOUBLE 1
1584 echo $ac_n "checking for long long int""... $ac_c" 1>&6
1585 echo "configure:1586: checking for long long int" >&5
1586 if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1587 echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1593 int main() {
1594 long long int i;
1595 ; return 0; }
1597 if { (eval echo configure:1598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1598 rm -rf conftest*
1599 ac_cv_c_long_long=yes
1600 else
1601 echo "configure: failed program was:" >&5
1602 cat conftest.$ac_ext >&5
1603 rm -rf conftest*
1604 ac_cv_c_long_long=no
1606 rm -f conftest*
1609 echo "$ac_t""$ac_cv_c_long_long" 1>&6
1610 if test $ac_cv_c_long_long = yes; then
1611 cat >> confdefs.h <<\EOF
1612 #define HAVE_LONG_LONG 1
1616 echo $ac_n "checking for __int64""... $ac_c" 1>&6
1617 echo "configure:1618: checking for __int64" >&5
1618 if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620 else
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1625 int main() {
1626 __int64 i;
1627 ; return 0; }
1629 if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1630 rm -rf conftest*
1631 ac_cv_c___int64=yes
1632 else
1633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
1635 rm -rf conftest*
1636 ac_cv_c___int64=no
1638 rm -f conftest*
1641 echo "$ac_t""$ac_cv_c___int64" 1>&6
1642 if test $ac_cv_c___int64 = yes; then
1643 cat >> confdefs.h <<\EOF
1644 #define HAVE___INT64 1
1649 echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
1650 echo "configure:1651: checking for built-in _Bool" >&5
1651 if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1652 echo $ac_n "(cached) $ac_c" 1>&6
1653 else
1654 cat > conftest.$ac_ext <<EOF
1655 #line 1656 "configure"
1656 #include "confdefs.h"
1658 int main() {
1659 _Bool foo;
1660 ; return 0; }
1662 if { (eval echo configure:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1663 rm -rf conftest*
1664 gcc_cv_c__bool=yes
1665 else
1666 echo "configure: failed program was:" >&5
1667 cat conftest.$ac_ext >&5
1668 rm -rf conftest*
1669 gcc_cv_c__bool=no
1671 rm -f conftest*
1675 echo "$ac_t""$gcc_cv_c__bool" 1>&6
1676 if test $gcc_cv_c__bool = yes; then
1677 cat >> confdefs.h <<\EOF
1678 #define HAVE__BOOL 1
1684 # sizeof(char) is 1 by definition.
1685 echo $ac_n "checking size of short""... $ac_c" 1>&6
1686 echo "configure:1687: checking size of short" >&5
1687 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1688 echo $ac_n "(cached) $ac_c" 1>&6
1689 else
1690 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 #include "confdefs.h"
1695 #include <sys/types.h>
1698 int main() {
1699 switch (0) case 0: case (sizeof (short) == $ac_size):;
1700 ; return 0; }
1702 if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1703 rm -rf conftest*
1704 ac_cv_sizeof_short=$ac_size
1705 else
1706 echo "configure: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1709 rm -f conftest*
1710 if test x$ac_cv_sizeof_short != x ; then break; fi
1711 done
1715 if test x$ac_cv_sizeof_short = x ; then
1716 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1718 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1719 cat >> confdefs.h <<EOF
1720 #define SIZEOF_SHORT $ac_cv_sizeof_short
1724 echo $ac_n "checking size of int""... $ac_c" 1>&6
1725 echo "configure:1726: checking size of int" >&5
1726 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1728 else
1729 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 #include "confdefs.h"
1734 #include <sys/types.h>
1737 int main() {
1738 switch (0) case 0: case (sizeof (int) == $ac_size):;
1739 ; return 0; }
1741 if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1742 rm -rf conftest*
1743 ac_cv_sizeof_int=$ac_size
1744 else
1745 echo "configure: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1748 rm -f conftest*
1749 if test x$ac_cv_sizeof_int != x ; then break; fi
1750 done
1754 if test x$ac_cv_sizeof_int = x ; then
1755 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1757 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1758 cat >> confdefs.h <<EOF
1759 #define SIZEOF_INT $ac_cv_sizeof_int
1763 echo $ac_n "checking size of long""... $ac_c" 1>&6
1764 echo "configure:1765: checking size of long" >&5
1765 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1769 cat > conftest.$ac_ext <<EOF
1770 #line 1771 "configure"
1771 #include "confdefs.h"
1772 #include "confdefs.h"
1773 #include <sys/types.h>
1776 int main() {
1777 switch (0) case 0: case (sizeof (long) == $ac_size):;
1778 ; return 0; }
1780 if { (eval echo configure:1781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1781 rm -rf conftest*
1782 ac_cv_sizeof_long=$ac_size
1783 else
1784 echo "configure: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1787 rm -f conftest*
1788 if test x$ac_cv_sizeof_long != x ; then break; fi
1789 done
1793 if test x$ac_cv_sizeof_long = x ; then
1794 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1796 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1797 cat >> confdefs.h <<EOF
1798 #define SIZEOF_LONG $ac_cv_sizeof_long
1802 if test $ac_cv_c_long_long = yes; then
1803 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1804 echo "configure:1805: checking size of long long" >&5
1805 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1809 cat > conftest.$ac_ext <<EOF
1810 #line 1811 "configure"
1811 #include "confdefs.h"
1812 #include "confdefs.h"
1813 #include <sys/types.h>
1816 int main() {
1817 switch (0) case 0: case (sizeof (long long) == $ac_size):;
1818 ; return 0; }
1820 if { (eval echo configure:1821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1821 rm -rf conftest*
1822 ac_cv_sizeof_long_long=$ac_size
1823 else
1824 echo "configure: failed program was:" >&5
1825 cat conftest.$ac_ext >&5
1827 rm -f conftest*
1828 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1829 done
1833 if test x$ac_cv_sizeof_long_long = x ; then
1834 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1836 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1837 cat >> confdefs.h <<EOF
1838 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1843 if test $ac_cv_c___int64 = yes; then
1844 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1845 echo "configure:1846: checking size of __int64" >&5
1846 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1847 echo $ac_n "(cached) $ac_c" 1>&6
1848 else
1849 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853 #include "confdefs.h"
1854 #include <sys/types.h>
1857 int main() {
1858 switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1859 ; return 0; }
1861 if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1862 rm -rf conftest*
1863 ac_cv_sizeof___int64=$ac_size
1864 else
1865 echo "configure: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1868 rm -f conftest*
1869 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1870 done
1874 if test x$ac_cv_sizeof___int64 = x ; then
1875 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1877 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1878 cat >> confdefs.h <<EOF
1879 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1885 echo $ac_n "checking execution character set""... $ac_c" 1>&6
1886 echo "configure:1887: checking execution character set" >&5
1887 if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1888 echo $ac_n "(cached) $ac_c" 1>&6
1889 else
1890 cat > conftest.$ac_ext <<EOF
1891 #line 1892 "configure"
1892 #include "confdefs.h"
1893 #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1894 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1895 ASCII
1896 #endif
1898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1899 egrep "ASCII" >/dev/null 2>&1; then
1900 rm -rf conftest*
1901 ac_cv_c_charset=ASCII
1903 rm -f conftest*
1905 if test x${ac_cv_c_charset+set} != xset; then
1906 cat > conftest.$ac_ext <<EOF
1907 #line 1908 "configure"
1908 #include "confdefs.h"
1909 #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1910 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1911 EBCDIC
1912 #endif
1914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1915 egrep "EBCDIC" >/dev/null 2>&1; then
1916 rm -rf conftest*
1917 ac_cv_c_charset=EBCDIC
1919 rm -f conftest*
1922 if test x${ac_cv_c_charset+set} != xset; then
1923 ac_cv_c_charset=unknown
1927 echo "$ac_t""$ac_cv_c_charset" 1>&6
1928 if test $ac_cv_c_charset = unknown; then
1929 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1930 elif test $ac_cv_c_charset = EBCDIC; then
1931 cat >> confdefs.h <<\EOF
1932 #define HOST_EBCDIC 1
1937 # If the native compiler is GCC, we can enable warnings even in stage1.
1938 # That's useful for people building cross-compilers, or just running a
1939 # quick `make'.
1940 warn_cflags=
1941 if test "x$GCC" = "xyes"; then
1942 warn_cflags='$(GCC_WARN_CFLAGS)'
1946 # Determine whether or not multilibs are enabled.
1947 # Check whether --enable-multilib or --disable-multilib was given.
1948 if test "${enable_multilib+set}" = set; then
1949 enableval="$enable_multilib"
1951 else
1952 enable_multilib=yes
1957 # Enable expensive internal checks
1958 # Check whether --enable-checking or --disable-checking was given.
1959 if test "${enable_checking+set}" = set; then
1960 enableval="$enable_checking"
1961 ac_checking=
1962 ac_tree_checking=
1963 ac_rtl_checking=
1964 ac_rtlflag_checking=
1965 ac_gc_checking=
1966 ac_gc_always_collect=
1967 case "${enableval}" in
1968 yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
1969 ac_rtlflag_checking=1 ;;
1970 no) ;;
1971 *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
1972 set fnord $enableval; shift
1973 IFS="$ac_save_IFS"
1974 for check
1976 case $check in
1977 misc) ac_checking=1 ;;
1978 tree) ac_tree_checking=1 ;;
1979 rtlflag) ac_rtlflag_checking=1 ;;
1980 rtl) ac_rtl_checking=1 ;;
1981 gc) ac_gc_checking=1 ;;
1982 gcac) ac_gc_always_collect=1 ;;
1983 valgrind) ac_checking_valgrind=1 ;;
1984 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
1985 esac
1986 done
1988 esac
1990 else
1991 # Enable some checks by default for development versions of GCC
1992 ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
1995 nocommon_flag=""
1996 if test x$ac_checking != x ; then
1997 cat >> confdefs.h <<\EOF
1998 #define ENABLE_CHECKING 1
2001 nocommon_flag=-fno-common
2004 if test x$ac_tree_checking != x ; then
2005 cat >> confdefs.h <<\EOF
2006 #define ENABLE_TREE_CHECKING 1
2010 if test x$ac_rtl_checking != x ; then
2011 cat >> confdefs.h <<\EOF
2012 #define ENABLE_RTL_CHECKING 1
2016 if test x$ac_rtlflag_checking != x ; then
2017 cat >> confdefs.h <<\EOF
2018 #define ENABLE_RTL_FLAG_CHECKING 1
2022 if test x$ac_gc_checking != x ; then
2023 cat >> confdefs.h <<\EOF
2024 #define ENABLE_GC_CHECKING 1
2028 if test x$ac_gc_always_collect != x ; then
2029 cat >> confdefs.h <<\EOF
2030 #define ENABLE_GC_ALWAYS_COLLECT 1
2034 valgrind_path_defines=
2035 valgrind_command=
2036 if test x$ac_checking_valgrind != x ; then
2037 # It is certainly possible that there's valgrind but no valgrind.h.
2038 # GCC relies on making annotations so we must have both.
2039 ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'`
2040 echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6
2041 echo "configure:2042: checking for valgrind.h" >&5
2042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2043 echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <valgrind.h>
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054 rm -rf conftest*
2055 eval "ac_cv_header_$ac_safe=yes"
2056 else
2057 echo "$ac_err" >&5
2058 echo "configure: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2060 rm -rf conftest*
2061 eval "ac_cv_header_$ac_safe=no"
2063 rm -f conftest*
2065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2066 echo "$ac_t""yes" 1>&6
2067 have_valgrind_h=yes
2068 else
2069 echo "$ac_t""no" 1>&6
2070 have_valgrind_h=no
2073 # Extract the first word of "valgrind", so it can be a program name with args.
2074 set dummy valgrind; ac_word=$2
2075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2076 echo "configure:2077: checking for $ac_word" >&5
2077 if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
2079 else
2080 case "$valgrind_path" in
2082 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
2085 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2086 for ac_dir in $PATH; do
2087 test -z "$ac_dir" && ac_dir=.
2088 if test -f $ac_dir/$ac_word; then
2089 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
2090 ac_cv_path_valgrind_path="$ac_dir/$ac_word"
2091 break
2094 done
2095 IFS="$ac_save_ifs"
2097 esac
2099 valgrind_path="$ac_cv_path_valgrind_path"
2100 if test -n "$valgrind_path"; then
2101 echo "$ac_t""$valgrind_path" 1>&6
2102 else
2103 echo "$ac_t""no" 1>&6
2106 if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
2107 { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
2109 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
2110 valgrind_command="$valgrind_path -q"
2111 cat >> confdefs.h <<\EOF
2112 #define ENABLE_VALGRIND_CHECKING 1
2119 # Enable code coverage collection
2120 # Check whether --enable-coverage or --disable-coverage was given.
2121 if test "${enable_coverage+set}" = set; then
2122 enableval="$enable_coverage"
2123 case "${enableval}" in
2124 yes|noopt)
2125 coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1"
2127 opt)
2128 coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2"
2131 { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; }
2133 esac
2134 else
2135 coverage_flags=""
2140 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
2141 if test "${with_cpp_install_dir+set}" = set; then
2142 withval="$with_cpp_install_dir"
2143 if test x$withval = xyes; then
2144 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
2145 elif test x$withval != xno; then
2146 cpp_install_dir=$withval
2151 # Enable __cxa_atexit for C++.
2152 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
2153 if test "${enable___cxa_atexit+set}" = set; then
2154 enableval="$enable___cxa_atexit"
2158 if test x$enable___cxa_atexit = xyes; then
2159 cat >> confdefs.h <<\EOF
2160 #define DEFAULT_USE_CXA_ATEXIT 1
2165 # Enable Multibyte Characters for C/C++
2166 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
2167 if test "${enable_c_mbchar+set}" = set; then
2168 enableval="$enable_c_mbchar"
2169 if test x$enable_c_mbchar != xno; then
2170 cat >> confdefs.h <<\EOF
2171 #define MULTIBYTE_CHARS 1
2178 # Enable threads
2179 # Pass with no value to take the default
2180 # Pass with a value to specify a thread package
2181 # Check whether --enable-threads or --disable-threads was given.
2182 if test "${enable_threads+set}" = set; then
2183 enableval="$enable_threads"
2185 else
2186 enable_threads=''
2190 enable_threads_flag=$enable_threads
2191 # Check if a valid thread package
2192 case x${enable_threads_flag} in
2193 x | xno)
2194 # No threads
2195 target_thread_file='single'
2197 xyes)
2198 # default
2199 target_thread_file=''
2201 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
2202 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
2203 target_thread_file=$enable_threads_flag
2206 echo "$enable_threads is an unknown thread package" 1>&2
2207 exit 1
2209 esac
2211 # Check whether --enable-objc-gc or --disable-objc-gc was given.
2212 if test "${enable_objc_gc+set}" = set; then
2213 enableval="$enable_objc_gc"
2214 if test x$enable_objc_gc = xno; then
2215 objc_boehm_gc=''
2216 else
2217 objc_boehm_gc=1
2219 else
2220 objc_boehm_gc=''
2224 # Check whether --with-dwarf2 or --without-dwarf2 was given.
2225 if test "${with_dwarf2+set}" = set; then
2226 withval="$with_dwarf2"
2227 dwarf2="$with_dwarf2"
2228 else
2229 dwarf2=no
2233 # Check whether --enable-shared or --disable-shared was given.
2234 if test "${enable_shared+set}" = set; then
2235 enableval="$enable_shared"
2237 case $enable_shared in
2238 yes | no) ;;
2240 enable_shared=no
2241 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2242 for pkg in $enableval; do
2243 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
2244 enable_shared=yes
2246 done
2247 IFS="$ac_save_ifs"
2249 esac
2251 else
2252 enable_shared=yes
2257 # Check whether --with-sysroot or --without-sysroot was given.
2258 if test "${with_sysroot+set}" = set; then
2259 withval="$with_sysroot"
2261 case ${with_sysroot} in
2262 yes) TARGET_SYSTEM_ROOT='${gcc_tooldir}/sys-root' ;;
2263 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
2264 esac
2266 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
2267 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
2269 else
2271 TARGET_SYSTEM_ROOT=
2272 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
2273 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
2281 # Stage specific cflags for build.
2282 stage1_cflags=
2283 case $build in
2284 vax-*-*)
2285 if test x$GCC = xyes
2286 then
2287 stage1_cflags="-Wa,-J"
2288 else
2289 stage1_cflags="-J"
2292 powerpc-*-darwin*)
2293 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
2294 # sources; use -no-cpp-precomp to get to GNU cpp.
2295 # Apple's GCC has bugs in designated initializer handling, so disable
2296 # that too.
2297 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
2299 esac
2302 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2303 echo "configure:2304: checking whether ${MAKE-make} sets \${MAKE}" >&5
2304 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2305 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2306 echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308 cat > conftestmake <<\EOF
2309 all:
2310 @echo 'ac_maketemp="${MAKE}"'
2312 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2313 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2314 if test -n "$ac_maketemp"; then
2315 eval ac_cv_prog_make_${ac_make}_set=yes
2316 else
2317 eval ac_cv_prog_make_${ac_make}_set=no
2319 rm -f conftestmake
2321 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2322 echo "$ac_t""yes" 1>&6
2323 SET_MAKE=
2324 else
2325 echo "$ac_t""no" 1>&6
2326 SET_MAKE="MAKE=${MAKE-make}"
2330 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
2331 echo "configure:2332: checking whether a default assembler was specified" >&5
2332 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2333 if test x"$gas_flag" = x"no"; then
2334 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
2335 else
2336 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
2338 else
2339 echo "$ac_t""no" 1>&6
2342 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
2343 echo "configure:2344: checking whether a default linker was specified" >&5
2344 if test x"${DEFAULT_LINKER+set}" = x"set"; then
2345 if test x"$gnu_ld_flag" = x"no"; then
2346 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
2347 else
2348 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
2350 else
2351 echo "$ac_t""no" 1>&6
2354 echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
2355 echo "configure:2356: checking for GNU C library" >&5
2356 if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2357 echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <features.h>
2363 int main() {
2365 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2366 #error Not a GNU C library system
2367 #endif
2368 ; return 0; }
2370 if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2371 rm -rf conftest*
2372 gcc_cv_glibc=yes
2373 else
2374 echo "configure: failed program was:" >&5
2375 cat conftest.$ac_ext >&5
2376 rm -rf conftest*
2377 gcc_cv_glibc=no
2379 rm -f conftest*
2382 echo "$ac_t""$gcc_cv_glibc" 1>&6
2383 if test $gcc_cv_glibc = yes; then
2384 cat >> confdefs.h <<\EOF
2385 #define _GNU_SOURCE 1
2390 # Find some useful tools
2391 for ac_prog in gawk mawk nawk awk
2393 # Extract the first word of "$ac_prog", so it can be a program name with args.
2394 set dummy $ac_prog; ac_word=$2
2395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2396 echo "configure:2397: checking for $ac_word" >&5
2397 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2398 echo $ac_n "(cached) $ac_c" 1>&6
2399 else
2400 if test -n "$AWK"; then
2401 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2402 else
2403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2404 ac_dummy="$PATH"
2405 for ac_dir in $ac_dummy; do
2406 test -z "$ac_dir" && ac_dir=.
2407 if test -f $ac_dir/$ac_word; then
2408 ac_cv_prog_AWK="$ac_prog"
2409 break
2411 done
2412 IFS="$ac_save_ifs"
2415 AWK="$ac_cv_prog_AWK"
2416 if test -n "$AWK"; then
2417 echo "$ac_t""$AWK" 1>&6
2418 else
2419 echo "$ac_t""no" 1>&6
2422 test -n "$AWK" && break
2423 done
2425 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2426 echo "configure:2427: checking whether ln works" >&5
2427 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430 rm -f conftestdata_t
2431 echo >conftestdata_f
2432 if ln conftestdata_f conftestdata_t 2>/dev/null
2433 then
2434 gcc_cv_prog_LN="ln"
2435 else
2436 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2437 then
2438 gcc_cv_prog_LN="ln -s"
2439 else
2440 gcc_cv_prog_LN=cp
2443 rm -f conftestdata_f conftestdata_t
2446 LN="$gcc_cv_prog_LN"
2447 if test "$gcc_cv_prog_LN" = "ln"; then
2448 echo "$ac_t""yes" 1>&6
2449 else
2450 if test "$gcc_cv_prog_LN" = "ln -s"; then
2451 echo "$ac_t""no, using ln -s" 1>&6
2452 else
2453 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2457 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2458 echo "configure:2459: checking whether ln -s works" >&5
2459 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2460 echo $ac_n "(cached) $ac_c" 1>&6
2461 else
2462 rm -f conftestdata_t
2463 echo >conftestdata_f
2464 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2465 then
2466 gcc_cv_prog_LN_S="ln -s"
2467 else
2468 if ln conftestdata_f conftestdata_t 2>/dev/null
2469 then
2470 gcc_cv_prog_LN_S=ln
2471 else
2472 gcc_cv_prog_LN_S=cp
2475 rm -f conftestdata_f conftestdata_t
2478 LN_S="$gcc_cv_prog_LN_S"
2479 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2480 echo "$ac_t""yes" 1>&6
2481 else
2482 if test "$gcc_cv_prog_LN_S" = "ln"; then
2483 echo "$ac_t""no, using ln" 1>&6
2484 else
2485 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2489 # Extract the first word of "ranlib", so it can be a program name with args.
2490 set dummy ranlib; ac_word=$2
2491 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2492 echo "configure:2493: checking for $ac_word" >&5
2493 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2494 echo $ac_n "(cached) $ac_c" 1>&6
2495 else
2496 if test -n "$RANLIB"; then
2497 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2498 else
2499 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2500 ac_dummy="$PATH"
2501 for ac_dir in $ac_dummy; do
2502 test -z "$ac_dir" && ac_dir=.
2503 if test -f $ac_dir/$ac_word; then
2504 ac_cv_prog_RANLIB="ranlib"
2505 break
2507 done
2508 IFS="$ac_save_ifs"
2509 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2512 RANLIB="$ac_cv_prog_RANLIB"
2513 if test -n "$RANLIB"; then
2514 echo "$ac_t""$RANLIB" 1>&6
2515 else
2516 echo "$ac_t""no" 1>&6
2519 # Find a good install program. We prefer a C program (faster),
2520 # so one script is as good as another. But avoid the broken or
2521 # incompatible versions:
2522 # SysV /etc/install, /usr/sbin/install
2523 # SunOS /usr/etc/install
2524 # IRIX /sbin/install
2525 # AIX /bin/install
2526 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2527 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2528 # ./install, which can be erroneously created by make from ./install.sh.
2529 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2530 echo "configure:2531: checking for a BSD compatible install" >&5
2531 if test -z "$INSTALL"; then
2532 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2533 echo $ac_n "(cached) $ac_c" 1>&6
2534 else
2535 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2536 for ac_dir in $PATH; do
2537 # Account for people who put trailing slashes in PATH elements.
2538 case "$ac_dir/" in
2539 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2541 # OSF1 and SCO ODT 3.0 have their own names for install.
2542 for ac_prog in ginstall scoinst install; do
2543 if test -f $ac_dir/$ac_prog; then
2544 if test $ac_prog = install &&
2545 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2546 # AIX install. It has an incompatible calling convention.
2547 # OSF/1 installbsd also uses dspmsg, but is usable.
2549 else
2550 ac_cv_path_install="$ac_dir/$ac_prog -c"
2551 break 2
2554 done
2556 esac
2557 done
2558 IFS="$ac_save_IFS"
2561 if test "${ac_cv_path_install+set}" = set; then
2562 INSTALL="$ac_cv_path_install"
2563 else
2564 # As a last resort, use the slow shell script. We don't cache a
2565 # path for INSTALL within a source directory, because that will
2566 # break other packages using the cache if that directory is
2567 # removed, or if the path is relative.
2568 INSTALL="$ac_install_sh"
2571 echo "$ac_t""$INSTALL" 1>&6
2573 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2574 # It thinks the first close brace ends the variable substitution.
2575 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2577 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2580 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2581 echo "configure:2582: checking for ANSI C header files" >&5
2582 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2583 echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 #include <stdlib.h>
2589 #include <stdarg.h>
2590 #include <string.h>
2591 #include <float.h>
2593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2594 { (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2596 if test -z "$ac_err"; then
2597 rm -rf conftest*
2598 ac_cv_header_stdc=yes
2599 else
2600 echo "$ac_err" >&5
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603 rm -rf conftest*
2604 ac_cv_header_stdc=no
2606 rm -f conftest*
2608 if test $ac_cv_header_stdc = yes; then
2609 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2610 cat > conftest.$ac_ext <<EOF
2611 #line 2612 "configure"
2612 #include "confdefs.h"
2613 #include <string.h>
2615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2616 egrep "memchr" >/dev/null 2>&1; then
2618 else
2619 rm -rf conftest*
2620 ac_cv_header_stdc=no
2622 rm -f conftest*
2626 if test $ac_cv_header_stdc = yes; then
2627 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2628 cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 #include <stdlib.h>
2633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2634 egrep "free" >/dev/null 2>&1; then
2636 else
2637 rm -rf conftest*
2638 ac_cv_header_stdc=no
2640 rm -f conftest*
2644 if test $ac_cv_header_stdc = yes; then
2645 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2646 if test "$cross_compiling" = yes; then
2648 else
2649 cat > conftest.$ac_ext <<EOF
2650 #line 2651 "configure"
2651 #include "confdefs.h"
2652 #include <ctype.h>
2653 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2654 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2655 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2656 int main () { int i; for (i = 0; i < 256; i++)
2657 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2658 exit (0); }
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2662 then
2664 else
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2667 rm -fr conftest*
2668 ac_cv_header_stdc=no
2670 rm -fr conftest*
2676 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2677 if test $ac_cv_header_stdc = yes; then
2678 cat >> confdefs.h <<\EOF
2679 #define STDC_HEADERS 1
2684 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2685 echo "configure:2686: checking whether time.h and sys/time.h may both be included" >&5
2686 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2687 echo $ac_n "(cached) $ac_c" 1>&6
2688 else
2689 cat > conftest.$ac_ext <<EOF
2690 #line 2691 "configure"
2691 #include "confdefs.h"
2692 #include <sys/types.h>
2693 #include <sys/time.h>
2694 #include <time.h>
2695 int main() {
2696 struct tm *tp;
2697 ; return 0; }
2699 if { (eval echo configure:2700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2700 rm -rf conftest*
2701 ac_cv_header_time=yes
2702 else
2703 echo "configure: failed program was:" >&5
2704 cat conftest.$ac_ext >&5
2705 rm -rf conftest*
2706 ac_cv_header_time=no
2708 rm -f conftest*
2711 echo "$ac_t""$ac_cv_header_time" 1>&6
2712 if test $ac_cv_header_time = yes; then
2713 cat >> confdefs.h <<\EOF
2714 #define TIME_WITH_SYS_TIME 1
2719 echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
2720 echo "configure:2721: checking for working stdbool.h" >&5
2721 if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2722 echo $ac_n "(cached) $ac_c" 1>&6
2723 else
2724 cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727 #include <stdbool.h>
2728 int main() {
2729 bool foo = false;
2730 ; return 0; }
2732 if { (eval echo configure:2733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2733 rm -rf conftest*
2734 ac_cv_header_stdbool_h=yes
2735 else
2736 echo "configure: failed program was:" >&5
2737 cat conftest.$ac_ext >&5
2738 rm -rf conftest*
2739 ac_cv_header_stdbool_h=no
2741 rm -f conftest*
2744 echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2745 if test $ac_cv_header_stdbool_h = yes; then
2746 cat >> confdefs.h <<\EOF
2747 #define HAVE_STDBOOL_H 1
2752 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
2753 echo "configure:2754: checking whether string.h and strings.h may both be included" >&5
2754 if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2755 echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757 cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760 #include <string.h>
2761 #include <strings.h>
2762 int main() {
2764 ; return 0; }
2766 if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2767 rm -rf conftest*
2768 gcc_cv_header_string=yes
2769 else
2770 echo "configure: failed program was:" >&5
2771 cat conftest.$ac_ext >&5
2772 rm -rf conftest*
2773 gcc_cv_header_string=no
2775 rm -f conftest*
2778 echo "$ac_t""$gcc_cv_header_string" 1>&6
2779 if test $gcc_cv_header_string = yes; then
2780 cat >> confdefs.h <<\EOF
2781 #define STRING_WITH_STRINGS 1
2786 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2787 echo "configure:2788: checking for sys/wait.h that is POSIX.1 compatible" >&5
2788 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2789 echo $ac_n "(cached) $ac_c" 1>&6
2790 else
2791 cat > conftest.$ac_ext <<EOF
2792 #line 2793 "configure"
2793 #include "confdefs.h"
2794 #include <sys/types.h>
2795 #include <sys/wait.h>
2796 #ifndef WEXITSTATUS
2797 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2798 #endif
2799 #ifndef WIFEXITED
2800 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2801 #endif
2802 int main() {
2803 int s;
2804 wait (&s);
2805 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2806 ; return 0; }
2808 if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2809 rm -rf conftest*
2810 ac_cv_header_sys_wait_h=yes
2811 else
2812 echo "configure: failed program was:" >&5
2813 cat conftest.$ac_ext >&5
2814 rm -rf conftest*
2815 ac_cv_header_sys_wait_h=no
2817 rm -f conftest*
2820 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2821 if test $ac_cv_header_sys_wait_h = yes; then
2822 cat >> confdefs.h <<\EOF
2823 #define HAVE_SYS_WAIT_H 1
2828 for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
2829 fcntl.h unistd.h sys/file.h sys/time.h \
2830 sys/resource.h sys/param.h sys/times.h sys/stat.h \
2831 direct.h malloc.h langinfo.h
2833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2835 echo "configure:2836: checking for $ac_hdr" >&5
2836 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2837 echo $ac_n "(cached) $ac_c" 1>&6
2838 else
2839 cat > conftest.$ac_ext <<EOF
2840 #line 2841 "configure"
2841 #include "confdefs.h"
2842 #include <$ac_hdr>
2844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2845 { (eval echo configure:2846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2847 if test -z "$ac_err"; then
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=yes"
2850 else
2851 echo "$ac_err" >&5
2852 echo "configure: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2854 rm -rf conftest*
2855 eval "ac_cv_header_$ac_safe=no"
2857 rm -f conftest*
2859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2860 echo "$ac_t""yes" 1>&6
2861 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2862 cat >> confdefs.h <<EOF
2863 #define $ac_tr_hdr 1
2866 else
2867 echo "$ac_t""no" 1>&6
2869 done
2872 # Check for thread headers.
2873 ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2874 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
2875 echo "configure:2876: checking for thread.h" >&5
2876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include <thread.h>
2884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2885 { (eval echo configure:2886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2887 if test -z "$ac_err"; then
2888 rm -rf conftest*
2889 eval "ac_cv_header_$ac_safe=yes"
2890 else
2891 echo "$ac_err" >&5
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 rm -rf conftest*
2895 eval "ac_cv_header_$ac_safe=no"
2897 rm -f conftest*
2899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2900 echo "$ac_t""yes" 1>&6
2901 have_thread_h=yes
2902 else
2903 echo "$ac_t""no" 1>&6
2904 have_thread_h=
2907 ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2908 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
2909 echo "configure:2910: checking for pthread.h" >&5
2910 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2911 echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913 cat > conftest.$ac_ext <<EOF
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916 #include <pthread.h>
2918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2919 { (eval echo configure:2920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2921 if test -z "$ac_err"; then
2922 rm -rf conftest*
2923 eval "ac_cv_header_$ac_safe=yes"
2924 else
2925 echo "$ac_err" >&5
2926 echo "configure: failed program was:" >&5
2927 cat conftest.$ac_ext >&5
2928 rm -rf conftest*
2929 eval "ac_cv_header_$ac_safe=no"
2931 rm -f conftest*
2933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2934 echo "$ac_t""yes" 1>&6
2935 have_pthread_h=yes
2936 else
2937 echo "$ac_t""no" 1>&6
2938 have_pthread_h=
2942 # These tests can't be done till we know if we have limits.h.
2943 echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
2944 echo "configure:2945: checking for CHAR_BIT" >&5
2945 if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2946 echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #ifdef HAVE_LIMITS_H
2952 #include <limits.h>
2953 #endif
2954 #ifdef CHAR_BIT
2955 found
2956 #endif
2958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2959 egrep "found" >/dev/null 2>&1; then
2960 rm -rf conftest*
2961 gcc_cv_decl_char_bit=yes
2962 else
2963 rm -rf conftest*
2964 gcc_cv_decl_char_bit=no
2966 rm -f conftest*
2971 echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2972 if test $gcc_cv_decl_char_bit = no; then
2973 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
2974 echo "configure:2975: checking number of bits in a byte" >&5
2975 if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
2977 else
2979 gcc_cv_c_nbby=
2980 while test $i -lt 65; do
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2985 int main() {
2986 switch(0) {
2987 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2988 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2990 ; return 0; }
2992 if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2993 rm -rf conftest*
2994 gcc_cv_c_nbby=$i; break
2995 else
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2999 rm -f conftest*
3000 i=`expr $i + 1`
3001 done
3002 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
3006 echo "$ac_t""$gcc_cv_c_nbby" 1>&6
3007 if test $gcc_cv_c_nbby = failed; then
3008 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
3009 else
3010 cat >> confdefs.h <<EOF
3011 #define CHAR_BIT $gcc_cv_c_nbby
3016 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3017 echo "configure:3018: checking whether byte ordering is bigendian" >&5
3018 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3019 echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021 ac_cv_c_bigendian=unknown
3022 # See if sys/param.h defines the BYTE_ORDER macro.
3023 cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026 #include <sys/types.h>
3027 #include <sys/param.h>
3028 int main() {
3030 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3031 bogus endian macros
3032 #endif
3033 ; return 0; }
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036 rm -rf conftest*
3037 # It does; now see whether it defined to BIG_ENDIAN or not.
3038 cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041 #include <sys/types.h>
3042 #include <sys/param.h>
3043 int main() {
3045 #if BYTE_ORDER != BIG_ENDIAN
3046 not big endian
3047 #endif
3048 ; return 0; }
3050 if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3051 rm -rf conftest*
3052 ac_cv_c_bigendian=yes
3053 else
3054 echo "configure: failed program was:" >&5
3055 cat conftest.$ac_ext >&5
3056 rm -rf conftest*
3057 ac_cv_c_bigendian=no
3059 rm -f conftest*
3060 else
3061 echo "configure: failed program was:" >&5
3062 cat conftest.$ac_ext >&5
3064 rm -f conftest*
3065 if test $ac_cv_c_bigendian = unknown; then
3066 if test "$cross_compiling" = yes; then
3067 echo $ac_n "cross-compiling... " 2>&6
3068 else
3069 cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 main () {
3073 /* Are we little or big endian? From Harbison&Steele. */
3074 union
3076 long l;
3077 char c[sizeof (long)];
3078 } u;
3079 u.l = 1;
3080 exit (u.c[sizeof (long) - 1] == 1);
3083 if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3084 then
3085 ac_cv_c_bigendian=no
3086 else
3087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
3089 rm -fr conftest*
3090 ac_cv_c_bigendian=yes
3092 rm -fr conftest*
3098 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3099 if test $ac_cv_c_bigendian = unknown; then
3100 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3101 echo "configure:3102: checking to probe for byte ordering" >&5
3103 cat >conftest.c <<EOF
3104 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3105 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3106 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3107 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3108 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3109 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3110 int main() { _ascii (); _ebcdic (); return 0; }
3112 if test -f conftest.c ; then
3113 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3114 if test `grep -l BIGenDianSyS conftest.o` ; then
3115 echo $ac_n ' big endian probe OK, ' 1>&6
3116 ac_cv_c_bigendian=yes
3118 if test `grep -l LiTTleEnDian conftest.o` ; then
3119 echo $ac_n ' little endian probe OK, ' 1>&6
3120 if test $ac_cv_c_bigendian = yes ; then
3121 ac_cv_c_bigendian=unknown;
3122 else
3123 ac_cv_c_bigendian=no
3126 echo $ac_n 'guessing bigendian ... ' >&6
3129 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3131 if test $ac_cv_c_bigendian = yes; then
3132 cat >> confdefs.h <<\EOF
3133 #define WORDS_BIGENDIAN 1
3136 cat >> confdefs.h <<\EOF
3137 #define HOST_WORDS_BIG_ENDIAN 1
3140 BYTEORDER=4321
3141 else
3142 BYTEORDER=1234
3144 cat >> confdefs.h <<EOF
3145 #define BYTEORDER $BYTEORDER
3148 if test $ac_cv_c_bigendian = unknown; then
3149 { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3152 echo $ac_n "checking floating point format""... $ac_c" 1>&6
3153 echo "configure:3154: checking floating point format" >&5
3154 if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3158 ac_ext=c
3159 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3160 ac_cpp='$CPP $CPPFLAGS'
3161 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3162 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3163 cross_compiling=$ac_cv_prog_cc_cross
3165 cat > conftest.$ac_ext <<EOF
3166 #line 3167 "configure"
3167 #include "confdefs.h"
3168 /* This will not work unless sizeof(double) == 8. */
3169 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
3171 /* This structure must have no internal padding. */
3172 struct possibility {
3173 char prefix[8];
3174 double candidate;
3175 char postfix[8];
3178 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
3179 struct possibility table [] =
3181 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
3182 C( 3.53802595280598432000e+18), /* D__float - VAX */
3183 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
3184 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
3185 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189 od -c conftest.o |
3190 sed 's/^[0-7]*[ ]*/ /
3191 s/\*/./g
3192 s/ \\n/*/g
3193 s/ [0-9][0-9][0-9]/./g
3194 s/ \\[^ ]/./g' |
3195 tr -d '
3196 ' | tr -s '*' '
3197 ' | fold | sed '$a\
3198 ' > conftest.dmp
3199 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3200 ac_cv_c_float_format='IEEE (big-endian)'
3201 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
3202 ac_cv_c_float_format='IEEE (big-endian)'
3203 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
3204 ac_cv_c_float_format='IEEE (little-endian)'
3205 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
3206 ac_cv_c_float_format='IEEE (little-endian)'
3207 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
3208 ac_cv_c_float_format='VAX D-float'
3209 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
3210 ac_cv_c_float_format='PDP-10'
3211 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
3212 ac_cv_c_float_format='IBM 370 hex'
3213 else
3214 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
3216 else
3217 { echo "configure: error: compile failed" 1>&2; exit 1; }
3219 rm -rf conftest*
3220 ac_ext=c
3221 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3222 ac_cpp='$CPP $CPPFLAGS'
3223 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3224 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3225 cross_compiling=$ac_cv_prog_cc_cross
3230 echo "$ac_t""$ac_cv_c_float_format" 1>&6
3231 # IEEE is the default format. If the float endianness isn't the same
3232 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
3233 # (which is a tristate: yes, no, default). This is only an issue with
3234 # IEEE; the other formats are only supported by a few machines each,
3235 # all with the same endianness.
3236 format=
3237 fbigend=
3238 case $ac_cv_c_float_format in
3239 'IEEE (big-endian)' )
3240 if test $ac_cv_c_bigendian = no; then
3241 fbigend=1
3244 'IEEE (little-endian)' )
3245 if test $ac_cv_c_bigendian = yes; then
3246 fbigend=0
3249 'VAX D-float' )
3250 format=VAX_FLOAT_FORMAT
3252 'PDP-10' )
3253 format=PDP10_FLOAT_FORMAT
3255 'IBM 370 hex' )
3256 format=IBM_FLOAT_FORMAT
3258 esac
3259 if test -n "$format"; then
3260 cat >> confdefs.h <<EOF
3261 #define HOST_FLOAT_FORMAT $format
3265 if test -n "$fbigend"; then
3266 cat >> confdefs.h <<EOF
3267 #define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
3273 # See if we have the mktemp command.
3274 # Extract the first word of "mktemp", so it can be a program name with args.
3275 set dummy mktemp; ac_word=$2
3276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_word" >&5
3278 if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3279 echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281 if test -n "$have_mktemp_command"; then
3282 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3283 else
3284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3285 ac_dummy="$PATH"
3286 for ac_dir in $ac_dummy; do
3287 test -z "$ac_dir" && ac_dir=.
3288 if test -f $ac_dir/$ac_word; then
3289 ac_cv_prog_have_mktemp_command="yes"
3290 break
3292 done
3293 IFS="$ac_save_ifs"
3294 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3297 have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3298 if test -n "$have_mktemp_command"; then
3299 echo "$ac_t""$have_mktemp_command" 1>&6
3300 else
3301 echo "$ac_t""no" 1>&6
3305 # Do we have a single-tree copy of texinfo?
3306 if test -f $srcdir/../texinfo/Makefile.in; then
3307 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3308 gcc_cv_prog_makeinfo_modern=yes
3309 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3310 else
3311 # See if makeinfo has been installed and is modern enough
3312 # that we can use it.
3313 # Extract the first word of "makeinfo", so it can be a program name with args.
3314 set dummy makeinfo; ac_word=$2
3315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3316 echo "configure:3317: checking for $ac_word" >&5
3317 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3318 echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320 if test -n "$MAKEINFO"; then
3321 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3322 else
3323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3324 ac_dummy="$PATH"
3325 for ac_dir in $ac_dummy; do
3326 test -z "$ac_dir" && ac_dir=.
3327 if test -f $ac_dir/$ac_word; then
3328 ac_cv_prog_MAKEINFO="makeinfo"
3329 break
3331 done
3332 IFS="$ac_save_ifs"
3335 MAKEINFO="$ac_cv_prog_MAKEINFO"
3336 if test -n "$MAKEINFO"; then
3337 echo "$ac_t""$MAKEINFO" 1>&6
3338 else
3339 echo "$ac_t""no" 1>&6
3342 if test -n "$MAKEINFO"; then
3343 # Found it, now check the version.
3344 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
3345 echo "configure:3346: checking for modern makeinfo" >&5
3346 if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3347 echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349 ac_prog_version=`$MAKEINFO --version 2>&1 |
3350 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
3351 echo "configure:3352: version of makeinfo is $ac_prog_version" >&5
3352 case $ac_prog_version in
3353 '') gcc_cv_prog_makeinfo_modern=no;;
3354 4.[2-9]*)
3355 gcc_cv_prog_makeinfo_modern=yes;;
3356 *) gcc_cv_prog_makeinfo_modern=no;;
3357 esac
3361 echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3362 else
3363 gcc_cv_prog_makeinfo_modern=no
3368 if test $gcc_cv_prog_makeinfo_modern = no; then
3369 echo "configure: warning:
3370 *** Makeinfo is missing or too old.
3371 *** Info documentation will not be built." 1>&2
3372 BUILD_INFO=
3373 else
3374 BUILD_INFO=info
3377 # Is pod2man recent enough to regenerate manpages?
3378 echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
3379 echo "configure:3380: checking for recent Pod::Man" >&5
3380 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
3381 echo "$ac_t""yes" 1>&6
3382 GENERATED_MANPAGES=generated-manpages
3383 else
3384 echo "$ac_t""no" 1>&6
3385 GENERATED_MANPAGES=
3388 # How about lex?
3389 if test -f $srcdir/../flex/skel.c; then
3390 FLEX='$(objdir)/../flex/flex'
3391 else
3392 # Extract the first word of "flex", so it can be a program name with args.
3393 set dummy flex; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3397 echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399 if test -n "$FLEX"; then
3400 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3401 else
3402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3403 ac_dummy="$PATH"
3404 for ac_dir in $ac_dummy; do
3405 test -z "$ac_dir" && ac_dir=.
3406 if test -f $ac_dir/$ac_word; then
3407 ac_cv_prog_FLEX="flex"
3408 break
3410 done
3411 IFS="$ac_save_ifs"
3412 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
3415 FLEX="$ac_cv_prog_FLEX"
3416 if test -n "$FLEX"; then
3417 echo "$ac_t""$FLEX" 1>&6
3418 else
3419 echo "$ac_t""no" 1>&6
3424 # Bison?
3425 # The -L switch is so bison can find its skeleton file.
3426 if test -f $srcdir/../bison/bison.simple; then
3427 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3428 else
3429 # Extract the first word of "bison", so it can be a program name with args.
3430 set dummy bison; ac_word=$2
3431 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3432 echo "configure:3433: checking for $ac_word" >&5
3433 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3434 echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436 if test -n "$BISON"; then
3437 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3438 else
3439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3440 ac_dummy="$PATH"
3441 for ac_dir in $ac_dummy; do
3442 test -z "$ac_dir" && ac_dir=.
3443 if test -f $ac_dir/$ac_word; then
3444 ac_cv_prog_BISON="bison"
3445 break
3447 done
3448 IFS="$ac_save_ifs"
3449 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
3452 BISON="$ac_cv_prog_BISON"
3453 if test -n "$BISON"; then
3454 echo "$ac_t""$BISON" 1>&6
3455 else
3456 echo "$ac_t""no" 1>&6
3461 # These libraries may be used by collect2.
3462 # We may need a special search path to get them linked.
3463 echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
3464 echo "configure:3465: checking for collect2 libraries" >&5
3465 if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3466 echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468 save_LIBS="$LIBS"
3469 for libs in '' -lld -lmld \
3470 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3471 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3473 LIBS="$libs"
3474 cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477 /* Override any gcc2 internal prototype to avoid an error. */
3478 /* We use char because int might match the return type of a gcc2
3479 builtin and then its argument prototype would still apply. */
3480 char ldopen();
3482 int main() {
3483 ldopen()
3484 ; return 0; }
3486 if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3487 rm -rf conftest*
3488 gcc_cv_collect2_libs="$libs"; break
3489 else
3490 echo "configure: failed program was:" >&5
3491 cat conftest.$ac_ext >&5
3493 rm -f conftest*
3494 done
3495 LIBS="$save_LIBS"
3496 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3499 echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3500 case $gcc_cv_collect2_libs in
3501 "none required") ;;
3502 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3503 esac
3506 # When building Ada code on Alpha, we need exc_resume which is usually in
3507 # -lexc. So test for it.
3508 save_LIBS="$LIBS"
3509 LIBS=
3511 echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
3512 echo "configure:3513: checking for library containing exc_resume" >&5
3513 if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3514 echo $ac_n "(cached) $ac_c" 1>&6
3515 else
3516 ac_func_search_save_LIBS="$LIBS"
3517 ac_cv_search_exc_resume="no"
3518 cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 /* Override any gcc2 internal prototype to avoid an error. */
3522 /* We use char because int might match the return type of a gcc2
3523 builtin and then its argument prototype would still apply. */
3524 char exc_resume();
3526 int main() {
3527 exc_resume()
3528 ; return 0; }
3530 if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3531 rm -rf conftest*
3532 ac_cv_search_exc_resume="none required"
3533 else
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3537 rm -f conftest*
3538 test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3539 LIBS="-l$i $ac_func_search_save_LIBS"
3540 cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 /* Override any gcc2 internal prototype to avoid an error. */
3544 /* We use char because int might match the return type of a gcc2
3545 builtin and then its argument prototype would still apply. */
3546 char exc_resume();
3548 int main() {
3549 exc_resume()
3550 ; return 0; }
3552 if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3553 rm -rf conftest*
3554 ac_cv_search_exc_resume="-l$i"
3555 break
3556 else
3557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
3560 rm -f conftest*
3561 done
3562 LIBS="$ac_func_search_save_LIBS"
3565 echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3566 if test "$ac_cv_search_exc_resume" != "no"; then
3567 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3569 else :
3572 GNAT_LIBEXC="$LIBS"
3573 LIBS="$save_LIBS"
3576 # See if the stage1 system preprocessor understands the ANSI C
3577 # preprocessor stringification operator. (Used by symcat.h.)
3580 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
3581 echo "configure:3582: checking for preprocessor stringizing operator" >&5
3582 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
3583 echo $ac_n "(cached) $ac_c" 1>&6
3584 else
3585 cat > conftest.$ac_ext <<EOF
3586 #line 3587 "configure"
3587 #include "confdefs.h"
3589 #define x(y) #y
3591 char *s = x(teststring);
3594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3595 egrep "#teststring" >/dev/null 2>&1; then
3596 rm -rf conftest*
3597 ac_cv_c_stringize=no
3598 else
3599 rm -rf conftest*
3600 ac_cv_c_stringize=yes
3602 rm -f conftest*
3606 if test "${ac_cv_c_stringize}" = yes
3607 then
3608 cat >> confdefs.h <<\EOF
3609 #define HAVE_STRINGIZE 1
3613 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3616 # Use <inttypes.h> only if it exists,
3617 # doesn't clash with <sys/types.h>, and declares intmax_t.
3618 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3619 echo "configure:3620: checking for inttypes.h" >&5
3620 if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <sys/types.h>
3627 #include <inttypes.h>
3628 int main() {
3629 intmax_t i = -1;
3630 ; return 0; }
3632 if { (eval echo configure:3633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3633 rm -rf conftest*
3634 gcc_cv_header_inttypes_h=yes
3635 else
3636 echo "configure: failed program was:" >&5
3637 cat conftest.$ac_ext >&5
3638 rm -rf conftest*
3639 gcc_cv_header_inttypes_h=no
3641 rm -f conftest*
3644 echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
3645 if test $gcc_cv_header_inttypes_h = yes; then
3646 cat >> confdefs.h <<\EOF
3647 #define HAVE_INTTYPES_H 1
3653 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
3654 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
3655 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
3656 scandir alphasort
3658 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3659 echo "configure:3660: checking for $ac_func" >&5
3660 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3661 echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663 cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 /* System header to define __stub macros and hopefully few prototypes,
3667 which can conflict with char $ac_func(); below. */
3668 #include <assert.h>
3669 /* Override any gcc2 internal prototype to avoid an error. */
3670 /* We use char because int might match the return type of a gcc2
3671 builtin and then its argument prototype would still apply. */
3672 char $ac_func();
3674 int main() {
3676 /* The GNU C library defines this for functions which it implements
3677 to always fail with ENOSYS. Some functions are actually named
3678 something starting with __ and the normal name is an alias. */
3679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3680 choke me
3681 #else
3682 $ac_func();
3683 #endif
3685 ; return 0; }
3687 if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3688 rm -rf conftest*
3689 eval "ac_cv_func_$ac_func=yes"
3690 else
3691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
3693 rm -rf conftest*
3694 eval "ac_cv_func_$ac_func=no"
3696 rm -f conftest*
3699 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3700 echo "$ac_t""yes" 1>&6
3701 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3702 cat >> confdefs.h <<EOF
3703 #define $ac_tr_func 1
3706 else
3707 echo "$ac_t""no" 1>&6
3709 done
3712 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3713 echo "configure:3714: checking for ssize_t" >&5
3714 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716 else
3717 cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <sys/types.h>
3721 #if STDC_HEADERS
3722 #include <stdlib.h>
3723 #include <stddef.h>
3724 #endif
3726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3727 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3728 rm -rf conftest*
3729 ac_cv_type_ssize_t=yes
3730 else
3731 rm -rf conftest*
3732 ac_cv_type_ssize_t=no
3734 rm -f conftest*
3737 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3738 if test $ac_cv_type_ssize_t = no; then
3739 cat >> confdefs.h <<\EOF
3740 #define ssize_t int
3746 # Try to determine the array type of the second argument of getgroups
3747 # for the target system (int or gid_t).
3748 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3749 echo "configure:3750: checking for uid_t in sys/types.h" >&5
3750 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3751 echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753 cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3756 #include <sys/types.h>
3758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3759 egrep "uid_t" >/dev/null 2>&1; then
3760 rm -rf conftest*
3761 ac_cv_type_uid_t=yes
3762 else
3763 rm -rf conftest*
3764 ac_cv_type_uid_t=no
3766 rm -f conftest*
3770 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3771 if test $ac_cv_type_uid_t = no; then
3772 cat >> confdefs.h <<\EOF
3773 #define uid_t int
3776 cat >> confdefs.h <<\EOF
3777 #define gid_t int
3782 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3783 echo "configure:3784: checking type of array argument to getgroups" >&5
3784 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3785 echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787 if test "$cross_compiling" = yes; then
3788 ac_cv_type_getgroups=cross
3789 else
3790 cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3794 /* Thanks to Mike Rendell for this test. */
3795 #include <sys/types.h>
3796 #define NGID 256
3797 #undef MAX
3798 #define MAX(x, y) ((x) > (y) ? (x) : (y))
3799 main()
3801 gid_t gidset[NGID];
3802 int i, n;
3803 union { gid_t gval; long lval; } val;
3805 val.lval = -1;
3806 for (i = 0; i < NGID; i++)
3807 gidset[i] = val.gval;
3808 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3809 gidset);
3810 /* Exit non-zero if getgroups seems to require an array of ints. This
3811 happens when gid_t is short but getgroups modifies an array of ints. */
3812 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3816 if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3817 then
3818 ac_cv_type_getgroups=gid_t
3819 else
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822 rm -fr conftest*
3823 ac_cv_type_getgroups=int
3825 rm -fr conftest*
3828 if test $ac_cv_type_getgroups = cross; then
3829 cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 #include <unistd.h>
3834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3836 rm -rf conftest*
3837 ac_cv_type_getgroups=gid_t
3838 else
3839 rm -rf conftest*
3840 ac_cv_type_getgroups=int
3842 rm -f conftest*
3847 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3848 cat >> confdefs.h <<EOF
3849 #define GETGROUPS_T $ac_cv_type_getgroups
3853 if test "${target}" = "${build}"; then
3854 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3855 else
3856 case "${target}" in
3857 # This condition may need some tweaking. It should include all
3858 # targets where the array type of the second argument of getgroups
3859 # is int and the type of gid_t is not equivalent to int.
3860 *-*-sunos* | *-*-ultrix*)
3861 TARGET_GETGROUPS_T=int
3864 TARGET_GETGROUPS_T=gid_t
3866 esac
3870 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
3871 echo "configure:3872: checking whether the printf functions support %p" >&5
3872 if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3874 else
3875 if test "$cross_compiling" = yes; then
3876 gcc_cv_func_printf_ptr=no
3877 else
3878 cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881 #include <stdio.h>
3883 int main()
3885 char buf[64];
3886 char *p = buf, *q = NULL;
3887 sprintf(buf, "%p", p);
3888 sscanf(buf, "%p", &q);
3889 return (p != q);
3892 if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3893 then
3894 gcc_cv_func_printf_ptr=yes
3895 else
3896 echo "configure: failed program was:" >&5
3897 cat conftest.$ac_ext >&5
3898 rm -fr conftest*
3899 gcc_cv_func_printf_ptr=no
3901 rm -fr conftest*
3904 rm -f core core.* *.core
3907 echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3908 if test $gcc_cv_func_printf_ptr = yes ; then
3909 cat >> confdefs.h <<\EOF
3910 #define HAVE_PRINTF_PTR 1
3916 case "${host}" in
3917 *-*-uwin*)
3918 { echo "configure: error:
3919 *** UWIN may not be used as a host platform because
3920 *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
3922 *-*-*vms*)
3923 # Under VMS, vfork works very different than on Unix. The standard test
3924 # won't work, and it isn't easily adaptable. It makes more sense to
3925 # just force it.
3926 ac_cv_func_vfork_works=yes
3928 esac
3929 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3930 echo "configure:3931: checking for pid_t" >&5
3931 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3932 echo $ac_n "(cached) $ac_c" 1>&6
3933 else
3934 cat > conftest.$ac_ext <<EOF
3935 #line 3936 "configure"
3936 #include "confdefs.h"
3937 #include <sys/types.h>
3938 #if STDC_HEADERS
3939 #include <stdlib.h>
3940 #include <stddef.h>
3941 #endif
3943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3944 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3945 rm -rf conftest*
3946 ac_cv_type_pid_t=yes
3947 else
3948 rm -rf conftest*
3949 ac_cv_type_pid_t=no
3951 rm -f conftest*
3954 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3955 if test $ac_cv_type_pid_t = no; then
3956 cat >> confdefs.h <<\EOF
3957 #define pid_t int
3962 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3963 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3964 echo "configure:3965: checking for vfork.h" >&5
3965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3966 echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 #include <vfork.h>
3973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3974 { (eval echo configure:3975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3976 if test -z "$ac_err"; then
3977 rm -rf conftest*
3978 eval "ac_cv_header_$ac_safe=yes"
3979 else
3980 echo "$ac_err" >&5
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3983 rm -rf conftest*
3984 eval "ac_cv_header_$ac_safe=no"
3986 rm -f conftest*
3988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3989 echo "$ac_t""yes" 1>&6
3990 cat >> confdefs.h <<\EOF
3991 #define HAVE_VFORK_H 1
3994 else
3995 echo "$ac_t""no" 1>&6
3998 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3999 echo "configure:4000: checking for working vfork" >&5
4000 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4001 echo $ac_n "(cached) $ac_c" 1>&6
4002 else
4003 if test "$cross_compiling" = yes; then
4004 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4005 echo "configure:4006: checking for vfork" >&5
4006 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4007 echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009 cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4012 /* System header to define __stub macros and hopefully few prototypes,
4013 which can conflict with char vfork(); below. */
4014 #include <assert.h>
4015 /* Override any gcc2 internal prototype to avoid an error. */
4016 /* We use char because int might match the return type of a gcc2
4017 builtin and then its argument prototype would still apply. */
4018 char vfork();
4020 int main() {
4022 /* The GNU C library defines this for functions which it implements
4023 to always fail with ENOSYS. Some functions are actually named
4024 something starting with __ and the normal name is an alias. */
4025 #if defined (__stub_vfork) || defined (__stub___vfork)
4026 choke me
4027 #else
4028 vfork();
4029 #endif
4031 ; return 0; }
4033 if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4034 rm -rf conftest*
4035 eval "ac_cv_func_vfork=yes"
4036 else
4037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
4039 rm -rf conftest*
4040 eval "ac_cv_func_vfork=no"
4042 rm -f conftest*
4045 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4046 echo "$ac_t""yes" 1>&6
4048 else
4049 echo "$ac_t""no" 1>&6
4052 ac_cv_func_vfork_works=$ac_cv_func_vfork
4053 else
4054 cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 /* Thanks to Paul Eggert for this test. */
4058 #include <stdio.h>
4059 #include <sys/types.h>
4060 #include <sys/stat.h>
4061 #ifdef HAVE_UNISTD_H
4062 #include <unistd.h>
4063 #endif
4064 #ifdef HAVE_VFORK_H
4065 #include <vfork.h>
4066 #endif
4067 /* On some sparc systems, changes by the child to local and incoming
4068 argument registers are propagated back to the parent.
4069 The compiler is told about this with #include <vfork.h>,
4070 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4071 Test for this by using a static variable whose address
4072 is put into a register that is clobbered by the vfork. */
4073 static
4074 #ifdef __cplusplus
4075 sparc_address_test (int arg)
4076 #else
4077 sparc_address_test (arg) int arg;
4078 #endif
4080 static pid_t child;
4081 if (!child) {
4082 child = vfork ();
4083 if (child < 0) {
4084 perror ("vfork");
4085 _exit(2);
4087 if (!child) {
4088 arg = getpid();
4089 write(-1, "", 0);
4090 _exit (arg);
4094 main() {
4095 pid_t parent = getpid ();
4096 pid_t child;
4098 sparc_address_test ();
4100 child = vfork ();
4102 if (child == 0) {
4103 /* Here is another test for sparc vfork register problems.
4104 This test uses lots of local variables, at least
4105 as many local variables as main has allocated so far
4106 including compiler temporaries. 4 locals are enough for
4107 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4108 A buggy compiler should reuse the register of parent
4109 for one of the local variables, since it will think that
4110 parent can't possibly be used any more in this routine.
4111 Assigning to the local variable will thus munge parent
4112 in the parent process. */
4113 pid_t
4114 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4115 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4116 /* Convince the compiler that p..p7 are live; otherwise, it might
4117 use the same hardware register for all 8 local variables. */
4118 if (p != p1 || p != p2 || p != p3 || p != p4
4119 || p != p5 || p != p6 || p != p7)
4120 _exit(1);
4122 /* On some systems (e.g. IRIX 3.3),
4123 vfork doesn't separate parent from child file descriptors.
4124 If the child closes a descriptor before it execs or exits,
4125 this munges the parent's descriptor as well.
4126 Test for this by closing stdout in the child. */
4127 _exit(close(fileno(stdout)) != 0);
4128 } else {
4129 int status;
4130 struct stat st;
4132 while (wait(&status) != child)
4134 exit(
4135 /* Was there some problem with vforking? */
4136 child < 0
4138 /* Did the child fail? (This shouldn't happen.) */
4139 || status
4141 /* Did the vfork/compiler bug occur? */
4142 || parent != getpid()
4144 /* Did the file descriptor bug occur? */
4145 || fstat(fileno(stdout), &st) != 0
4150 if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4151 then
4152 ac_cv_func_vfork_works=yes
4153 else
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156 rm -fr conftest*
4157 ac_cv_func_vfork_works=no
4159 rm -fr conftest*
4164 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4165 if test $ac_cv_func_vfork_works = no; then
4166 cat >> confdefs.h <<\EOF
4167 #define vfork fork
4172 for ac_func in getpagesize
4174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4175 echo "configure:4176: checking for $ac_func" >&5
4176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4177 echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179 cat > conftest.$ac_ext <<EOF
4180 #line 4181 "configure"
4181 #include "confdefs.h"
4182 /* System header to define __stub macros and hopefully few prototypes,
4183 which can conflict with char $ac_func(); below. */
4184 #include <assert.h>
4185 /* Override any gcc2 internal prototype to avoid an error. */
4186 /* We use char because int might match the return type of a gcc2
4187 builtin and then its argument prototype would still apply. */
4188 char $ac_func();
4190 int main() {
4192 /* The GNU C library defines this for functions which it implements
4193 to always fail with ENOSYS. Some functions are actually named
4194 something starting with __ and the normal name is an alias. */
4195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4196 choke me
4197 #else
4198 $ac_func();
4199 #endif
4201 ; return 0; }
4203 if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4204 rm -rf conftest*
4205 eval "ac_cv_func_$ac_func=yes"
4206 else
4207 echo "configure: failed program was:" >&5
4208 cat conftest.$ac_ext >&5
4209 rm -rf conftest*
4210 eval "ac_cv_func_$ac_func=no"
4212 rm -f conftest*
4215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4216 echo "$ac_t""yes" 1>&6
4217 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4218 cat >> confdefs.h <<EOF
4219 #define $ac_tr_func 1
4222 else
4223 echo "$ac_t""no" 1>&6
4225 done
4227 # The test program for the next two tests is the same except for one
4228 # set of ifdefs.
4229 cat >ct-mmap.inc <<'EOF'
4230 #include <sys/types.h>
4231 #include <sys/mman.h>
4232 #include <fcntl.h>
4233 #include <signal.h>
4234 #include <setjmp.h>
4235 #include <stdio.h>
4237 #if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
4238 # define MAP_ANONYMOUS MAP_ANON
4239 #endif
4241 /* This mess was copied from the GNU getpagesize.h. */
4242 #ifndef HAVE_GETPAGESIZE
4243 # ifdef HAVE_UNISTD_H
4244 # include <unistd.h>
4245 # endif
4247 /* Assume that all systems that can run configure have sys/param.h. */
4248 # ifndef HAVE_SYS_PARAM_H
4249 # define HAVE_SYS_PARAM_H 1
4250 # endif
4252 # ifdef _SC_PAGESIZE
4253 # define getpagesize() sysconf(_SC_PAGESIZE)
4254 # else /* no _SC_PAGESIZE */
4255 # ifdef HAVE_SYS_PARAM_H
4256 # include <sys/param.h>
4257 # ifdef EXEC_PAGESIZE
4258 # define getpagesize() EXEC_PAGESIZE
4259 # else /* no EXEC_PAGESIZE */
4260 # ifdef NBPG
4261 # define getpagesize() NBPG * CLSIZE
4262 # ifndef CLSIZE
4263 # define CLSIZE 1
4264 # endif /* no CLSIZE */
4265 # else /* no NBPG */
4266 # ifdef NBPC
4267 # define getpagesize() NBPC
4268 # else /* no NBPC */
4269 # ifdef PAGESIZE
4270 # define getpagesize() PAGESIZE
4271 # endif /* PAGESIZE */
4272 # endif /* no NBPC */
4273 # endif /* no NBPG */
4274 # endif /* no EXEC_PAGESIZE */
4275 # else /* no HAVE_SYS_PARAM_H */
4276 # define getpagesize() 8192 /* punt totally */
4277 # endif /* no HAVE_SYS_PARAM_H */
4278 # endif /* no _SC_PAGESIZE */
4280 #endif /* no HAVE_GETPAGESIZE */
4282 #ifndef MAP_FAILED
4283 # define MAP_FAILED -1
4284 #endif
4286 #undef perror_exit
4287 #define perror_exit(str, val) \
4288 do { perror(str); exit(val); } while (0)
4290 /* Some versions of cygwin mmap require that munmap is called with the
4291 same parameters as mmap. GCC expects that this is not the case.
4292 Test for various forms of this problem. Warning - icky signal games. */
4294 static sigset_t unblock_sigsegv;
4295 static jmp_buf r;
4296 static size_t pg;
4297 static int devzero;
4299 static char *
4300 anonmap (size)
4301 size_t size;
4303 #ifdef USE_MAP_ANON
4304 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4305 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4306 #else
4307 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4308 MAP_PRIVATE, devzero, 0);
4309 #endif
4312 static void
4313 sigsegv (unused)
4314 int unused;
4316 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4317 longjmp (r, 1);
4320 /* Basic functionality test. */
4321 void
4322 test_0 ()
4324 char *x = anonmap (pg);
4325 if (x == (char *) MAP_FAILED)
4326 perror_exit("test 0 mmap", 2);
4328 *(int *)x += 1;
4330 if (munmap(x, pg) < 0)
4331 perror_exit("test 0 munmap", 3);
4334 /* 1. If we map a 2-page region and unmap its second page, the first page
4335 must remain. */
4336 static void
4337 test_1 ()
4339 char *x = anonmap (pg * 2);
4340 if (x == (char *)MAP_FAILED)
4341 perror_exit ("test 1 mmap", 4);
4343 signal (SIGSEGV, sigsegv);
4344 if (setjmp (r))
4345 perror_exit ("test 1 fault", 5);
4347 x[0] = 1;
4348 x[pg] = 1;
4350 if (munmap (x + pg, pg) < 0)
4351 perror_exit ("test 1 munmap 1", 6);
4352 x[0] = 2;
4354 if (setjmp (r) == 0)
4356 x[pg] = 1;
4357 perror_exit ("test 1 no fault", 7);
4359 if (munmap (x, pg) < 0)
4360 perror_exit ("test 1 munmap 2", 8);
4363 /* 2. If we map a 2-page region and unmap its first page, the second
4364 page must remain. */
4365 static void
4366 test_2 ()
4368 char *x = anonmap (pg * 2);
4369 if (x == (char *)MAP_FAILED)
4370 perror_exit ("test 2 mmap", 9);
4372 signal (SIGSEGV, sigsegv);
4373 if (setjmp (r))
4374 perror_exit ("test 2 fault", 10);
4376 x[0] = 1;
4377 x[pg] = 1;
4379 if (munmap (x, pg) < 0)
4380 perror_exit ("test 2 munmap 1", 11);
4382 x[pg] = 2;
4384 if (setjmp (r) == 0)
4386 x[0] = 1;
4387 perror_exit ("test 2 no fault", 12);
4390 if (munmap (x+pg, pg) < 0)
4391 perror_exit ("test 2 munmap 2", 13);
4394 /* 3. If we map two adjacent 1-page regions and unmap them both with
4395 one munmap, both must go away.
4397 Getting two adjacent 1-page regions with two mmap calls is slightly
4398 tricky. All OS's tested skip over already-allocated blocks; therefore
4399 we have been careful to unmap all allocated regions in previous tests.
4400 HP/UX allocates pages backward in memory. No OS has yet been observed
4401 to be so perverse as to leave unmapped space between consecutive calls
4402 to mmap. */
4404 static void
4405 test_3 ()
4407 char *x, *y, *z;
4409 x = anonmap (pg);
4410 if (x == (char *)MAP_FAILED)
4411 perror_exit ("test 3 mmap 1", 14);
4412 y = anonmap (pg);
4413 if (y == (char *)MAP_FAILED)
4414 perror_exit ("test 3 mmap 2", 15);
4416 if (y != x + pg)
4418 if (y == x - pg)
4419 z = y, y = x, x = z;
4420 else
4422 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4423 (unsigned long)x, (unsigned long)y);
4424 exit (16);
4428 signal (SIGSEGV, sigsegv);
4429 if (setjmp (r))
4430 perror_exit ("test 3 fault", 17);
4432 x[0] = 1;
4433 y[0] = 1;
4435 if (munmap (x, pg*2) < 0)
4436 perror_exit ("test 3 munmap", 18);
4438 if (setjmp (r) == 0)
4440 x[0] = 1;
4441 perror_exit ("test 3 no fault 1", 19);
4444 signal (SIGSEGV, sigsegv);
4445 if (setjmp (r) == 0)
4447 y[0] = 1;
4448 perror_exit ("test 3 no fault 2", 20);
4453 main ()
4455 sigemptyset (&unblock_sigsegv);
4456 sigaddset (&unblock_sigsegv, SIGSEGV);
4457 pg = getpagesize ();
4458 #ifndef USE_MAP_ANON
4459 devzero = open ("/dev/zero", O_RDWR);
4460 if (devzero < 0)
4461 perror_exit ("open /dev/zero", 1);
4462 #endif
4464 test_0();
4465 test_1();
4466 test_2();
4467 test_3();
4469 exit(0);
4473 echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
4474 echo "configure:4475: checking for working mmap from /dev/zero" >&5
4475 if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4476 echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478 if test "$cross_compiling" = yes; then
4479 # When cross-building, assume that this works, unless we know it
4480 # doesn't. Of course, we have no way of knowing if there even is a /dev/zero
4481 # on the host, let alone whether mmap will work on it.
4482 case "$host_os" in
4483 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4484 darwin* ) ac_cv_func_mmap_dev_zero=no ;;
4485 * ) ac_cv_func_mmap_dev_zero=yes ;;
4486 esac
4487 else
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 #include "ct-mmap.inc"
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4494 then
4495 ac_cv_func_mmap_dev_zero=yes
4496 else
4497 echo "configure: failed program was:" >&5
4498 cat conftest.$ac_ext >&5
4499 rm -fr conftest*
4500 if test $? -lt 4
4501 then ac_cv_func_mmap_dev_zero=no
4502 else ac_cv_func_mmap_dev_zero=buggy
4505 rm -fr conftest*
4511 echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4512 if test $ac_cv_func_mmap_dev_zero = yes; then
4513 cat >> confdefs.h <<\EOF
4514 #define HAVE_MMAP_DEV_ZERO 1
4519 echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
4520 echo "configure:4521: checking for working mmap with MAP_ANON(YMOUS)" >&5
4521 if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4522 echo $ac_n "(cached) $ac_c" 1>&6
4523 else
4524 if test "$cross_compiling" = yes; then
4525 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4526 # just because it's there. Some SCO Un*xen define it but don't implement it.
4527 case "$host_os" in
4528 darwin* ) ac_cv_func_mmap_anon=yes ;;
4529 * ) ac_cv_func_mmap_anon=no ;;
4530 esac
4531 else
4532 cat > conftest.$ac_ext <<EOF
4533 #line 4534 "configure"
4534 #include "confdefs.h"
4535 #define USE_MAP_ANON
4536 #include "ct-mmap.inc"
4538 if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4539 then
4540 ac_cv_func_mmap_anon=yes
4541 else
4542 echo "configure: failed program was:" >&5
4543 cat conftest.$ac_ext >&5
4544 rm -fr conftest*
4545 if test $? -lt 4
4546 then ac_cv_func_mmap_anon=no
4547 else ac_cv_func_mmap_anon=buggy
4550 rm -fr conftest*
4556 echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4557 if test $ac_cv_func_mmap_anon = yes; then
4558 cat >> confdefs.h <<\EOF
4559 #define HAVE_MMAP_ANON 1
4563 rm -f ct-mmap.inc
4565 echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
4566 echo "configure:4567: checking for working mmap of a file" >&5
4567 if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4568 echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570 # Create a file one thousand bytes long.
4571 for i in 1 2 3 4 5 6 7 8 9 0
4572 do for j in 1 2 3 4 5 6 7 8 9 0
4573 do echo $i $j xxxxx
4574 done
4575 done > conftestdata$$
4577 if test "$cross_compiling" = yes; then
4578 case "$host_os" in
4579 darwin* ) ac_cv_func_mmap_file=yes ;;
4580 * ) ac_cv_func_mmap_file=no ;;
4581 esac
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4587 /* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4588 Richard Henderson and Alexandre Oliva.
4589 Check whether read-only mmap of a plain file works. */
4590 #include <sys/types.h>
4591 #include <sys/stat.h>
4592 #include <fcntl.h>
4593 #include <sys/mman.h>
4595 int main()
4597 char *x;
4598 int fd;
4599 struct stat st;
4601 fd = open("conftestdata$$", O_RDONLY);
4602 if (fd < 0)
4603 exit(1);
4605 if (fstat (fd, &st))
4606 exit(2);
4608 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4609 if (x == (char *) -1)
4610 exit(3);
4612 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4613 exit(4);
4615 if (munmap(x, st.st_size) < 0)
4616 exit(5);
4618 exit(0);
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4622 then
4623 ac_cv_func_mmap_file=yes
4624 else
4625 echo "configure: failed program was:" >&5
4626 cat conftest.$ac_ext >&5
4627 rm -fr conftest*
4628 ac_cv_func_mmap_file=no
4630 rm -fr conftest*
4635 echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4636 if test $ac_cv_func_mmap_file = yes; then
4637 cat >> confdefs.h <<\EOF
4638 #define HAVE_MMAP_FILE 1
4646 am_cv_lib_iconv_ldpath=
4647 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4648 if test "${with_libiconv_prefix+set}" = set; then
4649 withval="$with_libiconv_prefix"
4651 for dir in `echo "$withval" | tr : ' '`; do
4652 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4653 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
4654 done
4659 echo $ac_n "checking for iconv""... $ac_c" 1>&6
4660 echo "configure:4661: checking for iconv" >&5
4661 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4662 echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4665 am_cv_func_iconv="no, consider installing GNU libiconv"
4666 am_cv_lib_iconv=no
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 #include <stdlib.h>
4671 #include <iconv.h>
4672 int main() {
4673 iconv_t cd = iconv_open("","");
4674 iconv(cd,NULL,NULL,NULL,NULL);
4675 iconv_close(cd);
4676 ; return 0; }
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4679 rm -rf conftest*
4680 am_cv_func_iconv=yes
4681 else
4682 echo "configure: failed program was:" >&5
4683 cat conftest.$ac_ext >&5
4685 rm -f conftest*
4686 if test "$am_cv_func_iconv" != yes; then
4687 am_save_LIBS="$LIBS"
4688 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <stdlib.h>
4693 #include <iconv.h>
4694 int main() {
4695 iconv_t cd = iconv_open("","");
4696 iconv(cd,NULL,NULL,NULL,NULL);
4697 iconv_close(cd);
4698 ; return 0; }
4700 if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701 rm -rf conftest*
4702 am_cv_lib_iconv=yes
4703 am_cv_func_iconv=yes
4704 else
4705 echo "configure: failed program was:" >&5
4706 cat conftest.$ac_ext >&5
4708 rm -f conftest*
4709 LIBS="$am_save_LIBS"
4714 echo "$ac_t""$am_cv_func_iconv" 1>&6
4715 if test "$am_cv_func_iconv" = yes; then
4716 cat >> confdefs.h <<\EOF
4717 #define HAVE_ICONV 1
4720 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4721 echo "configure:4722: checking for iconv declaration" >&5
4722 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4723 echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4726 cat > conftest.$ac_ext <<EOF
4727 #line 4728 "configure"
4728 #include "confdefs.h"
4730 #include <stdlib.h>
4731 #include <iconv.h>
4732 extern
4733 #ifdef __cplusplus
4735 #endif
4736 #if defined(__STDC__) || defined(__cplusplus)
4737 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4738 #else
4739 size_t iconv();
4740 #endif
4742 int main() {
4744 ; return 0; }
4746 if { (eval echo configure:4747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4747 rm -rf conftest*
4748 am_cv_proto_iconv_arg1=""
4749 else
4750 echo "configure: failed program was:" >&5
4751 cat conftest.$ac_ext >&5
4752 rm -rf conftest*
4753 am_cv_proto_iconv_arg1="const"
4755 rm -f conftest*
4756 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);"
4759 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4760 echo "$ac_t""${ac_t:-
4761 }$am_cv_proto_iconv" 1>&6
4762 cat >> confdefs.h <<EOF
4763 #define ICONV_CONST $am_cv_proto_iconv_arg1
4767 LIBICONV=
4768 if test "$am_cv_lib_iconv" = yes; then
4769 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4774 # We will need to find libiberty.h and ansidecl.h
4775 saved_CFLAGS="$CFLAGS"
4776 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
4777 for ac_func in getenv atol sbrk abort atof getcwd getwd \
4778 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4779 fprintf_unlocked strstr errno vasprintf \
4780 malloc realloc calloc free basename getopt clock
4782 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4783 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4784 echo "configure:4785: checking whether $ac_func is declared" >&5
4785 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4786 echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788 cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4791 #undef $ac_tr_decl
4792 #define $ac_tr_decl 1
4794 #include "ansidecl.h"
4795 #include "system.h"
4797 int main() {
4798 #ifndef $ac_func
4799 char *(*pfn) = (char *(*)) $ac_func ;
4800 #endif
4801 ; return 0; }
4803 if { (eval echo configure:4804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4804 rm -rf conftest*
4805 eval "gcc_cv_have_decl_$ac_func=yes"
4806 else
4807 echo "configure: failed program was:" >&5
4808 cat conftest.$ac_ext >&5
4809 rm -rf conftest*
4810 eval "gcc_cv_have_decl_$ac_func=no"
4812 rm -f conftest*
4815 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4816 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4817 #define $ac_tr_decl 1
4820 else
4821 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4822 #define $ac_tr_decl 0
4827 done
4828 if test x = y ; then
4829 cat >> confdefs.h <<\EOF
4830 #define HAVE_DECL_GETENV 1
4832 cat >> confdefs.h <<\EOF
4833 #define HAVE_DECL_ATOL 1
4835 cat >> confdefs.h <<\EOF
4836 #define HAVE_DECL_SBRK 1
4838 cat >> confdefs.h <<\EOF
4839 #define HAVE_DECL_ABORT 1
4841 cat >> confdefs.h <<\EOF
4842 #define HAVE_DECL_ATOF 1
4844 cat >> confdefs.h <<\EOF
4845 #define HAVE_DECL_GETCWD 1
4847 cat >> confdefs.h <<\EOF
4848 #define HAVE_DECL_GETWD 1
4851 cat >> confdefs.h <<\EOF
4852 #define HAVE_DECL_STRSIGNAL 1
4854 cat >> confdefs.h <<\EOF
4855 #define HAVE_DECL_PUTC_UNLOCKED 1
4857 cat >> confdefs.h <<\EOF
4858 #define HAVE_DECL_FPUTS_UNLOCKED 1
4860 cat >> confdefs.h <<\EOF
4861 #define HAVE_DECL_FWRITE_UNLOCKED 1
4864 cat >> confdefs.h <<\EOF
4865 #define HAVE_DECL_FPRINTF_UNLOCKED 1
4867 cat >> confdefs.h <<\EOF
4868 #define HAVE_DECL_STRSTR 1
4870 cat >> confdefs.h <<\EOF
4871 #define HAVE_DECL_ERRNO 1
4873 cat >> confdefs.h <<\EOF
4874 #define HAVE_DECL_VASPRINTF 1
4877 cat >> confdefs.h <<\EOF
4878 #define HAVE_DECL_MALLOC 1
4880 cat >> confdefs.h <<\EOF
4881 #define HAVE_DECL_REALLOC 1
4883 cat >> confdefs.h <<\EOF
4884 #define HAVE_DECL_CALLOC 1
4886 cat >> confdefs.h <<\EOF
4887 #define HAVE_DECL_FREE 1
4889 cat >> confdefs.h <<\EOF
4890 #define HAVE_DECL_BASENAME 1
4892 cat >> confdefs.h <<\EOF
4893 #define HAVE_DECL_GETOPT 1
4895 cat >> confdefs.h <<\EOF
4896 #define HAVE_DECL_CLOCK 1
4901 for ac_func in getrlimit setrlimit getrusage
4903 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4904 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4905 echo "configure:4906: checking whether $ac_func is declared" >&5
4906 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4907 echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909 cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 #undef $ac_tr_decl
4913 #define $ac_tr_decl 1
4915 #include "ansidecl.h"
4916 #include "system.h"
4917 #ifdef HAVE_SYS_RESOURCE_H
4918 #include <sys/resource.h>
4919 #endif
4922 int main() {
4923 #ifndef $ac_func
4924 char *(*pfn) = (char *(*)) $ac_func ;
4925 #endif
4926 ; return 0; }
4928 if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4929 rm -rf conftest*
4930 eval "gcc_cv_have_decl_$ac_func=yes"
4931 else
4932 echo "configure: failed program was:" >&5
4933 cat conftest.$ac_ext >&5
4934 rm -rf conftest*
4935 eval "gcc_cv_have_decl_$ac_func=no"
4937 rm -f conftest*
4940 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4941 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4942 #define $ac_tr_decl 1
4945 else
4946 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4947 #define $ac_tr_decl 0
4952 done
4953 if test x = y ; then
4954 cat >> confdefs.h <<\EOF
4955 #define HAVE_DECL_GETRLIMIT 1
4957 cat >> confdefs.h <<\EOF
4958 #define HAVE_DECL_SETRLIMIT 1
4960 cat >> confdefs.h <<\EOF
4961 #define HAVE_DECL_GETRUSAGE 1
4966 for ac_func in times
4968 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4969 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
4970 echo "configure:4971: checking whether $ac_func is declared" >&5
4971 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4972 echo $ac_n "(cached) $ac_c" 1>&6
4973 else
4974 cat > conftest.$ac_ext <<EOF
4975 #line 4976 "configure"
4976 #include "confdefs.h"
4977 #undef $ac_tr_decl
4978 #define $ac_tr_decl 1
4980 #include "ansidecl.h"
4981 #include "system.h"
4982 #ifdef HAVE_SYS_TIMES_H
4983 #include <sys/times.h>
4984 #endif
4987 int main() {
4988 #ifndef $ac_func
4989 char *(*pfn) = (char *(*)) $ac_func ;
4990 #endif
4991 ; return 0; }
4993 if { (eval echo configure:4994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4994 rm -rf conftest*
4995 eval "gcc_cv_have_decl_$ac_func=yes"
4996 else
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 rm -rf conftest*
5000 eval "gcc_cv_have_decl_$ac_func=no"
5002 rm -f conftest*
5005 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5006 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5007 #define $ac_tr_decl 1
5010 else
5011 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5012 #define $ac_tr_decl 0
5017 done
5018 if test x = y ; then
5019 cat >> confdefs.h <<\EOF
5020 #define HAVE_DECL_TIMES 1
5025 # More time-related stuff.
5026 echo $ac_n "checking for struct tms""... $ac_c" 1>&6
5027 echo "configure:5028: checking for struct tms" >&5
5028 if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
5029 echo $ac_n "(cached) $ac_c" 1>&6
5030 else
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5036 #include "ansidecl.h"
5037 #include "system.h"
5038 #ifdef HAVE_SYS_TIMES_H
5039 #include <sys/times.h>
5040 #endif
5042 int main() {
5043 struct tms tms;
5044 ; return 0; }
5046 if { (eval echo configure:5047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5047 rm -rf conftest*
5048 ac_cv_struct_tms=yes
5049 else
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 ac_cv_struct_tms=no
5055 rm -f conftest*
5058 echo "$ac_t""$ac_cv_struct_tms" 1>&6
5059 if test $ac_cv_struct_tms = yes; then
5060 cat >> confdefs.h <<\EOF
5061 #define HAVE_STRUCT_TMS 1
5066 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
5067 # revisit after autoconf 2.50.
5068 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
5069 echo "configure:5070: checking for clock_t" >&5
5070 if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
5071 echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5078 #include "ansidecl.h"
5079 #include "system.h"
5081 int main() {
5082 clock_t x;
5083 ; return 0; }
5085 if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5086 rm -rf conftest*
5087 gcc_cv_type_clock_t=yes
5088 else
5089 echo "configure: failed program was:" >&5
5090 cat conftest.$ac_ext >&5
5091 rm -rf conftest*
5092 gcc_cv_type_clock_t=no
5094 rm -f conftest*
5097 echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
5098 if test $gcc_cv_type_clock_t = yes; then
5099 cat >> confdefs.h <<\EOF
5100 #define HAVE_CLOCK_T 1
5105 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
5106 CFLAGS="$saved_CFLAGS"
5108 # Check whether --enable-initfini-array or --disable-initfini-array was given.
5109 if test "${enable_initfini_array+set}" = set; then
5110 enableval="$enable_initfini_array"
5112 else
5114 echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6
5115 echo "configure:5116: checking for .preinit_array/.init_array/.fini_array support" >&5
5116 if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then
5117 echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119 if test "$cross_compiling" = yes; then
5120 gcc_cv_initfini_array=no
5121 else
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5126 static int x = -1;
5127 int main (void) { return x; }
5128 int foo (void) { x = 0; }
5129 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5132 then
5133 gcc_cv_initfini_array=yes
5134 else
5135 echo "configure: failed program was:" >&5
5136 cat conftest.$ac_ext >&5
5137 rm -fr conftest*
5138 gcc_cv_initfini_array=no
5140 rm -fr conftest*
5145 echo "$ac_t""$gcc_cv_initfini_array" 1>&6
5146 enable_initfini_array=$gcc_cv_initfini_array
5150 if test $enable_initfini_array = yes; then
5151 cat >> confdefs.h <<\EOF
5152 #define HAVE_INITFINI_ARRAY 1
5157 # mkdir takes a single argument on some systems.
5158 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
5159 echo "configure:5160: checking if mkdir takes one argument" >&5
5160 if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
5162 else
5163 cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5167 #include <sys/types.h>
5168 #ifdef HAVE_SYS_STAT_H
5169 # include <sys/stat.h>
5170 #endif
5171 #ifdef HAVE_UNISTD_H
5172 # include <unistd.h>
5173 #endif
5174 #ifdef HAVE_DIRECT_H
5175 # include <direct.h>
5176 #endif
5177 int main() {
5178 mkdir ("foo", 0);
5179 ; return 0; }
5181 if { (eval echo configure:5182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5182 rm -rf conftest*
5183 gcc_cv_mkdir_takes_one_arg=no
5184 else
5185 echo "configure: failed program was:" >&5
5186 cat conftest.$ac_ext >&5
5187 rm -rf conftest*
5188 gcc_cv_mkdir_takes_one_arg=yes
5190 rm -f conftest*
5193 echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
5194 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
5195 cat >> confdefs.h <<\EOF
5196 #define MKDIR_TAKES_ONE_ARG 1
5202 # File extensions
5203 manext='.1'
5204 objext='.o'
5208 # With Setjmp/Longjmp based exception handling.
5209 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
5210 if test "${enable_sjlj_exceptions+set}" = set; then
5211 enableval="$enable_sjlj_exceptions"
5212 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
5213 cat >> confdefs.h <<EOF
5214 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
5220 echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6
5221 echo "configure:5222: checking for main in -lunwind" >&5
5222 ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'`
5223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
5225 else
5226 ac_save_LIBS="$LIBS"
5227 LIBS="-lunwind $LIBS"
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5232 int main() {
5233 main()
5234 ; return 0; }
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237 rm -rf conftest*
5238 eval "ac_cv_lib_$ac_lib_var=yes"
5239 else
5240 echo "configure: failed program was:" >&5
5241 cat conftest.$ac_ext >&5
5242 rm -rf conftest*
5243 eval "ac_cv_lib_$ac_lib_var=no"
5245 rm -f conftest*
5246 LIBS="$ac_save_LIBS"
5249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5250 echo "$ac_t""yes" 1>&6
5251 use_libunwind_default=yes
5252 else
5253 echo "$ac_t""no" 1>&6
5254 use_libunwind_default=no
5257 # Use libunwind based exception handling.
5258 # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
5259 if test "${enable_libunwind_exceptions+set}" = set; then
5260 enableval="$enable_libunwind_exceptions"
5261 use_libunwind_exceptions=$enableval
5262 else
5263 use_libunwind_exceptions=$use_libunwind_default
5266 if test x"$use_libunwind_exceptions" = xyes; then
5267 cat >> confdefs.h <<\EOF
5268 #define USE_LIBUNWIND_EXCEPTIONS 1
5273 target_gtfiles=
5274 build_xm_file=
5275 build_xm_defines=
5276 build_install_headers_dir=install-headers-tar
5277 build_exeext=
5278 host_xm_file=
5279 host_xm_defines=
5280 host_xmake_file=
5281 host_truncate_target=
5282 host_exeext=
5284 # Decode the host machine, then the target machine.
5285 # For the host machine, we save the xm_file variable as host_xm_file;
5286 # then we decode the target machine and forget everything else
5287 # that came from the host machine.
5288 for machine in $build $host $target; do
5289 . ${srcdir}/config.gcc
5290 done
5292 extra_objs="${host_extra_objs} ${extra_objs}"
5294 # Default the target-machine variables that were not explicitly set.
5295 if test x"$tm_file" = x
5296 then tm_file=$cpu_type/$cpu_type.h; fi
5298 if test x"$extra_headers" = x
5299 then extra_headers=; fi
5301 if test x$md_file = x
5302 then md_file=$cpu_type/$cpu_type.md; fi
5304 if test x$out_file = x
5305 then out_file=$cpu_type/$cpu_type.c; fi
5307 if test x"$tmake_file" = x
5308 then tmake_file=$cpu_type/t-$cpu_type
5311 if test x"$dwarf2" = xyes
5312 then tm_file="$tm_file tm-dwarf2.h"
5315 # Say what files are being used for the output code and MD file.
5316 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
5317 echo "Using \`$srcdir/config/$md_file' as machine description file."
5319 # If any of the xm_file variables contain nonexistent files, warn
5320 # about them and drop them.
5323 for x in $build_xm_file; do
5324 if test -f $srcdir/config/$x
5325 then bx="$bx $x"
5326 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5328 done
5329 build_xm_file="$bx"
5332 for x in $host_xm_file; do
5333 if test -f $srcdir/config/$x
5334 then hx="$hx $x"
5335 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5337 done
5338 host_xm_file="$hx"
5341 for x in $xm_file; do
5342 if test -f $srcdir/config/$x
5343 then tx="$tx $x"
5344 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
5346 done
5347 xm_file="$tx"
5349 count=a
5350 for f in $tm_file; do
5351 count=${count}x
5352 done
5353 if test $count = ax; then
5354 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
5355 else
5356 echo "Using the following target machine macro files:"
5357 for f in $tm_file; do
5358 echo " $srcdir/config/$f"
5359 done
5362 if test x$need_64bit_hwint = xyes; then
5363 cat >> confdefs.h <<\EOF
5364 #define NEED_64BIT_HOST_WIDE_INT 1
5369 count=a
5370 for f in $host_xm_file; do
5371 count=${count}x
5372 done
5373 if test $count = a; then
5375 elif test $count = ax; then
5376 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5377 else
5378 echo "Using the following host machine macro files:"
5379 for f in $host_xm_file; do
5380 echo " $srcdir/config/$f"
5381 done
5384 if test "$host_xm_file" != "$build_xm_file"; then
5385 count=a
5386 for f in $build_xm_file; do
5387 count=${count}x
5388 done
5389 if test $count = a; then
5391 elif test $count = ax; then
5392 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5393 else
5394 echo "Using the following build machine macro files:"
5395 for f in $build_xm_file; do
5396 echo " $srcdir/config/$f"
5397 done
5401 if test x$thread_file = x; then
5402 if test x$target_thread_file != x; then
5403 thread_file=$target_thread_file
5404 else
5405 thread_file='single'
5409 # Look for a file containing extra machine modes.
5410 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
5411 extra_modes_file='$(srcdir)'/config/${extra_modes}
5413 cat >> confdefs.h <<EOF
5414 #define EXTRA_MODES_FILE "$extra_modes"
5417 cat >> confdefs.h <<\EOF
5418 #define EXTRA_CC_MODES 1
5423 # auto-host.h is the file containing items generated by autoconf and is
5424 # the first file included by config.h.
5425 # If host=build, it is correct to have bconfig include auto-host.h
5426 # as well. If host!=build, we are in error and need to do more
5427 # work to find out the build config parameters.
5428 if test x$host = x$build
5429 then
5430 build_auto=auto-host.h
5431 FORBUILD=..
5432 else
5433 # We create a subdir, then run autoconf in the subdir.
5434 # To prevent recursion we set host and build for the new
5435 # invocation of configure to the build for this invocation
5436 # of configure.
5437 tempdir=build.$$
5438 rm -rf $tempdir
5439 mkdir $tempdir
5440 cd $tempdir
5441 case ${srcdir} in
5442 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
5443 *) realsrcdir=../${srcdir};;
5444 esac
5445 saved_CFLAGS="${CFLAGS}"
5446 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5447 ${realsrcdir}/configure \
5448 --target=$target_alias --host=$build_alias --build=$build_alias
5449 CFLAGS="${saved_CFLAGS}"
5451 # We just finished tests for the build machine, so rename
5452 # the file auto-build.h in the gcc directory.
5453 mv auto-host.h ../auto-build.h
5454 cd ..
5455 rm -rf $tempdir
5456 build_auto=auto-build.h
5457 FORBUILD=../build-$build_alias
5461 tm_file="${tm_file} defaults.h"
5462 tm_p_file="${tm_p_file} tm-preds.h"
5463 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
5464 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
5465 xm_file="ansidecl.h ${xm_file}"
5467 # Truncate the target if necessary
5468 if test x$host_truncate_target != x; then
5469 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5472 # Get the version trigger filename from the toplevel
5473 if test "${with_gcc_version_trigger+set}" = set; then
5474 gcc_version_trigger=$with_gcc_version_trigger
5475 else
5476 gcc_version_trigger=${srcdir}/version.c
5478 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
5479 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
5481 # Compile in configure arguments.
5482 if test -f configargs.h ; then
5483 # Being re-configured.
5484 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
5485 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5486 else
5487 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5489 cat > configargs.h <<EOF
5490 /* Generated automatically. */
5491 static const char configuration_arguments[] = "$gcc_config_arguments";
5492 static const char thread_model[] = "$thread_file";
5495 # Internationalization
5496 PACKAGE=gcc
5497 VERSION="$gcc_version"
5501 # Enable NLS support by default
5502 # Check whether --enable-nls or --disable-nls was given.
5503 if test "${enable_nls+set}" = set; then
5504 enableval="$enable_nls"
5506 else
5507 enable_nls=yes
5511 # if cross compiling, disable NLS support.
5512 # It's not worth the trouble, at least for now.
5514 if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
5515 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5516 enable_nls=no
5521 echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
5522 echo "configure:5523: checking for library containing strerror" >&5
5523 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
5524 echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526 ac_func_search_save_LIBS="$LIBS"
5527 ac_cv_search_strerror="no"
5528 cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5531 /* Override any gcc2 internal prototype to avoid an error. */
5532 /* We use char because int might match the return type of a gcc2
5533 builtin and then its argument prototype would still apply. */
5534 char strerror();
5536 int main() {
5537 strerror()
5538 ; return 0; }
5540 if { (eval echo configure:5541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5541 rm -rf conftest*
5542 ac_cv_search_strerror="none required"
5543 else
5544 echo "configure: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5547 rm -f conftest*
5548 test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5549 LIBS="-l$i $ac_func_search_save_LIBS"
5550 cat > conftest.$ac_ext <<EOF
5551 #line 5552 "configure"
5552 #include "confdefs.h"
5553 /* Override any gcc2 internal prototype to avoid an error. */
5554 /* We use char because int might match the return type of a gcc2
5555 builtin and then its argument prototype would still apply. */
5556 char strerror();
5558 int main() {
5559 strerror()
5560 ; return 0; }
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563 rm -rf conftest*
5564 ac_cv_search_strerror="-l$i"
5565 break
5566 else
5567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5570 rm -f conftest*
5571 done
5572 LIBS="$ac_func_search_save_LIBS"
5575 echo "$ac_t""$ac_cv_search_strerror" 1>&6
5576 if test "$ac_cv_search_strerror" != "no"; then
5577 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5579 else :
5584 echo $ac_n "checking for working const""... $ac_c" 1>&6
5585 echo "configure:5586: checking for working const" >&5
5586 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5587 echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5593 int main() {
5595 /* Ultrix mips cc rejects this. */
5596 typedef int charset[2]; const charset x;
5597 /* SunOS 4.1.1 cc rejects this. */
5598 char const *const *ccp;
5599 char **p;
5600 /* NEC SVR4.0.2 mips cc rejects this. */
5601 struct point {int x, y;};
5602 static struct point const zero = {0,0};
5603 /* AIX XL C 1.02.0.0 rejects this.
5604 It does not let you subtract one const X* pointer from another in an arm
5605 of an if-expression whose if-part is not a constant expression */
5606 const char *g = "string";
5607 ccp = &g + (g ? g-g : 0);
5608 /* HPUX 7.0 cc rejects these. */
5609 ++ccp;
5610 p = (char**) ccp;
5611 ccp = (char const *const *) p;
5612 { /* SCO 3.2v4 cc rejects this. */
5613 char *t;
5614 char const *s = 0 ? (char *) 0 : (char const *) 0;
5616 *t++ = 0;
5618 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5619 int x[] = {25, 17};
5620 const int *foo = &x[0];
5621 ++foo;
5623 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5624 typedef const int *iptr;
5625 iptr p = 0;
5626 ++p;
5628 { /* AIX XL C 1.02.0.0 rejects this saying
5629 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5630 struct s { int j; const int *ap[3]; };
5631 struct s *b; b->j = 5;
5633 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5634 const int foo = 10;
5637 ; return 0; }
5639 if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5640 rm -rf conftest*
5641 ac_cv_c_const=yes
5642 else
5643 echo "configure: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 rm -rf conftest*
5646 ac_cv_c_const=no
5648 rm -f conftest*
5651 echo "$ac_t""$ac_cv_c_const" 1>&6
5652 if test $ac_cv_c_const = no; then
5653 cat >> confdefs.h <<\EOF
5654 #define const
5659 echo $ac_n "checking for off_t""... $ac_c" 1>&6
5660 echo "configure:5661: checking for off_t" >&5
5661 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5662 echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664 cat > conftest.$ac_ext <<EOF
5665 #line 5666 "configure"
5666 #include "confdefs.h"
5667 #include <sys/types.h>
5668 #if STDC_HEADERS
5669 #include <stdlib.h>
5670 #include <stddef.h>
5671 #endif
5673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5674 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5675 rm -rf conftest*
5676 ac_cv_type_off_t=yes
5677 else
5678 rm -rf conftest*
5679 ac_cv_type_off_t=no
5681 rm -f conftest*
5684 echo "$ac_t""$ac_cv_type_off_t" 1>&6
5685 if test $ac_cv_type_off_t = no; then
5686 cat >> confdefs.h <<\EOF
5687 #define off_t long
5692 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5693 echo "configure:5694: checking for size_t" >&5
5694 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5695 echo $ac_n "(cached) $ac_c" 1>&6
5696 else
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 #include <sys/types.h>
5701 #if STDC_HEADERS
5702 #include <stdlib.h>
5703 #include <stddef.h>
5704 #endif
5706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5707 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5708 rm -rf conftest*
5709 ac_cv_type_size_t=yes
5710 else
5711 rm -rf conftest*
5712 ac_cv_type_size_t=no
5714 rm -f conftest*
5717 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5718 if test $ac_cv_type_size_t = no; then
5719 cat >> confdefs.h <<\EOF
5720 #define size_t unsigned
5725 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5726 # for constant arguments. Useless!
5727 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5728 echo "configure:5729: checking for working alloca.h" >&5
5729 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5730 echo $ac_n "(cached) $ac_c" 1>&6
5731 else
5732 cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735 #include <alloca.h>
5736 int main() {
5737 char *p = alloca(2 * sizeof(int));
5738 ; return 0; }
5740 if { (eval echo configure:5741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5741 rm -rf conftest*
5742 ac_cv_header_alloca_h=yes
5743 else
5744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5746 rm -rf conftest*
5747 ac_cv_header_alloca_h=no
5749 rm -f conftest*
5752 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5753 if test $ac_cv_header_alloca_h = yes; then
5754 cat >> confdefs.h <<\EOF
5755 #define HAVE_ALLOCA_H 1
5760 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5761 echo "configure:5762: checking for alloca" >&5
5762 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5763 echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5769 #ifdef __GNUC__
5770 # define alloca __builtin_alloca
5771 #else
5772 # ifdef _MSC_VER
5773 # include <malloc.h>
5774 # define alloca _alloca
5775 # else
5776 # if HAVE_ALLOCA_H
5777 # include <alloca.h>
5778 # else
5779 # ifdef _AIX
5780 #pragma alloca
5781 # else
5782 # ifndef alloca /* predefined by HP cc +Olibcalls */
5783 char *alloca ();
5784 # endif
5785 # endif
5786 # endif
5787 # endif
5788 #endif
5790 int main() {
5791 char *p = (char *) alloca(1);
5792 ; return 0; }
5794 if { (eval echo configure:5795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5795 rm -rf conftest*
5796 ac_cv_func_alloca_works=yes
5797 else
5798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5800 rm -rf conftest*
5801 ac_cv_func_alloca_works=no
5803 rm -f conftest*
5806 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5807 if test $ac_cv_func_alloca_works = yes; then
5808 cat >> confdefs.h <<\EOF
5809 #define HAVE_ALLOCA 1
5814 if test $ac_cv_func_alloca_works = no; then
5815 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5816 # that cause trouble. Some versions do not even contain alloca or
5817 # contain a buggy version. If you still want to use their alloca,
5818 # use ar to extract alloca.o from them instead of compiling alloca.c.
5819 ALLOCA=alloca.${ac_objext}
5820 cat >> confdefs.h <<\EOF
5821 #define C_ALLOCA 1
5825 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5826 echo "configure:5827: checking whether alloca needs Cray hooks" >&5
5827 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5828 echo $ac_n "(cached) $ac_c" 1>&6
5829 else
5830 cat > conftest.$ac_ext <<EOF
5831 #line 5832 "configure"
5832 #include "confdefs.h"
5833 #if defined(CRAY) && ! defined(CRAY2)
5834 webecray
5835 #else
5836 wenotbecray
5837 #endif
5840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5841 egrep "webecray" >/dev/null 2>&1; then
5842 rm -rf conftest*
5843 ac_cv_os_cray=yes
5844 else
5845 rm -rf conftest*
5846 ac_cv_os_cray=no
5848 rm -f conftest*
5852 echo "$ac_t""$ac_cv_os_cray" 1>&6
5853 if test $ac_cv_os_cray = yes; then
5854 for ac_func in _getb67 GETB67 getb67; do
5855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5856 echo "configure:5857: checking for $ac_func" >&5
5857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5858 echo $ac_n "(cached) $ac_c" 1>&6
5859 else
5860 cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 /* System header to define __stub macros and hopefully few prototypes,
5864 which can conflict with char $ac_func(); below. */
5865 #include <assert.h>
5866 /* Override any gcc2 internal prototype to avoid an error. */
5867 /* We use char because int might match the return type of a gcc2
5868 builtin and then its argument prototype would still apply. */
5869 char $ac_func();
5871 int main() {
5873 /* The GNU C library defines this for functions which it implements
5874 to always fail with ENOSYS. Some functions are actually named
5875 something starting with __ and the normal name is an alias. */
5876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5877 choke me
5878 #else
5879 $ac_func();
5880 #endif
5882 ; return 0; }
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885 rm -rf conftest*
5886 eval "ac_cv_func_$ac_func=yes"
5887 else
5888 echo "configure: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 rm -rf conftest*
5891 eval "ac_cv_func_$ac_func=no"
5893 rm -f conftest*
5896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5897 echo "$ac_t""yes" 1>&6
5898 cat >> confdefs.h <<EOF
5899 #define CRAY_STACKSEG_END $ac_func
5902 break
5903 else
5904 echo "$ac_t""no" 1>&6
5907 done
5910 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5911 echo "configure:5912: checking stack direction for C alloca" >&5
5912 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5913 echo $ac_n "(cached) $ac_c" 1>&6
5914 else
5915 if test "$cross_compiling" = yes; then
5916 ac_cv_c_stack_direction=0
5917 else
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921 find_stack_direction ()
5923 static char *addr = 0;
5924 auto char dummy;
5925 if (addr == 0)
5927 addr = &dummy;
5928 return find_stack_direction ();
5930 else
5931 return (&dummy > addr) ? 1 : -1;
5933 main ()
5935 exit (find_stack_direction() < 0);
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5939 then
5940 ac_cv_c_stack_direction=1
5941 else
5942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 rm -fr conftest*
5945 ac_cv_c_stack_direction=-1
5947 rm -fr conftest*
5952 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5953 cat >> confdefs.h <<EOF
5954 #define STACK_DIRECTION $ac_cv_c_stack_direction
5960 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
5961 echo "configure:5962: checking whether we are using the GNU C Library 2.1 or newer" >&5
5962 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5963 echo $ac_n "(cached) $ac_c" 1>&6
5964 else
5965 cat > conftest.$ac_ext <<EOF
5966 #line 5967 "configure"
5967 #include "confdefs.h"
5969 #include <features.h>
5970 #ifdef __GNU_LIBRARY__
5971 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5972 Lucky GNU user
5973 #endif
5974 #endif
5977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5978 egrep "Lucky GNU user" >/dev/null 2>&1; then
5979 rm -rf conftest*
5980 ac_cv_gnu_library_2_1=yes
5981 else
5982 rm -rf conftest*
5983 ac_cv_gnu_library_2_1=no
5985 rm -f conftest*
5991 echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5993 GLIBC21="$ac_cv_gnu_library_2_1"
5997 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5998 stdlib.h string.h unistd.h sys/param.h
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 #include <$ac_hdr>
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6015 rm -rf conftest*
6016 eval "ac_cv_header_$ac_safe=yes"
6017 else
6018 echo "$ac_err" >&5
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6021 rm -rf conftest*
6022 eval "ac_cv_header_$ac_safe=no"
6024 rm -f conftest*
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027 echo "$ac_t""yes" 1>&6
6028 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029 cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6033 else
6034 echo "$ac_t""no" 1>&6
6036 done
6038 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6039 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6040 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6042 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6043 echo "configure:6044: checking for $ac_func" >&5
6044 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6045 echo $ac_n "(cached) $ac_c" 1>&6
6046 else
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* System header to define __stub macros and hopefully few prototypes,
6051 which can conflict with char $ac_func(); below. */
6052 #include <assert.h>
6053 /* Override any gcc2 internal prototype to avoid an error. */
6054 /* We use char because int might match the return type of a gcc2
6055 builtin and then its argument prototype would still apply. */
6056 char $ac_func();
6058 int main() {
6060 /* The GNU C library defines this for functions which it implements
6061 to always fail with ENOSYS. Some functions are actually named
6062 something starting with __ and the normal name is an alias. */
6063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6064 choke me
6065 #else
6066 $ac_func();
6067 #endif
6069 ; return 0; }
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6072 rm -rf conftest*
6073 eval "ac_cv_func_$ac_func=yes"
6074 else
6075 echo "configure: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 rm -rf conftest*
6078 eval "ac_cv_func_$ac_func=no"
6080 rm -f conftest*
6083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6084 echo "$ac_t""yes" 1>&6
6085 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6086 cat >> confdefs.h <<EOF
6087 #define $ac_tr_func 1
6090 else
6091 echo "$ac_t""no" 1>&6
6093 done
6098 am_cv_lib_iconv_ldpath=
6099 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6100 if test "${with_libiconv_prefix+set}" = set; then
6101 withval="$with_libiconv_prefix"
6103 for dir in `echo "$withval" | tr : ' '`; do
6104 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6105 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
6106 done
6111 echo $ac_n "checking for iconv""... $ac_c" 1>&6
6112 echo "configure:6113: checking for iconv" >&5
6113 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
6114 echo $ac_n "(cached) $ac_c" 1>&6
6115 else
6117 am_cv_func_iconv="no, consider installing GNU libiconv"
6118 am_cv_lib_iconv=no
6119 cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122 #include <stdlib.h>
6123 #include <iconv.h>
6124 int main() {
6125 iconv_t cd = iconv_open("","");
6126 iconv(cd,NULL,NULL,NULL,NULL);
6127 iconv_close(cd);
6128 ; return 0; }
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131 rm -rf conftest*
6132 am_cv_func_iconv=yes
6133 else
6134 echo "configure: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6137 rm -f conftest*
6138 if test "$am_cv_func_iconv" != yes; then
6139 am_save_LIBS="$LIBS"
6140 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
6141 cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 #include <stdlib.h>
6145 #include <iconv.h>
6146 int main() {
6147 iconv_t cd = iconv_open("","");
6148 iconv(cd,NULL,NULL,NULL,NULL);
6149 iconv_close(cd);
6150 ; return 0; }
6152 if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6153 rm -rf conftest*
6154 am_cv_lib_iconv=yes
6155 am_cv_func_iconv=yes
6156 else
6157 echo "configure: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6160 rm -f conftest*
6161 LIBS="$am_save_LIBS"
6166 echo "$ac_t""$am_cv_func_iconv" 1>&6
6167 if test "$am_cv_func_iconv" = yes; then
6168 cat >> confdefs.h <<\EOF
6169 #define HAVE_ICONV 1
6172 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
6173 echo "configure:6174: checking for iconv declaration" >&5
6174 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
6175 echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6182 #include <stdlib.h>
6183 #include <iconv.h>
6184 extern
6185 #ifdef __cplusplus
6187 #endif
6188 #if defined(__STDC__) || defined(__cplusplus)
6189 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6190 #else
6191 size_t iconv();
6192 #endif
6194 int main() {
6196 ; return 0; }
6198 if { (eval echo configure:6199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6199 rm -rf conftest*
6200 am_cv_proto_iconv_arg1=""
6201 else
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6204 rm -rf conftest*
6205 am_cv_proto_iconv_arg1="const"
6207 rm -f conftest*
6208 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);"
6211 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6212 echo "$ac_t""${ac_t:-
6213 }$am_cv_proto_iconv" 1>&6
6214 cat >> confdefs.h <<EOF
6215 #define ICONV_CONST $am_cv_proto_iconv_arg1
6219 LIBICONV=
6220 if test "$am_cv_lib_iconv" = yes; then
6221 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
6226 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
6227 echo "configure:6228: checking for nl_langinfo and CODESET" >&5
6228 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
6229 echo $ac_n "(cached) $ac_c" 1>&6
6230 else
6231 cat > conftest.$ac_ext <<EOF
6232 #line 6233 "configure"
6233 #include "confdefs.h"
6234 #include <langinfo.h>
6235 int main() {
6236 char* cs = nl_langinfo(CODESET);
6237 ; return 0; }
6239 if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6240 rm -rf conftest*
6241 am_cv_langinfo_codeset=yes
6242 else
6243 echo "configure: failed program was:" >&5
6244 cat conftest.$ac_ext >&5
6245 rm -rf conftest*
6246 am_cv_langinfo_codeset=no
6248 rm -f conftest*
6252 echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
6253 if test $am_cv_langinfo_codeset = yes; then
6254 cat >> confdefs.h <<\EOF
6255 #define HAVE_LANGINFO_CODESET 1
6260 if test $ac_cv_header_locale_h = yes; then
6261 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
6262 echo "configure:6263: checking for LC_MESSAGES" >&5
6263 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
6264 echo $ac_n "(cached) $ac_c" 1>&6
6265 else
6266 cat > conftest.$ac_ext <<EOF
6267 #line 6268 "configure"
6268 #include "confdefs.h"
6269 #include <locale.h>
6270 int main() {
6271 return LC_MESSAGES
6272 ; return 0; }
6274 if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6275 rm -rf conftest*
6276 am_cv_val_LC_MESSAGES=yes
6277 else
6278 echo "configure: failed program was:" >&5
6279 cat conftest.$ac_ext >&5
6280 rm -rf conftest*
6281 am_cv_val_LC_MESSAGES=no
6283 rm -f conftest*
6286 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
6287 if test $am_cv_val_LC_MESSAGES = yes; then
6288 cat >> confdefs.h <<\EOF
6289 #define HAVE_LC_MESSAGES 1
6294 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
6295 echo "configure:6296: checking whether NLS is requested" >&5
6296 # Check whether --enable-nls or --disable-nls was given.
6297 if test "${enable_nls+set}" = set; then
6298 enableval="$enable_nls"
6299 USE_NLS=$enableval
6300 else
6301 USE_NLS=yes
6304 echo "$ac_t""$USE_NLS" 1>&6
6307 BUILD_INCLUDED_LIBINTL=no
6308 USE_INCLUDED_LIBINTL=no
6309 INTLLIBS=
6310 INTLDEPS=
6312 if test "$USE_NLS" = "yes"; then
6313 cat >> confdefs.h <<\EOF
6314 #define ENABLE_NLS 1
6317 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
6318 echo "configure:6319: checking whether included gettext is requested" >&5
6319 # Check whether --with-included-gettext or --without-included-gettext was given.
6320 if test "${with_included_gettext+set}" = set; then
6321 withval="$with_included_gettext"
6322 nls_cv_force_use_gnu_gettext=$withval
6323 else
6324 nls_cv_force_use_gnu_gettext=no
6327 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
6329 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6330 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6331 CATOBJEXT=NONE
6336 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
6337 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
6338 echo "configure:6339: checking for libintl.h" >&5
6339 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6340 echo $ac_n "(cached) $ac_c" 1>&6
6341 else
6342 cat > conftest.$ac_ext <<EOF
6343 #line 6344 "configure"
6344 #include "confdefs.h"
6345 #include <libintl.h>
6347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6348 { (eval echo configure:6349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6350 if test -z "$ac_err"; then
6351 rm -rf conftest*
6352 eval "ac_cv_header_$ac_safe=yes"
6353 else
6354 echo "$ac_err" >&5
6355 echo "configure: failed program was:" >&5
6356 cat conftest.$ac_ext >&5
6357 rm -rf conftest*
6358 eval "ac_cv_header_$ac_safe=no"
6360 rm -f conftest*
6362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6363 echo "$ac_t""yes" 1>&6
6364 cat >> confdefs.h <<\EOF
6365 #define HAVE_LIBINTL_H 1
6368 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
6369 echo "configure:6370: checking for GNU gettext in libc" >&5
6370 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
6371 echo $ac_n "(cached) $ac_c" 1>&6
6372 else
6373 cat > conftest.$ac_ext <<EOF
6374 #line 6375 "configure"
6375 #include "confdefs.h"
6376 #include <libintl.h>
6377 extern int _nl_msg_cat_cntr;
6378 int main() {
6379 bindtextdomain ("", "");
6380 return (int) gettext ("") + _nl_msg_cat_cntr
6381 ; return 0; }
6383 if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384 rm -rf conftest*
6385 gt_cv_func_gnugettext1_libc=yes
6386 else
6387 echo "configure: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6389 rm -rf conftest*
6390 gt_cv_func_gnugettext1_libc=no
6392 rm -f conftest*
6395 echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
6397 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6398 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
6399 echo "configure:6400: checking for GNU gettext in libintl" >&5
6400 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
6401 echo $ac_n "(cached) $ac_c" 1>&6
6402 else
6403 gt_save_LIBS="$LIBS"
6404 LIBS="$LIBS -lintl $LIBICONV"
6405 cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408 #include <libintl.h>
6409 extern int _nl_msg_cat_cntr;
6410 int main() {
6411 bindtextdomain ("", "");
6412 return (int) gettext ("") + _nl_msg_cat_cntr
6413 ; return 0; }
6415 if { (eval echo configure:6416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6416 rm -rf conftest*
6417 gt_cv_func_gnugettext1_libintl=yes
6418 else
6419 echo "configure: failed program was:" >&5
6420 cat conftest.$ac_ext >&5
6421 rm -rf conftest*
6422 gt_cv_func_gnugettext1_libintl=no
6424 rm -f conftest*
6425 LIBS="$gt_save_LIBS"
6428 echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6431 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6432 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6433 && test "$PACKAGE" != gettext; }; then
6434 cat >> confdefs.h <<\EOF
6435 #define HAVE_GETTEXT 1
6439 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6440 INTLLIBS="-lintl $LIBICONV"
6443 gt_save_LIBS="$LIBS"
6444 LIBS="$LIBS $INTLLIBS"
6445 for ac_func in dcgettext
6447 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6448 echo "configure:6449: checking for $ac_func" >&5
6449 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6450 echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452 cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 /* System header to define __stub macros and hopefully few prototypes,
6456 which can conflict with char $ac_func(); below. */
6457 #include <assert.h>
6458 /* Override any gcc2 internal prototype to avoid an error. */
6459 /* We use char because int might match the return type of a gcc2
6460 builtin and then its argument prototype would still apply. */
6461 char $ac_func();
6463 int main() {
6465 /* The GNU C library defines this for functions which it implements
6466 to always fail with ENOSYS. Some functions are actually named
6467 something starting with __ and the normal name is an alias. */
6468 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6469 choke me
6470 #else
6471 $ac_func();
6472 #endif
6474 ; return 0; }
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6477 rm -rf conftest*
6478 eval "ac_cv_func_$ac_func=yes"
6479 else
6480 echo "configure: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 rm -rf conftest*
6483 eval "ac_cv_func_$ac_func=no"
6485 rm -f conftest*
6488 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6489 echo "$ac_t""yes" 1>&6
6490 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6491 cat >> confdefs.h <<EOF
6492 #define $ac_tr_func 1
6495 else
6496 echo "$ac_t""no" 1>&6
6498 done
6500 LIBS="$gt_save_LIBS"
6502 # Extract the first word of "msgfmt", so it can be a program name with args.
6503 set dummy msgfmt; ac_word=$2
6504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6505 echo "configure:6506: checking for $ac_word" >&5
6506 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6507 echo $ac_n "(cached) $ac_c" 1>&6
6508 else
6509 case "$MSGFMT" in
6511 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6515 for ac_dir in $PATH; do
6516 test -z "$ac_dir" && ac_dir=.
6517 if test -f $ac_dir/$ac_word; then
6518 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6519 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6520 break
6523 done
6524 IFS="$ac_save_ifs"
6525 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6527 esac
6529 MSGFMT="$ac_cv_path_MSGFMT"
6530 if test "$MSGFMT" != ":"; then
6531 echo "$ac_t""$MSGFMT" 1>&6
6532 else
6533 echo "$ac_t""no" 1>&6
6536 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6537 set dummy gmsgfmt; ac_word=$2
6538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6539 echo "configure:6540: checking for $ac_word" >&5
6540 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6541 echo $ac_n "(cached) $ac_c" 1>&6
6542 else
6543 case "$GMSGFMT" in
6545 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6547 ?:/*)
6548 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6552 ac_dummy="$PATH"
6553 for ac_dir in $ac_dummy; do
6554 test -z "$ac_dir" && ac_dir=.
6555 if test -f $ac_dir/$ac_word; then
6556 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6557 break
6559 done
6560 IFS="$ac_save_ifs"
6561 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6563 esac
6565 GMSGFMT="$ac_cv_path_GMSGFMT"
6566 if test -n "$GMSGFMT"; then
6567 echo "$ac_t""$GMSGFMT" 1>&6
6568 else
6569 echo "$ac_t""no" 1>&6
6573 # Extract the first word of "xgettext", so it can be a program name with args.
6574 set dummy xgettext; ac_word=$2
6575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6576 echo "configure:6577: checking for $ac_word" >&5
6577 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6578 echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580 case "$XGETTEXT" in
6582 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6585 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6586 for ac_dir in $PATH; do
6587 test -z "$ac_dir" && ac_dir=.
6588 if test -f $ac_dir/$ac_word; then
6589 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6590 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6591 break
6594 done
6595 IFS="$ac_save_ifs"
6596 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6598 esac
6600 XGETTEXT="$ac_cv_path_XGETTEXT"
6601 if test "$XGETTEXT" != ":"; then
6602 echo "$ac_t""$XGETTEXT" 1>&6
6603 else
6604 echo "$ac_t""no" 1>&6
6608 CATOBJEXT=.gmo
6611 else
6612 echo "$ac_t""no" 1>&6
6616 if test "$CATOBJEXT" = "NONE"; then
6617 nls_cv_use_gnu_gettext=yes
6621 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6622 INTLOBJS="\$(GETTOBJS)"
6623 # Extract the first word of "msgfmt", so it can be a program name with args.
6624 set dummy msgfmt; ac_word=$2
6625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6626 echo "configure:6627: checking for $ac_word" >&5
6627 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
6628 echo $ac_n "(cached) $ac_c" 1>&6
6629 else
6630 case "$MSGFMT" in
6632 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6636 for ac_dir in $PATH; do
6637 test -z "$ac_dir" && ac_dir=.
6638 if test -f $ac_dir/$ac_word; then
6639 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6640 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6641 break
6644 done
6645 IFS="$ac_save_ifs"
6646 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6648 esac
6650 MSGFMT="$ac_cv_path_MSGFMT"
6651 if test "$MSGFMT" != ":"; then
6652 echo "$ac_t""$MSGFMT" 1>&6
6653 else
6654 echo "$ac_t""no" 1>&6
6657 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6658 set dummy gmsgfmt; ac_word=$2
6659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6660 echo "configure:6661: checking for $ac_word" >&5
6661 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
6662 echo $ac_n "(cached) $ac_c" 1>&6
6663 else
6664 case "$GMSGFMT" in
6666 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6668 ?:/*)
6669 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
6672 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6673 ac_dummy="$PATH"
6674 for ac_dir in $ac_dummy; do
6675 test -z "$ac_dir" && ac_dir=.
6676 if test -f $ac_dir/$ac_word; then
6677 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6678 break
6680 done
6681 IFS="$ac_save_ifs"
6682 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6684 esac
6686 GMSGFMT="$ac_cv_path_GMSGFMT"
6687 if test -n "$GMSGFMT"; then
6688 echo "$ac_t""$GMSGFMT" 1>&6
6689 else
6690 echo "$ac_t""no" 1>&6
6693 # Extract the first word of "xgettext", so it can be a program name with args.
6694 set dummy xgettext; ac_word=$2
6695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6696 echo "configure:6697: checking for $ac_word" >&5
6697 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
6698 echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700 case "$XGETTEXT" in
6702 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6705 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6706 for ac_dir in $PATH; do
6707 test -z "$ac_dir" && ac_dir=.
6708 if test -f $ac_dir/$ac_word; then
6709 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6710 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6711 break
6714 done
6715 IFS="$ac_save_ifs"
6716 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6718 esac
6720 XGETTEXT="$ac_cv_path_XGETTEXT"
6721 if test "$XGETTEXT" != ":"; then
6722 echo "$ac_t""$XGETTEXT" 1>&6
6723 else
6724 echo "$ac_t""no" 1>&6
6728 BUILD_INCLUDED_LIBINTL=yes
6729 USE_INCLUDED_LIBINTL=yes
6730 CATOBJEXT=.gmo
6731 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
6732 INTLDEPS="\$(top_builddir)/intl/libintl.a"
6733 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6736 if test "$GMSGFMT" != ":"; then
6737 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6739 else
6740 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6741 GMSGFMT=":"
6745 if test "$XGETTEXT" != ":"; then
6746 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6748 else
6749 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6750 XGETTEXT=":"
6754 POSUB=po
6759 if test "$PACKAGE" = gettext; then
6760 BUILD_INCLUDED_LIBINTL=yes
6763 for ac_prog in bison
6765 # Extract the first word of "$ac_prog", so it can be a program name with args.
6766 set dummy $ac_prog; ac_word=$2
6767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6768 echo "configure:6769: checking for $ac_word" >&5
6769 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6770 echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772 if test -n "$INTLBISON"; then
6773 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6774 else
6775 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6776 ac_dummy="$PATH"
6777 for ac_dir in $ac_dummy; do
6778 test -z "$ac_dir" && ac_dir=.
6779 if test -f $ac_dir/$ac_word; then
6780 ac_cv_prog_INTLBISON="$ac_prog"
6781 break
6783 done
6784 IFS="$ac_save_ifs"
6787 INTLBISON="$ac_cv_prog_INTLBISON"
6788 if test -n "$INTLBISON"; then
6789 echo "$ac_t""$INTLBISON" 1>&6
6790 else
6791 echo "$ac_t""no" 1>&6
6794 test -n "$INTLBISON" && break
6795 done
6797 if test -z "$INTLBISON"; then
6798 ac_verc_fail=yes
6799 else
6800 echo $ac_n "checking version of bison""... $ac_c" 1>&6
6801 echo "configure:6802: checking version of bison" >&5
6802 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6803 case $ac_prog_version in
6804 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6805 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6806 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6807 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6808 esac
6809 echo "$ac_t""$ac_prog_version" 1>&6
6811 if test $ac_verc_fail = yes; then
6812 INTLBISON=:
6824 if test $USE_INCLUDED_LIBINTL = yes; then
6825 cat >> confdefs.h <<\EOF
6826 #define USE_INCLUDED_LIBINTL 1
6831 nls_cv_header_intl=
6832 nls_cv_header_libgt=
6834 DATADIRNAME=share
6837 INSTOBJEXT=.mo
6840 GENCAT=gencat
6844 if test "x$CATOBJEXT" != x; then
6845 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
6846 echo "configure:6847: checking for catalogs to be installed" >&5
6847 # Look for .po and .gmo files in the source directory.
6848 CATALOGS=
6849 XLINGUAS=
6850 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6851 # If there aren't any .gmo files the shell will give us the
6852 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6853 # weeded out.
6854 case "$cat" in *\**)
6855 continue;;
6856 esac
6857 # The quadruple backslash is collapsed to a double backslash
6858 # by the backticks, then collapsed again by the double quotes,
6859 # leaving us with one backslash in the sed expression (right
6860 # before the dot that mustn't act as a wildcard). The dot to
6861 # be escaped in the second expression is hiding inside CATOBJEXT.
6862 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6863 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6864 # The user is allowed to set LINGUAS to a list of languages to
6865 # install catalogs for. If it's empty that means "all of them."
6866 if test "x$LINGUAS" = x; then
6867 CATALOGS="$CATALOGS $cat"
6868 XLINGUAS="$XLINGUAS $lang"
6869 else
6870 case "$LINGUAS" in *$lang*)
6871 CATALOGS="$CATALOGS $cat"
6872 XLINGUAS="$XLINGUAS $lang"
6874 esac
6876 done
6877 LINGUAS="$XLINGUAS"
6878 echo "$ac_t""$LINGUAS" 1>&6
6881 MKINSTALLDIRS=
6882 if test -n "$ac_aux_dir"; then
6883 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6885 if test -z "$MKINSTALLDIRS"; then
6886 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6890 INTL_LIBTOOL_SUFFIX_PREFIX=
6894 # Windows32 Registry support for specifying GCC installation paths.
6895 # Check whether --enable-win32-registry or --disable-win32-registry was given.
6896 if test "${enable_win32_registry+set}" = set; then
6897 enableval="$enable_win32_registry"
6901 case $host_os in
6902 win32 | pe | cygwin* | mingw32* | uwin*)
6903 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
6904 echo "configure:6905: checking whether windows registry support is requested" >&5
6905 if test "x$enable_win32_registry" != xno; then
6906 cat >> confdefs.h <<\EOF
6907 #define ENABLE_WIN32_REGISTRY 1
6910 echo "$ac_t""yes" 1>&6
6912 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
6913 echo "configure:6914: checking for library containing RegOpenKeyExA" >&5
6914 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6915 echo $ac_n "(cached) $ac_c" 1>&6
6916 else
6917 ac_func_search_save_LIBS="$LIBS"
6918 ac_cv_search_RegOpenKeyExA="no"
6919 cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6922 /* Override any gcc2 internal prototype to avoid an error. */
6923 /* We use char because int might match the return type of a gcc2
6924 builtin and then its argument prototype would still apply. */
6925 char RegOpenKeyExA();
6927 int main() {
6928 RegOpenKeyExA()
6929 ; return 0; }
6931 if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932 rm -rf conftest*
6933 ac_cv_search_RegOpenKeyExA="none required"
6934 else
6935 echo "configure: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6938 rm -f conftest*
6939 test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6940 LIBS="-l$i $ac_func_search_save_LIBS"
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 /* Override any gcc2 internal prototype to avoid an error. */
6945 /* We use char because int might match the return type of a gcc2
6946 builtin and then its argument prototype would still apply. */
6947 char RegOpenKeyExA();
6949 int main() {
6950 RegOpenKeyExA()
6951 ; return 0; }
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954 rm -rf conftest*
6955 ac_cv_search_RegOpenKeyExA="-l$i"
6956 break
6957 else
6958 echo "configure: failed program was:" >&5
6959 cat conftest.$ac_ext >&5
6961 rm -f conftest*
6962 done
6963 LIBS="$ac_func_search_save_LIBS"
6966 echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6967 if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6968 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6970 else :
6973 else
6974 echo "$ac_t""no" 1>&6
6977 # Check if user specified a different registry key.
6978 case "x${enable_win32_registry}" in
6979 x | xyes)
6980 # default.
6981 gcc_cv_win32_registry_key="$VERSION"
6983 xno)
6984 # no registry lookup.
6985 gcc_cv_win32_registry_key=''
6988 # user-specified key.
6989 gcc_cv_win32_registry_key="$enable_win32_registry"
6991 esac
6993 if test "x$enable_win32_registry" != xno; then
6994 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
6995 echo "configure:6996: checking registry key on windows hosts" >&5
6996 cat >> confdefs.h <<EOF
6997 #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
7000 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
7003 esac
7005 # Get an absolute path to the GCC top-level source directory
7006 holddir=`${PWDCMD-pwd}`
7007 cd $srcdir
7008 topdir=`${PWDCMD-pwd}`
7009 cd $holddir
7011 # Conditionalize the makefile for this host machine.
7012 # Make-host contains the concatenation of all host makefile fragments
7013 # [there can be more than one]. This file is built by configure.frag.
7014 host_overrides=Make-host
7015 dep_host_xmake_file=
7016 for f in .. ${host_xmake_file}
7018 if test -f ${srcdir}/config/$f
7019 then
7020 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
7022 done
7024 # Conditionalize the makefile for this target machine.
7025 # Make-target contains the concatenation of all host makefile fragments
7026 # [there can be more than one]. This file is built by configure.frag.
7027 target_overrides=Make-target
7028 dep_tmake_file=
7029 for f in .. ${tmake_file}
7031 if test -f ${srcdir}/config/$f
7032 then
7033 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
7035 done
7037 # If the host doesn't support symlinks, modify CC in
7038 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
7039 # Otherwise, we can use "CC=$(CC)".
7040 rm -f symtest.tem
7041 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
7042 then
7043 cc_set_by_configure="\$(CC)"
7044 quoted_cc_set_by_configure="\$(CC)"
7045 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7046 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
7047 else
7048 rm -f symtest.tem
7049 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
7050 then
7051 symbolic_link="cp -p"
7052 else
7053 symbolic_link="cp"
7055 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
7056 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
7057 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
7058 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
7060 rm -f symtest.tem
7062 out_object_file=`basename $out_file .c`.o
7064 tm_file_list=
7065 for f in $tm_file; do
7066 case $f in
7067 ansidecl.h )
7068 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7069 defaults.h )
7070 tm_file_list="${tm_file_list} \$(srcdir)/$f" ;;
7071 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
7072 esac
7073 done
7075 tm_p_file_list=
7076 for f in $tm_p_file; do
7077 case $f in
7078 tm-preds.h )
7079 tm_p_file_list="${tm_p_file_list} $f" ;;
7080 *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;;
7081 esac
7082 done
7084 host_xm_file_list=
7085 for f in $host_xm_file; do
7086 case $f in
7087 ansidecl.h )
7088 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7089 auto-host.h )
7090 host_xm_file_list="${host_xm_file_list} $f" ;;
7091 defaults.h )
7092 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7093 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
7094 esac
7095 done
7097 build_xm_file_list=
7098 for f in $build_xm_file; do
7099 case $f in
7100 ansidecl.h )
7101 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
7102 auto-build.h | auto-host.h )
7103 build_xm_file_list="${build_xm_file_list} $f" ;;
7104 defaults.h )
7105 host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;;
7106 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
7107 esac
7108 done
7110 # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
7111 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
7112 CROSS=
7113 ALL=all.internal
7114 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
7115 if test x$host != x$target
7116 then
7117 CROSS="-DCROSS_COMPILE"
7118 ALL=all.cross
7119 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
7120 case "$host","$target" in
7121 i?86-*-*,x86_64-*-* \
7122 | powerpc*-*-*,powerpc64*-*-*)
7123 CROSS="$CROSS -DNATIVE_CROSS" ;;
7124 esac
7127 # If this is a cross-compiler that does not
7128 # have its own set of headers then define
7129 # inhibit_libc
7131 # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
7132 # This prevents libgcc2 from containing any code which requires libc
7133 # support.
7134 inhibit_libc=
7135 if { test x$host != x$target && test "x$with_headers" = x &&
7136 test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
7137 inhibit_libc=-Dinhibit_libc
7141 # When building gcc with a cross-compiler, we need to adjust things so
7142 # that the generator programs are still built with the native compiler.
7143 # Also, we cannot run fixincludes or fix-header.
7145 # These are the normal (build=host) settings:
7146 BUILD_PREFIX=
7147 BUILD_PREFIX_1=ignore-
7148 BUILD_CC='$(CC)'
7149 BUILD_CFLAGS='$(ALL_CFLAGS)'
7151 STMP_FIXINC=stmp-fixinc
7152 STMP_FIXPROTO=stmp-fixproto
7154 # And these apply if build != host.
7155 if test x$build != x$host
7156 then
7157 BUILD_PREFIX=build-
7158 BUILD_PREFIX_1=build-
7159 BUILD_CC='$(CC_FOR_BUILD)'
7160 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
7162 STMP_FIXINC=
7163 STMP_FIXPROTO=
7166 # Expand extra_headers to include complete path.
7167 # This substitutes for lots of t-* files.
7168 extra_headers_list=
7169 if test "x$extra_headers" = x
7170 then true
7171 else
7172 # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
7173 for file in $extra_headers;
7175 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
7176 done
7179 if test x$use_collect2 = xno; then
7180 use_collect2=
7183 # Add a definition of USE_COLLECT2 if system wants one.
7184 if test x$use_collect2 != x
7185 then
7186 host_xm_defines="${host_xm_defines} USE_COLLECT2"
7187 xm_defines="${xm_defines} USE_COLLECT2"
7190 # If we have gas in the build tree, make a link to it.
7191 if test -f ../gas/Makefile; then
7192 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
7195 # If we have nm and objdump in the build tree, make a link to them.
7196 if test -f ../binutils/Makefile; then
7197 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
7198 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
7201 # If we have ld in the build tree, make a link to it.
7202 if test -f ../ld/Makefile; then
7203 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
7206 # Figure out what assembler we will be using.
7207 echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
7208 echo "configure:7209: checking what assembler to use" >&5
7209 gcc_cv_as=
7210 gcc_cv_gas_major_version=
7211 gcc_cv_gas_minor_version=
7212 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
7213 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7214 if test -x "$DEFAULT_ASSEMBLER"; then
7215 gcc_cv_as="$DEFAULT_ASSEMBLER"
7216 elif test -x "$AS"; then
7217 gcc_cv_as="$AS"
7218 elif test -x as$host_exeext; then
7219 # Build using assembler in the current directory.
7220 gcc_cv_as=./as$host_exeext
7221 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
7222 # Single tree build which includes gas.
7223 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
7225 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7226 if test x$gcc_cv_gas_version != x; then
7227 break
7229 done
7230 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
7231 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7232 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
7235 if test "x$gcc_cv_as" = x; then
7236 # Search the same directories that the installed compiler will
7237 # search. Else we may find the wrong assembler and lose. If we
7238 # do not find a suitable assembler binary, then try the user's
7239 # path.
7241 # Also note we have to check MD_EXEC_PREFIX before checking the
7242 # user's path. Unfortunately, there is no good way to get at the
7243 # value of MD_EXEC_PREFIX here. So we do a brute force search
7244 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7245 # to be fixed as part of the make/configure rewrite too.
7247 if test "x$exec_prefix" = xNONE; then
7248 if test "x$prefix" = xNONE; then
7249 test_prefix=/usr/local
7250 else
7251 test_prefix=$prefix
7253 else
7254 test_prefix=$exec_prefix
7257 # If the loop below does not find an assembler, then use whatever
7258 # one we can find in the users's path.
7259 # user's path.
7260 if test "x$program_prefix" != xNONE; then
7261 gcc_cv_as=${program_prefix}as$host_exeext
7262 else
7263 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
7266 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7267 $test_prefix/lib/gcc-lib/$target_alias \
7268 /usr/lib/gcc/$target_alias/$gcc_version \
7269 /usr/lib/gcc/$target_alias \
7270 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7271 $test_prefix/$target_alias/bin"
7273 if test x$host = x$target; then
7274 test_dirs="$test_dirs \
7275 /usr/libexec \
7276 /usr/ccs/gcc \
7277 /usr/ccs/bin \
7278 /udk/usr/ccs/bin \
7279 /bsd43/usr/lib/cmplrs/cc \
7280 /usr/cross64/usr/bin \
7281 /usr/lib/cmplrs/cc \
7282 /sysv/usr/lib/cmplrs/cc \
7283 /svr4/usr/lib/cmplrs/cc \
7284 /usr/bin"
7287 for dir in $test_dirs; do
7288 if test -x $dir/as$host_exeext; then
7289 gcc_cv_as=$dir/as$host_exeext
7290 break;
7292 done
7294 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7295 echo "$ac_t"""newly built gas"" 1>&6
7296 else
7297 echo "$ac_t""$gcc_cv_as" 1>&6
7300 # Figure out what linker we will be using.
7301 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
7302 echo "configure:7303: checking what linker to use" >&5
7303 gcc_cv_ld=
7304 gcc_cv_gld_major_version=
7305 gcc_cv_gld_minor_version=
7306 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
7307 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
7308 if test -x "$DEFAULT_LINKER"; then
7309 gcc_cv_ld="$DEFAULT_LINKER"
7310 elif test -x "$LD"; then
7311 gcc_cv_ld="$LD"
7312 elif test -x ld$host_exeext; then
7313 # Build using linker in the current directory.
7314 gcc_cv_ld=./ld$host_exeext
7315 elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
7316 # Single tree build which includes ld.
7317 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
7319 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
7320 if test x$gcc_cv_gld_version != x; then
7321 break
7323 done
7324 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
7325 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
7328 if test "x$gcc_cv_ld" = x; then
7329 # Search the same directories that the installed compiler will
7330 # search. Else we may find the wrong linker and lose. If we
7331 # do not find a suitable linker binary, then try the user's
7332 # path.
7334 # Also note we have to check MD_EXEC_PREFIX before checking the
7335 # user's path. Unfortunately, there is no good way to get at the
7336 # value of MD_EXEC_PREFIX here. So we do a brute force search
7337 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
7338 # to be fixed as part of the make/configure rewrite too.
7340 if test "x$exec_prefix" = xNONE; then
7341 if test "x$prefix" = xNONE; then
7342 test_prefix=/usr/local
7343 else
7344 test_prefix=$prefix
7346 else
7347 test_prefix=$exec_prefix
7350 # If the loop below does not find an linker, then use whatever
7351 # one we can find in the users's path.
7352 # user's path.
7353 if test "x$program_prefix" != xNONE; then
7354 gcc_cv_ld=${program_prefix}ld$host_exeext
7355 else
7356 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
7359 test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
7360 $test_prefix/lib/gcc-lib/$target_alias \
7361 /usr/lib/gcc/$target_alias/$gcc_version \
7362 /usr/lib/gcc/$target_alias \
7363 $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
7364 $test_prefix/$target_alias/bin"
7366 if test x$host = x$target; then
7367 test_dirs="$test_dirs \
7368 /usr/libexec \
7369 /usr/ccs/gcc \
7370 /usr/ccs/bin \
7371 /udk/usr/ccs/bin \
7372 /bsd43/usr/lib/cmplrs/cc \
7373 /usr/cross64/usr/bin \
7374 /usr/lib/cmplrs/cc \
7375 /sysv/usr/lib/cmplrs/cc \
7376 /svr4/usr/lib/cmplrs/cc \
7377 /usr/bin"
7380 for dir in $test_dirs; do
7381 if test -x $dir/ld$host_exeext; then
7382 gcc_cv_ld=$dir/ld$host_exeext
7383 break;
7385 done
7387 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
7388 echo "$ac_t"""newly built ld"" 1>&6
7389 else
7390 echo "$ac_t""$gcc_cv_ld" 1>&6
7393 # Figure out what nm we will be using.
7394 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
7395 echo "configure:7396: checking what nm to use" >&5
7396 if test -x nm$host_exeext; then
7397 gcc_cv_nm=./nm$host_exeext
7398 elif test "x$program_prefix" != xNONE; then
7399 gcc_cv_nm=${program_prefix}nm$host_exeext
7400 else
7401 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
7403 echo "$ac_t""$gcc_cv_nm" 1>&6
7405 # Figure out what objdump we will be using.
7406 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
7407 echo "configure:7408: checking what objdump to use" >&5
7408 if test -x objdump$host_exeext; then
7409 gcc_cv_objdump=./objdump$host_exeext
7410 elif test "x$program_prefix" != xNONE; then
7411 gcc_cv_objdump=${program_prefix}objdump$host_exeext
7412 else
7413 gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
7415 echo "$ac_t""$gcc_cv_objdump" 1>&6
7417 # Figure out what assembler alignment features are present.
7418 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
7419 echo "configure:7420: checking assembler alignment features" >&5
7420 gcc_cv_as_alignment_features=none
7421 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7422 # Gas version 2.6 and later support for .balign and .p2align.
7423 # bytes to skip when using .p2align.
7424 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
7425 gcc_cv_as_alignment_features=".balign and .p2align"
7426 cat >> confdefs.h <<\EOF
7427 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7431 # Gas version 2.8 and later support specifying the maximum
7432 # bytes to skip when using .p2align.
7433 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
7434 gcc_cv_as_alignment_features=".p2align including maximum skip"
7435 cat >> confdefs.h <<\EOF
7436 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7440 elif test x$gcc_cv_as != x; then
7441 # Check if we have .balign and .p2align
7442 echo ".balign 4" > conftest.s
7443 echo ".p2align 2" >> conftest.s
7444 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7445 gcc_cv_as_alignment_features=".balign and .p2align"
7446 cat >> confdefs.h <<\EOF
7447 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
7451 rm -f conftest.s conftest.o
7452 # Check if specifying the maximum bytes to skip when
7453 # using .p2align is supported.
7454 echo ".p2align 4,,7" > conftest.s
7455 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7456 gcc_cv_as_alignment_features=".p2align including maximum skip"
7457 cat >> confdefs.h <<\EOF
7458 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
7462 rm -f conftest.s conftest.o
7464 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
7466 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
7467 echo "configure:7468: checking assembler subsection support" >&5
7468 gcc_cv_as_subsections=no
7469 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7470 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
7471 gcc_cv_as_subsections="working .subsection -1"
7473 elif test x$gcc_cv_as != x; then
7474 # Check if we have .subsection
7475 echo ".subsection 1" > conftest.s
7476 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7477 gcc_cv_as_subsections=".subsection"
7478 if test x$gcc_cv_nm != x; then
7479 cat > conftest.s <<EOF
7480 conftest_label1: .word 0
7481 .subsection -1
7482 conftest_label2: .word 0
7483 .previous
7485 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7486 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
7487 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
7488 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
7490 else
7491 gcc_cv_as_subsections="working .subsection -1"
7496 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7498 if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
7499 cat >> confdefs.h <<\EOF
7500 #define HAVE_GAS_SUBSECTION_ORDERING 1
7504 echo "$ac_t""$gcc_cv_as_subsections" 1>&6
7506 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
7507 echo "configure:7508: checking assembler weak support" >&5
7508 gcc_cv_as_weak=no
7509 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7510 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
7511 gcc_cv_as_weak="yes"
7513 elif test x$gcc_cv_as != x; then
7514 # Check if we have .weak
7515 echo " .weak foobar" > conftest.s
7516 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7517 gcc_cv_as_weak="yes"
7519 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7521 if test x"$gcc_cv_as_weak" = xyes; then
7522 cat >> confdefs.h <<\EOF
7523 #define HAVE_GAS_WEAK 1
7527 echo "$ac_t""$gcc_cv_as_weak" 1>&6
7529 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
7530 echo "configure:7531: checking assembler hidden support" >&5
7531 gcc_cv_as_hidden=no
7532 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7533 if test "$gcc_cv_gas_major_version" -eq 2 \
7534 -a "$gcc_cv_gas_minor_version" -eq 12 \
7535 -a "$gcc_cv_gas_patch_version" -ge 1 \
7536 -o "$gcc_cv_gas_major_version" -eq 2 \
7537 -a "$gcc_cv_gas_minor_version" -gt 12 \
7538 -o "$gcc_cv_gas_major_version" -gt 2 \
7539 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7540 gcc_cv_as_hidden="yes"
7542 elif test x$gcc_cv_as != x; then
7543 # Check if we have .hidden
7544 echo " .hidden foobar" > conftest.s
7545 echo "foobar:" >> conftest.s
7546 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7547 gcc_cv_as_hidden="yes"
7549 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7551 # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
7552 # This is irritatingly difficult to feature test for. Look for
7553 # the date string after the version number.
7554 ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
7555 if echo "$ld_ver" | grep GNU > /dev/null; then
7556 ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
7557 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'`
7558 if test 0"$ld_date" -lt 20020404; then
7559 if test -n "$ld_date"; then
7560 # If there was date string, but was earlier than 2002-04-04, fail
7561 gcc_cv_as_hidden="no"
7562 elif test -z "$ld_vers"; then
7563 # If there was no date string nor ld version number, something is wrong
7564 gcc_cv_as_hidden="no"
7565 else
7566 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
7567 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
7568 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
7569 test -z "$ld_vers_patch" && ld_vers_patch=0
7570 if test "$ld_vers_major" -lt 2; then
7571 gcc_cv_as_hidden="no"
7572 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
7573 gcc_cv_as_hidden="no"
7574 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
7575 -a "$ld_vers_patch" -eq 0; then
7576 gcc_cv_as_hidden="no"
7582 if test x"$gcc_cv_as_hidden" = xyes; then
7583 cat >> confdefs.h <<\EOF
7584 #define HAVE_GAS_HIDDEN 1
7588 echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7589 libgcc_visibility=$gcc_cv_as_hidden
7590 case "$target" in
7591 mips-sgi-irix6*o32)
7592 if test x"$gnu_ld_flag" = x"no"; then
7593 # Even if using gas with .hidden support, the resulting object files
7594 # cannot be linked with the IRIX 6 O32 linker.
7595 libgcc_visibility=no
7598 esac
7601 echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
7602 echo "configure:7603: checking assembler leb128 support" >&5
7603 gcc_cv_as_leb128=no
7604 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7605 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
7606 gcc_cv_as_leb128="yes"
7608 elif test x$gcc_cv_as != x; then
7609 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7610 cat > conftest.s <<EOF
7611 .data
7612 .uleb128 L2 - L1
7614 .uleb128 1280
7615 .sleb128 -1010
7618 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7619 gcc_cv_as_leb128="yes"
7621 # GAS versions before 2.11 do not support uleb128,
7622 # despite appearing to.
7623 # ??? There exists an elf-specific test that will crash
7624 # the assembler. Perhaps it's better to figure out whether
7625 # arbitrary sections are supported and try the test.
7626 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7627 if echo "$as_ver" | grep GNU > /dev/null; then
7628 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
7629 as_major=`echo $as_ver | sed 's/\..*//'`
7630 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
7631 if test $as_major -eq 2 -a $as_minor -lt 11; then
7632 gcc_cv_as_leb128="no"
7636 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7638 if test x"$gcc_cv_as_leb128" = xyes; then
7639 cat >> confdefs.h <<\EOF
7640 #define HAVE_AS_LEB128 1
7644 echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7646 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
7647 echo "configure:7648: checking assembler eh_frame optimization" >&5
7648 gcc_cv_as_eh_frame=no
7649 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7650 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
7651 gcc_cv_as_eh_frame="yes"
7653 elif test x$gcc_cv_as != x; then
7654 # Check if this is GAS.
7655 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7656 rm -f a.out 2> /dev/null
7657 if echo "$as_ver" | grep GNU > /dev/null; then
7658 # Versions up to and including 2.11.0 may mis-optimize
7659 # .eh_frame data. Try something.
7660 cat > conftest.s <<EOF
7661 .text
7662 .LFB1:
7663 .4byte 0
7664 .L1:
7665 .4byte 0
7666 .LFE1:
7667 .section .eh_frame,"aw",@progbits
7668 __FRAME_BEGIN__:
7669 .4byte .LECIE1-.LSCIE1
7670 .LSCIE1:
7671 .4byte 0x0
7672 .byte 0x1
7673 .ascii "z\0"
7674 .byte 0x1
7675 .byte 0x78
7676 .byte 0x1a
7677 .byte 0x0
7678 .byte 0x4
7679 .4byte 1
7680 .p2align 1
7681 .LECIE1:
7682 .LSFDE1:
7683 .4byte .LEFDE1-.LASFDE1
7684 .LASFDE1:
7685 .4byte .LASFDE1-__FRAME_BEGIN__
7686 .4byte .LFB1
7687 .4byte .LFE1-.LFB1
7688 .byte 0x4
7689 .4byte .LFE1-.LFB1
7690 .byte 0x4
7691 .4byte .L1-.LFB1
7692 .LEFDE1:
7694 cat > conftest.lit <<EOF
7695 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7696 0010 01000000 12000000 18000000 00000000 ................
7697 0020 08000000 04080000 0044 .........D
7699 cat > conftest.big <<EOF
7700 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7701 0010 00000001 00000012 00000018 00000000 ................
7702 0020 00000008 04000000 0844 .........D
7704 # If the assembler didn't choke, and we can objdump,
7705 # and we got the correct data, then succeed.
7706 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7707 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
7708 | tail -3 > conftest.got \
7709 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7710 || cmp conftest.big conftest.got > /dev/null 2>&1; }
7711 then
7712 gcc_cv_as_eh_frame="yes"
7713 else
7714 gcc_cv_as_eh_frame="bad"
7715 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7716 cat >> confdefs.h <<\EOF
7717 #define USE_AS_TRADITIONAL_FORMAT 1
7723 rm -f conftest.*
7725 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7727 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
7728 echo "configure:7729: checking assembler section merging support" >&5
7729 gcc_cv_as_shf_merge=no
7730 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7731 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
7732 gcc_cv_as_shf_merge=yes
7734 elif test x$gcc_cv_as != x; then
7735 # Check if we support SHF_MERGE sections
7736 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
7737 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
7738 gcc_cv_as_shf_merge=yes
7740 rm -f conftest.s conftest.o
7742 if test x"$gcc_cv_as_shf_merge" = xyes; then
7743 cat >> confdefs.h <<\EOF
7744 #define HAVE_GAS_SHF_MERGE 1
7748 echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7750 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6
7751 echo "configure:7752: checking assembler thread-local storage support" >&5
7752 gcc_cv_as_tls=no
7753 conftest_s=
7754 tls_first_major=
7755 tls_first_minor=
7756 case "$target" in
7757 alpha*-*-*)
7758 conftest_s='
7759 .section ".tdata","awT",@progbits
7760 foo: .long 25
7761 .text
7762 ldq $27,__tls_get_addr($29) !literal!1
7763 lda $16,foo($29) !tlsgd!1
7764 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
7765 ldq $27,__tls_get_addr($29) !literal!2
7766 lda $16,foo($29) !tlsldm!2
7767 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
7768 ldq $1,foo($29) !gotdtprel
7769 ldah $2,foo($29) !dtprelhi
7770 lda $3,foo($2) !dtprello
7771 lda $4,foo($29) !dtprel
7772 ldq $1,foo($29) !gottprel
7773 ldah $2,foo($29) !tprelhi
7774 lda $3,foo($2) !tprello
7775 lda $4,foo($29) !tprel'
7776 tls_first_major=2
7777 tls_first_minor=13
7779 i[34567]86-*-*)
7780 conftest_s='
7781 .section ".tdata","awT",@progbits
7782 foo: .long 25
7783 .text
7784 movl %gs:0, %eax
7785 leal foo@TLSGD(,%ebx,1), %eax
7786 leal foo@TLSLDM(%ebx), %eax
7787 leal foo@DTPOFF(%eax), %edx
7788 movl foo@GOTTPOFF(%ebx), %eax
7789 subl foo@GOTTPOFF(%ebx), %eax
7790 addl foo@GOTNTPOFF(%ebx), %eax
7791 movl foo@INDNTPOFF, %eax
7792 movl $foo@TPOFF, %eax
7793 subl $foo@TPOFF, %eax
7794 leal foo@NTPOFF(%ecx), %eax'
7795 tls_first_major=2
7796 tls_first_minor=14
7798 x86_64-*-*)
7799 conftest_s='
7800 .section ".tdata","awT",@progbits
7801 foo: .long 25
7802 .text
7803 movq %fs:0, %rax
7804 leaq foo@TLSGD(%rip), %rdi
7805 leaq foo@TLSLD(%rip), %rdi
7806 leaq foo@DTPOFF(%rax), %rdx
7807 movq foo@GOTTPOFF(%rip), %rax
7808 movq $foo@TPOFF, %rax'
7809 tls_first_major=2
7810 tls_first_minor=14
7812 ia64-*-*)
7813 conftest_s='
7814 .section ".tdata","awT",@progbits
7815 foo: data8 25
7816 .text
7817 addl r16 = @ltoff(@dtpmod(foo#)), gp
7818 addl r17 = @ltoff(@dtprel(foo#)), gp
7819 addl r18 = @ltoff(@tprel(foo#)), gp
7820 addl r19 = @dtprel(foo#), gp
7821 adds r21 = @dtprel(foo#), r13
7822 movl r23 = @dtprel(foo#)
7823 addl r20 = @tprel(foo#), gp
7824 adds r22 = @tprel(foo#), r13
7825 movl r24 = @tprel(foo#)'
7826 tls_first_major=2
7827 tls_first_minor=13
7829 esac
7830 if test -z "$tls_first_major"; then
7832 elif test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7833 then
7834 if test "$gcc_cv_gas_major_version" -eq "$tls_first_major" \
7835 -a "$gcc_cv_gas_minor_version" -ge "$tls_first_minor" \
7836 -o "$gcc_cv_gas_major_version" -gt "$tls_first_major"; then
7837 gcc_cv_as_tls=yes
7839 elif test x$gcc_cv_as != x; then
7840 echo "$conftest_s" > conftest.s
7841 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
7842 then
7843 gcc_cv_as_tls=yes
7845 rm -f conftest.s conftest.o
7847 if test "$gcc_cv_as_tls" = yes; then
7848 cat >> confdefs.h <<\EOF
7849 #define HAVE_AS_TLS 1
7853 echo "$ac_t""$gcc_cv_as_tls" 1>&6
7855 case "$target" in
7856 # All TARGET_ABI_OSF targets.
7857 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
7858 echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
7859 echo "configure:7860: checking assembler supports explicit relocations" >&5
7860 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
7861 echo $ac_n "(cached) $ac_c" 1>&6
7862 else
7864 gcc_cv_as_explicit_relocs=unknown
7865 if test x$gcc_cv_gas_major_version != x \
7866 -a x$gcc_cv_gas_minor_version != x
7867 then
7868 if test "$gcc_cv_gas_major_version" -eq 2 \
7869 -a "$gcc_cv_gas_minor_version" -ge 12 \
7870 -o "$gcc_cv_gas_major_version" -gt 2; then
7871 gcc_cv_as_explicit_relocs=yes
7873 elif test x$gcc_cv_as != x; then
7874 cat > conftest.s << 'EOF'
7875 .set nomacro
7876 .text
7877 extbl $3, $2, $3 !lituse_bytoff!1
7878 ldq $2, a($29) !literal!1
7879 ldq $4, b($29) !literal!2
7880 ldq_u $3, 0($2) !lituse_base!1
7881 ldq $27, f($29) !literal!5
7882 jsr $26, ($27), f !lituse_jsr!5
7883 ldah $29, 0($26) !gpdisp!3
7884 lda $0, c($29) !gprel
7885 ldah $1, d($29) !gprelhigh
7886 lda $1, d($1) !gprellow
7887 lda $29, 0($29) !gpdisp!3
7889 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7890 gcc_cv_as_explicit_relocs=yes
7891 else
7892 gcc_cv_as_explicit_relocs=no
7894 rm -f conftest.s conftest.o
7899 echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
7900 if test "x$gcc_cv_as_explicit_relocs" = xyes; then
7901 cat >> confdefs.h <<\EOF
7902 #define HAVE_AS_EXPLICIT_RELOCS 1
7907 sparc*-*-*)
7908 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
7909 echo "configure:7910: checking assembler .register pseudo-op support" >&5
7910 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7911 echo $ac_n "(cached) $ac_c" 1>&6
7912 else
7914 gcc_cv_as_register_pseudo_op=unknown
7915 if test x$gcc_cv_as != x; then
7916 # Check if we have .register
7917 echo ".register %g2, #scratch" > conftest.s
7918 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7919 gcc_cv_as_register_pseudo_op=yes
7920 else
7921 gcc_cv_as_register_pseudo_op=no
7923 rm -f conftest.s conftest.o
7928 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7929 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7930 cat >> confdefs.h <<\EOF
7931 #define HAVE_AS_REGISTER_PSEUDO_OP 1
7936 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
7937 echo "configure:7938: checking assembler supports -relax" >&5
7938 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7939 echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7942 gcc_cv_as_relax_opt=unknown
7943 if test x$gcc_cv_as != x; then
7944 # Check if gas supports -relax
7945 echo ".text" > conftest.s
7946 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7947 gcc_cv_as_relax_opt=yes
7948 else
7949 gcc_cv_as_relax_opt=no
7951 rm -f conftest.s conftest.o
7956 echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7957 if test "x$gcc_cv_as_relax_opt" = xyes; then
7958 cat >> confdefs.h <<\EOF
7959 #define HAVE_AS_RELAX_OPTION 1
7964 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
7965 echo "configure:7966: checking assembler and linker support unaligned pc related relocs" >&5
7966 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
7967 echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7970 gcc_cv_as_sparc_ua_pcrel=unknown
7971 if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
7972 gcc_cv_as_sparc_ua_pcrel=no
7973 echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
7974 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
7975 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
7976 gcc_cv_as_sparc_ua_pcrel=yes
7978 rm -f conftest.s conftest.o conftest
7983 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
7984 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7985 cat >> confdefs.h <<\EOF
7986 #define HAVE_AS_SPARC_UA_PCREL 1
7991 echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
7992 echo "configure:7993: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
7993 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
7994 echo $ac_n "(cached) $ac_c" 1>&6
7995 else
7997 if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
7998 gcc_cv_as_sparc_ua_pcrel_hidden=unknown
7999 if test x$gcc_cv_objdump != x; then
8000 gcc_cv_as_sparc_ua_pcrel_hidden=no
8001 echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
8002 echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
8003 echo "foo: .skip 4" >> conftest.s
8004 if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
8005 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
8006 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
8007 | grep ' 31000000 07323334' > /dev/null 2>&1; then
8008 if $gcc_cv_objdump -R conftest 2> /dev/null \
8009 | grep 'DISP32' > /dev/null 2>&1; then
8011 else
8012 gcc_cv_as_sparc_ua_pcrel_hidden=yes
8016 rm -f conftest.s conftest.o conftest
8017 else
8018 gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
8023 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
8024 if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
8025 cat >> confdefs.h <<\EOF
8026 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
8031 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
8032 echo "configure:8033: checking for assembler offsetable %lo() support" >&5
8033 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
8034 echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8037 gcc_cv_as_offsetable_lo10=unknown
8038 if test "x$gcc_cv_as" != x; then
8039 # Check if assembler has offsetable %lo()
8040 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
8041 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
8042 if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
8043 > /dev/null 2>&1 &&
8044 $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
8045 > /dev/null 2>&1; then
8046 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
8047 gcc_cv_as_offsetable_lo10=no
8048 else
8049 gcc_cv_as_offsetable_lo10=yes
8051 else
8052 gcc_cv_as_offsetable_lo10=no
8054 rm -f conftest.s conftest.o conftest1.s conftest1.o
8059 echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
8060 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
8061 cat >> confdefs.h <<\EOF
8062 #define HAVE_AS_OFFSETABLE_LO10 1
8069 i[34567]86-*-* | x86_64-*-*)
8070 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
8071 echo "configure:8072: checking assembler instructions" >&5
8072 gcc_cv_as_instructions=
8073 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
8074 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
8075 gcc_cv_as_instructions="filds fists"
8077 elif test x$gcc_cv_as != x; then
8078 set "filds fists" "filds mem; fists mem"
8079 while test $# -gt 0
8081 echo "$2" > conftest.s
8082 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8083 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
8085 shift 2
8086 done
8087 rm -f conftest.s conftest.o
8089 if test x"$gcc_cv_as_instructions" != x; then
8090 cat >> confdefs.h <<EOF
8091 #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
8095 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
8097 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
8098 echo "configure:8099: checking assembler GOTOFF in data directives" >&5
8099 gcc_cv_as_gotoff_in_data=no
8100 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
8101 then
8102 if test "$gcc_cv_gas_major_version" -eq 2 \
8103 -a "$gcc_cv_gas_minor_version" -ge 11 \
8104 -o "$gcc_cv_gas_major_version" -gt 2; then
8105 gcc_cv_as_gotoff_in_data=yes
8107 elif test x$gcc_cv_as != x; then
8108 cat > conftest.s <<EOF
8109 .text
8110 .L0:
8112 .data
8113 .long .L0@GOTOFF
8115 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
8116 gcc_cv_as_gotoff_in_data=yes
8119 cat >> confdefs.h <<EOF
8120 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
8123 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
8125 esac
8127 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
8128 echo "configure:8129: checking assembler dwarf2 debug_line support" >&5
8129 gcc_cv_as_dwarf2_debug_line=no
8130 # ??? Not all targets support dwarf2 debug_line, even within a version
8131 # of gas. Moreover, we need to emit a valid instruction to trigger any
8132 # info to the output file. So, as supported targets are added to gas 2.11,
8133 # add some instruction here to (also) show we expect this might work.
8134 # ??? Once 2.11 is released, probably need to add first known working
8135 # version to the per-target configury.
8136 case "$target" in
8137 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
8138 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-*)
8139 insn="nop"
8141 ia64*-*-*)
8142 insn="nop 0"
8144 esac
8145 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8146 then
8147 if test "$gcc_cv_gas_major_version" -eq 2 \
8148 -a "$gcc_cv_gas_minor_version" -ge 11 \
8149 -o "$gcc_cv_gas_major_version" -gt 2 \
8150 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8151 && test x"$insn" != x ; then
8152 gcc_cv_as_dwarf2_debug_line="yes"
8154 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8155 echo ' .file 1 "conftest.s"' > conftest.s
8156 echo ' .loc 1 3 0' >> conftest.s
8157 echo " $insn" >> conftest.s
8158 # ??? This fails with non-gnu grep.
8159 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
8160 && grep debug_line conftest.o > /dev/null 2>&1 ; then
8161 # The .debug_line file table must be in the exact order that
8162 # we specified the files, since these indices are also used
8163 # by DW_AT_decl_file. Approximate this test by testing if
8164 # the assembler bitches if the same index is assigned twice.
8165 echo ' .file 1 "foo.s"' > conftest.s
8166 echo ' .file 1 "bar.s"' >> conftest.s
8167 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
8168 then
8169 gcc_cv_as_dwarf2_debug_line="no"
8170 else
8171 gcc_cv_as_dwarf2_debug_line="yes"
8174 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
8176 if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
8177 cat >> confdefs.h <<\EOF
8178 #define HAVE_AS_DWARF2_DEBUG_LINE 1
8182 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
8184 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
8185 echo "configure:8186: checking assembler --gdwarf2 support" >&5
8186 gcc_cv_as_gdwarf2_flag=no
8187 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8188 then
8189 if test "$gcc_cv_gas_major_version" -eq 2 \
8190 -a "$gcc_cv_gas_minor_version" -ge 11 \
8191 -o "$gcc_cv_gas_major_version" -gt 2 \
8192 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8193 && test x"$insn" != x ; then
8194 gcc_cv_as_gdwarf2_flag="yes"
8196 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8197 echo '' > conftest.s
8198 # ??? This fails with non-gnu grep.
8199 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
8200 then
8201 gcc_cv_as_gdwarf2_flag="yes"
8203 rm -f conftest.s conftest.o
8205 if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
8206 cat >> confdefs.h <<\EOF
8207 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
8211 echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
8213 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
8214 echo "configure:8215: checking assembler --gstabs support" >&5
8215 gcc_cv_as_gstabs_flag=no
8216 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
8217 then
8218 if test "$gcc_cv_gas_major_version" -eq 2 \
8219 -a "$gcc_cv_gas_minor_version" -ge 11 \
8220 -o "$gcc_cv_gas_major_version" -gt 2 \
8221 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
8222 && test x"$insn" != x ; then
8223 gcc_cv_as_gstabs_flag="yes"
8225 elif test x$gcc_cv_as != x -a x"$insn" != x ; then
8226 echo '' > conftest.s
8227 # ??? This fails with non-gnu grep.
8228 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
8229 gcc_cv_as_gstabs_flag="yes"
8231 rm -f conftest.s conftest.o
8233 if test x"$gcc_cv_as_gstabs_flag" = xyes; then
8234 cat >> confdefs.h <<\EOF
8235 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
8239 echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
8241 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
8242 echo "configure:8243: checking linker read-only and read-write section mixing" >&5
8243 gcc_cv_ld_ro_rw_mix=unknown
8244 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8245 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
8246 gcc_cv_ld_ro_rw_mix=read-write
8248 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
8249 echo '.section "myfoosect", "a"' > conftest1.s
8250 echo '.section "myfoosect", "aw"' > conftest2.s
8251 echo '.byte 1' >> conftest2.s
8252 echo '.section "myfoosect", "a"' > conftest3.s
8253 echo '.byte 0' >> conftest3.s
8254 if $gcc_cv_as -o conftest1.o conftest1.s \
8255 && $gcc_cv_as -o conftest2.o conftest2.s \
8256 && $gcc_cv_as -o conftest3.o conftest3.s \
8257 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
8258 conftest2.o conftest3.o; then
8259 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
8260 | grep -A1 myfoosect`
8261 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
8262 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
8263 gcc_cv_ld_ro_rw_mix=read-only
8264 else
8265 gcc_cv_ld_ro_rw_mix=read-write
8269 rm -f conftest.* conftest[123].*
8271 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
8272 cat >> confdefs.h <<\EOF
8273 #define HAVE_LD_RO_RW_SECTION_MIXING 1
8277 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
8279 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
8280 echo "configure:8281: checking linker PT_GNU_EH_FRAME support" >&5
8281 gcc_cv_ld_eh_frame_hdr=no
8282 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
8283 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
8284 gcc_cv_ld_eh_frame_hdr=yes
8286 elif test x$gcc_cv_ld != x; then
8287 # Check if linker supports --eh-frame-hdr option
8288 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
8289 gcc_cv_ld_eh_frame_hdr=yes
8292 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
8293 cat >> confdefs.h <<\EOF
8294 #define HAVE_LD_EH_FRAME_HDR 1
8298 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
8300 # Miscellaneous target-specific checks.
8301 case "$target" in
8302 mips*-*-*)
8303 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
8304 echo "configure:8305: checking whether libgloss uses STARTUP directives consistently" >&5
8305 gcc_cv_mips_libgloss_startup=no
8306 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
8307 if test "x$exec_prefix" = xNONE; then
8308 if test "x$prefix" = xNONE; then
8309 test_prefix=/usr/local
8310 else
8311 test_prefix=$prefix
8313 else
8314 test_prefix=$exec_prefix
8316 for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
8318 if grep '^STARTUP' $f > /dev/null 2>&1; then
8319 gcc_cv_mips_libgloss_startup=yes
8320 break
8322 done
8323 if test x"$gcc_cv_mips_libgloss_startup" = xyes; then
8324 cat >> confdefs.h <<\EOF
8325 #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1
8329 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
8331 esac
8333 if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
8334 cat >> confdefs.h <<EOF
8335 #define PREFIX_INCLUDE_DIR "$prefix/include"
8340 # Figure out what language subdirectories are present.
8341 # Look if the user specified --enable-languages="..."; if not, use
8342 # the environment variable $LANGUAGES if defined. $LANGUAGES might
8343 # go away some day.
8344 # NB: embedded tabs in this IF block -- do not untabify
8345 if test x"${enable_languages+set}" != xset; then
8346 if test x"${LANGUAGES+set}" = xset; then
8347 enable_languages="${LANGUAGES}"
8348 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
8350 else
8351 enable_languages=all
8353 else
8354 if test x"${enable_languages}" = x \
8355 || test x"${enable_languages}" = xyes;
8356 then
8357 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
8360 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
8362 # First scan to see if an enabled language requires some other language.
8363 # We assume that a given config-lang.in will list all the language
8364 # front ends it requires, even if some are required indirectly.
8365 for lang in ${srcdir}/*/config-lang.in ..
8367 case $lang in
8370 # The odd quoting in the next line works around
8371 # an apparent bug in bash 1.12 on linux.
8372 ${srcdir}/[*]/config-lang.in)
8375 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8376 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
8377 for other in $this_lang_requires
8379 case ,${enable_languages}, in
8380 *,$other,*)
8382 *,all,*)
8384 *,$lang_alias,*)
8385 enable_languages="$enable_languages,$other"
8387 esac
8388 done
8390 esac
8391 done
8393 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
8394 found_languages=
8395 subdirs=
8396 for lang in ${srcdir}/*/config-lang.in ..
8398 case $lang in
8399 ..) ;;
8400 # The odd quoting in the next line works around
8401 # an apparent bug in bash 1.12 on linux.
8402 ${srcdir}/[*]/config-lang.in) ;;
8404 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
8405 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
8406 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
8407 if test "x$lang_alias" = x
8408 then
8409 echo "$lang doesn't set \$language." 1>&2
8410 exit 1
8412 case ${build_by_default},${enable_languages}, in
8413 *,$lang_alias,*) add_this_lang=yes ;;
8414 no,*) add_this_lang=no ;;
8415 *,all,*) add_this_lang=yes ;;
8416 *) add_this_lang=no ;;
8417 esac
8418 found_languages="${found_languages} ${lang_alias}"
8419 if test x"${add_this_lang}" = xyes; then
8420 case $lang in
8421 ${srcdir}/ada/config-lang.in)
8422 if test x$have_gnat = xyes ; then
8423 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8427 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
8429 esac
8432 esac
8433 done
8435 missing_languages=
8436 for expected_language in ${expected_languages} ..
8438 if test "${expected_language}" != ..; then
8439 missing_language="${expected_language}"
8440 if test "${expected_language}" = "c" \
8441 || test "${expected_language}" = "all"; then
8442 missing_language=
8444 for found_language in ${found_languages} ..
8446 if test "${found_language}" != ..; then
8447 if test "${expected_language}" = "${found_language}"; then
8448 missing_language=
8451 done
8452 if test "x${missing_language}" != x; then
8453 missing_languages="${missing_languages} ${missing_language}"
8456 done
8458 if test "x$missing_languages" != x; then
8459 { echo "configure: error:
8460 The following requested languages were not found:${missing_languages}
8461 The following languages were available: c${found_languages}" 1>&2; exit 1; }
8464 # Make gthr-default.h if we have a thread file.
8465 gthread_flags=
8466 if test $thread_file != single; then
8467 rm -f gthr-default.h
8468 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
8469 gthread_flags=-DHAVE_GTHR_DEFAULT
8473 # Find out what GC implementation we want, or may, use.
8474 # Check whether --with-gc or --without-gc was given.
8475 if test "${with_gc+set}" = set; then
8476 withval="$with_gc"
8477 case "$withval" in
8478 simple | page)
8479 GGC=ggc-$withval
8482 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
8484 esac
8485 else
8486 GGC=ggc-page
8490 echo "Using $GGC for garbage collection."
8492 # Use the system's zlib library.
8493 zlibdir=-L../zlib
8494 zlibinc="-I\$(srcdir)/../zlib"
8495 # Check whether --with-system-zlib or --without-system-zlib was given.
8496 if test "${with_system_zlib+set}" = set; then
8497 withval="$with_system_zlib"
8498 zlibdir=
8499 zlibinc=
8507 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
8508 echo "configure:8509: checking whether to enable maintainer-specific portions of Makefiles" >&5
8509 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8510 if test "${enable_maintainer_mode+set}" = set; then
8511 enableval="$enable_maintainer_mode"
8512 maintainer_mode=$enableval
8513 else
8514 maintainer_mode=no
8518 echo "$ac_t""$maintainer_mode" 1>&6
8520 if test "$maintainer_mode" = "yes"; then
8521 MAINT=''
8522 else
8523 MAINT='#'
8526 # Make empty files to contain the specs and options for each language.
8527 # Then add #include lines to for a compiler that has specs and/or options.
8529 lang_specs_files=
8530 lang_options_files=
8531 lang_tree_files=
8532 for subdir in . $subdirs
8534 if test -f $srcdir/$subdir/lang-specs.h; then
8535 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
8537 if test -f $srcdir/$subdir/lang-options.h; then
8538 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
8540 if test -f $srcdir/$subdir/$subdir-tree.def; then
8541 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
8543 done
8545 # These (without "all_") are set in each config-lang.in.
8546 # `language' must be a single word so is spelled singularly.
8547 all_languages=
8548 all_boot_languages=
8549 all_compilers=
8550 all_stagestuff=
8551 all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
8552 # List of language makefile fragments.
8553 all_lang_makefiles=
8554 # Files for gengtype
8555 all_gtfiles="$target_gtfiles"
8556 # Files for gengtype with language
8557 all_gtfiles_files_langs=
8558 all_gtfiles_files_files=
8560 # Add the language fragments.
8561 # Languages are added via two mechanisms. Some information must be
8562 # recorded in makefile variables, these are defined in config-lang.in.
8563 # We accumulate them and plug them into the main Makefile.
8564 # The other mechanism is a set of hooks for each of the main targets
8565 # like `clean', `install', etc.
8567 language_fragments="Make-lang"
8568 language_hooks="Make-hooks"
8570 for s in .. $subdirs
8572 if test $s != ".."
8573 then
8574 language=
8575 boot_language=
8576 compilers=
8577 stagestuff=
8578 outputs=
8579 gtfiles=
8580 . ${srcdir}/$s/config-lang.in
8581 if test "x$language" = x
8582 then
8583 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
8584 exit 1
8586 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
8587 if test -f ${srcdir}/$s/Makefile.in
8588 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
8590 all_languages="$all_languages $language"
8591 if test "x$boot_language" = xyes
8592 then
8593 all_boot_languages="$all_boot_languages $language"
8595 all_compilers="$all_compilers $compilers"
8596 all_stagestuff="$all_stagestuff $stagestuff"
8597 all_outputs="$all_outputs $outputs"
8598 all_gtfiles="$all_gtfiles $gtfiles"
8599 for f in .. $gtfiles
8601 if test $f != ".."
8602 then
8603 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8604 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8606 done
8608 done
8610 # Pick up gtfiles for c
8611 gtfiles=
8612 s="c"
8613 . ${srcdir}/c-config-lang.in
8614 all_gtfiles="$all_gtfiles $gtfiles"
8615 for f in .. $gtfiles
8617 if test $f != ".."
8618 then
8619 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
8620 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8622 done
8624 check_languages=
8625 for language in .. $all_languages
8627 if test $language != ".."
8628 then
8629 check_languages="$check_languages check-$language"
8631 done
8633 # Since we can't use `::' targets, we link each language in
8634 # with a set of hooks, reached indirectly via lang.${target}.
8636 rm -f Make-hooks
8637 touch Make-hooks
8638 target_list="all.build all.cross start.encap rest.encap \
8639 info dvi generated-manpages \
8640 install-normal install-common install-info install-man \
8641 uninstall \
8642 mostlyclean clean distclean extraclean maintainer-clean \
8643 stage1 stage2 stage3 stage4"
8644 for t in $target_list
8647 for lang in .. $all_languages
8649 if test $lang != ".."; then
8650 x="$x $lang.$t"
8652 done
8653 echo "lang.$t: $x" >> Make-hooks
8654 done
8656 # Create .gdbinit.
8658 echo "dir ." > .gdbinit
8659 echo "dir ${srcdir}" >> .gdbinit
8660 if test x$gdb_needs_out_file_path = xyes
8661 then
8662 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
8664 if test "x$subdirs" != x; then
8665 for s in $subdirs
8667 echo "dir ${srcdir}/$s" >> .gdbinit
8668 done
8670 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
8672 # Define variables host_canonical and build_canonical
8673 # because some Cygnus local changes in the Makefile depend on them.
8674 build_canonical=${build}
8675 host_canonical=${host}
8676 target_subdir=
8677 if test "${host}" != "${target}" ; then
8678 target_subdir=${target_alias}/
8684 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
8685 # absolute path for gcc_tooldir based on inserting the number of up-directory
8686 # movements required to get from $(exec_prefix) to $(prefix) into the basic
8687 # $(libsubdir)/@(unlibsubdir) based path.
8688 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
8689 # make and thus we'd get different behavior depending on where we built the
8690 # sources.
8691 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
8692 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
8693 else
8694 # An explanation of the sed strings:
8695 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
8696 # -e 's|/$||' match a trailing forward slash and eliminates it
8697 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
8698 # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8700 # (*) Note this pattern overwrites the first character of the string
8701 # with a forward slash if one is not already present. This is not a
8702 # problem because the exact names of the sub-directories concerned is
8703 # unimportant, just the number of them matters.
8705 # The practical upshot of these patterns is like this:
8707 # prefix exec_prefix result
8708 # ------ ----------- ------
8709 # /foo /foo/bar ../
8710 # /foo/ /foo/bar ../
8711 # /foo /foo/bar/ ../
8712 # /foo/ /foo/bar/ ../
8713 # /foo /foo/bar/ugg ../../
8715 dollar='$$'
8716 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8721 # Find a directory in which to install a shared libgcc.
8723 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
8724 if test "${enable_version_specific_runtime_libs+set}" = set; then
8725 enableval="$enable_version_specific_runtime_libs"
8730 # Check whether --with-slibdir or --without-slibdir was given.
8731 if test "${with_slibdir+set}" = set; then
8732 withval="$with_slibdir"
8733 slibdir="$with_slibdir"
8734 else
8735 if test "${enable_version_specific_runtime_libs+set}" = set; then
8736 slibdir='$(libsubdir)'
8737 elif test "$host" != "$target"; then
8738 slibdir='$(build_tooldir)/lib'
8739 else
8740 slibdir='$(libdir)'
8746 objdir=`${PWDCMD-pwd}`
8749 # Process the language and host/target makefile fragments.
8750 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
8752 # Substitute configuration variables
8821 # Echo that links are built
8822 if test x$host = x$target
8823 then
8824 str1="native "
8825 else
8826 str1="cross-"
8827 str2=" from $host"
8830 if test x$host != x$build
8831 then
8832 str3=" on a $build system"
8835 if test "x$str2" != x || test "x$str3" != x
8836 then
8837 str4=
8840 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
8842 if test "x$str2" != x || test "x$str3" != x
8843 then
8844 echo " ${str2}${str3}." 1>&2
8847 # Truncate the target if necessary
8848 if test x$host_truncate_target != x; then
8849 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
8852 # Configure the subdirectories
8853 # AC_CONFIG_SUBDIRS($subdirs)
8855 # Create the Makefile
8856 # and configure language subdirectories
8857 trap '' 1 2 15
8858 cat > confcache <<\EOF
8859 # This file is a shell script that caches the results of configure
8860 # tests run on this system so they can be shared between configure
8861 # scripts and configure runs. It is not useful on other systems.
8862 # If it contains results you don't want to keep, you may remove or edit it.
8864 # By default, configure uses ./config.cache as the cache file,
8865 # creating it if it does not exist already. You can give configure
8866 # the --cache-file=FILE option to use a different cache file; that is
8867 # what configure does when it calls configure scripts in
8868 # subdirectories, so they share the cache.
8869 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8870 # config.status only pays attention to the cache file if you give it the
8871 # --recheck option to rerun configure.
8874 # The following way of writing the cache mishandles newlines in values,
8875 # but we know of no workaround that is simple, portable, and efficient.
8876 # So, don't put newlines in cache variables' values.
8877 # Ultrix sh set writes to stderr and can't be redirected directly,
8878 # and sets the high bit in the cache file unless we assign to the vars.
8879 (set) 2>&1 |
8880 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8881 *ac_space=\ *)
8882 # `set' does not quote correctly, so add quotes (double-quote substitution
8883 # turns \\\\ into \\, and sed turns \\ into \).
8884 sed -n \
8885 -e "s/'/'\\\\''/g" \
8886 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8889 # `set' quotes correctly as required by POSIX, so do not add quotes.
8890 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8892 esac >> confcache
8893 if cmp -s $cache_file confcache; then
8895 else
8896 if test -w $cache_file; then
8897 echo "updating cache $cache_file"
8898 cat confcache > $cache_file
8899 else
8900 echo "not updating unwritable cache $cache_file"
8903 rm -f confcache
8905 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8907 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8908 # Let make expand exec_prefix.
8909 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8911 # Any assignment to VPATH causes Sun make to only execute
8912 # the first set of double-colon rules, so remove it if not needed.
8913 # If there is a colon in the path, we need to keep it.
8914 if test "x$srcdir" = x.; then
8915 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8918 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8920 DEFS=-DHAVE_CONFIG_H
8922 # Without the "./", some shells look in PATH for config.status.
8923 : ${CONFIG_STATUS=./config.status}
8925 echo creating $CONFIG_STATUS
8926 rm -f $CONFIG_STATUS
8927 cat > $CONFIG_STATUS <<EOF
8928 #! /bin/sh
8929 # Generated automatically by configure.
8930 # Run this file to recreate the current configuration.
8931 # This directory was configured as follows,
8932 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8934 # $0 $ac_configure_args
8936 # Compiler output produced by configure, useful for debugging
8937 # configure, is in ./config.log if it exists.
8939 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8940 for ac_option
8942 case "\$ac_option" in
8943 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8944 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8945 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8946 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8947 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8948 exit 0 ;;
8949 -help | --help | --hel | --he | --h)
8950 echo "\$ac_cs_usage"; exit 0 ;;
8951 *) echo "\$ac_cs_usage"; exit 1 ;;
8952 esac
8953 done
8955 ac_given_srcdir=$srcdir
8957 trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8959 cat >> $CONFIG_STATUS <<EOF
8961 # Protect against being on the right side of a sed subst in config.status.
8962 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8963 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8964 $ac_vpsub
8965 $extrasub
8966 s%@SHELL@%$SHELL%g
8967 s%@CFLAGS@%$CFLAGS%g
8968 s%@CPPFLAGS@%$CPPFLAGS%g
8969 s%@CXXFLAGS@%$CXXFLAGS%g
8970 s%@FFLAGS@%$FFLAGS%g
8971 s%@DEFS@%$DEFS%g
8972 s%@LDFLAGS@%$LDFLAGS%g
8973 s%@LIBS@%$LIBS%g
8974 s%@exec_prefix@%$exec_prefix%g
8975 s%@prefix@%$prefix%g
8976 s%@program_transform_name@%$program_transform_name%g
8977 s%@bindir@%$bindir%g
8978 s%@sbindir@%$sbindir%g
8979 s%@libexecdir@%$libexecdir%g
8980 s%@datadir@%$datadir%g
8981 s%@sysconfdir@%$sysconfdir%g
8982 s%@sharedstatedir@%$sharedstatedir%g
8983 s%@localstatedir@%$localstatedir%g
8984 s%@libdir@%$libdir%g
8985 s%@includedir@%$includedir%g
8986 s%@oldincludedir@%$oldincludedir%g
8987 s%@infodir@%$infodir%g
8988 s%@mandir@%$mandir%g
8989 s%@host@%$host%g
8990 s%@host_alias@%$host_alias%g
8991 s%@host_cpu@%$host_cpu%g
8992 s%@host_vendor@%$host_vendor%g
8993 s%@host_os@%$host_os%g
8994 s%@target@%$target%g
8995 s%@target_alias@%$target_alias%g
8996 s%@target_cpu@%$target_cpu%g
8997 s%@target_vendor@%$target_vendor%g
8998 s%@target_os@%$target_os%g
8999 s%@build@%$build%g
9000 s%@build_alias@%$build_alias%g
9001 s%@build_cpu@%$build_cpu%g
9002 s%@build_vendor@%$build_vendor%g
9003 s%@build_os@%$build_os%g
9004 s%@CC@%$CC%g
9005 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
9006 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
9007 s%@GNATBIND@%$GNATBIND%g
9008 s%@ADAC@%$ADAC%g
9009 s%@strict1_warn@%$strict1_warn%g
9010 s%@CPP@%$CPP%g
9011 s%@warn_cflags@%$warn_cflags%g
9012 s%@enable_multilib@%$enable_multilib%g
9013 s%@nocommon_flag@%$nocommon_flag%g
9014 s%@valgrind_path@%$valgrind_path%g
9015 s%@valgrind_path_defines@%$valgrind_path_defines%g
9016 s%@valgrind_command@%$valgrind_command%g
9017 s%@coverage_flags@%$coverage_flags%g
9018 s%@enable_shared@%$enable_shared%g
9019 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
9020 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
9021 s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g
9022 s%@stage1_cflags@%$stage1_cflags%g
9023 s%@SET_MAKE@%$SET_MAKE%g
9024 s%@AWK@%$AWK%g
9025 s%@LN@%$LN%g
9026 s%@LN_S@%$LN_S%g
9027 s%@RANLIB@%$RANLIB%g
9028 s%@INSTALL@%$INSTALL%g
9029 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9030 s%@INSTALL_DATA@%$INSTALL_DATA%g
9031 s%@have_mktemp_command@%$have_mktemp_command%g
9032 s%@MAKEINFO@%$MAKEINFO%g
9033 s%@BUILD_INFO@%$BUILD_INFO%g
9034 s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
9035 s%@FLEX@%$FLEX%g
9036 s%@BISON@%$BISON%g
9037 s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
9038 s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
9039 s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
9040 s%@LIBICONV@%$LIBICONV%g
9041 s%@manext@%$manext%g
9042 s%@objext@%$objext%g
9043 s%@extra_modes_file@%$extra_modes_file%g
9044 s%@FORBUILD@%$FORBUILD%g
9045 s%@PACKAGE@%$PACKAGE%g
9046 s%@VERSION@%$VERSION%g
9047 s%@ALLOCA@%$ALLOCA%g
9048 s%@GLIBC21@%$GLIBC21%g
9049 s%@USE_NLS@%$USE_NLS%g
9050 s%@MSGFMT@%$MSGFMT%g
9051 s%@GMSGFMT@%$GMSGFMT%g
9052 s%@XGETTEXT@%$XGETTEXT%g
9053 s%@INTLBISON@%$INTLBISON%g
9054 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
9055 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9056 s%@CATALOGS@%$CATALOGS%g
9057 s%@CATOBJEXT@%$CATOBJEXT%g
9058 s%@INTLLIBS@%$INTLLIBS%g
9059 s%@INTLDEPS@%$INTLDEPS%g
9060 s%@INTLOBJS@%$INTLOBJS%g
9061 s%@POSUB@%$POSUB%g
9062 s%@DATADIRNAME@%$DATADIRNAME%g
9063 s%@INSTOBJEXT@%$INSTOBJEXT%g
9064 s%@GENCAT@%$GENCAT%g
9065 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9066 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
9067 s%@CROSS@%$CROSS%g
9068 s%@ALL@%$ALL%g
9069 s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g
9070 s%@inhibit_libc@%$inhibit_libc%g
9071 s%@BUILD_PREFIX@%$BUILD_PREFIX%g
9072 s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
9073 s%@BUILD_CC@%$BUILD_CC%g
9074 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
9075 s%@STMP_FIXINC@%$STMP_FIXINC%g
9076 s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g
9077 s%@libgcc_visibility@%$libgcc_visibility%g
9078 s%@gthread_flags@%$gthread_flags%g
9079 s%@GGC@%$GGC%g
9080 s%@zlibdir@%$zlibdir%g
9081 s%@zlibinc@%$zlibinc%g
9082 s%@MAINT@%$MAINT%g
9083 s%@build_canonical@%$build_canonical%g
9084 s%@host_canonical@%$host_canonical%g
9085 s%@target_subdir@%$target_subdir%g
9086 s%@gcc_tooldir@%$gcc_tooldir%g
9087 s%@dollar@%$dollar%g
9088 s%@slibdir@%$slibdir%g
9089 s%@objdir@%$objdir%g
9090 s%@subdirs@%$subdirs%g
9091 s%@srcdir@%$srcdir%g
9092 s%@all_boot_languages@%$all_boot_languages%g
9093 s%@all_compilers@%$all_compilers%g
9094 s%@all_gtfiles@%$all_gtfiles%g
9095 s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g
9096 s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g
9097 s%@all_lang_makefiles@%$all_lang_makefiles%g
9098 s%@all_languages@%$all_languages%g
9099 s%@all_stagestuff@%$all_stagestuff%g
9100 s%@build_exeext@%$build_exeext%g
9101 s%@build_install_headers_dir@%$build_install_headers_dir%g
9102 s%@build_xm_file_list@%$build_xm_file_list%g
9103 s%@build_xm_file@%$build_xm_file%g
9104 s%@build_xm_defines@%$build_xm_defines%g
9105 s%@check_languages@%$check_languages%g
9106 s%@cc_set_by_configure@%$cc_set_by_configure%g
9107 s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
9108 s%@cpp_install_dir@%$cpp_install_dir%g
9109 s%@dep_host_xmake_file@%$dep_host_xmake_file%g
9110 s%@dep_tmake_file@%$dep_tmake_file%g
9111 s%@extra_headers_list@%$extra_headers_list%g
9112 s%@extra_objs@%$extra_objs%g
9113 s%@extra_parts@%$extra_parts%g
9114 s%@extra_passes@%$extra_passes%g
9115 s%@extra_programs@%$extra_programs%g
9116 s%@float_h_file@%$float_h_file%g
9117 s%@gcc_config_arguments@%$gcc_config_arguments%g
9118 s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
9119 s%@libstdcxx_incdir@%$libstdcxx_incdir%g
9120 s%@gcc_version@%$gcc_version%g
9121 s%@gcc_version_full@%$gcc_version_full%g
9122 s%@gcc_version_trigger@%$gcc_version_trigger%g
9123 s%@host_exeext@%$host_exeext%g
9124 s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
9125 s%@host_xm_file_list@%$host_xm_file_list%g
9126 s%@host_xm_file@%$host_xm_file%g
9127 s%@host_xm_defines@%$host_xm_defines%g
9128 s%@install@%$install%g
9129 s%@lang_options_files@%$lang_options_files%g
9130 s%@lang_specs_files@%$lang_specs_files%g
9131 s%@lang_tree_files@%$lang_tree_files%g
9132 s%@local_prefix@%$local_prefix%g
9133 s%@md_file@%$md_file%g
9134 s%@objc_boehm_gc@%$objc_boehm_gc%g
9135 s%@out_file@%$out_file%g
9136 s%@out_object_file@%$out_object_file%g
9137 s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
9138 s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g
9139 s%@symbolic_link@%$symbolic_link%g
9140 s%@thread_file@%$thread_file%g
9141 s%@tm_file_list@%$tm_file_list%g
9142 s%@tm_file@%$tm_file%g
9143 s%@tm_defines@%$tm_defines%g
9144 s%@tm_p_file_list@%$tm_p_file_list%g
9145 s%@tm_p_file@%$tm_p_file%g
9146 s%@xm_file@%$xm_file%g
9147 s%@xm_defines@%$xm_defines%g
9148 s%@c_target_objs@%$c_target_objs%g
9149 s%@cxx_target_objs@%$cxx_target_objs%g
9150 s%@target_cpu_default@%$target_cpu_default%g
9151 /@target_overrides@/r $target_overrides
9152 s%@target_overrides@%%g
9153 /@host_overrides@/r $host_overrides
9154 s%@host_overrides@%%g
9155 /@language_fragments@/r $language_fragments
9156 s%@language_fragments@%%g
9157 /@language_hooks@/r $language_hooks
9158 s%@language_hooks@%%g
9160 CEOF
9163 cat >> $CONFIG_STATUS <<\EOF
9165 # Split the substitutions into bite-sized pieces for seds with
9166 # small command number limits, like on Digital OSF/1 and HP-UX.
9167 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9168 ac_file=1 # Number of current file.
9169 ac_beg=1 # First line for current file.
9170 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9171 ac_more_lines=:
9172 ac_sed_cmds=""
9173 while $ac_more_lines; do
9174 if test $ac_beg -gt 1; then
9175 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9176 else
9177 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9179 if test ! -s conftest.s$ac_file; then
9180 ac_more_lines=false
9181 rm -f conftest.s$ac_file
9182 else
9183 if test -z "$ac_sed_cmds"; then
9184 ac_sed_cmds="sed -f conftest.s$ac_file"
9185 else
9186 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9188 ac_file=`expr $ac_file + 1`
9189 ac_beg=$ac_end
9190 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9192 done
9193 if test -z "$ac_sed_cmds"; then
9194 ac_sed_cmds=cat
9198 cat >> $CONFIG_STATUS <<EOF
9200 CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
9202 cat >> $CONFIG_STATUS <<\EOF
9203 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9204 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9205 case "$ac_file" in
9206 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9207 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9208 *) ac_file_in="${ac_file}.in" ;;
9209 esac
9211 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9213 # Remove last slash and all that follows it. Not all systems have dirname.
9214 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9215 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9216 # The file is in a subdirectory.
9217 test ! -d "$ac_dir" && mkdir "$ac_dir"
9218 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9219 # A "../" for each directory in $ac_dir_suffix.
9220 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9221 else
9222 ac_dir_suffix= ac_dots=
9225 case "$ac_given_srcdir" in
9226 .) srcdir=.
9227 if test -z "$ac_dots"; then top_srcdir=.
9228 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9229 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9230 *) # Relative path.
9231 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9232 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9233 esac
9236 echo creating "$ac_file"
9237 rm -f "$ac_file"
9238 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9239 case "$ac_file" in
9240 *Makefile*) ac_comsub="1i\\
9241 # $configure_input" ;;
9242 *) ac_comsub= ;;
9243 esac
9245 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9246 sed -e "$ac_comsub
9247 s%@configure_input@%$configure_input%g
9248 s%@srcdir@%$srcdir%g
9249 s%@top_srcdir@%$top_srcdir%g
9250 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9251 fi; done
9252 rm -f conftest.s*
9254 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9255 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9257 # ac_d sets the value in "#define NAME VALUE" lines.
9258 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9259 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9260 ac_dC='\3'
9261 ac_dD='%g'
9262 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9263 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9264 ac_uB='\([ ]\)%\1#\2define\3'
9265 ac_uC=' '
9266 ac_uD='\4%g'
9267 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9268 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9269 ac_eB='$%\1#\2define\3'
9270 ac_eC=' '
9271 ac_eD='%g'
9273 if test "${CONFIG_HEADERS+set}" != set; then
9275 cat >> $CONFIG_STATUS <<EOF
9276 CONFIG_HEADERS="auto-host.h:config.in"
9278 cat >> $CONFIG_STATUS <<\EOF
9280 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9281 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9282 case "$ac_file" in
9283 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9284 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9285 *) ac_file_in="${ac_file}.in" ;;
9286 esac
9288 echo creating $ac_file
9290 rm -f conftest.frag conftest.in conftest.out
9291 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9292 cat $ac_file_inputs > conftest.in
9296 # Transform confdefs.h into a sed script conftest.vals that substitutes
9297 # the proper values into config.h.in to produce config.h. And first:
9298 # Protect against being on the right side of a sed subst in config.status.
9299 # Protect against being in an unquoted here document in config.status.
9300 rm -f conftest.vals
9301 cat > conftest.hdr <<\EOF
9302 s/[\\&%]/\\&/g
9303 s%[\\$`]%\\&%g
9304 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9305 s%ac_d%ac_u%gp
9306 s%ac_u%ac_e%gp
9308 sed -n -f conftest.hdr confdefs.h > conftest.vals
9309 rm -f conftest.hdr
9311 # This sed command replaces #undef with comments. This is necessary, for
9312 # example, in the case of _POSIX_SOURCE, which is predefined and required
9313 # on some systems where configure will not decide to define it.
9314 cat >> conftest.vals <<\EOF
9315 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9318 # Break up conftest.vals because some shells have a limit on
9319 # the size of here documents, and old seds have small limits too.
9321 rm -f conftest.tail
9322 while :
9324 ac_lines=`grep -c . conftest.vals`
9325 # grep -c gives empty output for an empty file on some AIX systems.
9326 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9327 # Write a limited-size here document to conftest.frag.
9328 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9329 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9330 echo 'CEOF
9331 sed -f conftest.frag conftest.in > conftest.out
9332 rm -f conftest.in
9333 mv conftest.out conftest.in
9334 ' >> $CONFIG_STATUS
9335 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9336 rm -f conftest.vals
9337 mv conftest.tail conftest.vals
9338 done
9339 rm -f conftest.vals
9341 cat >> $CONFIG_STATUS <<\EOF
9342 rm -f conftest.frag conftest.h
9343 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9344 cat conftest.in >> conftest.h
9345 rm -f conftest.in
9346 if cmp -s $ac_file conftest.h 2>/dev/null; then
9347 echo "$ac_file is unchanged"
9348 rm -f conftest.h
9349 else
9350 # Remove last slash and all that follows it. Not all systems have dirname.
9351 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9352 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9353 # The file is in a subdirectory.
9354 test ! -d "$ac_dir" && mkdir "$ac_dir"
9356 rm -f $ac_file
9357 mv conftest.h $ac_file
9359 fi; done
9362 cat >> $CONFIG_STATUS <<EOF
9364 subdirs='$subdirs'
9365 symbolic_link='$symbolic_link'
9368 cat >> $CONFIG_STATUS <<\EOF
9369 for ac_file in $CONFIG_FILES; do
9370 # Support "outfile[:infile[:infile...]]"
9371 case "$ac_file" in
9372 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9373 esac
9374 # PO directories have a Makefile.in generated from Makefile.in.in.
9375 case "$ac_file" in */Makefile.in)
9376 # Adjust a relative srcdir.
9377 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9378 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9379 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9380 # In autoconf-2.13 it is called $ac_given_srcdir.
9381 # In autoconf-2.50 it is called $srcdir.
9382 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9383 case "$ac_given_srcdir" in
9384 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9385 /*) top_srcdir="$ac_given_srcdir" ;;
9386 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9387 esac
9388 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9389 rm -f "$ac_dir/POTFILES"
9390 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9391 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9392 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9393 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9396 esac
9397 done
9399 case x$CONFIG_HEADERS in
9400 xauto-host.h:config.in)
9401 echo > cstamp-h ;;
9402 esac
9403 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
9404 # bootstrapping and the installation procedure can still use
9405 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
9406 # FLAGS_TO_PASS has been modified to solve the problem there.
9407 # This is virtually a duplicate of what happens in configure.lang; we do
9408 # an extra check to make sure this only happens if ln -s can be used.
9409 if test "$symbolic_link" = "ln -s"; then
9410 for d in .. ${subdirs} fixinc ; do
9411 if test $d != ..; then
9412 STARTDIR=`${PWDCMD-pwd}`
9413 cd $d
9414 for t in stage1 stage2 stage3 stage4 include
9416 rm -f $t
9417 $symbolic_link ../$t $t 2>/dev/null
9418 done
9419 cd $STARTDIR
9421 done
9422 else true ; fi
9423 # Avoid having to add intl to our include paths.
9424 if test -f intl/libintl.h; then
9425 echo creating libintl.h
9426 echo '#include "intl/libintl.h"' >libintl.h
9429 exit 0
9431 chmod +x $CONFIG_STATUS
9432 rm -fr confdefs* $ac_clean_files
9433 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1