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