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