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