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