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