]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
* unroll.c (unroll_loop): Correct special exit cases.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1
JL
2
3# Guess values for system-dependent variables and create Makefiles.
b27d2bd5 4# Generated automatically using autoconf version 2.13
861bb6c1
JL
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-gnu-ld arrange to work with GNU ld."
ab339d62 16ac_help="$ac_help
e8bec136 17 --with-ld arrange to use the specified ld (full pathname)"
861bb6c1 18ac_help="$ac_help
e8bec136 19 --with-gnu-as arrange to work with GNU as"
ab339d62 20ac_help="$ac_help
e8bec136 21 --with-as arrange to use the specified as (full pathname)"
861bb6c1 22ac_help="$ac_help
e8bec136 23 --with-stabs arrange to use stabs instead of host debug format"
861bb6c1 24ac_help="$ac_help
e8bec136 25 --with-elf arrange to use ELF instead of host debug format"
861bb6c1 26ac_help="$ac_help
e8bec136 27 --with-local-prefix=DIR specifies directory to put local include"
861bb6c1
JL
28ac_help="$ac_help
29 --with-gxx-include-dir=DIR
e8bec136 30 specifies directory to put g++ header files"
39d6f2e8 31ac_help="$ac_help
e8bec136 32 --enable-multilib enable library support for multiple ABIs"
a494747c 33ac_help="$ac_help
f4524c9e
ZW
34 --enable-checking[=LIST]
35 enable expensive run-time checks. With LIST,
36 enable only specific categories of checks.
37 Categories are: misc,tree,rtl,gc,gcac; default
59f406b7 38 is misc,tree,gc"
3ecc3258 39ac_help="$ac_help
e8bec136 40 --disable-cpp don't provide a user-visible C preprocessor"
3ecc3258
ZW
41ac_help="$ac_help
42 --with-cpp-install-dir=DIR
43 install the user visible C preprocessor in DIR
e8bec136 44 (relative to PREFIX) as well as PREFIX/bin"
c5c76735 45ac_help="$ac_help
e8bec136 46 --enable-c-mbchar enable multibyte characters for C and C++"
861bb6c1 47ac_help="$ac_help
e8bec136
RO
48 --enable-threads enable thread usage for target GCC
49 --enable-threads=LIB use LIB thread package for target GCC"
d8bb17c8
OP
50ac_help="$ac_help
51 --enable-objc-gc enable the use of Boehm's garbage collector with
e8bec136 52 the GNU Objective-C runtime"
90e6a802 53ac_help="$ac_help
e8bec136 54 --with-dwarf2 force the default debug format to be DWARF 2"
50503ac8 55ac_help="$ac_help
e8bec136 56 --disable-shared don't provide a shared libgcc"
f91abfce
TT
57ac_help="$ac_help
58 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
ab87f8c8 59ac_help="$ac_help
dc6746e7 60 --enable-nls use Native Language Support (default)"
71a94577
ZW
61ac_help="$ac_help
62 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
ab87f8c8
JL
63ac_help="$ac_help
64 --disable-nls do not use Native Language Support"
65ac_help="$ac_help
66 --with-included-gettext use the GNU gettext library included here"
f4ab28e3
MK
67ac_help="$ac_help
68 --disable-win32-registry
e8bec136
RO
69 disable lookup of installation paths in the
70 Registry on Windows hosts
71 --enable-win32-registry enable registry lookup (default)
f4ab28e3 72 --enable-win32-registry=KEY
e8bec136
RO
73 use KEY instead of GCC version as the last portion
74 of the registry key"
81bf3d9e 75ac_help="$ac_help
e8bec136
RO
76 --with-gc={simple,page} choose the garbage collection mechanism to use
77 with the compiler"
3c809ba4
AG
78ac_help="$ac_help
79 --with-system-zlib use installed libz"
dc6746e7 80ac_help="$ac_help
e8bec136
RO
81 --enable-maintainer-mode
82 enable make rules and dependencies not useful
dc6746e7 83 (and sometimes confusing) to the casual installer"
531073e7 84ac_help="$ac_help
e8bec136
RO
85 --enable-sjlj-exceptions
86 arrange to use setjmp/longjmp exception handling"
2bbea3a6 87ac_help="$ac_help
e8bec136
RO
88 --enable-version-specific-runtime-libs
89 specify that runtime libraries should be
90 installed in a compiler-specific directory"
5b15f277
RH
91ac_help="$ac_help
92 --with-slibdir=DIR shared libraries in DIR [LIBDIR]"
861bb6c1
JL
93
94# Initialize some variables set by options.
95# The variables have the same names as the options, with
96# dashes changed to underlines.
97build=NONE
98cache_file=./config.cache
99exec_prefix=NONE
100host=NONE
101no_create=
102nonopt=NONE
103no_recursion=
104prefix=NONE
105program_prefix=NONE
106program_suffix=NONE
107program_transform_name=s,x,x,
108silent=
109site=
110srcdir=
111target=NONE
112verbose=
113x_includes=NONE
114x_libraries=NONE
115bindir='${exec_prefix}/bin'
116sbindir='${exec_prefix}/sbin'
117libexecdir='${exec_prefix}/libexec'
118datadir='${prefix}/share'
119sysconfdir='${prefix}/etc'
120sharedstatedir='${prefix}/com'
121localstatedir='${prefix}/var'
122libdir='${exec_prefix}/lib'
123includedir='${prefix}/include'
124oldincludedir='/usr/include'
125infodir='${prefix}/info'
126mandir='${prefix}/man'
127
128# Initialize some other variables.
129subdirs=
130MFLAGS= MAKEFLAGS=
6f144c9c 131SHELL=${CONFIG_SHELL-/bin/sh}
861bb6c1
JL
132# Maximum number of lines to put in a shell here document.
133ac_max_here_lines=12
134
135ac_prev=
136for ac_option
137do
138
139 # If the previous option needs an argument, assign it.
140 if test -n "$ac_prev"; then
141 eval "$ac_prev=\$ac_option"
142 ac_prev=
143 continue
144 fi
145
146 case "$ac_option" in
147 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
148 *) ac_optarg= ;;
149 esac
150
151 # Accept the important Cygnus configure options, so we can diagnose typos.
152
153 case "$ac_option" in
154
155 -bindir | --bindir | --bindi | --bind | --bin | --bi)
156 ac_prev=bindir ;;
157 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
158 bindir="$ac_optarg" ;;
159
160 -build | --build | --buil | --bui | --bu)
161 ac_prev=build ;;
162 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
163 build="$ac_optarg" ;;
164
165 -cache-file | --cache-file | --cache-fil | --cache-fi \
166 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
167 ac_prev=cache_file ;;
168 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
169 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
170 cache_file="$ac_optarg" ;;
171
172 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
173 ac_prev=datadir ;;
174 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
175 | --da=*)
176 datadir="$ac_optarg" ;;
177
178 -disable-* | --disable-*)
179 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
180 # Reject names that are not valid shell variable names.
181 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
182 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
183 fi
184 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
185 eval "enable_${ac_feature}=no" ;;
186
187 -enable-* | --enable-*)
188 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
189 # Reject names that are not valid shell variable names.
190 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
191 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
192 fi
193 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
194 case "$ac_option" in
195 *=*) ;;
196 *) ac_optarg=yes ;;
197 esac
198 eval "enable_${ac_feature}='$ac_optarg'" ;;
199
200 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
201 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
202 | --exec | --exe | --ex)
203 ac_prev=exec_prefix ;;
204 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
205 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
206 | --exec=* | --exe=* | --ex=*)
207 exec_prefix="$ac_optarg" ;;
208
209 -gas | --gas | --ga | --g)
210 # Obsolete; use --with-gas.
211 with_gas=yes ;;
212
213 -help | --help | --hel | --he)
214 # Omit some internal or obsolete options to make the list less imposing.
215 # This message is too long to be a string in the A/UX 3.1 sh.
216 cat << EOF
217Usage: configure [options] [host]
218Options: [defaults in brackets after descriptions]
219Configuration:
220 --cache-file=FILE cache test results in FILE
221 --help print this message
222 --no-create do not create output files
223 --quiet, --silent do not print \`checking...' messages
224 --version print the version of autoconf that created configure
225Directory and file names:
226 --prefix=PREFIX install architecture-independent files in PREFIX
227 [$ac_default_prefix]
228 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
229 [same as prefix]
230 --bindir=DIR user executables in DIR [EPREFIX/bin]
231 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
232 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
233 --datadir=DIR read-only architecture-independent data in DIR
234 [PREFIX/share]
235 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
236 --sharedstatedir=DIR modifiable architecture-independent data in DIR
237 [PREFIX/com]
238 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
239 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
240 --includedir=DIR C header files in DIR [PREFIX/include]
241 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
242 --infodir=DIR info documentation in DIR [PREFIX/info]
243 --mandir=DIR man documentation in DIR [PREFIX/man]
244 --srcdir=DIR find the sources in DIR [configure dir or ..]
245 --program-prefix=PREFIX prepend PREFIX to installed program names
246 --program-suffix=SUFFIX append SUFFIX to installed program names
247 --program-transform-name=PROGRAM
248 run sed PROGRAM on installed program names
249EOF
250 cat << EOF
251Host type:
252 --build=BUILD configure for building on BUILD [BUILD=HOST]
253 --host=HOST configure for HOST [guessed]
254 --target=TARGET configure for TARGET [TARGET=HOST]
255Features and packages:
256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
258 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
259 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
260 --x-includes=DIR X include files are in DIR
261 --x-libraries=DIR X library files are in DIR
262EOF
263 if test -n "$ac_help"; then
264 echo "--enable and --with options recognized:$ac_help"
265 fi
266 exit 0 ;;
267
268 -host | --host | --hos | --ho)
269 ac_prev=host ;;
270 -host=* | --host=* | --hos=* | --ho=*)
271 host="$ac_optarg" ;;
272
273 -includedir | --includedir | --includedi | --included | --include \
274 | --includ | --inclu | --incl | --inc)
275 ac_prev=includedir ;;
276 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
277 | --includ=* | --inclu=* | --incl=* | --inc=*)
278 includedir="$ac_optarg" ;;
279
280 -infodir | --infodir | --infodi | --infod | --info | --inf)
281 ac_prev=infodir ;;
282 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
283 infodir="$ac_optarg" ;;
284
285 -libdir | --libdir | --libdi | --libd)
286 ac_prev=libdir ;;
287 -libdir=* | --libdir=* | --libdi=* | --libd=*)
288 libdir="$ac_optarg" ;;
289
290 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
291 | --libexe | --libex | --libe)
292 ac_prev=libexecdir ;;
293 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
294 | --libexe=* | --libex=* | --libe=*)
295 libexecdir="$ac_optarg" ;;
296
297 -localstatedir | --localstatedir | --localstatedi | --localstated \
298 | --localstate | --localstat | --localsta | --localst \
299 | --locals | --local | --loca | --loc | --lo)
300 ac_prev=localstatedir ;;
301 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
302 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
303 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
304 localstatedir="$ac_optarg" ;;
305
306 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
307 ac_prev=mandir ;;
308 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
309 mandir="$ac_optarg" ;;
310
311 -nfp | --nfp | --nf)
312 # Obsolete; use --without-fp.
313 with_fp=no ;;
314
315 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
316 | --no-cr | --no-c)
317 no_create=yes ;;
318
319 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
320 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
321 no_recursion=yes ;;
322
323 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
324 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
325 | --oldin | --oldi | --old | --ol | --o)
326 ac_prev=oldincludedir ;;
327 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
328 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
329 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
330 oldincludedir="$ac_optarg" ;;
331
332 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
333 ac_prev=prefix ;;
334 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
335 prefix="$ac_optarg" ;;
336
337 -program-prefix | --program-prefix | --program-prefi | --program-pref \
338 | --program-pre | --program-pr | --program-p)
339 ac_prev=program_prefix ;;
340 -program-prefix=* | --program-prefix=* | --program-prefi=* \
341 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
342 program_prefix="$ac_optarg" ;;
343
344 -program-suffix | --program-suffix | --program-suffi | --program-suff \
345 | --program-suf | --program-su | --program-s)
346 ac_prev=program_suffix ;;
347 -program-suffix=* | --program-suffix=* | --program-suffi=* \
348 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
349 program_suffix="$ac_optarg" ;;
350
351 -program-transform-name | --program-transform-name \
352 | --program-transform-nam | --program-transform-na \
353 | --program-transform-n | --program-transform- \
354 | --program-transform | --program-transfor \
355 | --program-transfo | --program-transf \
356 | --program-trans | --program-tran \
357 | --progr-tra | --program-tr | --program-t)
358 ac_prev=program_transform_name ;;
359 -program-transform-name=* | --program-transform-name=* \
360 | --program-transform-nam=* | --program-transform-na=* \
361 | --program-transform-n=* | --program-transform-=* \
362 | --program-transform=* | --program-transfor=* \
363 | --program-transfo=* | --program-transf=* \
364 | --program-trans=* | --program-tran=* \
365 | --progr-tra=* | --program-tr=* | --program-t=*)
366 program_transform_name="$ac_optarg" ;;
367
368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
369 | -silent | --silent | --silen | --sile | --sil)
370 silent=yes ;;
371
372 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
373 ac_prev=sbindir ;;
374 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
375 | --sbi=* | --sb=*)
376 sbindir="$ac_optarg" ;;
377
378 -sharedstatedir | --sharedstatedir | --sharedstatedi \
379 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
380 | --sharedst | --shareds | --shared | --share | --shar \
381 | --sha | --sh)
382 ac_prev=sharedstatedir ;;
383 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
384 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
385 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
386 | --sha=* | --sh=*)
387 sharedstatedir="$ac_optarg" ;;
388
389 -site | --site | --sit)
390 ac_prev=site ;;
391 -site=* | --site=* | --sit=*)
392 site="$ac_optarg" ;;
393
394 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
395 ac_prev=srcdir ;;
396 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
397 srcdir="$ac_optarg" ;;
398
399 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
400 | --syscon | --sysco | --sysc | --sys | --sy)
401 ac_prev=sysconfdir ;;
402 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
403 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
404 sysconfdir="$ac_optarg" ;;
405
406 -target | --target | --targe | --targ | --tar | --ta | --t)
407 ac_prev=target ;;
408 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
409 target="$ac_optarg" ;;
410
411 -v | -verbose | --verbose | --verbos | --verbo | --verb)
412 verbose=yes ;;
413
414 -version | --version | --versio | --versi | --vers)
b27d2bd5 415 echo "configure generated by autoconf version 2.13"
861bb6c1
JL
416 exit 0 ;;
417
418 -with-* | --with-*)
419 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
423 fi
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 case "$ac_option" in
426 *=*) ;;
427 *) ac_optarg=yes ;;
428 esac
429 eval "with_${ac_package}='$ac_optarg'" ;;
430
431 -without-* | --without-*)
432 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
433 # Reject names that are not valid shell variable names.
434 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
435 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
436 fi
437 ac_package=`echo $ac_package| sed 's/-/_/g'`
438 eval "with_${ac_package}=no" ;;
439
440 --x)
441 # Obsolete; use --with-x.
442 with_x=yes ;;
443
444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
445 | --x-incl | --x-inc | --x-in | --x-i)
446 ac_prev=x_includes ;;
447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
449 x_includes="$ac_optarg" ;;
450
451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
453 ac_prev=x_libraries ;;
454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
456 x_libraries="$ac_optarg" ;;
457
458 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
459 ;;
460
461 *)
462 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
463 echo "configure: warning: $ac_option: invalid host type" 1>&2
464 fi
465 if test "x$nonopt" != xNONE; then
466 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
467 fi
468 nonopt="$ac_option"
469 ;;
470
471 esac
472done
473
474if test -n "$ac_prev"; then
475 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
476fi
477
478trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
479
480# File descriptor usage:
481# 0 standard input
482# 1 file creation
483# 2 errors and warnings
484# 3 some systems may open it to /dev/tty
485# 4 used on the Kubota Titan
486# 6 checking for... messages and results
487# 5 compiler messages saved in config.log
488if test "$silent" = yes; then
489 exec 6>/dev/null
490else
491 exec 6>&1
492fi
493exec 5>./config.log
494
495echo "\
496This file contains any messages produced by compilers while
497running configure, to aid debugging if configure makes a mistake.
498" 1>&5
499
500# Strip out --no-create and --no-recursion so they do not pile up.
501# Also quote any args containing shell metacharacters.
502ac_configure_args=
503for ac_arg
504do
505 case "$ac_arg" in
506 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
507 | --no-cr | --no-c) ;;
508 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
509 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
510 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
511 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
512 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
513 esac
514done
515
516# NLS nuisances.
517# Only set these to C if already set. These must not be set unconditionally
518# because not all systems understand e.g. LANG=C (notably SCO).
519# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
520# Non-C LC_CTYPE values break the ctype check.
521if test "${LANG+set}" = set; then LANG=C; export LANG; fi
522if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
523if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
524if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
525
526# confdefs.h avoids OS command line length limits that DEFS can exceed.
527rm -rf conftest* confdefs.h
528# AIX cpp loses on an empty file, so make sure it contains at least a newline.
529echo > confdefs.h
530
531# A filename unique to this package, relative to the directory that
532# configure is in, which we can look for to find out if srcdir is correct.
533ac_unique_file=tree.c
534
535# Find the source files, if location was not specified.
536if test -z "$srcdir"; then
537 ac_srcdir_defaulted=yes
538 # Try the directory containing this script, then its parent.
539 ac_prog=$0
540 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
541 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
542 srcdir=$ac_confdir
543 if test ! -r $srcdir/$ac_unique_file; then
544 srcdir=..
545 fi
546else
547 ac_srcdir_defaulted=no
548fi
549if test ! -r $srcdir/$ac_unique_file; then
550 if test "$ac_srcdir_defaulted" = yes; then
551 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
552 else
553 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
554 fi
555fi
556srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
557
558# Prefer explicitly selected file to automatically selected ones.
e08f13ee
JS
559if test -z "$CONFIG_SITE"; then
560 if test "x$prefix" != xNONE; then
561 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
562 else
563 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
861bb6c1
JL
564 fi
565fi
566for ac_site_file in $CONFIG_SITE; do
567 if test -r "$ac_site_file"; then
568 echo "loading site script $ac_site_file"
569 . "$ac_site_file"
570 fi
571done
572
573if test -r "$cache_file"; then
574 echo "loading cache $cache_file"
575 . $cache_file
576else
577 echo "creating cache $cache_file"
578 > $cache_file
579fi
580
581ac_ext=c
582# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
583ac_cpp='$CPP $CPPFLAGS'
584ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 585ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
861bb6c1
JL
586cross_compiling=$ac_cv_prog_cc_cross
587
cd9e5e7c
MK
588ac_exeext=
589ac_objext=o
861bb6c1
JL
590if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
591 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
592 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
593 ac_n= ac_c='
594' ac_t=' '
595 else
596 ac_n=-n ac_c= ac_t=
597 fi
598else
599 ac_n= ac_c='\c' ac_t=
600fi
601
602
603
604
861bb6c1
JL
605remove=rm
606hard_link=ln
607symbolic_link='ln -s'
608copy=cp
609
75a39864
JL
610# Check for bogus environment variables.
611# Test if LIBRARY_PATH contains the notation for the current directory
612# since this would lead to problems installing/building glibc.
613# LIBRARY_PATH contains the current directory if one of the following
614# is true:
615# - one of the terminals (":" and ";") is the first or last sign
616# - two terminals occur directly after each other
617# - the path contains an element with a dot in it
618echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
e08f13ee 619echo "configure:620: checking LIBRARY_PATH variable" >&5
75a39864
JL
620case ${LIBRARY_PATH} in
621 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
622 library_path_setting="contains current directory"
623 ;;
624 *)
625 library_path_setting="ok"
626 ;;
627esac
628echo "$ac_t""$library_path_setting" 1>&6
629if test "$library_path_setting" != "ok"; then
630{ echo "configure: error:
631*** LIBRARY_PATH shouldn't contain the current directory when
079bd08e 632*** building gcc. Please change the environment variable
75a39864
JL
633*** and run configure again." 1>&2; exit 1; }
634fi
635
636# Test if GCC_EXEC_PREFIX contains the notation for the current directory
637# since this would lead to problems installing/building glibc.
638# GCC_EXEC_PREFIX contains the current directory if one of the following
639# is true:
640# - one of the terminals (":" and ";") is the first or last sign
641# - two terminals occur directly after each other
642# - the path contains an element with a dot in it
643echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
e08f13ee 644echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5
75a39864
JL
645case ${GCC_EXEC_PREFIX} in
646 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
647 gcc_exec_prefix_setting="contains current directory"
648 ;;
649 *)
650 gcc_exec_prefix_setting="ok"
651 ;;
652esac
653echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
654if test "$gcc_exec_prefix_setting" != "ok"; then
655{ echo "configure: error:
656*** GCC_EXEC_PREFIX shouldn't contain the current directory when
079bd08e 657*** building gcc. Please change the environment variable
75a39864
JL
658*** and run configure again." 1>&2; exit 1; }
659fi
660
861bb6c1
JL
661# Check for additional parameters
662
663# With GNU ld
664# Check whether --with-gnu-ld or --without-gnu-ld was given.
665if test "${with_gnu_ld+set}" = set; then
666 withval="$with_gnu_ld"
df6faf79 667 gnu_ld_flag="$with_gnu_ld"
861bb6c1 668else
df6faf79 669 gnu_ld_flag=no
861bb6c1
JL
670fi
671
672
ab339d62
AO
673# With pre-defined ld
674# Check whether --with-ld or --without-ld was given.
675if test "${with_ld+set}" = set; then
676 withval="$with_ld"
3ccc3a56 677 DEFAULT_LINKER="$with_ld"
ab339d62
AO
678fi
679
3ccc3a56
AO
680if test x"${DEFAULT_LINKER+set}" = x"set"; then
681 if test ! -x "$DEFAULT_LINKER"; then
682 echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
e154a394 683 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
ab339d62
AO
684 gnu_ld_flag=yes
685 fi
686 cat >> confdefs.h <<EOF
3ccc3a56 687#define DEFAULT_LINKER "$DEFAULT_LINKER"
ab339d62
AO
688EOF
689
690fi
691
861bb6c1
JL
692# With GNU as
693# Check whether --with-gnu-as or --without-gnu-as was given.
694if test "${with_gnu_as+set}" = set; then
695 withval="$with_gnu_as"
df6faf79 696 gas_flag="$with_gnu_as"
861bb6c1 697else
df6faf79 698 gas_flag=no
861bb6c1
JL
699fi
700
701
ab339d62
AO
702# Check whether --with-as or --without-as was given.
703if test "${with_as+set}" = set; then
704 withval="$with_as"
3ccc3a56 705 DEFAULT_ASSEMBLER="$with_as"
ab339d62
AO
706fi
707
3ccc3a56
AO
708if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
709 if test ! -x "$DEFAULT_ASSEMBLER"; then
710 echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
e154a394 711 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
ab339d62
AO
712 gas_flag=yes
713 fi
714 cat >> confdefs.h <<EOF
3ccc3a56 715#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ab339d62
AO
716EOF
717
3ccc3a56 718fi
ab339d62 719
861bb6c1
JL
720# With stabs
721# Check whether --with-stabs or --without-stabs was given.
722if test "${with_stabs+set}" = set; then
723 withval="$with_stabs"
535b86ce 724 stabs="$with_stabs"
861bb6c1
JL
725else
726 stabs=no
727fi
728
729
730# With ELF
731# Check whether --with-elf or --without-elf was given.
732if test "${with_elf+set}" = set; then
733 withval="$with_elf"
535b86ce 734 elf="$with_elf"
861bb6c1
JL
735else
736 elf=no
737fi
738
739
740# Specify the local prefix
4e88d51b 741local_prefix=
861bb6c1
JL
742# Check whether --with-local-prefix or --without-local-prefix was given.
743if test "${with_local_prefix+set}" = set; then
744 withval="$with_local_prefix"
4e88d51b
JM
745 case "${withval}" in
746yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
747no) ;;
748*) local_prefix=$with_local_prefix ;;
749esac
861bb6c1
JL
750fi
751
752
753# Default local prefix if it is empty
75bffa71 754if test x$local_prefix = x; then
861bb6c1
JL
755 local_prefix=/usr/local
756fi
757
8f8d3278
NC
758# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
759# passed in by the toplevel make and thus we'd get different behavior
760# depending on where we built the sources.
761gcc_gxx_include_dir=
861bb6c1
JL
762# Specify the g++ header file directory
763# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
764if test "${with_gxx_include_dir+set}" = set; then
765 withval="$with_gxx_include_dir"
4e88d51b
JM
766 case "${withval}" in
767yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
768no) ;;
8f8d3278 769*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
4e88d51b 770esac
861bb6c1
JL
771fi
772
773
8f8d3278 774if test x${gcc_gxx_include_dir} = x; then
4e88d51b 775 if test x${enable_version_specific_runtime_libs} = xyes; then
8f8d3278 776 gcc_gxx_include_dir='${libsubdir}/include/g++'
4e88d51b 777 else
a270b446 778 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
e2187d3b 779 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
4e88d51b
JM
780 fi
781fi
782
39d6f2e8
MM
783# Determine whether or not multilibs are enabled.
784# Check whether --enable-multilib or --disable-multilib was given.
785if test "${enable_multilib+set}" = set; then
786 enableval="$enable_multilib"
787 :
788else
789 enable_multilib=yes
790fi
791
792
793
a494747c
MM
794# Enable expensive internal checks
795# Check whether --enable-checking or --disable-checking was given.
796if test "${enable_checking+set}" = set; then
797 enableval="$enable_checking"
119d24d1
KG
798 ac_checking=
799ac_tree_checking=
800ac_rtl_checking=
801ac_gc_checking=
802ac_gc_always_collect=
803case "${enableval}" in
51d0e20c 804yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
4e88d51b 805no) ;;
59f406b7 806*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
f4524c9e
ZW
807 set fnord $enableval; shift
808 IFS="$ac_save_IFS"
c62e45ad
KG
809 for check
810 do
f4524c9e 811 case $check in
119d24d1
KG
812 misc) ac_checking=1 ;;
813 tree) ac_tree_checking=1 ;;
814 rtl) ac_rtl_checking=1 ;;
815 gc) ac_gc_checking=1 ;;
816 gcac) ac_gc_always_collect=1 ;;
817 *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;;
818 esac
819 done
820 ;;
821esac
51d0e20c
AJ
822
823else
824 # Enable some checks by default for development versions of GCC
825ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;
826fi
827
119d24d1
KG
828if test x$ac_checking != x ; then
829 cat >> confdefs.h <<\EOF
f4524c9e
ZW
830#define ENABLE_CHECKING 1
831EOF
119d24d1
KG
832
833fi
834if test x$ac_tree_checking != x ; then
835 cat >> confdefs.h <<\EOF
f4524c9e
ZW
836#define ENABLE_TREE_CHECKING 1
837EOF
119d24d1
KG
838
839fi
840if test x$ac_rtl_checking != x ; then
841 cat >> confdefs.h <<\EOF
f4524c9e
ZW
842#define ENABLE_RTL_CHECKING 1
843EOF
119d24d1
KG
844
845fi
846if test x$ac_gc_checking != x ; then
847 cat >> confdefs.h <<\EOF
f4524c9e
ZW
848#define ENABLE_GC_CHECKING 1
849EOF
119d24d1
KG
850
851fi
852if test x$ac_gc_always_collect != x ; then
853 cat >> confdefs.h <<\EOF
f4524c9e
ZW
854#define ENABLE_GC_ALWAYS_COLLECT 1
855EOF
119d24d1
KG
856
857fi
858
a494747c 859
3ecc3258
ZW
860# Check whether --enable-cpp or --disable-cpp was given.
861if test "${enable_cpp+set}" = set; then
862 enableval="$enable_cpp"
863 :
864else
865 enable_cpp=yes
866fi
867
868
869# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
870if test "${with_cpp_install_dir+set}" = set; then
871 withval="$with_cpp_install_dir"
872 if test x$withval = xyes; then
873 { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
874elif test x$withval != xno; then
875 cpp_install_dir=$withval
876fi
877fi
878
879
c5c76735
JL
880# Enable Multibyte Characters for C/C++
881# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
882if test "${enable_c_mbchar+set}" = set; then
883 enableval="$enable_c_mbchar"
2618c083 884 if test x$enable_c_mbchar != xno; then
9ec7291f
ZW
885 cat >> confdefs.h <<\EOF
886#define MULTIBYTE_CHARS 1
887EOF
888
c5c76735
JL
889fi
890fi
891
892
861bb6c1
JL
893# Enable threads
894# Pass with no value to take the default
895# Pass with a value to specify a thread package
896# Check whether --enable-threads or --disable-threads was given.
897if test "${enable_threads+set}" = set; then
898 enableval="$enable_threads"
981d4858 899 :
861bb6c1
JL
900else
901 enable_threads=''
902fi
903
904
e445171e 905enable_threads_flag=$enable_threads
861bb6c1 906# Check if a valid thread package
e445171e 907case x${enable_threads_flag} in
861bb6c1
JL
908 x | xno)
909 # No threads
a851212a 910 target_thread_file='single'
861bb6c1
JL
911 ;;
912 xyes)
913 # default
a851212a 914 target_thread_file=''
861bb6c1
JL
915 ;;
916 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
e08f13ee 917 xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
e445171e 918 target_thread_file=$enable_threads_flag
861bb6c1
JL
919 ;;
920 *)
921 echo "$enable_threads is an unknown thread package" 1>&2
922 exit 1
923 ;;
924esac
925
d8bb17c8
OP
926# Check whether --enable-objc-gc or --disable-objc-gc was given.
927if test "${enable_objc_gc+set}" = set; then
928 enableval="$enable_objc_gc"
2618c083 929 if test x$enable_objc_gc = xno; then
d8bb17c8
OP
930 objc_boehm_gc=''
931else
932 objc_boehm_gc=1
933fi
934else
935 objc_boehm_gc=''
936fi
937
938
90e6a802
RL
939# Check whether --with-dwarf2 or --without-dwarf2 was given.
940if test "${with_dwarf2+set}" = set; then
941 withval="$with_dwarf2"
942 dwarf2="$with_dwarf2"
943else
944 dwarf2=no
945fi
946
947
50503ac8
RH
948# Check whether --enable-shared or --disable-shared was given.
949if test "${enable_shared+set}" = set; then
950 enableval="$enable_shared"
c785e0fa
AO
951
952 case $enable_shared in
953 yes | no) ;;
954 *)
955 enable_shared=no
956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
957 for pkg in $enableval; do
958 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
959 enable_shared=yes
960 fi
961 done
962 IFS="$ac_save_ifs"
963 ;;
964 esac
965
50503ac8
RH
966else
967 enable_shared=yes
968fi
969
970
971
861bb6c1
JL
972# Determine the host, build, and target systems
973ac_aux_dir=
974for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
975 if test -f $ac_dir/install-sh; then
976 ac_aux_dir=$ac_dir
977 ac_install_sh="$ac_aux_dir/install-sh -c"
978 break
979 elif test -f $ac_dir/install.sh; then
980 ac_aux_dir=$ac_dir
981 ac_install_sh="$ac_aux_dir/install.sh -c"
982 break
983 fi
984done
985if test -z "$ac_aux_dir"; then
986 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
987fi
988ac_config_guess=$ac_aux_dir/config.guess
989ac_config_sub=$ac_aux_dir/config.sub
990ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
991
992
993# Do some error checking and defaulting for the host and target type.
994# The inputs are:
995# configure --host=HOST --target=TARGET --build=BUILD NONOPT
996#
997# The rules are:
998# 1. You are not allowed to specify --host, --target, and nonopt at the
999# same time.
1000# 2. Host defaults to nonopt.
1001# 3. If nonopt is not specified, then host defaults to the current host,
1002# as determined by config.guess.
1003# 4. Target and build default to nonopt.
1004# 5. If nonopt is not specified, then target and build default to host.
1005
1006# The aliases save the names the user supplied, while $host etc.
1007# will get canonicalized.
1008case $host---$target---$nonopt in
1009NONE---*---* | *---NONE---* | *---*---NONE) ;;
1010*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1011esac
1012
1013
1014# Make sure we can run config.sub.
6f144c9c 1015if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
861bb6c1
JL
1016else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1017fi
1018
1019echo $ac_n "checking host system type""... $ac_c" 1>&6
e08f13ee 1020echo "configure:1021: checking host system type" >&5
861bb6c1
JL
1021
1022host_alias=$host
1023case "$host_alias" in
1024NONE)
1025 case $nonopt in
1026 NONE)
6f144c9c 1027 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
861bb6c1
JL
1028 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1029 fi ;;
1030 *) host_alias=$nonopt ;;
1031 esac ;;
1032esac
1033
6f144c9c 1034host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
861bb6c1
JL
1035host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1036host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1037host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1038echo "$ac_t""$host" 1>&6
1039
1040echo $ac_n "checking target system type""... $ac_c" 1>&6
e08f13ee 1041echo "configure:1042: checking target system type" >&5
861bb6c1
JL
1042
1043target_alias=$target
1044case "$target_alias" in
1045NONE)
1046 case $nonopt in
1047 NONE) target_alias=$host_alias ;;
1048 *) target_alias=$nonopt ;;
1049 esac ;;
1050esac
1051
6f144c9c 1052target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
861bb6c1
JL
1053target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1054target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1055target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1056echo "$ac_t""$target" 1>&6
1057
1058echo $ac_n "checking build system type""... $ac_c" 1>&6
e08f13ee 1059echo "configure:1060: checking build system type" >&5
861bb6c1
JL
1060
1061build_alias=$build
1062case "$build_alias" in
1063NONE)
1064 case $nonopt in
1065 NONE) build_alias=$host_alias ;;
1066 *) build_alias=$nonopt ;;
1067 esac ;;
1068esac
1069
6f144c9c 1070build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
861bb6c1
JL
1071build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1072build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1073build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1074echo "$ac_t""$build" 1>&6
1075
1076test "$host_alias" != "$target_alias" &&
1077 test "$program_prefix$program_suffix$program_transform_name" = \
1078 NONENONEs,x,x, &&
1079 program_prefix=${target_alias}-
1080
1081
b21d216c
AF
1082# Set program_transform_name
1083if test "$program_transform_name" = s,x,x,; then
1084 program_transform_name=
1085else
1086 # Double any \ or $. echo might interpret backslashes.
1087 cat <<\EOF_SED > conftestsed
1088s,\\,\\\\,g; s,\$,$$,g
1089EOF_SED
1090 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1091 rm -f conftestsed
1092fi
1093test "$program_prefix" != NONE &&
1094 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1095# Use a double $ so make ignores it.
1096test "$program_suffix" != NONE &&
1097 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1098
1099# sed with no file args requires a program.
1100test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1101
1102
e9a25f70
JL
1103# Find the native compiler
1104# Extract the first word of "gcc", so it can be a program name with args.
1105set dummy gcc; ac_word=$2
1106echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 1107echo "configure:1108: checking for $ac_word" >&5
e9a25f70
JL
1108if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1110else
1111 if test -n "$CC"; then
1112 ac_cv_prog_CC="$CC" # Let the user override the test.
1113else
cd9e5e7c 1114 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
1115 ac_dummy="$PATH"
1116 for ac_dir in $ac_dummy; do
e9a25f70
JL
1117 test -z "$ac_dir" && ac_dir=.
1118 if test -f $ac_dir/$ac_word; then
1119 ac_cv_prog_CC="gcc"
1120 break
1121 fi
1122 done
1123 IFS="$ac_save_ifs"
1124fi
1125fi
1126CC="$ac_cv_prog_CC"
1127if test -n "$CC"; then
1128 echo "$ac_t""$CC" 1>&6
1129else
1130 echo "$ac_t""no" 1>&6
1131fi
1132
1133if test -z "$CC"; then
1134 # Extract the first word of "cc", so it can be a program name with args.
1135set dummy cc; ac_word=$2
1136echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 1137echo "configure:1138: checking for $ac_word" >&5
e9a25f70
JL
1138if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1139 echo $ac_n "(cached) $ac_c" 1>&6
1140else
1141 if test -n "$CC"; then
1142 ac_cv_prog_CC="$CC" # Let the user override the test.
1143else
cd9e5e7c 1144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
e9a25f70 1145 ac_prog_rejected=no
b27d2bd5
MK
1146 ac_dummy="$PATH"
1147 for ac_dir in $ac_dummy; do
e9a25f70
JL
1148 test -z "$ac_dir" && ac_dir=.
1149 if test -f $ac_dir/$ac_word; then
1150 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1151 ac_prog_rejected=yes
1152 continue
1153 fi
1154 ac_cv_prog_CC="cc"
1155 break
1156 fi
1157 done
1158 IFS="$ac_save_ifs"
1159if test $ac_prog_rejected = yes; then
1160 # We found a bogon in the path, so make sure we never use it.
1161 set dummy $ac_cv_prog_CC
1162 shift
1163 if test $# -gt 0; then
1164 # We chose a different compiler from the bogus one.
1165 # However, it has the same basename, so the bogon will be chosen
1166 # first if we set CC to just the basename; use the full file name.
1167 shift
1168 set dummy "$ac_dir/$ac_word" "$@"
1169 shift
1170 ac_cv_prog_CC="$@"
1171 fi
1172fi
1173fi
1174fi
1175CC="$ac_cv_prog_CC"
1176if test -n "$CC"; then
1177 echo "$ac_t""$CC" 1>&6
1178else
1179 echo "$ac_t""no" 1>&6
1180fi
1181
cd9e5e7c
MK
1182 if test -z "$CC"; then
1183 case "`uname -s`" in
1184 *win32* | *WIN32*)
1185 # Extract the first word of "cl", so it can be a program name with args.
1186set dummy cl; ac_word=$2
1187echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 1188echo "configure:1189: checking for $ac_word" >&5
cd9e5e7c
MK
1189if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1191else
1192 if test -n "$CC"; then
1193 ac_cv_prog_CC="$CC" # Let the user override the test.
1194else
1195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
1196 ac_dummy="$PATH"
1197 for ac_dir in $ac_dummy; do
cd9e5e7c
MK
1198 test -z "$ac_dir" && ac_dir=.
1199 if test -f $ac_dir/$ac_word; then
1200 ac_cv_prog_CC="cl"
1201 break
1202 fi
1203 done
1204 IFS="$ac_save_ifs"
1205fi
1206fi
1207CC="$ac_cv_prog_CC"
1208if test -n "$CC"; then
1209 echo "$ac_t""$CC" 1>&6
1210else
1211 echo "$ac_t""no" 1>&6
1212fi
1213 ;;
1214 esac
1215 fi
e9a25f70
JL
1216 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1217fi
1218
1219echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
b21d216c 1220echo "configure:1221: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
e9a25f70
JL
1221
1222ac_ext=c
1223# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1224ac_cpp='$CPP $CPPFLAGS'
1225ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cd9e5e7c 1226ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
e9a25f70
JL
1227cross_compiling=$ac_cv_prog_cc_cross
1228
b27d2bd5
MK
1229cat > conftest.$ac_ext << EOF
1230
b21d216c 1231#line 1232 "configure"
e9a25f70 1232#include "confdefs.h"
b27d2bd5 1233
e9a25f70
JL
1234main(){return(0);}
1235EOF
b21d216c 1236if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e9a25f70
JL
1237 ac_cv_prog_cc_works=yes
1238 # If we can't run a trivial program, we are probably using a cross compiler.
1239 if (./conftest; exit) 2>/dev/null; then
1240 ac_cv_prog_cc_cross=no
1241 else
1242 ac_cv_prog_cc_cross=yes
1243 fi
1244else
1245 echo "configure: failed program was:" >&5
1246 cat conftest.$ac_ext >&5
1247 ac_cv_prog_cc_works=no
1248fi
1249rm -fr conftest*
b27d2bd5
MK
1250ac_ext=c
1251# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1252ac_cpp='$CPP $CPPFLAGS'
1253ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1254ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1255cross_compiling=$ac_cv_prog_cc_cross
e9a25f70
JL
1256
1257echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1258if test $ac_cv_prog_cc_works = no; then
1259 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1260fi
1261echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
b21d216c 1262echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
e9a25f70
JL
1263echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1264cross_compiling=$ac_cv_prog_cc_cross
1265
1266echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
b21d216c 1267echo "configure:1268: checking whether we are using GNU C" >&5
e9a25f70
JL
1268if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271 cat > conftest.c <<EOF
1272#ifdef __GNUC__
1273 yes;
1274#endif
1275EOF
b21d216c 1276if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
e9a25f70
JL
1277 ac_cv_prog_gcc=yes
1278else
1279 ac_cv_prog_gcc=no
1280fi
1281fi
1282
1283echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1284
1285if test $ac_cv_prog_gcc = yes; then
1286 GCC=yes
cd9e5e7c
MK
1287else
1288 GCC=
1289fi
1290
1291ac_test_CFLAGS="${CFLAGS+set}"
1292ac_save_CFLAGS="$CFLAGS"
1293CFLAGS=
1294echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
b21d216c 1295echo "configure:1296: checking whether ${CC-cc} accepts -g" >&5
e9a25f70
JL
1296if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1297 echo $ac_n "(cached) $ac_c" 1>&6
1298else
1299 echo 'void f(){}' > conftest.c
1300if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1301 ac_cv_prog_cc_g=yes
1302else
1303 ac_cv_prog_cc_g=no
1304fi
1305rm -f conftest*
1306
1307fi
1308
1309echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
cd9e5e7c
MK
1310if test "$ac_test_CFLAGS" = set; then
1311 CFLAGS="$ac_save_CFLAGS"
1312elif test $ac_cv_prog_cc_g = yes; then
1313 if test "$GCC" = yes; then
e9a25f70
JL
1314 CFLAGS="-g -O2"
1315 else
cd9e5e7c 1316 CFLAGS="-g"
81814e35 1317 fi
3723cad9 1318else
cd9e5e7c
MK
1319 if test "$GCC" = yes; then
1320 CFLAGS="-O2"
1321 else
1322 CFLAGS=
1323 fi
e9a25f70
JL
1324fi
1325
3ec83fc2
RH
1326if test "x$CC" != xcc; then
1327 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
b21d216c 1328echo "configure:1329: checking whether $CC and cc understand -c and -o together" >&5
3ec83fc2
RH
1329else
1330 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
b21d216c 1331echo "configure:1332: checking whether cc understands -c and -o together" >&5
3ec83fc2
RH
1332fi
1333set dummy $CC; ac_cc="`echo $2 |
1334 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1335if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 echo 'foo(){}' > conftest.c
1339# Make sure it works both with $CC and with simple cc.
1340# We do the test twice because some compilers refuse to overwrite an
1341# existing .o file with -o, though they will create one.
1342ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
b21d216c
AF
1343if { (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1344 test -f conftest.o && { (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3ec83fc2
RH
1345then
1346 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1347 if test "x$CC" != xcc; then
1348 # Test first that cc exists at all.
b21d216c 1349 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
3ec83fc2 1350 ac_try='cc -c conftest.c -o conftest.o 1>&5'
b21d216c
AF
1351 if { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1352 test -f conftest.o && { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
3ec83fc2
RH
1353 then
1354 # cc works too.
1355 :
1356 else
1357 # cc exists but doesn't like -o.
1358 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1359 fi
1360 fi
1361 fi
1362else
1363 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1364fi
1365rm -f conftest*
1366
1367fi
1368if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1369 echo "$ac_t""yes" 1>&6
1370else
1371 echo "$ac_t""no" 1>&6
1372 cat >> confdefs.h <<\EOF
1373#define NO_MINUS_C_MINUS_O 1
1374EOF
1375
1376fi
1377
b8dad04b 1378# autoconf is lame and doesn't give us any substitution variable for this.
e38df833 1379if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
b4c7e567 1380 NO_MINUS_C_MINUS_O=yes
b8dad04b
ZW
1381else
1382 OUTPUT_OPTION='-o $@'
b4c7e567 1383fi
3ec83fc2
RH
1384
1385
b8dad04b 1386
75e93faa 1387echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
b21d216c 1388echo "configure:1389: checking whether ${CC-cc} accepts -Wno-long-long" >&5
75e93faa
ZW
1389if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1391else
1392 save_CFLAGS="$CFLAGS"
1393CFLAGS="-Wno-long-long"
1394cat > conftest.$ac_ext <<EOF
b21d216c 1395#line 1396 "configure"
75e93faa
ZW
1396#include "confdefs.h"
1397
1398int main() {
1399
1400; return 0; }
1401EOF
b21d216c 1402if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1403 rm -rf conftest*
1404 ac_cv_prog_cc_no_long_long=yes
1405else
1406 echo "configure: failed program was:" >&5
1407 cat conftest.$ac_ext >&5
1408 rm -rf conftest*
1409 ac_cv_prog_cc_no_long_long=no
1410fi
1411rm -f conftest*
1412CFLAGS="$save_CFLAGS"
1413fi
1414
1415echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
1416strict1_warn=
1417if test $ac_cv_prog_cc_no_long_long = yes; then
1418 strict1_warn="-pedantic -Wno-long-long"
1419fi
1420
1421
84c041a1 1422echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b21d216c 1423echo "configure:1424: checking how to run the C preprocessor" >&5
84c041a1
ZW
1424# On Suns, sometimes $CPP names a directory.
1425if test -n "$CPP" && test -d "$CPP"; then
1426 CPP=
1427fi
1428if test -z "$CPP"; then
1429if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1430 echo $ac_n "(cached) $ac_c" 1>&6
1431else
1432 # This must be in double quotes, not single quotes, because CPP may get
1433 # substituted into the Makefile and "${CC-cc}" will confuse make.
1434 CPP="${CC-cc} -E"
1435 # On the NeXT, cc -E runs the code through the compiler's parser,
1436 # not just through cpp.
1437 cat > conftest.$ac_ext <<EOF
b21d216c 1438#line 1439 "configure"
84c041a1
ZW
1439#include "confdefs.h"
1440#include <assert.h>
1441Syntax Error
1442EOF
1443ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 1444{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
84c041a1
ZW
1445ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1446if test -z "$ac_err"; then
1447 :
1448else
1449 echo "$ac_err" >&5
1450 echo "configure: failed program was:" >&5
1451 cat conftest.$ac_ext >&5
1452 rm -rf conftest*
1453 CPP="${CC-cc} -E -traditional-cpp"
1454 cat > conftest.$ac_ext <<EOF
b21d216c 1455#line 1456 "configure"
84c041a1
ZW
1456#include "confdefs.h"
1457#include <assert.h>
1458Syntax Error
1459EOF
1460ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 1461{ (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
84c041a1
ZW
1462ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1463if test -z "$ac_err"; then
1464 :
1465else
1466 echo "$ac_err" >&5
1467 echo "configure: failed program was:" >&5
1468 cat conftest.$ac_ext >&5
1469 rm -rf conftest*
1470 CPP="${CC-cc} -nologo -E"
1471 cat > conftest.$ac_ext <<EOF
b21d216c 1472#line 1473 "configure"
84c041a1
ZW
1473#include "confdefs.h"
1474#include <assert.h>
1475Syntax Error
1476EOF
1477ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 1478{ (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
84c041a1
ZW
1479ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1480if test -z "$ac_err"; then
1481 :
1482else
1483 echo "$ac_err" >&5
1484 echo "configure: failed program was:" >&5
1485 cat conftest.$ac_ext >&5
1486 rm -rf conftest*
1487 CPP=/lib/cpp
1488fi
1489rm -f conftest*
1490fi
1491rm -f conftest*
1492fi
1493rm -f conftest*
1494 ac_cv_prog_CPP="$CPP"
1495fi
1496 CPP="$ac_cv_prog_CPP"
1497else
1498 ac_cv_prog_CPP="$CPP"
1499fi
1500echo "$ac_t""$CPP" 1>&6
1501
75e93faa 1502echo $ac_n "checking for inline""... $ac_c" 1>&6
b21d216c 1503echo "configure:1504: checking for inline" >&5
75e93faa
ZW
1504if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1505 echo $ac_n "(cached) $ac_c" 1>&6
1506else
1507 ac_cv_c_inline=no
1508for ac_kw in inline __inline__ __inline; do
1509 cat > conftest.$ac_ext <<EOF
b21d216c 1510#line 1511 "configure"
75e93faa
ZW
1511#include "confdefs.h"
1512
1513int main() {
1514} $ac_kw foo() {
1515; return 0; }
1516EOF
b21d216c 1517if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1518 rm -rf conftest*
1519 ac_cv_c_inline=$ac_kw; break
1520else
1521 echo "configure: failed program was:" >&5
1522 cat conftest.$ac_ext >&5
1523fi
1524rm -f conftest*
1525done
1526
1527fi
1528
1529echo "$ac_t""$ac_cv_c_inline" 1>&6
1530case "$ac_cv_c_inline" in
1531 inline | yes) ;;
1532 no) cat >> confdefs.h <<\EOF
1533#define inline
1534EOF
1535 ;;
1536 *) cat >> confdefs.h <<EOF
1537#define inline $ac_cv_c_inline
1538EOF
1539 ;;
1540esac
1541
1542echo $ac_n "checking for volatile""... $ac_c" 1>&6
b21d216c 1543echo "configure:1544: checking for volatile" >&5
75e93faa
ZW
1544if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1546else
1547 cat > conftest.$ac_ext <<EOF
b21d216c 1548#line 1549 "configure"
75e93faa
ZW
1549#include "confdefs.h"
1550
1551int main() {
1552volatile int foo;
1553; return 0; }
1554EOF
b21d216c 1555if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1556 rm -rf conftest*
1557 gcc_cv_c_volatile=yes
1558else
1559 echo "configure: failed program was:" >&5
1560 cat conftest.$ac_ext >&5
1561 rm -rf conftest*
1562 gcc_cv_c_volatile=no
1563fi
1564rm -f conftest*
1565fi
1566
1567echo "$ac_t""$gcc_cv_c_volatile" 1>&6
1568if test $gcc_cv_c_volatile = yes ; then
1569 cat >> confdefs.h <<\EOF
1570#define HAVE_VOLATILE 1
1571EOF
1572
1573fi
1574
1575
04cabffc 1576echo $ac_n "checking for long double""... $ac_c" 1>&6
b21d216c 1577echo "configure:1578: checking for long double" >&5
04cabffc
KG
1578if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1580else
1581 if test "$GCC" = yes; then
1582 gcc_cv_c_long_double=yes
1583else
1584cat > conftest.$ac_ext <<EOF
b21d216c 1585#line 1586 "configure"
04cabffc
KG
1586#include "confdefs.h"
1587
1588int main() {
1589/* The Stardent Vistra knows sizeof(long double), but does not support it. */
1590long double foo = 0.0;
1591/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1592switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
1593; return 0; }
1594EOF
b21d216c 1595if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
04cabffc
KG
1596 rm -rf conftest*
1597 gcc_cv_c_long_double=yes
1598else
1599 echo "configure: failed program was:" >&5
1600 cat conftest.$ac_ext >&5
1601 rm -rf conftest*
1602 gcc_cv_c_long_double=no
1603fi
1604rm -f conftest*
1605fi
1606fi
1607
1608echo "$ac_t""$gcc_cv_c_long_double" 1>&6
1609if test $gcc_cv_c_long_double = yes; then
1610 cat >> confdefs.h <<\EOF
1611#define HAVE_LONG_DOUBLE 1
1612EOF
1613
1614fi
1615
75e93faa 1616echo $ac_n "checking for long long int""... $ac_c" 1>&6
b21d216c 1617echo "configure:1618: checking for long long int" >&5
75e93faa
ZW
1618if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620else
1621 cat > conftest.$ac_ext <<EOF
b21d216c 1622#line 1623 "configure"
75e93faa 1623#include "confdefs.h"
61842080 1624
75e93faa
ZW
1625int main() {
1626long long int i;
1627; return 0; }
1628EOF
b21d216c 1629if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1630 rm -rf conftest*
1631 ac_cv_c_long_long=yes
1632else
1633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
1635 rm -rf conftest*
1636 ac_cv_c_long_long=no
1637fi
1638rm -f conftest*
1639fi
1640
1641echo "$ac_t""$ac_cv_c_long_long" 1>&6
1642 if test $ac_cv_c_long_long = yes; then
1643 cat >> confdefs.h <<\EOF
1644#define HAVE_LONG_LONG 1
1645EOF
1646
1647 fi
1648echo $ac_n "checking for __int64""... $ac_c" 1>&6
b21d216c 1649echo "configure:1650: checking for __int64" >&5
75e93faa 1650if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
5c3bc9fb
GK
1651 echo $ac_n "(cached) $ac_c" 1>&6
1652else
75e93faa 1653 cat > conftest.$ac_ext <<EOF
b21d216c 1654#line 1655 "configure"
5c3bc9fb
GK
1655#include "confdefs.h"
1656
1657int main() {
75e93faa
ZW
1658__int64 i;
1659; return 0; }
1660EOF
b21d216c 1661if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1662 rm -rf conftest*
1663 ac_cv_c___int64=yes
1664else
1665 echo "configure: failed program was:" >&5
1666 cat conftest.$ac_ext >&5
1667 rm -rf conftest*
1668 ac_cv_c___int64=no
1669fi
1670rm -f conftest*
1671fi
5c3bc9fb 1672
75e93faa
ZW
1673echo "$ac_t""$ac_cv_c___int64" 1>&6
1674 if test $ac_cv_c___int64 = yes; then
1675 cat >> confdefs.h <<\EOF
1676#define HAVE___INT64 1
1677EOF
1678
1679 fi
1680
827ae6cf 1681echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
b21d216c 1682echo "configure:1683: checking for built-in _Bool" >&5
827ae6cf
RO
1683if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
1684 echo $ac_n "(cached) $ac_c" 1>&6
1685else
1686 cat > conftest.$ac_ext <<EOF
b21d216c 1687#line 1688 "configure"
827ae6cf
RO
1688#include "confdefs.h"
1689
1690int main() {
1691_Bool foo;
1692; return 0; }
1693EOF
b21d216c 1694if { (eval echo configure:1695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
827ae6cf
RO
1695 rm -rf conftest*
1696 gcc_cv_c__bool=yes
1697else
1698 echo "configure: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 rm -rf conftest*
1701 gcc_cv_c__bool=no
1702fi
1703rm -f conftest*
1704
1705fi
1706
1707echo "$ac_t""$gcc_cv_c__bool" 1>&6
1708if test $gcc_cv_c__bool = yes; then
1709 cat >> confdefs.h <<\EOF
1710#define HAVE__BOOL 1
1711EOF
1712
1713fi
1714
75e93faa
ZW
1715
1716# sizeof(char) is 1 by definition.
1717echo $ac_n "checking size of short""... $ac_c" 1>&6
b21d216c 1718echo "configure:1719: checking size of short" >&5
75e93faa
ZW
1719if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
1721else
1722 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1723 cat > conftest.$ac_ext <<EOF
b21d216c 1724#line 1725 "configure"
75e93faa
ZW
1725#include "confdefs.h"
1726#include "confdefs.h"
1727#include <sys/types.h>
1728
1729
1730int main() {
1731switch (0) case 0: case (sizeof (short) == $ac_size):;
5c3bc9fb
GK
1732; return 0; }
1733EOF
b21d216c 1734if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c3bc9fb 1735 rm -rf conftest*
75e93faa 1736 ac_cv_sizeof_short=$ac_size
ff5def20 1737else
5c3bc9fb
GK
1738 echo "configure: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
75e93faa
ZW
1740fi
1741rm -f conftest*
1742 if test x$ac_cv_sizeof_short != x ; then break; fi
1743done
1744
1745fi
1746
1747if test x$ac_cv_sizeof_short = x ; then
1748 { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
1749fi
1750echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1751cat >> confdefs.h <<EOF
1752#define SIZEOF_SHORT $ac_cv_sizeof_short
1753EOF
1754
1755
1756echo $ac_n "checking size of int""... $ac_c" 1>&6
b21d216c 1757echo "configure:1758: checking size of int" >&5
75e93faa
ZW
1758if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1759 echo $ac_n "(cached) $ac_c" 1>&6
1760else
1761 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1762 cat > conftest.$ac_ext <<EOF
b21d216c 1763#line 1764 "configure"
75e93faa
ZW
1764#include "confdefs.h"
1765#include "confdefs.h"
1766#include <sys/types.h>
1767
1768
1769int main() {
1770switch (0) case 0: case (sizeof (int) == $ac_size):;
1771; return 0; }
1772EOF
b21d216c 1773if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c3bc9fb 1774 rm -rf conftest*
75e93faa
ZW
1775 ac_cv_sizeof_int=$ac_size
1776else
1777 echo "configure: failed program was:" >&5
1778 cat conftest.$ac_ext >&5
ff5def20
DA
1779fi
1780rm -f conftest*
75e93faa
ZW
1781 if test x$ac_cv_sizeof_int != x ; then break; fi
1782done
1783
5c3bc9fb
GK
1784fi
1785
75e93faa
ZW
1786if test x$ac_cv_sizeof_int = x ; then
1787 { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
1788fi
1789echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1790cat >> confdefs.h <<EOF
1791#define SIZEOF_INT $ac_cv_sizeof_int
1792EOF
1793
1794
1795echo $ac_n "checking size of long""... $ac_c" 1>&6
b21d216c 1796echo "configure:1797: checking size of long" >&5
75e93faa
ZW
1797if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1798 echo $ac_n "(cached) $ac_c" 1>&6
1799else
1800 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1801 cat > conftest.$ac_ext <<EOF
b21d216c 1802#line 1803 "configure"
75e93faa
ZW
1803#include "confdefs.h"
1804#include "confdefs.h"
1805#include <sys/types.h>
1806
1807
1808int main() {
1809switch (0) case 0: case (sizeof (long) == $ac_size):;
1810; return 0; }
1811EOF
b21d216c 1812if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1813 rm -rf conftest*
1814 ac_cv_sizeof_long=$ac_size
1815else
1816 echo "configure: failed program was:" >&5
1817 cat conftest.$ac_ext >&5
1818fi
1819rm -f conftest*
1820 if test x$ac_cv_sizeof_long != x ; then break; fi
1821done
1822
1823fi
1824
1825if test x$ac_cv_sizeof_long = x ; then
1826 { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
1827fi
1828echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1829cat >> confdefs.h <<EOF
1830#define SIZEOF_LONG $ac_cv_sizeof_long
1831EOF
1832
1833
1834if test $ac_cv_c_long_long = yes; then
1835 echo $ac_n "checking size of long long""... $ac_c" 1>&6
b21d216c 1836echo "configure:1837: checking size of long long" >&5
75e93faa
ZW
1837if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1838 echo $ac_n "(cached) $ac_c" 1>&6
1839else
1840 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1841 cat > conftest.$ac_ext <<EOF
b21d216c 1842#line 1843 "configure"
75e93faa
ZW
1843#include "confdefs.h"
1844#include "confdefs.h"
1845#include <sys/types.h>
1846
1847
1848int main() {
1849switch (0) case 0: case (sizeof (long long) == $ac_size):;
1850; return 0; }
1851EOF
b21d216c 1852if { (eval echo configure:1853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1853 rm -rf conftest*
1854 ac_cv_sizeof_long_long=$ac_size
1855else
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858fi
1859rm -f conftest*
1860 if test x$ac_cv_sizeof_long_long != x ; then break; fi
1861done
1862
1863fi
1864
1865if test x$ac_cv_sizeof_long_long = x ; then
1866 { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
1867fi
1868echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1869cat >> confdefs.h <<EOF
1870#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1871EOF
1872
1873
b8dad04b 1874fi
75e93faa
ZW
1875if test $ac_cv_c___int64 = yes; then
1876 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
b21d216c 1877echo "configure:1878: checking size of __int64" >&5
75e93faa
ZW
1878if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1880else
1881 for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
1882 cat > conftest.$ac_ext <<EOF
b21d216c 1883#line 1884 "configure"
75e93faa
ZW
1884#include "confdefs.h"
1885#include "confdefs.h"
1886#include <sys/types.h>
b8dad04b 1887
ff5def20 1888
75e93faa
ZW
1889int main() {
1890switch (0) case 0: case (sizeof (__int64) == $ac_size):;
1891; return 0; }
1892EOF
b21d216c 1893if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa
ZW
1894 rm -rf conftest*
1895 ac_cv_sizeof___int64=$ac_size
1896else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899fi
1900rm -f conftest*
1901 if test x$ac_cv_sizeof___int64 != x ; then break; fi
1902done
1903
1904fi
1905
1906if test x$ac_cv_sizeof___int64 = x ; then
1907 { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; }
1908fi
1909echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1910cat >> confdefs.h <<EOF
1911#define SIZEOF___INT64 $ac_cv_sizeof___int64
1912EOF
1913
1914
1915fi
1916
84c041a1 1917echo $ac_n "checking execution character set""... $ac_c" 1>&6
b21d216c 1918echo "configure:1919: checking execution character set" >&5
84c041a1
ZW
1919if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921else
1922 cat > conftest.$ac_ext <<EOF
b21d216c 1923#line 1924 "configure"
84c041a1
ZW
1924#include "confdefs.h"
1925#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
1926 && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
1927ASCII
1928#endif
1929EOF
1930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1931 egrep "ASCII" >/dev/null 2>&1; then
1932 rm -rf conftest*
1933 ac_cv_c_charset=ASCII
1934fi
1935rm -f conftest*
1936
1937 if test x${ac_cv_c_charset+set} != xset; then
1938 cat > conftest.$ac_ext <<EOF
b21d216c 1939#line 1940 "configure"
84c041a1
ZW
1940#include "confdefs.h"
1941#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
1942 && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
1943EBCDIC
1944#endif
1945EOF
1946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1947 egrep "EBCDIC" >/dev/null 2>&1; then
1948 rm -rf conftest*
1949 ac_cv_c_charset=EBCDIC
1950fi
1951rm -f conftest*
1952
1953 fi
1954 if test x${ac_cv_c_charset+set} != xset; then
1955 ac_cv_c_charset=unknown
1956 fi
1957fi
1958
1959echo "$ac_t""$ac_cv_c_charset" 1>&6
1960if test $ac_cv_c_charset = unknown; then
1961 { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; }
1962elif test $ac_cv_c_charset = EBCDIC; then
1963 cat >> confdefs.h <<\EOF
1964#define HOST_EBCDIC 1
1965EOF
1966
1967fi
84c041a1 1968
61842080
MM
1969# If the native compiler is GCC, we can enable warnings even in stage1.
1970# That's useful for people building cross-compilers, or just running a
1971# quick `make'.
b8dad04b
ZW
1972warn_cflags=
1973if test "x$GCC" = "xyes"; then
1974 warn_cflags='$(GCC_WARN_CFLAGS)'
61842080
MM
1975fi
1976
b8dad04b 1977
5b67ad6f 1978# Stage specific cflags for build.
b8dad04b 1979stage1_cflags=
5b67ad6f
DA
1980case $build in
1981vax-*-*)
1982 if test x$GCC = xyes
1983 then
b8dad04b 1984 stage1_cflags="-Wa,-J"
5b67ad6f 1985 else
b8dad04b 1986 stage1_cflags="-J"
5b67ad6f
DA
1987 fi
1988 ;;
1989esac
1990
1991
e9a25f70 1992echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
b21d216c 1993echo "configure:1994: checking whether ${MAKE-make} sets \${MAKE}" >&5
e9a25f70
JL
1994set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1995if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1996 echo $ac_n "(cached) $ac_c" 1>&6
1997else
1998 cat > conftestmake <<\EOF
1999all:
2000 @echo 'ac_maketemp="${MAKE}"'
2001EOF
2002# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2003eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2004if test -n "$ac_maketemp"; then
2005 eval ac_cv_prog_make_${ac_make}_set=yes
2006else
2007 eval ac_cv_prog_make_${ac_make}_set=no
2008fi
2009rm -f conftestmake
2010fi
2011if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2012 echo "$ac_t""yes" 1>&6
2013 SET_MAKE=
2014else
2015 echo "$ac_t""no" 1>&6
2016 SET_MAKE="MAKE=${MAKE-make}"
2017fi
2018
2019
ab339d62 2020echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
b21d216c 2021echo "configure:2022: checking whether a default assembler was specified" >&5
3ccc3a56 2022if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
e154a394 2023 if test x"$gas_flag" = x"no"; then
3ccc3a56 2024 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
ab339d62 2025 else
3ccc3a56 2026 echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
ab339d62
AO
2027 fi
2028else
2029 echo "$ac_t""no" 1>&6
2030fi
2031
2032echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
b21d216c 2033echo "configure:2034: checking whether a default linker was specified" >&5
3ccc3a56 2034if test x"${DEFAULT_LINKER+set}" = x"set"; then
e154a394 2035 if test x"$gnu_ld_flag" = x"no"; then
3ccc3a56 2036 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
ab339d62 2037 else
3ccc3a56 2038 echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
ab339d62
AO
2039 fi
2040else
2041 echo "$ac_t""no" 1>&6
2042fi
2043
4070d885 2044echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
b21d216c 2045echo "configure:2046: checking for GNU C library" >&5
4070d885
AJ
2046if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
2047 echo $ac_n "(cached) $ac_c" 1>&6
2048else
2049 cat > conftest.$ac_ext <<EOF
b21d216c 2050#line 2051 "configure"
4070d885
AJ
2051#include "confdefs.h"
2052#include <features.h>
2053int main() {
2054
2055#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2056#error Not a GNU C library system
2057#endif
2058; return 0; }
2059EOF
b21d216c 2060if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4070d885
AJ
2061 rm -rf conftest*
2062 gcc_cv_glibc=yes
2063else
2064 echo "configure: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 rm -rf conftest*
2067 gcc_cv_glibc=no
2068fi
2069rm -f conftest*
2070fi
2071
2072echo "$ac_t""$gcc_cv_glibc" 1>&6
c2f7d403 2073if test $gcc_cv_glibc = yes; then
4070d885
AJ
2074 cat >> confdefs.h <<\EOF
2075#define _GNU_SOURCE 1
2076EOF
2077
2078fi
2079
861bb6c1 2080# Find some useful tools
475c267f 2081for ac_prog in mawk gawk nawk awk
861bb6c1
JL
2082do
2083# Extract the first word of "$ac_prog", so it can be a program name with args.
2084set dummy $ac_prog; ac_word=$2
2085echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 2086echo "configure:2087: checking for $ac_word" >&5
861bb6c1
JL
2087if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2089else
2090 if test -n "$AWK"; then
2091 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2092else
cd9e5e7c 2093 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2094 ac_dummy="$PATH"
2095 for ac_dir in $ac_dummy; do
861bb6c1
JL
2096 test -z "$ac_dir" && ac_dir=.
2097 if test -f $ac_dir/$ac_word; then
2098 ac_cv_prog_AWK="$ac_prog"
2099 break
2100 fi
2101 done
2102 IFS="$ac_save_ifs"
2103fi
2104fi
2105AWK="$ac_cv_prog_AWK"
2106if test -n "$AWK"; then
2107 echo "$ac_t""$AWK" 1>&6
2108else
2109 echo "$ac_t""no" 1>&6
2110fi
2111
2112test -n "$AWK" && break
2113done
2114
0a4b6309 2115echo $ac_n "checking whether ln works""... $ac_c" 1>&6
b21d216c 2116echo "configure:2117: checking whether ln works" >&5
0a4b6309
RL
2117if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119else
2120 rm -f conftestdata_t
2121echo >conftestdata_f
2122if ln conftestdata_f conftestdata_t 2>/dev/null
2123then
2124 gcc_cv_prog_LN="ln"
2125else
2126 if ln -s conftestdata_f conftestdata_t 2>/dev/null
2127 then
2128 gcc_cv_prog_LN="ln -s"
2129 else
2130 gcc_cv_prog_LN=cp
2131 fi
2132fi
2133rm -f conftestdata_f conftestdata_t
2134
2135fi
2136LN="$gcc_cv_prog_LN"
2137if test "$gcc_cv_prog_LN" = "ln"; then
2138 echo "$ac_t""yes" 1>&6
2139else
2140 if test "$gcc_cv_prog_LN" = "ln -s"; then
2141 echo "$ac_t""no, using ln -s" 1>&6
2142 else
2143 echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
2144 fi
2145fi
2146
2147echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
b21d216c 2148echo "configure:2149: checking whether ln -s works" >&5
0a4b6309
RL
2149if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
2150 echo $ac_n "(cached) $ac_c" 1>&6
2151else
2152 rm -f conftestdata_t
2153echo >conftestdata_f
2154if ln -s conftestdata_f conftestdata_t 2>/dev/null
2155then
2156 gcc_cv_prog_LN_S="ln -s"
2157else
2158 if ln conftestdata_f conftestdata_t 2>/dev/null
2159 then
2160 gcc_cv_prog_LN_S=ln
2161 else
2162 gcc_cv_prog_LN_S=cp
2163 fi
2164fi
2165rm -f conftestdata_f conftestdata_t
2166
2167fi
2168LN_S="$gcc_cv_prog_LN_S"
2169if test "$gcc_cv_prog_LN_S" = "ln -s"; then
2170 echo "$ac_t""yes" 1>&6
2171else
2172 if test "$gcc_cv_prog_LN_S" = "ln"; then
2173 echo "$ac_t""no, using ln" 1>&6
2174 else
2175 echo "$ac_t""no, and neither does ln, so using cp" 1>&6
2176 fi
2177fi
2178
861bb6c1
JL
2179# Extract the first word of "ranlib", so it can be a program name with args.
2180set dummy ranlib; ac_word=$2
2181echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 2182echo "configure:2183: checking for $ac_word" >&5
861bb6c1
JL
2183if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 if test -n "$RANLIB"; then
2187 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2188else
cd9e5e7c 2189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2190 ac_dummy="$PATH"
2191 for ac_dir in $ac_dummy; do
861bb6c1
JL
2192 test -z "$ac_dir" && ac_dir=.
2193 if test -f $ac_dir/$ac_word; then
2194 ac_cv_prog_RANLIB="ranlib"
2195 break
2196 fi
2197 done
2198 IFS="$ac_save_ifs"
2199 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2200fi
2201fi
2202RANLIB="$ac_cv_prog_RANLIB"
2203if test -n "$RANLIB"; then
2204 echo "$ac_t""$RANLIB" 1>&6
2205else
2206 echo "$ac_t""no" 1>&6
2207fi
2208
0a4b6309
RL
2209# Find a good install program. We prefer a C program (faster),
2210# so one script is as good as another. But avoid the broken or
2211# incompatible versions:
2212# SysV /etc/install, /usr/sbin/install
2213# SunOS /usr/etc/install
2214# IRIX /sbin/install
2215# AIX /bin/install
2216# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2217# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2218# ./install, which can be erroneously created by make from ./install.sh.
2219echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
b21d216c 2220echo "configure:2221: checking for a BSD compatible install" >&5
0a4b6309
RL
2221if test -z "$INSTALL"; then
2222if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2223 echo $ac_n "(cached) $ac_c" 1>&6
2224else
2225 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2226 for ac_dir in $PATH; do
2227 # Account for people who put trailing slashes in PATH elements.
2228 case "$ac_dir/" in
2229 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2230 *)
2231 # OSF1 and SCO ODT 3.0 have their own names for install.
2232 for ac_prog in ginstall scoinst install; do
2233 if test -f $ac_dir/$ac_prog; then
2234 if test $ac_prog = install &&
2235 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2236 # AIX install. It has an incompatible calling convention.
2237 # OSF/1 installbsd also uses dspmsg, but is usable.
2238 :
2239 else
2240 ac_cv_path_install="$ac_dir/$ac_prog -c"
2241 break 2
2242 fi
2243 fi
2244 done
2245 ;;
2246 esac
2247 done
2248 IFS="$ac_save_IFS"
2249
2250fi
2251 if test "${ac_cv_path_install+set}" = set; then
2252 INSTALL="$ac_cv_path_install"
2253 else
2254 # As a last resort, use the slow shell script. We don't cache a
2255 # path for INSTALL within a source directory, because that will
2256 # break other packages using the cache if that directory is
2257 # removed, or if the path is relative.
2258 INSTALL="$ac_install_sh"
2259 fi
2260fi
2261echo "$ac_t""$INSTALL" 1>&6
2262
2263# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2264# It thinks the first close brace ends the variable substitution.
2265test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2266
2267test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2268
861bb6c1 2269
956d6950 2270echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
b21d216c 2271echo "configure:2272: checking for ANSI C header files" >&5
956d6950
JL
2272if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2274else
2275 cat > conftest.$ac_ext <<EOF
b21d216c 2276#line 2277 "configure"
956d6950
JL
2277#include "confdefs.h"
2278#include <stdlib.h>
2279#include <stdarg.h>
2280#include <string.h>
2281#include <float.h>
2282EOF
2283ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 2284{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2285ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
2286if test -z "$ac_err"; then
2287 rm -rf conftest*
2288 ac_cv_header_stdc=yes
2289else
2290 echo "$ac_err" >&5
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293 rm -rf conftest*
2294 ac_cv_header_stdc=no
2295fi
2296rm -f conftest*
2297
2298if test $ac_cv_header_stdc = yes; then
2299 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2300cat > conftest.$ac_ext <<EOF
b21d216c 2301#line 2302 "configure"
956d6950
JL
2302#include "confdefs.h"
2303#include <string.h>
2304EOF
2305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2306 egrep "memchr" >/dev/null 2>&1; then
2307 :
2308else
2309 rm -rf conftest*
2310 ac_cv_header_stdc=no
2311fi
2312rm -f conftest*
2313
2314fi
2315
2316if test $ac_cv_header_stdc = yes; then
2317 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2318cat > conftest.$ac_ext <<EOF
b21d216c 2319#line 2320 "configure"
956d6950
JL
2320#include "confdefs.h"
2321#include <stdlib.h>
2322EOF
2323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324 egrep "free" >/dev/null 2>&1; then
2325 :
2326else
2327 rm -rf conftest*
2328 ac_cv_header_stdc=no
2329fi
2330rm -f conftest*
2331
2332fi
2333
2334if test $ac_cv_header_stdc = yes; then
2335 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2336if test "$cross_compiling" = yes; then
2337 :
2338else
2339 cat > conftest.$ac_ext <<EOF
b21d216c 2340#line 2341 "configure"
956d6950
JL
2341#include "confdefs.h"
2342#include <ctype.h>
2343#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2344#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2345#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2346int main () { int i; for (i = 0; i < 256; i++)
2347if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2348exit (0); }
2349
2350EOF
b21d216c 2351if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
956d6950
JL
2352then
2353 :
2354else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357 rm -fr conftest*
2358 ac_cv_header_stdc=no
2359fi
2360rm -fr conftest*
2361fi
2362
2363fi
2364fi
2365
2366echo "$ac_t""$ac_cv_header_stdc" 1>&6
2367if test $ac_cv_header_stdc = yes; then
2368 cat >> confdefs.h <<\EOF
2369#define STDC_HEADERS 1
2370EOF
2371
2372fi
2373
2374echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
b21d216c 2375echo "configure:2376: checking whether time.h and sys/time.h may both be included" >&5
956d6950
JL
2376if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2377 echo $ac_n "(cached) $ac_c" 1>&6
2378else
2379 cat > conftest.$ac_ext <<EOF
b21d216c 2380#line 2381 "configure"
956d6950
JL
2381#include "confdefs.h"
2382#include <sys/types.h>
2383#include <sys/time.h>
2384#include <time.h>
2385int main() {
2386struct tm *tp;
2387; return 0; }
2388EOF
b21d216c 2389if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950
JL
2390 rm -rf conftest*
2391 ac_cv_header_time=yes
2392else
2393 echo "configure: failed program was:" >&5
2394 cat conftest.$ac_ext >&5
2395 rm -rf conftest*
2396 ac_cv_header_time=no
2397fi
2398rm -f conftest*
2399fi
2400
2401echo "$ac_t""$ac_cv_header_time" 1>&6
2402if test $ac_cv_header_time = yes; then
2403 cat >> confdefs.h <<\EOF
2404#define TIME_WITH_SYS_TIME 1
2405EOF
2406
2407fi
2408
827ae6cf 2409echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
b21d216c 2410echo "configure:2411: checking for working stdbool.h" >&5
827ae6cf
RO
2411if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413else
2414 cat > conftest.$ac_ext <<EOF
b21d216c 2415#line 2416 "configure"
827ae6cf
RO
2416#include "confdefs.h"
2417#include <stdbool.h>
2418int main() {
2419bool foo = false;
2420; return 0; }
2421EOF
b21d216c 2422if { (eval echo configure:2423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
827ae6cf
RO
2423 rm -rf conftest*
2424 ac_cv_header_stdbool_h=yes
2425else
2426 echo "configure: failed program was:" >&5
2427 cat conftest.$ac_ext >&5
2428 rm -rf conftest*
2429 ac_cv_header_stdbool_h=no
2430fi
2431rm -f conftest*
2432fi
2433
2434echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6
2435if test $ac_cv_header_stdbool_h = yes; then
2436 cat >> confdefs.h <<\EOF
2437#define HAVE_STDBOOL_H 1
2438EOF
2439
2440fi
2441
0a4b6309 2442echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
b21d216c 2443echo "configure:2444: checking whether string.h and strings.h may both be included" >&5
0a4b6309
RL
2444if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
2445 echo $ac_n "(cached) $ac_c" 1>&6
2446else
2447 cat > conftest.$ac_ext <<EOF
b21d216c 2448#line 2449 "configure"
0a4b6309
RL
2449#include "confdefs.h"
2450#include <string.h>
2451#include <strings.h>
2452int main() {
2453
2454; return 0; }
2455EOF
b21d216c 2456if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0a4b6309
RL
2457 rm -rf conftest*
2458 gcc_cv_header_string=yes
2459else
2460 echo "configure: failed program was:" >&5
2461 cat conftest.$ac_ext >&5
2462 rm -rf conftest*
2463 gcc_cv_header_string=no
2464fi
2465rm -f conftest*
2466fi
2467
2468echo "$ac_t""$gcc_cv_header_string" 1>&6
2469if test $gcc_cv_header_string = yes; then
2470 cat >> confdefs.h <<\EOF
2471#define STRING_WITH_STRINGS 1
2472EOF
2473
2474fi
2475
e9831ca0 2476echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
b21d216c 2477echo "configure:2478: checking for sys/wait.h that is POSIX.1 compatible" >&5
e9831ca0
KG
2478if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2479 echo $ac_n "(cached) $ac_c" 1>&6
2480else
2481 cat > conftest.$ac_ext <<EOF
b21d216c 2482#line 2483 "configure"
e9831ca0
KG
2483#include "confdefs.h"
2484#include <sys/types.h>
2485#include <sys/wait.h>
2486#ifndef WEXITSTATUS
2487#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2488#endif
2489#ifndef WIFEXITED
2490#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2491#endif
2492int main() {
2493int s;
2494wait (&s);
2495s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2496; return 0; }
2497EOF
b21d216c 2498if { (eval echo configure:2499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e9831ca0
KG
2499 rm -rf conftest*
2500 ac_cv_header_sys_wait_h=yes
2501else
2502 echo "configure: failed program was:" >&5
2503 cat conftest.$ac_ext >&5
2504 rm -rf conftest*
2505 ac_cv_header_sys_wait_h=no
2506fi
2507rm -f conftest*
2508fi
2509
2510echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2511if test $ac_cv_header_sys_wait_h = yes; then
2512 cat >> confdefs.h <<\EOF
2513#define HAVE_SYS_WAIT_H 1
2514EOF
2515
2516fi
2517
03c41c05 2518for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
7719ffbf 2519 fcntl.h unistd.h sys/file.h sys/time.h \
03c41c05 2520 sys/resource.h sys/param.h sys/times.h sys/stat.h \
f91abfce 2521 direct.h malloc.h langinfo.h
861bb6c1
JL
2522do
2523ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2524echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b21d216c 2525echo "configure:2526: checking for $ac_hdr" >&5
861bb6c1
JL
2526if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2527 echo $ac_n "(cached) $ac_c" 1>&6
2528else
2529 cat > conftest.$ac_ext <<EOF
b21d216c 2530#line 2531 "configure"
861bb6c1
JL
2531#include "confdefs.h"
2532#include <$ac_hdr>
2533EOF
956d6950 2534ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 2535{ (eval echo configure:2536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2536ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
956d6950
JL
2537if test -z "$ac_err"; then
2538 rm -rf conftest*
2539 eval "ac_cv_header_$ac_safe=yes"
2540else
2541 echo "$ac_err" >&5
2542 echo "configure: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 rm -rf conftest*
2545 eval "ac_cv_header_$ac_safe=no"
2546fi
2547rm -f conftest*
2548fi
2549if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2550 echo "$ac_t""yes" 1>&6
2551 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2552 cat >> confdefs.h <<EOF
2553#define $ac_tr_hdr 1
2554EOF
2555
2556else
2557 echo "$ac_t""no" 1>&6
2558fi
2559done
2560
2561
f24af81b
TT
2562# Check for thread headers.
2563ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
2564echo $ac_n "checking for thread.h""... $ac_c" 1>&6
b21d216c 2565echo "configure:2566: checking for thread.h" >&5
f24af81b
TT
2566if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2567 echo $ac_n "(cached) $ac_c" 1>&6
2568else
2569 cat > conftest.$ac_ext <<EOF
b21d216c 2570#line 2571 "configure"
f24af81b
TT
2571#include "confdefs.h"
2572#include <thread.h>
2573EOF
2574ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 2575{ (eval echo configure:2576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2576ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
2577if test -z "$ac_err"; then
2578 rm -rf conftest*
2579 eval "ac_cv_header_$ac_safe=yes"
2580else
2581 echo "$ac_err" >&5
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2584 rm -rf conftest*
2585 eval "ac_cv_header_$ac_safe=no"
2586fi
2587rm -f conftest*
2588fi
2589if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2590 echo "$ac_t""yes" 1>&6
2591 have_thread_h=yes
2592else
2593 echo "$ac_t""no" 1>&6
2594have_thread_h=
2595fi
2596
2597ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
2598echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
b21d216c 2599echo "configure:2600: checking for pthread.h" >&5
f24af81b
TT
2600if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2601 echo $ac_n "(cached) $ac_c" 1>&6
2602else
2603 cat > conftest.$ac_ext <<EOF
b21d216c 2604#line 2605 "configure"
f24af81b
TT
2605#include "confdefs.h"
2606#include <pthread.h>
2607EOF
2608ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b21d216c 2609{ (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 2610ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
f24af81b
TT
2611if test -z "$ac_err"; then
2612 rm -rf conftest*
2613 eval "ac_cv_header_$ac_safe=yes"
2614else
2615 echo "$ac_err" >&5
2616 echo "configure: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2618 rm -rf conftest*
2619 eval "ac_cv_header_$ac_safe=no"
2620fi
2621rm -f conftest*
2622fi
2623if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2624 echo "$ac_t""yes" 1>&6
2625 have_pthread_h=yes
2626else
2627 echo "$ac_t""no" 1>&6
2628have_pthread_h=
2629fi
2630
2631
84c041a1 2632# These tests can't be done till we know if we have limits.h.
75e93faa 2633echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
b21d216c 2634echo "configure:2635: checking for CHAR_BIT" >&5
75e93faa
ZW
2635if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
2636 echo $ac_n "(cached) $ac_c" 1>&6
2637else
2638 cat > conftest.$ac_ext <<EOF
b21d216c 2639#line 2640 "configure"
75e93faa
ZW
2640#include "confdefs.h"
2641#ifdef HAVE_LIMITS_H
2642#include <limits.h>
2643#endif
2644#ifdef CHAR_BIT
2645found
2646#endif
2647EOF
2648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2649 egrep "found" >/dev/null 2>&1; then
2650 rm -rf conftest*
2651 gcc_cv_decl_char_bit=yes
2652else
2653 rm -rf conftest*
2654 gcc_cv_decl_char_bit=no
2655fi
2656rm -f conftest*
2657
2658
2659fi
2660
2661echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
2662if test $gcc_cv_decl_char_bit = no; then
2663 echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
b21d216c 2664echo "configure:2665: checking number of bits in a byte" >&5
75e93faa
ZW
2665if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
2667else
2668 i=8
2669 gcc_cv_c_nbby=
2670 while test $i -lt 65; do
2671 cat > conftest.$ac_ext <<EOF
b21d216c 2672#line 2673 "configure"
75e93faa
ZW
2673#include "confdefs.h"
2674
2675int main() {
4e70264f
ZW
2676switch(0) {
2677 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
2678 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
2679 ; }
75e93faa
ZW
2680; return 0; }
2681EOF
b21d216c 2682if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75e93faa 2683 rm -rf conftest*
4e70264f 2684 gcc_cv_c_nbby=$i; break
75e93faa
ZW
2685else
2686 echo "configure: failed program was:" >&5
2687 cat conftest.$ac_ext >&5
2688fi
2689rm -f conftest*
2690 i=`expr $i + 1`
2691 done
2692 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
2693
2694fi
2695
2696echo "$ac_t""$gcc_cv_c_nbby" 1>&6
2697if test $gcc_cv_c_nbby = failed; then
2698 { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; }
2699else
2700 cat >> confdefs.h <<EOF
2701#define CHAR_BIT $gcc_cv_c_nbby
2702EOF
2703
2704fi
2705fi
2d6eb5bf 2706echo $ac_n "checking byte ordering""... $ac_c" 1>&6
b21d216c 2707echo "configure:2708: checking byte ordering" >&5
2d6eb5bf 2708if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
84c041a1
ZW
2709 echo $ac_n "(cached) $ac_c" 1>&6
2710else
2d6eb5bf
ZW
2711 ac_cv_c_compile_endian=unknown
2712
2713ac_ext=c
2714# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2715ac_cpp='$CPP $CPPFLAGS'
2716ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2717ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2718cross_compiling=$ac_cv_prog_cc_cross
2719
2720cat > conftest.$ac_ext <<EOF
b21d216c 2721#line 2722 "configure"
84c041a1 2722#include "confdefs.h"
2d6eb5bf 2723
84c041a1 2724#ifdef HAVE_LIMITS_H
2d6eb5bf 2725# include <limits.h>
84c041a1
ZW
2726#endif
2727/* This structure must have no internal padding. */
2728 struct {
2d6eb5bf 2729 char prefix[sizeof "\nendian:" - 1];
84c041a1 2730 short word;
2d6eb5bf 2731 char postfix[2];
84c041a1 2732 } tester = {
2d6eb5bf 2733 "\nendian:",
84c041a1
ZW
2734#if SIZEOF_SHORT == 4
2735 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
2736#endif
2d6eb5bf
ZW
2737 ('A' << CHAR_BIT) | 'B',
2738 'X', '\n'
84c041a1
ZW
2739};
2740EOF
b21d216c 2741if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2d6eb5bf 2742 od -c conftest.o |
e48cd290 2743 sed 's/^[0-7]*[ ]*/ /
2d6eb5bf
ZW
2744 s/\*/./g
2745 s/ \\n/*/g
2746 s/ [0-9][0-9][0-9]/./g
2747 s/ \\[^ ]/./g' |
2748 tr -d '
2749 ' | tr -s '*' '
2750' | fold | sed '$a\
2751' > conftest.dmp
2752 if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
2753 ac_cv_c_compile_endian=big-endian
2754 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
2755 ac_cv_c_compile_endian=little-endian
84c041a1
ZW
2756 fi
2757fi
84c041a1 2758rm -rf conftest*
2d6eb5bf
ZW
2759ac_ext=c
2760# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2761ac_cpp='$CPP $CPPFLAGS'
2762ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2763ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2764cross_compiling=$ac_cv_prog_cc_cross
2765
2766
84c041a1
ZW
2767fi
2768
2d6eb5bf
ZW
2769echo "$ac_t""$ac_cv_c_compile_endian" 1>&6
2770if test $ac_cv_c_compile_endian = unknown; then
2771 { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; }
2772elif test $ac_cv_c_compile_endian = big-endian; then
84c041a1
ZW
2773 cat >> confdefs.h <<\EOF
2774#define HOST_WORDS_BIG_ENDIAN 1
2775EOF
2776
2777fi
2778
2d6eb5bf 2779echo $ac_n "checking floating point format""... $ac_c" 1>&6
b21d216c 2780echo "configure:2781: checking floating point format" >&5
2d6eb5bf
ZW
2781if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
2782 echo $ac_n "(cached) $ac_c" 1>&6
2783else
2784
2785ac_ext=c
2786# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2787ac_cpp='$CPP $CPPFLAGS'
2788ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2789ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2790cross_compiling=$ac_cv_prog_cc_cross
2791
2792cat > conftest.$ac_ext <<EOF
b21d216c 2793#line 2794 "configure"
2d6eb5bf
ZW
2794#include "confdefs.h"
2795/* This will not work unless sizeof(double) == 8. */
2796extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
2797
2798/* This structure must have no internal padding. */
2799struct possibility {
2800 char prefix[8];
2801 double candidate;
2802 char postfix[8];
2803};
2804
2805#define C(cand) { "\nformat:", cand, ":tamrof\n" }
2806struct possibility table [] =
2807{
2808 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
2809 C( 3.53802595280598432000e+18), /* D__float - VAX */
2810 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
2811 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
2812 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
2813};
2814EOF
b21d216c 2815if { (eval echo configure:2816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2d6eb5bf 2816 od -c conftest.o |
e48cd290 2817 sed 's/^[0-7]*[ ]*/ /
2d6eb5bf
ZW
2818 s/\*/./g
2819 s/ \\n/*/g
2820 s/ [0-9][0-9][0-9]/./g
2821 s/ \\[^ ]/./g' |
2822 tr -d '
2823 ' | tr -s '*' '
2824' | fold | sed '$a\
2825' > conftest.dmp
2826 if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2827 ac_cv_c_float_format='IEEE (big-endian)'
2828 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
2829 ac_cv_c_float_format='IEEE (big-endian)'
2830 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
2831 ac_cv_c_float_format='IEEE (little-endian)'
2832 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
2833 ac_cv_c_float_format='IEEE (little-endian)'
2834 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
2835 ac_cv_c_float_format='VAX D-float'
2836 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
2837 ac_cv_c_float_format='PDP-10'
2838 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
2839 ac_cv_c_float_format='IBM 370 hex'
2840 else
2841 { echo "configure: error: Unknown floating point format" 1>&2; exit 1; }
2842 fi
2843else
2844 { echo "configure: error: compile failed" 1>&2; exit 1; }
2845fi
2846rm -rf conftest*
2847ac_ext=c
2848# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2849ac_cpp='$CPP $CPPFLAGS'
2850ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2851ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2852cross_compiling=$ac_cv_prog_cc_cross
2853
2854
2855fi
2856
2857echo "$ac_t""$ac_cv_c_float_format" 1>&6
2858# IEEE is the default format. If the float endianness isn't the same
2859# as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
2860# (which is a tristate: yes, no, default). This is only an issue with
2861# IEEE; the other formats are only supported by a few machines each,
2862# all with the same endianness.
2863format=
2864fbigend=
2865case $ac_cv_c_float_format in
2866 'IEEE (big-endian)' )
2867 if test $ac_cv_c_compile_endian = little-endian; then
2868 fbigend=1
2869 fi
2870 ;;
2871 'IEEE (little-endian)' )
2872 if test $ac_cv_c_compile_endian = big-endian; then
2873 fbigend=0
2874 fi
2875 ;;
2876 'VAX D-float' )
2877 format=VAX_FLOAT_FORMAT
2878 ;;
2879 'PDP-10' )
2880 format=PDP10_FLOAT_FORMAT
2881 ;;
2882 'IBM 370 hex' )
2883 format=IBM_FLOAT_FORMAT
2884 ;;
2885esac
2886if test -n "$format"; then
2887 cat >> confdefs.h <<EOF
2888#define HOST_FLOAT_FORMAT $format
2889EOF
2890
2891fi
2892if test -n "$fbigend"; then
2893 cat >> confdefs.h <<EOF
2894#define HOST_FLOAT_WORDS_BIG_ENDIAN $fbigend
2895EOF
2896
2897fi
2898
75e93faa 2899
bcf12124 2900# See if GNAT has been installed
67f28219
ZW
2901if test $host != $build; then
2902 ac_tool_prefix=${host_alias}-
2903else
2904 ac_tool_prefix=
2905fi
2906
2907
2908# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
2909set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
2910echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 2911echo "configure:2912: checking for $ac_word" >&5
67f28219
ZW
2912if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2913 echo $ac_n "(cached) $ac_c" 1>&6
2914else
2915 if test -n "$GNATBIND"; then
2916 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2917else
2918 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2919 ac_dummy="$PATH"
2920 for ac_dir in $ac_dummy; do
2921 test -z "$ac_dir" && ac_dir=.
2922 if test -f $ac_dir/$ac_word; then
2923 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2924 break
2925 fi
2926 done
2927 IFS="$ac_save_ifs"
2928fi
2929fi
2930GNATBIND="$ac_cv_prog_GNATBIND"
2931if test -n "$GNATBIND"; then
2932 echo "$ac_t""$GNATBIND" 1>&6
2933else
2934 echo "$ac_t""no" 1>&6
2935fi
2936
2937
2938if test -z "$ac_cv_prog_GNATBIND"; then
2939if test -n "$ac_tool_prefix"; then
2940 # Extract the first word of "gnatbind", so it can be a program name with args.
bcf12124
JL
2941set dummy gnatbind; ac_word=$2
2942echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 2943echo "configure:2944: checking for $ac_word" >&5
67f28219 2944if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
bcf12124
JL
2945 echo $ac_n "(cached) $ac_c" 1>&6
2946else
67f28219
ZW
2947 if test -n "$GNATBIND"; then
2948 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
bcf12124 2949else
cd9e5e7c 2950 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
2951 ac_dummy="$PATH"
2952 for ac_dir in $ac_dummy; do
bcf12124
JL
2953 test -z "$ac_dir" && ac_dir=.
2954 if test -f $ac_dir/$ac_word; then
67f28219 2955 ac_cv_prog_GNATBIND="gnatbind"
bcf12124
JL
2956 break
2957 fi
2958 done
2959 IFS="$ac_save_ifs"
67f28219 2960 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
bcf12124
JL
2961fi
2962fi
67f28219
ZW
2963GNATBIND="$ac_cv_prog_GNATBIND"
2964if test -n "$GNATBIND"; then
2965 echo "$ac_t""$GNATBIND" 1>&6
bcf12124
JL
2966else
2967 echo "$ac_t""no" 1>&6
2968fi
2969
67f28219
ZW
2970else
2971 GNATBIND="no"
2972fi
2973fi
2974
2975echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
b21d216c 2976echo "configure:2977: checking for compiler driver that understands Ada" >&5
67f28219
ZW
2977if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
2978 echo $ac_n "(cached) $ac_c" 1>&6
2979else
2980 cat >conftest.adb <<EOF
2981procedure conftest is begin null; end conftest;
2982EOF
2983gcc_cv_prog_adac=no
2984# Have to do ac_tool_prefix and user overrides by hand.
2985user_adac=$ADAC
2986user_cc=$CC
2987for cand in ${ac_tool_prefix}$user_adac $user_adac \
2988 ${ac_tool_prefix}$user_cc $user_cc \
2989 ${ac_tool_prefix}gcc gcc \
2990 ${ac_tool_prefix}cc cc \
2991 ${ac_tool_prefix}gnatgcc gnatgcc \
2992 ${ac_tool_prefix}gnatcc gnatcc \
2993 ${ac_tool_prefix}adagcc adagcc \
2994 ${ac_tool_prefix}adacc adacc ; do
2995 # There is a bug in all released versions of GCC which causes the
2996 # driver to exit successfully when the appropriate language module
2997 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2998 # Therefore we must check for the error message as well as an
2999 # unsuccessful exit.
3000 errors=`$cand -c conftest.adb 2>&1 || echo failure`
3001 if test x"$errors" = x; then
3002 gcc_cv_prog_adac=$cand
3003 break
3004 fi
3005done
3006rm -f conftest.*
3007fi
3008
3009echo "$ac_t""$gcc_cv_prog_adac" 1>&6
3010ADAC=$gcc_cv_prog_adac
3011
3012
3013if test x$GNATBIND != xno && test x$ADAC != xno; then
3014 have_gnat=yes
3015else
3016 have_gnat=no
3017fi
3018
bcf12124 3019
955be633
JM
3020# See if we have the mktemp command.
3021# Extract the first word of "mktemp", so it can be a program name with args.
3022set dummy mktemp; ac_word=$2
3023echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 3024echo "configure:3025: checking for $ac_word" >&5
955be633
JM
3025if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
3026 echo $ac_n "(cached) $ac_c" 1>&6
3027else
3028 if test -n "$have_mktemp_command"; then
3029 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
3030else
3031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3032 ac_dummy="$PATH"
3033 for ac_dir in $ac_dummy; do
3034 test -z "$ac_dir" && ac_dir=.
3035 if test -f $ac_dir/$ac_word; then
3036 ac_cv_prog_have_mktemp_command="yes"
3037 break
3038 fi
3039 done
3040 IFS="$ac_save_ifs"
3041 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
3042fi
3043fi
3044have_mktemp_command="$ac_cv_prog_have_mktemp_command"
3045if test -n "$have_mktemp_command"; then
3046 echo "$ac_t""$have_mktemp_command" 1>&6
3047else
3048 echo "$ac_t""no" 1>&6
3049fi
3050
3051
09fa0705
ZW
3052# Do we have a single-tree copy of texinfo?
3053if test -f $srcdir/../texinfo/Makefile.in; then
3054 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
3055 gcc_cv_prog_makeinfo_modern=yes
3056 echo "$ac_t""Using makeinfo from the unified source tree." 1>&6
3057else
3058 # See if makeinfo has been installed and is modern enough
3059 # that we can use it.
3060 # Extract the first word of "makeinfo", so it can be a program name with args.
3061set dummy makeinfo; ac_word=$2
3062echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 3063echo "configure:3064: checking for $ac_word" >&5
09fa0705
ZW
3064if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3065 echo $ac_n "(cached) $ac_c" 1>&6
3066else
3067 if test -n "$MAKEINFO"; then
3068 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3069else
3070 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3071 ac_dummy="$PATH"
3072 for ac_dir in $ac_dummy; do
3073 test -z "$ac_dir" && ac_dir=.
3074 if test -f $ac_dir/$ac_word; then
3075 ac_cv_prog_MAKEINFO="makeinfo"
3076 break
3077 fi
3078 done
3079 IFS="$ac_save_ifs"
3080fi
3081fi
3082MAKEINFO="$ac_cv_prog_MAKEINFO"
3083if test -n "$MAKEINFO"; then
3084 echo "$ac_t""$MAKEINFO" 1>&6
3085else
3086 echo "$ac_t""no" 1>&6
3087fi
3088
3089if test -n "$MAKEINFO"; then
3090 # Found it, now check the version.
3091 echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
b21d216c 3092echo "configure:3093: checking for modern makeinfo" >&5
09fa0705
ZW
3093if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3095else
3096 ac_prog_version=`$MAKEINFO --version 2>&1 |
3097 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
b21d216c 3098 echo "configure:3099: version of makeinfo is $ac_prog_version" >&5
09fa0705
ZW
3099 case $ac_prog_version in
3100 '') gcc_cv_prog_makeinfo_modern=no;;
fd939e46 3101 4.*)
09fa0705
ZW
3102 gcc_cv_prog_makeinfo_modern=yes;;
3103 *) gcc_cv_prog_makeinfo_modern=no;;
3104 esac
3105
3106fi
3107
3108echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6
3109else
3110 gcc_cv_prog_makeinfo_modern=no
3111fi
3112
3113fi
3114
3115if test $gcc_cv_prog_makeinfo_modern = no; then
3116 echo "configure: warning:
3117*** Makeinfo is missing or too old.
17db6582 3118*** Info documentation will not be built." 1>&2
d21445e7 3119 BUILD_INFO=
09fa0705
ZW
3120else
3121 BUILD_INFO=info
09fa0705
ZW
3122fi
3123
3f896fc2
JM
3124# Is pod2man recent enough to regenerate manpages?
3125echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
b21d216c 3126echo "configure:3127: checking for recent Pod::Man" >&5
3f896fc2 3127if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
fd939e46
JM
3128 echo "$ac_t""yes" 1>&6
3129 GENERATED_MANPAGES=generated-manpages
3130else
3131 echo "$ac_t""no" 1>&6
3132 GENERATED_MANPAGES=
3133fi
3134
1e608388
ZW
3135# How about lex?
3136if test -f $srcdir/../flex/skel.c; then
3137 FLEX='$(objdir)/../flex/flex'
3138else
3139 # Extract the first word of "flex", so it can be a program name with args.
3140set dummy flex; ac_word=$2
3141echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 3142echo "configure:3143: checking for $ac_word" >&5
1e608388
ZW
3143if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3144 echo $ac_n "(cached) $ac_c" 1>&6
3145else
3146 if test -n "$FLEX"; then
3147 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3148else
3149 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3150 ac_dummy="$PATH"
3151 for ac_dir in $ac_dummy; do
3152 test -z "$ac_dir" && ac_dir=.
3153 if test -f $ac_dir/$ac_word; then
3154 ac_cv_prog_FLEX="flex"
3155 break
3156 fi
3157 done
3158 IFS="$ac_save_ifs"
3159 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="false"
3160fi
3161fi
3162FLEX="$ac_cv_prog_FLEX"
3163if test -n "$FLEX"; then
3164 echo "$ac_t""$FLEX" 1>&6
3165else
3166 echo "$ac_t""no" 1>&6
3167fi
3168
3169fi
3170
3171# Bison?
3172# The -L switch is so bison can find its skeleton file.
3173if test -f $srcdir/../bison/bison.simple; then
3174 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
3175else
3176 # Extract the first word of "bison", so it can be a program name with args.
3177set dummy bison; ac_word=$2
3178echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b21d216c 3179echo "configure:3180: checking for $ac_word" >&5
1e608388
ZW
3180if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3181 echo $ac_n "(cached) $ac_c" 1>&6
3182else
3183 if test -n "$BISON"; then
3184 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3185else
3186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3187 ac_dummy="$PATH"
3188 for ac_dir in $ac_dummy; do
3189 test -z "$ac_dir" && ac_dir=.
3190 if test -f $ac_dir/$ac_word; then
3191 ac_cv_prog_BISON="bison"
3192 break
3193 fi
3194 done
3195 IFS="$ac_save_ifs"
3196 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="false"
3197fi
3198fi
3199BISON="$ac_cv_prog_BISON"
3200if test -n "$BISON"; then
3201 echo "$ac_t""$BISON" 1>&6
3202else
3203 echo "$ac_t""no" 1>&6
3204fi
3205
3206fi
3207
4e70264f
ZW
3208# These libraries may be used by collect2.
3209# We may need a special search path to get them linked.
3210echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
b21d216c 3211echo "configure:3212: checking for collect2 libraries" >&5
4e70264f
ZW
3212if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
3213 echo $ac_n "(cached) $ac_c" 1>&6
3214else
3215 save_LIBS="$LIBS"
7f2749d4 3216for libs in '' -lld -lmld \
4e70264f
ZW
3217 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
3218 '-L/usr/lib/cmplrs/cc3.11 -lmld'
3219do
3220 LIBS="$libs"
3221 cat > conftest.$ac_ext <<EOF
b21d216c 3222#line 3223 "configure"
4e70264f
ZW
3223#include "confdefs.h"
3224/* Override any gcc2 internal prototype to avoid an error. */
3225/* We use char because int might match the return type of a gcc2
3226 builtin and then its argument prototype would still apply. */
3227char ldopen();
3228
3229int main() {
3230ldopen()
3231; return 0; }
3232EOF
b21d216c 3233if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4e70264f
ZW
3234 rm -rf conftest*
3235 gcc_cv_collect2_libs="$libs"; break
3236else
3237 echo "configure: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
3239fi
3240rm -f conftest*
3241done
3242LIBS="$save_LIBS"
3243test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
3244fi
3245
3246echo "$ac_t""$gcc_cv_collect2_libs" 1>&6
3247case $gcc_cv_collect2_libs in
3248 "none required") ;;
3249 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
3250esac
3251
3252
7f2749d4
RK
3253# When building Ada code on Alpha, we need exc_resume which is usually in
3254# -lexc. So test for it.
3255save_LIBS="$LIBS"
3256LIBS=
3257
3258echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
b21d216c 3259echo "configure:3260: checking for library containing exc_resume" >&5
7f2749d4
RK
3260if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
3261 echo $ac_n "(cached) $ac_c" 1>&6
3262else
3263 ac_func_search_save_LIBS="$LIBS"
3264ac_cv_search_exc_resume="no"
3265cat > conftest.$ac_ext <<EOF
b21d216c 3266#line 3267 "configure"
7f2749d4
RK
3267#include "confdefs.h"
3268/* Override any gcc2 internal prototype to avoid an error. */
3269/* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3271char exc_resume();
3272
3273int main() {
3274exc_resume()
3275; return 0; }
3276EOF
b21d216c 3277if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7f2749d4
RK
3278 rm -rf conftest*
3279 ac_cv_search_exc_resume="none required"
3280else
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3283fi
3284rm -f conftest*
3285test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
3286LIBS="-l$i $ac_func_search_save_LIBS"
3287cat > conftest.$ac_ext <<EOF
b21d216c 3288#line 3289 "configure"
7f2749d4
RK
3289#include "confdefs.h"
3290/* Override any gcc2 internal prototype to avoid an error. */
3291/* We use char because int might match the return type of a gcc2
3292 builtin and then its argument prototype would still apply. */
3293char exc_resume();
3294
3295int main() {
3296exc_resume()
3297; return 0; }
3298EOF
b21d216c 3299if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7f2749d4
RK
3300 rm -rf conftest*
3301 ac_cv_search_exc_resume="-l$i"
3302break
3303else
3304 echo "configure: failed program was:" >&5
3305 cat conftest.$ac_ext >&5
3306fi
3307rm -f conftest*
3308done
3309LIBS="$ac_func_search_save_LIBS"
3310fi
3311
3312echo "$ac_t""$ac_cv_search_exc_resume" 1>&6
3313if test "$ac_cv_search_exc_resume" != "no"; then
3314 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
3315
3316else :
3317
3318fi
3319GNAT_LIBEXC="$LIBS"
3320LIBS="$save_LIBS"
3321
3322
890ad3ea 3323# See if the stage1 system preprocessor understands the ANSI C
4bc5fbd4 3324# preprocessor stringification operator. (Used by symcat.h.)
890ad3ea
KG
3325
3326
3327echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
b21d216c 3328echo "configure:3329: checking for preprocessor stringizing operator" >&5
890ad3ea 3329if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
76844337
RH
3330 echo $ac_n "(cached) $ac_c" 1>&6
3331else
3332 cat > conftest.$ac_ext <<EOF
b21d216c 3333#line 3334 "configure"
76844337
RH
3334#include "confdefs.h"
3335
890ad3ea
KG
3336#define x(y) #y
3337
3338char *s = x(teststring);
3339
76844337 3340EOF
890ad3ea
KG
3341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3342 egrep "#teststring" >/dev/null 2>&1; then
76844337 3343 rm -rf conftest*
890ad3ea 3344 ac_cv_c_stringize=no
76844337 3345else
76844337 3346 rm -rf conftest*
890ad3ea 3347 ac_cv_c_stringize=yes
76844337
RH
3348fi
3349rm -f conftest*
890ad3ea 3350
76844337
RH
3351fi
3352
890ad3ea
KG
3353if test "${ac_cv_c_stringize}" = yes
3354then
3355 cat >> confdefs.h <<\EOF
3356#define HAVE_STRINGIZE 1
76844337
RH
3357EOF
3358
3359fi
890ad3ea
KG
3360echo "$ac_t""${ac_cv_c_stringize}" 1>&6
3361
76844337 3362
956d6950
JL
3363# Use <inttypes.h> only if it exists,
3364# doesn't clash with <sys/types.h>, and declares intmax_t.
3365echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
b21d216c 3366echo "configure:3367: checking for inttypes.h" >&5
956d6950
JL
3367if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
3368 echo $ac_n "(cached) $ac_c" 1>&6
3369else
3370 cat > conftest.$ac_ext <<EOF
b21d216c 3371#line 3372 "configure"
956d6950
JL
3372#include "confdefs.h"
3373#include <sys/types.h>
3374#include <inttypes.h>
3375int main() {
3376intmax_t i = -1;
3377; return 0; }
3378EOF
b21d216c 3379if { (eval echo configure:3380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
956d6950 3380 rm -rf conftest*
0056a9b5 3381 gcc_cv_header_inttypes_h=yes
956d6950
JL
3382else
3383 echo "configure: failed program was:" >&5
3384 cat conftest.$ac_ext >&5
3385 rm -rf conftest*
3386 gcc_cv_header_inttypes_h=no
3387fi
3388rm -f conftest*
3389fi
3390
3391echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
0056a9b5
KG
3392if test $gcc_cv_header_inttypes_h = yes; then
3393 cat >> confdefs.h <<\EOF
3394#define HAVE_INTTYPES_H 1
3395EOF
3396
3397fi
956d6950 3398
c149cc37 3399
475c267f 3400for ac_func in strtoul bsearch popen times clock dup2 \
2e09e75a 3401 strchr strrchr kill getrlimit setrlimit atoll atoq \
54953b66 3402 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
3b681e9d
ZW
3403 fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
3404 lstat
956d6950
JL
3405do
3406echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b21d216c 3407echo "configure:3408: checking for $ac_func" >&5
956d6950
JL
3408if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3409 echo $ac_n "(cached) $ac_c" 1>&6
3410else
3411 cat > conftest.$ac_ext <<EOF
b21d216c 3412#line 3413 "configure"
956d6950
JL
3413#include "confdefs.h"
3414/* System header to define __stub macros and hopefully few prototypes,
3415 which can conflict with char $ac_func(); below. */
3416#include <assert.h>
3417/* Override any gcc2 internal prototype to avoid an error. */
3418/* We use char because int might match the return type of a gcc2
3419 builtin and then its argument prototype would still apply. */
3420char $ac_func();
3421
3422int main() {
3423
3424/* The GNU C library defines this for functions which it implements
3425 to always fail with ENOSYS. Some functions are actually named
3426 something starting with __ and the normal name is an alias. */
3427#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3428choke me
3429#else
99b09ff3 3430$ac_func();
956d6950
JL
3431#endif
3432
3433; return 0; }
3434EOF
b21d216c 3435if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
956d6950
JL
3436 rm -rf conftest*
3437 eval "ac_cv_func_$ac_func=yes"
3438else
3439 echo "configure: failed program was:" >&5
3440 cat conftest.$ac_ext >&5
3441 rm -rf conftest*
3442 eval "ac_cv_func_$ac_func=no"
3443fi
3444rm -f conftest*
3445fi
3446
3447if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3448 echo "$ac_t""yes" 1>&6
3449 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3450 cat >> confdefs.h <<EOF
3451#define $ac_tr_func 1
3452EOF
3453
3454else
3455 echo "$ac_t""no" 1>&6
3456fi
3457done
3458
6885fc87 3459
f12bc141 3460echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
b21d216c 3461echo "configure:3462: checking for ssize_t" >&5
f12bc141
ZW
3462if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3464else
3465 cat > conftest.$ac_ext <<EOF
b21d216c 3466#line 3467 "configure"
f12bc141
ZW
3467#include "confdefs.h"
3468#include <sys/types.h>
3469#if STDC_HEADERS
3470#include <stdlib.h>
3471#include <stddef.h>
3472#endif
3473EOF
3474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3475 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3476 rm -rf conftest*
cb65112a 3477 ac_cv_type_ssize_t=yes
f12bc141
ZW
3478else
3479 rm -rf conftest*
cb65112a 3480 ac_cv_type_ssize_t=no
f12bc141
ZW
3481fi
3482rm -f conftest*
3483
3484fi
cb65112a
AO
3485echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3486if test $ac_cv_type_ssize_t = no; then
3487 cat >> confdefs.h <<\EOF
f12bc141
ZW
3488#define ssize_t int
3489EOF
3490
3491fi
3492
0b9d02c6 3493
e256b8b6
DA
3494# Try to determine the array type of the second argument of getgroups
3495# for the target system (int or gid_t).
3496echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
b21d216c 3497echo "configure:3498: checking for uid_t in sys/types.h" >&5
e256b8b6
DA
3498if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3499 echo $ac_n "(cached) $ac_c" 1>&6
3500else
3501 cat > conftest.$ac_ext <<EOF
b21d216c 3502#line 3503 "configure"
e256b8b6
DA
3503#include "confdefs.h"
3504#include <sys/types.h>
3505EOF
3506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3507 egrep "uid_t" >/dev/null 2>&1; then
3508 rm -rf conftest*
3509 ac_cv_type_uid_t=yes
3510else
3511 rm -rf conftest*
3512 ac_cv_type_uid_t=no
3513fi
3514rm -f conftest*
3515
3516fi
3517
3518echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3519if test $ac_cv_type_uid_t = no; then
3520 cat >> confdefs.h <<\EOF
3521#define uid_t int
3522EOF
3523
3524 cat >> confdefs.h <<\EOF
3525#define gid_t int
3526EOF
3527
3528fi
3529
3530echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
b21d216c 3531echo "configure:3532: checking type of array argument to getgroups" >&5
e256b8b6
DA
3532if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3534else
3535 if test "$cross_compiling" = yes; then
3536 ac_cv_type_getgroups=cross
3537else
3538 cat > conftest.$ac_ext <<EOF
b21d216c 3539#line 3540 "configure"
e256b8b6
DA
3540#include "confdefs.h"
3541
3542/* Thanks to Mike Rendell for this test. */
3543#include <sys/types.h>
3544#define NGID 256
3545#undef MAX
3546#define MAX(x, y) ((x) > (y) ? (x) : (y))
3547main()
3548{
3549 gid_t gidset[NGID];
3550 int i, n;
3551 union { gid_t gval; long lval; } val;
3552
3553 val.lval = -1;
3554 for (i = 0; i < NGID; i++)
3555 gidset[i] = val.gval;
3556 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3557 gidset);
3558 /* Exit non-zero if getgroups seems to require an array of ints. This
3559 happens when gid_t is short but getgroups modifies an array of ints. */
3560 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3561}
3562
3563EOF
b21d216c 3564if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
e256b8b6
DA
3565then
3566 ac_cv_type_getgroups=gid_t
3567else
3568 echo "configure: failed program was:" >&5
3569 cat conftest.$ac_ext >&5
3570 rm -fr conftest*
3571 ac_cv_type_getgroups=int
3572fi
3573rm -fr conftest*
3574fi
3575
3576if test $ac_cv_type_getgroups = cross; then
3577 cat > conftest.$ac_ext <<EOF
b21d216c 3578#line 3579 "configure"
e256b8b6
DA
3579#include "confdefs.h"
3580#include <unistd.h>
3581EOF
3582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3583 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3584 rm -rf conftest*
3585 ac_cv_type_getgroups=gid_t
3586else
3587 rm -rf conftest*
3588 ac_cv_type_getgroups=int
3589fi
3590rm -f conftest*
3591
3592fi
3593fi
3594
3595echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3596cat >> confdefs.h <<EOF
3597#define GETGROUPS_T $ac_cv_type_getgroups
3598EOF
3599
3600
3601if test "${target}" = "${build}"; then
3602 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
3603else
3604 case "${target}" in
3605 # This condition may need some tweaking. It should include all
3606 # targets where the array type of the second argument of getgroups
3607 # is int and the type of gid_t is not equivalent to int.
3608 *-*-sunos* | *-*-ultrix*)
3609 TARGET_GETGROUPS_T=int
3610 ;;
3611 *)
3612 TARGET_GETGROUPS_T=gid_t
3613 ;;
3614 esac
3615fi
3616
3617
0a4b6309 3618echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
06f0b04c 3619echo "configure:3620: checking whether the printf functions support %p" >&5
0a4b6309
RL
3620if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622else
3623 if test "$cross_compiling" = yes; then
3624 gcc_cv_func_printf_ptr=no
3625else
3626 cat > conftest.$ac_ext <<EOF
06f0b04c 3627#line 3628 "configure"
0a4b6309
RL
3628#include "confdefs.h"
3629#include <stdio.h>
3630
86cf1cbd 3631int main()
0a4b6309
RL
3632{
3633 char buf[64];
3634 char *p = buf, *q = NULL;
3635 sprintf(buf, "%p", p);
3636 sscanf(buf, "%p", &q);
86cf1cbd 3637 return (p != q);
0a4b6309
RL
3638}
3639EOF
06f0b04c 3640if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0a4b6309
RL
3641then
3642 gcc_cv_func_printf_ptr=yes
3643else
3644 echo "configure: failed program was:" >&5
3645 cat conftest.$ac_ext >&5
3646 rm -fr conftest*
3647 gcc_cv_func_printf_ptr=no
3648fi
3649rm -fr conftest*
3650fi
3651
3652rm -f core core.* *.core
3653fi
3654
3655echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
3656if test $gcc_cv_func_printf_ptr = yes ; then
3657 cat >> confdefs.h <<\EOF
3658#define HAVE_PRINTF_PTR 1
3659EOF
3660
3661fi
3662
b27d2bd5
MK
3663
3664case "${host}" in
3665*-*-uwin*)
34fa3e7d
MM
3666 { echo "configure: error:
3667*** UWIN may not be used as a host platform because
3668*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
b27d2bd5
MK
3669 ;;
3670esac
c375c43b 3671echo $ac_n "checking for pid_t""... $ac_c" 1>&6
06f0b04c 3672echo "configure:3673: checking for pid_t" >&5
c375c43b
KG
3673if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3674 echo $ac_n "(cached) $ac_c" 1>&6
3675else
3676 cat > conftest.$ac_ext <<EOF
06f0b04c 3677#line 3678 "configure"
c375c43b
KG
3678#include "confdefs.h"
3679#include <sys/types.h>
3680#if STDC_HEADERS
3681#include <stdlib.h>
3682#include <stddef.h>
3683#endif
3684EOF
3685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 3686 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c375c43b 3687 rm -rf conftest*
cb65112a 3688 ac_cv_type_pid_t=yes
c375c43b
KG
3689else
3690 rm -rf conftest*
cb65112a 3691 ac_cv_type_pid_t=no
c375c43b
KG
3692fi
3693rm -f conftest*
3694
3695fi
cb65112a
AO
3696echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3697if test $ac_cv_type_pid_t = no; then
3698 cat >> confdefs.h <<\EOF
c375c43b
KG
3699#define pid_t int
3700EOF
3701
3702fi
3703
3704ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3705echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
06f0b04c 3706echo "configure:3707: checking for vfork.h" >&5
c375c43b
KG
3707if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3708 echo $ac_n "(cached) $ac_c" 1>&6
3709else
3710 cat > conftest.$ac_ext <<EOF
06f0b04c 3711#line 3712 "configure"
c375c43b
KG
3712#include "confdefs.h"
3713#include <vfork.h>
3714EOF
3715ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06f0b04c 3716{ (eval echo configure:3717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 3717ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
c375c43b
KG
3718if test -z "$ac_err"; then
3719 rm -rf conftest*
3720 eval "ac_cv_header_$ac_safe=yes"
3721else
3722 echo "$ac_err" >&5
3723 echo "configure: failed program was:" >&5
3724 cat conftest.$ac_ext >&5
3725 rm -rf conftest*
3726 eval "ac_cv_header_$ac_safe=no"
3727fi
3728rm -f conftest*
3729fi
3730if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3731 echo "$ac_t""yes" 1>&6
3732 cat >> confdefs.h <<\EOF
3733#define HAVE_VFORK_H 1
3734EOF
3735
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739
3740echo $ac_n "checking for working vfork""... $ac_c" 1>&6
06f0b04c 3741echo "configure:3742: checking for working vfork" >&5
c375c43b
KG
3742if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3743 echo $ac_n "(cached) $ac_c" 1>&6
3744else
3745 if test "$cross_compiling" = yes; then
3746 echo $ac_n "checking for vfork""... $ac_c" 1>&6
06f0b04c 3747echo "configure:3748: checking for vfork" >&5
c375c43b
KG
3748if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3749 echo $ac_n "(cached) $ac_c" 1>&6
3750else
3751 cat > conftest.$ac_ext <<EOF
06f0b04c 3752#line 3753 "configure"
c375c43b
KG
3753#include "confdefs.h"
3754/* System header to define __stub macros and hopefully few prototypes,
3755 which can conflict with char vfork(); below. */
3756#include <assert.h>
3757/* Override any gcc2 internal prototype to avoid an error. */
3758/* We use char because int might match the return type of a gcc2
3759 builtin and then its argument prototype would still apply. */
3760char vfork();
3761
3762int main() {
3763
3764/* The GNU C library defines this for functions which it implements
3765 to always fail with ENOSYS. Some functions are actually named
3766 something starting with __ and the normal name is an alias. */
3767#if defined (__stub_vfork) || defined (__stub___vfork)
3768choke me
3769#else
99b09ff3 3770vfork();
c375c43b
KG
3771#endif
3772
3773; return 0; }
3774EOF
06f0b04c 3775if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c375c43b
KG
3776 rm -rf conftest*
3777 eval "ac_cv_func_vfork=yes"
3778else
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781 rm -rf conftest*
3782 eval "ac_cv_func_vfork=no"
3783fi
3784rm -f conftest*
3785fi
3786
3787if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3788 echo "$ac_t""yes" 1>&6
3789 :
3790else
3791 echo "$ac_t""no" 1>&6
3792fi
3793
3794ac_cv_func_vfork_works=$ac_cv_func_vfork
3795else
3796 cat > conftest.$ac_ext <<EOF
06f0b04c 3797#line 3798 "configure"
c375c43b
KG
3798#include "confdefs.h"
3799/* Thanks to Paul Eggert for this test. */
3800#include <stdio.h>
3801#include <sys/types.h>
3802#include <sys/stat.h>
3803#ifdef HAVE_UNISTD_H
3804#include <unistd.h>
3805#endif
3806#ifdef HAVE_VFORK_H
3807#include <vfork.h>
3808#endif
3809/* On some sparc systems, changes by the child to local and incoming
3810 argument registers are propagated back to the parent.
3811 The compiler is told about this with #include <vfork.h>,
3812 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3813 Test for this by using a static variable whose address
3814 is put into a register that is clobbered by the vfork. */
3815static
3816#ifdef __cplusplus
3817sparc_address_test (int arg)
3818#else
3819sparc_address_test (arg) int arg;
3820#endif
3821{
3822 static pid_t child;
3823 if (!child) {
3824 child = vfork ();
3825 if (child < 0) {
3826 perror ("vfork");
3827 _exit(2);
3828 }
3829 if (!child) {
3830 arg = getpid();
3831 write(-1, "", 0);
3832 _exit (arg);
3833 }
3834 }
3835}
3836main() {
3837 pid_t parent = getpid ();
3838 pid_t child;
3839
3840 sparc_address_test ();
3841
3842 child = vfork ();
3843
3844 if (child == 0) {
3845 /* Here is another test for sparc vfork register problems.
3846 This test uses lots of local variables, at least
3847 as many local variables as main has allocated so far
3848 including compiler temporaries. 4 locals are enough for
3849 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3850 A buggy compiler should reuse the register of parent
3851 for one of the local variables, since it will think that
3852 parent can't possibly be used any more in this routine.
3853 Assigning to the local variable will thus munge parent
3854 in the parent process. */
3855 pid_t
3856 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3857 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3858 /* Convince the compiler that p..p7 are live; otherwise, it might
3859 use the same hardware register for all 8 local variables. */
3860 if (p != p1 || p != p2 || p != p3 || p != p4
3861 || p != p5 || p != p6 || p != p7)
3862 _exit(1);
3863
3864 /* On some systems (e.g. IRIX 3.3),
3865 vfork doesn't separate parent from child file descriptors.
3866 If the child closes a descriptor before it execs or exits,
3867 this munges the parent's descriptor as well.
3868 Test for this by closing stdout in the child. */
3869 _exit(close(fileno(stdout)) != 0);
3870 } else {
3871 int status;
3872 struct stat st;
3873
3874 while (wait(&status) != child)
3875 ;
3876 exit(
3877 /* Was there some problem with vforking? */
3878 child < 0
3879
3880 /* Did the child fail? (This shouldn't happen.) */
3881 || status
3882
3883 /* Did the vfork/compiler bug occur? */
3884 || parent != getpid()
3885
3886 /* Did the file descriptor bug occur? */
3887 || fstat(fileno(stdout), &st) != 0
3888 );
3889 }
3890}
3891EOF
06f0b04c 3892if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c375c43b
KG
3893then
3894 ac_cv_func_vfork_works=yes
3895else
3896 echo "configure: failed program was:" >&5
3897 cat conftest.$ac_ext >&5
3898 rm -fr conftest*
3899 ac_cv_func_vfork_works=no
3900fi
3901rm -fr conftest*
3902fi
3903
3904fi
3905
3906echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3907if test $ac_cv_func_vfork_works = no; then
3908 cat >> confdefs.h <<\EOF
3909#define vfork fork
3910EOF
3911
3912fi
3913
81bf3d9e 3914for ac_func in getpagesize
0a4b6309 3915do
81bf3d9e 3916echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06f0b04c 3917echo "configure:3918: checking for $ac_func" >&5
81bf3d9e 3918if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
0a4b6309
RL
3919 echo $ac_n "(cached) $ac_c" 1>&6
3920else
3921 cat > conftest.$ac_ext <<EOF
06f0b04c 3922#line 3923 "configure"
0a4b6309 3923#include "confdefs.h"
81bf3d9e
RH
3924/* System header to define __stub macros and hopefully few prototypes,
3925 which can conflict with char $ac_func(); below. */
3926#include <assert.h>
3927/* Override any gcc2 internal prototype to avoid an error. */
3928/* We use char because int might match the return type of a gcc2
3929 builtin and then its argument prototype would still apply. */
3930char $ac_func();
8fa1f09f 3931
81bf3d9e
RH
3932int main() {
3933
3934/* The GNU C library defines this for functions which it implements
3935 to always fail with ENOSYS. Some functions are actually named
3936 something starting with __ and the normal name is an alias. */
3937#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3938choke me
c5c76735 3939#else
99b09ff3 3940$ac_func();
c5c76735
JL
3941#endif
3942
c5c76735
JL
3943; return 0; }
3944EOF
06f0b04c 3945if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c5c76735 3946 rm -rf conftest*
81bf3d9e 3947 eval "ac_cv_func_$ac_func=yes"
c5c76735
JL
3948else
3949 echo "configure: failed program was:" >&5
3950 cat conftest.$ac_ext >&5
3951 rm -rf conftest*
81bf3d9e 3952 eval "ac_cv_func_$ac_func=no"
c5c76735
JL
3953fi
3954rm -f conftest*
3955fi
3956
81bf3d9e 3957if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
c5c76735 3958 echo "$ac_t""yes" 1>&6
81bf3d9e 3959 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
c5c76735 3960 cat >> confdefs.h <<EOF
81bf3d9e 3961#define $ac_tr_func 1
c5c76735 3962EOF
81bf3d9e 3963
c5c76735
JL
3964else
3965 echo "$ac_t""no" 1>&6
3966fi
c5c76735
JL
3967done
3968
825b6926
ZW
3969# The test program for the next two tests is the same except for one
3970# set of ifdefs.
3971cat >ct-mmap.inc <<'EOF'
d2cabf16 3972#include <sys/types.h>
81bf3d9e 3973#include <sys/mman.h>
825b6926
ZW
3974#include <fcntl.h>
3975#include <signal.h>
3976#include <setjmp.h>
3977#include <stdio.h>
0a4b6309 3978
4c1331d6
DA
3979#if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
3980# define MAP_ANONYMOUS MAP_ANON
3981#endif
3982
81bf3d9e
RH
3983/* This mess was copied from the GNU getpagesize.h. */
3984#ifndef HAVE_GETPAGESIZE
3985# ifdef HAVE_UNISTD_H
3986# include <unistd.h>
3987# endif
0a4b6309 3988
81bf3d9e
RH
3989/* Assume that all systems that can run configure have sys/param.h. */
3990# ifndef HAVE_SYS_PARAM_H
3991# define HAVE_SYS_PARAM_H 1
3992# endif
0a4b6309 3993
81bf3d9e
RH
3994# ifdef _SC_PAGESIZE
3995# define getpagesize() sysconf(_SC_PAGESIZE)
3996# else /* no _SC_PAGESIZE */
3997# ifdef HAVE_SYS_PARAM_H
3998# include <sys/param.h>
3999# ifdef EXEC_PAGESIZE
4000# define getpagesize() EXEC_PAGESIZE
4001# else /* no EXEC_PAGESIZE */
4002# ifdef NBPG
4003# define getpagesize() NBPG * CLSIZE
4004# ifndef CLSIZE
4005# define CLSIZE 1
4006# endif /* no CLSIZE */
4007# else /* no NBPG */
4008# ifdef NBPC
4009# define getpagesize() NBPC
4010# else /* no NBPC */
4011# ifdef PAGESIZE
4012# define getpagesize() PAGESIZE
4013# endif /* PAGESIZE */
4014# endif /* no NBPC */
4015# endif /* no NBPG */
4016# endif /* no EXEC_PAGESIZE */
4017# else /* no HAVE_SYS_PARAM_H */
4018# define getpagesize() 8192 /* punt totally */
4019# endif /* no HAVE_SYS_PARAM_H */
4020# endif /* no _SC_PAGESIZE */
0a4b6309 4021
81bf3d9e 4022#endif /* no HAVE_GETPAGESIZE */
0a4b6309 4023
825b6926
ZW
4024#ifndef MAP_FAILED
4025# define MAP_FAILED -1
4c1331d6 4026#endif
81bf3d9e 4027
825b6926
ZW
4028#undef perror_exit
4029#define perror_exit(str, val) \
4030 do { perror(str); exit(val); } while (0)
4031
4032/* Some versions of cygwin mmap require that munmap is called with the
4033 same parameters as mmap. GCC expects that this is not the case.
4034 Test for various forms of this problem. Warning - icky signal games. */
4035
4036static sigset_t unblock_sigsegv;
4037static jmp_buf r;
4038static size_t pg;
4039static int devzero;
4040
4041static char *
4042anonmap (size)
4043 size_t size;
4044{
4045#ifdef USE_MAP_ANON
4046 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4047 MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
4c1331d6 4048#else
825b6926
ZW
4049 return (char *) mmap (0, size, PROT_READ|PROT_WRITE,
4050 MAP_PRIVATE, devzero, 0);
4c1331d6 4051#endif
825b6926
ZW
4052}
4053
4054static void
4055sigsegv (unused)
4056 int unused;
4057{
4058 sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
4059 longjmp (r, 1);
4060}
4061
4062/* Basic functionality test. */
4063void
4064test_0 ()
4065{
4066 char *x = anonmap (pg);
4067 if (x == (char *) MAP_FAILED)
4068 perror_exit("test 0 mmap", 2);
81bf3d9e 4069
4acab94b 4070 *(int *)x += 1;
81bf3d9e 4071
4acab94b 4072 if (munmap(x, pg) < 0)
825b6926
ZW
4073 perror_exit("test 0 munmap", 3);
4074}
4075
4076/* 1. If we map a 2-page region and unmap its second page, the first page
4077 must remain. */
4078static void
4079test_1 ()
4080{
4081 char *x = anonmap (pg * 2);
4082 if (x == (char *)MAP_FAILED)
4083 perror_exit ("test 1 mmap", 4);
4084
4085 signal (SIGSEGV, sigsegv);
4086 if (setjmp (r))
4087 perror_exit ("test 1 fault", 5);
4088
4089 x[0] = 1;
4090 x[pg] = 1;
4091
4092 if (munmap (x + pg, pg) < 0)
4093 perror_exit ("test 1 munmap 1", 6);
4094 x[0] = 2;
4095
4096 if (setjmp (r) == 0)
4097 {
4098 x[pg] = 1;
4099 perror_exit ("test 1 no fault", 7);
4100 }
4101 if (munmap (x, pg) < 0)
4102 perror_exit ("test 1 munmap 2", 8);
4103}
4104
4105/* 2. If we map a 2-page region and unmap its first page, the second
4106 page must remain. */
4107static void
4108test_2 ()
4109{
4110 char *x = anonmap (pg * 2);
4111 if (x == (char *)MAP_FAILED)
4112 perror_exit ("test 2 mmap", 9);
4113
4114 signal (SIGSEGV, sigsegv);
4115 if (setjmp (r))
4116 perror_exit ("test 2 fault", 10);
4117
4118 x[0] = 1;
4119 x[pg] = 1;
4120
4121 if (munmap (x, pg) < 0)
4122 perror_exit ("test 2 munmap 1", 11);
4123
4124 x[pg] = 2;
4125
4126 if (setjmp (r) == 0)
4127 {
4128 x[0] = 1;
4129 perror_exit ("test 2 no fault", 12);
4130 }
4131
4132 if (munmap (x+pg, pg) < 0)
4133 perror_exit ("test 2 munmap 2", 13);
4134}
4135
4136/* 3. If we map two adjacent 1-page regions and unmap them both with
4137 one munmap, both must go away.
4138
4139 Getting two adjacent 1-page regions with two mmap calls is slightly
4140 tricky. All OS's tested skip over already-allocated blocks; therefore
4141 we have been careful to unmap all allocated regions in previous tests.
4142 HP/UX allocates pages backward in memory. No OS has yet been observed
4143 to be so perverse as to leave unmapped space between consecutive calls
4144 to mmap. */
4145
4146static void
4147test_3 ()
4148{
4149 char *x, *y, *z;
4150
4151 x = anonmap (pg);
4152 if (x == (char *)MAP_FAILED)
4153 perror_exit ("test 3 mmap 1", 14);
4154 y = anonmap (pg);
4155 if (y == (char *)MAP_FAILED)
4156 perror_exit ("test 3 mmap 2", 15);
4157
4158 if (y != x + pg)
4159 {
4160 if (y == x - pg)
4161 z = y, y = x, x = z;
4162 else
4163 {
4164 fprintf (stderr, "test 3 nonconsecutive pages - %lx, %lx\n",
4165 (unsigned long)x, (unsigned long)y);
4166 exit (16);
4167 }
4168 }
4169
4170 signal (SIGSEGV, sigsegv);
4171 if (setjmp (r))
4172 perror_exit ("test 3 fault", 17);
4173
4174 x[0] = 1;
4175 y[0] = 1;
4176
4177 if (munmap (x, pg*2) < 0)
4178 perror_exit ("test 3 munmap", 18);
4179
4180 if (setjmp (r) == 0)
4181 {
4182 x[0] = 1;
4183 perror_exit ("test 3 no fault 1", 19);
4184 }
4185
4186 signal (SIGSEGV, sigsegv);
4187 if (setjmp (r) == 0)
4188 {
4189 y[0] = 1;
4190 perror_exit ("test 3 no fault 2", 20);
4191 }
4192}
4193
4194int
4195main ()
4196{
4197 sigemptyset (&unblock_sigsegv);
4198 sigaddset (&unblock_sigsegv, SIGSEGV);
4199 pg = getpagesize ();
4200#ifndef USE_MAP_ANON
4201 devzero = open ("/dev/zero", O_RDWR);
4202 if (devzero < 0)
4203 perror_exit ("open /dev/zero", 1);
4204#endif
4205
4206 test_0();
4207 test_1();
4208 test_2();
4209 test_3();
81bf3d9e 4210
4acab94b
AO
4211 exit(0);
4212}
81bf3d9e 4213EOF
825b6926
ZW
4214
4215echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
06f0b04c 4216echo "configure:4217: checking for working mmap from /dev/zero" >&5
825b6926
ZW
4217if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
4218 echo $ac_n "(cached) $ac_c" 1>&6
4219else
4220 if test "$cross_compiling" = yes; then
4221 # If this is not cygwin, and /dev/zero is a character device, it's probably
4222 # safe to assume it works.
4223 case "$host_os" in
4224 cygwin* | win32 | pe | mingw* ) ac_cv_func_mmap_dev_zero=buggy ;;
4225 * ) if test -c /dev/zero
4226 then ac_cv_func_mmap_dev_zero=yes
4227 else ac_cv_func_mmap_dev_zero=no
4228 fi ;;
4229 esac
4230else
4231 cat > conftest.$ac_ext <<EOF
06f0b04c 4232#line 4233 "configure"
825b6926
ZW
4233#include "confdefs.h"
4234#include "ct-mmap.inc"
4235EOF
06f0b04c 4236if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
825b6926
ZW
4237then
4238 ac_cv_func_mmap_dev_zero=yes
4239else
4240 echo "configure: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
4242 rm -fr conftest*
4243 if test $? -lt 4
4244 then ac_cv_func_mmap_dev_zero=no
4245 else ac_cv_func_mmap_dev_zero=buggy
4246 fi
4247fi
4248rm -fr conftest*
4249fi
4250
4251
4252fi
4253
4254echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
4255if test $ac_cv_func_mmap_dev_zero = yes; then
4256 cat >> confdefs.h <<\EOF
4257#define HAVE_MMAP_DEV_ZERO 1
4258EOF
4259
4260fi
4261
4262echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
06f0b04c 4263echo "configure:4264: checking for working mmap with MAP_ANON(YMOUS)" >&5
825b6926
ZW
4264if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
4265 echo $ac_n "(cached) $ac_c" 1>&6
4266else
4267 if test "$cross_compiling" = yes; then
4268 # Unlike /dev/zero, it is not safe to assume MAP_ANON(YMOUS) works
4269 # just because it's there. Some SCO Un*xen define it but don't implement it.
4270 ac_cv_func_mmap_anon=no
4271else
4272 cat > conftest.$ac_ext <<EOF
06f0b04c 4273#line 4274 "configure"
825b6926
ZW
4274#include "confdefs.h"
4275#define USE_MAP_ANON
4276#include "ct-mmap.inc"
4277EOF
06f0b04c 4278if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
81bf3d9e 4279then
825b6926 4280 ac_cv_func_mmap_anon=yes
81bf3d9e
RH
4281else
4282 echo "configure: failed program was:" >&5
4283 cat conftest.$ac_ext >&5
4284 rm -fr conftest*
825b6926
ZW
4285 if test $? -lt 4
4286 then ac_cv_func_mmap_anon=no
4287 else ac_cv_func_mmap_anon=buggy
4288 fi
81bf3d9e
RH
4289fi
4290rm -fr conftest*
4291fi
4292
825b6926 4293
81bf3d9e
RH
4294fi
4295
825b6926
ZW
4296echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
4297if test $ac_cv_func_mmap_anon = yes; then
81bf3d9e 4298 cat >> confdefs.h <<\EOF
825b6926 4299#define HAVE_MMAP_ANON 1
81bf3d9e
RH
4300EOF
4301
4302fi
825b6926 4303rm -f ct-mmap.inc
81bf3d9e 4304
56f02b88 4305echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
06f0b04c 4306echo "configure:4307: checking for working mmap of a file" >&5
56f02b88
ZW
4307if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
4309else
4310 # Create a file one thousand bytes long.
4311for i in 1 2 3 4 5 6 7 8 9 0
4312do for j in 1 2 3 4 5 6 7 8 9 0
4313do echo $i $j xxxxx
4314done
4315done > conftestdata$$
4316
4317if test "$cross_compiling" = yes; then
4318 ac_cv_func_mmap_file=no
4319else
4320 cat > conftest.$ac_ext <<EOF
06f0b04c 4321#line 4322 "configure"
56f02b88
ZW
4322#include "confdefs.h"
4323
4324/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
4325 Richard Henderson and Alexandre Oliva.
4326 Check whether read-only mmap of a plain file works. */
4327#include <sys/types.h>
4328#include <sys/stat.h>
4329#include <fcntl.h>
4330#include <sys/mman.h>
4331
4332int main()
4333{
4334 char *x;
4335 int fd;
4336 struct stat st;
4337
4338 fd = open("conftestdata$$", O_RDONLY);
4339 if (fd < 0)
4340 exit(1);
4341
4342 if (fstat (fd, &st))
4343 exit(2);
4344
4345 x = (char*)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
4346 if (x == (char *) -1)
4347 exit(3);
4348
4349 if (x[0] != '1' || x[1] != ' ' || x[2] != '1' || x[3] != ' ')
4350 exit(4);
4351
4352 if (munmap(x, st.st_size) < 0)
4353 exit(5);
4354
4355 exit(0);
4356}
4357EOF
06f0b04c 4358if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
56f02b88
ZW
4359then
4360 ac_cv_func_mmap_file=yes
4361else
4362 echo "configure: failed program was:" >&5
4363 cat conftest.$ac_ext >&5
4364 rm -fr conftest*
4365 ac_cv_func_mmap_file=no
4366fi
4367rm -fr conftest*
4368fi
4369
4370fi
4371
4372echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
4373if test $ac_cv_func_mmap_file = yes; then
4374 cat >> confdefs.h <<\EOF
4375#define HAVE_MMAP_FILE 1
4376EOF
4377
4378fi
4379
81bf3d9e 4380
f91abfce
TT
4381
4382
4383 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
4384if test "${with_libiconv_prefix+set}" = set; then
4385 withval="$with_libiconv_prefix"
4386
4387 for dir in `echo "$withval" | tr : ' '`; do
4388 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
4389 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
4390 done
4391
4392fi
4393
4394
4395 echo $ac_n "checking for iconv""... $ac_c" 1>&6
06f0b04c 4396echo "configure:4397: checking for iconv" >&5
f91abfce
TT
4397if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
4398 echo $ac_n "(cached) $ac_c" 1>&6
4399else
4400
4401 am_cv_func_iconv="no, consider installing GNU libiconv"
4402 am_cv_lib_iconv=no
4403 cat > conftest.$ac_ext <<EOF
06f0b04c 4404#line 4405 "configure"
f91abfce
TT
4405#include "confdefs.h"
4406#include <stdlib.h>
4407#include <iconv.h>
4408int main() {
4409iconv_t cd = iconv_open("","");
4410 iconv(cd,NULL,NULL,NULL,NULL);
4411 iconv_close(cd);
4412; return 0; }
4413EOF
06f0b04c 4414if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f91abfce
TT
4415 rm -rf conftest*
4416 am_cv_func_iconv=yes
4417else
4418 echo "configure: failed program was:" >&5
4419 cat conftest.$ac_ext >&5
4420fi
4421rm -f conftest*
4422 if test "$am_cv_func_iconv" != yes; then
4423 am_save_LIBS="$LIBS"
4424 LIBS="$LIBS -liconv"
4425 cat > conftest.$ac_ext <<EOF
06f0b04c 4426#line 4427 "configure"
f91abfce
TT
4427#include "confdefs.h"
4428#include <stdlib.h>
4429#include <iconv.h>
4430int main() {
4431iconv_t cd = iconv_open("","");
4432 iconv(cd,NULL,NULL,NULL,NULL);
4433 iconv_close(cd);
4434; return 0; }
4435EOF
06f0b04c 4436if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f91abfce
TT
4437 rm -rf conftest*
4438 am_cv_lib_iconv=yes
4439 am_cv_func_iconv=yes
4440else
4441 echo "configure: failed program was:" >&5
4442 cat conftest.$ac_ext >&5
4443fi
4444rm -f conftest*
4445 LIBS="$am_save_LIBS"
4446 fi
4447
4448fi
4449
4450echo "$ac_t""$am_cv_func_iconv" 1>&6
4451 if test "$am_cv_func_iconv" = yes; then
4452 cat >> confdefs.h <<\EOF
4453#define HAVE_ICONV 1
4454EOF
4455
4456 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
06f0b04c 4457echo "configure:4458: checking for iconv declaration" >&5
f91abfce
TT
4458 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4459 echo $ac_n "(cached) $ac_c" 1>&6
4460else
4461
4462 cat > conftest.$ac_ext <<EOF
06f0b04c 4463#line 4464 "configure"
f91abfce
TT
4464#include "confdefs.h"
4465
4466#include <stdlib.h>
4467#include <iconv.h>
4468extern
4469#ifdef __cplusplus
4470"C"
4471#endif
4472#if defined(__STDC__) || defined(__cplusplus)
4473size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4474#else
4475size_t iconv();
4476#endif
4477
4478int main() {
4479
4480; return 0; }
4481EOF
06f0b04c 4482if { (eval echo configure:4483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f91abfce
TT
4483 rm -rf conftest*
4484 am_cv_proto_iconv_arg1=""
4485else
4486 echo "configure: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 rm -rf conftest*
4489 am_cv_proto_iconv_arg1="const"
4490fi
4491rm -f conftest*
4492 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);"
4493fi
4494
4495 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4496 echo "$ac_t""${ac_t:-
4497 }$am_cv_proto_iconv" 1>&6
4498 cat >> confdefs.h <<EOF
4499#define ICONV_CONST $am_cv_proto_iconv_arg1
4500EOF
4501
4502 fi
4503 LIBICONV=
4504 if test "$am_cv_lib_iconv" = yes; then
4505 LIBICONV="-liconv"
4506 fi
4507
4508
4509
86cf1cbd
KG
4510# We will need to find libiberty.h and ansidecl.h
4511saved_CFLAGS="$CFLAGS"
4512CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
8e944909 4513for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d
ZW
4514 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
4515 fprintf_unlocked strstr environ errno \
c1800ec8 4516 malloc realloc calloc free basename getopt clock
81bf3d9e 4517do
f31e826b
KG
4518 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4519echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
06f0b04c 4520echo "configure:4521: checking whether $ac_func is declared" >&5
f31e826b 4521if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
81bf3d9e
RH
4522 echo $ac_n "(cached) $ac_c" 1>&6
4523else
4524 cat > conftest.$ac_ext <<EOF
06f0b04c 4525#line 4526 "configure"
81bf3d9e 4526#include "confdefs.h"
7afe8c41
KG
4527#undef $ac_tr_decl
4528#define $ac_tr_decl 1
4529
d02af173 4530#include "ansidecl.h"
86cf1cbd 4531#include "system.h"
f31e826b 4532
81bf3d9e 4533int main() {
86cf1cbd
KG
4534#ifndef $ac_func
4535char *(*pfn) = (char *(*)) $ac_func ;
4536#endif
81bf3d9e
RH
4537; return 0; }
4538EOF
06f0b04c 4539if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
81bf3d9e 4540 rm -rf conftest*
f31e826b 4541 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e
RH
4542else
4543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
4545 rm -rf conftest*
f31e826b 4546 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e
RH
4547fi
4548rm -f conftest*
4549fi
4550
f31e826b
KG
4551if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4552 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
86cf1cbd 4553#define $ac_tr_decl 1
81bf3d9e 4554EOF
86cf1cbd 4555
81bf3d9e 4556else
f31e826b
KG
4557 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4558#define $ac_tr_decl 0
4559EOF
4560
81bf3d9e
RH
4561fi
4562
4563done
86cf1cbd 4564if test x = y ; then
05e12634 4565 cat >> confdefs.h <<\EOF
f31e826b 4566#define HAVE_DECL_GETENV 1
86cf1cbd 4567EOF
05e12634 4568 cat >> confdefs.h <<\EOF
f31e826b 4569#define HAVE_DECL_ATOL 1
86cf1cbd 4570EOF
05e12634 4571 cat >> confdefs.h <<\EOF
f31e826b 4572#define HAVE_DECL_SBRK 1
86cf1cbd 4573EOF
05e12634 4574 cat >> confdefs.h <<\EOF
f31e826b 4575#define HAVE_DECL_ABORT 1
86cf1cbd 4576EOF
05e12634 4577 cat >> confdefs.h <<\EOF
f31e826b 4578#define HAVE_DECL_ATOF 1
86cf1cbd 4579EOF
05e12634 4580 cat >> confdefs.h <<\EOF
f31e826b 4581#define HAVE_DECL_GETCWD 1
86cf1cbd 4582EOF
05e12634 4583 cat >> confdefs.h <<\EOF
f31e826b 4584#define HAVE_DECL_GETWD 1
86cf1cbd
KG
4585EOF
4586 \
05e12634 4587 cat >> confdefs.h <<\EOF
f31e826b 4588#define HAVE_DECL_STRSIGNAL 1
86cf1cbd 4589EOF
05e12634 4590 cat >> confdefs.h <<\EOF
f31e826b 4591#define HAVE_DECL_PUTC_UNLOCKED 1
86cf1cbd 4592EOF
05e12634 4593 cat >> confdefs.h <<\EOF
f31e826b 4594#define HAVE_DECL_FPUTS_UNLOCKED 1
3b681e9d
ZW
4595EOF
4596 cat >> confdefs.h <<\EOF
4597#define HAVE_DECL_FWRITE_UNLOCKED 1
4598EOF
4599 \
4600 cat >> confdefs.h <<\EOF
4601#define HAVE_DECL_FPRINTF_UNLOCKED 1
86cf1cbd 4602EOF
05e12634 4603 cat >> confdefs.h <<\EOF
f31e826b 4604#define HAVE_DECL_STRSTR 1
86cf1cbd 4605EOF
05e12634 4606 cat >> confdefs.h <<\EOF
f31e826b 4607#define HAVE_DECL_ENVIRON 1
6c889b67 4608EOF
05e12634 4609 cat >> confdefs.h <<\EOF
6c889b67 4610#define HAVE_DECL_ERRNO 1
86cf1cbd
KG
4611EOF
4612 \
05e12634 4613 cat >> confdefs.h <<\EOF
f31e826b
KG
4614#define HAVE_DECL_MALLOC 1
4615EOF
05e12634 4616 cat >> confdefs.h <<\EOF
f31e826b 4617#define HAVE_DECL_REALLOC 1
86cf1cbd 4618EOF
05e12634 4619 cat >> confdefs.h <<\EOF
f31e826b 4620#define HAVE_DECL_CALLOC 1
86cf1cbd 4621EOF
05e12634 4622 cat >> confdefs.h <<\EOF
f31e826b 4623#define HAVE_DECL_FREE 1
86cf1cbd 4624EOF
05e12634 4625 cat >> confdefs.h <<\EOF
f31e826b
KG
4626#define HAVE_DECL_BASENAME 1
4627EOF
05e12634 4628 cat >> confdefs.h <<\EOF
f31e826b 4629#define HAVE_DECL_GETOPT 1
c1800ec8 4630EOF
05e12634 4631 cat >> confdefs.h <<\EOF
c1800ec8 4632#define HAVE_DECL_CLOCK 1
81bf3d9e 4633EOF
81bf3d9e
RH
4634fi
4635
81bf3d9e
RH
4636
4637for ac_func in getrlimit setrlimit getrusage
4638do
f31e826b
KG
4639 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4640echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
06f0b04c 4641echo "configure:4642: checking whether $ac_func is declared" >&5
f31e826b 4642if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
81bf3d9e
RH
4643 echo $ac_n "(cached) $ac_c" 1>&6
4644else
4645 cat > conftest.$ac_ext <<EOF
06f0b04c 4646#line 4647 "configure"
81bf3d9e 4647#include "confdefs.h"
7afe8c41
KG
4648#undef $ac_tr_decl
4649#define $ac_tr_decl 1
4650
d02af173 4651#include "ansidecl.h"
86cf1cbd 4652#include "system.h"
81bf3d9e
RH
4653#ifdef HAVE_SYS_RESOURCE_H
4654#include <sys/resource.h>
4655#endif
4656
f31e826b 4657
81bf3d9e 4658int main() {
86cf1cbd
KG
4659#ifndef $ac_func
4660char *(*pfn) = (char *(*)) $ac_func ;
4661#endif
81bf3d9e
RH
4662; return 0; }
4663EOF
06f0b04c 4664if { (eval echo configure:4665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
81bf3d9e 4665 rm -rf conftest*
f31e826b 4666 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e
RH
4667else
4668 echo "configure: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4670 rm -rf conftest*
f31e826b 4671 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e
RH
4672fi
4673rm -f conftest*
4674fi
4675
f31e826b
KG
4676if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4677 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
86cf1cbd 4678#define $ac_tr_decl 1
81bf3d9e 4679EOF
86cf1cbd 4680
81bf3d9e 4681else
f31e826b
KG
4682 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4683#define $ac_tr_decl 0
4684EOF
4685
81bf3d9e
RH
4686fi
4687
4688done
86cf1cbd 4689if test x = y ; then
05e12634 4690 cat >> confdefs.h <<\EOF
f31e826b 4691#define HAVE_DECL_GETRLIMIT 1
86cf1cbd 4692EOF
05e12634 4693 cat >> confdefs.h <<\EOF
f31e826b 4694#define HAVE_DECL_SETRLIMIT 1
86cf1cbd 4695EOF
05e12634 4696 cat >> confdefs.h <<\EOF
f31e826b 4697#define HAVE_DECL_GETRUSAGE 1
86cf1cbd
KG
4698EOF
4699fi
4700
81bf3d9e 4701
c1800ec8
ZW
4702for ac_func in times
4703do
4704 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4705echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
06f0b04c 4706echo "configure:4707: checking whether $ac_func is declared" >&5
c1800ec8
ZW
4707if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
4708 echo $ac_n "(cached) $ac_c" 1>&6
4709else
4710 cat > conftest.$ac_ext <<EOF
06f0b04c 4711#line 4712 "configure"
c1800ec8
ZW
4712#include "confdefs.h"
4713#undef $ac_tr_decl
4714#define $ac_tr_decl 1
4715
4716#include "ansidecl.h"
4717#include "system.h"
4718#ifdef HAVE_SYS_TIMES_H
4719#include <sys/times.h>
4720#endif
4721
4722
4723int main() {
4724#ifndef $ac_func
4725char *(*pfn) = (char *(*)) $ac_func ;
4726#endif
4727; return 0; }
4728EOF
06f0b04c 4729if { (eval echo configure:4730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c1800ec8
ZW
4730 rm -rf conftest*
4731 eval "gcc_cv_have_decl_$ac_func=yes"
4732else
4733 echo "configure: failed program was:" >&5
4734 cat conftest.$ac_ext >&5
4735 rm -rf conftest*
4736 eval "gcc_cv_have_decl_$ac_func=no"
4737fi
4738rm -f conftest*
4739fi
4740
4741if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
4742 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
4743#define $ac_tr_decl 1
4744EOF
4745
4746else
4747 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
4748#define $ac_tr_decl 0
4749EOF
4750
4751fi
4752
4753done
4754if test x = y ; then
05e12634 4755 cat >> confdefs.h <<\EOF
c1800ec8
ZW
4756#define HAVE_DECL_TIMES 1
4757EOF
4758fi
4759
4760
4761# More time-related stuff.
4762echo $ac_n "checking for struct tms""... $ac_c" 1>&6
06f0b04c 4763echo "configure:4764: checking for struct tms" >&5
c1800ec8
ZW
4764if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
4766else
4767
4768cat > conftest.$ac_ext <<EOF
06f0b04c 4769#line 4770 "configure"
c1800ec8
ZW
4770#include "confdefs.h"
4771
4772#include "ansidecl.h"
4773#include "system.h"
4774#ifdef HAVE_SYS_TIMES_H
4775#include <sys/times.h>
4776#endif
4777
4778int main() {
4779struct tms tms;
4780; return 0; }
4781EOF
06f0b04c 4782if { (eval echo configure:4783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c1800ec8
ZW
4783 rm -rf conftest*
4784 ac_cv_struct_tms=yes
4785else
4786 echo "configure: failed program was:" >&5
4787 cat conftest.$ac_ext >&5
4788 rm -rf conftest*
4789 ac_cv_struct_tms=no
4790fi
4791rm -f conftest*
4792fi
4793
4794echo "$ac_t""$ac_cv_struct_tms" 1>&6
4795if test $ac_cv_struct_tms = yes; then
4796 cat >> confdefs.h <<\EOF
4797#define HAVE_STRUCT_TMS 1
4798EOF
4799
4800fi
4801
4802# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
4803# revisit after autoconf 2.50.
4804echo $ac_n "checking for clock_t""... $ac_c" 1>&6
06f0b04c 4805echo "configure:4806: checking for clock_t" >&5
c1800ec8
ZW
4806if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
4807 echo $ac_n "(cached) $ac_c" 1>&6
4808else
4809
4810cat > conftest.$ac_ext <<EOF
06f0b04c 4811#line 4812 "configure"
c1800ec8
ZW
4812#include "confdefs.h"
4813
4814#include "ansidecl.h"
4815#include "system.h"
4816
4817int main() {
4818clock_t x;
4819; return 0; }
4820EOF
06f0b04c 4821if { (eval echo configure:4822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c1800ec8
ZW
4822 rm -rf conftest*
4823 gcc_cv_type_clock_t=yes
4824else
4825 echo "configure: failed program was:" >&5
4826 cat conftest.$ac_ext >&5
4827 rm -rf conftest*
4828 gcc_cv_type_clock_t=no
4829fi
4830rm -f conftest*
4831fi
4832
4833echo "$ac_t""$gcc_cv_type_clock_t" 1>&6
4834if test $gcc_cv_type_clock_t = yes; then
4835 cat >> confdefs.h <<\EOF
4836#define HAVE_CLOCK_T 1
4837EOF
4838
4839fi
4840
86cf1cbd
KG
4841# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
4842CFLAGS="$saved_CFLAGS"
81bf3d9e 4843
75923b2f
MK
4844# mkdir takes a single argument on some systems.
4845echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
06f0b04c 4846echo "configure:4847: checking if mkdir takes one argument" >&5
75923b2f
MK
4847if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
4848 echo $ac_n "(cached) $ac_c" 1>&6
4849else
4850 cat > conftest.$ac_ext <<EOF
06f0b04c 4851#line 4852 "configure"
75923b2f
MK
4852#include "confdefs.h"
4853
4854#include <sys/types.h>
4855#ifdef HAVE_SYS_STAT_H
4856# include <sys/stat.h>
4857#endif
4858#ifdef HAVE_UNISTD_H
4859# include <unistd.h>
4860#endif
4861#ifdef HAVE_DIRECT_H
4862# include <direct.h>
4863#endif
4864int main() {
4865mkdir ("foo", 0);
4866; return 0; }
4867EOF
06f0b04c 4868if { (eval echo configure:4869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
75923b2f
MK
4869 rm -rf conftest*
4870 gcc_cv_mkdir_takes_one_arg=no
4871else
4872 echo "configure: failed program was:" >&5
4873 cat conftest.$ac_ext >&5
4874 rm -rf conftest*
4875 gcc_cv_mkdir_takes_one_arg=yes
4876fi
4877rm -f conftest*
4878fi
4879
4880echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
4881if test $gcc_cv_mkdir_takes_one_arg = yes ; then
4882 cat >> confdefs.h <<\EOF
4883#define MKDIR_TAKES_ONE_ARG 1
4884EOF
4885
4886fi
4887
4888
861bb6c1
JL
4889# File extensions
4890manext='.1'
4891objext='.o'
4892
4893
4894
4895build_xm_file=
f6cb0e63 4896build_xm_defines=
861bb6c1
JL
4897build_install_headers_dir=install-headers-tar
4898build_exeext=
4899host_xm_file=
f6cb0e63 4900host_xm_defines=
861bb6c1
JL
4901host_xmake_file=
4902host_truncate_target=
6e26218f 4903host_exeext=
861bb6c1
JL
4904
4905# Decode the host machine, then the target machine.
4906# For the host machine, we save the xm_file variable as host_xm_file;
4907# then we decode the target machine and forget everything else
4908# that came from the host machine.
4909for machine in $build $host $target; do
61ed06c3 4910 . ${srcdir}/config.gcc
861bb6c1
JL
4911done
4912
4913extra_objs="${host_extra_objs} ${extra_objs}"
4914
4915# Default the target-machine variables that were not explicitly set.
75bffa71 4916if test x"$tm_file" = x
861bb6c1
JL
4917then tm_file=$cpu_type/$cpu_type.h; fi
4918
6b2adea9 4919if test x"$extra_headers" = x
861bb6c1
JL
4920then extra_headers=; fi
4921
75bffa71 4922if test x$md_file = x
e98e406f 4923then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 4924
75bffa71 4925if test x$out_file = x
861bb6c1
JL
4926then out_file=$cpu_type/$cpu_type.c; fi
4927
75bffa71 4928if test x"$tmake_file" = x
861bb6c1
JL
4929then tmake_file=$cpu_type/t-$cpu_type
4930fi
4931
90e6a802 4932if test x"$dwarf2" = xyes
756ee602 4933then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
4934fi
4935
75bffa71 4936if test x$float_format = x
861bb6c1
JL
4937then float_format=i64
4938fi
4939
027ea2a7
JW
4940if test $float_format = none
4941then float_h_file=Makefile.in
4942else float_h_file=float-$float_format.h
4943fi
4944
9fc9b82a 4945# Handle cpp installation.
3ecc3258 4946if test x$enable_cpp != xno
9fc9b82a
L
4947then
4948 tmake_file="$tmake_file t-install-cpp"
4949fi
4950
861bb6c1 4951# Say what files are being used for the output code and MD file.
11642c3a 4952echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
4953echo "Using \`$srcdir/config/$md_file' as machine description file."
4954
11642c3a 4955# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
4956# about them and drop them.
4957
11642c3a
ZW
4958bx=
4959for x in $build_xm_file; do
4960 if test -f $srcdir/config/$x
4961 then bx="$bx $x"
11642c3a
ZW
4962 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4963 fi
4964done
4965build_xm_file="$bx"
4966
4967hx=
4968for x in $host_xm_file; do
4969 if test -f $srcdir/config/$x
4970 then hx="$hx $x"
11642c3a
ZW
4971 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4972 fi
4973done
4974host_xm_file="$hx"
4975
4976tx=
4977for x in $xm_file; do
4978 if test -f $srcdir/config/$x
4979 then tx="$tx $x"
11642c3a
ZW
4980 else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2
4981 fi
4982done
4983xm_file="$tx"
4984
861bb6c1
JL
4985count=a
4986for f in $tm_file; do
4987 count=${count}x
4988done
75bffa71 4989if test $count = ax; then
861bb6c1
JL
4990 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
4991else
4992 echo "Using the following target machine macro files:"
4993 for f in $tm_file; do
4994 echo " $srcdir/config/$f"
4995 done
4996fi
4997
4998count=a
4999for f in $host_xm_file; do
5000 count=${count}x
5001done
11642c3a
ZW
5002if test $count = a; then
5003 :
5004elif test $count = ax; then
861bb6c1
JL
5005 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
5006else
5007 echo "Using the following host machine macro files:"
5008 for f in $host_xm_file; do
5009 echo " $srcdir/config/$f"
5010 done
5011fi
5012
75bffa71 5013if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
5014 count=a
5015 for f in $build_xm_file; do
5016 count=${count}x
5017 done
11642c3a
ZW
5018 if test $count = a; then
5019 :
5020 elif test $count = ax; then
861bb6c1
JL
5021 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
5022 else
5023 echo "Using the following build machine macro files:"
5024 for f in $build_xm_file; do
5025 echo " $srcdir/config/$f"
5026 done
5027 fi
5028fi
5029
75bffa71
ILT
5030if test x$thread_file = x; then
5031 if test x$target_thread_file != x; then
a851212a
JW
5032 thread_file=$target_thread_file
5033 else
5034 thread_file='single'
5035 fi
861bb6c1
JL
5036fi
5037
b7cb92ad 5038# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 5039# the first file included by config.h.
b7cb92ad 5040# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
5041# as well. If host!=build, we are in error and need to do more
5042# work to find out the build config parameters.
75bffa71 5043if test x$host = x$build
db81d74a 5044then
eaf4e618 5045 build_auto=auto-host.h
06f0b04c 5046 FORBUILD=..
b7cb92ad
JL
5047else
5048 # We create a subdir, then run autoconf in the subdir.
5049 # To prevent recursion we set host and build for the new
5050 # invocation of configure to the build for this invocation
5051 # of configure.
5052 tempdir=build.$$
5053 rm -rf $tempdir
5054 mkdir $tempdir
5055 cd $tempdir
5056 case ${srcdir} in
255b8a49 5057 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
5058 *) realsrcdir=../${srcdir};;
5059 esac
d920e825
L
5060 saved_CFLAGS="${CFLAGS}"
5061 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
5062 ${realsrcdir}/configure \
b7cb92ad 5063 --target=$target --host=$build --build=$build
d920e825 5064 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
5065
5066 # We just finished tests for the build machine, so rename
5067 # the file auto-build.h in the gcc directory.
5068 mv auto-host.h ../auto-build.h
5069 cd ..
5070 rm -rf $tempdir
eaf4e618 5071 build_auto=auto-build.h
06f0b04c 5072 FORBUILD=../$build
db81d74a
RH
5073fi
5074
06f0b04c 5075
eaf4e618 5076tm_file="${tm_file} defaults.h"
d02af173
ZW
5077host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
5078build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
5079xm_file="ansidecl.h ${xm_file} ${tm_file}"
0056a9b5 5080
861bb6c1 5081# Truncate the target if necessary
75bffa71 5082if test x$host_truncate_target != x; then
861bb6c1
JL
5083 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
5084fi
5085
f1943b77 5086# Get the version trigger filename from the toplevel
75bffa71 5087if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
5088 gcc_version_trigger=$with_gcc_version_trigger
5089else
5090 gcc_version_trigger=${srcdir}/version.c
5091fi
022dae81 5092gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 5093gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 5094
cc1e60ea 5095# Compile in configure arguments.
8105825d 5096if test -f configargs.h ; then
cc1e60ea 5097 # Being re-configured.
022dae81 5098 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
5099 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
5100else
5101 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
5102fi
5103cat > configargs.h <<EOF
5104/* Generated automatically. */
5105static const char configuration_arguments[] = "$gcc_config_arguments";
a6687d2b 5106static const char thread_model[] = "$thread_file";
cc1e60ea
JM
5107EOF
5108
ab87f8c8
JL
5109# Internationalization
5110PACKAGE=gcc
5111VERSION="$gcc_version"
5112cat >> confdefs.h <<EOF
5113#define PACKAGE "$PACKAGE"
5114EOF
861bb6c1 5115
ab87f8c8
JL
5116cat >> confdefs.h <<EOF
5117#define VERSION "$VERSION"
5118EOF
861bb6c1 5119
861bb6c1 5120
ab87f8c8
JL
5121
5122
dc6746e7 5123# Enable NLS support by default
ab87f8c8
JL
5124# Check whether --enable-nls or --disable-nls was given.
5125if test "${enable_nls+set}" = set; then
5126 enableval="$enable_nls"
5127 :
861bb6c1 5128else
dc6746e7 5129 enable_nls=yes
861bb6c1 5130fi
861bb6c1 5131
861bb6c1 5132
dc6746e7
PT
5133# if cross compiling, disable NLS support.
5134# It's not worth the trouble, at least for now.
5135
063a4b85 5136if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
dc6746e7
PT
5137 echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2
5138 enable_nls=no
5139fi
5140
861bb6c1 5141
71a94577
ZW
5142
5143echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
06f0b04c 5144echo "configure:5145: checking for library containing strerror" >&5
71a94577 5145if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
ab87f8c8
JL
5146 echo $ac_n "(cached) $ac_c" 1>&6
5147else
71a94577
ZW
5148 ac_func_search_save_LIBS="$LIBS"
5149ac_cv_search_strerror="no"
ab87f8c8 5150cat > conftest.$ac_ext <<EOF
06f0b04c 5151#line 5152 "configure"
ab87f8c8
JL
5152#include "confdefs.h"
5153/* Override any gcc2 internal prototype to avoid an error. */
5154/* We use char because int might match the return type of a gcc2
5155 builtin and then its argument prototype would still apply. */
5156char strerror();
861bb6c1 5157
ab87f8c8
JL
5158int main() {
5159strerror()
5160; return 0; }
5161EOF
06f0b04c 5162if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5163 rm -rf conftest*
71a94577 5164 ac_cv_search_strerror="none required"
ab87f8c8
JL
5165else
5166 echo "configure: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
861bb6c1 5168fi
ab87f8c8 5169rm -f conftest*
71a94577
ZW
5170test "$ac_cv_search_strerror" = "no" && for i in cposix; do
5171LIBS="-l$i $ac_func_search_save_LIBS"
5172cat > conftest.$ac_ext <<EOF
06f0b04c 5173#line 5174 "configure"
71a94577
ZW
5174#include "confdefs.h"
5175/* Override any gcc2 internal prototype to avoid an error. */
5176/* We use char because int might match the return type of a gcc2
5177 builtin and then its argument prototype would still apply. */
5178char strerror();
861bb6c1 5179
71a94577
ZW
5180int main() {
5181strerror()
5182; return 0; }
5183EOF
06f0b04c 5184if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
71a94577
ZW
5185 rm -rf conftest*
5186 ac_cv_search_strerror="-l$i"
5187break
861bb6c1 5188else
71a94577
ZW
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191fi
5192rm -f conftest*
5193done
5194LIBS="$ac_func_search_save_LIBS"
861bb6c1
JL
5195fi
5196
71a94577
ZW
5197echo "$ac_t""$ac_cv_search_strerror" 1>&6
5198if test "$ac_cv_search_strerror" != "no"; then
5199 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5200
5201else :
5202
5203fi
ab87f8c8 5204
2ce3c6c6 5205
ab87f8c8 5206echo $ac_n "checking for working const""... $ac_c" 1>&6
06f0b04c 5207echo "configure:5208: checking for working const" >&5
ab87f8c8
JL
5208if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5209 echo $ac_n "(cached) $ac_c" 1>&6
861bb6c1 5210else
ab87f8c8 5211 cat > conftest.$ac_ext <<EOF
06f0b04c 5212#line 5213 "configure"
ab87f8c8 5213#include "confdefs.h"
861bb6c1 5214
ab87f8c8
JL
5215int main() {
5216
5217/* Ultrix mips cc rejects this. */
130fadbb 5218typedef int charset[2]; const charset x;
ab87f8c8
JL
5219/* SunOS 4.1.1 cc rejects this. */
5220char const *const *ccp;
5221char **p;
5222/* NEC SVR4.0.2 mips cc rejects this. */
5223struct point {int x, y;};
5224static struct point const zero = {0,0};
5225/* AIX XL C 1.02.0.0 rejects this.
5226 It does not let you subtract one const X* pointer from another in an arm
5227 of an if-expression whose if-part is not a constant expression */
5228const char *g = "string";
5229ccp = &g + (g ? g-g : 0);
5230/* HPUX 7.0 cc rejects these. */
5231++ccp;
5232p = (char**) ccp;
5233ccp = (char const *const *) p;
5234{ /* SCO 3.2v4 cc rejects this. */
5235 char *t;
5236 char const *s = 0 ? (char *) 0 : (char const *) 0;
5237
5238 *t++ = 0;
5239}
5240{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5241 int x[] = {25, 17};
5242 const int *foo = &x[0];
5243 ++foo;
5244}
5245{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5246 typedef const int *iptr;
5247 iptr p = 0;
5248 ++p;
5249}
5250{ /* AIX XL C 1.02.0.0 rejects this saying
5251 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5252 struct s { int j; const int *ap[3]; };
5253 struct s *b; b->j = 5;
5254}
5255{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5256 const int foo = 10;
5257}
5258
5259; return 0; }
5260EOF
06f0b04c 5261if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab87f8c8
JL
5262 rm -rf conftest*
5263 ac_cv_c_const=yes
861bb6c1 5264else
ab87f8c8
JL
5265 echo "configure: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5267 rm -rf conftest*
5268 ac_cv_c_const=no
5269fi
5270rm -f conftest*
861bb6c1
JL
5271fi
5272
ab87f8c8
JL
5273echo "$ac_t""$ac_cv_c_const" 1>&6
5274if test $ac_cv_c_const = no; then
5275 cat >> confdefs.h <<\EOF
5276#define const
5277EOF
5278
861bb6c1
JL
5279fi
5280
ab87f8c8 5281echo $ac_n "checking for off_t""... $ac_c" 1>&6
06f0b04c 5282echo "configure:5283: checking for off_t" >&5
ab87f8c8
JL
5283if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
5284 echo $ac_n "(cached) $ac_c" 1>&6
5285else
5286 cat > conftest.$ac_ext <<EOF
06f0b04c 5287#line 5288 "configure"
ab87f8c8
JL
5288#include "confdefs.h"
5289#include <sys/types.h>
5290#if STDC_HEADERS
5291#include <stdlib.h>
5292#include <stddef.h>
5293#endif
5294EOF
5295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 5296 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8 5297 rm -rf conftest*
cb65112a 5298 ac_cv_type_off_t=yes
ab87f8c8
JL
5299else
5300 rm -rf conftest*
cb65112a 5301 ac_cv_type_off_t=no
ab87f8c8
JL
5302fi
5303rm -f conftest*
5304
5305fi
cb65112a
AO
5306echo "$ac_t""$ac_cv_type_off_t" 1>&6
5307if test $ac_cv_type_off_t = no; then
5308 cat >> confdefs.h <<\EOF
ab87f8c8
JL
5309#define off_t long
5310EOF
5311
5312fi
5313
5314echo $ac_n "checking for size_t""... $ac_c" 1>&6
06f0b04c 5315echo "configure:5316: checking for size_t" >&5
ab87f8c8
JL
5316if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5317 echo $ac_n "(cached) $ac_c" 1>&6
5318else
5319 cat > conftest.$ac_ext <<EOF
06f0b04c 5320#line 5321 "configure"
ab87f8c8
JL
5321#include "confdefs.h"
5322#include <sys/types.h>
5323#if STDC_HEADERS
5324#include <stdlib.h>
5325#include <stddef.h>
5326#endif
5327EOF
5328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
b27d2bd5 5329 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ab87f8c8 5330 rm -rf conftest*
cb65112a 5331 ac_cv_type_size_t=yes
ab87f8c8
JL
5332else
5333 rm -rf conftest*
cb65112a 5334 ac_cv_type_size_t=no
ab87f8c8
JL
5335fi
5336rm -f conftest*
5337
5338fi
cb65112a
AO
5339echo "$ac_t""$ac_cv_type_size_t" 1>&6
5340if test $ac_cv_type_size_t = no; then
5341 cat >> confdefs.h <<\EOF
ab87f8c8
JL
5342#define size_t unsigned
5343EOF
5344
5345fi
5346
71a94577
ZW
5347# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5348# for constant arguments. Useless!
5349echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
06f0b04c 5350echo "configure:5351: checking for working alloca.h" >&5
71a94577 5351if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
ab87f8c8
JL
5352 echo $ac_n "(cached) $ac_c" 1>&6
5353else
5354 cat > conftest.$ac_ext <<EOF
06f0b04c 5355#line 5356 "configure"
ab87f8c8 5356#include "confdefs.h"
71a94577
ZW
5357#include <alloca.h>
5358int main() {
5359char *p = alloca(2 * sizeof(int));
5360; return 0; }
ab87f8c8 5361EOF
06f0b04c 5362if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5363 rm -rf conftest*
71a94577 5364 ac_cv_header_alloca_h=yes
ab87f8c8 5365else
ab87f8c8
JL
5366 echo "configure: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5368 rm -rf conftest*
71a94577 5369 ac_cv_header_alloca_h=no
ab87f8c8
JL
5370fi
5371rm -f conftest*
5372fi
71a94577
ZW
5373
5374echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5375if test $ac_cv_header_alloca_h = yes; then
5376 cat >> confdefs.h <<\EOF
5377#define HAVE_ALLOCA_H 1
ab87f8c8 5378EOF
71a94577 5379
ab87f8c8 5380fi
ab87f8c8 5381
71a94577 5382echo $ac_n "checking for alloca""... $ac_c" 1>&6
06f0b04c 5383echo "configure:5384: checking for alloca" >&5
71a94577 5384if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
ab87f8c8
JL
5385 echo $ac_n "(cached) $ac_c" 1>&6
5386else
5387 cat > conftest.$ac_ext <<EOF
06f0b04c 5388#line 5389 "configure"
ab87f8c8 5389#include "confdefs.h"
ab87f8c8 5390
71a94577
ZW
5391#ifdef __GNUC__
5392# define alloca __builtin_alloca
ab87f8c8 5393#else
71a94577
ZW
5394# ifdef _MSC_VER
5395# include <malloc.h>
5396# define alloca _alloca
5397# else
5398# if HAVE_ALLOCA_H
5399# include <alloca.h>
5400# else
5401# ifdef _AIX
5402 #pragma alloca
5403# else
5404# ifndef alloca /* predefined by HP cc +Olibcalls */
5405char *alloca ();
5406# endif
5407# endif
5408# endif
5409# endif
ab87f8c8
JL
5410#endif
5411
71a94577
ZW
5412int main() {
5413char *p = (char *) alloca(1);
ab87f8c8
JL
5414; return 0; }
5415EOF
06f0b04c 5416if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5417 rm -rf conftest*
71a94577 5418 ac_cv_func_alloca_works=yes
ab87f8c8
JL
5419else
5420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 rm -rf conftest*
71a94577 5423 ac_cv_func_alloca_works=no
ab87f8c8
JL
5424fi
5425rm -f conftest*
5426fi
5427
71a94577
ZW
5428echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5429if test $ac_cv_func_alloca_works = yes; then
5430 cat >> confdefs.h <<\EOF
5431#define HAVE_ALLOCA 1
ab87f8c8 5432EOF
71a94577
ZW
5433
5434fi
5435
5436if test $ac_cv_func_alloca_works = no; then
5437 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5438 # that cause trouble. Some versions do not even contain alloca or
5439 # contain a buggy version. If you still want to use their alloca,
5440 # use ar to extract alloca.o from them instead of compiling alloca.c.
5441 ALLOCA=alloca.${ac_objext}
5442 cat >> confdefs.h <<\EOF
5443#define C_ALLOCA 1
5444EOF
5445
5446
5447echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
06f0b04c 5448echo "configure:5449: checking whether alloca needs Cray hooks" >&5
71a94577
ZW
5449if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5450 echo $ac_n "(cached) $ac_c" 1>&6
ab87f8c8 5451else
71a94577 5452 cat > conftest.$ac_ext <<EOF
06f0b04c 5453#line 5454 "configure"
71a94577
ZW
5454#include "confdefs.h"
5455#if defined(CRAY) && ! defined(CRAY2)
5456webecray
5457#else
5458wenotbecray
5459#endif
5460
5461EOF
5462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5463 egrep "webecray" >/dev/null 2>&1; then
5464 rm -rf conftest*
5465 ac_cv_os_cray=yes
5466else
5467 rm -rf conftest*
5468 ac_cv_os_cray=no
ab87f8c8 5469fi
71a94577 5470rm -f conftest*
ab87f8c8 5471
71a94577 5472fi
ab87f8c8 5473
71a94577
ZW
5474echo "$ac_t""$ac_cv_os_cray" 1>&6
5475if test $ac_cv_os_cray = yes; then
5476for ac_func in _getb67 GETB67 getb67; do
5477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06f0b04c 5478echo "configure:5479: checking for $ac_func" >&5
ab87f8c8
JL
5479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481else
5482 cat > conftest.$ac_ext <<EOF
06f0b04c 5483#line 5484 "configure"
ab87f8c8
JL
5484#include "confdefs.h"
5485/* System header to define __stub macros and hopefully few prototypes,
5486 which can conflict with char $ac_func(); below. */
5487#include <assert.h>
5488/* Override any gcc2 internal prototype to avoid an error. */
5489/* We use char because int might match the return type of a gcc2
5490 builtin and then its argument prototype would still apply. */
5491char $ac_func();
5492
5493int main() {
5494
5495/* The GNU C library defines this for functions which it implements
5496 to always fail with ENOSYS. Some functions are actually named
5497 something starting with __ and the normal name is an alias. */
5498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5499choke me
5500#else
99b09ff3 5501$ac_func();
ab87f8c8
JL
5502#endif
5503
5504; return 0; }
5505EOF
06f0b04c 5506if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8
JL
5507 rm -rf conftest*
5508 eval "ac_cv_func_$ac_func=yes"
5509else
5510 echo "configure: failed program was:" >&5
5511 cat conftest.$ac_ext >&5
5512 rm -rf conftest*
5513 eval "ac_cv_func_$ac_func=no"
5514fi
5515rm -f conftest*
5516fi
5517
5518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5519 echo "$ac_t""yes" 1>&6
ab87f8c8 5520 cat >> confdefs.h <<EOF
71a94577 5521#define CRAY_STACKSEG_END $ac_func
ab87f8c8 5522EOF
71a94577
ZW
5523
5524 break
ab87f8c8
JL
5525else
5526 echo "$ac_t""no" 1>&6
5527fi
ab87f8c8 5528
71a94577
ZW
5529done
5530fi
ab87f8c8 5531
71a94577 5532echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
06f0b04c 5533echo "configure:5534: checking stack direction for C alloca" >&5
71a94577 5534if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
ab87f8c8 5535 echo $ac_n "(cached) $ac_c" 1>&6
71a94577
ZW
5536else
5537 if test "$cross_compiling" = yes; then
5538 ac_cv_c_stack_direction=0
ab87f8c8
JL
5539else
5540 cat > conftest.$ac_ext <<EOF
06f0b04c 5541#line 5542 "configure"
ab87f8c8 5542#include "confdefs.h"
71a94577
ZW
5543find_stack_direction ()
5544{
5545 static char *addr = 0;
5546 auto char dummy;
5547 if (addr == 0)
5548 {
5549 addr = &dummy;
5550 return find_stack_direction ();
5551 }
5552 else
5553 return (&dummy > addr) ? 1 : -1;
5554}
5555main ()
5556{
5557 exit (find_stack_direction() < 0);
5558}
ab87f8c8 5559EOF
06f0b04c 5560if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
71a94577
ZW
5561then
5562 ac_cv_c_stack_direction=1
ab87f8c8
JL
5563else
5564 echo "configure: failed program was:" >&5
5565 cat conftest.$ac_ext >&5
71a94577
ZW
5566 rm -fr conftest*
5567 ac_cv_c_stack_direction=-1
ab87f8c8 5568fi
71a94577 5569rm -fr conftest*
ab87f8c8
JL
5570fi
5571
71a94577
ZW
5572fi
5573
5574echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5575cat >> confdefs.h <<EOF
5576#define STACK_DIRECTION $ac_cv_c_stack_direction
ab87f8c8
JL
5577EOF
5578
ab87f8c8
JL
5579fi
5580
ab87f8c8 5581
71a94577 5582 echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
06f0b04c 5583echo "configure:5584: checking whether we are using the GNU C Library 2.1 or newer" >&5
71a94577
ZW
5584if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
5585 echo $ac_n "(cached) $ac_c" 1>&6
5586else
5587 cat > conftest.$ac_ext <<EOF
06f0b04c 5588#line 5589 "configure"
71a94577 5589#include "confdefs.h"
ab87f8c8 5590
71a94577
ZW
5591#include <features.h>
5592#ifdef __GNU_LIBRARY__
5593 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5594 Lucky GNU user
5595 #endif
5596#endif
5597
ab87f8c8 5598EOF
71a94577
ZW
5599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5600 egrep "Lucky GNU user" >/dev/null 2>&1; then
5601 rm -rf conftest*
5602 ac_cv_gnu_library_2_1=yes
ab87f8c8 5603else
71a94577
ZW
5604 rm -rf conftest*
5605 ac_cv_gnu_library_2_1=no
ab87f8c8 5606fi
71a94577 5607rm -f conftest*
ab87f8c8 5608
71a94577
ZW
5609
5610
5611fi
ab87f8c8 5612
71a94577
ZW
5613echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
5614
5615 GLIBC21="$ac_cv_gnu_library_2_1"
5616
ab87f8c8 5617
71a94577
ZW
5618
5619 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5620stdlib.h string.h unistd.h sys/param.h
5621do
5622ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5623echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
06f0b04c 5624echo "configure:5625: checking for $ac_hdr" >&5
ab87f8c8
JL
5625if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5626 echo $ac_n "(cached) $ac_c" 1>&6
5627else
5628 cat > conftest.$ac_ext <<EOF
06f0b04c 5629#line 5630 "configure"
ab87f8c8 5630#include "confdefs.h"
71a94577 5631#include <$ac_hdr>
ab87f8c8
JL
5632EOF
5633ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06f0b04c 5634{ (eval echo configure:5635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
cd9e5e7c 5635ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ab87f8c8
JL
5636if test -z "$ac_err"; then
5637 rm -rf conftest*
5638 eval "ac_cv_header_$ac_safe=yes"
5639else
5640 echo "$ac_err" >&5
5641 echo "configure: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5643 rm -rf conftest*
5644 eval "ac_cv_header_$ac_safe=no"
5645fi
5646rm -f conftest*
5647fi
5648if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5649 echo "$ac_t""yes" 1>&6
71a94577
ZW
5650 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5651 cat >> confdefs.h <<EOF
5652#define $ac_tr_hdr 1
ab87f8c8 5653EOF
71a94577 5654
ab87f8c8 5655else
71a94577 5656 echo "$ac_t""no" 1>&6
ab87f8c8 5657fi
71a94577 5658done
ab87f8c8 5659
71a94577
ZW
5660 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5661getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5662strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5663do
5664echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06f0b04c 5665echo "configure:5666: checking for $ac_func" >&5
71a94577 5666if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
ab87f8c8
JL
5667 echo $ac_n "(cached) $ac_c" 1>&6
5668else
71a94577 5669 cat > conftest.$ac_ext <<EOF
06f0b04c 5670#line 5671 "configure"
ab87f8c8 5671#include "confdefs.h"
71a94577
ZW
5672/* System header to define __stub macros and hopefully few prototypes,
5673 which can conflict with char $ac_func(); below. */
5674#include <assert.h>
ab87f8c8
JL
5675/* Override any gcc2 internal prototype to avoid an error. */
5676/* We use char because int might match the return type of a gcc2
5677 builtin and then its argument prototype would still apply. */
71a94577 5678char $ac_func();
ab87f8c8
JL
5679
5680int main() {
71a94577
ZW
5681
5682/* The GNU C library defines this for functions which it implements
5683 to always fail with ENOSYS. Some functions are actually named
5684 something starting with __ and the normal name is an alias. */
5685#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5686choke me
5687#else
5688$ac_func();
5689#endif
5690
ab87f8c8
JL
5691; return 0; }
5692EOF
06f0b04c 5693if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5694 rm -rf conftest*
71a94577 5695 eval "ac_cv_func_$ac_func=yes"
ab87f8c8
JL
5696else
5697 echo "configure: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5699 rm -rf conftest*
71a94577 5700 eval "ac_cv_func_$ac_func=no"
ab87f8c8
JL
5701fi
5702rm -f conftest*
ab87f8c8 5703fi
71a94577
ZW
5704
5705if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
ab87f8c8 5706 echo "$ac_t""yes" 1>&6
71a94577
ZW
5707 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5708 cat >> confdefs.h <<EOF
5709#define $ac_tr_func 1
5710EOF
5711
ab87f8c8 5712else
71a94577
ZW
5713 echo "$ac_t""no" 1>&6
5714fi
5715done
5716
5717
5718
5719
5720 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5721if test "${with_libiconv_prefix+set}" = set; then
5722 withval="$with_libiconv_prefix"
5723
5724 for dir in `echo "$withval" | tr : ' '`; do
5725 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5726 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
5727 done
5728
5729fi
ab87f8c8 5730
71a94577
ZW
5731
5732 echo $ac_n "checking for iconv""... $ac_c" 1>&6
06f0b04c 5733echo "configure:5734: checking for iconv" >&5
71a94577
ZW
5734if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
5736else
5737
5738 am_cv_func_iconv="no, consider installing GNU libiconv"
5739 am_cv_lib_iconv=no
5740 cat > conftest.$ac_ext <<EOF
06f0b04c 5741#line 5742 "configure"
71a94577
ZW
5742#include "confdefs.h"
5743#include <stdlib.h>
5744#include <iconv.h>
ab87f8c8 5745int main() {
71a94577
ZW
5746iconv_t cd = iconv_open("","");
5747 iconv(cd,NULL,NULL,NULL,NULL);
5748 iconv_close(cd);
ab87f8c8
JL
5749; return 0; }
5750EOF
06f0b04c 5751if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5752 rm -rf conftest*
71a94577 5753 am_cv_func_iconv=yes
ab87f8c8
JL
5754else
5755 echo "configure: failed program was:" >&5
5756 cat conftest.$ac_ext >&5
ab87f8c8
JL
5757fi
5758rm -f conftest*
71a94577
ZW
5759 if test "$am_cv_func_iconv" != yes; then
5760 am_save_LIBS="$LIBS"
5761 LIBS="$LIBS -liconv"
5762 cat > conftest.$ac_ext <<EOF
06f0b04c 5763#line 5764 "configure"
71a94577
ZW
5764#include "confdefs.h"
5765#include <stdlib.h>
5766#include <iconv.h>
5767int main() {
5768iconv_t cd = iconv_open("","");
5769 iconv(cd,NULL,NULL,NULL,NULL);
5770 iconv_close(cd);
5771; return 0; }
5772EOF
06f0b04c 5773if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
71a94577
ZW
5774 rm -rf conftest*
5775 am_cv_lib_iconv=yes
5776 am_cv_func_iconv=yes
ab87f8c8 5777else
71a94577
ZW
5778 echo "configure: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
ab87f8c8 5780fi
71a94577
ZW
5781rm -f conftest*
5782 LIBS="$am_save_LIBS"
5783 fi
5784
ab87f8c8
JL
5785fi
5786
71a94577
ZW
5787echo "$ac_t""$am_cv_func_iconv" 1>&6
5788 if test "$am_cv_func_iconv" = yes; then
5789 cat >> confdefs.h <<\EOF
5790#define HAVE_ICONV 1
5791EOF
5792
5793 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
06f0b04c 5794echo "configure:5795: checking for iconv declaration" >&5
71a94577
ZW
5795 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5796 echo $ac_n "(cached) $ac_c" 1>&6
ab87f8c8 5797else
71a94577
ZW
5798
5799 cat > conftest.$ac_ext <<EOF
06f0b04c 5800#line 5801 "configure"
71a94577 5801#include "confdefs.h"
ab87f8c8 5802
71a94577
ZW
5803#include <stdlib.h>
5804#include <iconv.h>
5805extern
5806#ifdef __cplusplus
5807"C"
5808#endif
5809#if defined(__STDC__) || defined(__cplusplus)
5810size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5811#else
5812size_t iconv();
5813#endif
ab87f8c8 5814
71a94577 5815int main() {
380a627a 5816
71a94577 5817; return 0; }
ab87f8c8 5818EOF
06f0b04c 5819if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
71a94577
ZW
5820 rm -rf conftest*
5821 am_cv_proto_iconv_arg1=""
ab87f8c8 5822else
71a94577
ZW
5823 echo "configure: failed program was:" >&5
5824 cat conftest.$ac_ext >&5
5825 rm -rf conftest*
5826 am_cv_proto_iconv_arg1="const"
ab87f8c8 5827fi
71a94577
ZW
5828rm -f conftest*
5829 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);"
ab87f8c8 5830fi
71a94577
ZW
5831
5832 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5833 echo "$ac_t""${ac_t:-
5834 }$am_cv_proto_iconv" 1>&6
5835 cat >> confdefs.h <<EOF
5836#define ICONV_CONST $am_cv_proto_iconv_arg1
5837EOF
5838
5839 fi
5840 LIBICONV=
5841 if test "$am_cv_lib_iconv" = yes; then
5842 LIBICONV="-liconv"
5843 fi
5844
5845
5846
5847 echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
06f0b04c 5848echo "configure:5849: checking for nl_langinfo and CODESET" >&5
71a94577 5849if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
ab87f8c8
JL
5850 echo $ac_n "(cached) $ac_c" 1>&6
5851else
5852 cat > conftest.$ac_ext <<EOF
06f0b04c 5853#line 5854 "configure"
ab87f8c8 5854#include "confdefs.h"
71a94577 5855#include <langinfo.h>
ab87f8c8 5856int main() {
71a94577 5857char* cs = nl_langinfo(CODESET);
ab87f8c8
JL
5858; return 0; }
5859EOF
06f0b04c 5860if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 5861 rm -rf conftest*
71a94577 5862 am_cv_langinfo_codeset=yes
ab87f8c8
JL
5863else
5864 echo "configure: failed program was:" >&5
5865 cat conftest.$ac_ext >&5
5866 rm -rf conftest*
71a94577 5867 am_cv_langinfo_codeset=no
ab87f8c8
JL
5868fi
5869rm -f conftest*
71a94577 5870
ab87f8c8
JL
5871fi
5872
71a94577
ZW
5873echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
5874 if test $am_cv_langinfo_codeset = yes; then
5875 cat >> confdefs.h <<\EOF
5876#define HAVE_LANGINFO_CODESET 1
ab87f8c8 5877EOF
ab87f8c8 5878
71a94577
ZW
5879 fi
5880
5881 if test $ac_cv_header_locale_h = yes; then
5882 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
06f0b04c 5883echo "configure:5884: checking for LC_MESSAGES" >&5
71a94577 5884if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
ab87f8c8
JL
5885 echo $ac_n "(cached) $ac_c" 1>&6
5886else
71a94577 5887 cat > conftest.$ac_ext <<EOF
06f0b04c 5888#line 5889 "configure"
71a94577
ZW
5889#include "confdefs.h"
5890#include <locale.h>
5891int main() {
5892return LC_MESSAGES
5893; return 0; }
5894EOF
06f0b04c 5895if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
71a94577
ZW
5896 rm -rf conftest*
5897 am_cv_val_LC_MESSAGES=yes
5898else
5899 echo "configure: failed program was:" >&5
5900 cat conftest.$ac_ext >&5
5901 rm -rf conftest*
5902 am_cv_val_LC_MESSAGES=no
5903fi
5904rm -f conftest*
5905fi
5906
5907echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5908 if test $am_cv_val_LC_MESSAGES = yes; then
5909 cat >> confdefs.h <<\EOF
5910#define HAVE_LC_MESSAGES 1
5911EOF
5912
ab87f8c8 5913 fi
71a94577
ZW
5914 fi
5915 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
06f0b04c 5916echo "configure:5917: checking whether NLS is requested" >&5
71a94577
ZW
5917 # Check whether --enable-nls or --disable-nls was given.
5918if test "${enable_nls+set}" = set; then
5919 enableval="$enable_nls"
5920 USE_NLS=$enableval
5921else
5922 USE_NLS=yes
ab87f8c8 5923fi
71a94577
ZW
5924
5925 echo "$ac_t""$USE_NLS" 1>&6
5926
5927
5928 BUILD_INCLUDED_LIBINTL=no
5929 USE_INCLUDED_LIBINTL=no
5930 INTLLIBS=
77c06844 5931 INTLDEPS=
71a94577
ZW
5932
5933 if test "$USE_NLS" = "yes"; then
5934 cat >> confdefs.h <<\EOF
5935#define ENABLE_NLS 1
5936EOF
5937
5938 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
06f0b04c 5939echo "configure:5940: checking whether included gettext is requested" >&5
71a94577
ZW
5940 # Check whether --with-included-gettext or --without-included-gettext was given.
5941if test "${with_included_gettext+set}" = set; then
5942 withval="$with_included_gettext"
5943 nls_cv_force_use_gnu_gettext=$withval
ab87f8c8 5944else
71a94577 5945 nls_cv_force_use_gnu_gettext=no
ab87f8c8
JL
5946fi
5947
71a94577
ZW
5948 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
5949
5950 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5951 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5952 CATOBJEXT=NONE
5953
5954
5955
5956
5957 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
5958echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
06f0b04c 5959echo "configure:5960: checking for libintl.h" >&5
71a94577 5960if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
ab87f8c8
JL
5961 echo $ac_n "(cached) $ac_c" 1>&6
5962else
71a94577 5963 cat > conftest.$ac_ext <<EOF
06f0b04c 5964#line 5965 "configure"
71a94577
ZW
5965#include "confdefs.h"
5966#include <libintl.h>
5967EOF
5968ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
06f0b04c 5969{ (eval echo configure:5970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
71a94577
ZW
5970ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5971if test -z "$ac_err"; then
5972 rm -rf conftest*
5973 eval "ac_cv_header_$ac_safe=yes"
ab87f8c8 5974else
71a94577
ZW
5975 echo "$ac_err" >&5
5976 echo "configure: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5978 rm -rf conftest*
5979 eval "ac_cv_header_$ac_safe=no"
ab87f8c8 5980fi
71a94577
ZW
5981rm -f conftest*
5982fi
5983if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5984 echo "$ac_t""yes" 1>&6
191bf464
ZW
5985 cat >> confdefs.h <<\EOF
5986#define HAVE_LIBINTL_H 1
5987EOF
5988
5989 echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
06f0b04c 5990echo "configure:5991: checking for GNU gettext in libc" >&5
71a94577
ZW
5991if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
5992 echo $ac_n "(cached) $ac_c" 1>&6
5993else
5994 cat > conftest.$ac_ext <<EOF
06f0b04c 5995#line 5996 "configure"
ab87f8c8 5996#include "confdefs.h"
71a94577 5997#include <libintl.h>
ab87f8c8 5998extern int _nl_msg_cat_cntr;
71a94577
ZW
5999int main() {
6000bindtextdomain ("", "");
6001return (int) gettext ("") + _nl_msg_cat_cntr
ab87f8c8
JL
6002; return 0; }
6003EOF
06f0b04c 6004if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 6005 rm -rf conftest*
71a94577 6006 gt_cv_func_gnugettext1_libc=yes
ab87f8c8
JL
6007else
6008 echo "configure: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
6010 rm -rf conftest*
71a94577 6011 gt_cv_func_gnugettext1_libc=no
ab87f8c8
JL
6012fi
6013rm -f conftest*
ab87f8c8
JL
6014fi
6015
71a94577 6016echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
ab87f8c8 6017
71a94577
ZW
6018 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
6019 echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
06f0b04c 6020echo "configure:6021: checking for GNU gettext in libintl" >&5
71a94577 6021if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
ab87f8c8
JL
6022 echo $ac_n "(cached) $ac_c" 1>&6
6023else
71a94577
ZW
6024 gt_save_LIBS="$LIBS"
6025 LIBS="$LIBS -lintl $LIBICONV"
6026 cat > conftest.$ac_ext <<EOF
06f0b04c 6027#line 6028 "configure"
ab87f8c8 6028#include "confdefs.h"
71a94577
ZW
6029#include <libintl.h>
6030extern int _nl_msg_cat_cntr;
ab87f8c8 6031int main() {
71a94577
ZW
6032bindtextdomain ("", "");
6033return (int) gettext ("") + _nl_msg_cat_cntr
ab87f8c8
JL
6034; return 0; }
6035EOF
06f0b04c 6036if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 6037 rm -rf conftest*
71a94577 6038 gt_cv_func_gnugettext1_libintl=yes
ab87f8c8
JL
6039else
6040 echo "configure: failed program was:" >&5
6041 cat conftest.$ac_ext >&5
6042 rm -rf conftest*
71a94577 6043 gt_cv_func_gnugettext1_libintl=no
ab87f8c8
JL
6044fi
6045rm -f conftest*
71a94577 6046 LIBS="$gt_save_LIBS"
ab87f8c8 6047fi
71a94577
ZW
6048
6049echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
6050 fi
6051
6052 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
6053 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
6054 && test "$PACKAGE" != gettext; }; then
6055 cat >> confdefs.h <<\EOF
6056#define HAVE_GETTEXT 1
ab87f8c8
JL
6057EOF
6058
ab87f8c8 6059
71a94577
ZW
6060 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
6061 INTLLIBS="-lintl $LIBICONV"
6062 fi
ab87f8c8 6063
71a94577
ZW
6064 gt_save_LIBS="$LIBS"
6065 LIBS="$LIBS $INTLLIBS"
6066 for ac_func in dcgettext
6067do
6068echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
06f0b04c 6069echo "configure:6070: checking for $ac_func" >&5
71a94577 6070if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
ab87f8c8
JL
6071 echo $ac_n "(cached) $ac_c" 1>&6
6072else
6073 cat > conftest.$ac_ext <<EOF
06f0b04c 6074#line 6075 "configure"
ab87f8c8
JL
6075#include "confdefs.h"
6076/* System header to define __stub macros and hopefully few prototypes,
71a94577 6077 which can conflict with char $ac_func(); below. */
ab87f8c8
JL
6078#include <assert.h>
6079/* Override any gcc2 internal prototype to avoid an error. */
6080/* We use char because int might match the return type of a gcc2
6081 builtin and then its argument prototype would still apply. */
71a94577 6082char $ac_func();
ab87f8c8
JL
6083
6084int main() {
6085
6086/* The GNU C library defines this for functions which it implements
6087 to always fail with ENOSYS. Some functions are actually named
6088 something starting with __ and the normal name is an alias. */
71a94577 6089#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
ab87f8c8
JL
6090choke me
6091#else
71a94577 6092$ac_func();
ab87f8c8
JL
6093#endif
6094
6095; return 0; }
6096EOF
06f0b04c 6097if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ab87f8c8 6098 rm -rf conftest*
71a94577 6099 eval "ac_cv_func_$ac_func=yes"
ab87f8c8
JL
6100else
6101 echo "configure: failed program was:" >&5
6102 cat conftest.$ac_ext >&5
6103 rm -rf conftest*
71a94577 6104 eval "ac_cv_func_$ac_func=no"
ab87f8c8
JL
6105fi
6106rm -f conftest*
6107fi
6108
71a94577 6109if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
ab87f8c8 6110 echo "$ac_t""yes" 1>&6
71a94577
ZW
6111 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6112 cat >> confdefs.h <<EOF
6113#define $ac_tr_func 1
ab87f8c8 6114EOF
71a94577
ZW
6115
6116else
6117 echo "$ac_t""no" 1>&6
6118fi
6119done
ab87f8c8 6120
71a94577
ZW
6121 LIBS="$gt_save_LIBS"
6122
6123 # Extract the first word of "msgfmt", so it can be a program name with args.
6124set dummy msgfmt; ac_word=$2
ab87f8c8 6125echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6126echo "configure:6127: checking for $ac_word" >&5
71a94577 6127if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
6128 echo $ac_n "(cached) $ac_c" 1>&6
6129else
71a94577 6130 case "$MSGFMT" in
ab87f8c8 6131 /*)
71a94577 6132 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
6133 ;;
6134 *)
71a94577
ZW
6135 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6136 for ac_dir in $PATH; do
ab87f8c8
JL
6137 test -z "$ac_dir" && ac_dir=.
6138 if test -f $ac_dir/$ac_word; then
71a94577
ZW
6139 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6140 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6141 break
6142 fi
ab87f8c8
JL
6143 fi
6144 done
6145 IFS="$ac_save_ifs"
71a94577 6146 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
ab87f8c8
JL
6147 ;;
6148esac
6149fi
71a94577
ZW
6150MSGFMT="$ac_cv_path_MSGFMT"
6151if test "$MSGFMT" != ":"; then
6152 echo "$ac_t""$MSGFMT" 1>&6
ab87f8c8
JL
6153else
6154 echo "$ac_t""no" 1>&6
6155fi
71a94577
ZW
6156
6157 # Extract the first word of "gmsgfmt", so it can be a program name with args.
ab87f8c8
JL
6158set dummy gmsgfmt; ac_word=$2
6159echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6160echo "configure:6161: checking for $ac_word" >&5
71a94577 6161if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
6162 echo $ac_n "(cached) $ac_c" 1>&6
6163else
6164 case "$GMSGFMT" in
6165 /*)
71a94577 6166 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
6167 ;;
6168 ?:/*)
71a94577 6169 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
ab87f8c8
JL
6170 ;;
6171 *)
cd9e5e7c 6172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
6173 ac_dummy="$PATH"
6174 for ac_dir in $ac_dummy; do
ab87f8c8
JL
6175 test -z "$ac_dir" && ac_dir=.
6176 if test -f $ac_dir/$ac_word; then
71a94577 6177 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
6178 break
6179 fi
6180 done
6181 IFS="$ac_save_ifs"
71a94577 6182 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
ab87f8c8
JL
6183 ;;
6184esac
6185fi
71a94577 6186GMSGFMT="$ac_cv_path_GMSGFMT"
ab87f8c8
JL
6187if test -n "$GMSGFMT"; then
6188 echo "$ac_t""$GMSGFMT" 1>&6
6189else
6190 echo "$ac_t""no" 1>&6
6191fi
6192
ab87f8c8 6193
71a94577 6194 # Extract the first word of "xgettext", so it can be a program name with args.
ab87f8c8
JL
6195set dummy xgettext; ac_word=$2
6196echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6197echo "configure:6198: checking for $ac_word" >&5
71a94577 6198if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
ab87f8c8
JL
6199 echo $ac_n "(cached) $ac_c" 1>&6
6200else
6201 case "$XGETTEXT" in
6202 /*)
71a94577 6203 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
ab87f8c8
JL
6204 ;;
6205 *)
6206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6207 for ac_dir in $PATH; do
6208 test -z "$ac_dir" && ac_dir=.
6209 if test -f $ac_dir/$ac_word; then
71a94577
ZW
6210 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6211 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
ab87f8c8
JL
6212 break
6213 fi
6214 fi
6215 done
6216 IFS="$ac_save_ifs"
71a94577 6217 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
ab87f8c8
JL
6218 ;;
6219esac
6220fi
71a94577
ZW
6221XGETTEXT="$ac_cv_path_XGETTEXT"
6222if test "$XGETTEXT" != ":"; then
ab87f8c8
JL
6223 echo "$ac_t""$XGETTEXT" 1>&6
6224else
6225 echo "$ac_t""no" 1>&6
6226fi
6227
71a94577
ZW
6228
6229 CATOBJEXT=.gmo
6230 fi
6231
ab87f8c8
JL
6232else
6233 echo "$ac_t""no" 1>&6
6234fi
6235
ab87f8c8
JL
6236
6237 if test "$CATOBJEXT" = "NONE"; then
6238 nls_cv_use_gnu_gettext=yes
6239 fi
6240 fi
6241
6242 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6243 INTLOBJS="\$(GETTOBJS)"
6244 # Extract the first word of "msgfmt", so it can be a program name with args.
6245set dummy msgfmt; ac_word=$2
6246echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6247echo "configure:6248: checking for $ac_word" >&5
71a94577 6248if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
6249 echo $ac_n "(cached) $ac_c" 1>&6
6250else
6251 case "$MSGFMT" in
6252 /*)
71a94577 6253 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
6254 ;;
6255 *)
6256 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6257 for ac_dir in $PATH; do
6258 test -z "$ac_dir" && ac_dir=.
6259 if test -f $ac_dir/$ac_word; then
71a94577
ZW
6260 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
6261 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
6262 break
6263 fi
6264 fi
6265 done
6266 IFS="$ac_save_ifs"
71a94577 6267 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
ab87f8c8
JL
6268 ;;
6269esac
6270fi
71a94577
ZW
6271MSGFMT="$ac_cv_path_MSGFMT"
6272if test "$MSGFMT" != ":"; then
ab87f8c8
JL
6273 echo "$ac_t""$MSGFMT" 1>&6
6274else
6275 echo "$ac_t""no" 1>&6
6276fi
6277
6278 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6279set dummy gmsgfmt; ac_word=$2
6280echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6281echo "configure:6282: checking for $ac_word" >&5
71a94577 6282if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
ab87f8c8
JL
6283 echo $ac_n "(cached) $ac_c" 1>&6
6284else
6285 case "$GMSGFMT" in
6286 /*)
71a94577 6287 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
ab87f8c8
JL
6288 ;;
6289 ?:/*)
71a94577 6290 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
ab87f8c8
JL
6291 ;;
6292 *)
cd9e5e7c 6293 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
b27d2bd5
MK
6294 ac_dummy="$PATH"
6295 for ac_dir in $ac_dummy; do
ab87f8c8
JL
6296 test -z "$ac_dir" && ac_dir=.
6297 if test -f $ac_dir/$ac_word; then
71a94577 6298 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
ab87f8c8
JL
6299 break
6300 fi
6301 done
6302 IFS="$ac_save_ifs"
71a94577 6303 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
ab87f8c8
JL
6304 ;;
6305esac
6306fi
71a94577 6307GMSGFMT="$ac_cv_path_GMSGFMT"
ab87f8c8
JL
6308if test -n "$GMSGFMT"; then
6309 echo "$ac_t""$GMSGFMT" 1>&6
6310else
6311 echo "$ac_t""no" 1>&6
6312fi
6313
6314 # Extract the first word of "xgettext", so it can be a program name with args.
6315set dummy xgettext; ac_word=$2
6316echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6317echo "configure:6318: checking for $ac_word" >&5
71a94577 6318if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
ab87f8c8
JL
6319 echo $ac_n "(cached) $ac_c" 1>&6
6320else
6321 case "$XGETTEXT" in
6322 /*)
71a94577 6323 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
ab87f8c8
JL
6324 ;;
6325 *)
6326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6327 for ac_dir in $PATH; do
6328 test -z "$ac_dir" && ac_dir=.
6329 if test -f $ac_dir/$ac_word; then
71a94577
ZW
6330 if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
6331 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
ab87f8c8
JL
6332 break
6333 fi
6334 fi
6335 done
6336 IFS="$ac_save_ifs"
71a94577 6337 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
ab87f8c8
JL
6338 ;;
6339esac
6340fi
71a94577
ZW
6341XGETTEXT="$ac_cv_path_XGETTEXT"
6342if test "$XGETTEXT" != ":"; then
ab87f8c8
JL
6343 echo "$ac_t""$XGETTEXT" 1>&6
6344else
6345 echo "$ac_t""no" 1>&6
6346fi
6347
6348
71a94577 6349 BUILD_INCLUDED_LIBINTL=yes
ab87f8c8
JL
6350 USE_INCLUDED_LIBINTL=yes
6351 CATOBJEXT=.gmo
71a94577 6352 INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
77c06844 6353 INTLDEPS="\$(top_builddir)/intl/libintl.a"
71a94577
ZW
6354 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6355 fi
6356
6357 if test "$GMSGFMT" != ":"; then
6358 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6359 : ;
6360 else
6361 echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
6362 GMSGFMT=":"
6363 fi
ab87f8c8
JL
6364 fi
6365
71a94577
ZW
6366 if test "$XGETTEXT" != ":"; then
6367 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
ab87f8c8
JL
6368 : ;
6369 else
6370 echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
6371 XGETTEXT=":"
6372 fi
6373 fi
6374
71a94577
ZW
6375 POSUB=po
6376 fi
6377
17297c41
PT
6378
6379
71a94577
ZW
6380 if test "$PACKAGE" = gettext; then
6381 BUILD_INCLUDED_LIBINTL=yes
ab87f8c8 6382 fi
ab87f8c8 6383
71a94577
ZW
6384 for ac_prog in bison
6385do
6386# Extract the first word of "$ac_prog", so it can be a program name with args.
6387set dummy $ac_prog; ac_word=$2
6388echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
06f0b04c 6389echo "configure:6390: checking for $ac_word" >&5
71a94577
ZW
6390if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
6391 echo $ac_n "(cached) $ac_c" 1>&6
6392else
6393 if test -n "$INTLBISON"; then
6394 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
6395else
6396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6397 ac_dummy="$PATH"
6398 for ac_dir in $ac_dummy; do
6399 test -z "$ac_dir" && ac_dir=.
6400 if test -f $ac_dir/$ac_word; then
6401 ac_cv_prog_INTLBISON="$ac_prog"
6402 break
6403 fi
6404 done
6405 IFS="$ac_save_ifs"
6406fi
6407fi
6408INTLBISON="$ac_cv_prog_INTLBISON"
6409if test -n "$INTLBISON"; then
6410 echo "$ac_t""$INTLBISON" 1>&6
6411else
6412 echo "$ac_t""no" 1>&6
6413fi
6414
6415test -n "$INTLBISON" && break
6416done
ab87f8c8 6417
71a94577
ZW
6418 if test -z "$INTLBISON"; then
6419 ac_verc_fail=yes
6420 else
6421 echo $ac_n "checking version of bison""... $ac_c" 1>&6
06f0b04c 6422echo "configure:6423: checking version of bison" >&5
71a94577
ZW
6423 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6424 case $ac_prog_version in
6425 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6426 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6427 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6428 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6429 esac
6430 echo "$ac_t""$ac_prog_version" 1>&6
6431 fi
6432 if test $ac_verc_fail = yes; then
6433 INTLBISON=:
ab87f8c8
JL
6434 fi
6435
ab87f8c8 6436
9f6682b7 6437
ab87f8c8
JL
6438
6439
6440
6441
6442
6443
77c06844 6444
191bf464
ZW
6445 if test $USE_INCLUDED_LIBINTL = yes; then
6446 cat >> confdefs.h <<\EOF
6447#define USE_INCLUDED_LIBINTL 1
6448EOF
6449
6450 fi
71a94577
ZW
6451
6452 nls_cv_header_intl=
6453 nls_cv_header_libgt=
6454
6455 DATADIRNAME=share
ab87f8c8 6456
71a94577
ZW
6457
6458 INSTOBJEXT=.mo
ab87f8c8 6459
ab87f8c8 6460
71a94577
ZW
6461 GENCAT=gencat
6462
6463
9fdf713f 6464
9f6682b7
ZW
6465 if test "x$CATOBJEXT" != x; then
6466 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
06f0b04c 6467echo "configure:6468: checking for catalogs to be installed" >&5
9f6682b7
ZW
6468 # Look for .po and .gmo files in the source directory.
6469 CATALOGS=
6470 XLINGUAS=
6471 for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do
6472 # If there aren't any .gmo files the shell will give us the
6473 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6474 # weeded out.
6475 case "$cat" in *\**)
6476 continue;;
6477 esac
6478 # The quadruple backslash is collapsed to a double backslash
6479 # by the backticks, then collapsed again by the double quotes,
6480 # leaving us with one backslash in the sed expression (right
6481 # before the dot that mustn't act as a wildcard). The dot to
6482 # be escaped in the second expression is hiding inside CATOBJEXT.
6483 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"`
6484 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"`
6485 # The user is allowed to set LINGUAS to a list of languages to
6486 # install catalogs for. If it's empty that means "all of them."
6487 if test "x$LINGUAS" = x; then
6488 CATALOGS="$CATALOGS $cat"
6489 XLINGUAS="$XLINGUAS $lang"
6490 else
6491 case "$LINGUAS" in *$lang*)
6492 CATALOGS="$CATALOGS $cat"
6493 XLINGUAS="$XLINGUAS $lang"
6494 ;;
6495 esac
6496 fi
6497 done
6498 LINGUAS="$XLINGUAS"
6499 echo "$ac_t""$LINGUAS" 1>&6
ab87f8c8
JL
6500 fi
6501
ab87f8c8
JL
6502 MKINSTALLDIRS=
6503 if test -n "$ac_aux_dir"; then
6504 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6505 fi
6506 if test -z "$MKINSTALLDIRS"; then
6507 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6508 fi
6509
6510
71a94577 6511 INTL_LIBTOOL_SUFFIX_PREFIX=
ab87f8c8 6512
ab87f8c8 6513
ab87f8c8 6514
f4ab28e3
MK
6515# Windows32 Registry support for specifying GCC installation paths.
6516# Check whether --enable-win32-registry or --disable-win32-registry was given.
6517if test "${enable_win32_registry+set}" = set; then
6518 enableval="$enable_win32_registry"
6519 :
6520fi
6521
4e70264f
ZW
6522case $host_os in
6523 win32 | pe | cygwin* | mingw32* | uwin*)
f4ab28e3 6524echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
06f0b04c 6525echo "configure:6526: checking whether windows registry support is requested" >&5
9dd53f2c 6526if test "x$enable_win32_registry" != xno; then
f4ab28e3
MK
6527 cat >> confdefs.h <<\EOF
6528#define ENABLE_WIN32_REGISTRY 1
6529EOF
6530
6531 echo "$ac_t""yes" 1>&6
4e70264f
ZW
6532
6533echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
06f0b04c 6534echo "configure:6535: checking for library containing RegOpenKeyExA" >&5
4e70264f
ZW
6535if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
6536 echo $ac_n "(cached) $ac_c" 1>&6
6537else
6538 ac_func_search_save_LIBS="$LIBS"
6539ac_cv_search_RegOpenKeyExA="no"
6540cat > conftest.$ac_ext <<EOF
06f0b04c 6541#line 6542 "configure"
4e70264f
ZW
6542#include "confdefs.h"
6543/* Override any gcc2 internal prototype to avoid an error. */
6544/* We use char because int might match the return type of a gcc2
6545 builtin and then its argument prototype would still apply. */
6546char RegOpenKeyExA();
6547
6548int main() {
6549RegOpenKeyExA()
6550; return 0; }
6551EOF
06f0b04c 6552if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4e70264f
ZW
6553 rm -rf conftest*
6554 ac_cv_search_RegOpenKeyExA="none required"
6555else
6556 echo "configure: failed program was:" >&5
6557 cat conftest.$ac_ext >&5
6558fi
6559rm -f conftest*
6560test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
6561LIBS="-l$i $ac_func_search_save_LIBS"
6562cat > conftest.$ac_ext <<EOF
06f0b04c 6563#line 6564 "configure"
4e70264f
ZW
6564#include "confdefs.h"
6565/* Override any gcc2 internal prototype to avoid an error. */
6566/* We use char because int might match the return type of a gcc2
6567 builtin and then its argument prototype would still apply. */
6568char RegOpenKeyExA();
6569
6570int main() {
6571RegOpenKeyExA()
6572; return 0; }
6573EOF
06f0b04c 6574if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4e70264f
ZW
6575 rm -rf conftest*
6576 ac_cv_search_RegOpenKeyExA="-l$i"
6577break
6578else
6579 echo "configure: failed program was:" >&5
6580 cat conftest.$ac_ext >&5
6581fi
6582rm -f conftest*
6583done
6584LIBS="$ac_func_search_save_LIBS"
6585fi
6586
6587echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6
6588if test "$ac_cv_search_RegOpenKeyExA" != "no"; then
6589 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
6590
6591else :
6592
6593fi
f4ab28e3
MK
6594else
6595 echo "$ac_t""no" 1>&6
6596fi
6597
6598# Check if user specified a different registry key.
9dd53f2c 6599case "x${enable_win32_registry}" in
f4ab28e3
MK
6600x | xyes)
6601 # default.
6602 gcc_cv_win32_registry_key="$VERSION"
6603 ;;
6604xno)
6605 # no registry lookup.
6606 gcc_cv_win32_registry_key=''
6607 ;;
6608*)
6609 # user-specified key.
6610 gcc_cv_win32_registry_key="$enable_win32_registry"
6611 ;;
6612esac
6613
9dd53f2c 6614if test "x$enable_win32_registry" != xno; then
f4ab28e3 6615 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
06f0b04c 6616echo "configure:6617: checking registry key on windows hosts" >&5
f4ab28e3
MK
6617 cat >> confdefs.h <<EOF
6618#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
6619EOF
6620
6621 echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6
6622fi
4e70264f
ZW
6623;;
6624esac
f4ab28e3 6625
ab87f8c8
JL
6626# Get an absolute path to the GCC top-level source directory
6627holddir=`pwd`
6628cd $srcdir
6629topdir=`pwd`
6630cd $holddir
6631
6632# Conditionalize the makefile for this host machine.
6633# Make-host contains the concatenation of all host makefile fragments
6634# [there can be more than one]. This file is built by configure.frag.
6635host_overrides=Make-host
6636dep_host_xmake_file=
6637for f in .. ${host_xmake_file}
6638do
6639 if test -f ${srcdir}/config/$f
6640 then
6641 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
6642 fi
6643done
6644
6645# Conditionalize the makefile for this target machine.
6646# Make-target contains the concatenation of all host makefile fragments
6647# [there can be more than one]. This file is built by configure.frag.
6648target_overrides=Make-target
6649dep_tmake_file=
6650for f in .. ${tmake_file}
6651do
6652 if test -f ${srcdir}/config/$f
6653 then
6654 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
6655 fi
6656done
6657
6658# If the host doesn't support symlinks, modify CC in
6659# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
6660# Otherwise, we can use "CC=$(CC)".
6661rm -f symtest.tem
6662if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
6663then
6664 cc_set_by_configure="\$(CC)"
5aa82ace 6665 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8
JL
6666 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
6667else
6668 rm -f symtest.tem
6669 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
6670 then
6671 symbolic_link="cp -p"
6672 else
6673 symbolic_link="cp"
6674 fi
6675 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 6676 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8
JL
6677 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
6678fi
6679rm -f symtest.tem
6680
6681out_object_file=`basename $out_file .c`.o
6682
6683tm_file_list=
6684for f in $tm_file; do
64ccbc99 6685 case $f in
d02af173
ZW
6686 ansidecl.h )
6687 tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6688 defaults.h )
64ccbc99
KG
6689 tm_file_list="${tm_file_list} $f" ;;
6690 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
6691 esac
ab87f8c8
JL
6692done
6693
11642c3a
ZW
6694tm_p_file_list=
6695for f in $tm_p_file; do
6696 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
6697done
6698
ab87f8c8
JL
6699host_xm_file_list=
6700for f in $host_xm_file; do
64ccbc99 6701 case $f in
d02af173
ZW
6702 ansidecl.h )
6703 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6704 auto-host.h | defaults.h )
64ccbc99
KG
6705 host_xm_file_list="${host_xm_file_list} $f" ;;
6706 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
6707 esac
ab87f8c8
JL
6708done
6709
6710build_xm_file_list=
6711for f in $build_xm_file; do
64ccbc99 6712 case $f in
d02af173
ZW
6713 ansidecl.h )
6714 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
6715 auto-build.h | auto-host.h | defaults.h )
64ccbc99
KG
6716 build_xm_file_list="${build_xm_file_list} $f" ;;
6717 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
6718 esac
ab87f8c8
JL
6719done
6720
6721# Define macro CROSS_COMPILE in compilation
6722# if this is a cross-compiler.
6723# Also use all.cross instead of all.internal
6724# and add cross-make to Makefile.
6725cross_overrides="/dev/null"
6726if test x$host != x$target
6727then
6728 cross_defines="CROSS=-DCROSS_COMPILE"
6729 cross_overrides="${topdir}/cross-make"
6730fi
6731
b39d221a
EC
6732# If this is a cross-compiler that does not
6733# have its own set of headers then define
6734# inhibit_libc
6735
fecd6201
ZW
6736# If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
6737# This prevents libgcc2 from containing any code which requires libc
6738# support.
b39d221a
EC
6739inhibit_libc=
6740if test x$host != x$target && test x$with_headers = x; then
6741 inhibit_libc=-Dinhibit_libc
6742else
6743 if test x$with_newlib = xyes; then
6744 inhibit_libc=-Dinhibit_libc
6745 fi
6746fi
6747
6748
ab87f8c8
JL
6749# When building gcc with a cross-compiler, we need to fix a few things.
6750# This must come after cross-make as we want all.build to override
6751# all.cross.
6752build_overrides="/dev/null"
6753if test x$build != x$host
6754then
6755 build_overrides="${topdir}/build-make"
6756fi
6757
6758# Expand extra_headers to include complete path.
6759# This substitutes for lots of t-* files.
6760extra_headers_list=
6761if test "x$extra_headers" = x
6762then true
6763else
6764 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
6765 for file in $extra_headers;
6766 do
6767 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
6768 done
6769fi
6770
6771if test x$use_collect2 = xno; then
6772 use_collect2=
6773fi
6774
6775# Add a definition of USE_COLLECT2 if system wants one.
2cc07db4 6776if test x$use_collect2 != x
ab87f8c8 6777then
2cc07db4
RH
6778 host_xm_defines="${host_xm_defines} USE_COLLECT2"
6779 xm_defines="${xm_defines} USE_COLLECT2"
ab87f8c8
JL
6780fi
6781
ab87f8c8
JL
6782# If we have gas in the build tree, make a link to it.
6783if test -f ../gas/Makefile; then
6784 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
6785fi
6786
3cae5780 6787# If we have nm and objdump in the build tree, make a link to them.
ab87f8c8
JL
6788if test -f ../binutils/Makefile; then
6789 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
3cae5780 6790 rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
ab87f8c8
JL
6791fi
6792
6793# If we have ld in the build tree, make a link to it.
6794if test -f ../ld/Makefile; then
2cc07db4 6795 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
ab87f8c8
JL
6796fi
6797
981d4858
JM
6798# Figure out what assembler we will be using.
6799echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
06f0b04c 6800echo "configure:6801: checking what assembler to use" >&5
ab87f8c8 6801gcc_cv_as=
981d4858
JM
6802gcc_cv_gas_major_version=
6803gcc_cv_gas_minor_version=
ab87f8c8 6804gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
0936a455 6805gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
ab87f8c8
JL
6806if test -x "$DEFAULT_ASSEMBLER"; then
6807 gcc_cv_as="$DEFAULT_ASSEMBLER"
6808elif test -x "$AS"; then
6809 gcc_cv_as="$AS"
6810elif test -x as$host_exeext; then
6811 # Build using assembler in the current directory.
6812 gcc_cv_as=./as$host_exeext
6813elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
6814 # Single tree build which includes gas.
0936a455 6815 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
ab87f8c8
JL
6816 do
6817 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
6818 if test x$gcc_cv_gas_version != x; then
6819 break
6820 fi
6821 done
6822 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
6823 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
981d4858 6824fi
9e423e6d 6825
981d4858 6826if test "x$gcc_cv_as" = x -a x$host = x$target; then
9e423e6d 6827 # Native build.
779243f7
JL
6828 # Search the same directories that the installed compiler will
6829 # search. Else we may find the wrong assembler and lose. If we
6830 # do not find a suitable assembler binary, then try the user's
6831 # path.
6832 #
6833 # Also note we have to check MD_EXEC_PREFIX before checking the
6834 # user's path. Unfortunately, there is no good way to get at the
6835 # value of MD_EXEC_PREFIX here. So we do a brute force search
6836 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
6837 # to be fixed as part of the make/configure rewrite too.
6838
6839 if test "x$exec_prefix" = xNONE; then
6840 if test "x$prefix" = xNONE; then
6841 test_prefix=/usr/local
6842 else
6843 test_prefix=$prefix
6844 fi
6845 else
6846 test_prefix=$exec_prefix
6847 fi
6848
6849 # If the loop below does not find an assembler, then use whatever
6850 # one we can find in the users's path.
6851 # user's path.
16a0fe50 6852 gcc_cv_as=as$host_exeext
779243f7
JL
6853
6854 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
6855 $test_prefix/lib/gcc-lib/$target \
6856 /usr/lib/gcc/$target/$gcc_version \
6857 /usr/lib/gcc/$target \
6858 $test_prefix/$target/bin/$target/$gcc_version \
6859 $test_prefix/$target/bin \
6860 /usr/libexec \
6861 /usr/ccs/gcc \
6862 /usr/ccs/bin \
6863 /udk/usr/ccs/bin \
6864 /bsd43/usr/lib/cmplrs/cc \
6865 /usr/cross64/usr/bin \
6866 /usr/lib/cmplrs/cc \
6867 /sysv/usr/lib/cmplrs/cc \
6868 /svr4/usr/lib/cmplrs/cc \
6869 /usr/bin"
6870
6871 for dir in $test_dirs; do
6872 if test -f $dir/as$host_exeext; then
6873 gcc_cv_as=$dir/as$host_exeext
6874 break;
6875 fi
6876 done
9e423e6d 6877fi
981d4858
JM
6878if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6879 echo "$ac_t"""newly built gas"" 1>&6
6880else
6881 echo "$ac_t""$gcc_cv_as" 1>&6
6882fi
6883
6884# Figure out what nm we will be using.
6885echo $ac_n "checking what nm to use""... $ac_c" 1>&6
06f0b04c 6886echo "configure:6887: checking what nm to use" >&5
981d4858
JM
6887if test -x nm$host_exeext; then
6888 gcc_cv_nm=./nm$host_exeext
6889elif test x$host = x$target; then
6890 # Native build.
6891 gcc_cv_nm=nm$host_exeext
6892fi
6893echo "$ac_t""$gcc_cv_nm" 1>&6
6894
3cae5780
AS
6895# Figure out what objdump we will be using.
6896echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
06f0b04c 6897echo "configure:6898: checking what objdump to use" >&5
3cae5780
AS
6898if test -x objdump$host_exeext; then
6899 gcc_cv_objdump=./objdump$host_exeext
6900elif test x$host = x$target; then
6901 # Native build.
6902 gcc_cv_objdump=objdump$host_exeext
6903fi
6904echo "$ac_t""$gcc_cv_objdump" 1>&6
6905
981d4858
JM
6906# Figure out what assembler alignment features are present.
6907echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
06f0b04c 6908echo "configure:6909: checking assembler alignment features" >&5
9d147085 6909gcc_cv_as_alignment_features=none
981d4858
JM
6910if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6911 # Gas version 2.6 and later support for .balign and .p2align.
6912 # bytes to skip when using .p2align.
6913 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
6914 gcc_cv_as_alignment_features=".balign and .p2align"
6915 cat >> confdefs.h <<\EOF
6916#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6917EOF
6918
6919 fi
6920 # Gas version 2.8 and later support specifying the maximum
6921 # bytes to skip when using .p2align.
6922 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
6923 gcc_cv_as_alignment_features=".p2align including maximum skip"
6924 cat >> confdefs.h <<\EOF
6925#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6926EOF
6927
6928 fi
6929elif test x$gcc_cv_as != x; then
00ccc16d
JL
6930 # Check if we have .balign and .p2align
6931 echo ".balign 4" > conftest.s
6932 echo ".p2align 2" >> conftest.s
6933 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6934 gcc_cv_as_alignment_features=".balign and .p2align"
6935 cat >> confdefs.h <<\EOF
6936#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
6937EOF
6938
6939 fi
6940 rm -f conftest.s conftest.o
9e423e6d
JW
6941 # Check if specifying the maximum bytes to skip when
6942 # using .p2align is supported.
6943 echo ".p2align 4,,7" > conftest.s
6944 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6945 gcc_cv_as_alignment_features=".p2align including maximum skip"
6946 cat >> confdefs.h <<\EOF
6947#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
6948EOF
6949
6950 fi
6951 rm -f conftest.s conftest.o
6952fi
6953echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
6954
d1accaa3 6955echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
06f0b04c 6956echo "configure:6957: checking assembler subsection support" >&5
9d147085 6957gcc_cv_as_subsections=no
981d4858
JM
6958if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6959 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
6960 gcc_cv_as_subsections="working .subsection -1"
6961 fi
6962elif test x$gcc_cv_as != x; then
d1accaa3
JJ
6963 # Check if we have .subsection
6964 echo ".subsection 1" > conftest.s
6965 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6966 gcc_cv_as_subsections=".subsection"
d1accaa3
JJ
6967 if test x$gcc_cv_nm != x; then
6968 cat > conftest.s <<EOF
6969conftest_label1: .word 0
6970.subsection -1
6971conftest_label2: .word 0
6972.previous
6973EOF
6974 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6975 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
6976 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
1b015bec
AO
6977 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
6978 :
6979 else
d1accaa3 6980 gcc_cv_as_subsections="working .subsection -1"
d1accaa3
JJ
6981 fi
6982 fi
6983 fi
6984 fi
6985 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
6986fi
6987if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
6988 cat >> confdefs.h <<\EOF
6989#define HAVE_GAS_SUBSECTION_ORDERING 1
6990EOF
6991
d1accaa3
JJ
6992fi
6993echo "$ac_t""$gcc_cv_as_subsections" 1>&6
6994
12822146 6995echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
06f0b04c 6996echo "configure:6997: checking assembler weak support" >&5
9d147085 6997gcc_cv_as_weak=no
981d4858
JM
6998if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
6999 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
7000 gcc_cv_as_weak="yes"
7001 fi
7002elif test x$gcc_cv_as != x; then
12822146
JL
7003 # Check if we have .weak
7004 echo " .weak foobar" > conftest.s
7005 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
12822146
JL
7006 gcc_cv_as_weak="yes"
7007 fi
7008 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
7009fi
7010if test x"$gcc_cv_as_weak" = xyes; then
7011 cat >> confdefs.h <<\EOF
7012#define HAVE_GAS_WEAK 1
7013EOF
7014
12822146
JL
7015fi
7016echo "$ac_t""$gcc_cv_as_weak" 1>&6
7017
6a9c5260 7018echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
06f0b04c 7019echo "configure:7020: checking assembler hidden support" >&5
9d147085 7020gcc_cv_as_hidden=no
981d4858
JM
7021if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7022 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
7023 gcc_cv_as_hidden="yes"
7024 fi
7025elif test x$gcc_cv_as != x; then
6a9c5260
UD
7026 # Check if we have .hidden
7027 echo " .hidden foobar" > conftest.s
7028 echo "foobar:" >> conftest.s
7029 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
6a9c5260
UD
7030 gcc_cv_as_hidden="yes"
7031 fi
7032 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
981d4858
JM
7033fi
7034if test x"$gcc_cv_as_hidden" = xyes; then
7035 cat >> confdefs.h <<\EOF
7036#define HAVE_GAS_HIDDEN 1
7037EOF
7038
6a9c5260
UD
7039fi
7040echo "$ac_t""$gcc_cv_as_hidden" 1>&6
7041
b7460f24 7042echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
06f0b04c 7043echo "configure:7044: checking assembler leb128 support" >&5
fbe42b1b 7044gcc_cv_as_leb128=no
b7460f24 7045if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
fbe42b1b 7046 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
b7460f24
RH
7047 gcc_cv_as_leb128="yes"
7048 fi
7049elif test x$gcc_cv_as != x; then
7050 # Check if we have .[us]leb128, and support symbol arithmetic with it.
7051 cat > conftest.s <<EOF
7052 .data
7053 .uleb128 L2 - L1
7054L1:
7055 .uleb128 1280
7056 .sleb128 -1010
7057L2:
7058EOF
7059 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
78e766a0
RH
7060 gcc_cv_as_leb128="yes"
7061
7062 # GAS versions before 2.11 do not support uleb128,
7063 # despite appearing to.
7064 # ??? There exists an elf-specific test that will crash
7065 # the assembler. Perhaps it's better to figure out whether
7066 # arbitrary sections are supported and try the test.
7067 as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
7068 if echo "$as_ver" | grep GNU > /dev/null; then
5fed851d 7069 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
78e766a0 7070 as_major=`echo $as_ver | sed 's/\..*//'`
3d399d67 7071 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
78e766a0
RH
7072 if test $as_major -eq 2 -a $as_minor -lt 11; then
7073 gcc_cv_as_leb128="no"
7074 fi
fbe42b1b 7075 fi
b7460f24
RH
7076 fi
7077 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7078fi
7079if test x"$gcc_cv_as_leb128" = xyes; then
7080 cat >> confdefs.h <<\EOF
7081#define HAVE_AS_LEB128 1
7082EOF
7083
7084fi
7085echo "$ac_t""$gcc_cv_as_leb128" 1>&6
7086
c64688ae 7087echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
06f0b04c 7088echo "configure:7089: checking assembler eh_frame optimization" >&5
c64688ae
RH
7089gcc_cv_as_eh_frame=no
7090if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7091 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
7092 gcc_cv_as_eh_frame="yes"
7093 fi
7094elif test x$gcc_cv_as != x; then
7095 # Check if this is GAS.
41948db5
SS
7096 as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
7097 rm -f a.out 2> /dev/null
c64688ae
RH
7098 if echo "$as_ver" | grep GNU > /dev/null; then
7099 # Versions up to and including 2.11.0 may mis-optimize
7100 # .eh_frame data. Try something.
7101 cat > conftest.s <<EOF
7102 .text
7103.LFB1:
7104 .4byte 0
7105.L1:
7106 .4byte 0
7107.LFE1:
7108 .section .eh_frame,"aw",@progbits
7109__FRAME_BEGIN__:
7110 .4byte .LECIE1-.LSCIE1
7111.LSCIE1:
7112 .4byte 0x0
7113 .byte 0x1
7114 .ascii "z\0"
7115 .byte 0x1
7116 .byte 0x78
7117 .byte 0x1a
7118 .byte 0x0
7119 .byte 0x4
7120 .4byte 1
7121 .p2align 1
7122.LECIE1:
7123.LSFDE1:
7124 .4byte .LEFDE1-.LASFDE1
7125.LASFDE1:
7126 .4byte .LASFDE1-__FRAME_BEGIN__
7127 .4byte .LFB1
7128 .4byte .LFE1-.LFB1
7129 .byte 0x4
7130 .4byte .LFE1-.LFB1
7131 .byte 0x4
7132 .4byte .L1-.LFB1
7133.LEFDE1:
7134EOF
01efb963 7135 cat > conftest.lit <<EOF
c64688ae
RH
7136 0000 10000000 00000000 017a0001 781a0004 .........z..x...
7137 0010 01000000 12000000 18000000 00000000 ................
7138 0020 08000000 04080000 0044 .........D
01efb963
AS
7139EOF
7140 cat > conftest.big <<EOF
7141 0000 00000010 00000000 017a0001 781a0004 .........z..x...
7142 0010 00000001 00000012 00000018 00000000 ................
7143 0020 00000008 04000000 0844 .........D
c64688ae
RH
7144EOF
7145 # If the assembler didn't choke, and we can objdump,
7146 # and we got the correct data, then succeed.
7147 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
3cae5780 7148 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
c64688ae 7149 | tail -3 > conftest.got \
01efb963
AS
7150 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
7151 || cmp conftest.big conftest.got > /dev/null 2>&1; }
c64688ae
RH
7152 then
7153 gcc_cv_as_eh_frame="yes"
7154 else
7155 gcc_cv_as_eh_frame="bad"
7156 if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
7157 cat >> confdefs.h <<\EOF
7158#define USE_AS_TRADITIONAL_FORMAT 1
7159EOF
7160
7161 fi
7162 fi
7163 fi
7164 rm -f conftest.*
7165fi
7166echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
7167
201556f0 7168echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
06f0b04c 7169echo "configure:7170: checking assembler section merging support" >&5
201556f0
JJ
7170gcc_cv_as_shf_merge=no
7171if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7172 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
a8b7afb9 7173 gcc_cv_as_shf_merge=yes
201556f0
JJ
7174 fi
7175elif test x$gcc_cv_as != x; then
7176 # Check if we support SHF_MERGE sections
7177 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
a8b7afb9 7178 if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
201556f0
JJ
7179 gcc_cv_as_shf_merge=yes
7180 fi
7181 rm -f conftest.s conftest.o
7182fi
7183if test x"$gcc_cv_as_shf_merge" = xyes; then
7184 cat >> confdefs.h <<\EOF
7185#define HAVE_GAS_SHF_MERGE 1
7186EOF
7187
7188fi
7189echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
7190
1cb36a98
RH
7191case "$target" in
7192 sparc*-*-*)
7193 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
06f0b04c 7194echo "configure:7195: checking assembler .register pseudo-op support" >&5
5b68c389
AO
7195if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
7196 echo $ac_n "(cached) $ac_c" 1>&6
7197else
7198
7199 gcc_cv_as_register_pseudo_op=unknown
7200 if test x$gcc_cv_as != x; then
7201 # Check if we have .register
7202 echo ".register %g2, #scratch" > conftest.s
7203 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
1cb36a98 7204 gcc_cv_as_register_pseudo_op=yes
5b68c389
AO
7205 else
7206 gcc_cv_as_register_pseudo_op=no
7207 fi
7208 rm -f conftest.s conftest.o
7209 fi
7210
7211fi
7212
7213echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
7214 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
7215 cat >> confdefs.h <<\EOF
1cb36a98
RH
7216#define HAVE_AS_REGISTER_PSEUDO_OP 1
7217EOF
7218
1cb36a98 7219 fi
1cb36a98 7220
e95b1e6a 7221 echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
06f0b04c 7222echo "configure:7223: checking assembler supports -relax" >&5
e95b1e6a
JJ
7223if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
7224 echo $ac_n "(cached) $ac_c" 1>&6
7225else
7226
7227 gcc_cv_as_relax_opt=unknown
7228 if test x$gcc_cv_as != x; then
7229 # Check if gas supports -relax
7230 echo ".text" > conftest.s
7231 if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
7232 gcc_cv_as_relax_opt=yes
7233 else
7234 gcc_cv_as_relax_opt=no
7235 fi
7236 rm -f conftest.s conftest.o
7237 fi
7238
7239fi
7240
7241echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6
7242 if test "x$gcc_cv_as_relax_opt" = xyes; then
7243 cat >> confdefs.h <<\EOF
7244#define HAVE_AS_RELAX_OPTION 1
7245EOF
7246
7247 fi
7248
5b68c389
AO
7249 case "$tm_file" in
7250 *64*)
7251 echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
06f0b04c 7252echo "configure:7253: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
5b68c389
AO
7253if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
7254 echo $ac_n "(cached) $ac_c" 1>&6
7255else
7256
7257 if test -n "$gcc_cv_as"; then
7258 echo ".xword foo" > conftest.s
7259 gcc_cv_as_flags64=no
8a90b95d 7260 for flag in "-xarch=v9" "-64 -Av9"; do
5b68c389
AO
7261 if $gcc_cv_as $flag -o conftest.o conftest.s \
7262 > /dev/null 2>&1; then
7263 gcc_cv_as_flags64=$flag
7264 break
7265 fi
7266 done
7267 rm -f conftest.s conftest.o
7268 else
7269 if test "$gas" = yes; then
7270 gcc_cv_as_flags64="-64 -Av9"
7271 else
7272 gcc_cv_as_flags64="-xarch=v9"
7273 fi
1cb36a98 7274 fi
5b68c389
AO
7275
7276fi
7277
7278echo "$ac_t""$gcc_cv_as_flags64" 1>&6
7279 if test "x$gcc_cv_as_flags64" = xno; then
7280
7281 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
7282 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
7283
7284 else
7285 cat >> confdefs.h <<EOF
7286#define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
7287EOF
7288
1cb36a98 7289 fi
5b68c389
AO
7290 ;;
7291 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
7292 ;;
7293 esac
7294
7295 if test "x$gcc_cv_as_flags64" != xno; then
7296 echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
06f0b04c 7297echo "configure:7298: checking for assembler offsetable %lo() support" >&5
5b68c389
AO
7298if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
7299 echo $ac_n "(cached) $ac_c" 1>&6
7300else
7301
7302 gcc_cv_as_offsetable_lo10=unknown
7303 if test "x$gcc_cv_as" != x; then
7304 # Check if assembler has offsetable %lo()
7305 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
7306 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
7307 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
7308 > /dev/null 2>&1 &&
7309 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
7310 > /dev/null 2>&1; then
7311 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
7312 gcc_cv_as_offsetable_lo10=no
7313 else
7314 gcc_cv_as_offsetable_lo10=yes
7315 fi
7316 else
7317 gcc_cv_as_offsetable_lo10=no
7318 fi
7319 rm -f conftest.s conftest.o conftest1.s conftest1.o
7320 fi
7321
7322fi
7323
7324echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
7325 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
7326 cat >> confdefs.h <<\EOF
1cb36a98
RH
7327#define HAVE_AS_OFFSETABLE_LO10 1
7328EOF
7329
1cb36a98 7330 fi
1cb36a98 7331 fi
43160d01 7332
1cb36a98
RH
7333 ;;
7334
c307e6dd 7335 i[34567]86-*-* | x86_64-*-*)
1cb36a98 7336 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
06f0b04c 7337echo "configure:7338: checking assembler instructions" >&5
1cb36a98 7338 gcc_cv_as_instructions=
981d4858
JM
7339 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
7340 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
7341 gcc_cv_as_instructions="filds fists"
7342 fi
7343 elif test x$gcc_cv_as != x; then
53b5ce19
JW
7344 set "filds fists" "filds mem; fists mem"
7345 while test $# -gt 0
7346 do
7347 echo "$2" > conftest.s
7348 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7349 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
53b5ce19
JW
7350 fi
7351 shift 2
7352 done
7353 rm -f conftest.s conftest.o
1cb36a98 7354 fi
981d4858
JM
7355 if test x"$gcc_cv_as_instructions" != x; then
7356 cat >> confdefs.h <<EOF
ee7692d2 7357#define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
981d4858
JM
7358EOF
7359
7360 fi
1cb36a98 7361 echo "$ac_t""$gcc_cv_as_instructions" 1>&6
f88c65f7
RH
7362
7363 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
06f0b04c 7364echo "configure:7365: checking assembler GOTOFF in data directives" >&5
f88c65f7
RH
7365 gcc_cv_as_gotoff_in_data=no
7366 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
7367 then
7368 if test "$gcc_cv_gas_major_version" -eq 2 \
7369 -a "$gcc_cv_gas_minor_version" -ge 11 \
7370 -o "$gcc_cv_gas_major_version" -gt 2; then
7371 gcc_cv_as_gotoff_in_data=yes
7372 fi
7373 elif test x$gcc_cv_as != x; then
7374 cat > conftest.s <<EOF
7375 .text
7376.L0:
7377 nop
7378 .data
7379 .long .L0@GOTOFF
7380EOF
7381 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
7382 gcc_cv_as_gotoff_in_data=yes
7383 fi
7384 fi
7385 cat >> confdefs.h <<EOF
7386#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
7387EOF
7388
7389 echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
1cb36a98
RH
7390 ;;
7391esac
53b5ce19 7392
9d147085 7393echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
06f0b04c 7394echo "configure:7395: checking assembler dwarf2 debug_line support" >&5
9d147085
RH
7395gcc_cv_as_dwarf2_debug_line=no
7396# ??? Not all targets support dwarf2 debug_line, even within a version
7397# of gas. Moreover, we need to emit a valid instruction to trigger any
7398# info to the output file. So, as supported targets are added to gas 2.11,
7399# add some instruction here to (also) show we expect this might work.
7400# ??? Once 2.11 is released, probably need to add first known working
7401# version to the per-target configury.
7402case "$target" in
c307e6dd 7403 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-*)
9d147085
RH
7404 insn="nop"
7405 ;;
7406 ia64*-*-*)
7407 insn="nop 0"
7408 ;;
7409 esac
7410if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7411then
7412 if test "$gcc_cv_gas_major_version" -eq 2 \
7413 -a "$gcc_cv_gas_minor_version" -ge 11 \
7414 -o "$gcc_cv_gas_major_version" -gt 2 \
7415 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7416 && test x"$insn" != x ; then
7417 gcc_cv_as_dwarf2_debug_line="yes"
7418 fi
7419elif test x$gcc_cv_as != x -a x"$insn" != x ; then
acc187f5
RH
7420 echo ' .file 1 "conftest.s"' > conftest.s
7421 echo ' .loc 1 3 0' >> conftest.s
9d147085 7422 echo " $insn" >> conftest.s
981975b6 7423 # ??? This fails with non-gnu grep.
9d147085
RH
7424 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
7425 && grep debug_line conftest.o > /dev/null 2>&1 ; then
981975b6 7426 # The .debug_line file table must be in the exact order that
eaec9b3d 7427 # we specified the files, since these indices are also used
981975b6
RH
7428 # by DW_AT_decl_file. Approximate this test by testing if
7429 # the assembler bitches if the same index is assigned twice.
7430 echo ' .file 1 "foo.s"' > conftest.s
7431 echo ' .file 1 "bar.s"' >> conftest.s
7432 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
7433 then
7434 gcc_cv_as_dwarf2_debug_line="no"
7435 else
7436 gcc_cv_as_dwarf2_debug_line="yes"
7437 fi
9d147085
RH
7438 fi
7439 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
7440fi
7441if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
7442 cat >> confdefs.h <<\EOF
7443#define HAVE_AS_DWARF2_DEBUG_LINE 1
7444EOF
7445
7446fi
7447echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
7448
5f0e9ea2 7449echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
06f0b04c 7450echo "configure:7451: checking assembler --gdwarf2 support" >&5
5f0e9ea2
GK
7451gcc_cv_as_gdwarf2_flag=no
7452if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7453then
7454 if test "$gcc_cv_gas_major_version" -eq 2 \
7455 -a "$gcc_cv_gas_minor_version" -ge 11 \
7456 -o "$gcc_cv_gas_major_version" -gt 2 \
7457 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7458 && test x"$insn" != x ; then
7459 gcc_cv_as_gdwarf2_debug_flag="yes"
7460 fi
7461elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7462 echo '' > conftest.s
7463 # ??? This fails with non-gnu grep.
7464 if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
7465 then
7466 gcc_cv_as_gdwarf2_flag="yes"
7467 fi
7468 rm -f conftest.s conftest.o
7469fi
7470if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
7471 cat >> confdefs.h <<\EOF
7472#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
7473EOF
7474
7475fi
7476echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
7477
7478echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
06f0b04c 7479echo "configure:7480: checking assembler --gstabs support" >&5
5f0e9ea2
GK
7480gcc_cv_as_gstabs_flag=no
7481if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
7482then
7483 if test "$gcc_cv_gas_major_version" -eq 2 \
7484 -a "$gcc_cv_gas_minor_version" -ge 11 \
7485 -o "$gcc_cv_gas_major_version" -gt 2 \
7486 && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
7487 && test x"$insn" != x ; then
7488 gcc_cv_as_gstabs_debug_flag="yes"
7489 fi
7490elif test x$gcc_cv_as != x -a x"$insn" != x ; then
7491 echo '' > conftest.s
7492 # ??? This fails with non-gnu grep.
7493 if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
7494 gcc_cv_as_gstabs_flag="yes"
7495 fi
7496 rm -f conftest.s conftest.o
7497fi
7498if test x"$gcc_cv_as_gstabs_flag" = xyes; then
7499 cat >> confdefs.h <<\EOF
7500#define HAVE_AS_GSTABS_DEBUG_FLAG 1
7501EOF
7502
7503fi
7504echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
7505
793e9558
PB
7506if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
7507 cat >> confdefs.h <<EOF
7508#define PREFIX_INCLUDE_DIR "$prefix/include"
7509EOF
7510
7511fi
7512
861bb6c1 7513# Figure out what language subdirectories are present.
71205e0b
MH
7514# Look if the user specified --enable-languages="..."; if not, use
7515# the environment variable $LANGUAGES if defined. $LANGUAGES might
7516# go away some day.
cc9a08e0 7517# NB: embedded tabs in this IF block -- do not untabify
71205e0b
MH
7518if test x"${enable_languages+set}" != xset; then
7519 if test x"${LANGUAGES+set}" = xset; then
cc9a08e0
PE
7520 enable_languages="${LANGUAGES}"
7521 echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2
7522
71205e0b
MH
7523 else
7524 enable_languages=all
7525 fi
d6c6b553 7526else
cc9a08e0
PE
7527 if test x"${enable_languages}" = x ||
7528 test x"${enable_languages}" = xyes;
7529 then
7530 { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; }
d6c6b553 7531 fi
71205e0b 7532fi
cc9a08e0 7533enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
75382c6d
TT
7534
7535# First scan to see if an enabled language requires some other language.
7536# We assume that a given config-lang.in will list all the language
7537# front ends it requires, even if some are required indirectly.
7538for lang in ${srcdir}/*/config-lang.in ..
7539do
7540 case $lang in
7541 ..)
7542 ;;
7543 # The odd quoting in the next line works around
7544 # an apparent bug in bash 1.12 on linux.
7545 ${srcdir}/[*]/config-lang.in)
7546 ;;
7547 *)
7548 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
7549 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
7550 for other in $this_lang_requires
7551 do
7552 case ,${enable_languages}, in
7553 *,$other,*)
7554 ;;
7555 *,all,*)
7556 ;;
1bf17cc4 7557 *,$lang_alias,*)
75382c6d
TT
7558 enable_languages="$enable_languages,$other"
7559 ;;
7560 esac
7561 done
7562 ;;
7563 esac
7564done
7565
861bb6c1
JL
7566subdirs=
7567for lang in ${srcdir}/*/config-lang.in ..
7568do
7569 case $lang in
7570 ..) ;;
7571 # The odd quoting in the next line works around
7572 # an apparent bug in bash 1.12 on linux.
7573 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
7574 *)
7575 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
2b60b2cb
AO
7576 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
7577 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
71205e0b
MH
7578 if test "x$lang_alias" = x
7579 then
7580 echo "$lang doesn't set \$language." 1>&2
7581 exit 1
7582 fi
2b60b2cb
AO
7583 case ${build_by_default},${enable_languages}, in
7584 *,$lang_alias,*) add_this_lang=yes ;;
7585 no,*) add_this_lang=no ;;
7586 *,all,*) add_this_lang=yes ;;
7587 *) add_this_lang=no ;;
7588 esac
71205e0b
MH
7589 if test x"${add_this_lang}" = xyes; then
7590 case $lang in
7591 ${srcdir}/ada/config-lang.in)
1ffc5c6e 7592 if test x$have_gnat = xyes ; then
71205e0b
MH
7593 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7594 fi
7595 ;;
7596 *)
7597 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
7598 ;;
7599 esac
7600 fi
7601 ;;
861bb6c1
JL
7602 esac
7603done
7604
f24af81b
TT
7605# Make gthr-default.h if we have a thread file.
7606gthread_flags=
75bffa71 7607if test $thread_file != single; then
f24af81b 7608 rm -f gthr-default.h
db0d1ed9 7609 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
7610 gthread_flags=-DHAVE_GTHR_DEFAULT
7611fi
7612
7613
81bf3d9e
RH
7614# Find out what GC implementation we want, or may, use.
7615# Check whether --with-gc or --without-gc was given.
7616if test "${with_gc+set}" = set; then
7617 withval="$with_gc"
7618 case "$withval" in
7619 simple | page)
7620 GGC=ggc-$withval
7621 ;;
7622 *)
7623 { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; }
7624 ;;
7625esac
7626else
005537df 7627 GGC=ggc-page
81bf3d9e
RH
7628fi
7629
7630
7631echo "Using $GGC for garbage collection."
7632
3c809ba4 7633# Use the system's zlib library.
b8dad04b
ZW
7634zlibdir=-L../zlib
7635zlibinc="-I\$(srcdir)/../zlib"
3c809ba4
AG
7636# Check whether --with-system-zlib or --without-system-zlib was given.
7637if test "${with_system_zlib+set}" = set; then
7638 withval="$with_system_zlib"
7639 zlibdir=
7640zlibinc=
7641
7642fi
7643
7644
7645
7646
dc6746e7
PT
7647
7648echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
06f0b04c 7649echo "configure:7650: checking whether to enable maintainer-specific portions of Makefiles" >&5
dc6746e7
PT
7650 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7651if test "${enable_maintainer_mode+set}" = set; then
7652 enableval="$enable_maintainer_mode"
7653 maintainer_mode=$enableval
7654else
7655 maintainer_mode=no
7656fi
7657
7658
7659echo "$ac_t""$maintainer_mode" 1>&6
7660
7661if test "$maintainer_mode" = "yes"; then
7662 MAINT=''
7663else
7664 MAINT='#'
7665fi
7666
531073e7
RH
7667# With Setjmp/Longjmp based exception handling.
7668# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
7669if test "${enable_sjlj_exceptions+set}" = set; then
7670 enableval="$enable_sjlj_exceptions"
7671 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
7672cat >> confdefs.h <<EOF
7673#define CONFIG_SJLJ_EXCEPTIONS $sjlj
7674EOF
7675
7676fi
7677
7678
861bb6c1
JL
7679# Make empty files to contain the specs and options for each language.
7680# Then add #include lines to for a compiler that has specs and/or options.
7681
7682lang_specs_files=
7683lang_options_files=
3103b7db
ML
7684lang_tree_files=
7685rm -f specs.h options.h gencheck.h
7686touch specs.h options.h gencheck.h
861bb6c1
JL
7687for subdir in . $subdirs
7688do
75bffa71 7689 if test -f $srcdir/$subdir/lang-specs.h; then
861bb6c1
JL
7690 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
7691 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
7692 fi
75bffa71 7693 if test -f $srcdir/$subdir/lang-options.h; then
861bb6c1
JL
7694 echo "#include \"$subdir/lang-options.h\"" >>options.h
7695 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
7696 fi
3103b7db
ML
7697 if test -f $srcdir/$subdir/$subdir-tree.def; then
7698 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
7699 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
7700 fi
861bb6c1
JL
7701done
7702
7703# These (without "all_") are set in each config-lang.in.
7704# `language' must be a single word so is spelled singularly.
7705all_languages=
7706all_boot_languages=
7707all_compilers=
7708all_stagestuff=
7709all_diff_excludes=
5b7874aa 7710all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc'
861bb6c1
JL
7711# List of language makefile fragments.
7712all_lang_makefiles=
7713all_headers=
7714all_lib2funcs=
7715
7716# Add the language fragments.
7717# Languages are added via two mechanisms. Some information must be
7718# recorded in makefile variables, these are defined in config-lang.in.
7719# We accumulate them and plug them into the main Makefile.
7720# The other mechanism is a set of hooks for each of the main targets
7721# like `clean', `install', etc.
7722
7723language_fragments="Make-lang"
7724language_hooks="Make-hooks"
861bb6c1
JL
7725
7726for s in .. $subdirs
7727do
75bffa71 7728 if test $s != ".."
861bb6c1
JL
7729 then
7730 language=
7731 boot_language=
7732 compilers=
7733 stagestuff=
7734 diff_excludes=
7735 headers=
7736 outputs=
7737 lib2funcs=
7738 . ${srcdir}/$s/config-lang.in
75bffa71 7739 if test "x$language" = x
861bb6c1
JL
7740 then
7741 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
7742 exit 1
7743 fi
72aaffbd
ZW
7744 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in"
7745 if test -f ${srcdir}/$s/Makefile.in
7746 then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in"
7747 fi
861bb6c1 7748 all_languages="$all_languages $language"
75bffa71 7749 if test "x$boot_language" = xyes
861bb6c1
JL
7750 then
7751 all_boot_languages="$all_boot_languages $language"
7752 fi
7753 all_compilers="$all_compilers $compilers"
7754 all_stagestuff="$all_stagestuff $stagestuff"
7755 all_diff_excludes="$all_diff_excludes $diff_excludes"
7756 all_headers="$all_headers $headers"
7757 all_outputs="$all_outputs $outputs"
861bb6c1
JL
7758 all_lib2funcs="$all_lib2funcs $lib2funcs"
7759 fi
7760done
7761
cbc59f01
DD
7762check_languages=
7763for language in .. $all_languages
7764do
7765 if test $language != ".."
7766 then
7767 check_languages="$check_languages check-$language"
7768 fi
7769done
7770
861bb6c1
JL
7771# Since we can't use `::' targets, we link each language in
7772# with a set of hooks, reached indirectly via lang.${target}.
7773
7774rm -f Make-hooks
7775touch Make-hooks
7776target_list="all.build all.cross start.encap rest.encap \
d3945f0a 7777 info dvi generated-manpages \
861bb6c1 7778 install-normal install-common install-info install-man \
436a88a6 7779 uninstall \
861bb6c1
JL
7780 mostlyclean clean distclean extraclean maintainer-clean \
7781 stage1 stage2 stage3 stage4"
7782for t in $target_list
7783do
7784 x=
ab87f8c8 7785 for lang in .. $all_languages
861bb6c1 7786 do
ab87f8c8
JL
7787 if test $lang != ".."; then
7788 x="$x $lang.$t"
861bb6c1
JL
7789 fi
7790 done
7791 echo "lang.$t: $x" >> Make-hooks
7792done
7793
cc06d68c 7794# Create .gdbinit.
861bb6c1 7795
cc06d68c
GP
7796echo "dir ." > .gdbinit
7797echo "dir ${srcdir}" >> .gdbinit
7798if test x$gdb_needs_out_file_path = xyes
7799then
7800 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
7801fi
7802if test "x$subdirs" != x; then
7803 for s in $subdirs
7804 do
7805 echo "dir ${srcdir}/$s" >> .gdbinit
7806 done
861bb6c1 7807fi
cc06d68c 7808echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 7809
88111b26
JL
7810# Define variables host_canonical and build_canonical
7811# because some Cygnus local changes in the Makefile depend on them.
7812build_canonical=${build}
7813host_canonical=${host}
7814target_subdir=
75bffa71 7815if test "${host}" != "${target}" ; then
924c96eb 7816 target_subdir=${target_alias}/
88111b26
JL
7817fi
7818
7819
7820
7821
8f8d3278
NC
7822# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
7823# absolute path for gcc_tooldir based on inserting the number of up-directory
7824# movements required to get from $(exec_prefix) to $(prefix) into the basic
7825# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
7826# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
7827# make and thus we'd get different behavior depending on where we built the
7828# sources.
5949a9fc 7829if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d062c304
JL
7830 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
7831else
8f8d3278
NC
7832# An explanation of the sed strings:
7833# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
7834# -e 's|/$||' match a trailing forward slash and eliminates it
7835# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 7836# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
7837#
7838# (*) Note this pattern overwrites the first character of the string
7839# with a forward slash if one is not already present. This is not a
7840# problem because the exact names of the sub-directories concerned is
7841# unimportant, just the number of them matters.
7842#
7843# The practical upshot of these patterns is like this:
7844#
7845# prefix exec_prefix result
7846# ------ ----------- ------
7847# /foo /foo/bar ../
7848# /foo/ /foo/bar ../
7849# /foo /foo/bar/ ../
7850# /foo/ /foo/bar/ ../
7851# /foo /foo/bar/ugg ../../
7852#
4c112cda
NC
7853 dollar='$$'
7854 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
d062c304
JL
7855fi
7856
7857
2ce3c6c6 7858
2bbea3a6
RH
7859# Find a directory in which to install a shared libgcc.
7860
7861# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
7862if test "${enable_version_specific_runtime_libs+set}" = set; then
7863 enableval="$enable_version_specific_runtime_libs"
7864 :
7865fi
7866
7867
5b15f277
RH
7868# Check whether --with-slibdir or --without-slibdir was given.
7869if test "${with_slibdir+set}" = set; then
7870 withval="$with_slibdir"
7871 slibdir="$with_slibdir"
7872else
7873 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 7874 slibdir='$(libsubdir)'
5b15f277 7875elif test "$host" != "$target"; then
2bbea3a6
RH
7876 slibdir='$(build_tooldir)/lib'
7877else
5b15f277 7878 slibdir='$(libdir)'
2bbea3a6 7879fi
5b15f277
RH
7880fi
7881
2bbea3a6
RH
7882
7883
7e717196
JL
7884# Nothing to do for FLOAT_H, float_format already handled.
7885objdir=`pwd`
7886
7887
861bb6c1
JL
7888# Process the language and host/target makefile fragments.
7889${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
7890
7891# Substitute configuration variables
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
9b16d2c4 7938
e9a25f70 7939
6e26218f 7940
c8724862 7941
e061d1ce 7942
d8bb17c8 7943
11642c3a
ZW
7944
7945
7946
7947
7948
7949
7950
7951
9fc9b82a 7952
8763704d 7953
aac69a49
NC
7954
7955
cc1e60ea 7956
3d9d2476 7957
861bb6c1
JL
7958
7959
7960# Echo that links are built
75bffa71 7961if test x$host = x$target
861bb6c1
JL
7962then
7963 str1="native "
7964else
7965 str1="cross-"
7966 str2=" from $host"
7967fi
7968
75bffa71 7969if test x$host != x$build
861bb6c1
JL
7970then
7971 str3=" on a $build system"
7972fi
7973
75bffa71 7974if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
7975then
7976 str4=
7977fi
7978
7979echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
7980
75bffa71 7981if test "x$str2" != x || test "x$str3" != x
861bb6c1
JL
7982then
7983 echo " ${str2}${str3}." 1>&2
7984fi
7985
f6cb0e63 7986# Truncate the target if necessary
75bffa71 7987if test x$host_truncate_target != x; then
f6cb0e63
JL
7988 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
7989fi
7990
861bb6c1
JL
7991# Configure the subdirectories
7992# AC_CONFIG_SUBDIRS($subdirs)
7993
7994# Create the Makefile
7995# and configure language subdirectories
7996trap '' 1 2 15
7997cat > confcache <<\EOF
7998# This file is a shell script that caches the results of configure
7999# tests run on this system so they can be shared between configure
8000# scripts and configure runs. It is not useful on other systems.
8001# If it contains results you don't want to keep, you may remove or edit it.
8002#
8003# By default, configure uses ./config.cache as the cache file,
8004# creating it if it does not exist already. You can give configure
8005# the --cache-file=FILE option to use a different cache file; that is
8006# what configure does when it calls configure scripts in
8007# subdirectories, so they share the cache.
8008# Giving --cache-file=/dev/null disables caching, for debugging configure.
8009# config.status only pays attention to the cache file if you give it the
8010# --recheck option to rerun configure.
8011#
8012EOF
8013# The following way of writing the cache mishandles newlines in values,
8014# but we know of no workaround that is simple, portable, and efficient.
8015# So, don't put newlines in cache variables' values.
8016# Ultrix sh set writes to stderr and can't be redirected directly,
8017# and sets the high bit in the cache file unless we assign to the vars.
8018(set) 2>&1 |
b27d2bd5 8019 case `(ac_space=' '; set | grep ac_space) 2>&1` in
861bb6c1
JL
8020 *ac_space=\ *)
8021 # `set' does not quote correctly, so add quotes (double-quote substitution
8022 # turns \\\\ into \\, and sed turns \\ into \).
8023 sed -n \
8024 -e "s/'/'\\\\''/g" \
8025 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8026 ;;
8027 *)
8028 # `set' quotes correctly as required by POSIX, so do not add quotes.
8029 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8030 ;;
8031 esac >> confcache
8032if cmp -s $cache_file confcache; then
8033 :
8034else
8035 if test -w $cache_file; then
8036 echo "updating cache $cache_file"
8037 cat confcache > $cache_file
8038 else
8039 echo "not updating unwritable cache $cache_file"
8040 fi
8041fi
8042rm -f confcache
8043
8044trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8045
8046test "x$prefix" = xNONE && prefix=$ac_default_prefix
8047# Let make expand exec_prefix.
8048test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8049
8050# Any assignment to VPATH causes Sun make to only execute
8051# the first set of double-colon rules, so remove it if not needed.
8052# If there is a colon in the path, we need to keep it.
8053if test "x$srcdir" = x.; then
8054 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8055fi
8056
8057trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8058
8059DEFS=-DHAVE_CONFIG_H
8060
8061# Without the "./", some shells look in PATH for config.status.
8062: ${CONFIG_STATUS=./config.status}
8063
8064echo creating $CONFIG_STATUS
8065rm -f $CONFIG_STATUS
8066cat > $CONFIG_STATUS <<EOF
8067#! /bin/sh
8068# Generated automatically by configure.
8069# Run this file to recreate the current configuration.
8070# This directory was configured as follows,
8071# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8072#
8073# $0 $ac_configure_args
8074#
8075# Compiler output produced by configure, useful for debugging
8076# configure, is in ./config.log if it exists.
8077
8078ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8079for ac_option
8080do
8081 case "\$ac_option" in
8082 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8083 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8084 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8085 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b27d2bd5 8086 echo "$CONFIG_STATUS generated by autoconf version 2.13"
861bb6c1
JL
8087 exit 0 ;;
8088 -help | --help | --hel | --he | --h)
8089 echo "\$ac_cs_usage"; exit 0 ;;
8090 *) echo "\$ac_cs_usage"; exit 1 ;;
8091 esac
8092done
8093
8094ac_given_srcdir=$srcdir
861bb6c1 8095
b7cb92ad 8096trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
861bb6c1
JL
8097EOF
8098cat >> $CONFIG_STATUS <<EOF
8099
8100# Protect against being on the right side of a sed subst in config.status.
8101sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8102 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8103$ac_vpsub
8104$extrasub
6f144c9c 8105s%@SHELL@%$SHELL%g
861bb6c1
JL
8106s%@CFLAGS@%$CFLAGS%g
8107s%@CPPFLAGS@%$CPPFLAGS%g
8108s%@CXXFLAGS@%$CXXFLAGS%g
b27d2bd5 8109s%@FFLAGS@%$FFLAGS%g
861bb6c1
JL
8110s%@DEFS@%$DEFS%g
8111s%@LDFLAGS@%$LDFLAGS%g
8112s%@LIBS@%$LIBS%g
8113s%@exec_prefix@%$exec_prefix%g
8114s%@prefix@%$prefix%g
8115s%@program_transform_name@%$program_transform_name%g
8116s%@bindir@%$bindir%g
8117s%@sbindir@%$sbindir%g
8118s%@libexecdir@%$libexecdir%g
8119s%@datadir@%$datadir%g
8120s%@sysconfdir@%$sysconfdir%g
8121s%@sharedstatedir@%$sharedstatedir%g
8122s%@localstatedir@%$localstatedir%g
8123s%@libdir@%$libdir%g
8124s%@includedir@%$includedir%g
8125s%@oldincludedir@%$oldincludedir%g
8126s%@infodir@%$infodir%g
8127s%@mandir@%$mandir%g
39d6f2e8 8128s%@enable_multilib@%$enable_multilib%g
50503ac8 8129s%@enable_shared@%$enable_shared%g
861bb6c1
JL
8130s%@host@%$host%g
8131s%@host_alias@%$host_alias%g
8132s%@host_cpu@%$host_cpu%g
8133s%@host_vendor@%$host_vendor%g
8134s%@host_os@%$host_os%g
8135s%@target@%$target%g
8136s%@target_alias@%$target_alias%g
8137s%@target_cpu@%$target_cpu%g
8138s%@target_vendor@%$target_vendor%g
8139s%@target_os@%$target_os%g
8140s%@build@%$build%g
8141s%@build_alias@%$build_alias%g
8142s%@build_cpu@%$build_cpu%g
8143s%@build_vendor@%$build_vendor%g
8144s%@build_os@%$build_os%g
e9a25f70 8145s%@CC@%$CC%g
3ec83fc2 8146s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
b8dad04b
ZW
8147s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
8148s%@strict1_warn@%$strict1_warn%g
84c041a1 8149s%@CPP@%$CPP%g
b8dad04b
ZW
8150s%@warn_cflags@%$warn_cflags%g
8151s%@stage1_cflags@%$stage1_cflags%g
e9a25f70 8152s%@SET_MAKE@%$SET_MAKE%g
861bb6c1 8153s%@AWK@%$AWK%g
0a4b6309
RL
8154s%@LN@%$LN%g
8155s%@LN_S@%$LN_S%g
861bb6c1 8156s%@RANLIB@%$RANLIB%g
0a4b6309
RL
8157s%@INSTALL@%$INSTALL%g
8158s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8159s%@INSTALL_DATA@%$INSTALL_DATA%g
67f28219
ZW
8160s%@GNATBIND@%$GNATBIND%g
8161s%@ADAC@%$ADAC%g
955be633 8162s%@have_mktemp_command@%$have_mktemp_command%g
09fa0705
ZW
8163s%@MAKEINFO@%$MAKEINFO%g
8164s%@BUILD_INFO@%$BUILD_INFO%g
fd939e46 8165s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g
1e608388
ZW
8166s%@FLEX@%$FLEX%g
8167s%@BISON@%$BISON%g
4e70264f 8168s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g
7f2749d4 8169s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g
e256b8b6 8170s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g
f91abfce 8171s%@LIBICONV@%$LIBICONV%g
861bb6c1 8172s%@manext@%$manext%g
992d1248 8173s%@objext@%$objext%g
06f0b04c 8174s%@FORBUILD@%$FORBUILD%g
ab87f8c8
JL
8175s%@PACKAGE@%$PACKAGE%g
8176s%@VERSION@%$VERSION%g
71a94577
ZW
8177s%@ALLOCA@%$ALLOCA%g
8178s%@GLIBC21@%$GLIBC21%g
ab87f8c8
JL
8179s%@USE_NLS@%$USE_NLS%g
8180s%@MSGFMT@%$MSGFMT%g
8181s%@GMSGFMT@%$GMSGFMT%g
8182s%@XGETTEXT@%$XGETTEXT%g
71a94577
ZW
8183s%@INTLBISON@%$INTLBISON%g
8184s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
ab87f8c8
JL
8185s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8186s%@CATALOGS@%$CATALOGS%g
8187s%@CATOBJEXT@%$CATOBJEXT%g
ab87f8c8 8188s%@INTLLIBS@%$INTLLIBS%g
77c06844 8189s%@INTLDEPS@%$INTLDEPS%g
ab87f8c8 8190s%@INTLOBJS@%$INTLOBJS%g
ab87f8c8 8191s%@POSUB@%$POSUB%g
71a94577
ZW
8192s%@DATADIRNAME@%$DATADIRNAME%g
8193s%@INSTOBJEXT@%$INSTOBJEXT%g
8194s%@GENCAT@%$GENCAT%g
ab87f8c8 8195s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
71a94577 8196s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
b39d221a 8197s%@inhibit_libc@%$inhibit_libc%g
f24af81b 8198s%@gthread_flags@%$gthread_flags%g
81bf3d9e 8199s%@GGC@%$GGC%g
3c809ba4
AG
8200s%@zlibdir@%$zlibdir%g
8201s%@zlibinc@%$zlibinc%g
dc6746e7 8202s%@MAINT@%$MAINT%g
88111b26
JL
8203s%@build_canonical@%$build_canonical%g
8204s%@host_canonical@%$host_canonical%g
8205s%@target_subdir@%$target_subdir%g
d062c304 8206s%@gcc_tooldir@%$gcc_tooldir%g
4c112cda 8207s%@dollar@%$dollar%g
2bbea3a6 8208s%@slibdir@%$slibdir%g
7e717196 8209s%@objdir@%$objdir%g
861bb6c1 8210s%@subdirs@%$subdirs%g
861bb6c1
JL
8211s%@all_boot_languages@%$all_boot_languages%g
8212s%@all_compilers@%$all_compilers%g
861bb6c1 8213s%@all_diff_excludes@%$all_diff_excludes%g
861bb6c1 8214s%@all_headers@%$all_headers%g
4f3ae93c
BK
8215s%@all_lang_makefiles@%$all_lang_makefiles%g
8216s%@all_languages@%$all_languages%g
8217s%@all_lib2funcs@%$all_lib2funcs%g
8218s%@all_stagestuff@%$all_stagestuff%g
8219s%@build_exeext@%$build_exeext%g
8220s%@build_install_headers_dir@%$build_install_headers_dir%g
8221s%@build_xm_file_list@%$build_xm_file_list%g
11642c3a
ZW
8222s%@build_xm_file@%$build_xm_file%g
8223s%@build_xm_defines@%$build_xm_defines%g
cbc59f01 8224s%@check_languages@%$check_languages%g
4f3ae93c 8225s%@cc_set_by_configure@%$cc_set_by_configure%g
5aa82ace 8226s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
4f3ae93c 8227s%@cpp_install_dir@%$cpp_install_dir%g
4f3ae93c
BK
8228s%@dep_host_xmake_file@%$dep_host_xmake_file%g
8229s%@dep_tmake_file@%$dep_tmake_file%g
8230s%@extra_c_flags@%$extra_c_flags%g
4f3ae93c 8231s%@extra_headers_list@%$extra_headers_list%g
861bb6c1 8232s%@extra_objs@%$extra_objs%g
4f3ae93c
BK
8233s%@extra_parts@%$extra_parts%g
8234s%@extra_passes@%$extra_passes%g
8235s%@extra_programs@%$extra_programs%g
4f3ae93c 8236s%@float_h_file@%$float_h_file%g
cc1e60ea 8237s%@gcc_config_arguments@%$gcc_config_arguments%g
4f3ae93c 8238s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
e2187d3b 8239s%@libstdcxx_incdir@%$libstdcxx_incdir%g
4f3ae93c 8240s%@gcc_version@%$gcc_version%g
8763704d 8241s%@gcc_version_full@%$gcc_version_full%g
4f3ae93c
BK
8242s%@gcc_version_trigger@%$gcc_version_trigger%g
8243s%@host_exeext@%$host_exeext%g
861bb6c1 8244s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
861bb6c1 8245s%@host_xm_file_list@%$host_xm_file_list%g
11642c3a
ZW
8246s%@host_xm_file@%$host_xm_file%g
8247s%@host_xm_defines@%$host_xm_defines%g
4f3ae93c 8248s%@install@%$install%g
861bb6c1 8249s%@lang_options_files@%$lang_options_files%g
4f3ae93c 8250s%@lang_specs_files@%$lang_specs_files%g
3103b7db 8251s%@lang_tree_files@%$lang_tree_files%g
861bb6c1 8252s%@local_prefix@%$local_prefix%g
4f3ae93c
BK
8253s%@md_file@%$md_file%g
8254s%@objc_boehm_gc@%$objc_boehm_gc%g
8255s%@out_file@%$out_file%g
8256s%@out_object_file@%$out_object_file%g
861bb6c1 8257s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
e9a25f70 8258s%@symbolic_link@%$symbolic_link%g
4f3ae93c
BK
8259s%@thread_file@%$thread_file%g
8260s%@tm_file_list@%$tm_file_list%g
11642c3a
ZW
8261s%@tm_file@%$tm_file%g
8262s%@tm_p_file_list@%$tm_p_file_list%g
8263s%@tm_p_file@%$tm_p_file%g
8264s%@xm_file@%$xm_file%g
3d9d2476 8265s%@xm_defines@%$xm_defines%g
aac69a49
NC
8266s%@c_target_objs@%$c_target_objs%g
8267s%@cxx_target_objs@%$cxx_target_objs%g
11642c3a 8268s%@target_cpu_default@%$target_cpu_default%g
861bb6c1
JL
8269/@target_overrides@/r $target_overrides
8270s%@target_overrides@%%g
8271/@host_overrides@/r $host_overrides
8272s%@host_overrides@%%g
8273s%@cross_defines@%$cross_defines%g
8274/@cross_overrides@/r $cross_overrides
8275s%@cross_overrides@%%g
8276/@build_overrides@/r $build_overrides
8277s%@build_overrides@%%g
8278/@language_fragments@/r $language_fragments
8279s%@language_fragments@%%g
8280/@language_hooks@/r $language_hooks
8281s%@language_hooks@%%g
8282
8283CEOF
8284EOF
8285
8286cat >> $CONFIG_STATUS <<\EOF
8287
8288# Split the substitutions into bite-sized pieces for seds with
8289# small command number limits, like on Digital OSF/1 and HP-UX.
8290ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8291ac_file=1 # Number of current file.
8292ac_beg=1 # First line for current file.
8293ac_end=$ac_max_sed_cmds # Line after last line for current file.
8294ac_more_lines=:
8295ac_sed_cmds=""
8296while $ac_more_lines; do
8297 if test $ac_beg -gt 1; then
8298 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8299 else
8300 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8301 fi
8302 if test ! -s conftest.s$ac_file; then
8303 ac_more_lines=false
8304 rm -f conftest.s$ac_file
8305 else
8306 if test -z "$ac_sed_cmds"; then
8307 ac_sed_cmds="sed -f conftest.s$ac_file"
8308 else
8309 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8310 fi
8311 ac_file=`expr $ac_file + 1`
8312 ac_beg=$ac_end
8313 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8314 fi
8315done
8316if test -z "$ac_sed_cmds"; then
8317 ac_sed_cmds=cat
8318fi
8319EOF
8320
8321cat >> $CONFIG_STATUS <<EOF
8322
8323CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
8324EOF
8325cat >> $CONFIG_STATUS <<\EOF
8326for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8327 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8328 case "$ac_file" in
8329 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8330 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8331 *) ac_file_in="${ac_file}.in" ;;
8332 esac
8333
8334 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8335
8336 # Remove last slash and all that follows it. Not all systems have dirname.
8337 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8338 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8339 # The file is in a subdirectory.
8340 test ! -d "$ac_dir" && mkdir "$ac_dir"
8341 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8342 # A "../" for each directory in $ac_dir_suffix.
8343 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8344 else
8345 ac_dir_suffix= ac_dots=
8346 fi
8347
8348 case "$ac_given_srcdir" in
8349 .) srcdir=.
8350 if test -z "$ac_dots"; then top_srcdir=.
8351 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8352 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8353 *) # Relative path.
8354 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8355 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8356 esac
8357
861bb6c1
JL
8358
8359 echo creating "$ac_file"
8360 rm -f "$ac_file"
8361 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8362 case "$ac_file" in
8363 *Makefile*) ac_comsub="1i\\
8364# $configure_input" ;;
8365 *) ac_comsub= ;;
8366 esac
8367
8368 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8369 sed -e "$ac_comsub
8370s%@configure_input@%$configure_input%g
8371s%@srcdir@%$srcdir%g
8372s%@top_srcdir@%$top_srcdir%g
861bb6c1
JL
8373" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8374fi; done
8375rm -f conftest.s*
8376
8377# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8378# NAME is the cpp macro being defined and VALUE is the value it is being given.
8379#
8380# ac_d sets the value in "#define NAME VALUE" lines.
8381ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8382ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8383ac_dC='\3'
8384ac_dD='%g'
8385# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8386ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8387ac_uB='\([ ]\)%\1#\2define\3'
8388ac_uC=' '
8389ac_uD='\4%g'
8390# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8391ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8392ac_eB='$%\1#\2define\3'
8393ac_eC=' '
8394ac_eD='%g'
8395
8396if test "${CONFIG_HEADERS+set}" != set; then
8397EOF
8398cat >> $CONFIG_STATUS <<EOF
b7cb92ad 8399 CONFIG_HEADERS="auto-host.h:config.in"
861bb6c1
JL
8400EOF
8401cat >> $CONFIG_STATUS <<\EOF
8402fi
8403for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8404 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8405 case "$ac_file" in
8406 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8407 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8408 *) ac_file_in="${ac_file}.in" ;;
8409 esac
8410
8411 echo creating $ac_file
8412
8413 rm -f conftest.frag conftest.in conftest.out
8414 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8415 cat $ac_file_inputs > conftest.in
8416
8417EOF
8418
8419# Transform confdefs.h into a sed script conftest.vals that substitutes
8420# the proper values into config.h.in to produce config.h. And first:
8421# Protect against being on the right side of a sed subst in config.status.
8422# Protect against being in an unquoted here document in config.status.
8423rm -f conftest.vals
8424cat > conftest.hdr <<\EOF
8425s/[\\&%]/\\&/g
8426s%[\\$`]%\\&%g
8427s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8428s%ac_d%ac_u%gp
8429s%ac_u%ac_e%gp
8430EOF
8431sed -n -f conftest.hdr confdefs.h > conftest.vals
8432rm -f conftest.hdr
8433
8434# This sed command replaces #undef with comments. This is necessary, for
8435# example, in the case of _POSIX_SOURCE, which is predefined and required
8436# on some systems where configure will not decide to define it.
8437cat >> conftest.vals <<\EOF
8438s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8439EOF
8440
8441# Break up conftest.vals because some shells have a limit on
8442# the size of here documents, and old seds have small limits too.
8443
8444rm -f conftest.tail
8445while :
8446do
8447 ac_lines=`grep -c . conftest.vals`
8448 # grep -c gives empty output for an empty file on some AIX systems.
8449 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8450 # Write a limited-size here document to conftest.frag.
8451 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8452 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8453 echo 'CEOF
8454 sed -f conftest.frag conftest.in > conftest.out
8455 rm -f conftest.in
8456 mv conftest.out conftest.in
8457' >> $CONFIG_STATUS
8458 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8459 rm -f conftest.vals
8460 mv conftest.tail conftest.vals
8461done
8462rm -f conftest.vals
8463
8464cat >> $CONFIG_STATUS <<\EOF
8465 rm -f conftest.frag conftest.h
8466 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8467 cat conftest.in >> conftest.h
8468 rm -f conftest.in
8469 if cmp -s $ac_file conftest.h 2>/dev/null; then
8470 echo "$ac_file is unchanged"
8471 rm -f conftest.h
8472 else
8473 # Remove last slash and all that follows it. Not all systems have dirname.
8474 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8475 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8476 # The file is in a subdirectory.
8477 test ! -d "$ac_dir" && mkdir "$ac_dir"
8478 fi
8479 rm -f $ac_file
8480 mv conftest.h $ac_file
8481 fi
8482fi; done
8483
8484EOF
8485cat >> $CONFIG_STATUS <<EOF
8486
ab87f8c8 8487
861bb6c1
JL
8488host='${host}'
8489build='${build}'
8490target='${target}'
8491target_alias='${target_alias}'
8492srcdir='${srcdir}'
8493subdirs='${subdirs}'
861bb6c1
JL
8494symbolic_link='${symbolic_link}'
8495program_transform_set='${program_transform_set}'
8496program_transform_name='${program_transform_name}'
8497dep_host_xmake_file='${dep_host_xmake_file}'
8498host_xmake_file='${host_xmake_file}'
8499dep_tmake_file='${dep_tmake_file}'
8500tmake_file='${tmake_file}'
8501thread_file='${thread_file}'
cc1e60ea 8502gcc_config_arguments='${gcc_config_arguments}'
f1943b77 8503gcc_version='${gcc_version}'
8763704d 8504gcc_version_full='${gcc_version_full}'
f1943b77 8505gcc_version_trigger='${gcc_version_trigger}'
861bb6c1
JL
8506local_prefix='${local_prefix}'
8507build_install_headers_dir='${build_install_headers_dir}'
8508build_exeext='${build_exeext}'
6e26218f 8509host_exeext='${host_exeext}'
7ed46111 8510out_file='${out_file}'
861bb6c1
JL
8511gdb_needs_out_file_path='${gdb_needs_out_file_path}'
8512SET_MAKE='${SET_MAKE}'
861bb6c1
JL
8513target_list='${target_list}'
8514target_overrides='${target_overrides}'
8515host_overrides='${host_overrides}'
8516cross_defines='${cross_defines}'
8517cross_overrides='${cross_overrides}'
8518build_overrides='${build_overrides}'
9fc9b82a 8519cpp_install_dir='${cpp_install_dir}'
861bb6c1
JL
8520
8521EOF
8522cat >> $CONFIG_STATUS <<\EOF
71a94577
ZW
8523for ac_file in $CONFIG_FILES; do
8524 # Support "outfile[:infile[:infile...]]"
8525 case "$ac_file" in
8526 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8527 esac
8528 # PO directories have a Makefile.in generated from Makefile.in.in.
8529 case "$ac_file" in */Makefile.in)
8530 # Adjust a relative srcdir.
8531 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8532 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8533 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8534 # In autoconf-2.13 it is called $ac_given_srcdir.
8535 # In autoconf-2.50 it is called $srcdir.
8536 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8537 case "$ac_given_srcdir" in
8538 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8539 /*) top_srcdir="$ac_given_srcdir" ;;
8540 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8541 esac
8542 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8543 rm -f "$ac_dir/POTFILES"
8544 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8545 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8546 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8547 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8548 fi
8549 ;;
8550 esac
8551 done
861bb6c1 8552
861bb6c1 8553case x$CONFIG_HEADERS in
b7cb92ad 8554xauto-host.h:config.in)
861bb6c1
JL
8555echo > cstamp-h ;;
8556esac
93cf819d
BK
8557# If the host supports symlinks, point stage[1234] at ../stage[1234] so
8558# bootstrapping and the installation procedure can still use
8559# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
8560# FLAGS_TO_PASS has been modified to solve the problem there.
8561# This is virtually a duplicate of what happens in configure.lang; we do
8562# an extra check to make sure this only happens if ln -s can be used.
75bffa71 8563if test "$symbolic_link" = "ln -s"; then
d8140df6 8564 for d in .. ${subdirs} fixinc ; do
75bffa71 8565 if test $d != ..; then
4e8a434e
BK
8566 STARTDIR=`pwd`
8567 cd $d
8568 for t in stage1 stage2 stage3 stage4 include
8569 do
8570 rm -f $t
8571 $symbolic_link ../$t $t 2>/dev/null
8572 done
8573 cd $STARTDIR
93cf819d
BK
8574 fi
8575 done
8576else true ; fi
ab87f8c8
JL
8577# Avoid having to add intl to our include paths.
8578if test -f intl/libintl.h; then
8579 echo creating libintl.h
8580 echo '#include "intl/libintl.h"' >libintl.h
8581fi
861bb6c1
JL
8582
8583exit 0
8584EOF
8585chmod +x $CONFIG_STATUS
8586rm -fr confdefs* $ac_clean_files
8587test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8588