]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
contrib.texi: Update Paolo Carlini's entry.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
ba479fd2 3# Generated by GNU Autoconf 2.57.
861bb6c1 4#
ba479fd2
NN
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6# Free Software Foundation, Inc.
861bb6c1
JL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
861bb6c1 217
ba479fd2
NN
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 as_mkdir_p=false
222fi
223
224as_executable_p="test -f"
225
226# Sed expression to map a string onto a valid CPP name.
227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229# Sed expression to map a string onto a valid variable name.
230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
231
232
233# IFS
234# We need space, tab and new line, in precisely that order.
235as_nl='
236'
237IFS=" $as_nl"
238
239# CDPATH.
240$as_unset CDPATH
241
242
243# Name of the host.
244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245# so uname gets run too.
246ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248exec 6>&1
249
250#
251# Initializations.
252#
861bb6c1 253ac_default_prefix=/usr/local
ba479fd2
NN
254ac_config_libobj_dir=.
255cross_compiling=no
256subdirs=
257MFLAGS=
258MAKEFLAGS=
259SHELL=${CONFIG_SHELL-/bin/sh}
260
261# Maximum number of lines to put in a shell here document.
262# This variable seems obsolete. It should probably be removed, and
263# only ac_max_sed_lines should be used.
264: ${ac_max_here_lines=38}
265
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
273ac_unique_file="tree.c"
274# Factoring default headers for most tests.
275ac_includes_default="\
276#include <stdio.h>
277#if HAVE_SYS_TYPES_H
278# include <sys/types.h>
279#endif
280#if HAVE_SYS_STAT_H
281# include <sys/stat.h>
282#endif
283#if STDC_HEADERS
284# include <stdlib.h>
285# include <stddef.h>
286#else
287# if HAVE_STDLIB_H
288# include <stdlib.h>
289# endif
290#endif
291#if HAVE_STRING_H
292# if !STDC_HEADERS && HAVE_MEMORY_H
293# include <memory.h>
294# endif
295# include <string.h>
296#endif
297#if HAVE_STRINGS_H
298# include <strings.h>
299#endif
300#if HAVE_INTTYPES_H
301# include <inttypes.h>
302#else
303# if HAVE_STDINT_H
304# include <stdint.h>
305# endif
306#endif
307#if HAVE_UNISTD_H
308# include <unistd.h>
309#endif"
310
03787dfd 311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir docobjdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_extra_gcc_objs host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS'
ba479fd2 312ac_subst_files='language_hooks'
861bb6c1
JL
313
314# Initialize some variables set by options.
ba479fd2
NN
315ac_init_help=
316ac_init_version=false
861bb6c1
JL
317# The variables have the same names as the options, with
318# dashes changed to underlines.
ba479fd2 319cache_file=/dev/null
861bb6c1 320exec_prefix=NONE
861bb6c1 321no_create=
861bb6c1
JL
322no_recursion=
323prefix=NONE
324program_prefix=NONE
325program_suffix=NONE
326program_transform_name=s,x,x,
327silent=
328site=
329srcdir=
861bb6c1
JL
330verbose=
331x_includes=NONE
332x_libraries=NONE
ba479fd2
NN
333
334# Installation directory options.
335# These are left unexpanded so users can "make install exec_prefix=/foo"
336# and all the variables that are supposed to be based on exec_prefix
337# by default will actually change.
338# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
339bindir='${exec_prefix}/bin'
340sbindir='${exec_prefix}/sbin'
341libexecdir='${exec_prefix}/libexec'
342datadir='${prefix}/share'
343sysconfdir='${prefix}/etc'
344sharedstatedir='${prefix}/com'
345localstatedir='${prefix}/var'
346libdir='${exec_prefix}/lib'
347includedir='${prefix}/include'
348oldincludedir='/usr/include'
349infodir='${prefix}/info'
350mandir='${prefix}/man'
351
861bb6c1
JL
352ac_prev=
353for ac_option
354do
861bb6c1
JL
355 # If the previous option needs an argument, assign it.
356 if test -n "$ac_prev"; then
357 eval "$ac_prev=\$ac_option"
358 ac_prev=
359 continue
360 fi
361
ba479fd2 362 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
363
364 # Accept the important Cygnus configure options, so we can diagnose typos.
365
ba479fd2 366 case $ac_option in
861bb6c1
JL
367
368 -bindir | --bindir | --bindi | --bind | --bin | --bi)
369 ac_prev=bindir ;;
370 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 371 bindir=$ac_optarg ;;
861bb6c1
JL
372
373 -build | --build | --buil | --bui | --bu)
ba479fd2 374 ac_prev=build_alias ;;
861bb6c1 375 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 376 build_alias=$ac_optarg ;;
861bb6c1
JL
377
378 -cache-file | --cache-file | --cache-fil | --cache-fi \
379 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380 ac_prev=cache_file ;;
381 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
383 cache_file=$ac_optarg ;;
384
385 --config-cache | -C)
386 cache_file=config.cache ;;
861bb6c1
JL
387
388 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389 ac_prev=datadir ;;
390 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391 | --da=*)
ba479fd2 392 datadir=$ac_optarg ;;
861bb6c1
JL
393
394 -disable-* | --disable-*)
ba479fd2 395 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 396 # Reject names that are not valid shell variable names.
ba479fd2
NN
397 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399 { (exit 1); exit 1; }; }
400 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
402
403 -enable-* | --enable-*)
ba479fd2 404 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 405 # Reject names that are not valid shell variable names.
ba479fd2
NN
406 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408 { (exit 1); exit 1; }; }
409 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410 case $ac_option in
411 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
412 *) ac_optarg=yes ;;
413 esac
ba479fd2 414 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
415
416 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418 | --exec | --exe | --ex)
419 ac_prev=exec_prefix ;;
420 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422 | --exec=* | --exe=* | --ex=*)
ba479fd2 423 exec_prefix=$ac_optarg ;;
861bb6c1
JL
424
425 -gas | --gas | --ga | --g)
426 # Obsolete; use --with-gas.
427 with_gas=yes ;;
428
ba479fd2
NN
429 -help | --help | --hel | --he | -h)
430 ac_init_help=long ;;
431 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432 ac_init_help=recursive ;;
433 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434 ac_init_help=short ;;
861bb6c1
JL
435
436 -host | --host | --hos | --ho)
ba479fd2 437 ac_prev=host_alias ;;
861bb6c1 438 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 439 host_alias=$ac_optarg ;;
861bb6c1
JL
440
441 -includedir | --includedir | --includedi | --included | --include \
442 | --includ | --inclu | --incl | --inc)
443 ac_prev=includedir ;;
444 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 446 includedir=$ac_optarg ;;
861bb6c1
JL
447
448 -infodir | --infodir | --infodi | --infod | --info | --inf)
449 ac_prev=infodir ;;
450 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 451 infodir=$ac_optarg ;;
861bb6c1
JL
452
453 -libdir | --libdir | --libdi | --libd)
454 ac_prev=libdir ;;
455 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 456 libdir=$ac_optarg ;;
861bb6c1
JL
457
458 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459 | --libexe | --libex | --libe)
460 ac_prev=libexecdir ;;
461 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462 | --libexe=* | --libex=* | --libe=*)
ba479fd2 463 libexecdir=$ac_optarg ;;
861bb6c1
JL
464
465 -localstatedir | --localstatedir | --localstatedi | --localstated \
466 | --localstate | --localstat | --localsta | --localst \
467 | --locals | --local | --loca | --loc | --lo)
468 ac_prev=localstatedir ;;
469 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 472 localstatedir=$ac_optarg ;;
861bb6c1
JL
473
474 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475 ac_prev=mandir ;;
476 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 477 mandir=$ac_optarg ;;
861bb6c1
JL
478
479 -nfp | --nfp | --nf)
480 # Obsolete; use --without-fp.
481 with_fp=no ;;
482
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 484 | --no-cr | --no-c | -n)
861bb6c1
JL
485 no_create=yes ;;
486
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489 no_recursion=yes ;;
490
491 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493 | --oldin | --oldi | --old | --ol | --o)
494 ac_prev=oldincludedir ;;
495 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 498 oldincludedir=$ac_optarg ;;
861bb6c1
JL
499
500 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501 ac_prev=prefix ;;
502 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 503 prefix=$ac_optarg ;;
861bb6c1
JL
504
505 -program-prefix | --program-prefix | --program-prefi | --program-pref \
506 | --program-pre | --program-pr | --program-p)
507 ac_prev=program_prefix ;;
508 -program-prefix=* | --program-prefix=* | --program-prefi=* \
509 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 510 program_prefix=$ac_optarg ;;
861bb6c1
JL
511
512 -program-suffix | --program-suffix | --program-suffi | --program-suff \
513 | --program-suf | --program-su | --program-s)
514 ac_prev=program_suffix ;;
515 -program-suffix=* | --program-suffix=* | --program-suffi=* \
516 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 517 program_suffix=$ac_optarg ;;
861bb6c1
JL
518
519 -program-transform-name | --program-transform-name \
520 | --program-transform-nam | --program-transform-na \
521 | --program-transform-n | --program-transform- \
522 | --program-transform | --program-transfor \
523 | --program-transfo | --program-transf \
524 | --program-trans | --program-tran \
525 | --progr-tra | --program-tr | --program-t)
526 ac_prev=program_transform_name ;;
527 -program-transform-name=* | --program-transform-name=* \
528 | --program-transform-nam=* | --program-transform-na=* \
529 | --program-transform-n=* | --program-transform-=* \
530 | --program-transform=* | --program-transfor=* \
531 | --program-transfo=* | --program-transf=* \
532 | --program-trans=* | --program-tran=* \
533 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 534 program_transform_name=$ac_optarg ;;
861bb6c1
JL
535
536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537 | -silent | --silent | --silen | --sile | --sil)
538 silent=yes ;;
539
540 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541 ac_prev=sbindir ;;
542 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543 | --sbi=* | --sb=*)
ba479fd2 544 sbindir=$ac_optarg ;;
861bb6c1
JL
545
546 -sharedstatedir | --sharedstatedir | --sharedstatedi \
547 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548 | --sharedst | --shareds | --shared | --share | --shar \
549 | --sha | --sh)
550 ac_prev=sharedstatedir ;;
551 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554 | --sha=* | --sh=*)
ba479fd2 555 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
556
557 -site | --site | --sit)
558 ac_prev=site ;;
559 -site=* | --site=* | --sit=*)
ba479fd2 560 site=$ac_optarg ;;
861bb6c1
JL
561
562 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563 ac_prev=srcdir ;;
564 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 565 srcdir=$ac_optarg ;;
861bb6c1
JL
566
567 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568 | --syscon | --sysco | --sysc | --sys | --sy)
569 ac_prev=sysconfdir ;;
570 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 572 sysconfdir=$ac_optarg ;;
861bb6c1
JL
573
574 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 575 ac_prev=target_alias ;;
861bb6c1 576 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 577 target_alias=$ac_optarg ;;
861bb6c1
JL
578
579 -v | -verbose | --verbose | --verbos | --verbo | --verb)
580 verbose=yes ;;
581
ba479fd2
NN
582 -version | --version | --versio | --versi | --vers | -V)
583 ac_init_version=: ;;
861bb6c1
JL
584
585 -with-* | --with-*)
ba479fd2 586 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 587 # Reject names that are not valid shell variable names.
ba479fd2
NN
588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
861bb6c1 591 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
592 case $ac_option in
593 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
594 *) ac_optarg=yes ;;
595 esac
ba479fd2 596 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
597
598 -without-* | --without-*)
ba479fd2 599 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 600 # Reject names that are not valid shell variable names.
ba479fd2
NN
601 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602 { echo "$as_me: error: invalid package name: $ac_package" >&2
603 { (exit 1); exit 1; }; }
604 ac_package=`echo $ac_package | sed 's/-/_/g'`
605 eval "with_$ac_package=no" ;;
861bb6c1
JL
606
607 --x)
608 # Obsolete; use --with-x.
609 with_x=yes ;;
610
611 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612 | --x-incl | --x-inc | --x-in | --x-i)
613 ac_prev=x_includes ;;
614 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 616 x_includes=$ac_optarg ;;
861bb6c1
JL
617
618 -x-libraries | --x-libraries | --x-librarie | --x-librari \
619 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620 ac_prev=x_libraries ;;
621 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 623 x_libraries=$ac_optarg ;;
861bb6c1 624
ba479fd2
NN
625 -*) { echo "$as_me: error: unrecognized option: $ac_option
626Try \`$0 --help' for more information." >&2
627 { (exit 1); exit 1; }; }
861bb6c1
JL
628 ;;
629
ba479fd2
NN
630 *=*)
631 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632 # Reject names that are not valid shell variable names.
633 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635 { (exit 1); exit 1; }; }
636 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637 eval "$ac_envvar='$ac_optarg'"
638 export $ac_envvar ;;
639
861bb6c1 640 *)
ba479fd2
NN
641 # FIXME: should be removed in autoconf 3.0.
642 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
646 ;;
647
648 esac
649done
650
651if test -n "$ac_prev"; then
ba479fd2
NN
652 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653 { echo "$as_me: error: missing argument to $ac_option" >&2
654 { (exit 1); exit 1; }; }
63cf211a 655fi
63cf211a 656
ba479fd2
NN
657# Be sure to have absolute paths.
658for ac_var in exec_prefix prefix
659do
660 eval ac_val=$`echo $ac_var`
661 case $ac_val in
662 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664 { (exit 1); exit 1; }; };;
665 esac
666done
093e61a6 667
ba479fd2
NN
668# Be sure to have absolute paths.
669for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 671do
ba479fd2
NN
672 eval ac_val=$`echo $ac_var`
673 case $ac_val in
674 [\\/$]* | ?:[\\/]* ) ;;
675 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676 { (exit 1); exit 1; }; };;
861bb6c1
JL
677 esac
678done
679
ba479fd2
NN
680# There might be people who depend on the old broken behavior: `$host'
681# used to hold the argument of --host etc.
682# FIXME: To remove some day.
683build=$build_alias
684host=$host_alias
685target=$target_alias
686
687# FIXME: To remove some day.
688if test "x$host_alias" != x; then
689 if test "x$build_alias" = x; then
690 cross_compiling=maybe
691 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692 If a cross compiler is detected then cross compile mode will be used." >&2
693 elif test "x$build_alias" != "x$host_alias"; then
694 cross_compiling=yes
695 fi
696fi
6e3f3080 697
ba479fd2
NN
698ac_tool_prefix=
699test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701test "$silent" = yes && exec 6>/dev/null
861bb6c1 702
861bb6c1
JL
703
704# Find the source files, if location was not specified.
705if test -z "$srcdir"; then
706 ac_srcdir_defaulted=yes
707 # Try the directory containing this script, then its parent.
ba479fd2
NN
708 ac_confdir=`(dirname "$0") 2>/dev/null ||
709$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710 X"$0" : 'X\(//\)[^/]' \| \
711 X"$0" : 'X\(//\)$' \| \
712 X"$0" : 'X\(/\)' \| \
713 . : '\(.\)' 2>/dev/null ||
714echo X"$0" |
715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717 /^X\(\/\/\)$/{ s//\1/; q; }
718 /^X\(\/\).*/{ s//\1/; q; }
719 s/.*/./; q'`
861bb6c1
JL
720 srcdir=$ac_confdir
721 if test ! -r $srcdir/$ac_unique_file; then
722 srcdir=..
723 fi
724else
725 ac_srcdir_defaulted=no
726fi
727if test ! -r $srcdir/$ac_unique_file; then
728 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
729 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730 { (exit 1); exit 1; }; }
63cf211a 731 else
ba479fd2
NN
732 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733 { (exit 1); exit 1; }; }
63cf211a
NN
734 fi
735fi
ba479fd2
NN
736(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738 { (exit 1); exit 1; }; }
739srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740ac_env_build_alias_set=${build_alias+set}
741ac_env_build_alias_value=$build_alias
742ac_cv_env_build_alias_set=${build_alias+set}
743ac_cv_env_build_alias_value=$build_alias
744ac_env_host_alias_set=${host_alias+set}
745ac_env_host_alias_value=$host_alias
746ac_cv_env_host_alias_set=${host_alias+set}
747ac_cv_env_host_alias_value=$host_alias
748ac_env_target_alias_set=${target_alias+set}
749ac_env_target_alias_value=$target_alias
750ac_cv_env_target_alias_set=${target_alias+set}
751ac_cv_env_target_alias_value=$target_alias
752ac_env_CC_set=${CC+set}
753ac_env_CC_value=$CC
754ac_cv_env_CC_set=${CC+set}
755ac_cv_env_CC_value=$CC
756ac_env_CFLAGS_set=${CFLAGS+set}
757ac_env_CFLAGS_value=$CFLAGS
758ac_cv_env_CFLAGS_set=${CFLAGS+set}
759ac_cv_env_CFLAGS_value=$CFLAGS
760ac_env_LDFLAGS_set=${LDFLAGS+set}
761ac_env_LDFLAGS_value=$LDFLAGS
762ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763ac_cv_env_LDFLAGS_value=$LDFLAGS
764ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765ac_env_CPPFLAGS_value=$CPPFLAGS
766ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768ac_env_CPP_set=${CPP+set}
769ac_env_CPP_value=$CPP
770ac_cv_env_CPP_set=${CPP+set}
771ac_cv_env_CPP_value=$CPP
63cf211a 772
ba479fd2
NN
773#
774# Report the --help message.
775#
776if test "$ac_init_help" = "long"; then
777 # Omit some internal or obsolete options to make the list less imposing.
778 # This message is too long to be a string in the A/UX 3.1 sh.
779 cat <<_ACEOF
780\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 781
ba479fd2 782Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 783
ba479fd2
NN
784To assign environment variables (e.g., CC, CFLAGS...), specify them as
785VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 786
ba479fd2 787Defaults for the options are specified in brackets.
861bb6c1 788
ba479fd2
NN
789Configuration:
790 -h, --help display this help and exit
791 --help=short display options specific to this package
792 --help=recursive display the short help of all the included packages
793 -V, --version display version information and exit
794 -q, --quiet, --silent do not print \`checking...' messages
795 --cache-file=FILE cache test results in FILE [disabled]
796 -C, --config-cache alias for \`--cache-file=config.cache'
797 -n, --no-create do not create output files
798 --srcdir=DIR find the sources in DIR [configure dir or \`..']
799
800_ACEOF
801
802 cat <<_ACEOF
803Installation directories:
804 --prefix=PREFIX install architecture-independent files in PREFIX
805 [$ac_default_prefix]
806 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
807 [PREFIX]
861bb6c1 808
ba479fd2
NN
809By default, \`make install' will install all the files in
810\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
811an installation prefix other than \`$ac_default_prefix' using \`--prefix',
812for instance \`--prefix=\$HOME'.
13c22933 813
ba479fd2 814For better control, use the options below.
13c22933 815
ba479fd2
NN
816Fine tuning of the installation directories:
817 --bindir=DIR user executables [EPREFIX/bin]
818 --sbindir=DIR system admin executables [EPREFIX/sbin]
819 --libexecdir=DIR program executables [EPREFIX/libexec]
820 --datadir=DIR read-only architecture-independent data [PREFIX/share]
821 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
822 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
823 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
824 --libdir=DIR object code libraries [EPREFIX/lib]
825 --includedir=DIR C header files [PREFIX/include]
826 --oldincludedir=DIR C header files for non-gcc [/usr/include]
827 --infodir=DIR info documentation [PREFIX/info]
828 --mandir=DIR man documentation [PREFIX/man]
829_ACEOF
13c22933 830
ba479fd2 831 cat <<\_ACEOF
13c22933 832
ba479fd2
NN
833Program names:
834 --program-prefix=PREFIX prepend PREFIX to installed program names
835 --program-suffix=SUFFIX append SUFFIX to installed program names
836 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 837
ba479fd2
NN
838System types:
839 --build=BUILD configure for building on BUILD [guessed]
840 --host=HOST cross-compile to build programs to run on HOST [BUILD]
841 --target=TARGET configure for building compilers for TARGET [HOST]
842_ACEOF
13c22933
JJ
843fi
844
ba479fd2 845if test -n "$ac_init_help"; then
13c22933 846
ba479fd2 847 cat <<\_ACEOF
13c22933 848
ba479fd2
NN
849Optional Features:
850 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
851 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
852 --enable-generated-files-in-srcdir
853 put copies of generated files in source dir
854 intended for creating source tarballs for users
855 without texinfo bison or flex.
ba479fd2
NN
856 --enable-werror enable -Werror in bootstrap stage2 and later
857 --enable-checking=LIST
858 enable expensive run-time checks. With LIST,
859 enable only specific categories of checks.
860 Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
861 default is misc,tree,gc,rtlflag
862 --enable-coverage=LEVEL
863 enable compiler\'s code coverage collection.
864 Use to measure compiler performance and locate
865 unused parts of the compiler. With LEVEL, specify
866 optimization. Values are opt, noopt,
867 default is noopt
868 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
869 --enable-multilib enable library support for multiple ABIs
870 --enable-__cxa_atexit enable __cxa_atexit for C++
871 --enable-threads enable thread usage for target GCC
872 --enable-threads=LIB use LIB thread package for target GCC
873 --enable-objc-gc enable the use of Boehm's garbage collector with
874 the GNU Objective-C runtime
875 --disable-shared don't provide a shared libgcc
876 --enable-intermodule build the compiler in one step
877 --enable-initfini-array use .init_array/.fini_array sections
878 --enable-sjlj-exceptions
879 arrange to use setjmp/longjmp exception handling
880 --enable-libunwind-exceptions force use libunwind for exceptions
881 --disable-win32-registry
882 disable lookup of installation paths in the
883 Registry on Windows hosts
884 --enable-win32-registry enable registry lookup (default)
885 --enable-win32-registry=KEY
886 use KEY instead of GCC version as the last portion
887 of the registry key
888 --enable-maintainer-mode
889 enable make rules and dependencies not useful
890 (and sometimes confusing) to the casual installer
891 --enable-version-specific-runtime-libs
892 specify that runtime libraries should be
893 installed in a compiler-specific directory
093e61a6 894
ba479fd2
NN
895Optional Packages:
896 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
897 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
898 --with-local-prefix=DIR specifies directory to put local include
899 --with-gxx-include-dir=DIR
900 specifies directory to put g++ header files
901 --with-cpp-install-dir=DIR
902 install the user visible C preprocessor in DIR
903 (relative to PREFIX) as well as PREFIX/bin
904 --with-gnu-ld arrange to work with GNU ld.
905 --with-ld arrange to use the specified ld (full pathname)
906 --with-gnu-as arrange to work with GNU as
907 --with-as arrange to use the specified as (full pathname)
908 --with-stabs arrange to use stabs instead of host debug format
909 --with-dwarf2 force the default debug format to be DWARF 2
910 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
911 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
59415997 912 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
913 with the compiler
914 --with-system-zlib use installed libz
915 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 916
ba479fd2
NN
917Some influential environment variables:
918 CC C compiler command
919 CFLAGS C compiler flags
920 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
921 nonstandard directory <lib dir>
922 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
923 headers in a nonstandard directory <include dir>
924 CPP C preprocessor
13c22933 925
ba479fd2
NN
926Use these variables to override the choices made by `configure' or to help
927it to find libraries and programs with nonstandard names/locations.
73458fb7 928
ba479fd2
NN
929_ACEOF
930fi
6e3f3080 931
ba479fd2
NN
932if test "$ac_init_help" = "recursive"; then
933 # If there are subdirs, report their specific --help.
934 ac_popdir=`pwd`
935 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
936 test -d $ac_dir || continue
937 ac_builddir=.
938
939if test "$ac_dir" != .; then
940 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
941 # A "../" for each directory in $ac_dir_suffix.
942 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
943else
944 ac_dir_suffix= ac_top_builddir=
945fi
946
947case $srcdir in
948 .) # No --srcdir option. We are building in place.
949 ac_srcdir=.
950 if test -z "$ac_top_builddir"; then
951 ac_top_srcdir=.
952 else
953 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
954 fi ;;
955 [\\/]* | ?:[\\/]* ) # Absolute path.
956 ac_srcdir=$srcdir$ac_dir_suffix;
957 ac_top_srcdir=$srcdir ;;
958 *) # Relative path.
959 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
960 ac_top_srcdir=$ac_top_builddir$srcdir ;;
961esac
962# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
963# absolute.
964ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
965ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
966ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
967ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
968
969 cd $ac_dir
970 # Check for guested configure; otherwise get Cygnus style configure.
971 if test -f $ac_srcdir/configure.gnu; then
972 echo
973 $SHELL $ac_srcdir/configure.gnu --help=recursive
974 elif test -f $ac_srcdir/configure; then
975 echo
976 $SHELL $ac_srcdir/configure --help=recursive
977 elif test -f $ac_srcdir/configure.ac ||
978 test -f $ac_srcdir/configure.in; then
979 echo
980 $ac_configure --help
981 else
982 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
983 fi
a6a5e4c9 984 cd $ac_popdir
ba479fd2
NN
985 done
986fi
987
988test -n "$ac_init_help" && exit 0
989if $ac_init_version; then
990 cat <<\_ACEOF
991
992Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
993Free Software Foundation, Inc.
994This configure script is free software; the Free Software Foundation
995gives unlimited permission to copy, distribute and modify it.
996_ACEOF
997 exit 0
998fi
999exec 5>config.log
1000cat >&5 <<_ACEOF
1001This file contains any messages produced by compilers while
1002running configure, to aid debugging if configure makes a mistake.
1003
1004It was created by $as_me, which was
1005generated by GNU Autoconf 2.57. Invocation command line was
1006
1007 $ $0 $@
1008
1009_ACEOF
1010{
1011cat <<_ASUNAME
1012## --------- ##
1013## Platform. ##
1014## --------- ##
1015
1016hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1017uname -m = `(uname -m) 2>/dev/null || echo unknown`
1018uname -r = `(uname -r) 2>/dev/null || echo unknown`
1019uname -s = `(uname -s) 2>/dev/null || echo unknown`
1020uname -v = `(uname -v) 2>/dev/null || echo unknown`
1021
1022/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1023/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1024
1025/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1026/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1027/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1028hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1029/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1030/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1031/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1032
1033_ASUNAME
1034
1035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1036for as_dir in $PATH
1037do
1038 IFS=$as_save_IFS
1039 test -z "$as_dir" && as_dir=.
1040 echo "PATH: $as_dir"
1041done
1042
1043} >&5
1044
1045cat >&5 <<_ACEOF
1046
1047
1048## ----------- ##
1049## Core tests. ##
1050## ----------- ##
1051
1052_ACEOF
1053
1054
1055# Keep a trace of the command line.
1056# Strip out --no-create and --no-recursion so they do not pile up.
1057# Strip out --silent because we don't want to record it for future runs.
1058# Also quote any args containing shell meta-characters.
1059# Make two passes to allow for proper duplicate-argument suppression.
1060ac_configure_args=
1061ac_configure_args0=
1062ac_configure_args1=
1063ac_sep=
1064ac_must_keep_next=false
1065for ac_pass in 1 2
1066do
1067 for ac_arg
1068 do
1069 case $ac_arg in
1070 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 continue ;;
1074 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1075 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1076 esac
1077 case $ac_pass in
1078 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1079 2)
1080 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1081 if test $ac_must_keep_next = true; then
1082 ac_must_keep_next=false # Got value, back to normal.
1083 else
1084 case $ac_arg in
1085 *=* | --config-cache | -C | -disable-* | --disable-* \
1086 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1087 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1088 | -with-* | --with-* | -without-* | --without-* | --x)
1089 case "$ac_configure_args0 " in
1090 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1091 esac
1092 ;;
1093 -* ) ac_must_keep_next=true ;;
1094 esac
1095 fi
1096 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1097 # Get rid of the leading space.
1098 ac_sep=" "
1099 ;;
1100 esac
1101 done
1102done
1103$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1104$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1105
1106# When interrupted or exit'd, cleanup temporary files, and complete
1107# config.log. We remove comments because anyway the quotes in there
1108# would cause problems or look ugly.
1109# WARNING: Be sure not to use single quotes in there, as some shells,
1110# such as our DU 5.0 friend, will then `close' the trap.
1111trap 'exit_status=$?
1112 # Save into config.log some information that might help in debugging.
1113 {
1114 echo
1115
1116 cat <<\_ASBOX
1117## ---------------- ##
1118## Cache variables. ##
1119## ---------------- ##
1120_ASBOX
1121 echo
1122 # The following way of writing the cache mishandles newlines in values,
1123{
1124 (set) 2>&1 |
1125 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1126 *ac_space=\ *)
1127 sed -n \
1128 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1129 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1130 ;;
1131 *)
1132 sed -n \
1133 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1134 ;;
1135 esac;
1136}
1137 echo
1138
1139 cat <<\_ASBOX
1140## ----------------- ##
1141## Output variables. ##
1142## ----------------- ##
1143_ASBOX
1144 echo
1145 for ac_var in $ac_subst_vars
1146 do
1147 eval ac_val=$`echo $ac_var`
1148 echo "$ac_var='"'"'$ac_val'"'"'"
1149 done | sort
1150 echo
1151
1152 if test -n "$ac_subst_files"; then
1153 cat <<\_ASBOX
1154## ------------- ##
1155## Output files. ##
1156## ------------- ##
1157_ASBOX
1158 echo
1159 for ac_var in $ac_subst_files
1160 do
1161 eval ac_val=$`echo $ac_var`
1162 echo "$ac_var='"'"'$ac_val'"'"'"
1163 done | sort
1164 echo
1165 fi
1166
1167 if test -s confdefs.h; then
1168 cat <<\_ASBOX
1169## ----------- ##
1170## confdefs.h. ##
1171## ----------- ##
1172_ASBOX
1173 echo
1174 sed "/^$/d" confdefs.h | sort
1175 echo
1176 fi
1177 test "$ac_signal" != 0 &&
1178 echo "$as_me: caught signal $ac_signal"
1179 echo "$as_me: exit $exit_status"
1180 } >&5
a6a5e4c9 1181 rm -f core core.* *.core &&
ba479fd2
NN
1182 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1183 exit $exit_status
1184 ' 0
1185for ac_signal in 1 2 13 15; do
1186 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1187done
1188ac_signal=0
1189
1190# confdefs.h avoids OS command line length limits that DEFS can exceed.
1191rm -rf conftest* confdefs.h
1192# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1193echo >confdefs.h
1194
1195# Predefined preprocessor variables.
1196
1197cat >>confdefs.h <<_ACEOF
1198#define PACKAGE_NAME "$PACKAGE_NAME"
1199_ACEOF
1200
1201
1202cat >>confdefs.h <<_ACEOF
1203#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1204_ACEOF
1205
1206
1207cat >>confdefs.h <<_ACEOF
1208#define PACKAGE_VERSION "$PACKAGE_VERSION"
1209_ACEOF
1210
1211
1212cat >>confdefs.h <<_ACEOF
1213#define PACKAGE_STRING "$PACKAGE_STRING"
1214_ACEOF
1215
1216
1217cat >>confdefs.h <<_ACEOF
1218#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1219_ACEOF
1220
1221
1222# Let the site file select an alternate cache file if it wants to.
1223# Prefer explicitly selected file to automatically selected ones.
1224if test -z "$CONFIG_SITE"; then
1225 if test "x$prefix" != xNONE; then
1226 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1227 else
1228 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1229 fi
1230fi
1231for ac_site_file in $CONFIG_SITE; do
1232 if test -r "$ac_site_file"; then
1233 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1234echo "$as_me: loading site script $ac_site_file" >&6;}
1235 sed 's/^/| /' "$ac_site_file" >&5
1236 . "$ac_site_file"
1237 fi
1238done
1239
1240if test -r "$cache_file"; then
1241 # Some versions of bash will fail to source /dev/null (special
1242 # files actually), so we avoid doing that.
1243 if test -f "$cache_file"; then
1244 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1245echo "$as_me: loading cache $cache_file" >&6;}
1246 case $cache_file in
1247 [\\/]* | ?:[\\/]* ) . $cache_file;;
1248 *) . ./$cache_file;;
1249 esac
1250 fi
1251else
1252 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1253echo "$as_me: creating cache $cache_file" >&6;}
1254 >$cache_file
1255fi
1256
1257# Check that the precious variables saved in the cache have kept the same
1258# value.
1259ac_cache_corrupted=false
1260for ac_var in `(set) 2>&1 |
1261 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1262 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1263 eval ac_new_set=\$ac_env_${ac_var}_set
1264 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1265 eval ac_new_val="\$ac_env_${ac_var}_value"
1266 case $ac_old_set,$ac_new_set in
1267 set,)
1268 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1269echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1270 ac_cache_corrupted=: ;;
1271 ,set)
1272 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1273echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1274 ac_cache_corrupted=: ;;
1275 ,);;
1276 *)
1277 if test "x$ac_old_val" != "x$ac_new_val"; then
1278 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1279echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1280 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1281echo "$as_me: former value: $ac_old_val" >&2;}
1282 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1283echo "$as_me: current value: $ac_new_val" >&2;}
1284 ac_cache_corrupted=:
1285 fi;;
1286 esac
1287 # Pass precious variables to config.status.
1288 if test "$ac_new_set" = set; then
1289 case $ac_new_val in
1290 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1291 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1292 *) ac_arg=$ac_var=$ac_new_val ;;
1293 esac
1294 case " $ac_configure_args " in
1295 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1296 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1297 esac
1298 fi
1299done
1300if $ac_cache_corrupted; then
1301 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1302echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1303 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1304echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1305 { (exit 1); exit 1; }; }
1306fi
1307
1308ac_ext=c
1309ac_cpp='$CPP $CPPFLAGS'
1310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1312ac_compiler_gnu=$ac_cv_c_compiler_gnu
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
914c5af7 1332
ba479fd2
NN
1333 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1334
1335
1336# Determine the host, build, and target systems
1337ac_aux_dir=
1338for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1339 if test -f $ac_dir/install-sh; then
1340 ac_aux_dir=$ac_dir
1341 ac_install_sh="$ac_aux_dir/install-sh -c"
1342 break
1343 elif test -f $ac_dir/install.sh; then
1344 ac_aux_dir=$ac_dir
1345 ac_install_sh="$ac_aux_dir/install.sh -c"
1346 break
1347 elif test -f $ac_dir/shtool; then
1348 ac_aux_dir=$ac_dir
1349 ac_install_sh="$ac_aux_dir/shtool install -c"
1350 break
1351 fi
1352done
1353if test -z "$ac_aux_dir"; then
1354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1355echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1356 { (exit 1); exit 1; }; }
1357fi
1358ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1359ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1360ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1361
1362# Make sure we can run config.sub.
1363$ac_config_sub sun4 >/dev/null 2>&1 ||
1364 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1365echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1366 { (exit 1); exit 1; }; }
1367
1368echo "$as_me:$LINENO: checking build system type" >&5
1369echo $ECHO_N "checking build system type... $ECHO_C" >&6
1370if test "${ac_cv_build+set}" = set; then
1371 echo $ECHO_N "(cached) $ECHO_C" >&6
1372else
1373 ac_cv_build_alias=$build_alias
1374test -z "$ac_cv_build_alias" &&
1375 ac_cv_build_alias=`$ac_config_guess`
1376test -z "$ac_cv_build_alias" &&
1377 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1378echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1379 { (exit 1); exit 1; }; }
1380ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1381 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1382echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1383 { (exit 1); exit 1; }; }
1384
1385fi
1386echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1387echo "${ECHO_T}$ac_cv_build" >&6
1388build=$ac_cv_build
1389build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1390build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1391build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1392
1393
1394echo "$as_me:$LINENO: checking host system type" >&5
1395echo $ECHO_N "checking host system type... $ECHO_C" >&6
1396if test "${ac_cv_host+set}" = set; then
1397 echo $ECHO_N "(cached) $ECHO_C" >&6
1398else
1399 ac_cv_host_alias=$host_alias
1400test -z "$ac_cv_host_alias" &&
1401 ac_cv_host_alias=$ac_cv_build_alias
1402ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1403 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1404echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1405 { (exit 1); exit 1; }; }
1406
1407fi
1408echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1409echo "${ECHO_T}$ac_cv_host" >&6
1410host=$ac_cv_host
1411host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1412host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1413host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1414
1415
1416echo "$as_me:$LINENO: checking target system type" >&5
1417echo $ECHO_N "checking target system type... $ECHO_C" >&6
1418if test "${ac_cv_target+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
1420else
1421 ac_cv_target_alias=$target_alias
1422test "x$ac_cv_target_alias" = "x" &&
1423 ac_cv_target_alias=$ac_cv_host_alias
1424ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1425 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1426echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1427 { (exit 1); exit 1; }; }
1428
1429fi
1430echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1431echo "${ECHO_T}$ac_cv_target" >&6
1432target=$ac_cv_target
1433target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1434target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1435target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1436
1437
1438# The aliases save the names the user supplied, while $host etc.
1439# will get canonicalized.
1440test -n "$target_alias" &&
1441 test "$program_prefix$program_suffix$program_transform_name" = \
1442 NONENONEs,x,x, &&
1443 program_prefix=${target_alias}-
1444
1445# Determine the noncanonical target name, for directory use.
1446 case ${build_alias} in
1447 "") build_noncanonical=${build} ;;
6e3f3080
NN
1448 *) build_noncanonical=${build_alias} ;;
1449esac
73458fb7 1450
4665e56c
NN
1451 case ${host_alias} in
1452 "") host_noncanonical=${build_noncanonical} ;;
1453 *) host_noncanonical=${host_alias} ;;
1454esac
73458fb7 1455
4665e56c
NN
1456 case ${target_alias} in
1457 "") target_noncanonical=${host_noncanonical} ;;
1458 *) target_noncanonical=${target_alias} ;;
1459esac
093e61a6 1460
caa55b1e
NN
1461
1462# Determine the target- and build-specific subdirectories
4665e56c
NN
1463 # Prefix 'build-' so this never conflicts with target_subdir.
1464build_subdir="build-${build_noncanonical}"
1465# Not really a subdirectory, but here for completeness.
1466host_subdir=.
1467# No prefix.
1468target_subdir=${target_noncanonical}
ba479fd2 1469
73458fb7 1470
093e61a6 1471# Set program_transform_name
13c22933 1472test "$program_prefix" != NONE &&
ba479fd2 1473 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1474# Use a double $ so make ignores it.
1475test "$program_suffix" != NONE &&
ba479fd2
NN
1476 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1477# Double any \ or $. echo might interpret backslashes.
1478# By default was `s,x,x', remove it if useless.
1479cat <<\_ACEOF >conftest.sed
1480s/[\\$]/&&/g;s/;s,x,x,$//
1481_ACEOF
1482program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1483rm conftest.sed
13c22933
JJ
1484
1485
34a86c2b
NN
1486# Check for bogus environment variables.
1487# Test if LIBRARY_PATH contains the notation for the current directory
1488# since this would lead to problems installing/building glibc.
1489# LIBRARY_PATH contains the current directory if one of the following
1490# is true:
1491# - one of the terminals (":" and ";") is the first or last sign
1492# - two terminals occur directly after each other
1493# - the path contains an element with a dot in it
ba479fd2
NN
1494echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1495echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1496case ${LIBRARY_PATH} in
1497 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1498 library_path_setting="contains current directory"
1499 ;;
1500 *)
1501 library_path_setting="ok"
1502 ;;
1503esac
ba479fd2
NN
1504echo "$as_me:$LINENO: result: $library_path_setting" >&5
1505echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1506if test "$library_path_setting" != "ok"; then
ba479fd2 1507{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1508*** LIBRARY_PATH shouldn't contain the current directory when
1509*** building gcc. Please change the environment variable
ba479fd2
NN
1510*** and run configure again." >&5
1511echo "$as_me: error:
1512*** LIBRARY_PATH shouldn't contain the current directory when
1513*** building gcc. Please change the environment variable
1514*** and run configure again." >&2;}
1515 { (exit 1); exit 1; }; }
e9a25f70
JL
1516fi
1517
34a86c2b
NN
1518# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1519# since this would lead to problems installing/building glibc.
1520# GCC_EXEC_PREFIX contains the current directory if one of the following
1521# is true:
1522# - one of the terminals (":" and ";") is the first or last sign
1523# - two terminals occur directly after each other
1524# - the path contains an element with a dot in it
ba479fd2
NN
1525echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1526echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1527case ${GCC_EXEC_PREFIX} in
1528 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1529 gcc_exec_prefix_setting="contains current directory"
1530 ;;
1531 *)
1532 gcc_exec_prefix_setting="ok"
1533 ;;
1534esac
ba479fd2
NN
1535echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1536echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1537if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1538{ { echo "$as_me:$LINENO: error:
1539*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1540*** building gcc. Please change the environment variable
1541*** and run configure again." >&5
1542echo "$as_me: error:
cafe096b
EC
1543*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1544*** building gcc. Please change the environment variable
ba479fd2
NN
1545*** and run configure again." >&2;}
1546 { (exit 1); exit 1; }; }
34a86c2b
NN
1547fi
1548
1549# -----------
1550# Directories
1551# -----------
1552
1553# Specify the local prefix
1554local_prefix=
ba479fd2 1555
34a86c2b
NN
1556# Check whether --with-local-prefix or --without-local-prefix was given.
1557if test "${with_local_prefix+set}" = set; then
1558 withval="$with_local_prefix"
1559 case "${withval}" in
ba479fd2
NN
1560yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1561echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1562 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1563no) ;;
1564*) local_prefix=$with_local_prefix ;;
1565esac
ba479fd2 1566fi;
34a86c2b
NN
1567
1568# Default local prefix if it is empty
1569if test x$local_prefix = x; then
1570 local_prefix=/usr/local
1571fi
1572
1573# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1574# passed in by the toplevel make and thus we'd get different behavior
1575# depending on where we built the sources.
1576gcc_gxx_include_dir=
1577# Specify the g++ header file directory
ba479fd2 1578
34a86c2b
NN
1579# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1580if test "${with_gxx_include_dir+set}" = set; then
1581 withval="$with_gxx_include_dir"
1582 case "${withval}" in
ba479fd2
NN
1583yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1584echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1585 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1586no) ;;
1587*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1588esac
ba479fd2 1589fi;
34a86c2b
NN
1590
1591if test x${gcc_gxx_include_dir} = x; then
1592 if test x${enable_version_specific_runtime_libs} = xyes; then
1593 gcc_gxx_include_dir='${libsubdir}/include/c++'
1594 else
1595 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
1596 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1597 fi
1598fi
1599
ba479fd2 1600
34a86c2b
NN
1601# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1602if test "${with_cpp_install_dir+set}" = set; then
1603 withval="$with_cpp_install_dir"
1604 if test x$withval = xyes; then
ba479fd2
NN
1605 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1606echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1607 { (exit 1); exit 1; }; }
34a86c2b
NN
1608elif test x$withval != xno; then
1609 cpp_install_dir=$withval
1610fi
ba479fd2 1611fi;
34a86c2b 1612
51b9ff45 1613# We would like to our source tree to be readonly. However when releases or
ba479fd2 1614# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1615# various formats of manuals need to be included along with the rest of the
ba479fd2 1616# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1617# just that.
1618
03787dfd
KC
1619echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1620echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1621 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1622if test "${enable_generated_files_in_srcdir+set}" = set; then
1623 enableval="$enable_generated_files_in_srcdir"
03787dfd 1624 generated_files_in_srcdir=$enableval
51b9ff45 1625else
03787dfd 1626 generated_files_in_srcdir=no
ba479fd2 1627fi;
51b9ff45 1628
03787dfd
KC
1629echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1630echo "${ECHO_T}$generated_files_in_srcdir" >&6
1631
1632if test "$generated_files_in_srcdir" = "yes"; then
1633 GENINSRC=''
1634 docobjdir='$(srcdir)/doc'
1635else
1636 GENINSRC='#'
1637 docobjdir='$(objdir)/doc'
1638fi
1639
1640
34a86c2b
NN
1641# -------------------
1642# Find default linker
1643# -------------------
1644
1645# With GNU ld
ba479fd2 1646
34a86c2b
NN
1647# Check whether --with-gnu-ld or --without-gnu-ld was given.
1648if test "${with_gnu_ld+set}" = set; then
1649 withval="$with_gnu_ld"
1650 gnu_ld_flag="$with_gnu_ld"
1651else
1652 gnu_ld_flag=no
ba479fd2 1653fi;
6e3f3080 1654
63cf211a 1655# With pre-defined ld
ba479fd2 1656
34a86c2b
NN
1657# Check whether --with-ld or --without-ld was given.
1658if test "${with_ld+set}" = set; then
1659 withval="$with_ld"
1660 DEFAULT_LINKER="$with_ld"
ba479fd2 1661fi;
34a86c2b
NN
1662if test x"${DEFAULT_LINKER+set}" = x"set"; then
1663 if test ! -x "$DEFAULT_LINKER"; then
ba479fd2
NN
1664 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1665echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
34a86c2b
NN
1666 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1667 gnu_ld_flag=yes
1668 fi
ba479fd2
NN
1669
1670cat >>confdefs.h <<_ACEOF
34a86c2b 1671#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1672_ACEOF
34a86c2b
NN
1673
1674fi
1675
ba479fd2
NN
1676echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1677echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1678if test x"${DEFAULT_LINKER+set}" = x"set"; then
1679 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1680 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1681echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1682 else
ba479fd2
NN
1683 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1684echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1685 fi
1686else
ba479fd2
NN
1687 echo "$as_me:$LINENO: result: no" >&5
1688echo "${ECHO_T}no" >&6
34a86c2b
NN
1689fi
1690
1691# ----------------------
1692# Find default assembler
1693# ----------------------
1694
1695# With GNU as
ba479fd2 1696
34a86c2b
NN
1697# Check whether --with-gnu-as or --without-gnu-as was given.
1698if test "${with_gnu_as+set}" = set; then
1699 withval="$with_gnu_as"
1700 gas_flag="$with_gnu_as"
1701else
1702 gas_flag=no
ba479fd2 1703fi;
34a86c2b
NN
1704
1705
1706# Check whether --with-as or --without-as was given.
1707if test "${with_as+set}" = set; then
1708 withval="$with_as"
1709 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1710fi;
34a86c2b
NN
1711if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1712 if test ! -x "$DEFAULT_ASSEMBLER"; then
ba479fd2
NN
1713 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1714echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
34a86c2b
NN
1715 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1716 gas_flag=yes
1717 fi
ba479fd2
NN
1718
1719cat >>confdefs.h <<_ACEOF
34a86c2b 1720#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1721_ACEOF
34a86c2b
NN
1722
1723fi
1724
ba479fd2
NN
1725echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1726echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1727if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1728 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1729 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1730echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1731 else
ba479fd2
NN
1732 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1733echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1734 fi
1735else
ba479fd2
NN
1736 echo "$as_me:$LINENO: result: no" >&5
1737echo "${ECHO_T}no" >&6
34a86c2b
NN
1738fi
1739
1740# ---------------
1741# Find C compiler
1742# ---------------
1743
1744# Find the native compiler
ba479fd2
NN
1745ac_ext=c
1746ac_cpp='$CPP $CPPFLAGS'
1747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1749ac_compiler_gnu=$ac_cv_c_compiler_gnu
1750if test -n "$ac_tool_prefix"; then
1751 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1752set dummy ${ac_tool_prefix}gcc; ac_word=$2
1753echo "$as_me:$LINENO: checking for $ac_word" >&5
1754echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1755if test "${ac_cv_prog_CC+set}" = set; then
1756 echo $ECHO_N "(cached) $ECHO_C" >&6
1757else
1758 if test -n "$CC"; then
1759 ac_cv_prog_CC="$CC" # Let the user override the test.
1760else
1761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1762for as_dir in $PATH
1763do
1764 IFS=$as_save_IFS
1765 test -z "$as_dir" && as_dir=.
1766 for ac_exec_ext in '' $ac_executable_extensions; do
1767 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1768 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1769 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1770 break 2
1771 fi
1772done
1773done
1774
1775fi
1776fi
1777CC=$ac_cv_prog_CC
1778if test -n "$CC"; then
1779 echo "$as_me:$LINENO: result: $CC" >&5
1780echo "${ECHO_T}$CC" >&6
1781else
1782 echo "$as_me:$LINENO: result: no" >&5
1783echo "${ECHO_T}no" >&6
1784fi
1785
1786fi
1787if test -z "$ac_cv_prog_CC"; then
1788 ac_ct_CC=$CC
1789 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1790set dummy gcc; ac_word=$2
ba479fd2
NN
1791echo "$as_me:$LINENO: checking for $ac_word" >&5
1792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1793if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1794 echo $ECHO_N "(cached) $ECHO_C" >&6
1795else
1796 if test -n "$ac_ct_CC"; then
1797 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1798else
1799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1800for as_dir in $PATH
1801do
1802 IFS=$as_save_IFS
1803 test -z "$as_dir" && as_dir=.
1804 for ac_exec_ext in '' $ac_executable_extensions; do
1805 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1806 ac_cv_prog_ac_ct_CC="gcc"
1807 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808 break 2
1809 fi
1810done
1811done
1812
1813fi
1814fi
1815ac_ct_CC=$ac_cv_prog_ac_ct_CC
1816if test -n "$ac_ct_CC"; then
1817 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1818echo "${ECHO_T}$ac_ct_CC" >&6
1819else
1820 echo "$as_me:$LINENO: result: no" >&5
1821echo "${ECHO_T}no" >&6
1822fi
1823
1824 CC=$ac_ct_CC
1825else
1826 CC="$ac_cv_prog_CC"
1827fi
1828
1829if test -z "$CC"; then
1830 if test -n "$ac_tool_prefix"; then
1831 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1832set dummy ${ac_tool_prefix}cc; ac_word=$2
1833echo "$as_me:$LINENO: checking for $ac_word" >&5
1834echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835if test "${ac_cv_prog_CC+set}" = set; then
1836 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1837else
1838 if test -n "$CC"; then
1839 ac_cv_prog_CC="$CC" # Let the user override the test.
1840else
ba479fd2
NN
1841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1842for as_dir in $PATH
1843do
1844 IFS=$as_save_IFS
1845 test -z "$as_dir" && as_dir=.
1846 for ac_exec_ext in '' $ac_executable_extensions; do
1847 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1848 ac_cv_prog_CC="${ac_tool_prefix}cc"
1849 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1850 break 2
1851 fi
1852done
1853done
1854
cd9e5e7c
MK
1855fi
1856fi
ba479fd2 1857CC=$ac_cv_prog_CC
cd9e5e7c 1858if test -n "$CC"; then
ba479fd2
NN
1859 echo "$as_me:$LINENO: result: $CC" >&5
1860echo "${ECHO_T}$CC" >&6
1861else
1862 echo "$as_me:$LINENO: result: no" >&5
1863echo "${ECHO_T}no" >&6
1864fi
1865
1866fi
1867if test -z "$ac_cv_prog_CC"; then
1868 ac_ct_CC=$CC
1869 # Extract the first word of "cc", so it can be a program name with args.
1870set dummy cc; ac_word=$2
1871echo "$as_me:$LINENO: checking for $ac_word" >&5
1872echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1873if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1874 echo $ECHO_N "(cached) $ECHO_C" >&6
1875else
1876 if test -n "$ac_ct_CC"; then
1877 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1878else
1879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1880for as_dir in $PATH
1881do
1882 IFS=$as_save_IFS
1883 test -z "$as_dir" && as_dir=.
1884 for ac_exec_ext in '' $ac_executable_extensions; do
1885 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1886 ac_cv_prog_ac_ct_CC="cc"
1887 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1888 break 2
1889 fi
1890done
1891done
1892
1893fi
1894fi
1895ac_ct_CC=$ac_cv_prog_ac_ct_CC
1896if test -n "$ac_ct_CC"; then
1897 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1898echo "${ECHO_T}$ac_ct_CC" >&6
1899else
1900 echo "$as_me:$LINENO: result: no" >&5
1901echo "${ECHO_T}no" >&6
1902fi
1903
1904 CC=$ac_ct_CC
cd9e5e7c 1905else
ba479fd2 1906 CC="$ac_cv_prog_CC"
e9a25f70 1907fi
6e3f3080 1908
ba479fd2 1909fi
6e3f3080
NN
1910if test -z "$CC"; then
1911 # Extract the first word of "cc", so it can be a program name with args.
1912set dummy cc; ac_word=$2
ba479fd2
NN
1913echo "$as_me:$LINENO: checking for $ac_word" >&5
1914echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1915if test "${ac_cv_prog_CC+set}" = set; then
1916 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1917else
1918 if test -n "$CC"; then
1919 ac_cv_prog_CC="$CC" # Let the user override the test.
1920else
1921 ac_prog_rejected=no
ba479fd2
NN
1922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1923for as_dir in $PATH
1924do
1925 IFS=$as_save_IFS
1926 test -z "$as_dir" && as_dir=.
1927 for ac_exec_ext in '' $ac_executable_extensions; do
1928 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1929 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1930 ac_prog_rejected=yes
1931 continue
1932 fi
1933 ac_cv_prog_CC="cc"
1934 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1935 break 2
1936 fi
1937done
1938done
1939
6e3f3080
NN
1940if test $ac_prog_rejected = yes; then
1941 # We found a bogon in the path, so make sure we never use it.
1942 set dummy $ac_cv_prog_CC
1943 shift
ba479fd2 1944 if test $# != 0; then
6e3f3080
NN
1945 # We chose a different compiler from the bogus one.
1946 # However, it has the same basename, so the bogon will be chosen
1947 # first if we set CC to just the basename; use the full file name.
1948 shift
ba479fd2 1949 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 1950 fi
6e3f3080
NN
1951fi
1952fi
1953fi
ba479fd2 1954CC=$ac_cv_prog_CC
6e3f3080 1955if test -n "$CC"; then
ba479fd2
NN
1956 echo "$as_me:$LINENO: result: $CC" >&5
1957echo "${ECHO_T}$CC" >&6
e9a25f70 1958else
ba479fd2
NN
1959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
e9a25f70 1961fi
6e3f3080 1962
ba479fd2
NN
1963fi
1964if test -z "$CC"; then
1965 if test -n "$ac_tool_prefix"; then
1966 for ac_prog in cl
1967 do
1968 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1969set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1970echo "$as_me:$LINENO: checking for $ac_word" >&5
1971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1972if test "${ac_cv_prog_CC+set}" = set; then
1973 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 1974else
6e3f3080
NN
1975 if test -n "$CC"; then
1976 ac_cv_prog_CC="$CC" # Let the user override the test.
1977else
ba479fd2
NN
1978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1979for as_dir in $PATH
1980do
1981 IFS=$as_save_IFS
1982 test -z "$as_dir" && as_dir=.
1983 for ac_exec_ext in '' $ac_executable_extensions; do
1984 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1985 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1986 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1987 break 2
1988 fi
1989done
1990done
1991
093e61a6 1992fi
6e3f3080 1993fi
ba479fd2 1994CC=$ac_cv_prog_CC
6e3f3080 1995if test -n "$CC"; then
ba479fd2
NN
1996 echo "$as_me:$LINENO: result: $CC" >&5
1997echo "${ECHO_T}$CC" >&6
6e3f3080 1998else
ba479fd2
NN
1999 echo "$as_me:$LINENO: result: no" >&5
2000echo "${ECHO_T}no" >&6
093e61a6 2001fi
cafe096b 2002
ba479fd2
NN
2003 test -n "$CC" && break
2004 done
2005fi
2006if test -z "$CC"; then
2007 ac_ct_CC=$CC
2008 for ac_prog in cl
2009do
2010 # Extract the first word of "$ac_prog", so it can be a program name with args.
2011set dummy $ac_prog; ac_word=$2
2012echo "$as_me:$LINENO: checking for $ac_word" >&5
2013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2014if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2015 echo $ECHO_N "(cached) $ECHO_C" >&6
2016else
2017 if test -n "$ac_ct_CC"; then
2018 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2019else
2020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2021for as_dir in $PATH
2022do
2023 IFS=$as_save_IFS
2024 test -z "$as_dir" && as_dir=.
2025 for ac_exec_ext in '' $ac_executable_extensions; do
2026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2027 ac_cv_prog_ac_ct_CC="$ac_prog"
2028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2029 break 2
2030 fi
2031done
2032done
6e3f3080 2033
ba479fd2
NN
2034fi
2035fi
2036ac_ct_CC=$ac_cv_prog_ac_ct_CC
2037if test -n "$ac_ct_CC"; then
2038 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2039echo "${ECHO_T}$ac_ct_CC" >&6
2040else
2041 echo "$as_me:$LINENO: result: no" >&5
2042echo "${ECHO_T}no" >&6
2043fi
6e3f3080 2044
ba479fd2
NN
2045 test -n "$ac_ct_CC" && break
2046done
63cf211a 2047
ba479fd2
NN
2048 CC=$ac_ct_CC
2049fi
2050
2051fi
2052
2053
2054test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2055See \`config.log' for more details." >&5
2056echo "$as_me: error: no acceptable C compiler found in \$PATH
2057See \`config.log' for more details." >&2;}
2058 { (exit 1); exit 1; }; }
2059
2060# Provide some information about the compiler.
2061echo "$as_me:$LINENO:" \
2062 "checking for C compiler version" >&5
2063ac_compiler=`set X $ac_compile; echo $2`
2064{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2065 (eval $ac_compiler --version </dev/null >&5) 2>&5
2066 ac_status=$?
2067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2068 (exit $ac_status); }
2069{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2070 (eval $ac_compiler -v </dev/null >&5) 2>&5
2071 ac_status=$?
2072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2073 (exit $ac_status); }
2074{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2075 (eval $ac_compiler -V </dev/null >&5) 2>&5
2076 ac_status=$?
2077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2078 (exit $ac_status); }
2079
2080cat >conftest.$ac_ext <<_ACEOF
2081#line $LINENO "configure"
2082/* confdefs.h. */
2083_ACEOF
2084cat confdefs.h >>conftest.$ac_ext
2085cat >>conftest.$ac_ext <<_ACEOF
2086/* end confdefs.h. */
2087
2088int
2089main ()
2090{
63cf211a 2091
ba479fd2
NN
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096ac_clean_files_save=$ac_clean_files
2097ac_clean_files="$ac_clean_files a.out a.exe b.out"
2098# Try to create an executable without -o first, disregard a.out.
2099# It will help us diagnose broken compilers, and finding out an intuition
2100# of exeext.
2101echo "$as_me:$LINENO: checking for C compiler default output" >&5
2102echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2103ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2104if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2105 (eval $ac_link_default) 2>&5
2106 ac_status=$?
2107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2108 (exit $ac_status); }; then
2109 # Find the output, starting from the most likely. This scheme is
2110# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2111# resort.
2112
2113# Be careful to initialize this variable, since it used to be cached.
2114# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2115ac_cv_exeext=
2116# b.out is created by i960 compilers.
2117for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2118do
2119 test -f "$ac_file" || continue
2120 case $ac_file in
2121 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2122 ;;
2123 conftest.$ac_ext )
2124 # This is the source file.
2125 ;;
2126 [ab].out )
2127 # We found the default executable, but exeext='' is most
2128 # certainly right.
2129 break;;
2130 *.* )
2131 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2132 # FIXME: I believe we export ac_cv_exeext for Libtool,
2133 # but it would be cool to find out if it's true. Does anybody
2134 # maintain Libtool? --akim.
2135 export ac_cv_exeext
2136 break;;
2137 * )
2138 break;;
2139 esac
2140done
2141else
2142 echo "$as_me: failed program was:" >&5
2143sed 's/^/| /' conftest.$ac_ext >&5
2144
2145{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2146See \`config.log' for more details." >&5
2147echo "$as_me: error: C compiler cannot create executables
2148See \`config.log' for more details." >&2;}
2149 { (exit 77); exit 77; }; }
2150fi
2151
2152ac_exeext=$ac_cv_exeext
2153echo "$as_me:$LINENO: result: $ac_file" >&5
2154echo "${ECHO_T}$ac_file" >&6
2155
2156# Check the compiler produces executables we can run. If not, either
2157# the compiler is broken, or we cross compile.
2158echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2159echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2160# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2161# If not cross compiling, check that we can run a simple program.
2162if test "$cross_compiling" != yes; then
2163 if { ac_try='./$ac_file'
2164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2165 (eval $ac_try) 2>&5
2166 ac_status=$?
2167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2168 (exit $ac_status); }; }; then
2169 cross_compiling=no
6e3f3080 2170 else
ba479fd2
NN
2171 if test "$cross_compiling" = maybe; then
2172 cross_compiling=yes
2173 else
2174 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2175If you meant to cross compile, use \`--host'.
2176See \`config.log' for more details." >&5
2177echo "$as_me: error: cannot run C compiled programs.
2178If you meant to cross compile, use \`--host'.
2179See \`config.log' for more details." >&2;}
2180 { (exit 1); exit 1; }; }
2181 fi
6e3f3080
NN
2182 fi
2183fi
ba479fd2
NN
2184echo "$as_me:$LINENO: result: yes" >&5
2185echo "${ECHO_T}yes" >&6
2186
2187rm -f a.out a.exe conftest$ac_cv_exeext b.out
2188ac_clean_files=$ac_clean_files_save
2189# Check the compiler produces executables we can run. If not, either
2190# the compiler is broken, or we cross compile.
2191echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2192echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2193echo "$as_me:$LINENO: result: $cross_compiling" >&5
2194echo "${ECHO_T}$cross_compiling" >&6
2195
2196echo "$as_me:$LINENO: checking for suffix of executables" >&5
2197echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2199 (eval $ac_link) 2>&5
2200 ac_status=$?
2201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202 (exit $ac_status); }; then
2203 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2204# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2205# work properly (i.e., refer to `conftest.exe'), while it won't with
2206# `rm'.
2207for ac_file in conftest.exe conftest conftest.*; do
2208 test -f "$ac_file" || continue
2209 case $ac_file in
2210 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2211 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2212 export ac_cv_exeext
2213 break;;
2214 * ) break;;
2215 esac
2216done
e9a25f70 2217else
ba479fd2
NN
2218 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2219See \`config.log' for more details." >&5
2220echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2221See \`config.log' for more details." >&2;}
2222 { (exit 1); exit 1; }; }
2223fi
2224
2225rm -f conftest$ac_cv_exeext
2226echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2227echo "${ECHO_T}$ac_cv_exeext" >&6
2228
2229rm -f conftest.$ac_ext
2230EXEEXT=$ac_cv_exeext
2231ac_exeext=$EXEEXT
2232echo "$as_me:$LINENO: checking for suffix of object files" >&5
2233echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2234if test "${ac_cv_objext+set}" = set; then
2235 echo $ECHO_N "(cached) $ECHO_C" >&6
2236else
2237 cat >conftest.$ac_ext <<_ACEOF
2238#line $LINENO "configure"
2239/* confdefs.h. */
2240_ACEOF
2241cat confdefs.h >>conftest.$ac_ext
2242cat >>conftest.$ac_ext <<_ACEOF
2243/* end confdefs.h. */
2244
2245int
2246main ()
2247{
6e3f3080 2248
ba479fd2
NN
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253rm -f conftest.o conftest.obj
2254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2255 (eval $ac_compile) 2>&5
2256 ac_status=$?
2257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2258 (exit $ac_status); }; then
2259 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2260 case $ac_file in
2261 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2262 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2263 break;;
2264 esac
2265done
63cf211a 2266else
ba479fd2
NN
2267 echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2271See \`config.log' for more details." >&5
2272echo "$as_me: error: cannot compute suffix of object files: cannot compile
2273See \`config.log' for more details." >&2;}
2274 { (exit 1); exit 1; }; }
2275fi
2276
2277rm -f conftest.$ac_cv_objext conftest.$ac_ext
2278fi
2279echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2280echo "${ECHO_T}$ac_cv_objext" >&6
2281OBJEXT=$ac_cv_objext
2282ac_objext=$OBJEXT
2283echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2284echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2285if test "${ac_cv_c_compiler_gnu+set}" = set; then
2286 echo $ECHO_N "(cached) $ECHO_C" >&6
2287else
2288 cat >conftest.$ac_ext <<_ACEOF
2289#line $LINENO "configure"
2290/* confdefs.h. */
2291_ACEOF
2292cat confdefs.h >>conftest.$ac_ext
2293cat >>conftest.$ac_ext <<_ACEOF
2294/* end confdefs.h. */
2295
2296int
2297main ()
2298{
2299#ifndef __GNUC__
2300 choke me
2301#endif
6e3f3080 2302
ba479fd2
NN
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307rm -f conftest.$ac_objext
2308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2309 (eval $ac_compile) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); } &&
2313 { ac_try='test -s conftest.$ac_objext'
2314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2315 (eval $ac_try) 2>&5
2316 ac_status=$?
2317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2318 (exit $ac_status); }; }; then
2319 ac_compiler_gnu=yes
2320else
2321 echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324ac_compiler_gnu=no
2325fi
2326rm -f conftest.$ac_objext conftest.$ac_ext
2327ac_cv_c_compiler_gnu=$ac_compiler_gnu
2328
2329fi
2330echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2331echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2332GCC=`test $ac_compiler_gnu = yes && echo yes`
2333ac_test_CFLAGS=${CFLAGS+set}
2334ac_save_CFLAGS=$CFLAGS
2335CFLAGS="-g"
2336echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2337echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2338if test "${ac_cv_prog_cc_g+set}" = set; then
2339 echo $ECHO_N "(cached) $ECHO_C" >&6
2340else
2341 cat >conftest.$ac_ext <<_ACEOF
2342#line $LINENO "configure"
2343/* confdefs.h. */
2344_ACEOF
2345cat confdefs.h >>conftest.$ac_ext
2346cat >>conftest.$ac_ext <<_ACEOF
2347/* end confdefs.h. */
2348
2349int
2350main ()
2351{
2352
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357rm -f conftest.$ac_objext
2358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2359 (eval $ac_compile) 2>&5
2360 ac_status=$?
2361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2362 (exit $ac_status); } &&
2363 { ac_try='test -s conftest.$ac_objext'
2364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2365 (eval $ac_try) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; }; then
6e3f3080
NN
2369 ac_cv_prog_cc_g=yes
2370else
ba479fd2
NN
2371 echo "$as_me: failed program was:" >&5
2372sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2373
ba479fd2 2374ac_cv_prog_cc_g=no
6e3f3080 2375fi
ba479fd2
NN
2376rm -f conftest.$ac_objext conftest.$ac_ext
2377fi
2378echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2379echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2380if test "$ac_test_CFLAGS" = set; then
ba479fd2 2381 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2382elif test $ac_cv_prog_cc_g = yes; then
2383 if test "$GCC" = yes; then
e9a25f70
JL
2384 CFLAGS="-g -O2"
2385 else
cd9e5e7c 2386 CFLAGS="-g"
81814e35 2387 fi
3723cad9 2388else
cd9e5e7c
MK
2389 if test "$GCC" = yes; then
2390 CFLAGS="-O2"
2391 else
2392 CFLAGS=
2393 fi
e9a25f70 2394fi
ba479fd2
NN
2395echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2396echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2397if test "${ac_cv_prog_cc_stdc+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2399else
2400 ac_cv_prog_cc_stdc=no
2401ac_save_CC=$CC
2402cat >conftest.$ac_ext <<_ACEOF
2403#line $LINENO "configure"
2404/* confdefs.h. */
2405_ACEOF
2406cat confdefs.h >>conftest.$ac_ext
2407cat >>conftest.$ac_ext <<_ACEOF
2408/* end confdefs.h. */
2409#include <stdarg.h>
2410#include <stdio.h>
2411#include <sys/types.h>
2412#include <sys/stat.h>
2413/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2414struct buf { int x; };
2415FILE * (*rcsopen) (struct buf *, struct stat *, int);
2416static char *e (p, i)
2417 char **p;
2418 int i;
2419{
2420 return p[i];
2421}
2422static char *f (char * (*g) (char **, int), char **p, ...)
2423{
2424 char *s;
2425 va_list v;
2426 va_start (v,p);
2427 s = g (p, va_arg (v,int));
2428 va_end (v);
2429 return s;
2430}
2431int test (int i, double x);
2432struct s1 {int (*f) (int a);};
2433struct s2 {int (*f) (double a);};
2434int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2435int argc;
2436char **argv;
2437int
2438main ()
2439{
2440return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445# Don't try gcc -ansi; that turns off useful extensions and
2446# breaks some systems' header files.
2447# AIX -qlanglvl=ansi
2448# Ultrix and OSF/1 -std1
2449# HP-UX 10.20 and later -Ae
2450# HP-UX older versions -Aa -D_HPUX_SOURCE
2451# SVR4 -Xc -D__EXTENSIONS__
2452for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2453do
2454 CC="$ac_save_CC $ac_arg"
2455 rm -f conftest.$ac_objext
2456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2457 (eval $ac_compile) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); } &&
2461 { ac_try='test -s conftest.$ac_objext'
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
2467 ac_cv_prog_cc_stdc=$ac_arg
2468break
2469else
2470 echo "$as_me: failed program was:" >&5
2471sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2472
ba479fd2
NN
2473fi
2474rm -f conftest.$ac_objext
2475done
2476rm -f conftest.$ac_ext conftest.$ac_objext
2477CC=$ac_save_CC
2478
2479fi
2480
2481case "x$ac_cv_prog_cc_stdc" in
2482 x|xno)
2483 echo "$as_me:$LINENO: result: none needed" >&5
2484echo "${ECHO_T}none needed" >&6 ;;
2485 *)
2486 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2487echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2488 CC="$CC $ac_cv_prog_cc_stdc" ;;
2489esac
2490
2491# Some people use a C++ compiler to compile C. Since we use `exit',
2492# in C++ we need to declare it. In case someone uses the same compiler
2493# for both compiling C and C++ we need to have the C++ compiler decide
2494# the declaration of exit, since it's the most demanding environment.
2495cat >conftest.$ac_ext <<_ACEOF
2496#ifndef __cplusplus
2497 choke me
2498#endif
2499_ACEOF
2500rm -f conftest.$ac_objext
2501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2502 (eval $ac_compile) 2>&5
2503 ac_status=$?
2504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2505 (exit $ac_status); } &&
2506 { ac_try='test -s conftest.$ac_objext'
2507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2508 (eval $ac_try) 2>&5
2509 ac_status=$?
2510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2511 (exit $ac_status); }; }; then
2512 for ac_declaration in \
a6a5e4c9
KC
2513 ''\
2514 '#include <stdlib.h>' \
ba479fd2
NN
2515 'extern "C" void std::exit (int) throw (); using std::exit;' \
2516 'extern "C" void std::exit (int); using std::exit;' \
2517 'extern "C" void exit (int) throw ();' \
2518 'extern "C" void exit (int);' \
2519 'void exit (int);'
2520do
2521 cat >conftest.$ac_ext <<_ACEOF
2522#line $LINENO "configure"
2523/* confdefs.h. */
2524_ACEOF
2525cat confdefs.h >>conftest.$ac_ext
2526cat >>conftest.$ac_ext <<_ACEOF
2527/* end confdefs.h. */
ba479fd2 2528#include <stdlib.h>
a6a5e4c9 2529$ac_declaration
ba479fd2
NN
2530int
2531main ()
2532{
2533exit (42);
2534 ;
2535 return 0;
2536}
2537_ACEOF
2538rm -f conftest.$ac_objext
2539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2540 (eval $ac_compile) 2>&5
2541 ac_status=$?
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); } &&
2544 { ac_try='test -s conftest.$ac_objext'
2545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2546 (eval $ac_try) 2>&5
2547 ac_status=$?
2548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2549 (exit $ac_status); }; }; then
2550 :
2551else
2552 echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
2554
2555continue
2556fi
2557rm -f conftest.$ac_objext conftest.$ac_ext
2558 cat >conftest.$ac_ext <<_ACEOF
2559#line $LINENO "configure"
2560/* confdefs.h. */
2561_ACEOF
2562cat confdefs.h >>conftest.$ac_ext
2563cat >>conftest.$ac_ext <<_ACEOF
2564/* end confdefs.h. */
2565$ac_declaration
2566int
2567main ()
2568{
2569exit (42);
2570 ;
2571 return 0;
2572}
2573_ACEOF
2574rm -f conftest.$ac_objext
2575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2576 (eval $ac_compile) 2>&5
2577 ac_status=$?
2578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2579 (exit $ac_status); } &&
2580 { ac_try='test -s conftest.$ac_objext'
2581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2582 (eval $ac_try) 2>&5
2583 ac_status=$?
2584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2585 (exit $ac_status); }; }; then
2586 break
3ec83fc2 2587else
ba479fd2
NN
2588 echo "$as_me: failed program was:" >&5
2589sed 's/^/| /' conftest.$ac_ext >&5
2590
6e3f3080 2591fi
ba479fd2
NN
2592rm -f conftest.$ac_objext conftest.$ac_ext
2593done
2594rm -f conftest*
2595if test -n "$ac_declaration"; then
2596 echo '#ifdef __cplusplus' >>confdefs.h
2597 echo $ac_declaration >>confdefs.h
2598 echo '#endif' >>confdefs.h
2599fi
2600
3ec83fc2 2601else
ba479fd2
NN
2602 echo "$as_me: failed program was:" >&5
2603sed 's/^/| /' conftest.$ac_ext >&5
2604
2605fi
2606rm -f conftest.$ac_objext conftest.$ac_ext
2607ac_ext=c
2608ac_cpp='$CPP $CPPFLAGS'
2609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2611ac_compiler_gnu=$ac_cv_c_compiler_gnu
2612
2613if test "x$CC" != xcc; then
2614 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2615echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2616else
2617 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2618echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2619fi
2620set dummy $CC; ac_cc=`echo $2 |
2621 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2622if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2623 echo $ECHO_N "(cached) $ECHO_C" >&6
2624else
2625 cat >conftest.$ac_ext <<_ACEOF
2626#line $LINENO "configure"
2627/* confdefs.h. */
2628_ACEOF
2629cat confdefs.h >>conftest.$ac_ext
2630cat >>conftest.$ac_ext <<_ACEOF
2631/* end confdefs.h. */
2632
2633int
2634main ()
2635{
2636
2637 ;
2638 return 0;
2639}
2640_ACEOF
3ec83fc2
RH
2641# Make sure it works both with $CC and with simple cc.
2642# We do the test twice because some compilers refuse to overwrite an
2643# existing .o file with -o, though they will create one.
ba479fd2
NN
2644ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2645if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2646 (eval $ac_try) 2>&5
2647 ac_status=$?
2648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649 (exit $ac_status); } &&
2650 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2651 (eval $ac_try) 2>&5
2652 ac_status=$?
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); };
3ec83fc2
RH
2655then
2656 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2657 if test "x$CC" != xcc; then
2658 # Test first that cc exists at all.
ba479fd2
NN
2659 if { ac_try='cc -c conftest.$ac_ext >&5'
2660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2661 (eval $ac_try) 2>&5
2662 ac_status=$?
2663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664 (exit $ac_status); }; }; then
2665 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2666 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2667 (eval $ac_try) 2>&5
2668 ac_status=$?
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); } &&
2671 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2672 (eval $ac_try) 2>&5
2673 ac_status=$?
2674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); };
3ec83fc2 2676 then
e1366e0c
NN
2677 # cc works too.
2678 :
3ec83fc2 2679 else
e1366e0c
NN
2680 # cc exists but doesn't like -o.
2681 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2682 fi
2683 fi
2684 fi
2685else
2686 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2687fi
2688rm -f conftest*
2689
2690fi
2691if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2692 echo "$as_me:$LINENO: result: yes" >&5
2693echo "${ECHO_T}yes" >&6
3ec83fc2 2694else
ba479fd2
NN
2695 echo "$as_me:$LINENO: result: no" >&5
2696echo "${ECHO_T}no" >&6
2697
2698cat >>confdefs.h <<\_ACEOF
3ec83fc2 2699#define NO_MINUS_C_MINUS_O 1
ba479fd2 2700_ACEOF
3ec83fc2
RH
2701
2702fi
2703
414d23ae
HPN
2704# autoconf is lame and doesn't give us any substitution variable for this.
2705if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2706 NO_MINUS_C_MINUS_O=yes
2707else
2708 OUTPUT_OPTION='-o $@'
2709fi
2710
2711
2712
73458fb7
NN
2713# -------------------------
2714# Check C compiler features
2715# -------------------------
2716
ba479fd2
NN
2717
2718echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5
2719echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6
2720if test "${ac_cv_prog_cc_no_long_long+set}" = set; then
2721 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
2722else
2723 save_CFLAGS="$CFLAGS"
2724CFLAGS="-Wno-long-long"
ba479fd2
NN
2725cat >conftest.$ac_ext <<_ACEOF
2726#line $LINENO "configure"
2727/* confdefs.h. */
2728_ACEOF
2729cat confdefs.h >>conftest.$ac_ext
2730cat >>conftest.$ac_ext <<_ACEOF
2731/* end confdefs.h. */
2732
2733int
2734main ()
2735{
63cf211a 2736
ba479fd2
NN
2737 ;
2738 return 0;
2739}
2740_ACEOF
2741rm -f conftest.$ac_objext
2742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2743 (eval $ac_compile) 2>&5
2744 ac_status=$?
2745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746 (exit $ac_status); } &&
2747 { ac_try='test -s conftest.$ac_objext'
2748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2749 (eval $ac_try) 2>&5
2750 ac_status=$?
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); }; }; then
34a86c2b 2753 ac_cv_prog_cc_no_long_long=yes
200ef634 2754else
ba479fd2
NN
2755 echo "$as_me: failed program was:" >&5
2756sed 's/^/| /' conftest.$ac_ext >&5
2757
2758ac_cv_prog_cc_no_long_long=no
200ef634 2759fi
ba479fd2 2760rm -f conftest.$ac_objext conftest.$ac_ext
34a86c2b 2761CFLAGS="$save_CFLAGS"
75e93faa 2762fi
ba479fd2
NN
2763echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5
2764echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6
75e93faa 2765
ba479fd2
NN
2766ac_ext=c
2767ac_cpp='$CPP $CPPFLAGS'
2768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2770ac_compiler_gnu=$ac_cv_c_compiler_gnu
2771echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2772echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2773# On Suns, sometimes $CPP names a directory.
2774if test -n "$CPP" && test -d "$CPP"; then
2775 CPP=
2776fi
2777if test -z "$CPP"; then
ba479fd2
NN
2778 if test "${ac_cv_prog_CPP+set}" = set; then
2779 echo $ECHO_N "(cached) $ECHO_C" >&6
2780else
2781 # Double quotes because CPP needs to be expanded
2782 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2783 do
2784 ac_preproc_ok=false
2785for ac_c_preproc_warn_flag in '' yes
2786do
2787 # Use a header file that comes with gcc, so configuring glibc
2788 # with a fresh cross-compiler works.
2789 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2790 # <limits.h> exists even on freestanding compilers.
84c041a1 2791 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2792 # not just through cpp. "Syntax error" is here to catch this case.
2793 cat >conftest.$ac_ext <<_ACEOF
2794#line $LINENO "configure"
2795/* confdefs.h. */
2796_ACEOF
2797cat confdefs.h >>conftest.$ac_ext
2798cat >>conftest.$ac_ext <<_ACEOF
2799/* end confdefs.h. */
2800#ifdef __STDC__
2801# include <limits.h>
2802#else
2803# include <assert.h>
2804#endif
2805 Syntax error
2806_ACEOF
2807if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2808 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2809 ac_status=$?
2810 grep -v '^ *+' conftest.er1 >conftest.err
2811 rm -f conftest.er1
2812 cat conftest.err >&5
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); } >/dev/null; then
2815 if test -s conftest.err; then
2816 ac_cpp_err=$ac_c_preproc_warn_flag
2817 else
2818 ac_cpp_err=
2819 fi
2820else
2821 ac_cpp_err=yes
2822fi
2823if test -z "$ac_cpp_err"; then
093e61a6 2824 :
cafe096b 2825else
ba479fd2
NN
2826 echo "$as_me: failed program was:" >&5
2827sed 's/^/| /' conftest.$ac_ext >&5
2828
2829 # Broken: fails on valid input.
2830continue
2831fi
2832rm -f conftest.err conftest.$ac_ext
2833
2834 # OK, works on sane cases. Now check whether non-existent headers
2835 # can be detected and how.
2836 cat >conftest.$ac_ext <<_ACEOF
2837#line $LINENO "configure"
2838/* confdefs.h. */
2839_ACEOF
2840cat confdefs.h >>conftest.$ac_ext
2841cat >>conftest.$ac_ext <<_ACEOF
2842/* end confdefs.h. */
2843#include <ac_nonexistent.h>
2844_ACEOF
2845if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2846 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2847 ac_status=$?
2848 grep -v '^ *+' conftest.er1 >conftest.err
2849 rm -f conftest.er1
2850 cat conftest.err >&5
2851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852 (exit $ac_status); } >/dev/null; then
2853 if test -s conftest.err; then
2854 ac_cpp_err=$ac_c_preproc_warn_flag
2855 else
2856 ac_cpp_err=
2857 fi
2858else
2859 ac_cpp_err=yes
2860fi
2861if test -z "$ac_cpp_err"; then
2862 # Broken: success on invalid input.
2863continue
2864else
2865 echo "$as_me: failed program was:" >&5
2866sed 's/^/| /' conftest.$ac_ext >&5
2867
2868 # Passes both tests.
2869ac_preproc_ok=:
2870break
2871fi
2872rm -f conftest.err conftest.$ac_ext
2873
2874done
2875# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2876rm -f conftest.err conftest.$ac_ext
2877if $ac_preproc_ok; then
2878 break
2879fi
2880
2881 done
2882 ac_cv_prog_CPP=$CPP
2883
2884fi
2885 CPP=$ac_cv_prog_CPP
2886else
2887 ac_cv_prog_CPP=$CPP
2888fi
2889echo "$as_me:$LINENO: result: $CPP" >&5
2890echo "${ECHO_T}$CPP" >&6
2891ac_preproc_ok=false
2892for ac_c_preproc_warn_flag in '' yes
2893do
2894 # Use a header file that comes with gcc, so configuring glibc
2895 # with a fresh cross-compiler works.
2896 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2897 # <limits.h> exists even on freestanding compilers.
2898 # On the NeXT, cc -E runs the code through the compiler's parser,
2899 # not just through cpp. "Syntax error" is here to catch this case.
2900 cat >conftest.$ac_ext <<_ACEOF
2901#line $LINENO "configure"
2902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
2907#ifdef __STDC__
2908# include <limits.h>
2909#else
2910# include <assert.h>
2911#endif
2912 Syntax error
2913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
2917 grep -v '^ *+' conftest.er1 >conftest.err
2918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
6e3f3080 2931 :
414d23ae 2932else
ba479fd2
NN
2933 echo "$as_me: failed program was:" >&5
2934sed 's/^/| /' conftest.$ac_ext >&5
2935
2936 # Broken: fails on valid input.
2937continue
2938fi
2939rm -f conftest.err conftest.$ac_ext
2940
2941 # OK, works on sane cases. Now check whether non-existent headers
2942 # can be detected and how.
2943 cat >conftest.$ac_ext <<_ACEOF
2944#line $LINENO "configure"
2945/* confdefs.h. */
2946_ACEOF
2947cat confdefs.h >>conftest.$ac_ext
2948cat >>conftest.$ac_ext <<_ACEOF
2949/* end confdefs.h. */
2950#include <ac_nonexistent.h>
2951_ACEOF
2952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2954 ac_status=$?
2955 grep -v '^ *+' conftest.er1 >conftest.err
2956 rm -f conftest.er1
2957 cat conftest.err >&5
2958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2959 (exit $ac_status); } >/dev/null; then
2960 if test -s conftest.err; then
2961 ac_cpp_err=$ac_c_preproc_warn_flag
2962 else
2963 ac_cpp_err=
2964 fi
6e3f3080 2965else
ba479fd2 2966 ac_cpp_err=yes
63cf211a 2967fi
ba479fd2
NN
2968if test -z "$ac_cpp_err"; then
2969 # Broken: success on invalid input.
2970continue
2971else
2972 echo "$as_me: failed program was:" >&5
2973sed 's/^/| /' conftest.$ac_ext >&5
2974
2975 # Passes both tests.
2976ac_preproc_ok=:
2977break
63cf211a 2978fi
ba479fd2
NN
2979rm -f conftest.err conftest.$ac_ext
2980
2981done
2982# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2983rm -f conftest.err conftest.$ac_ext
2984if $ac_preproc_ok; then
2985 :
6e3f3080 2986else
ba479fd2
NN
2987 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2988See \`config.log' for more details." >&5
2989echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2990See \`config.log' for more details." >&2;}
2991 { (exit 1); exit 1; }; }
6e3f3080
NN
2992fi
2993
ba479fd2
NN
2994ac_ext=c
2995ac_cpp='$CPP $CPPFLAGS'
2996ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2997ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2998ac_compiler_gnu=$ac_cv_c_compiler_gnu
2999
3000echo "$as_me:$LINENO: checking for inline" >&5
3001echo $ECHO_N "checking for inline... $ECHO_C" >&6
3002if test "${ac_cv_c_inline+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3004else
3005 ac_cv_c_inline=no
3006for ac_kw in inline __inline__ __inline; do
ba479fd2
NN
3007 cat >conftest.$ac_ext <<_ACEOF
3008#line $LINENO "configure"
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014#ifndef __cplusplus
3015typedef int foo_t;
3016static $ac_kw foo_t static_foo () {return 0; }
3017$ac_kw foo_t foo () {return 0; }
3018#endif
414d23ae 3019
ba479fd2
NN
3020_ACEOF
3021rm -f conftest.$ac_objext
3022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3023 (eval $ac_compile) 2>&5
3024 ac_status=$?
3025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026 (exit $ac_status); } &&
3027 { ac_try='test -s conftest.$ac_objext'
3028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3029 (eval $ac_try) 2>&5
3030 ac_status=$?
3031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3032 (exit $ac_status); }; }; then
414d23ae
HPN
3033 ac_cv_c_inline=$ac_kw; break
3034else
ba479fd2
NN
3035 echo "$as_me: failed program was:" >&5
3036sed 's/^/| /' conftest.$ac_ext >&5
3037
414d23ae 3038fi
ba479fd2 3039rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3040done
3041
3042fi
ba479fd2
NN
3043echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3044echo "${ECHO_T}$ac_cv_c_inline" >&6
3045case $ac_cv_c_inline in
414d23ae 3046 inline | yes) ;;
ba479fd2
NN
3047 no)
3048cat >>confdefs.h <<\_ACEOF
3049#define inline
3050_ACEOF
e1366e0c 3051 ;;
ba479fd2 3052 *) cat >>confdefs.h <<_ACEOF
e1366e0c 3053#define inline $ac_cv_c_inline
ba479fd2 3054_ACEOF
e1366e0c 3055 ;;
414d23ae
HPN
3056esac
3057
414d23ae 3058
ba479fd2
NN
3059echo "$as_me:$LINENO: checking for long long int" >&5
3060echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3061if test "${ac_cv_c_long_long+set}" = set; then
3062 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3063else
ba479fd2
NN
3064 cat >conftest.$ac_ext <<_ACEOF
3065#line $LINENO "configure"
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
414d23ae 3071
ba479fd2
NN
3072int
3073main ()
3074{
414d23ae 3075long long int i;
ba479fd2
NN
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3082 (eval $ac_compile) 2>&5
3083 ac_status=$?
3084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3085 (exit $ac_status); } &&
3086 { ac_try='test -s conftest.$ac_objext'
3087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3088 (eval $ac_try) 2>&5
3089 ac_status=$?
3090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3091 (exit $ac_status); }; }; then
414d23ae
HPN
3092 ac_cv_c_long_long=yes
3093else
ba479fd2
NN
3094 echo "$as_me: failed program was:" >&5
3095sed 's/^/| /' conftest.$ac_ext >&5
3096
3097ac_cv_c_long_long=no
414d23ae 3098fi
ba479fd2 3099rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3100fi
ba479fd2
NN
3101echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3102echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3103 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3104
3105cat >>confdefs.h <<\_ACEOF
414d23ae 3106#define HAVE_LONG_LONG 1
ba479fd2 3107_ACEOF
414d23ae
HPN
3108
3109 fi
ba479fd2
NN
3110echo "$as_me:$LINENO: checking for __int64" >&5
3111echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3112if test "${ac_cv_c___int64+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
3114else
3115 cat >conftest.$ac_ext <<_ACEOF
3116#line $LINENO "configure"
3117/* confdefs.h. */
3118_ACEOF
3119cat confdefs.h >>conftest.$ac_ext
3120cat >>conftest.$ac_ext <<_ACEOF
3121/* end confdefs.h. */
3122
3123int
3124main ()
3125{
414d23ae 3126__int64 i;
ba479fd2
NN
3127 ;
3128 return 0;
3129}
3130_ACEOF
3131rm -f conftest.$ac_objext
3132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3133 (eval $ac_compile) 2>&5
3134 ac_status=$?
3135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136 (exit $ac_status); } &&
3137 { ac_try='test -s conftest.$ac_objext'
3138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3139 (eval $ac_try) 2>&5
3140 ac_status=$?
3141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142 (exit $ac_status); }; }; then
414d23ae
HPN
3143 ac_cv_c___int64=yes
3144else
ba479fd2
NN
3145 echo "$as_me: failed program was:" >&5
3146sed 's/^/| /' conftest.$ac_ext >&5
3147
3148ac_cv_c___int64=no
414d23ae 3149fi
ba479fd2 3150rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3151fi
ba479fd2
NN
3152echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3153echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3154 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3155
3156cat >>confdefs.h <<\_ACEOF
414d23ae 3157#define HAVE___INT64 1
ba479fd2 3158_ACEOF
414d23ae
HPN
3159
3160 fi
3161
ba479fd2
NN
3162echo "$as_me:$LINENO: checking for built-in _Bool" >&5
3163echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6
3164if test "${gcc_cv_c__bool+set}" = set; then
3165 echo $ECHO_N "(cached) $ECHO_C" >&6
3166else
3167 cat >conftest.$ac_ext <<_ACEOF
3168#line $LINENO "configure"
3169/* confdefs.h. */
3170_ACEOF
3171cat confdefs.h >>conftest.$ac_ext
3172cat >>conftest.$ac_ext <<_ACEOF
3173/* end confdefs.h. */
3174
3175int
3176main ()
3177{
414d23ae 3178_Bool foo;
ba479fd2
NN
3179 ;
3180 return 0;
3181}
3182_ACEOF
3183rm -f conftest.$ac_objext
3184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3185 (eval $ac_compile) 2>&5
3186 ac_status=$?
3187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3188 (exit $ac_status); } &&
3189 { ac_try='test -s conftest.$ac_objext'
3190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3191 (eval $ac_try) 2>&5
3192 ac_status=$?
3193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3194 (exit $ac_status); }; }; then
414d23ae
HPN
3195 gcc_cv_c__bool=yes
3196else
ba479fd2
NN
3197 echo "$as_me: failed program was:" >&5
3198sed 's/^/| /' conftest.$ac_ext >&5
cafe096b 3199
ba479fd2 3200gcc_cv_c__bool=no
6e3f3080 3201fi
ba479fd2 3202rm -f conftest.$ac_objext conftest.$ac_ext
6e3f3080 3203
ba479fd2
NN
3204fi
3205echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5
3206echo "${ECHO_T}$gcc_cv_c__bool" >&6
63cf211a 3207if test $gcc_cv_c__bool = yes; then
ba479fd2
NN
3208
3209cat >>confdefs.h <<\_ACEOF
414d23ae 3210#define HAVE__BOOL 1
ba479fd2 3211_ACEOF
414d23ae
HPN
3212
3213fi
3214
3215
3216# sizeof(char) is 1 by definition.
ba479fd2
NN
3217echo "$as_me:$LINENO: checking size of void *" >&5
3218echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3219if test "${ac_cv_sizeof_void_p+set}" = set; then
3220 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd
KG
3221else
3222 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3223 cat >conftest.$ac_ext <<_ACEOF
3224#line $LINENO "configure"
3225/* confdefs.h. */
3226_ACEOF
3227cat confdefs.h >>conftest.$ac_ext
3228cat >>conftest.$ac_ext <<_ACEOF
3229/* end confdefs.h. */
75b6f3fd
KG
3230#include "confdefs.h"
3231#include <sys/types.h>
3232
3233
ba479fd2
NN
3234int
3235main ()
3236{
75b6f3fd 3237switch (0) case 0: case (sizeof (void *) == $ac_size):;
ba479fd2
NN
3238 ;
3239 return 0;
3240}
3241_ACEOF
3242rm -f conftest.$ac_objext
3243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3244 (eval $ac_compile) 2>&5
3245 ac_status=$?
3246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247 (exit $ac_status); } &&
3248 { ac_try='test -s conftest.$ac_objext'
3249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3250 (eval $ac_try) 2>&5
3251 ac_status=$?
3252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3253 (exit $ac_status); }; }; then
75b6f3fd
KG
3254 ac_cv_sizeof_void_p=$ac_size
3255else
ba479fd2
NN
3256 echo "$as_me: failed program was:" >&5
3257sed 's/^/| /' conftest.$ac_ext >&5
3258
75b6f3fd 3259fi
ba479fd2 3260rm -f conftest.$ac_objext conftest.$ac_ext
75b6f3fd
KG
3261 if test x$ac_cv_sizeof_void_p != x ; then break; fi
3262done
3263
3264fi
3265
3266if test x$ac_cv_sizeof_void_p = x ; then
ba479fd2
NN
3267 { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5
3268echo "$as_me: error: cannot determine a size for void *" >&2;}
3269 { (exit 1); exit 1; }; }
75b6f3fd 3270fi
ba479fd2
NN
3271echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3272echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3273
3274cat >>confdefs.h <<_ACEOF
75b6f3fd 3275#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
ba479fd2 3276_ACEOF
75b6f3fd
KG
3277
3278
ba479fd2
NN
3279echo "$as_me:$LINENO: checking size of short" >&5
3280echo $ECHO_N "checking size of short... $ECHO_C" >&6
3281if test "${ac_cv_sizeof_short+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3283else
4977bab6 3284 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3285 cat >conftest.$ac_ext <<_ACEOF
3286#line $LINENO "configure"
3287/* confdefs.h. */
3288_ACEOF
3289cat confdefs.h >>conftest.$ac_ext
3290cat >>conftest.$ac_ext <<_ACEOF
3291/* end confdefs.h. */
414d23ae
HPN
3292#include "confdefs.h"
3293#include <sys/types.h>
3294
3295
ba479fd2
NN
3296int
3297main ()
3298{
414d23ae 3299switch (0) case 0: case (sizeof (short) == $ac_size):;
ba479fd2
NN
3300 ;
3301 return 0;
3302}
3303_ACEOF
3304rm -f conftest.$ac_objext
3305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3306 (eval $ac_compile) 2>&5
3307 ac_status=$?
3308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3309 (exit $ac_status); } &&
3310 { ac_try='test -s conftest.$ac_objext'
3311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3312 (eval $ac_try) 2>&5
3313 ac_status=$?
3314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3315 (exit $ac_status); }; }; then
414d23ae
HPN
3316 ac_cv_sizeof_short=$ac_size
3317else
ba479fd2
NN
3318 echo "$as_me: failed program was:" >&5
3319sed 's/^/| /' conftest.$ac_ext >&5
3320
84c041a1 3321fi
ba479fd2 3322rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3323 if test x$ac_cv_sizeof_short != x ; then break; fi
3324done
3325
84c041a1 3326fi
414d23ae
HPN
3327
3328if test x$ac_cv_sizeof_short = x ; then
ba479fd2
NN
3329 { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
3330echo "$as_me: error: cannot determine a size for short" >&2;}
3331 { (exit 1); exit 1; }; }
84c041a1 3332fi
ba479fd2
NN
3333echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
3334echo "${ECHO_T}$ac_cv_sizeof_short" >&6
3335
3336cat >>confdefs.h <<_ACEOF
414d23ae 3337#define SIZEOF_SHORT $ac_cv_sizeof_short
ba479fd2 3338_ACEOF
84c041a1 3339
414d23ae 3340
ba479fd2
NN
3341echo "$as_me:$LINENO: checking size of int" >&5
3342echo $ECHO_N "checking size of int... $ECHO_C" >&6
3343if test "${ac_cv_sizeof_int+set}" = set; then
3344 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3345else
4977bab6 3346 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3347 cat >conftest.$ac_ext <<_ACEOF
3348#line $LINENO "configure"
3349/* confdefs.h. */
3350_ACEOF
3351cat confdefs.h >>conftest.$ac_ext
3352cat >>conftest.$ac_ext <<_ACEOF
3353/* end confdefs.h. */
414d23ae
HPN
3354#include "confdefs.h"
3355#include <sys/types.h>
3356
75e93faa 3357
ba479fd2
NN
3358int
3359main ()
3360{
414d23ae 3361switch (0) case 0: case (sizeof (int) == $ac_size):;
ba479fd2
NN
3362 ;
3363 return 0;
3364}
3365_ACEOF
3366rm -f conftest.$ac_objext
3367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3368 (eval $ac_compile) 2>&5
3369 ac_status=$?
3370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3371 (exit $ac_status); } &&
3372 { ac_try='test -s conftest.$ac_objext'
3373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3374 (eval $ac_try) 2>&5
3375 ac_status=$?
3376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377 (exit $ac_status); }; }; then
414d23ae 3378 ac_cv_sizeof_int=$ac_size
75e93faa 3379else
ba479fd2
NN
3380 echo "$as_me: failed program was:" >&5
3381sed 's/^/| /' conftest.$ac_ext >&5
3382
75e93faa 3383fi
ba479fd2 3384rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3385 if test x$ac_cv_sizeof_int != x ; then break; fi
75e93faa
ZW
3386done
3387
3388fi
3389
414d23ae 3390if test x$ac_cv_sizeof_int = x ; then
ba479fd2
NN
3391 { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
3392echo "$as_me: error: cannot determine a size for int" >&2;}
3393 { (exit 1); exit 1; }; }
414d23ae 3394fi
ba479fd2
NN
3395echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
3396echo "${ECHO_T}$ac_cv_sizeof_int" >&6
3397
3398cat >>confdefs.h <<_ACEOF
414d23ae 3399#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 3400_ACEOF
75e93faa 3401
414d23ae 3402
ba479fd2
NN
3403echo "$as_me:$LINENO: checking size of long" >&5
3404echo $ECHO_N "checking size of long... $ECHO_C" >&6
3405if test "${ac_cv_sizeof_long+set}" = set; then
3406 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3407else
4977bab6 3408 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3409 cat >conftest.$ac_ext <<_ACEOF
3410#line $LINENO "configure"
3411/* confdefs.h. */
3412_ACEOF
3413cat confdefs.h >>conftest.$ac_ext
3414cat >>conftest.$ac_ext <<_ACEOF
3415/* end confdefs.h. */
75e93faa 3416#include "confdefs.h"
414d23ae
HPN
3417#include <sys/types.h>
3418
75e93faa 3419
ba479fd2
NN
3420int
3421main ()
3422{
414d23ae 3423switch (0) case 0: case (sizeof (long) == $ac_size):;
ba479fd2
NN
3424 ;
3425 return 0;
3426}
3427_ACEOF
3428rm -f conftest.$ac_objext
3429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3430 (eval $ac_compile) 2>&5
3431 ac_status=$?
3432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3433 (exit $ac_status); } &&
3434 { ac_try='test -s conftest.$ac_objext'
3435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3436 (eval $ac_try) 2>&5
3437 ac_status=$?
3438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3439 (exit $ac_status); }; }; then
414d23ae 3440 ac_cv_sizeof_long=$ac_size
75e93faa 3441else
ba479fd2
NN
3442 echo "$as_me: failed program was:" >&5
3443sed 's/^/| /' conftest.$ac_ext >&5
3444
75e93faa 3445fi
ba479fd2 3446rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3447 if test x$ac_cv_sizeof_long != x ; then break; fi
3448done
75e93faa 3449
414d23ae 3450fi
75e93faa 3451
414d23ae 3452if test x$ac_cv_sizeof_long = x ; then
ba479fd2
NN
3453 { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
3454echo "$as_me: error: cannot determine a size for long" >&2;}
3455 { (exit 1); exit 1; }; }
75e93faa 3456fi
ba479fd2
NN
3457echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
3458echo "${ECHO_T}$ac_cv_sizeof_long" >&6
3459
3460cat >>confdefs.h <<_ACEOF
414d23ae 3461#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 3462_ACEOF
75e93faa
ZW
3463
3464
414d23ae 3465if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3466 echo "$as_me:$LINENO: checking size of long long" >&5
3467echo $ECHO_N "checking size of long long... $ECHO_C" >&6
3468if test "${ac_cv_sizeof_long_long+set}" = set; then
3469 echo $ECHO_N "(cached) $ECHO_C" >&6
04cabffc 3470else
4977bab6 3471 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3472 cat >conftest.$ac_ext <<_ACEOF
3473#line $LINENO "configure"
3474/* confdefs.h. */
3475_ACEOF
3476cat confdefs.h >>conftest.$ac_ext
3477cat >>conftest.$ac_ext <<_ACEOF
3478/* end confdefs.h. */
414d23ae
HPN
3479#include "confdefs.h"
3480#include <sys/types.h>
3481
04cabffc 3482
ba479fd2
NN
3483int
3484main ()
3485{
414d23ae 3486switch (0) case 0: case (sizeof (long long) == $ac_size):;
ba479fd2
NN
3487 ;
3488 return 0;
3489}
3490_ACEOF
3491rm -f conftest.$ac_objext
3492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3493 (eval $ac_compile) 2>&5
3494 ac_status=$?
3495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3496 (exit $ac_status); } &&
3497 { ac_try='test -s conftest.$ac_objext'
3498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3499 (eval $ac_try) 2>&5
3500 ac_status=$?
3501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3502 (exit $ac_status); }; }; then
414d23ae 3503 ac_cv_sizeof_long_long=$ac_size
04cabffc 3504else
ba479fd2
NN
3505 echo "$as_me: failed program was:" >&5
3506sed 's/^/| /' conftest.$ac_ext >&5
3507
04cabffc 3508fi
ba479fd2 3509rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3510 if test x$ac_cv_sizeof_long_long != x ; then break; fi
3511done
3512
04cabffc
KG
3513fi
3514
414d23ae 3515if test x$ac_cv_sizeof_long_long = x ; then
ba479fd2
NN
3516 { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
3517echo "$as_me: error: cannot determine a size for long long" >&2;}
3518 { (exit 1); exit 1; }; }
414d23ae 3519fi
ba479fd2
NN
3520echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
3521echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
3522
3523cat >>confdefs.h <<_ACEOF
414d23ae 3524#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 3525_ACEOF
04cabffc 3526
04cabffc 3527
414d23ae
HPN
3528fi
3529if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3530 echo "$as_me:$LINENO: checking size of __int64" >&5
3531echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
3532if test "${ac_cv_sizeof___int64+set}" = set; then
3533 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3534else
4977bab6 3535 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3536 cat >conftest.$ac_ext <<_ACEOF
3537#line $LINENO "configure"
3538/* confdefs.h. */
3539_ACEOF
3540cat confdefs.h >>conftest.$ac_ext
3541cat >>conftest.$ac_ext <<_ACEOF
3542/* end confdefs.h. */
414d23ae
HPN
3543#include "confdefs.h"
3544#include <sys/types.h>
3545
61842080 3546
ba479fd2
NN
3547int
3548main ()
3549{
414d23ae 3550switch (0) case 0: case (sizeof (__int64) == $ac_size):;
ba479fd2
NN
3551 ;
3552 return 0;
3553}
3554_ACEOF
3555rm -f conftest.$ac_objext
3556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3557 (eval $ac_compile) 2>&5
3558 ac_status=$?
3559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3560 (exit $ac_status); } &&
3561 { ac_try='test -s conftest.$ac_objext'
3562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3563 (eval $ac_try) 2>&5
3564 ac_status=$?
3565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3566 (exit $ac_status); }; }; then
414d23ae 3567 ac_cv_sizeof___int64=$ac_size
75e93faa 3568else
ba479fd2
NN
3569 echo "$as_me: failed program was:" >&5
3570sed 's/^/| /' conftest.$ac_ext >&5
3571
75e93faa 3572fi
ba479fd2 3573rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3574 if test x$ac_cv_sizeof___int64 != x ; then break; fi
3575done
3576
75e93faa
ZW
3577fi
3578
414d23ae 3579if test x$ac_cv_sizeof___int64 = x ; then
ba479fd2
NN
3580 { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
3581echo "$as_me: error: cannot determine a size for __int64" >&2;}
3582 { (exit 1); exit 1; }; }
414d23ae 3583fi
ba479fd2
NN
3584echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
3585echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
3586
3587cat >>confdefs.h <<_ACEOF
414d23ae 3588#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 3589_ACEOF
414d23ae 3590
cafe096b 3591
414d23ae
HPN
3592fi
3593
34a86c2b
NN
3594# -----------------
3595# Find Ada compiler
3596# -----------------
3597
3598# See if GNAT has been installed
34a86c2b
NN
3599
3600
e0520fa7 3601
ba479fd2
NN
3602if test -n "$ac_tool_prefix"; then
3603 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
34a86c2b 3604set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
ba479fd2
NN
3605echo "$as_me:$LINENO: checking for $ac_word" >&5
3606echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3607if test "${ac_cv_prog_GNATBIND+set}" = set; then
3608 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3609else
3610 if test -n "$GNATBIND"; then
3611 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3612else
ba479fd2
NN
3613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
3618 for ac_exec_ext in '' $ac_executable_extensions; do
3619 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3620 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3621 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3622 break 2
3623 fi
3624done
3625done
3626
34a86c2b
NN
3627fi
3628fi
ba479fd2 3629GNATBIND=$ac_cv_prog_GNATBIND
34a86c2b 3630if test -n "$GNATBIND"; then
ba479fd2
NN
3631 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3632echo "${ECHO_T}$GNATBIND" >&6
34a86c2b 3633else
ba479fd2
NN
3634 echo "$as_me:$LINENO: result: no" >&5
3635echo "${ECHO_T}no" >&6
34a86c2b
NN
3636fi
3637
ba479fd2 3638fi
34a86c2b 3639if test -z "$ac_cv_prog_GNATBIND"; then
ba479fd2 3640 ac_ct_GNATBIND=$GNATBIND
34a86c2b
NN
3641 # Extract the first word of "gnatbind", so it can be a program name with args.
3642set dummy gnatbind; ac_word=$2
ba479fd2
NN
3643echo "$as_me:$LINENO: checking for $ac_word" >&5
3644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3646 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b 3647else
ba479fd2
NN
3648 if test -n "$ac_ct_GNATBIND"; then
3649 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
34a86c2b 3650else
ba479fd2
NN
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
3656 for ac_exec_ext in '' $ac_executable_extensions; do
3657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3658 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3660 break 2
3661 fi
3662done
3663done
3664
3665 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
34a86c2b
NN
3666fi
3667fi
ba479fd2
NN
3668ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3669if test -n "$ac_ct_GNATBIND"; then
3670 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3671echo "${ECHO_T}$ac_ct_GNATBIND" >&6
34a86c2b 3672else
ba479fd2
NN
3673 echo "$as_me:$LINENO: result: no" >&5
3674echo "${ECHO_T}no" >&6
34a86c2b
NN
3675fi
3676
ba479fd2 3677 GNATBIND=$ac_ct_GNATBIND
34a86c2b 3678else
ba479fd2 3679 GNATBIND="$ac_cv_prog_GNATBIND"
34a86c2b
NN
3680fi
3681
ba479fd2
NN
3682echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3683echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3684if test "${gcc_cv_cc_supports_ada+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3686else
3687 cat >conftest.adb <<EOF
3688procedure conftest is begin null; end conftest;
3689EOF
e0520fa7
NN
3690gcc_cv_cc_supports_ada=no
3691# There is a bug in old released versions of GCC which causes the
3692# driver to exit successfully when the appropriate language module
3693# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3694# Therefore we must check for the error message as well as an
3695# unsuccessful exit.
3696errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
3697if test x"$errors" = x; then
3698 gcc_cv_cc_supports_ada=yes
3699 break
3700fi
34a86c2b
NN
3701rm -f conftest.*
3702fi
ba479fd2
NN
3703echo "$as_me:$LINENO: result: $gcc_cv_cc_supports_ada" >&5
3704echo "${ECHO_T}$gcc_cv_cc_supports_ada" >&6
34a86c2b 3705
e0520fa7 3706if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then
34a86c2b
NN
3707 have_gnat=yes
3708else
3709 have_gnat=no
3710fi
3711
3712
34a86c2b
NN
3713# ---------------------
3714# Warnings and checking
3715# ---------------------
3716
3717strict1_warn=
f73ccc50 3718if test $ac_cv_prog_cc_no_long_long = yes ; then
34a86c2b
NN
3719 strict1_warn="-pedantic -Wno-long-long"
3720fi
3721
3722
ba479fd2 3723# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
3724# That's useful for people building cross-compilers, or just running a
3725# quick `make'.
3726warn_cflags=
3727if test "x$GCC" = "xyes"; then
3728 warn_cflags='$(GCC_WARN_CFLAGS)'
3729fi
3730
3731
dd859b8a
KG
3732# Enable -Werror in bootstrap stage2 and later.
3733# Change the default to "no" on release branches.
3734# Check whether --enable-werror or --disable-werror was given.
3735if test "${enable_werror+set}" = set; then
3736 enableval="$enable_werror"
ba479fd2 3737
dd859b8a
KG
3738else
3739 enable_werror=yes
ba479fd2 3740fi;
dd859b8a
KG
3741if test x$enable_werror = xyes ; then
3742 WERROR=-Werror
3743fi
3744
3745
414d23ae
HPN
3746# Enable expensive internal checks
3747# Check whether --enable-checking or --disable-checking was given.
3748if test "${enable_checking+set}" = set; then
3749 enableval="$enable_checking"
3750 ac_checking=
3751ac_tree_checking=
3752ac_rtl_checking=
3753ac_rtlflag_checking=
3754ac_gc_checking=
3755ac_gc_always_collect=
5dfa45d0 3756ac_fold_checking=
414d23ae
HPN
3757case "${enableval}" in
3758yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
3759 ac_rtlflag_checking=1 ;;
3760no) ;;
3761*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
3762 set fnord $enableval; shift
3763 IFS="$ac_save_IFS"
3764 for check
3765 do
3766 case $check in
3767 misc) ac_checking=1 ;;
3768 tree) ac_tree_checking=1 ;;
3769 rtlflag) ac_rtlflag_checking=1 ;;
3770 rtl) ac_rtl_checking=1 ;;
3771 gc) ac_gc_checking=1 ;;
3772 gcac) ac_gc_always_collect=1 ;;
5dfa45d0 3773 fold) ac_fold_checking=1 ;;
414d23ae 3774 valgrind) ac_checking_valgrind=1 ;;
ba479fd2
NN
3775 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
3776echo "$as_me: error: unknown check category $check" >&2;}
3777 { (exit 1); exit 1; }; } ;;
414d23ae
HPN
3778 esac
3779 done
3780 ;;
3781esac
3782
75e93faa 3783else
414d23ae
HPN
3784 # Enable some checks by default for development versions of GCC
3785ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
ba479fd2
NN
3786fi;
3787nocommon_flag=""
3788if test x$ac_checking != x ; then
3789
3790cat >>confdefs.h <<\_ACEOF
3791#define ENABLE_CHECKING 1
3792_ACEOF
3793
3794 nocommon_flag=-fno-common
3795fi
3796
3797if test x$ac_tree_checking != x ; then
3798
3799cat >>confdefs.h <<\_ACEOF
3800#define ENABLE_TREE_CHECKING 1
3801_ACEOF
3802
3803fi
3804if test x$ac_rtl_checking != x ; then
3805
3806cat >>confdefs.h <<\_ACEOF
3807#define ENABLE_RTL_CHECKING 1
3808_ACEOF
3809
3810fi
3811if test x$ac_rtlflag_checking != x ; then
3812
3813cat >>confdefs.h <<\_ACEOF
3814#define ENABLE_RTL_FLAG_CHECKING 1
3815_ACEOF
3816
3817fi
3818if test x$ac_gc_checking != x ; then
3819
3820cat >>confdefs.h <<\_ACEOF
3821#define ENABLE_GC_CHECKING 1
3822_ACEOF
3823
3824fi
3825if test x$ac_gc_always_collect != x ; then
3826
3827cat >>confdefs.h <<\_ACEOF
3828#define ENABLE_GC_ALWAYS_COLLECT 1
3829_ACEOF
3830
3831fi
3832if test x$ac_fold_checking != x ; then
3833
3834cat >>confdefs.h <<\_ACEOF
3835#define ENABLE_FOLD_CHECKING 1
3836_ACEOF
3837
3838fi
3839valgrind_path_defines=
3840valgrind_command=
3841
3842
3843echo "$as_me:$LINENO: checking for egrep" >&5
3844echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3845if test "${ac_cv_prog_egrep+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3847else
3848 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3849 then ac_cv_prog_egrep='grep -E'
3850 else ac_cv_prog_egrep='egrep'
3851 fi
3852fi
3853echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3854echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3855 EGREP=$ac_cv_prog_egrep
3856
3857
3858echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3859echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3860if test "${ac_cv_header_stdc+set}" = set; then
3861 echo $ECHO_N "(cached) $ECHO_C" >&6
3862else
3863 cat >conftest.$ac_ext <<_ACEOF
3864#line $LINENO "configure"
3865/* confdefs.h. */
3866_ACEOF
3867cat confdefs.h >>conftest.$ac_ext
3868cat >>conftest.$ac_ext <<_ACEOF
3869/* end confdefs.h. */
3870#include <stdlib.h>
3871#include <stdarg.h>
3872#include <string.h>
3873#include <float.h>
3874
3875int
3876main ()
3877{
3878
3879 ;
3880 return 0;
3881}
3882_ACEOF
3883rm -f conftest.$ac_objext
3884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3885 (eval $ac_compile) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); } &&
3889 { ac_try='test -s conftest.$ac_objext'
3890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3891 (eval $ac_try) 2>&5
3892 ac_status=$?
3893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894 (exit $ac_status); }; }; then
3895 ac_cv_header_stdc=yes
3896else
3897 echo "$as_me: failed program was:" >&5
3898sed 's/^/| /' conftest.$ac_ext >&5
3899
3900ac_cv_header_stdc=no
3901fi
3902rm -f conftest.$ac_objext conftest.$ac_ext
3903
3904if test $ac_cv_header_stdc = yes; then
3905 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3906 cat >conftest.$ac_ext <<_ACEOF
3907#line $LINENO "configure"
3908/* confdefs.h. */
3909_ACEOF
3910cat confdefs.h >>conftest.$ac_ext
3911cat >>conftest.$ac_ext <<_ACEOF
3912/* end confdefs.h. */
3913#include <string.h>
3914
3915_ACEOF
3916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3917 $EGREP "memchr" >/dev/null 2>&1; then
3918 :
3919else
3920 ac_cv_header_stdc=no
3921fi
3922rm -f conftest*
3923
3924fi
3925
3926if test $ac_cv_header_stdc = yes; then
3927 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3928 cat >conftest.$ac_ext <<_ACEOF
3929#line $LINENO "configure"
3930/* confdefs.h. */
3931_ACEOF
3932cat confdefs.h >>conftest.$ac_ext
3933cat >>conftest.$ac_ext <<_ACEOF
3934/* end confdefs.h. */
3935#include <stdlib.h>
3936
3937_ACEOF
3938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3939 $EGREP "free" >/dev/null 2>&1; then
3940 :
3941else
3942 ac_cv_header_stdc=no
3943fi
3944rm -f conftest*
3945
3946fi
3947
3948if test $ac_cv_header_stdc = yes; then
3949 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3950 if test "$cross_compiling" = yes; then
3951 :
3952else
3953 cat >conftest.$ac_ext <<_ACEOF
3954#line $LINENO "configure"
3955/* confdefs.h. */
3956_ACEOF
3957cat confdefs.h >>conftest.$ac_ext
3958cat >>conftest.$ac_ext <<_ACEOF
3959/* end confdefs.h. */
3960#include <ctype.h>
3961#if ((' ' & 0x0FF) == 0x020)
3962# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3963# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3964#else
3965# define ISLOWER(c) \
3966 (('a' <= (c) && (c) <= 'i') \
3967 || ('j' <= (c) && (c) <= 'r') \
3968 || ('s' <= (c) && (c) <= 'z'))
3969# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3970#endif
3971
3972#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3973int
3974main ()
3975{
3976 int i;
3977 for (i = 0; i < 256; i++)
3978 if (XOR (islower (i), ISLOWER (i))
3979 || toupper (i) != TOUPPER (i))
3980 exit(2);
3981 exit (0);
3982}
3983_ACEOF
3984rm -f conftest$ac_exeext
3985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3986 (eval $ac_link) 2>&5
3987 ac_status=$?
3988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991 (eval $ac_try) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); }; }; then
3995 :
3996else
3997 echo "$as_me: program exited with status $ac_status" >&5
3998echo "$as_me: failed program was:" >&5
3999sed 's/^/| /' conftest.$ac_ext >&5
4000
4001( exit $ac_status )
4002ac_cv_header_stdc=no
63cf211a 4003fi
a6a5e4c9 4004rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4005fi
4006fi
4007fi
4008echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4009echo "${ECHO_T}$ac_cv_header_stdc" >&6
4010if test $ac_cv_header_stdc = yes; then
63cf211a 4011
ba479fd2
NN
4012cat >>confdefs.h <<\_ACEOF
4013#define STDC_HEADERS 1
4014_ACEOF
75e93faa 4015
414d23ae 4016fi
827ae6cf 4017
ba479fd2
NN
4018# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4019
4020
4021
827ae6cf 4022
6e3f3080
NN
4023
4024
6e3f3080 4025
6e3f3080 4026
ba479fd2
NN
4027
4028for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4029 inttypes.h stdint.h unistd.h
4030do
4031as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4032echo "$as_me:$LINENO: checking for $ac_header" >&5
4033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4034if eval "test \"\${$as_ac_Header+set}\" = set"; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
4036else
4037 cat >conftest.$ac_ext <<_ACEOF
4038#line $LINENO "configure"
4039/* confdefs.h. */
4040_ACEOF
4041cat confdefs.h >>conftest.$ac_ext
4042cat >>conftest.$ac_ext <<_ACEOF
4043/* end confdefs.h. */
4044$ac_includes_default
4045
4046#include <$ac_header>
4047_ACEOF
4048rm -f conftest.$ac_objext
4049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4050 (eval $ac_compile) 2>&5
4051 ac_status=$?
4052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4053 (exit $ac_status); } &&
4054 { ac_try='test -s conftest.$ac_objext'
4055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4056 (eval $ac_try) 2>&5
4057 ac_status=$?
4058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059 (exit $ac_status); }; }; then
4060 eval "$as_ac_Header=yes"
4061else
4062 echo "$as_me: failed program was:" >&5
4063sed 's/^/| /' conftest.$ac_ext >&5
4064
4065eval "$as_ac_Header=no"
4066fi
4067rm -f conftest.$ac_objext conftest.$ac_ext
4068fi
4069echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4070echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4071if test `eval echo '${'$as_ac_Header'}'` = yes; then
4072 cat >>confdefs.h <<_ACEOF
4073#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4074_ACEOF
6e3f3080 4075
63cf211a 4076fi
6e3f3080 4077
ba479fd2
NN
4078done
4079
4080
4081if test "${ac_cv_header_valgrind_h+set}" = set; then
4082 echo "$as_me:$LINENO: checking for valgrind.h" >&5
4083echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4084if test "${ac_cv_header_valgrind_h+set}" = set; then
4085 echo $ECHO_N "(cached) $ECHO_C" >&6
4086fi
4087echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4088echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4089else
4090 # Is the header compilable?
4091echo "$as_me:$LINENO: checking valgrind.h usability" >&5
4092echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
4093cat >conftest.$ac_ext <<_ACEOF
4094#line $LINENO "configure"
4095/* confdefs.h. */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h. */
4100$ac_includes_default
63cf211a 4101#include <valgrind.h>
ba479fd2
NN
4102_ACEOF
4103rm -f conftest.$ac_objext
4104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4105 (eval $ac_compile) 2>&5
4106 ac_status=$?
4107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4108 (exit $ac_status); } &&
4109 { ac_try='test -s conftest.$ac_objext'
4110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4111 (eval $ac_try) 2>&5
4112 ac_status=$?
4113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114 (exit $ac_status); }; }; then
4115 ac_header_compiler=yes
4116else
4117 echo "$as_me: failed program was:" >&5
4118sed 's/^/| /' conftest.$ac_ext >&5
4119
4120ac_header_compiler=no
4121fi
4122rm -f conftest.$ac_objext conftest.$ac_ext
4123echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4124echo "${ECHO_T}$ac_header_compiler" >&6
4125
4126# Is the header present?
4127echo "$as_me:$LINENO: checking valgrind.h presence" >&5
4128echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
4129cat >conftest.$ac_ext <<_ACEOF
4130#line $LINENO "configure"
4131/* confdefs.h. */
4132_ACEOF
4133cat confdefs.h >>conftest.$ac_ext
4134cat >>conftest.$ac_ext <<_ACEOF
4135/* end confdefs.h. */
4136#include <valgrind.h>
4137_ACEOF
4138if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4139 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4140 ac_status=$?
4141 grep -v '^ *+' conftest.er1 >conftest.err
4142 rm -f conftest.er1
4143 cat conftest.err >&5
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); } >/dev/null; then
4146 if test -s conftest.err; then
4147 ac_cpp_err=$ac_c_preproc_warn_flag
4148 else
4149 ac_cpp_err=
4150 fi
4151else
4152 ac_cpp_err=yes
4153fi
4154if test -z "$ac_cpp_err"; then
4155 ac_header_preproc=yes
4156else
4157 echo "$as_me: failed program was:" >&5
4158sed 's/^/| /' conftest.$ac_ext >&5
4159
4160 ac_header_preproc=no
4161fi
4162rm -f conftest.err conftest.$ac_ext
4163echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4164echo "${ECHO_T}$ac_header_preproc" >&6
4165
4166# So? What about this header?
4167case $ac_header_compiler:$ac_header_preproc in
4168 yes:no )
4169 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
4170echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4171 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4172echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4173 (
4174 cat <<\_ASBOX
4175## ------------------------------------ ##
4176## Report this to bug-autoconf@gnu.org. ##
4177## ------------------------------------ ##
4178_ASBOX
4179 ) |
4180 sed "s/^/$as_me: WARNING: /" >&2
4181 ;;
4182 no:yes )
4183 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
4184echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
4185 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
4186echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
4187 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4188echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4189 (
4190 cat <<\_ASBOX
4191## ------------------------------------ ##
4192## Report this to bug-autoconf@gnu.org. ##
4193## ------------------------------------ ##
4194_ASBOX
4195 ) |
4196 sed "s/^/$as_me: WARNING: /" >&2
4197 ;;
4198esac
4199echo "$as_me:$LINENO: checking for valgrind.h" >&5
4200echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4201if test "${ac_cv_header_valgrind_h+set}" = set; then
4202 echo $ECHO_N "(cached) $ECHO_C" >&6
4203else
4204 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 4205fi
ba479fd2
NN
4206echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4207echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4208
6e3f3080 4209fi
ba479fd2 4210if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
4211 have_valgrind_h=yes
4212else
ba479fd2 4213 have_valgrind_h=no
6938ec6c
NN
4214fi
4215
4216
ba479fd2 4217
414d23ae
HPN
4218if test x$ac_checking_valgrind != x ; then
4219 # It is certainly possible that there's valgrind but no valgrind.h.
4220 # GCC relies on making annotations so we must have both.
ba479fd2
NN
4221 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
4222echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
4223 cat >conftest.$ac_ext <<_ACEOF
4224#line $LINENO "configure"
4225/* confdefs.h. */
4226_ACEOF
4227cat confdefs.h >>conftest.$ac_ext
4228cat >>conftest.$ac_ext <<_ACEOF
4229/* end confdefs.h. */
a207b594 4230#include <valgrind/memcheck.h>
14011ca4
AJ
4231#ifndef VALGRIND_DISCARD
4232#error VALGRIND_DISCARD not defined
4233#endif
ba479fd2
NN
4234_ACEOF
4235if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4236 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4237 ac_status=$?
4238 grep -v '^ *+' conftest.er1 >conftest.err
4239 rm -f conftest.er1
4240 cat conftest.err >&5
4241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4242 (exit $ac_status); } >/dev/null; then
4243 if test -s conftest.err; then
4244 ac_cpp_err=$ac_c_preproc_warn_flag
4245 else
4246 ac_cpp_err=
4247 fi
4248else
4249 ac_cpp_err=yes
4250fi
4251if test -z "$ac_cpp_err"; then
a207b594
HPN
4252 gcc_cv_header_valgrind_memcheck_h=yes
4253else
ba479fd2
NN
4254 echo "$as_me: failed program was:" >&5
4255sed 's/^/| /' conftest.$ac_ext >&5
4256
a207b594
HPN
4257 gcc_cv_header_valgrind_memcheck_h=no
4258fi
ba479fd2
NN
4259rm -f conftest.err conftest.$ac_ext
4260 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
4261echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
4262 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
4263echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
4264 cat >conftest.$ac_ext <<_ACEOF
4265#line $LINENO "configure"
4266/* confdefs.h. */
4267_ACEOF
4268cat confdefs.h >>conftest.$ac_ext
4269cat >>conftest.$ac_ext <<_ACEOF
4270/* end confdefs.h. */
a207b594
HPN
4271#include <memcheck.h>
4272#ifndef VALGRIND_DISCARD
4273#error VALGRIND_DISCARD not defined
4274#endif
ba479fd2
NN
4275_ACEOF
4276if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4277 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4278 ac_status=$?
4279 grep -v '^ *+' conftest.er1 >conftest.err
4280 rm -f conftest.er1
4281 cat conftest.err >&5
4282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4283 (exit $ac_status); } >/dev/null; then
4284 if test -s conftest.err; then
4285 ac_cpp_err=$ac_c_preproc_warn_flag
4286 else
4287 ac_cpp_err=
4288 fi
4289else
4290 ac_cpp_err=yes
4291fi
4292if test -z "$ac_cpp_err"; then
14011ca4
AJ
4293 gcc_cv_header_memcheck_h=yes
4294else
ba479fd2
NN
4295 echo "$as_me: failed program was:" >&5
4296sed 's/^/| /' conftest.$ac_ext >&5
4297
cafe096b
EC
4298 gcc_cv_header_memcheck_h=no
4299fi
ba479fd2
NN
4300rm -f conftest.err conftest.$ac_ext
4301 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
4302echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
4303
56694dd9
ZW
4304# Prepare PATH_SEPARATOR.
4305# The user is always right.
4306if test "${PATH_SEPARATOR+set}" != set; then
4307 echo "#! /bin/sh" >conf$$.sh
4308 echo "exit 0" >>conf$$.sh
4309 chmod +x conf$$.sh
4310 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4311 PATH_SEPARATOR=';'
4312 else
4313 PATH_SEPARATOR=:
4314 fi
4315 rm -f conf$$.sh
4316fi
4317
4318# Find out how to test for executable files. Don't use a zero-byte file,
4319# as systems may use methods other than mode bits to determine executability.
4320cat >conf$$.file <<_ASEOF
4321#! /bin/sh
4322exit 0
4323_ASEOF
4324chmod +x conf$$.file
4325if test -x conf$$.file >/dev/null 2>&1; then
4326 ac_executable_p="test -x"
4327else
4328 ac_executable_p="test -f"
4329fi
4330rm -f conf$$.file
4331
4332# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 4333set dummy valgrind; ac_word=$2
ba479fd2
NN
4334echo "$as_me:$LINENO: checking for $ac_word" >&5
4335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336if test "${ac_cv_path_valgrind_path+set}" = set; then
4337 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
4338else
4339 case "$valgrind_path" in
56694dd9
ZW
4340 [\\/]* | ?:[\\/]*)
4341 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
4342 ;;
414d23ae 4343 *)
56694dd9
ZW
4344 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
4345 for ac_dir in $PATH; do
4346 IFS="$ac_save_IFS"
4347 test -z "$ac_dir" && ac_dir=.
4348 for ac_exec_ext in '' $ac_executable_extensions; do
4349 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
4350 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
4351 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
4352 break 2
4353 fi
4354 fi
4355 done
4356 done
4357 IFS="$ac_save_IFS"
4358 ;;
414d23ae 4359esac
75e93faa 4360fi
414d23ae
HPN
4361valgrind_path="$ac_cv_path_valgrind_path"
4362if test -n "$valgrind_path"; then
ba479fd2
NN
4363 echo "$as_me:$LINENO: result: $valgrind_path" >&5
4364echo "${ECHO_T}$valgrind_path" >&6
414d23ae 4365else
ba479fd2
NN
4366 echo "$as_me:$LINENO: result: no" >&5
4367echo "${ECHO_T}no" >&6
414d23ae
HPN
4368fi
4369
a207b594
HPN
4370 if test "x$valgrind_path" = "x" \
4371 || (test $have_valgrind_h = no \
4372 && test $gcc_cv_header_memcheck_h = no \
4373 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
4374 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
4375echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
4376 { (exit 1); exit 1; }; }
414d23ae
HPN
4377 fi
4378 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
4379 valgrind_command="$valgrind_path -q"
ba479fd2
NN
4380
4381cat >>confdefs.h <<\_ACEOF
414d23ae 4382#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 4383_ACEOF
75e93faa 4384
a207b594 4385 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
4386
4387cat >>confdefs.h <<\_ACEOF
a207b594 4388#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 4389_ACEOF
a207b594
HPN
4390
4391 fi
14011ca4 4392 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
4393
4394cat >>confdefs.h <<\_ACEOF
14011ca4 4395#define HAVE_MEMCHECK_H 1
ba479fd2 4396_ACEOF
14011ca4
AJ
4397
4398 fi
414d23ae 4399fi
75e93faa 4400
75e93faa
ZW
4401
4402
414d23ae
HPN
4403# Enable code coverage collection
4404# Check whether --enable-coverage or --disable-coverage was given.
4405if test "${enable_coverage+set}" = set; then
4406 enableval="$enable_coverage"
4407 case "${enableval}" in
4408yes|noopt)
e61a2eb7 4409 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
414d23ae
HPN
4410 ;;
4411opt)
e61a2eb7 4412 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
414d23ae
HPN
4413 ;;
4414*)
ba479fd2
NN
4415 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
4416echo "$as_me: error: unknown coverage setting $enableval" >&2;}
4417 { (exit 1); exit 1; }; }
414d23ae
HPN
4418 ;;
4419esac
75e93faa 4420else
414d23ae 4421 coverage_flags=""
ba479fd2 4422fi;
5c3bc9fb 4423
414d23ae 4424
439a7e54
DN
4425# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
4426if test "${enable_gather_detailed_mem_stats+set}" = set; then
4427 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 4428
439a7e54
DN
4429else
4430 enable_gather_detailed_mem_stats=no
ba479fd2 4431fi;
439a7e54 4432if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
4433
4434cat >>confdefs.h <<\_ACEOF
439a7e54 4435#define GATHER_STATISTICS 1
ba479fd2 4436_ACEOF
439a7e54
DN
4437
4438fi
4439
73458fb7
NN
4440# -------------------------------
4441# Miscenalleous configure options
4442# -------------------------------
34a86c2b
NN
4443
4444# With stabs
ba479fd2 4445
34a86c2b
NN
4446# Check whether --with-stabs or --without-stabs was given.
4447if test "${with_stabs+set}" = set; then
4448 withval="$with_stabs"
4449 stabs="$with_stabs"
4450else
4451 stabs=no
ba479fd2 4452fi;
cafe096b 4453
34a86c2b
NN
4454# Determine whether or not multilibs are enabled.
4455# Check whether --enable-multilib or --disable-multilib was given.
4456if test "${enable_multilib+set}" = set; then
4457 enableval="$enable_multilib"
ba479fd2 4458
34a86c2b
NN
4459else
4460 enable_multilib=yes
ba479fd2 4461fi;
75e93faa 4462
34a86c2b 4463
414d23ae
HPN
4464# Enable __cxa_atexit for C++.
4465# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
4466if test "${enable___cxa_atexit+set}" = set; then
4467 enableval="$enable___cxa_atexit"
75e93faa 4468
ba479fd2 4469fi;
75e93faa 4470
414d23ae
HPN
4471# Enable threads
4472# Pass with no value to take the default
4473# Pass with a value to specify a thread package
4474# Check whether --enable-threads or --disable-threads was given.
4475if test "${enable_threads+set}" = set; then
4476 enableval="$enable_threads"
ba479fd2 4477
414d23ae
HPN
4478else
4479 enable_threads=''
ba479fd2 4480fi;
c2e494a8 4481# Save in case it gets overwritten in config.gcc
414d23ae 4482enable_threads_flag=$enable_threads
414d23ae
HPN
4483
4484# Check whether --enable-objc-gc or --disable-objc-gc was given.
4485if test "${enable_objc_gc+set}" = set; then
4486 enableval="$enable_objc_gc"
4487 if test x$enable_objc_gc = xno; then
4488 objc_boehm_gc=''
4489else
4490 objc_boehm_gc=1
4491fi
4492else
4493 objc_boehm_gc=''
ba479fd2 4494fi;
75e93faa
ZW
4495
4496
414d23ae
HPN
4497# Check whether --with-dwarf2 or --without-dwarf2 was given.
4498if test "${with_dwarf2+set}" = set; then
4499 withval="$with_dwarf2"
4500 dwarf2="$with_dwarf2"
75e93faa 4501else
414d23ae 4502 dwarf2=no
ba479fd2 4503fi;
75e93faa 4504
414d23ae
HPN
4505# Check whether --enable-shared or --disable-shared was given.
4506if test "${enable_shared+set}" = set; then
4507 enableval="$enable_shared"
ba479fd2 4508
414d23ae
HPN
4509 case $enable_shared in
4510 yes | no) ;;
4511 *)
4512 enable_shared=no
4513 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4514 for pkg in $enableval; do
4515 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
4516 enable_shared=yes
4517 fi
4518 done
4519 IFS="$ac_save_ifs"
4520 ;;
4521 esac
4522
75e93faa 4523else
414d23ae 4524 enable_shared=yes
ba479fd2 4525fi;
75e93faa 4526
75e93faa 4527
75e93faa 4528
4977bab6
ZW
4529# Check whether --with-sysroot or --without-sysroot was given.
4530if test "${with_sysroot+set}" = set; then
4531 withval="$with_sysroot"
ba479fd2 4532
4977bab6 4533 case ${with_sysroot} in
caa55b1e 4534 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
4535 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
4536 esac
ba479fd2 4537
4977bab6
ZW
4538 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
4539 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
4540
047d636f
DJ
4541 if test "x$exec_prefix" = xNONE; then
4542 if test "x$prefix" = xNONE; then
4543 test_prefix=/usr/local
4544 else
4545 test_prefix=$prefix
4546 fi
4547 else
4548 test_prefix=$exec_prefix
4549 fi
4550 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
4551 "${test_prefix}"|"${test_prefix}/"*|\
4552 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
4553 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
4554 TARGET_SYSTEM_ROOT_DEFINE="$t"
4555 ;;
4556 esac
4557
4977bab6 4558else
ba479fd2 4559
4977bab6 4560 TARGET_SYSTEM_ROOT=
db720d9a 4561 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
4562 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
4563
ba479fd2 4564fi;
4977bab6
ZW
4565
4566
4567
4568
d1bd0ded 4569# Build with intermodule optimisations
d1bd0ded
GK
4570# Check whether --enable-intermodule or --disable-intermodule was given.
4571if test "${enable_intermodule+set}" = set; then
4572 enableval="$enable_intermodule"
0c46c5c7
KC
4573 case ${enable_intermodule} in
4574 yes) onestep="-onestep";;
4575 *) onestep="";;
d1bd0ded 4576esac
0c46c5c7
KC
4577else
4578 onestep=""
ba479fd2 4579fi;
d1bd0ded
GK
4580
4581
73458fb7
NN
4582# -------------------------
4583# Checks for other programs
4584# -------------------------
5b67ad6f 4585
ba479fd2
NN
4586echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4587echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
4588set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4589if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4590 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 4591else
ba479fd2 4592 cat >conftest.make <<\_ACEOF
e9a25f70 4593all:
ba479fd2
NN
4594 @echo 'ac_maketemp="$(MAKE)"'
4595_ACEOF
e9a25f70 4596# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 4597eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
4598if test -n "$ac_maketemp"; then
4599 eval ac_cv_prog_make_${ac_make}_set=yes
4600else
4601 eval ac_cv_prog_make_${ac_make}_set=no
4602fi
ba479fd2 4603rm -f conftest.make
e9a25f70
JL
4604fi
4605if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
4606 echo "$as_me:$LINENO: result: yes" >&5
4607echo "${ECHO_T}yes" >&6
e9a25f70
JL
4608 SET_MAKE=
4609else
ba479fd2
NN
4610 echo "$as_me:$LINENO: result: no" >&5
4611echo "${ECHO_T}no" >&6
e9a25f70
JL
4612 SET_MAKE="MAKE=${MAKE-make}"
4613fi
4614
4615
861bb6c1 4616# Find some useful tools
ba479fd2 4617for ac_prog in gawk mawk nawk awk
861bb6c1 4618do
ba479fd2 4619 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 4620set dummy $ac_prog; ac_word=$2
ba479fd2
NN
4621echo "$as_me:$LINENO: checking for $ac_word" >&5
4622echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4623if test "${ac_cv_prog_AWK+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4625else
4626 if test -n "$AWK"; then
4627 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4628else
ba479fd2
NN
4629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in $PATH
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
4634 for ac_exec_ext in '' $ac_executable_extensions; do
4635 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4636 ac_cv_prog_AWK="$ac_prog"
4637 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4638 break 2
4639 fi
4640done
4641done
4642
861bb6c1
JL
4643fi
4644fi
ba479fd2 4645AWK=$ac_cv_prog_AWK
861bb6c1 4646if test -n "$AWK"; then
ba479fd2
NN
4647 echo "$as_me:$LINENO: result: $AWK" >&5
4648echo "${ECHO_T}$AWK" >&6
861bb6c1 4649else
ba479fd2
NN
4650 echo "$as_me:$LINENO: result: no" >&5
4651echo "${ECHO_T}no" >&6
861bb6c1
JL
4652fi
4653
ba479fd2 4654 test -n "$AWK" && break
861bb6c1
JL
4655done
4656
2c4902b9
NN
4657# We need awk to run opts.sh (to create options.c and options.h).
4658# Bail out if it's missing.
4659case ${AWK} in
ba479fd2
NN
4660 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
4661echo "$as_me: error: can't build without awk, bailing out" >&2;}
4662 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
4663esac
4664
ba479fd2
NN
4665echo "$as_me:$LINENO: checking whether ln works" >&5
4666echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
4667if test "${gcc_cv_prog_LN+set}" = set; then
4668 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4669else
4670 rm -f conftestdata_t
4671echo >conftestdata_f
4672if ln conftestdata_f conftestdata_t 2>/dev/null
4673then
4674 gcc_cv_prog_LN="ln"
4675else
4676 if ln -s conftestdata_f conftestdata_t 2>/dev/null
4677 then
4678 gcc_cv_prog_LN="ln -s"
4679 else
4680 gcc_cv_prog_LN=cp
4681 fi
4682fi
4683rm -f conftestdata_f conftestdata_t
4684
4685fi
4686LN="$gcc_cv_prog_LN"
4687if test "$gcc_cv_prog_LN" = "ln"; then
ba479fd2
NN
4688 echo "$as_me:$LINENO: result: yes" >&5
4689echo "${ECHO_T}yes" >&6
0a4b6309
RL
4690else
4691 if test "$gcc_cv_prog_LN" = "ln -s"; then
ba479fd2
NN
4692 echo "$as_me:$LINENO: result: no, using ln -s" >&5
4693echo "${ECHO_T}no, using ln -s" >&6
0a4b6309 4694 else
ba479fd2
NN
4695 echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5
4696echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6
0a4b6309
RL
4697 fi
4698fi
4699
ba479fd2
NN
4700echo "$as_me:$LINENO: checking whether ln -s works" >&5
4701echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4702if test "${gcc_cv_prog_LN_S+set}" = set; then
4703 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4704else
4705 rm -f conftestdata_t
4706echo >conftestdata_f
4707if ln -s conftestdata_f conftestdata_t 2>/dev/null
4708then
4709 gcc_cv_prog_LN_S="ln -s"
4710else
4711 if ln conftestdata_f conftestdata_t 2>/dev/null
4712 then
4713 gcc_cv_prog_LN_S=ln
4714 else
4715 gcc_cv_prog_LN_S=cp
4716 fi
4717fi
4718rm -f conftestdata_f conftestdata_t
4719
4720fi
4721LN_S="$gcc_cv_prog_LN_S"
4722if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
4723 echo "$as_me:$LINENO: result: yes" >&5
4724echo "${ECHO_T}yes" >&6
0a4b6309
RL
4725else
4726 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
4727 echo "$as_me:$LINENO: result: no, using ln" >&5
4728echo "${ECHO_T}no, using ln" >&6
0a4b6309 4729 else
ba479fd2
NN
4730 echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
4731echo "${ECHO_T}no, and neither does ln, so using cp" >&6
0a4b6309
RL
4732 fi
4733fi
4734
ba479fd2
NN
4735if test -n "$ac_tool_prefix"; then
4736 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4737set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4738echo "$as_me:$LINENO: checking for $ac_word" >&5
4739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4740if test "${ac_cv_prog_RANLIB+set}" = set; then
4741 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4742else
4743 if test -n "$RANLIB"; then
4744 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4745else
ba479fd2
NN
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
4752 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4753 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4754 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758done
4759
6e3f3080
NN
4760fi
4761fi
ba479fd2 4762RANLIB=$ac_cv_prog_RANLIB
6e3f3080 4763if test -n "$RANLIB"; then
ba479fd2
NN
4764 echo "$as_me:$LINENO: result: $RANLIB" >&5
4765echo "${ECHO_T}$RANLIB" >&6
4766else
4767 echo "$as_me:$LINENO: result: no" >&5
4768echo "${ECHO_T}no" >&6
4769fi
4770
4771fi
4772if test -z "$ac_cv_prog_RANLIB"; then
4773 ac_ct_RANLIB=$RANLIB
4774 # Extract the first word of "ranlib", so it can be a program name with args.
4775set dummy ranlib; ac_word=$2
4776echo "$as_me:$LINENO: checking for $ac_word" >&5
4777echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4778if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4779 echo $ECHO_N "(cached) $ECHO_C" >&6
4780else
4781 if test -n "$ac_ct_RANLIB"; then
4782 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
4790 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4791 ac_cv_prog_ac_ct_RANLIB="ranlib"
4792 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
4795done
4796done
4797
4798 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4799fi
4800fi
4801ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4802if test -n "$ac_ct_RANLIB"; then
4803 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4804echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 4805else
ba479fd2
NN
4806 echo "$as_me:$LINENO: result: no" >&5
4807echo "${ECHO_T}no" >&6
4808fi
4809
4810 RANLIB=$ac_ct_RANLIB
4811else
4812 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
4813fi
4814
0a4b6309
RL
4815# Find a good install program. We prefer a C program (faster),
4816# so one script is as good as another. But avoid the broken or
4817# incompatible versions:
4818# SysV /etc/install, /usr/sbin/install
4819# SunOS /usr/etc/install
4820# IRIX /sbin/install
4821# AIX /bin/install
4822# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4823# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4824# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
4825echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
4826echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 4827if test -z "$INSTALL"; then
ba479fd2
NN
4828if test "${ac_cv_path_install+set}" = set; then
4829 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4830else
4831 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
4832 for ac_dir in $PATH; do
4833 # Account for people who put trailing slashes in PATH elements.
4834 case "$ac_dir/" in
4835 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4836 *)
4837 # OSF1 and SCO ODT 3.0 have their own names for install.
4838 for ac_prog in ginstall scoinst install; do
4839 if test -f $ac_dir/$ac_prog; then
4840 if test $ac_prog = install &&
4841 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4842 # AIX install. It has an incompatible calling convention.
4843 # OSF/1 installbsd also uses dspmsg, but is usable.
4844 :
4845 else
4846 ac_cv_path_install="$ac_dir/$ac_prog -c"
4847 break 2
4848 fi
4849 fi
4850 done
4851 ;;
4852 esac
4853 done
4854 IFS="$ac_save_IFS"
4855
4856fi
4857 if test "${ac_cv_path_install+set}" = set; then
4858 INSTALL="$ac_cv_path_install"
4859 else
4860 # As a last resort, use the slow shell script. We don't cache a
4861 # path for INSTALL within a source directory, because that will
4862 # break other packages using the cache if that directory is
4863 # removed, or if the path is relative.
4864 INSTALL="$ac_install_sh"
4865 fi
4866fi
ba479fd2
NN
4867echo "$as_me:$LINENO: result: $INSTALL" >&5
4868echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
4869
4870# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4871# It thinks the first close brace ends the variable substitution.
4872test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4873
4874test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4875
861bb6c1 4876
3a000df0 4877# See if cmp has --ignore-initial.
ba479fd2
NN
4878echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
4879echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
4880if test "${gcc_cv_prog_cmp_skip+set}" = set; then
4881 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
4882else
4883 echo abfoo >t1
4884 echo cdfoo >t2
269a7343 4885 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
4886 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
4887 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 4888 :
3a000df0
KC
4889 else
4890 gcc_cv_prog_cmp_skip=gnucompare
4891 fi
269a7343
KG
4892 fi
4893 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
4894 if cmp t1 t2 2 2 > /dev/null 2>&1; then
4895 if cmp t1 t2 1 1 > /dev/null 2>&1; then
4896 :
4897 else
4898 gcc_cv_prog_cmp_skip=fastcompare
4899 fi
4900 fi
3a000df0
KC
4901 fi
4902 rm t1 t2
4903
4904fi
ba479fd2
NN
4905echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
4906echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
4907make_compare_target=$gcc_cv_prog_cmp_skip
4908
4909
4910
73458fb7
NN
4911# See if we have the mktemp command.
4912# Extract the first word of "mktemp", so it can be a program name with args.
4913set dummy mktemp; ac_word=$2
ba479fd2
NN
4914echo "$as_me:$LINENO: checking for $ac_word" >&5
4915echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4916if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4918else
4919 if test -n "$have_mktemp_command"; then
4920 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
4921else
ba479fd2
NN
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929 ac_cv_prog_have_mktemp_command="yes"
4930 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934done
4935
73458fb7
NN
4936 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
4937fi
4938fi
ba479fd2 4939have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 4940if test -n "$have_mktemp_command"; then
ba479fd2
NN
4941 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
4942echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 4943else
ba479fd2
NN
4944 echo "$as_me:$LINENO: result: no" >&5
4945echo "${ECHO_T}no" >&6
73458fb7
NN
4946fi
4947
4948
4949# Do we have a single-tree copy of texinfo?
4950if test -f $srcdir/../texinfo/Makefile.in; then
4951 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
4952 gcc_cv_prog_makeinfo_modern=yes
ba479fd2
NN
4953 echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5
4954echo "${ECHO_T}Using makeinfo from the unified source tree." >&6
73458fb7
NN
4955else
4956 # See if makeinfo has been installed and is modern enough
4957 # that we can use it.
4958 # Extract the first word of "makeinfo", so it can be a program name with args.
4959set dummy makeinfo; ac_word=$2
ba479fd2
NN
4960echo "$as_me:$LINENO: checking for $ac_word" >&5
4961echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4962if test "${ac_cv_prog_MAKEINFO+set}" = set; then
4963 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4964else
4965 if test -n "$MAKEINFO"; then
4966 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
4967else
ba479fd2
NN
4968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969for as_dir in $PATH
4970do
4971 IFS=$as_save_IFS
4972 test -z "$as_dir" && as_dir=.
4973 for ac_exec_ext in '' $ac_executable_extensions; do
4974 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975 ac_cv_prog_MAKEINFO="makeinfo"
4976 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4977 break 2
4978 fi
4979done
4980done
4981
73458fb7
NN
4982fi
4983fi
ba479fd2 4984MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 4985if test -n "$MAKEINFO"; then
ba479fd2
NN
4986 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
4987echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 4988else
ba479fd2
NN
4989 echo "$as_me:$LINENO: result: no" >&5
4990echo "${ECHO_T}no" >&6
73458fb7
NN
4991fi
4992
4993if test -n "$MAKEINFO"; then
4994 # Found it, now check the version.
ba479fd2
NN
4995 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
4996echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
4997if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
4998 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4999else
5000 ac_prog_version=`$MAKEINFO --version 2>&1 |
5001 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
03787dfd 5002 echo "configure:5002: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
5003 case $ac_prog_version in
5004 '') gcc_cv_prog_makeinfo_modern=no;;
5005 4.[2-9]*)
5006 gcc_cv_prog_makeinfo_modern=yes;;
5007 *) gcc_cv_prog_makeinfo_modern=no;;
5008 esac
5009
5010fi
ba479fd2
NN
5011echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
5012echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
5013else
5014 gcc_cv_prog_makeinfo_modern=no
5015fi
5016
5017fi
5018
5019if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
5020 { echo "$as_me:$LINENO: WARNING:
5021*** Makeinfo is missing or too old.
5022*** Info documentation will not be built." >&5
5023echo "$as_me: WARNING:
cafe096b 5024*** Makeinfo is missing or too old.
ba479fd2 5025*** Info documentation will not be built." >&2;}
73458fb7
NN
5026 BUILD_INFO=
5027else
ba479fd2 5028 BUILD_INFO=info
73458fb7
NN
5029fi
5030
5031# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
5032echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
5033echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 5034if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
5035 echo "$as_me:$LINENO: result: yes" >&5
5036echo "${ECHO_T}yes" >&6
5037 GENERATED_MANPAGES=generated-manpages
73458fb7 5038else
ba479fd2
NN
5039 echo "$as_me:$LINENO: result: no" >&5
5040echo "${ECHO_T}no" >&6
73458fb7
NN
5041 GENERATED_MANPAGES=
5042fi
5043
5044# How about lex?
5045if test -f $srcdir/../flex/skel.c; then
5046 FLEX='$(objdir)/../flex/flex'
5047else
5048 # Extract the first word of "flex", so it can be a program name with args.
5049set dummy flex; ac_word=$2
ba479fd2
NN
5050echo "$as_me:$LINENO: checking for $ac_word" >&5
5051echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5052if test "${ac_cv_prog_FLEX+set}" = set; then
5053 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5054else
5055 if test -n "$FLEX"; then
5056 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
5057else
ba479fd2
NN
5058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
5063 for ac_exec_ext in '' $ac_executable_extensions; do
5064 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5065 ac_cv_prog_FLEX="flex"
5066 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5067 break 2
5068 fi
5069done
5070done
5071
73458fb7
NN
5072 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
5073fi
5074fi
ba479fd2 5075FLEX=$ac_cv_prog_FLEX
73458fb7 5076if test -n "$FLEX"; then
ba479fd2
NN
5077 echo "$as_me:$LINENO: result: $FLEX" >&5
5078echo "${ECHO_T}$FLEX" >&6
73458fb7 5079else
ba479fd2
NN
5080 echo "$as_me:$LINENO: result: no" >&5
5081echo "${ECHO_T}no" >&6
73458fb7
NN
5082fi
5083
5084fi
5085
5086# Bison?
5087# The -L switch is so bison can find its skeleton file.
5088if test -f $srcdir/../bison/bison.simple; then
5089 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
5090else
5091 # Extract the first word of "bison", so it can be a program name with args.
5092set dummy bison; ac_word=$2
ba479fd2
NN
5093echo "$as_me:$LINENO: checking for $ac_word" >&5
5094echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5095if test "${ac_cv_prog_BISON+set}" = set; then
5096 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5097else
5098 if test -n "$BISON"; then
5099 ac_cv_prog_BISON="$BISON" # Let the user override the test.
5100else
ba479fd2
NN
5101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
5106 for ac_exec_ext in '' $ac_executable_extensions; do
5107 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108 ac_cv_prog_BISON="bison"
5109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5110 break 2
5111 fi
5112done
5113done
5114
73458fb7
NN
5115 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
5116fi
5117fi
ba479fd2 5118BISON=$ac_cv_prog_BISON
73458fb7 5119if test -n "$BISON"; then
ba479fd2
NN
5120 echo "$as_me:$LINENO: result: $BISON" >&5
5121echo "${ECHO_T}$BISON" >&6
73458fb7 5122else
ba479fd2
NN
5123 echo "$as_me:$LINENO: result: no" >&5
5124echo "${ECHO_T}no" >&6
73458fb7
NN
5125fi
5126
5127fi
5128
5129# --------------------
5130# Checks for C headers
5131# --------------------
5132
ba479fd2
NN
5133echo "$as_me:$LINENO: checking for GNU C library" >&5
5134echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
5135if test "${gcc_cv_glibc+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
5137else
5138 cat >conftest.$ac_ext <<_ACEOF
5139#line $LINENO "configure"
5140/* confdefs.h. */
5141_ACEOF
5142cat confdefs.h >>conftest.$ac_ext
5143cat >>conftest.$ac_ext <<_ACEOF
5144/* end confdefs.h. */
73458fb7 5145#include <features.h>
ba479fd2
NN
5146int
5147main ()
5148{
73458fb7
NN
5149
5150#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
5151#error Not a GNU C library system
5152#endif
ba479fd2
NN
5153 ;
5154 return 0;
5155}
5156_ACEOF
5157rm -f conftest.$ac_objext
5158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5159 (eval $ac_compile) 2>&5
5160 ac_status=$?
5161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5162 (exit $ac_status); } &&
5163 { ac_try='test -s conftest.$ac_objext'
5164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5165 (eval $ac_try) 2>&5
5166 ac_status=$?
5167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5168 (exit $ac_status); }; }; then
73458fb7
NN
5169 gcc_cv_glibc=yes
5170else
ba479fd2
NN
5171 echo "$as_me: failed program was:" >&5
5172sed 's/^/| /' conftest.$ac_ext >&5
5173
5174gcc_cv_glibc=no
73458fb7 5175fi
ba479fd2 5176rm -f conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
5177fi
5178
ba479fd2
NN
5179echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
5180echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 5181if test $gcc_cv_glibc = yes; then
ba479fd2
NN
5182
5183cat >>confdefs.h <<\_ACEOF
73458fb7 5184#define _GNU_SOURCE 1
ba479fd2 5185_ACEOF
73458fb7
NN
5186
5187fi
5188
ca9bc441
NN
5189# Need to reject headers which give warnings, so that the -Werror bootstrap
5190# works later. *sigh* This needs to come before all header checks.
5191
5192ac_c_preproc_warn_flag=yes
5193
ba479fd2
NN
5194echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5195echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5196if test "${ac_cv_header_stdc+set}" = set; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5198else
ba479fd2
NN
5199 cat >conftest.$ac_ext <<_ACEOF
5200#line $LINENO "configure"
5201/* confdefs.h. */
5202_ACEOF
5203cat confdefs.h >>conftest.$ac_ext
5204cat >>conftest.$ac_ext <<_ACEOF
5205/* end confdefs.h. */
956d6950
JL
5206#include <stdlib.h>
5207#include <stdarg.h>
5208#include <string.h>
5209#include <float.h>
ba479fd2
NN
5210
5211int
5212main ()
5213{
5214
5215 ;
5216 return 0;
5217}
5218_ACEOF
5219rm -f conftest.$ac_objext
5220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5221 (eval $ac_compile) 2>&5
5222 ac_status=$?
5223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224 (exit $ac_status); } &&
5225 { ac_try='test -s conftest.$ac_objext'
5226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5227 (eval $ac_try) 2>&5
5228 ac_status=$?
5229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230 (exit $ac_status); }; }; then
956d6950
JL
5231 ac_cv_header_stdc=yes
5232else
ba479fd2
NN
5233 echo "$as_me: failed program was:" >&5
5234sed 's/^/| /' conftest.$ac_ext >&5
5235
5236ac_cv_header_stdc=no
956d6950 5237fi
ba479fd2 5238rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
5239
5240if test $ac_cv_header_stdc = yes; then
5241 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2
NN
5242 cat >conftest.$ac_ext <<_ACEOF
5243#line $LINENO "configure"
5244/* confdefs.h. */
5245_ACEOF
5246cat confdefs.h >>conftest.$ac_ext
5247cat >>conftest.$ac_ext <<_ACEOF
5248/* end confdefs.h. */
956d6950 5249#include <string.h>
ba479fd2
NN
5250
5251_ACEOF
956d6950 5252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5253 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
5254 :
5255else
956d6950
JL
5256 ac_cv_header_stdc=no
5257fi
5258rm -f conftest*
5259
5260fi
5261
5262if test $ac_cv_header_stdc = yes; then
5263 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2
NN
5264 cat >conftest.$ac_ext <<_ACEOF
5265#line $LINENO "configure"
5266/* confdefs.h. */
5267_ACEOF
5268cat confdefs.h >>conftest.$ac_ext
5269cat >>conftest.$ac_ext <<_ACEOF
5270/* end confdefs.h. */
956d6950 5271#include <stdlib.h>
ba479fd2
NN
5272
5273_ACEOF
956d6950 5274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5275 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
5276 :
5277else
956d6950
JL
5278 ac_cv_header_stdc=no
5279fi
5280rm -f conftest*
5281
5282fi
5283
5284if test $ac_cv_header_stdc = yes; then
5285 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 5286 if test "$cross_compiling" = yes; then
956d6950
JL
5287 :
5288else
ba479fd2
NN
5289 cat >conftest.$ac_ext <<_ACEOF
5290#line $LINENO "configure"
5291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
956d6950 5296#include <ctype.h>
ba479fd2
NN
5297#if ((' ' & 0x0FF) == 0x020)
5298# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5299# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5300#else
5301# define ISLOWER(c) \
5302 (('a' <= (c) && (c) <= 'i') \
5303 || ('j' <= (c) && (c) <= 'r') \
5304 || ('s' <= (c) && (c) <= 'z'))
5305# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5306#endif
63cf211a 5307
ba479fd2
NN
5308#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5309int
5310main ()
5311{
5312 int i;
5313 for (i = 0; i < 256; i++)
5314 if (XOR (islower (i), ISLOWER (i))
5315 || toupper (i) != TOUPPER (i))
5316 exit(2);
5317 exit (0);
5318}
5319_ACEOF
5320rm -f conftest$ac_exeext
5321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5322 (eval $ac_link) 2>&5
5323 ac_status=$?
5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5325 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5327 (eval $ac_try) 2>&5
5328 ac_status=$?
5329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5330 (exit $ac_status); }; }; then
956d6950
JL
5331 :
5332else
ba479fd2
NN
5333 echo "$as_me: program exited with status $ac_status" >&5
5334echo "$as_me: failed program was:" >&5
5335sed 's/^/| /' conftest.$ac_ext >&5
5336
5337( exit $ac_status )
5338ac_cv_header_stdc=no
956d6950 5339fi
a6a5e4c9 5340rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 5341fi
956d6950
JL
5342fi
5343fi
ba479fd2
NN
5344echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5345echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 5346if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
5347
5348cat >>confdefs.h <<\_ACEOF
956d6950 5349#define STDC_HEADERS 1
ba479fd2 5350_ACEOF
956d6950
JL
5351
5352fi
5353
ba479fd2
NN
5354echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5355echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5356if test "${ac_cv_header_time+set}" = set; then
5357 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5358else
ba479fd2
NN
5359 cat >conftest.$ac_ext <<_ACEOF
5360#line $LINENO "configure"
5361/* confdefs.h. */
5362_ACEOF
5363cat confdefs.h >>conftest.$ac_ext
5364cat >>conftest.$ac_ext <<_ACEOF
5365/* end confdefs.h. */
956d6950
JL
5366#include <sys/types.h>
5367#include <sys/time.h>
5368#include <time.h>
ba479fd2
NN
5369
5370int
5371main ()
5372{
5373if ((struct tm *) 0)
5374return 0;
5375 ;
5376 return 0;
5377}
5378_ACEOF
5379rm -f conftest.$ac_objext
5380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5381 (eval $ac_compile) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); } &&
5385 { ac_try='test -s conftest.$ac_objext'
5386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387 (eval $ac_try) 2>&5
5388 ac_status=$?
5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390 (exit $ac_status); }; }; then
956d6950
JL
5391 ac_cv_header_time=yes
5392else
ba479fd2
NN
5393 echo "$as_me: failed program was:" >&5
5394sed 's/^/| /' conftest.$ac_ext >&5
5395
5396ac_cv_header_time=no
956d6950 5397fi
ba479fd2 5398rm -f conftest.$ac_objext conftest.$ac_ext
956d6950 5399fi
ba479fd2
NN
5400echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5401echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 5402if test $ac_cv_header_time = yes; then
ba479fd2
NN
5403
5404cat >>confdefs.h <<\_ACEOF
956d6950 5405#define TIME_WITH_SYS_TIME 1
ba479fd2 5406_ACEOF
956d6950
JL
5407
5408fi
5409
ba479fd2
NN
5410echo "$as_me:$LINENO: checking for working stdbool.h" >&5
5411echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6
5412if test "${ac_cv_header_stdbool_h+set}" = set; then
5413 echo $ECHO_N "(cached) $ECHO_C" >&6
827ae6cf 5414else
ba479fd2
NN
5415 cat >conftest.$ac_ext <<_ACEOF
5416#line $LINENO "configure"
5417/* confdefs.h. */
5418_ACEOF
5419cat confdefs.h >>conftest.$ac_ext
5420cat >>conftest.$ac_ext <<_ACEOF
5421/* end confdefs.h. */
827ae6cf 5422#include <stdbool.h>
ba479fd2
NN
5423int
5424main ()
5425{
827ae6cf 5426bool foo = false;
ba479fd2
NN
5427 ;
5428 return 0;
5429}
5430_ACEOF
5431rm -f conftest.$ac_objext
5432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5433 (eval $ac_compile) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); } &&
5437 { ac_try='test -s conftest.$ac_objext'
5438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5439 (eval $ac_try) 2>&5
5440 ac_status=$?
5441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442 (exit $ac_status); }; }; then
827ae6cf
RO
5443 ac_cv_header_stdbool_h=yes
5444else
ba479fd2
NN
5445 echo "$as_me: failed program was:" >&5
5446sed 's/^/| /' conftest.$ac_ext >&5
5447
5448ac_cv_header_stdbool_h=no
827ae6cf 5449fi
ba479fd2 5450rm -f conftest.$ac_objext conftest.$ac_ext
827ae6cf 5451fi
ba479fd2
NN
5452echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
5453echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
63cf211a 5454if test $ac_cv_header_stdbool_h = yes; then
ba479fd2
NN
5455
5456cat >>confdefs.h <<\_ACEOF
827ae6cf 5457#define HAVE_STDBOOL_H 1
ba479fd2 5458_ACEOF
827ae6cf
RO
5459
5460fi
5461
ba479fd2
NN
5462echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
5463echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
5464if test "${gcc_cv_header_string+set}" = set; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309 5466else
ba479fd2
NN
5467 cat >conftest.$ac_ext <<_ACEOF
5468#line $LINENO "configure"
5469/* confdefs.h. */
5470_ACEOF
5471cat confdefs.h >>conftest.$ac_ext
5472cat >>conftest.$ac_ext <<_ACEOF
5473/* end confdefs.h. */
0a4b6309
RL
5474#include <string.h>
5475#include <strings.h>
ba479fd2
NN
5476int
5477main ()
5478{
0a4b6309 5479
ba479fd2
NN
5480 ;
5481 return 0;
5482}
5483_ACEOF
5484rm -f conftest.$ac_objext
5485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5486 (eval $ac_compile) 2>&5
5487 ac_status=$?
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); } &&
5490 { ac_try='test -s conftest.$ac_objext'
5491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5492 (eval $ac_try) 2>&5
5493 ac_status=$?
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); }; }; then
0a4b6309
RL
5496 gcc_cv_header_string=yes
5497else
ba479fd2
NN
5498 echo "$as_me: failed program was:" >&5
5499sed 's/^/| /' conftest.$ac_ext >&5
5500
5501gcc_cv_header_string=no
0a4b6309 5502fi
ba479fd2 5503rm -f conftest.$ac_objext conftest.$ac_ext
0a4b6309 5504fi
ba479fd2
NN
5505echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
5506echo "${ECHO_T}$gcc_cv_header_string" >&6
63cf211a 5507if test $gcc_cv_header_string = yes; then
ba479fd2
NN
5508
5509cat >>confdefs.h <<\_ACEOF
0a4b6309 5510#define STRING_WITH_STRINGS 1
ba479fd2 5511_ACEOF
0a4b6309
RL
5512
5513fi
5514
ba479fd2
NN
5515echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5516echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5517if test "${ac_cv_header_sys_wait_h+set}" = set; then
5518 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 5519else
ba479fd2
NN
5520 cat >conftest.$ac_ext <<_ACEOF
5521#line $LINENO "configure"
5522/* confdefs.h. */
5523_ACEOF
5524cat confdefs.h >>conftest.$ac_ext
5525cat >>conftest.$ac_ext <<_ACEOF
5526/* end confdefs.h. */
e9831ca0
KG
5527#include <sys/types.h>
5528#include <sys/wait.h>
5529#ifndef WEXITSTATUS
ba479fd2 5530# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
5531#endif
5532#ifndef WIFEXITED
ba479fd2 5533# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 5534#endif
ba479fd2
NN
5535
5536int
5537main ()
5538{
5539 int s;
5540 wait (&s);
5541 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5542 ;
5543 return 0;
5544}
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5548 (eval $ac_compile) 2>&5
5549 ac_status=$?
5550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551 (exit $ac_status); } &&
5552 { ac_try='test -s conftest.$ac_objext'
5553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5554 (eval $ac_try) 2>&5
5555 ac_status=$?
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); }; }; then
e9831ca0
KG
5558 ac_cv_header_sys_wait_h=yes
5559else
ba479fd2
NN
5560 echo "$as_me: failed program was:" >&5
5561sed 's/^/| /' conftest.$ac_ext >&5
5562
5563ac_cv_header_sys_wait_h=no
e9831ca0 5564fi
ba479fd2 5565rm -f conftest.$ac_objext conftest.$ac_ext
e9831ca0 5566fi
ba479fd2
NN
5567echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5568echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 5569if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
5570
5571cat >>confdefs.h <<\_ACEOF
e9831ca0 5572#define HAVE_SYS_WAIT_H 1
ba479fd2 5573_ACEOF
6e3f3080 5574
63cf211a 5575fi
6e3f3080 5576
ba479fd2
NN
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
1072ec3f 5599 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 5600 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 5601 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 5602do
ba479fd2 5603as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 5604echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
5605echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5606if eval "test \"\${$as_ac_Header+set}\" = set"; then
5607 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5608else
ca9bc441 5609 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5610#line $LINENO "configure"
5611/* confdefs.h. */
5612_ACEOF
5613cat confdefs.h >>conftest.$ac_ext
5614cat >>conftest.$ac_ext <<_ACEOF
5615/* end confdefs.h. */
5616#include <$ac_header>
5617_ACEOF
5618if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5619 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5620 ac_status=$?
5621 grep -v '^ *+' conftest.er1 >conftest.err
5622 rm -f conftest.er1
5623 cat conftest.err >&5
5624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5625 (exit $ac_status); } >/dev/null; then
5626 if test -s conftest.err; then
5627 ac_cpp_err=$ac_c_preproc_warn_flag
5628 else
5629 ac_cpp_err=
5630 fi
5631else
5632 ac_cpp_err=yes
5633fi
5634if test -z "$ac_cpp_err"; then
ca9bc441 5635 eval "$as_ac_Header=yes"
ba479fd2
NN
5636else
5637 echo "$as_me: failed program was:" >&5
5638sed 's/^/| /' conftest.$ac_ext >&5
5639
ca9bc441 5640 eval "$as_ac_Header=no"
ba479fd2
NN
5641fi
5642rm -f conftest.err conftest.$ac_ext
6e3f3080 5643fi
ba479fd2
NN
5644echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5645echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
5646if test `eval echo '${'$as_ac_Header'}'` = yes; then
5647 cat >>confdefs.h <<_ACEOF
5648#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5649_ACEOF
5650
956d6950
JL
5651fi
5652done
5653
5654
f24af81b 5655# Check for thread headers.
ca9bc441 5656echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
5657echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
5658if test "${ac_cv_header_thread_h+set}" = set; then
5659 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5660else
ca9bc441 5661 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5662#line $LINENO "configure"
5663/* confdefs.h. */
5664_ACEOF
5665cat confdefs.h >>conftest.$ac_ext
5666cat >>conftest.$ac_ext <<_ACEOF
5667/* end confdefs.h. */
5668#include <thread.h>
5669_ACEOF
5670if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5671 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5672 ac_status=$?
5673 grep -v '^ *+' conftest.er1 >conftest.err
5674 rm -f conftest.er1
5675 cat conftest.err >&5
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); } >/dev/null; then
5678 if test -s conftest.err; then
5679 ac_cpp_err=$ac_c_preproc_warn_flag
5680 else
5681 ac_cpp_err=
5682 fi
5683else
5684 ac_cpp_err=yes
5685fi
5686if test -z "$ac_cpp_err"; then
ca9bc441 5687 ac_cv_header_thread_h=yes
ba479fd2
NN
5688else
5689 echo "$as_me: failed program was:" >&5
5690sed 's/^/| /' conftest.$ac_ext >&5
5691
ca9bc441 5692 ac_cv_header_thread_h=no
ba479fd2
NN
5693fi
5694rm -f conftest.err conftest.$ac_ext
6e3f3080 5695fi
ba479fd2
NN
5696echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
5697echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 5698if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
5699 have_thread_h=yes
5700else
ba479fd2 5701 have_thread_h=
f24af81b
TT
5702fi
5703
ca9bc441 5704echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
5705echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
5706if test "${ac_cv_header_pthread_h+set}" = set; then
5707 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 5708else
ca9bc441 5709 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5710#line $LINENO "configure"
5711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
5716#include <pthread.h>
5717_ACEOF
5718if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5719 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5720 ac_status=$?
5721 grep -v '^ *+' conftest.er1 >conftest.err
5722 rm -f conftest.er1
5723 cat conftest.err >&5
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); } >/dev/null; then
5726 if test -s conftest.err; then
5727 ac_cpp_err=$ac_c_preproc_warn_flag
5728 else
5729 ac_cpp_err=
5730 fi
5731else
5732 ac_cpp_err=yes
5733fi
5734if test -z "$ac_cpp_err"; then
ca9bc441 5735 ac_cv_header_pthread_h=yes
ba479fd2
NN
5736else
5737 echo "$as_me: failed program was:" >&5
5738sed 's/^/| /' conftest.$ac_ext >&5
5739
ca9bc441 5740 ac_cv_header_pthread_h=no
ba479fd2
NN
5741fi
5742rm -f conftest.err conftest.$ac_ext
6e3f3080 5743fi
ba479fd2
NN
5744echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
5745echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 5746if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
5747 have_pthread_h=yes
5748else
ba479fd2 5749 have_pthread_h=
f24af81b
TT
5750fi
5751
5752
84c041a1 5753# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
5754echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
5755echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
5756if test "${gcc_cv_decl_char_bit+set}" = set; then
5757 echo $ECHO_N "(cached) $ECHO_C" >&6
5758else
5759 cat >conftest.$ac_ext <<_ACEOF
5760#line $LINENO "configure"
5761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
75e93faa
ZW
5766#ifdef HAVE_LIMITS_H
5767#include <limits.h>
5768#endif
5769#ifdef CHAR_BIT
5770found
5771#endif
ba479fd2 5772_ACEOF
75e93faa 5773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5774 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
5775 gcc_cv_decl_char_bit=yes
5776else
75e93faa
ZW
5777 gcc_cv_decl_char_bit=no
5778fi
5779rm -f conftest*
5780
5781
5782fi
ba479fd2
NN
5783echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
5784echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 5785if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
5786 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
5787echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
5788if test "${gcc_cv_c_nbby+set}" = set; then
5789 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
5790else
5791 i=8
5792 gcc_cv_c_nbby=
5793 while test $i -lt 65; do
ba479fd2
NN
5794 cat >conftest.$ac_ext <<_ACEOF
5795#line $LINENO "configure"
5796/* confdefs.h. */
5797_ACEOF
5798cat confdefs.h >>conftest.$ac_ext
5799cat >>conftest.$ac_ext <<_ACEOF
5800/* end confdefs.h. */
5801
5802int
5803main ()
5804{
4e70264f
ZW
5805switch(0) {
5806 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
5807 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
5808 ; }
ba479fd2
NN
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813rm -f conftest.$ac_objext
5814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5815 (eval $ac_compile) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } &&
5819 { ac_try='test -s conftest.$ac_objext'
5820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); }; }; then
4e70264f 5825 gcc_cv_c_nbby=$i; break
75e93faa 5826else
ba479fd2
NN
5827 echo "$as_me: failed program was:" >&5
5828sed 's/^/| /' conftest.$ac_ext >&5
5829
75e93faa 5830fi
ba479fd2 5831rm -f conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
5832 i=`expr $i + 1`
5833 done
5834 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
5835
5836fi
ba479fd2
NN
5837echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
5838echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 5839if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
5840 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
5841echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
5842 { (exit 1); exit 1; }; }
75e93faa 5843else
ba479fd2
NN
5844
5845cat >>confdefs.h <<_ACEOF
75e93faa 5846#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 5847_ACEOF
75e93faa
ZW
5848
5849fi
5850fi
ba479fd2
NN
5851echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
5852echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
5853if test "${ac_cv_c_bigendian+set}" = set; then
5854 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 5855else
4977bab6
ZW
5856 ac_cv_c_bigendian=unknown
5857# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2
NN
5858cat >conftest.$ac_ext <<_ACEOF
5859#line $LINENO "configure"
5860/* confdefs.h. */
5861_ACEOF
5862cat confdefs.h >>conftest.$ac_ext
5863cat >>conftest.$ac_ext <<_ACEOF
5864/* end confdefs.h. */
4977bab6
ZW
5865#include <sys/types.h>
5866#include <sys/param.h>
ba479fd2
NN
5867int
5868main ()
5869{
2d6eb5bf 5870
4977bab6
ZW
5871#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5872 bogus endian macros
84c041a1 5873#endif
ba479fd2
NN
5874 ;
5875 return 0;
5876}
5877_ACEOF
5878rm -f conftest.$ac_objext
5879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5880 (eval $ac_compile) 2>&5
5881 ac_status=$?
5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883 (exit $ac_status); } &&
5884 { ac_try='test -s conftest.$ac_objext'
5885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5886 (eval $ac_try) 2>&5
5887 ac_status=$?
5888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889 (exit $ac_status); }; }; then
4977bab6 5890 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2
NN
5891cat >conftest.$ac_ext <<_ACEOF
5892#line $LINENO "configure"
5893/* confdefs.h. */
5894_ACEOF
5895cat confdefs.h >>conftest.$ac_ext
5896cat >>conftest.$ac_ext <<_ACEOF
5897/* end confdefs.h. */
4977bab6
ZW
5898#include <sys/types.h>
5899#include <sys/param.h>
ba479fd2
NN
5900int
5901main ()
5902{
4977bab6
ZW
5903
5904#if BYTE_ORDER != BIG_ENDIAN
5905 not big endian
84c041a1 5906#endif
ba479fd2
NN
5907 ;
5908 return 0;
5909}
5910_ACEOF
5911rm -f conftest.$ac_objext
5912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5913 (eval $ac_compile) 2>&5
5914 ac_status=$?
5915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916 (exit $ac_status); } &&
5917 { ac_try='test -s conftest.$ac_objext'
5918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5919 (eval $ac_try) 2>&5
5920 ac_status=$?
5921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5922 (exit $ac_status); }; }; then
4977bab6
ZW
5923 ac_cv_c_bigendian=yes
5924else
ba479fd2
NN
5925 echo "$as_me: failed program was:" >&5
5926sed 's/^/| /' conftest.$ac_ext >&5
5927
5928ac_cv_c_bigendian=no
4977bab6 5929fi
ba479fd2 5930rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6 5931else
ba479fd2
NN
5932 echo "$as_me: failed program was:" >&5
5933sed 's/^/| /' conftest.$ac_ext >&5
5934
4977bab6 5935fi
ba479fd2 5936rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
5937if test $ac_cv_c_bigendian = unknown; then
5938if test "$cross_compiling" = yes; then
ba479fd2
NN
5939 echo $ac_n "cross-compiling... " 2>&6
5940else
5941 cat >conftest.$ac_ext <<_ACEOF
5942#line $LINENO "configure"
5943/* confdefs.h. */
5944_ACEOF
5945cat confdefs.h >>conftest.$ac_ext
5946cat >>conftest.$ac_ext <<_ACEOF
5947/* end confdefs.h. */
4977bab6
ZW
5948main () {
5949 /* Are we little or big endian? From Harbison&Steele. */
5950 union
5951 {
5952 long l;
5953 char c[sizeof (long)];
5954 } u;
5955 u.l = 1;
5956 exit (u.c[sizeof (long) - 1] == 1);
5957}
ba479fd2
NN
5958_ACEOF
5959rm -f conftest$ac_exeext
5960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5961 (eval $ac_link) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5966 (eval $ac_try) 2>&5
5967 ac_status=$?
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); }; }; then
4977bab6
ZW
5970 ac_cv_c_bigendian=no
5971else
ba479fd2
NN
5972 echo "$as_me: program exited with status $ac_status" >&5
5973echo "$as_me: failed program was:" >&5
5974sed 's/^/| /' conftest.$ac_ext >&5
5975
5976( exit $ac_status )
5977ac_cv_c_bigendian=yes
4977bab6 5978fi
a6a5e4c9 5979rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 5980fi
4977bab6
ZW
5981fi
5982fi
ba479fd2
NN
5983echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
5984echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 5985if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
5986echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
5987echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 5988
4977bab6
ZW
5989cat >conftest.c <<EOF
5990short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5991short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5992void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
5993short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5994short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5995void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
5996int main() { _ascii (); _ebcdic (); return 0; }
5997EOF
5998 if test -f conftest.c ; then
5999 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
6000 if test `grep -l BIGenDianSyS conftest.o` ; then
6001 echo $ac_n ' big endian probe OK, ' 1>&6
6002 ac_cv_c_bigendian=yes
6003 fi
6004 if test `grep -l LiTTleEnDian conftest.o` ; then
6005 echo $ac_n ' little endian probe OK, ' 1>&6
6006 if test $ac_cv_c_bigendian = yes ; then
6007 ac_cv_c_bigendian=unknown;
6008 else
6009 ac_cv_c_bigendian=no
6010 fi
6011 fi
6012 echo $ac_n 'guessing bigendian ... ' >&6
6013 fi
6014 fi
ba479fd2
NN
6015echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6016echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 6017fi
4977bab6 6018if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
6019
6020cat >>confdefs.h <<\_ACEOF
4977bab6 6021#define WORDS_BIGENDIAN 1
ba479fd2 6022_ACEOF
cafe096b 6023
ba479fd2
NN
6024
6025cat >>confdefs.h <<\_ACEOF
84c041a1 6026#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 6027_ACEOF
84c041a1 6028
4977bab6
ZW
6029 BYTEORDER=4321
6030else
6031 BYTEORDER=1234
6032fi
ba479fd2
NN
6033
6034cat >>confdefs.h <<_ACEOF
4977bab6 6035#define BYTEORDER $BYTEORDER
ba479fd2 6036_ACEOF
4977bab6
ZW
6037
6038if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
6039 { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
6040echo "$as_me: error: unknown endianess - sorry" >&2;}
6041 { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
84c041a1
ZW
6042fi
6043
75e93faa 6044
73458fb7
NN
6045# --------
6046# UNSORTED
6047# --------
1e608388 6048
73458fb7
NN
6049# Stage specific cflags for build.
6050stage1_cflags=
6051case $build in
6052vax-*-*)
6053 if test x$GCC = xyes
6054 then
6055 stage1_cflags="-Wa,-J"
6056 else
6057 stage1_cflags="-J"
6058 fi
6059 ;;
6060powerpc-*-darwin*)
6061 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6062 # sources; use -no-cpp-precomp to get to GNU cpp.
6063 # Apple's GCC has bugs in designated initializer handling, so disable
6064 # that too.
6065 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6066 ;;
6067esac
1e608388 6068
1e608388 6069
4e70264f
ZW
6070# These libraries may be used by collect2.
6071# We may need a special search path to get them linked.
ba479fd2
NN
6072echo "$as_me:$LINENO: checking for collect2 libraries" >&5
6073echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6074if test "${gcc_cv_collect2_libs+set}" = set; then
6075 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
6076else
6077 save_LIBS="$LIBS"
7f2749d4 6078for libs in '' -lld -lmld \
4e70264f
ZW
6079 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
6080 '-L/usr/lib/cmplrs/cc3.11 -lmld'
6081do
6082 LIBS="$libs"
ba479fd2
NN
6083 cat >conftest.$ac_ext <<_ACEOF
6084#line $LINENO "configure"
6085/* confdefs.h. */
6086_ACEOF
6087cat confdefs.h >>conftest.$ac_ext
6088cat >>conftest.$ac_ext <<_ACEOF
6089/* end confdefs.h. */
6090
4e70264f 6091/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6092#ifdef __cplusplus
6093extern "C"
6094#endif
4e70264f 6095/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6096 builtin and then its argument prototype would still apply. */
6097char ldopen ();
6098int
6099main ()
6100{
6101ldopen ();
6102 ;
6103 return 0;
6104}
6105_ACEOF
6106rm -f conftest.$ac_objext conftest$ac_exeext
6107if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6108 (eval $ac_link) 2>&5
6109 ac_status=$?
6110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111 (exit $ac_status); } &&
6112 { ac_try='test -s conftest$ac_exeext'
6113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114 (eval $ac_try) 2>&5
6115 ac_status=$?
6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
4e70264f
ZW
6118 gcc_cv_collect2_libs="$libs"; break
6119else
ba479fd2
NN
6120 echo "$as_me: failed program was:" >&5
6121sed 's/^/| /' conftest.$ac_ext >&5
6122
4e70264f 6123fi
ba479fd2 6124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
6125done
6126LIBS="$save_LIBS"
6127test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
6128fi
ba479fd2
NN
6129echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
6130echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
6131case $gcc_cv_collect2_libs in
6132 "none required") ;;
6133 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
6134esac
6135
6136
7f2749d4
RK
6137# When building Ada code on Alpha, we need exc_resume which is usually in
6138# -lexc. So test for it.
6139save_LIBS="$LIBS"
6140LIBS=
ba479fd2
NN
6141echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
6142echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6143if test "${ac_cv_search_exc_resume+set}" = set; then
6144 echo $ECHO_N "(cached) $ECHO_C" >&6
6145else
6146 ac_func_search_save_LIBS=$LIBS
6147ac_cv_search_exc_resume=no
6148cat >conftest.$ac_ext <<_ACEOF
6149#line $LINENO "configure"
6150/* confdefs.h. */
6151_ACEOF
6152cat confdefs.h >>conftest.$ac_ext
6153cat >>conftest.$ac_ext <<_ACEOF
6154/* end confdefs.h. */
7f2749d4 6155
7f2749d4 6156/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6157#ifdef __cplusplus
6158extern "C"
6159#endif
7f2749d4 6160/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6161 builtin and then its argument prototype would still apply. */
6162char exc_resume ();
6163int
6164main ()
6165{
6166exc_resume ();
6167 ;
6168 return 0;
6169}
6170_ACEOF
6171rm -f conftest.$ac_objext conftest$ac_exeext
6172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6173 (eval $ac_link) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); } &&
6177 { ac_try='test -s conftest$ac_exeext'
6178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6179 (eval $ac_try) 2>&5
6180 ac_status=$?
6181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182 (exit $ac_status); }; }; then
7f2749d4
RK
6183 ac_cv_search_exc_resume="none required"
6184else
ba479fd2
NN
6185 echo "$as_me: failed program was:" >&5
6186sed 's/^/| /' conftest.$ac_ext >&5
6187
7f2749d4 6188fi
ba479fd2
NN
6189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6190if test "$ac_cv_search_exc_resume" = no; then
6191 for ac_lib in exc; do
6192 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6193 cat >conftest.$ac_ext <<_ACEOF
6194#line $LINENO "configure"
6195/* confdefs.h. */
6196_ACEOF
6197cat confdefs.h >>conftest.$ac_ext
6198cat >>conftest.$ac_ext <<_ACEOF
6199/* end confdefs.h. */
6200
7f2749d4 6201/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6202#ifdef __cplusplus
6203extern "C"
6204#endif
7f2749d4 6205/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6206 builtin and then its argument prototype would still apply. */
6207char exc_resume ();
6208int
6209main ()
6210{
6211exc_resume ();
6212 ;
6213 return 0;
6214}
6215_ACEOF
6216rm -f conftest.$ac_objext conftest$ac_exeext
6217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6218 (eval $ac_link) 2>&5
6219 ac_status=$?
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6221 (exit $ac_status); } &&
6222 { ac_try='test -s conftest$ac_exeext'
6223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224 (eval $ac_try) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); }; }; then
6228 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
6229break
6230else
ba479fd2
NN
6231 echo "$as_me: failed program was:" >&5
6232sed 's/^/| /' conftest.$ac_ext >&5
6233
cafe096b 6234fi
ba479fd2
NN
6235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6236 done
6e3f3080 6237fi
ba479fd2
NN
6238LIBS=$ac_func_search_save_LIBS
6239fi
6240echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
6241echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
6242if test "$ac_cv_search_exc_resume" != no; then
63cf211a 6243 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 6244
7f2749d4 6245fi
ba479fd2 6246
7f2749d4
RK
6247GNAT_LIBEXC="$LIBS"
6248LIBS="$save_LIBS"
6249
6250
62c9aa5f
ZW
6251# Some systems put ldexp and frexp in libm instead of libc; assume
6252# they're both in the same place. jcf-dump needs them.
6253save_LIBS="$LIBS"
6254LIBS=
ba479fd2
NN
6255echo "$as_me:$LINENO: checking for library containing ldexp" >&5
6256echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
6257if test "${ac_cv_search_ldexp+set}" = set; then
6258 echo $ECHO_N "(cached) $ECHO_C" >&6
6259else
6260 ac_func_search_save_LIBS=$LIBS
6261ac_cv_search_ldexp=no
6262cat >conftest.$ac_ext <<_ACEOF
6263#line $LINENO "configure"
6264/* confdefs.h. */
6265_ACEOF
6266cat confdefs.h >>conftest.$ac_ext
6267cat >>conftest.$ac_ext <<_ACEOF
6268/* end confdefs.h. */
62c9aa5f 6269
62c9aa5f 6270/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6271#ifdef __cplusplus
6272extern "C"
6273#endif
62c9aa5f 6274/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6275 builtin and then its argument prototype would still apply. */
6276char ldexp ();
6277int
6278main ()
6279{
6280ldexp ();
6281 ;
6282 return 0;
6283}
6284_ACEOF
6285rm -f conftest.$ac_objext conftest$ac_exeext
6286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6287 (eval $ac_link) 2>&5
6288 ac_status=$?
6289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6290 (exit $ac_status); } &&
6291 { ac_try='test -s conftest$ac_exeext'
6292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6293 (eval $ac_try) 2>&5
6294 ac_status=$?
6295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296 (exit $ac_status); }; }; then
62c9aa5f
ZW
6297 ac_cv_search_ldexp="none required"
6298else
ba479fd2
NN
6299 echo "$as_me: failed program was:" >&5
6300sed 's/^/| /' conftest.$ac_ext >&5
6301
62c9aa5f 6302fi
ba479fd2
NN
6303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6304if test "$ac_cv_search_ldexp" = no; then
6305 for ac_lib in m; do
6306 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6307 cat >conftest.$ac_ext <<_ACEOF
6308#line $LINENO "configure"
6309/* confdefs.h. */
6310_ACEOF
6311cat confdefs.h >>conftest.$ac_ext
6312cat >>conftest.$ac_ext <<_ACEOF
6313/* end confdefs.h. */
6314
62c9aa5f 6315/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6316#ifdef __cplusplus
6317extern "C"
6318#endif
62c9aa5f 6319/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6320 builtin and then its argument prototype would still apply. */
6321char ldexp ();
6322int
6323main ()
6324{
6325ldexp ();
6326 ;
6327 return 0;
6328}
6329_ACEOF
6330rm -f conftest.$ac_objext conftest$ac_exeext
6331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6332 (eval $ac_link) 2>&5
6333 ac_status=$?
6334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6335 (exit $ac_status); } &&
6336 { ac_try='test -s conftest$ac_exeext'
6337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6338 (eval $ac_try) 2>&5
6339 ac_status=$?
6340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341 (exit $ac_status); }; }; then
6342 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
6343break
6344else
ba479fd2
NN
6345 echo "$as_me: failed program was:" >&5
6346sed 's/^/| /' conftest.$ac_ext >&5
6347
cafe096b 6348fi
ba479fd2
NN
6349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6350 done
6e3f3080 6351fi
ba479fd2
NN
6352LIBS=$ac_func_search_save_LIBS
6353fi
6354echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
6355echo "${ECHO_T}$ac_cv_search_ldexp" >&6
6356if test "$ac_cv_search_ldexp" != no; then
63cf211a 6357 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 6358
62c9aa5f 6359fi
ba479fd2 6360
62c9aa5f
ZW
6361LDEXP_LIB="$LIBS"
6362LIBS="$save_LIBS"
6363
6364
956d6950
JL
6365# Use <inttypes.h> only if it exists,
6366# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
6367echo "$as_me:$LINENO: checking for inttypes.h" >&5
6368echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
6369if test "${gcc_cv_header_inttypes_h+set}" = set; then
6370 echo $ECHO_N "(cached) $ECHO_C" >&6
6371else
6372 cat >conftest.$ac_ext <<_ACEOF
6373#line $LINENO "configure"
6374/* confdefs.h. */
6375_ACEOF
6376cat confdefs.h >>conftest.$ac_ext
6377cat >>conftest.$ac_ext <<_ACEOF
6378/* end confdefs.h. */
956d6950
JL
6379#include <sys/types.h>
6380#include <inttypes.h>
ba479fd2
NN
6381int
6382main ()
6383{
956d6950 6384intmax_t i = -1;
ba479fd2
NN
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest.$ac_objext
6390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6391 (eval $ac_compile) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); } &&
6395 { ac_try='test -s conftest.$ac_objext'
6396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397 (eval $ac_try) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); }; }; then
0056a9b5 6401 gcc_cv_header_inttypes_h=yes
956d6950 6402else
ba479fd2
NN
6403 echo "$as_me: failed program was:" >&5
6404sed 's/^/| /' conftest.$ac_ext >&5
6405
6406gcc_cv_header_inttypes_h=no
956d6950 6407fi
ba479fd2 6408rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
6409fi
6410
ba479fd2
NN
6411echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
6412echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 6413if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
6414
6415cat >>confdefs.h <<\_ACEOF
0056a9b5 6416#define HAVE_INTTYPES_H 1
ba479fd2 6417_ACEOF
0056a9b5
KG
6418
6419fi
956d6950 6420
c149cc37 6421
ba479fd2
NN
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6af8c740
KG
6447for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
6448 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 6449 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
6450 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
6451 setlocale
956d6950 6452do
ba479fd2
NN
6453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6454echo "$as_me:$LINENO: checking for $ac_func" >&5
6455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6456if eval "test \"\${$as_ac_var+set}\" = set"; then
6457 echo $ECHO_N "(cached) $ECHO_C" >&6
6458else
6459 cat >conftest.$ac_ext <<_ACEOF
6460#line $LINENO "configure"
6461/* confdefs.h. */
6462_ACEOF
6463cat confdefs.h >>conftest.$ac_ext
6464cat >>conftest.$ac_ext <<_ACEOF
6465/* end confdefs.h. */
956d6950 6466/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
6467 which can conflict with char $ac_func (); below.
6468 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6469 <limits.h> exists even on freestanding compilers. */
6470#ifdef __STDC__
6471# include <limits.h>
6472#else
6473# include <assert.h>
6474#endif
6e3f3080 6475/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6476#ifdef __cplusplus
6477extern "C"
6478{
6479#endif
6e3f3080 6480/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6481 builtin and then its argument prototype would still apply. */
6482char $ac_func ();
956d6950
JL
6483/* The GNU C library defines this for functions which it implements
6484 to always fail with ENOSYS. Some functions are actually named
6485 something starting with __ and the normal name is an alias. */
6486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6487choke me
6488#else
ba479fd2
NN
6489char (*f) () = $ac_func;
6490#endif
6491#ifdef __cplusplus
6492}
956d6950
JL
6493#endif
6494
ba479fd2
NN
6495int
6496main ()
6497{
6498return f != $ac_func;
6499 ;
6500 return 0;
6501}
6502_ACEOF
6503rm -f conftest.$ac_objext conftest$ac_exeext
6504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6505 (eval $ac_link) 2>&5
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); } &&
6509 { ac_try='test -s conftest$ac_exeext'
6510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6511 (eval $ac_try) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); }; }; then
6515 eval "$as_ac_var=yes"
6516else
6517 echo "$as_me: failed program was:" >&5
6518sed 's/^/| /' conftest.$ac_ext >&5
6519
6520eval "$as_ac_var=no"
6521fi
6522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6523fi
6524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6525echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6526if test `eval echo '${'$as_ac_var'}'` = yes; then
6527 cat >>confdefs.h <<_ACEOF
6528#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6529_ACEOF
956d6950 6530
956d6950
JL
6531fi
6532done
6533
6885fc87 6534
39f6c4c8 6535if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
6536 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
6537echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6538if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
6539 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
6540else
6541 if test "$cross_compiling" = yes; then
6542 gcc_cv_func_mbstowcs_works=yes
6543else
ba479fd2
NN
6544 cat >conftest.$ac_ext <<_ACEOF
6545#line $LINENO "configure"
6546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
39f6c4c8
KW
6551#include <stdlib.h>
6552int main()
6553{
6554 mbstowcs(0, "", 0);
6555 return 0;
6556}
ba479fd2
NN
6557_ACEOF
6558rm -f conftest$ac_exeext
6559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6560 (eval $ac_link) 2>&5
6561 ac_status=$?
6562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6565 (eval $ac_try) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); }; }; then
39f6c4c8
KW
6569 gcc_cv_func_mbstowcs_works=yes
6570else
ba479fd2
NN
6571 echo "$as_me: program exited with status $ac_status" >&5
6572echo "$as_me: failed program was:" >&5
6573sed 's/^/| /' conftest.$ac_ext >&5
6574
6575( exit $ac_status )
6576gcc_cv_func_mbstowcs_works=no
39f6c4c8 6577fi
a6a5e4c9 6578rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 6579fi
39f6c4c8 6580fi
ba479fd2
NN
6581echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
6582echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 6583 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
6584
6585cat >>confdefs.h <<\_ACEOF
39f6c4c8 6586#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 6587_ACEOF
39f6c4c8
KW
6588
6589 fi
6590fi
6591
ba479fd2
NN
6592echo "$as_me:$LINENO: checking for ssize_t" >&5
6593echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6594if test "${ac_cv_type_ssize_t+set}" = set; then
6595 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 6596else
ba479fd2
NN
6597 cat >conftest.$ac_ext <<_ACEOF
6598#line $LINENO "configure"
6599/* confdefs.h. */
6600_ACEOF
6601cat confdefs.h >>conftest.$ac_ext
6602cat >>conftest.$ac_ext <<_ACEOF
6603/* end confdefs.h. */
8b4fc07a
NN
6604$ac_includes_default
6605int
6606main ()
6607{
6608if ((ssize_t *) 0)
6609 return 0;
6610if (sizeof (ssize_t))
6611 return 0;
6612 ;
6613 return 0;
6614}
ba479fd2 6615_ACEOF
8b4fc07a
NN
6616rm -f conftest.$ac_objext
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>&5
6619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); } &&
6622 { ac_try='test -s conftest.$ac_objext'
6623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); }; }; then
cb65112a 6628 ac_cv_type_ssize_t=yes
f12bc141 6629else
8b4fc07a
NN
6630 echo "$as_me: failed program was:" >&5
6631sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 6632
8b4fc07a
NN
6633ac_cv_type_ssize_t=no
6634fi
6635rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 6636fi
ba479fd2
NN
6637echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6638echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
6639if test $ac_cv_type_ssize_t = yes; then
6640 :
6641else
ba479fd2 6642
8b4fc07a 6643cat >>confdefs.h <<_ACEOF
f12bc141 6644#define ssize_t int
ba479fd2 6645_ACEOF
f12bc141
ZW
6646
6647fi
6648
0b9d02c6 6649
e256b8b6
DA
6650# Try to determine the array type of the second argument of getgroups
6651# for the target system (int or gid_t).
ba479fd2
NN
6652echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6653echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6654if test "${ac_cv_type_uid_t+set}" = set; then
6655 echo $ECHO_N "(cached) $ECHO_C" >&6
6656else
6657 cat >conftest.$ac_ext <<_ACEOF
6658#line $LINENO "configure"
6659/* confdefs.h. */
6660_ACEOF
6661cat confdefs.h >>conftest.$ac_ext
6662cat >>conftest.$ac_ext <<_ACEOF
6663/* end confdefs.h. */
e256b8b6 6664#include <sys/types.h>
ba479fd2
NN
6665
6666_ACEOF
e256b8b6 6667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6668 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
6669 ac_cv_type_uid_t=yes
6670else
e256b8b6
DA
6671 ac_cv_type_uid_t=no
6672fi
6673rm -f conftest*
6674
6675fi
ba479fd2
NN
6676echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6677echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 6678if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
6679
6680cat >>confdefs.h <<\_ACEOF
e256b8b6 6681#define uid_t int
ba479fd2 6682_ACEOF
cafe096b 6683
ba479fd2
NN
6684
6685cat >>confdefs.h <<\_ACEOF
e256b8b6 6686#define gid_t int
ba479fd2 6687_ACEOF
e256b8b6
DA
6688
6689fi
6690
ba479fd2
NN
6691echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
6692echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
6693if test "${ac_cv_type_getgroups+set}" = set; then
6694 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
6695else
6696 if test "$cross_compiling" = yes; then
6697 ac_cv_type_getgroups=cross
6698else
ba479fd2
NN
6699 cat >conftest.$ac_ext <<_ACEOF
6700#line $LINENO "configure"
6701/* confdefs.h. */
6702_ACEOF
6703cat confdefs.h >>conftest.$ac_ext
6704cat >>conftest.$ac_ext <<_ACEOF
6705/* end confdefs.h. */
e256b8b6
DA
6706/* Thanks to Mike Rendell for this test. */
6707#include <sys/types.h>
6708#define NGID 256
6709#undef MAX
6710#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
6711
6712int
6713main ()
e256b8b6
DA
6714{
6715 gid_t gidset[NGID];
6716 int i, n;
6717 union { gid_t gval; long lval; } val;
6718
6719 val.lval = -1;
6720 for (i = 0; i < NGID; i++)
6721 gidset[i] = val.gval;
6722 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
e1366e0c 6723 gidset);
e256b8b6
DA
6724 /* Exit non-zero if getgroups seems to require an array of ints. This
6725 happens when gid_t is short but getgroups modifies an array of ints. */
6726 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 6727}
ba479fd2
NN
6728_ACEOF
6729rm -f conftest$ac_exeext
6730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6731 (eval $ac_link) 2>&5
6732 ac_status=$?
6733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6736 (eval $ac_try) 2>&5
6737 ac_status=$?
6738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6739 (exit $ac_status); }; }; then
6740 ac_cv_type_getgroups=gid_t
63cf211a 6741else
ba479fd2
NN
6742 echo "$as_me: program exited with status $ac_status" >&5
6743echo "$as_me: failed program was:" >&5
6744sed 's/^/| /' conftest.$ac_ext >&5
6745
6746( exit $ac_status )
6747ac_cv_type_getgroups=int
e256b8b6 6748fi
a6a5e4c9 6749rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 6750fi
e256b8b6 6751if test $ac_cv_type_getgroups = cross; then
ba479fd2
NN
6752 cat >conftest.$ac_ext <<_ACEOF
6753#line $LINENO "configure"
6754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
e256b8b6 6759#include <unistd.h>
ba479fd2
NN
6760
6761_ACEOF
e256b8b6 6762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6763 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
6764 ac_cv_type_getgroups=gid_t
6765else
e256b8b6
DA
6766 ac_cv_type_getgroups=int
6767fi
6768rm -f conftest*
6769
6770fi
6771fi
ba479fd2
NN
6772echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
6773echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 6774
ba479fd2 6775cat >>confdefs.h <<_ACEOF
e256b8b6 6776#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 6777_ACEOF
e256b8b6
DA
6778
6779
6780if test "${target}" = "${build}"; then
6781 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
6782else
6783 case "${target}" in
6784 # This condition may need some tweaking. It should include all
6785 # targets where the array type of the second argument of getgroups
6786 # is int and the type of gid_t is not equivalent to int.
6787 *-*-sunos* | *-*-ultrix*)
6788 TARGET_GETGROUPS_T=int
6789 ;;
6790 *)
6791 TARGET_GETGROUPS_T=gid_t
6792 ;;
6793 esac
6794fi
6795
6796
ba479fd2
NN
6797echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
6798echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
6799if test "${gcc_cv_func_printf_ptr+set}" = set; then
6800 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
6801else
6802 if test "$cross_compiling" = yes; then
6803 gcc_cv_func_printf_ptr=no
6804else
ba479fd2
NN
6805 cat >conftest.$ac_ext <<_ACEOF
6806#line $LINENO "configure"
6807/* confdefs.h. */
6808_ACEOF
6809cat confdefs.h >>conftest.$ac_ext
6810cat >>conftest.$ac_ext <<_ACEOF
6811/* end confdefs.h. */
0a4b6309
RL
6812#include <stdio.h>
6813
86cf1cbd 6814int main()
0a4b6309
RL
6815{
6816 char buf[64];
6817 char *p = buf, *q = NULL;
6818 sprintf(buf, "%p", p);
6819 sscanf(buf, "%p", &q);
86cf1cbd 6820 return (p != q);
0a4b6309 6821}
ba479fd2
NN
6822_ACEOF
6823rm -f conftest$ac_exeext
6824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6825 (eval $ac_link) 2>&5
6826 ac_status=$?
6827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830 (eval $ac_try) 2>&5
6831 ac_status=$?
6832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833 (exit $ac_status); }; }; then
0a4b6309
RL
6834 gcc_cv_func_printf_ptr=yes
6835else
ba479fd2
NN
6836 echo "$as_me: program exited with status $ac_status" >&5
6837echo "$as_me: failed program was:" >&5
6838sed 's/^/| /' conftest.$ac_ext >&5
6839
6840( exit $ac_status )
6841gcc_cv_func_printf_ptr=no
0a4b6309 6842fi
a6a5e4c9 6843rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 6844fi
0a4b6309
RL
6845rm -f core core.* *.core
6846fi
ba479fd2
NN
6847echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
6848echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 6849if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
6850
6851cat >>confdefs.h <<\_ACEOF
0a4b6309 6852#define HAVE_PRINTF_PTR 1
ba479fd2 6853_ACEOF
0a4b6309
RL
6854
6855fi
6856
1072ec3f
ZW
6857if test $ac_cv_header_sys_mman_h != yes \
6858 || test $ac_cv_func_mmap != yes; then
6859 gcc_cv_func_mmap_file=no
6860 gcc_cv_func_mmap_dev_zero=no
6861 gcc_cv_func_mmap_anon=no
6862else
ba479fd2
NN
6863 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
6864echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
6865if test "${gcc_cv_func_mmap_file+set}" = set; then
6866 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 6867else
ba479fd2 6868 # Add a system to this blacklist if
1072ec3f
ZW
6869 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
6870 # memory area containing the same data that you'd get if you applied
6871 # read() to the same fd. The only system known to have a problem here
6872 # is VMS, where text files have record structure.
6873 case "$host_os" in
ba479fd2 6874 vms* | ultrix*)
1072ec3f
ZW
6875 gcc_cv_func_mmap_file=no ;;
6876 *)
6877 gcc_cv_func_mmap_file=yes;;
6878 esac
6879fi
ba479fd2
NN
6880echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
6881echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
6882 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
6883echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
6884if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
6885 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6886else
6887 # Add a system to this blacklist if it has mmap() but /dev/zero
6888 # does not exist, or if mmapping /dev/zero does not give anonymous
6889 # zeroed pages with both the following properties:
6890 # 1. If you map N consecutive pages in with one call, and then
6891 # unmap any subset of those pages, the pages that were not
6892 # explicitly unmapped remain accessible.
6893 # 2. If you map two adjacent blocks of memory and then unmap them
6894 # both at once, they must both go away.
6895 # Systems known to be in this category are Windows (all variants),
6896 # VMS, and Darwin.
6897 case "$host_os" in
2ce240d3 6898 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
6899 gcc_cv_func_mmap_dev_zero=no ;;
6900 *)
6901 gcc_cv_func_mmap_dev_zero=yes;;
6902 esac
6903fi
ba479fd2
NN
6904echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
6905echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
6906
6907 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
6908 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
6909echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
6910if test "${gcc_cv_decl_map_anon+set}" = set; then
6911 echo $ECHO_N "(cached) $ECHO_C" >&6
6912else
6913 cat >conftest.$ac_ext <<_ACEOF
6914#line $LINENO "configure"
6915/* confdefs.h. */
6916_ACEOF
6917cat confdefs.h >>conftest.$ac_ext
6918cat >>conftest.$ac_ext <<_ACEOF
6919/* end confdefs.h. */
1072ec3f
ZW
6920#include <sys/types.h>
6921#include <sys/mman.h>
6922#include <unistd.h>
6923
6924#ifndef MAP_ANONYMOUS
6925#define MAP_ANONYMOUS MAP_ANON
6926#endif
6927
ba479fd2
NN
6928int
6929main ()
6930{
1072ec3f 6931int n = MAP_ANONYMOUS;
ba479fd2
NN
6932 ;
6933 return 0;
6934}
6935_ACEOF
6936rm -f conftest.$ac_objext
6937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6938 (eval $ac_compile) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); } &&
6942 { ac_try='test -s conftest.$ac_objext'
6943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6944 (eval $ac_try) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); }; }; then
1072ec3f
ZW
6948 gcc_cv_decl_map_anon=yes
6949else
ba479fd2
NN
6950 echo "$as_me: failed program was:" >&5
6951sed 's/^/| /' conftest.$ac_ext >&5
6952
6953gcc_cv_decl_map_anon=no
1072ec3f 6954fi
ba479fd2 6955rm -f conftest.$ac_objext conftest.$ac_ext
1072ec3f 6956fi
ba479fd2
NN
6957echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
6958echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
6959
6960 if test $gcc_cv_decl_map_anon = no; then
6961 gcc_cv_func_mmap_anon=no
6962 else
ba479fd2
NN
6963 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
6964echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
6965if test "${gcc_cv_func_mmap_anon+set}" = set; then
6966 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6967else
6968 # Add a system to this blacklist if it has mmap() and MAP_ANON or
6969 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
6970 # doesn't give anonymous zeroed pages with the same properties listed
6971 # above for use of /dev/zero.
6972 # Systems known to be in this category are Windows, VMS, and SCO Unix.
6973 case "$host_os" in
6974 vms* | cygwin* | pe | mingw* | sco* | udk* )
6975 gcc_cv_func_mmap_anon=no ;;
6976 *)
6977 gcc_cv_func_mmap_anon=yes;;
6978 esac
6979fi
ba479fd2
NN
6980echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
6981echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
6982 fi
6983fi
6984
6985if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
6986
6987cat >>confdefs.h <<\_ACEOF
1072ec3f 6988#define HAVE_MMAP_FILE 1
ba479fd2 6989_ACEOF
1072ec3f
ZW
6990
6991fi
6992if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
6993
6994cat >>confdefs.h <<\_ACEOF
1072ec3f 6995#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 6996_ACEOF
1072ec3f
ZW
6997
6998fi
6999if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
7000
7001cat >>confdefs.h <<\_ACEOF
1072ec3f 7002#define HAVE_MMAP_ANON 1
ba479fd2 7003_ACEOF
1072ec3f
ZW
7004
7005fi
7006
b27d2bd5
MK
7007
7008case "${host}" in
ee262b6f 7009*-*-*vms*)
ba479fd2 7010 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
7011 # won't work, and it isn't easily adaptable. It makes more sense to
7012 # just force it.
7013 ac_cv_func_vfork_works=yes
7014 ;;
b27d2bd5 7015esac
ba479fd2
NN
7016echo "$as_me:$LINENO: checking for pid_t" >&5
7017echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7018if test "${ac_cv_type_pid_t+set}" = set; then
7019 echo $ECHO_N "(cached) $ECHO_C" >&6
7020else
7021 cat >conftest.$ac_ext <<_ACEOF
7022#line $LINENO "configure"
7023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
7028$ac_includes_default
7029int
7030main ()
7031{
7032if ((pid_t *) 0)
7033 return 0;
7034if (sizeof (pid_t))
7035 return 0;
7036 ;
7037 return 0;
7038}
7039_ACEOF
7040rm -f conftest.$ac_objext
7041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7042 (eval $ac_compile) 2>&5
7043 ac_status=$?
7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045 (exit $ac_status); } &&
7046 { ac_try='test -s conftest.$ac_objext'
7047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7048 (eval $ac_try) 2>&5
7049 ac_status=$?
7050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7051 (exit $ac_status); }; }; then
cb65112a 7052 ac_cv_type_pid_t=yes
c375c43b 7053else
ba479fd2
NN
7054 echo "$as_me: failed program was:" >&5
7055sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7056
ba479fd2
NN
7057ac_cv_type_pid_t=no
7058fi
7059rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 7060fi
ba479fd2
NN
7061echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7062echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7063if test $ac_cv_type_pid_t = yes; then
7064 :
7065else
7066
7067cat >>confdefs.h <<_ACEOF
c375c43b 7068#define pid_t int
ba479fd2 7069_ACEOF
c375c43b
KG
7070
7071fi
7072
ba479fd2
NN
7073
7074
7075for ac_header in unistd.h vfork.h
7076do
7077as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7078echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7079echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7080if eval "test \"\${$as_ac_Header+set}\" = set"; then
7081 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7082else
ca9bc441 7083 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7084#line $LINENO "configure"
7085/* confdefs.h. */
7086_ACEOF
7087cat confdefs.h >>conftest.$ac_ext
7088cat >>conftest.$ac_ext <<_ACEOF
7089/* end confdefs.h. */
7090#include <$ac_header>
7091_ACEOF
7092if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7093 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7094 ac_status=$?
7095 grep -v '^ *+' conftest.er1 >conftest.err
7096 rm -f conftest.er1
7097 cat conftest.err >&5
7098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7099 (exit $ac_status); } >/dev/null; then
7100 if test -s conftest.err; then
7101 ac_cpp_err=$ac_c_preproc_warn_flag
7102 else
7103 ac_cpp_err=
7104 fi
093e61a6 7105else
ba479fd2
NN
7106 ac_cpp_err=yes
7107fi
7108if test -z "$ac_cpp_err"; then
ca9bc441 7109 eval "$as_ac_Header=yes"
ba479fd2
NN
7110else
7111 echo "$as_me: failed program was:" >&5
7112sed 's/^/| /' conftest.$ac_ext >&5
7113
ca9bc441 7114 eval "$as_ac_Header=no"
ba479fd2
NN
7115fi
7116rm -f conftest.err conftest.$ac_ext
c375c43b 7117fi
ba479fd2
NN
7118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7119echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7120if test `eval echo '${'$as_ac_Header'}'` = yes; then
7121 cat >>confdefs.h <<_ACEOF
7122#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7123_ACEOF
6e3f3080
NN
7124
7125fi
ba479fd2
NN
7126done
7127
7128
7129
7130for ac_func in fork vfork
7131do
7132as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7133echo "$as_me:$LINENO: checking for $ac_func" >&5
7134echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7135if eval "test \"\${$as_ac_var+set}\" = set"; then
7136 echo $ECHO_N "(cached) $ECHO_C" >&6
7137else
7138 cat >conftest.$ac_ext <<_ACEOF
7139#line $LINENO "configure"
7140/* confdefs.h. */
7141_ACEOF
7142cat confdefs.h >>conftest.$ac_ext
7143cat >>conftest.$ac_ext <<_ACEOF
7144/* end confdefs.h. */
c375c43b 7145/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
7146 which can conflict with char $ac_func (); below.
7147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7148 <limits.h> exists even on freestanding compilers. */
7149#ifdef __STDC__
7150# include <limits.h>
7151#else
7152# include <assert.h>
7153#endif
6e3f3080 7154/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
7155#ifdef __cplusplus
7156extern "C"
7157{
7158#endif
6e3f3080 7159/* We use char because int might match the return type of a gcc2
ba479fd2
NN
7160 builtin and then its argument prototype would still apply. */
7161char $ac_func ();
c375c43b
KG
7162/* The GNU C library defines this for functions which it implements
7163 to always fail with ENOSYS. Some functions are actually named
7164 something starting with __ and the normal name is an alias. */
ba479fd2 7165#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
7166choke me
7167#else
ba479fd2
NN
7168char (*f) () = $ac_func;
7169#endif
7170#ifdef __cplusplus
7171}
c375c43b
KG
7172#endif
7173
ba479fd2
NN
7174int
7175main ()
7176{
7177return f != $ac_func;
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext conftest$ac_exeext
7183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7184 (eval $ac_link) 2>&5
7185 ac_status=$?
7186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7187 (exit $ac_status); } &&
7188 { ac_try='test -s conftest$ac_exeext'
7189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7190 (eval $ac_try) 2>&5
7191 ac_status=$?
7192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193 (exit $ac_status); }; }; then
7194 eval "$as_ac_var=yes"
7195else
7196 echo "$as_me: failed program was:" >&5
7197sed 's/^/| /' conftest.$ac_ext >&5
7198
7199eval "$as_ac_var=no"
7200fi
7201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7202fi
7203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7205if test `eval echo '${'$as_ac_var'}'` = yes; then
7206 cat >>confdefs.h <<_ACEOF
7207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7208_ACEOF
7209
c375c43b 7210fi
ba479fd2 7211done
c375c43b 7212
ba479fd2
NN
7213if test "x$ac_cv_func_fork" = xyes; then
7214 echo "$as_me:$LINENO: checking for working fork" >&5
7215echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7216if test "${ac_cv_func_fork_works+set}" = set; then
7217 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7218else
ba479fd2
NN
7219 if test "$cross_compiling" = yes; then
7220 ac_cv_func_fork_works=cross
7221else
7222 cat >conftest.$ac_ext <<_ACEOF
7223/* By Ruediger Kuhlmann. */
7224 #include <sys/types.h>
7225 #if HAVE_UNISTD_H
7226 # include <unistd.h>
7227 #endif
7228 /* Some systems only have a dummy stub for fork() */
7229 int main ()
7230 {
7231 if (fork() < 0)
7232 exit (1);
7233 exit (0);
7234 }
7235_ACEOF
7236rm -f conftest$ac_exeext
7237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7238 (eval $ac_link) 2>&5
7239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243 (eval $ac_try) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); }; }; then
7247 ac_cv_func_fork_works=yes
7248else
7249 echo "$as_me: program exited with status $ac_status" >&5
7250echo "$as_me: failed program was:" >&5
7251sed 's/^/| /' conftest.$ac_ext >&5
7252
7253( exit $ac_status )
7254ac_cv_func_fork_works=no
7255fi
a6a5e4c9 7256rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
7257fi
7258fi
7259echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7260echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7261
7262else
7263 ac_cv_func_fork_works=$ac_cv_func_fork
7264fi
7265if test "x$ac_cv_func_fork_works" = xcross; then
7266 case $host in
7267 *-*-amigaos* | *-*-msdosdjgpp*)
7268 # Override, as these systems have only a dummy fork() stub
7269 ac_cv_func_fork_works=no
7270 ;;
7271 *)
7272 ac_cv_func_fork_works=yes
7273 ;;
7274 esac
7275 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7276echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 7277fi
c375c43b 7278ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7279if test "x$ac_cv_func_vfork" = xyes; then
7280 echo "$as_me:$LINENO: checking for working vfork" >&5
7281echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7282if test "${ac_cv_func_vfork_works+set}" = set; then
7283 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7284else
ba479fd2
NN
7285 if test "$cross_compiling" = yes; then
7286 ac_cv_func_vfork_works=cross
7287else
7288 cat >conftest.$ac_ext <<_ACEOF
7289#line $LINENO "configure"
7290/* confdefs.h. */
7291_ACEOF
7292cat confdefs.h >>conftest.$ac_ext
7293cat >>conftest.$ac_ext <<_ACEOF
7294/* end confdefs.h. */
c375c43b
KG
7295/* Thanks to Paul Eggert for this test. */
7296#include <stdio.h>
ba479fd2 7297#include <stdlib.h>
c375c43b
KG
7298#include <sys/types.h>
7299#include <sys/stat.h>
ba479fd2
NN
7300#include <sys/wait.h>
7301#if HAVE_UNISTD_H
7302# include <unistd.h>
c375c43b 7303#endif
ba479fd2
NN
7304#if HAVE_VFORK_H
7305# include <vfork.h>
c375c43b
KG
7306#endif
7307/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
7308 argument registers are propagated back to the parent. The compiler
7309 is told about this with #include <vfork.h>, but some compilers
7310 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7311 static variable whose address is put into a register that is
7312 clobbered by the vfork. */
7313static void
c375c43b
KG
7314#ifdef __cplusplus
7315sparc_address_test (int arg)
ba479fd2 7316# else
c375c43b
KG
7317sparc_address_test (arg) int arg;
7318#endif
7319{
7320 static pid_t child;
7321 if (!child) {
7322 child = vfork ();
7323 if (child < 0) {
7324 perror ("vfork");
7325 _exit(2);
7326 }
7327 if (!child) {
7328 arg = getpid();
7329 write(-1, "", 0);
7330 _exit (arg);
7331 }
7332 }
7333}
ba479fd2
NN
7334
7335int
7336main ()
7337{
c375c43b
KG
7338 pid_t parent = getpid ();
7339 pid_t child;
7340
ba479fd2 7341 sparc_address_test (0);
c375c43b
KG
7342
7343 child = vfork ();
7344
7345 if (child == 0) {
ba479fd2
NN
7346 /* Here is another test for sparc vfork register problems. This
7347 test uses lots of local variables, at least as many local
7348 variables as main has allocated so far including compiler
7349 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7350 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7351 reuse the register of parent for one of the local variables,
7352 since it will think that parent can't possibly be used any more
7353 in this routine. Assigning to the local variable will thus
7354 munge parent in the parent process. */
c375c43b
KG
7355 pid_t
7356 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7357 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7358 /* Convince the compiler that p..p7 are live; otherwise, it might
7359 use the same hardware register for all 8 local variables. */
7360 if (p != p1 || p != p2 || p != p3 || p != p4
7361 || p != p5 || p != p6 || p != p7)
7362 _exit(1);
7363
ba479fd2
NN
7364 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7365 from child file descriptors. If the child closes a descriptor
7366 before it execs or exits, this munges the parent's descriptor
7367 as well. Test for this by closing stdout in the child. */
c375c43b
KG
7368 _exit(close(fileno(stdout)) != 0);
7369 } else {
7370 int status;
7371 struct stat st;
7372
7373 while (wait(&status) != child)
7374 ;
7375 exit(
7376 /* Was there some problem with vforking? */
7377 child < 0
7378
7379 /* Did the child fail? (This shouldn't happen.) */
7380 || status
7381
7382 /* Did the vfork/compiler bug occur? */
7383 || parent != getpid()
7384
7385 /* Did the file descriptor bug occur? */
7386 || fstat(fileno(stdout), &st) != 0
7387 );
7388 }
7389}
ba479fd2
NN
7390_ACEOF
7391rm -f conftest$ac_exeext
7392if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7393 (eval $ac_link) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7398 (eval $ac_try) 2>&5
7399 ac_status=$?
7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401 (exit $ac_status); }; }; then
c375c43b
KG
7402 ac_cv_func_vfork_works=yes
7403else
ba479fd2
NN
7404 echo "$as_me: program exited with status $ac_status" >&5
7405echo "$as_me: failed program was:" >&5
7406sed 's/^/| /' conftest.$ac_ext >&5
7407
7408( exit $ac_status )
7409ac_cv_func_vfork_works=no
cafe096b 7410fi
a6a5e4c9 7411rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 7412fi
ba479fd2
NN
7413fi
7414echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7415echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 7416
ba479fd2
NN
7417fi;
7418if test "x$ac_cv_func_fork_works" = xcross; then
7419 ac_cv_func_vfork_works=ac_cv_func_vfork
7420 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7421echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
7422fi
7423
ba479fd2
NN
7424if test "x$ac_cv_func_vfork_works" = xyes; then
7425
7426cat >>confdefs.h <<\_ACEOF
7427#define HAVE_WORKING_VFORK 1
7428_ACEOF
7429
7430else
7431
7432cat >>confdefs.h <<\_ACEOF
c375c43b 7433#define vfork fork
ba479fd2 7434_ACEOF
c375c43b
KG
7435
7436fi
ba479fd2
NN
7437if test "x$ac_cv_func_fork_works" = xyes; then
7438
7439cat >>confdefs.h <<\_ACEOF
7440#define HAVE_WORKING_FORK 1
7441_ACEOF
7442
7443fi
7444
c375c43b 7445
81bf3d9e 7446
f91abfce 7447
b7f2fb96 7448 am_cv_lib_iconv_ldpath=
ba479fd2
NN
7449
7450# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
f91abfce
TT
7451if test "${with_libiconv_prefix+set}" = set; then
7452 withval="$with_libiconv_prefix"
ba479fd2 7453
f91abfce
TT
7454 for dir in `echo "$withval" | tr : ' '`; do
7455 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
b7f2fb96 7456 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
f91abfce 7457 done
ba479fd2
NN
7458
7459fi;
f91abfce
TT
7460
7461
ba479fd2 7462for ac_header in iconv.h
eb158727 7463do
ba479fd2 7464as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7465echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7466echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7467if eval "test \"\${$as_ac_Header+set}\" = set"; then
7468 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7469else
ca9bc441 7470 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7471#line $LINENO "configure"
7472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
7477#include <$ac_header>
7478_ACEOF
7479if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7480 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7481 ac_status=$?
7482 grep -v '^ *+' conftest.er1 >conftest.err
7483 rm -f conftest.er1
7484 cat conftest.err >&5
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); } >/dev/null; then
7487 if test -s conftest.err; then
7488 ac_cpp_err=$ac_c_preproc_warn_flag
7489 else
7490 ac_cpp_err=
7491 fi
7492else
7493 ac_cpp_err=yes
7494fi
7495if test -z "$ac_cpp_err"; then
ca9bc441 7496 eval "$as_ac_Header=yes"
ba479fd2
NN
7497else
7498 echo "$as_me: failed program was:" >&5
7499sed 's/^/| /' conftest.$ac_ext >&5
7500
ca9bc441 7501 eval "$as_ac_Header=no"
ba479fd2
NN
7502fi
7503rm -f conftest.err conftest.$ac_ext
6e3f3080 7504fi
ba479fd2
NN
7505echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7506echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7507if test `eval echo '${'$as_ac_Header'}'` = yes; then
7508 cat >>confdefs.h <<_ACEOF
7509#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7510_ACEOF
7511
eb158727
ZW
7512fi
7513done
7514
7515
ba479fd2
NN
7516 echo "$as_me:$LINENO: checking for iconv" >&5
7517echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7518if test "${am_cv_func_iconv+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7520else
ba479fd2 7521
f91abfce
TT
7522 am_cv_func_iconv="no, consider installing GNU libiconv"
7523 am_cv_lib_iconv=no
ba479fd2
NN
7524 cat >conftest.$ac_ext <<_ACEOF
7525#line $LINENO "configure"
7526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
f91abfce
TT
7531#include <stdlib.h>
7532#include <iconv.h>
ba479fd2
NN
7533int
7534main ()
7535{
f91abfce
TT
7536iconv_t cd = iconv_open("","");
7537 iconv(cd,NULL,NULL,NULL,NULL);
7538 iconv_close(cd);
ba479fd2
NN
7539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext conftest$ac_exeext
7544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7545 (eval $ac_link) 2>&5
7546 ac_status=$?
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); } &&
7549 { ac_try='test -s conftest$ac_exeext'
7550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7551 (eval $ac_try) 2>&5
7552 ac_status=$?
7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554 (exit $ac_status); }; }; then
f91abfce
TT
7555 am_cv_func_iconv=yes
7556else
ba479fd2
NN
7557 echo "$as_me: failed program was:" >&5
7558sed 's/^/| /' conftest.$ac_ext >&5
7559
f91abfce 7560fi
ba479fd2 7561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7562 if test "$am_cv_func_iconv" != yes; then
7563 am_save_LIBS="$LIBS"
b7f2fb96 7564 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
ba479fd2
NN
7565 cat >conftest.$ac_ext <<_ACEOF
7566#line $LINENO "configure"
7567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
f91abfce
TT
7572#include <stdlib.h>
7573#include <iconv.h>
ba479fd2
NN
7574int
7575main ()
7576{
f91abfce
TT
7577iconv_t cd = iconv_open("","");
7578 iconv(cd,NULL,NULL,NULL,NULL);
7579 iconv_close(cd);
ba479fd2
NN
7580 ;
7581 return 0;
7582}
7583_ACEOF
7584rm -f conftest.$ac_objext conftest$ac_exeext
7585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7586 (eval $ac_link) 2>&5
7587 ac_status=$?
7588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7589 (exit $ac_status); } &&
7590 { ac_try='test -s conftest$ac_exeext'
7591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7592 (eval $ac_try) 2>&5
7593 ac_status=$?
7594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7595 (exit $ac_status); }; }; then
f91abfce
TT
7596 am_cv_lib_iconv=yes
7597 am_cv_func_iconv=yes
7598else
ba479fd2
NN
7599 echo "$as_me: failed program was:" >&5
7600sed 's/^/| /' conftest.$ac_ext >&5
7601
f91abfce 7602fi
ba479fd2 7603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7604 LIBS="$am_save_LIBS"
7605 fi
6e3f3080 7606
ba479fd2
NN
7607fi
7608echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
7609echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 7610 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
7611
7612cat >>confdefs.h <<\_ACEOF
f91abfce 7613#define HAVE_ICONV 1
ba479fd2 7614_ACEOF
f91abfce 7615
ba479fd2
NN
7616 echo "$as_me:$LINENO: checking for iconv declaration" >&5
7617echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
7618 if test "${am_cv_proto_iconv+set}" = set; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7620else
ba479fd2
NN
7621
7622 cat >conftest.$ac_ext <<_ACEOF
7623#line $LINENO "configure"
7624/* confdefs.h. */
7625_ACEOF
7626cat confdefs.h >>conftest.$ac_ext
7627cat >>conftest.$ac_ext <<_ACEOF
7628/* end confdefs.h. */
f91abfce
TT
7629
7630#include <stdlib.h>
7631#include <iconv.h>
7632extern
7633#ifdef __cplusplus
7634"C"
7635#endif
7636#if defined(__STDC__) || defined(__cplusplus)
7637size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7638#else
7639size_t iconv();
7640#endif
7641
ba479fd2
NN
7642int
7643main ()
7644{
f91abfce 7645
ba479fd2
NN
7646 ;
7647 return 0;
7648}
7649_ACEOF
7650rm -f conftest.$ac_objext
7651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7652 (eval $ac_compile) 2>&5
7653 ac_status=$?
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); } &&
7656 { ac_try='test -s conftest.$ac_objext'
7657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); }; }; then
f91abfce
TT
7662 am_cv_proto_iconv_arg1=""
7663else
ba479fd2
NN
7664 echo "$as_me: failed program was:" >&5
7665sed 's/^/| /' conftest.$ac_ext >&5
7666
7667am_cv_proto_iconv_arg1="const"
f91abfce 7668fi
ba479fd2 7669rm -f conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
7670 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);"
7671fi
7672
7673 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
7674 echo "$as_me:$LINENO: result: ${ac_t:-
7675 }$am_cv_proto_iconv" >&5
7676echo "${ECHO_T}${ac_t:-
7677 }$am_cv_proto_iconv" >&6
7678
7679cat >>confdefs.h <<_ACEOF
f91abfce 7680#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 7681_ACEOF
f91abfce
TT
7682
7683 fi
7684 LIBICONV=
7685 if test "$am_cv_lib_iconv" = yes; then
b7f2fb96 7686 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
f91abfce 7687 fi
ba479fd2 7688
f91abfce 7689
56694dd9
ZW
7690# Until we have in-tree GNU iconv:
7691LIBICONV_DEP=
7692
7693
7694
ba479fd2
NN
7695 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7696echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7697if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7698 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 7699else
ba479fd2
NN
7700 cat >conftest.$ac_ext <<_ACEOF
7701#line $LINENO "configure"
7702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
56694dd9 7707#include <locale.h>
ba479fd2
NN
7708int
7709main ()
7710{
56694dd9 7711return LC_MESSAGES
ba479fd2
NN
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716rm -f conftest.$ac_objext conftest$ac_exeext
7717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7718 (eval $ac_link) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); } &&
7722 { ac_try='test -s conftest$ac_exeext'
7723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7724 (eval $ac_try) 2>&5
7725 ac_status=$?
7726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727 (exit $ac_status); }; }; then
56694dd9
ZW
7728 am_cv_val_LC_MESSAGES=yes
7729else
ba479fd2
NN
7730 echo "$as_me: failed program was:" >&5
7731sed 's/^/| /' conftest.$ac_ext >&5
7732
7733am_cv_val_LC_MESSAGES=no
56694dd9 7734fi
ba479fd2 7735rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
56694dd9 7736fi
ba479fd2
NN
7737echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7738echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 7739 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
7740
7741cat >>confdefs.h <<\_ACEOF
56694dd9 7742#define HAVE_LC_MESSAGES 1
ba479fd2 7743_ACEOF
56694dd9
ZW
7744
7745 fi
7746
f91abfce 7747
86cf1cbd
KG
7748# We will need to find libiberty.h and ansidecl.h
7749saved_CFLAGS="$CFLAGS"
7750CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
8e944909 7751for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 7752 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 7753 fprintf_unlocked strstr errno snprintf vasprintf \
c1800ec8 7754 malloc realloc calloc free basename getopt clock
81bf3d9e 7755do
f31e826b 7756 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7757echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7758echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7759if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7760 echo $ECHO_N "(cached) $ECHO_C" >&6
7761else
7762 cat >conftest.$ac_ext <<_ACEOF
7763#line $LINENO "configure"
7764/* confdefs.h. */
7765_ACEOF
7766cat confdefs.h >>conftest.$ac_ext
7767cat >>conftest.$ac_ext <<_ACEOF
7768/* end confdefs.h. */
7afe8c41
KG
7769#undef $ac_tr_decl
7770#define $ac_tr_decl 1
ba479fd2 7771
d02af173 7772#include "ansidecl.h"
86cf1cbd 7773#include "system.h"
f31e826b 7774
ba479fd2
NN
7775int
7776main ()
7777{
86cf1cbd
KG
7778#ifndef $ac_func
7779char *(*pfn) = (char *(*)) $ac_func ;
7780#endif
ba479fd2
NN
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext
7786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7787 (eval $ac_compile) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); } &&
7791 { ac_try='test -s conftest.$ac_objext'
7792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7793 (eval $ac_try) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); }; }; then
f31e826b 7797 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7798else
ba479fd2
NN
7799 echo "$as_me: failed program was:" >&5
7800sed 's/^/| /' conftest.$ac_ext >&5
7801
7802eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7803fi
ba479fd2 7804rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7805fi
7806
f31e826b 7807if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7808 echo "$as_me:$LINENO: result: yes" >&5
7809echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7810#define $ac_tr_decl 1
ba479fd2
NN
7811_ACEOF
7812
81bf3d9e 7813else
ba479fd2
NN
7814 echo "$as_me:$LINENO: result: no" >&5
7815echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7816#define $ac_tr_decl 0
ba479fd2
NN
7817_ACEOF
7818
81bf3d9e
RH
7819fi
7820
7821done
86cf1cbd 7822if test x = y ; then
ba479fd2
NN
7823
7824cat >>confdefs.h <<\_ACEOF
f31e826b 7825#define HAVE_DECL_GETENV 1
ba479fd2
NN
7826_ACEOF
7827
7828cat >>confdefs.h <<\_ACEOF
f31e826b 7829#define HAVE_DECL_ATOL 1
ba479fd2
NN
7830_ACEOF
7831
7832cat >>confdefs.h <<\_ACEOF
f31e826b 7833#define HAVE_DECL_SBRK 1
ba479fd2
NN
7834_ACEOF
7835
7836cat >>confdefs.h <<\_ACEOF
f31e826b 7837#define HAVE_DECL_ABORT 1
ba479fd2
NN
7838_ACEOF
7839
7840cat >>confdefs.h <<\_ACEOF
f31e826b 7841#define HAVE_DECL_ATOF 1
ba479fd2
NN
7842_ACEOF
7843
7844cat >>confdefs.h <<\_ACEOF
f31e826b 7845#define HAVE_DECL_GETCWD 1
ba479fd2
NN
7846_ACEOF
7847
7848cat >>confdefs.h <<\_ACEOF
f31e826b 7849#define HAVE_DECL_GETWD 1
ba479fd2 7850_ACEOF
86cf1cbd 7851 \
ba479fd2
NN
7852
7853cat >>confdefs.h <<\_ACEOF
f31e826b 7854#define HAVE_DECL_STRSIGNAL 1
ba479fd2
NN
7855_ACEOF
7856
7857cat >>confdefs.h <<\_ACEOF
f31e826b 7858#define HAVE_DECL_PUTC_UNLOCKED 1
ba479fd2
NN
7859_ACEOF
7860
7861cat >>confdefs.h <<\_ACEOF
f31e826b 7862#define HAVE_DECL_FPUTS_UNLOCKED 1
ba479fd2
NN
7863_ACEOF
7864
7865cat >>confdefs.h <<\_ACEOF
3b681e9d 7866#define HAVE_DECL_FWRITE_UNLOCKED 1
ba479fd2 7867_ACEOF
3b681e9d 7868 \
ba479fd2
NN
7869
7870cat >>confdefs.h <<\_ACEOF
3b681e9d 7871#define HAVE_DECL_FPRINTF_UNLOCKED 1
ba479fd2
NN
7872_ACEOF
7873
7874cat >>confdefs.h <<\_ACEOF
f31e826b 7875#define HAVE_DECL_STRSTR 1
ba479fd2
NN
7876_ACEOF
7877
7878cat >>confdefs.h <<\_ACEOF
6c889b67 7879#define HAVE_DECL_ERRNO 1
ba479fd2
NN
7880_ACEOF
7881
7882cat >>confdefs.h <<\_ACEOF
236ce4b2 7883#define HAVE_DECL_SNPRINTF 1
ba479fd2
NN
7884_ACEOF
7885
7886cat >>confdefs.h <<\_ACEOF
a7475ab1 7887#define HAVE_DECL_VASPRINTF 1
ba479fd2 7888_ACEOF
86cf1cbd 7889 \
ba479fd2
NN
7890
7891cat >>confdefs.h <<\_ACEOF
f31e826b 7892#define HAVE_DECL_MALLOC 1
ba479fd2
NN
7893_ACEOF
7894
7895cat >>confdefs.h <<\_ACEOF
f31e826b 7896#define HAVE_DECL_REALLOC 1
ba479fd2
NN
7897_ACEOF
7898
7899cat >>confdefs.h <<\_ACEOF
f31e826b 7900#define HAVE_DECL_CALLOC 1
ba479fd2
NN
7901_ACEOF
7902
7903cat >>confdefs.h <<\_ACEOF
f31e826b 7904#define HAVE_DECL_FREE 1
ba479fd2
NN
7905_ACEOF
7906
7907cat >>confdefs.h <<\_ACEOF
f31e826b 7908#define HAVE_DECL_BASENAME 1
ba479fd2
NN
7909_ACEOF
7910
7911cat >>confdefs.h <<\_ACEOF
f31e826b 7912#define HAVE_DECL_GETOPT 1
ba479fd2
NN
7913_ACEOF
7914
7915cat >>confdefs.h <<\_ACEOF
c1800ec8 7916#define HAVE_DECL_CLOCK 1
ba479fd2 7917_ACEOF
81bf3d9e
RH
7918fi
7919
81bf3d9e
RH
7920
7921for ac_func in getrlimit setrlimit getrusage
7922do
f31e826b 7923 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7924echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7925echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7926if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7927 echo $ECHO_N "(cached) $ECHO_C" >&6
7928else
7929 cat >conftest.$ac_ext <<_ACEOF
7930#line $LINENO "configure"
7931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
7afe8c41
KG
7936#undef $ac_tr_decl
7937#define $ac_tr_decl 1
ba479fd2 7938
d02af173 7939#include "ansidecl.h"
86cf1cbd 7940#include "system.h"
81bf3d9e
RH
7941#ifdef HAVE_SYS_RESOURCE_H
7942#include <sys/resource.h>
7943#endif
7944
f31e826b 7945
ba479fd2
NN
7946int
7947main ()
7948{
86cf1cbd
KG
7949#ifndef $ac_func
7950char *(*pfn) = (char *(*)) $ac_func ;
7951#endif
ba479fd2
NN
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7958 (eval $ac_compile) 2>&5
7959 ac_status=$?
7960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7961 (exit $ac_status); } &&
7962 { ac_try='test -s conftest.$ac_objext'
7963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7964 (eval $ac_try) 2>&5
7965 ac_status=$?
7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); }; }; then
f31e826b 7968 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7969else
ba479fd2
NN
7970 echo "$as_me: failed program was:" >&5
7971sed 's/^/| /' conftest.$ac_ext >&5
7972
7973eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7974fi
ba479fd2 7975rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7976fi
7977
f31e826b 7978if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7979 echo "$as_me:$LINENO: result: yes" >&5
7980echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7981#define $ac_tr_decl 1
ba479fd2
NN
7982_ACEOF
7983
81bf3d9e 7984else
ba479fd2
NN
7985 echo "$as_me:$LINENO: result: no" >&5
7986echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7987#define $ac_tr_decl 0
ba479fd2
NN
7988_ACEOF
7989
81bf3d9e
RH
7990fi
7991
7992done
86cf1cbd 7993if test x = y ; then
ba479fd2
NN
7994
7995cat >>confdefs.h <<\_ACEOF
f31e826b 7996#define HAVE_DECL_GETRLIMIT 1
ba479fd2
NN
7997_ACEOF
7998
7999cat >>confdefs.h <<\_ACEOF
f31e826b 8000#define HAVE_DECL_SETRLIMIT 1
ba479fd2
NN
8001_ACEOF
8002
8003cat >>confdefs.h <<\_ACEOF
f31e826b 8004#define HAVE_DECL_GETRUSAGE 1
ba479fd2 8005_ACEOF
86cf1cbd
KG
8006fi
8007
81bf3d9e 8008
ba479fd2
NN
8009cat >conftest.$ac_ext <<_ACEOF
8010#line $LINENO "configure"
8011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
b2522d2b
HPN
8016
8017#include "ansidecl.h"
8018#include "system.h"
8019#ifdef HAVE_SYS_RESOURCE_H
8020#include <sys/resource.h>
8021#endif
8022
ba479fd2
NN
8023int
8024main ()
8025{
b2522d2b 8026rlim_t l = 0;
ba479fd2
NN
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031rm -f conftest.$ac_objext
8032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8033 (eval $ac_compile) 2>&5
8034 ac_status=$?
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); } &&
8037 { ac_try='test -s conftest.$ac_objext'
8038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8039 (eval $ac_try) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
b2522d2b
HPN
8043 :
8044else
ba479fd2
NN
8045 echo "$as_me: failed program was:" >&5
8046sed 's/^/| /' conftest.$ac_ext >&5
8047
8048
8049cat >>confdefs.h <<\_ACEOF
b2522d2b 8050#define rlim_t long
ba479fd2 8051_ACEOF
b2522d2b
HPN
8052
8053fi
ba479fd2 8054rm -f conftest.$ac_objext conftest.$ac_ext
b2522d2b 8055
351df804 8056for ac_func in ldgetname
c1800ec8
ZW
8057do
8058 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8059echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8060echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8061if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8062 echo $ECHO_N "(cached) $ECHO_C" >&6
8063else
8064 cat >conftest.$ac_ext <<_ACEOF
8065#line $LINENO "configure"
8066/* confdefs.h. */
8067_ACEOF
8068cat confdefs.h >>conftest.$ac_ext
8069cat >>conftest.$ac_ext <<_ACEOF
8070/* end confdefs.h. */
c1800ec8
ZW
8071#undef $ac_tr_decl
8072#define $ac_tr_decl 1
ba479fd2 8073
351df804
KG
8074#include "ansidecl.h"
8075#include "system.h"
8076#ifdef HAVE_LDFCN_H
8077#include <ldfcn.h>
8078#endif
8079
8080
ba479fd2
NN
8081int
8082main ()
8083{
351df804
KG
8084#ifndef $ac_func
8085char *(*pfn) = (char *(*)) $ac_func ;
8086#endif
ba479fd2
NN
8087 ;
8088 return 0;
8089}
8090_ACEOF
8091rm -f conftest.$ac_objext
8092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8093 (eval $ac_compile) 2>&5
8094 ac_status=$?
8095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8096 (exit $ac_status); } &&
8097 { ac_try='test -s conftest.$ac_objext'
8098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8099 (eval $ac_try) 2>&5
8100 ac_status=$?
8101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8102 (exit $ac_status); }; }; then
351df804
KG
8103 eval "gcc_cv_have_decl_$ac_func=yes"
8104else
ba479fd2
NN
8105 echo "$as_me: failed program was:" >&5
8106sed 's/^/| /' conftest.$ac_ext >&5
8107
8108eval "gcc_cv_have_decl_$ac_func=no"
351df804 8109fi
ba479fd2 8110rm -f conftest.$ac_objext conftest.$ac_ext
351df804
KG
8111fi
8112
8113if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8114 echo "$as_me:$LINENO: result: yes" >&5
8115echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8116#define $ac_tr_decl 1
ba479fd2
NN
8117_ACEOF
8118
351df804 8119else
ba479fd2
NN
8120 echo "$as_me:$LINENO: result: no" >&5
8121echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8122#define $ac_tr_decl 0
ba479fd2
NN
8123_ACEOF
8124
351df804
KG
8125fi
8126
8127done
8128if test x = y ; then
ba479fd2
NN
8129
8130cat >>confdefs.h <<\_ACEOF
351df804 8131#define HAVE_DECL_LDGETNAME 1
ba479fd2 8132_ACEOF
351df804
KG
8133fi
8134
8135
8136for ac_func in times
8137do
8138 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8139echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8140echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8141if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8142 echo $ECHO_N "(cached) $ECHO_C" >&6
8143else
8144 cat >conftest.$ac_ext <<_ACEOF
8145#line $LINENO "configure"
8146/* confdefs.h. */
8147_ACEOF
8148cat confdefs.h >>conftest.$ac_ext
8149cat >>conftest.$ac_ext <<_ACEOF
8150/* end confdefs.h. */
351df804
KG
8151#undef $ac_tr_decl
8152#define $ac_tr_decl 1
ba479fd2 8153
c1800ec8
ZW
8154#include "ansidecl.h"
8155#include "system.h"
8156#ifdef HAVE_SYS_TIMES_H
8157#include <sys/times.h>
8158#endif
8159
8160
ba479fd2
NN
8161int
8162main ()
8163{
c1800ec8
ZW
8164#ifndef $ac_func
8165char *(*pfn) = (char *(*)) $ac_func ;
8166#endif
ba479fd2
NN
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
8172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8173 (eval $ac_compile) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest.$ac_objext'
8178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
c1800ec8
ZW
8183 eval "gcc_cv_have_decl_$ac_func=yes"
8184else
ba479fd2
NN
8185 echo "$as_me: failed program was:" >&5
8186sed 's/^/| /' conftest.$ac_ext >&5
8187
8188eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 8189fi
ba479fd2 8190rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
8191fi
8192
8193if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8194 echo "$as_me:$LINENO: result: yes" >&5
8195echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8196#define $ac_tr_decl 1
ba479fd2
NN
8197_ACEOF
8198
c1800ec8 8199else
ba479fd2
NN
8200 echo "$as_me:$LINENO: result: no" >&5
8201echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8202#define $ac_tr_decl 0
ba479fd2
NN
8203_ACEOF
8204
c1800ec8
ZW
8205fi
8206
8207done
8208if test x = y ; then
ba479fd2
NN
8209
8210cat >>confdefs.h <<\_ACEOF
c1800ec8 8211#define HAVE_DECL_TIMES 1
ba479fd2 8212_ACEOF
c1800ec8
ZW
8213fi
8214
8215
8216# More time-related stuff.
ba479fd2
NN
8217echo "$as_me:$LINENO: checking for struct tms" >&5
8218echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
8219if test "${ac_cv_struct_tms+set}" = set; then
8220 echo $ECHO_N "(cached) $ECHO_C" >&6
8221else
8222
8223cat >conftest.$ac_ext <<_ACEOF
8224#line $LINENO "configure"
8225/* confdefs.h. */
8226_ACEOF
8227cat confdefs.h >>conftest.$ac_ext
8228cat >>conftest.$ac_ext <<_ACEOF
8229/* end confdefs.h. */
c1800ec8
ZW
8230
8231#include "ansidecl.h"
8232#include "system.h"
8233#ifdef HAVE_SYS_TIMES_H
8234#include <sys/times.h>
8235#endif
8236
ba479fd2
NN
8237int
8238main ()
8239{
c1800ec8 8240struct tms tms;
ba479fd2
NN
8241 ;
8242 return 0;
8243}
8244_ACEOF
8245rm -f conftest.$ac_objext
8246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8247 (eval $ac_compile) 2>&5
8248 ac_status=$?
8249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250 (exit $ac_status); } &&
8251 { ac_try='test -s conftest.$ac_objext'
8252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8253 (eval $ac_try) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); }; }; then
c1800ec8
ZW
8257 ac_cv_struct_tms=yes
8258else
ba479fd2
NN
8259 echo "$as_me: failed program was:" >&5
8260sed 's/^/| /' conftest.$ac_ext >&5
8261
8262ac_cv_struct_tms=no
c1800ec8 8263fi
ba479fd2 8264rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8265fi
ba479fd2
NN
8266echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
8267echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 8268if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
8269
8270cat >>confdefs.h <<\_ACEOF
c1800ec8 8271#define HAVE_STRUCT_TMS 1
ba479fd2 8272_ACEOF
c1800ec8
ZW
8273
8274fi
8275
8276# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
8277# revisit after autoconf 2.50.
ba479fd2
NN
8278echo "$as_me:$LINENO: checking for clock_t" >&5
8279echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
8280if test "${gcc_cv_type_clock_t+set}" = set; then
8281 echo $ECHO_N "(cached) $ECHO_C" >&6
8282else
8283
8284cat >conftest.$ac_ext <<_ACEOF
8285#line $LINENO "configure"
8286/* confdefs.h. */
8287_ACEOF
8288cat confdefs.h >>conftest.$ac_ext
8289cat >>conftest.$ac_ext <<_ACEOF
8290/* end confdefs.h. */
c1800ec8
ZW
8291
8292#include "ansidecl.h"
8293#include "system.h"
8294
ba479fd2
NN
8295int
8296main ()
8297{
c1800ec8 8298clock_t x;
ba479fd2
NN
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303rm -f conftest.$ac_objext
8304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8305 (eval $ac_compile) 2>&5
8306 ac_status=$?
8307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308 (exit $ac_status); } &&
8309 { ac_try='test -s conftest.$ac_objext'
8310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8311 (eval $ac_try) 2>&5
8312 ac_status=$?
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); }; }; then
c1800ec8
ZW
8315 gcc_cv_type_clock_t=yes
8316else
ba479fd2
NN
8317 echo "$as_me: failed program was:" >&5
8318sed 's/^/| /' conftest.$ac_ext >&5
8319
8320gcc_cv_type_clock_t=no
c1800ec8 8321fi
ba479fd2 8322rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8323fi
ba479fd2
NN
8324echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
8325echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 8326if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
8327
8328cat >>confdefs.h <<\_ACEOF
c1800ec8 8329#define HAVE_CLOCK_T 1
ba479fd2 8330_ACEOF
c1800ec8
ZW
8331
8332fi
8333
ba479fd2
NN
8334echo "$as_me:$LINENO: checking for uchar" >&5
8335echo $ECHO_N "checking for uchar... $ECHO_C" >&6
8336if test "${gcc_cv_type_uchar+set}" = set; then
8337 echo $ECHO_N "(cached) $ECHO_C" >&6
a12b5bd9 8338else
ba479fd2
NN
8339 cat >conftest.$ac_ext <<_ACEOF
8340#line $LINENO "configure"
8341/* confdefs.h. */
8342_ACEOF
8343cat confdefs.h >>conftest.$ac_ext
8344cat >>conftest.$ac_ext <<_ACEOF
8345/* end confdefs.h. */
a12b5bd9
ZW
8346
8347#include "ansidecl.h"
8348#include "system.h"
8349
ba479fd2
NN
8350int
8351main ()
8352{
a12b5bd9
ZW
8353if ((uchar *)0) return 0;
8354 if (sizeof(uchar)) return 0;
ba479fd2
NN
8355 ;
8356 return 0;
8357}
8358_ACEOF
8359rm -f conftest.$ac_objext
8360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8361 (eval $ac_compile) 2>&5
8362 ac_status=$?
8363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8364 (exit $ac_status); } &&
8365 { ac_try='test -s conftest.$ac_objext'
8366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8367 (eval $ac_try) 2>&5
8368 ac_status=$?
8369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8370 (exit $ac_status); }; }; then
a12b5bd9
ZW
8371 ac_cv_type_uchar=yes
8372else
ba479fd2
NN
8373 echo "$as_me: failed program was:" >&5
8374sed 's/^/| /' conftest.$ac_ext >&5
8375
8376ac_cv_type_uchar=no
a12b5bd9 8377fi
ba479fd2 8378rm -f conftest.$ac_objext conftest.$ac_ext
a12b5bd9 8379fi
ba479fd2
NN
8380echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5
8381echo "${ECHO_T}$gcc_cv_type_uchar" >&6
63cf211a 8382if test $ac_cv_type_uchar = yes; then
ba479fd2
NN
8383
8384cat >>confdefs.h <<\_ACEOF
a12b5bd9 8385#define HAVE_UCHAR 1
ba479fd2 8386_ACEOF
a12b5bd9
ZW
8387
8388fi
8389
eb70d86d
AS
8390# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
8391CFLAGS="$saved_CFLAGS"
8392
07cf4226
DM
8393# Check whether --enable-initfini-array or --disable-initfini-array was given.
8394if test "${enable_initfini_array+set}" = set; then
8395 enableval="$enable_initfini_array"
ba479fd2 8396
07cf4226 8397else
ba479fd2
NN
8398
8399echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
8400echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
8401if test "${gcc_cv_initfini_array+set}" = set; then
8402 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 8403else
eb70d86d 8404 if test "$cross_compiling" = yes; then
918c4fe4 8405 gcc_cv_initfini_array=no
eb70d86d 8406else
ba479fd2
NN
8407 cat >conftest.$ac_ext <<_ACEOF
8408#line $LINENO "configure"
8409/* confdefs.h. */
8410_ACEOF
8411cat confdefs.h >>conftest.$ac_ext
8412cat >>conftest.$ac_ext <<_ACEOF
8413/* end confdefs.h. */
eb70d86d 8414
07cf4226
DM
8415static int x = -1;
8416int main (void) { return x; }
8417int foo (void) { x = 0; }
8418int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
8419_ACEOF
8420rm -f conftest$ac_exeext
8421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8422 (eval $ac_link) 2>&5
8423 ac_status=$?
8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8427 (eval $ac_try) 2>&5
8428 ac_status=$?
8429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); }; }; then
918c4fe4 8431 gcc_cv_initfini_array=yes
eb70d86d 8432else
ba479fd2
NN
8433 echo "$as_me: program exited with status $ac_status" >&5
8434echo "$as_me: failed program was:" >&5
8435sed 's/^/| /' conftest.$ac_ext >&5
8436
8437( exit $ac_status )
8438gcc_cv_initfini_array=no
eb70d86d 8439fi
a6a5e4c9 8440rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 8441fi
07cf4226 8442fi
ba479fd2
NN
8443echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
8444echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 8445 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 8446
ba479fd2 8447fi;
63cf211a 8448if test $enable_initfini_array = yes; then
ba479fd2
NN
8449
8450cat >>confdefs.h <<\_ACEOF
eb70d86d 8451#define HAVE_INITFINI_ARRAY 1
ba479fd2 8452_ACEOF
07cf4226 8453
eb70d86d 8454fi
81bf3d9e 8455
ba479fd2
NN
8456# mkdir takes a single argument on some systems.
8457echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
8458echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
8459if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
8460 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 8461else
ba479fd2
NN
8462 cat >conftest.$ac_ext <<_ACEOF
8463#line $LINENO "configure"
8464/* confdefs.h. */
8465_ACEOF
8466cat confdefs.h >>conftest.$ac_ext
8467cat >>conftest.$ac_ext <<_ACEOF
8468/* end confdefs.h. */
75923b2f
MK
8469
8470#include <sys/types.h>
8471#ifdef HAVE_SYS_STAT_H
8472# include <sys/stat.h>
8473#endif
8474#ifdef HAVE_UNISTD_H
8475# include <unistd.h>
8476#endif
8477#ifdef HAVE_DIRECT_H
8478# include <direct.h>
8479#endif
ba479fd2
NN
8480int
8481main ()
8482{
75923b2f 8483mkdir ("foo", 0);
ba479fd2
NN
8484 ;
8485 return 0;
8486}
8487_ACEOF
8488rm -f conftest.$ac_objext
8489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8490 (eval $ac_compile) 2>&5
8491 ac_status=$?
8492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8493 (exit $ac_status); } &&
8494 { ac_try='test -s conftest.$ac_objext'
8495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8496 (eval $ac_try) 2>&5
8497 ac_status=$?
8498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8499 (exit $ac_status); }; }; then
75923b2f
MK
8500 gcc_cv_mkdir_takes_one_arg=no
8501else
ba479fd2
NN
8502 echo "$as_me: failed program was:" >&5
8503sed 's/^/| /' conftest.$ac_ext >&5
8504
8505gcc_cv_mkdir_takes_one_arg=yes
75923b2f 8506fi
ba479fd2 8507rm -f conftest.$ac_objext conftest.$ac_ext
75923b2f 8508fi
ba479fd2
NN
8509echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
8510echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 8511if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
8512
8513cat >>confdefs.h <<\_ACEOF
75923b2f 8514#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 8515_ACEOF
75923b2f
MK
8516
8517fi
8518
8519
861bb6c1
JL
8520# File extensions
8521manext='.1'
8522objext='.o'
8523
8524
8525
4977bab6
ZW
8526# With Setjmp/Longjmp based exception handling.
8527# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8528if test "${enable_sjlj_exceptions+set}" = set; then
8529 enableval="$enable_sjlj_exceptions"
8530 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 8531
ba479fd2
NN
8532cat >>confdefs.h <<_ACEOF
8533#define CONFIG_SJLJ_EXCEPTIONS $sjlj
8534_ACEOF
4977bab6 8535
ba479fd2 8536fi;
4977bab6 8537
c6c51600 8538if test x$host = x$target; then
ba479fd2
NN
8539 echo "$as_me:$LINENO: checking for main in -lunwind" >&5
8540echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
8541if test "${ac_cv_lib_unwind_main+set}" = set; then
8542 echo $ECHO_N "(cached) $ECHO_C" >&6
4977bab6 8543else
ba479fd2 8544 ac_check_lib_save_LIBS=$LIBS
4977bab6 8545LIBS="-lunwind $LIBS"
ba479fd2
NN
8546cat >conftest.$ac_ext <<_ACEOF
8547#line $LINENO "configure"
8548/* confdefs.h. */
8549_ACEOF
8550cat confdefs.h >>conftest.$ac_ext
8551cat >>conftest.$ac_ext <<_ACEOF
8552/* end confdefs.h. */
4977bab6 8553
4977bab6 8554
ba479fd2
NN
8555int
8556main ()
8557{
8558main ();
8559 ;
8560 return 0;
8561}
8562_ACEOF
8563rm -f conftest.$ac_objext conftest$ac_exeext
8564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8565 (eval $ac_link) 2>&5
8566 ac_status=$?
8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8568 (exit $ac_status); } &&
8569 { ac_try='test -s conftest$ac_exeext'
8570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8571 (eval $ac_try) 2>&5
8572 ac_status=$?
8573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8574 (exit $ac_status); }; }; then
8575 ac_cv_lib_unwind_main=yes
8576else
8577 echo "$as_me: failed program was:" >&5
8578sed 's/^/| /' conftest.$ac_ext >&5
8579
8580ac_cv_lib_unwind_main=no
8581fi
8582rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8583LIBS=$ac_check_lib_save_LIBS
8584fi
8585echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
8586echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
8587if test $ac_cv_lib_unwind_main = yes; then
4977bab6
ZW
8588 use_libunwind_default=yes
8589else
ba479fd2 8590 use_libunwind_default=no
4977bab6
ZW
8591fi
8592
c6c51600
AS
8593else
8594 use_libunwind_default=no
8595fi
4977bab6
ZW
8596# Use libunwind based exception handling.
8597# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8598if test "${enable_libunwind_exceptions+set}" = set; then
8599 enableval="$enable_libunwind_exceptions"
8600 use_libunwind_exceptions=$enableval
8601else
8602 use_libunwind_exceptions=$use_libunwind_default
ba479fd2 8603fi;
63cf211a 8604if test x"$use_libunwind_exceptions" = xyes; then
ba479fd2
NN
8605
8606cat >>confdefs.h <<\_ACEOF
4977bab6 8607#define USE_LIBUNWIND_EXCEPTIONS 1
ba479fd2 8608_ACEOF
4977bab6
ZW
8609
8610fi
8611
34a86c2b
NN
8612# --------------------------------------------------------
8613# Build, host, and target specific configuration fragments
8614# --------------------------------------------------------
8615
5b28c537
NN
8616# Collect build-machine-specific information.
8617. ${srcdir}/config.build
8618
a89ea0df
NN
8619# Collect host-machine-specific information.
8620. ${srcdir}/config.host
8621
ef69da62 8622target_gtfiles=
a89ea0df
NN
8623
8624# Collect target-machine-specific information.
8ad9fb33 8625. ${srcdir}/config.gcc
861bb6c1
JL
8626
8627extra_objs="${host_extra_objs} ${extra_objs}"
8628
8629# Default the target-machine variables that were not explicitly set.
75bffa71 8630if test x"$tm_file" = x
861bb6c1
JL
8631then tm_file=$cpu_type/$cpu_type.h; fi
8632
6b2adea9 8633if test x"$extra_headers" = x
861bb6c1
JL
8634then extra_headers=; fi
8635
75bffa71 8636if test x$md_file = x
e98e406f 8637then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 8638
75bffa71 8639if test x$out_file = x
861bb6c1
JL
8640then out_file=$cpu_type/$cpu_type.c; fi
8641
75bffa71 8642if test x"$tmake_file" = x
861bb6c1
JL
8643then tmake_file=$cpu_type/t-$cpu_type
8644fi
8645
90e6a802 8646if test x"$dwarf2" = xyes
756ee602 8647then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
8648fi
8649
861bb6c1 8650# Say what files are being used for the output code and MD file.
11642c3a 8651echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
8652echo "Using \`$srcdir/config/$md_file' as machine description file."
8653
11642c3a 8654# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
8655# about them and drop them.
8656
11642c3a
ZW
8657bx=
8658for x in $build_xm_file; do
8659 if test -f $srcdir/config/$x
8660 then bx="$bx $x"
ba479fd2
NN
8661 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8662echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8663 fi
8664done
8665build_xm_file="$bx"
8666
8667hx=
8668for x in $host_xm_file; do
8669 if test -f $srcdir/config/$x
8670 then hx="$hx $x"
ba479fd2
NN
8671 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8672echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8673 fi
8674done
8675host_xm_file="$hx"
8676
8677tx=
8678for x in $xm_file; do
8679 if test -f $srcdir/config/$x
8680 then tx="$tx $x"
ba479fd2
NN
8681 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8682echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8683 fi
8684done
8685xm_file="$tx"
8686
861bb6c1
JL
8687count=a
8688for f in $tm_file; do
8689 count=${count}x
8690done
75bffa71 8691if test $count = ax; then
861bb6c1
JL
8692 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
8693else
8694 echo "Using the following target machine macro files:"
8695 for f in $tm_file; do
8696 echo " $srcdir/config/$f"
8697 done
8698fi
8699
4977bab6 8700if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
8701
8702cat >>confdefs.h <<\_ACEOF
4977bab6 8703#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 8704_ACEOF
4977bab6
ZW
8705
8706fi
8707
861bb6c1
JL
8708count=a
8709for f in $host_xm_file; do
8710 count=${count}x
8711done
11642c3a
ZW
8712if test $count = a; then
8713 :
8714elif test $count = ax; then
861bb6c1
JL
8715 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
8716else
8717 echo "Using the following host machine macro files:"
8718 for f in $host_xm_file; do
8719 echo " $srcdir/config/$f"
8720 done
8721fi
476d9098 8722echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 8723
75bffa71 8724if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
8725 count=a
8726 for f in $build_xm_file; do
8727 count=${count}x
8728 done
11642c3a
ZW
8729 if test $count = a; then
8730 :
8731 elif test $count = ax; then
861bb6c1
JL
8732 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
8733 else
8734 echo "Using the following build machine macro files:"
8735 for f in $build_xm_file; do
8736 echo " $srcdir/config/$f"
8737 done
8738 fi
8739fi
8740
c2e494a8
NN
8741# Check if a valid thread package
8742case ${enable_threads_flag} in
8743 "" | no)
8744 # No threads
8745 target_thread_file='single'
8746 ;;
8747 yes)
8748 # default
8749 target_thread_file='single'
8750 ;;
769e49eb
NN
8751 aix | dce | gnat | irix | posix | rtems | \
8752 single | solaris | vxworks | win32 )
c2e494a8
NN
8753 target_thread_file=${enable_threads_flag}
8754 ;;
8755 *)
8756 echo "${enable_threads_flag} is an unknown thread package" 1>&2
8757 exit 1
8758 ;;
8759esac
8760
8761if test x${thread_file} = x; then
8762 # No thread file set by target-specific clauses in config.gcc,
8763 # so use file chosen by default logic above
8764 thread_file=${target_thread_file}
861bb6c1
JL
8765fi
8766
2121a768
JT
8767if test x$enable___cxa_atexit = xyes || \
8768 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
ba479fd2
NN
8769
8770cat >>confdefs.h <<\_ACEOF
2121a768 8771#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 8772_ACEOF
2121a768
JT
8773
8774fi
8775
a5381466 8776# Look for a file containing extra machine modes.
1c0ca89d
ZW
8777if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
8778 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
8779
8780
8781cat >>confdefs.h <<_ACEOF
e22340b0 8782#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 8783_ACEOF
a5381466
ZW
8784
8785fi
8786
b7cb92ad 8787# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 8788# the first file included by config.h.
4977bab6 8789# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 8790# as well. If host!=build, we are in error and need to do more
db81d74a 8791# work to find out the build config parameters.
75bffa71 8792if test x$host = x$build
db81d74a 8793then
eaf4e618 8794 build_auto=auto-host.h
06f0b04c 8795 FORBUILD=..
b7cb92ad
JL
8796else
8797 # We create a subdir, then run autoconf in the subdir.
8798 # To prevent recursion we set host and build for the new
8799 # invocation of configure to the build for this invocation
ba479fd2 8800 # of configure.
b7cb92ad
JL
8801 tempdir=build.$$
8802 rm -rf $tempdir
8803 mkdir $tempdir
8804 cd $tempdir
8805 case ${srcdir} in
255b8a49 8806 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
8807 *) realsrcdir=../${srcdir};;
8808 esac
d920e825
L
8809 saved_CFLAGS="${CFLAGS}"
8810 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
8811 ${realsrcdir}/configure \
534d0cc0 8812 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 8813 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
8814
8815 # We just finished tests for the build machine, so rename
8816 # the file auto-build.h in the gcc directory.
8817 mv auto-host.h ../auto-build.h
8818 cd ..
8819 rm -rf $tempdir
eaf4e618 8820 build_auto=auto-build.h
3b1b059c 8821 FORBUILD=../${build_subdir}
db81d74a
RH
8822fi
8823
06f0b04c 8824
eaf4e618 8825tm_file="${tm_file} defaults.h"
4977bab6
ZW
8826tm_p_file="${tm_p_file} tm-preds.h"
8827host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
8828build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 8829# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
8830# put this back in temporarily.
8831xm_file="ansidecl.h ${xm_file}"
0056a9b5 8832
34a86c2b
NN
8833# --------
8834# UNSORTED
8835# --------
8836
f1943b77 8837# Get the version trigger filename from the toplevel
75bffa71 8838if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
8839 gcc_version_trigger=$with_gcc_version_trigger
8840else
8841 gcc_version_trigger=${srcdir}/version.c
8842fi
022dae81 8843gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 8844gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 8845
cc1e60ea 8846# Compile in configure arguments.
8105825d 8847if test -f configargs.h ; then
cc1e60ea 8848 # Being re-configured.
022dae81 8849 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
8850 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
8851else
8852 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
8853fi
eeae7b41
DJ
8854
8855# Double all backslashes and backslash all quotes to turn
8856# gcc_config_arguments into a C string.
8857sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
8858$gcc_config_arguments
8859EOF
8860gcc_config_arguments_str=`cat conftest.out`
8861rm -f conftest.out
8862
cc1e60ea
JM
8863cat > configargs.h <<EOF
8864/* Generated automatically. */
eeae7b41 8865static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 8866static const char thread_model[] = "$thread_file";
7816bea0
DJ
8867
8868static const struct {
8869 const char *name, *value;
8870} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
8871EOF
8872
ab87f8c8
JL
8873# Internationalization
8874PACKAGE=gcc
8875VERSION="$gcc_version"
861bb6c1 8876
ab87f8c8
JL
8877
8878
56694dd9
ZW
8879# If we haven't got the data from the intl directory,
8880# assume NLS is disabled.
ba479fd2
NN
8881USE_NLS=no
8882LIBINTL=
8883LIBINTL_DEP=
8884INCINTL=
8885XGETTEXT=
8886GMSGFMT=
8887POSUB=
56694dd9
ZW
8888if test -f ../intl/config.intl; then
8889 . ../intl/config.intl
093e61a6 8890fi
ba479fd2
NN
8891echo "$as_me:$LINENO: checking whether NLS is requested" >&5
8892echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 8893if test x"$USE_NLS" != xyes; then
ba479fd2
NN
8894 echo "$as_me:$LINENO: result: no" >&5
8895echo "${ECHO_T}no" >&6
56694dd9 8896else
ba479fd2
NN
8897 echo "$as_me:$LINENO: result: yes" >&5
8898echo "${ECHO_T}yes" >&6
8899
8900cat >>confdefs.h <<\_ACEOF
56694dd9 8901#define ENABLE_NLS 1
ba479fd2 8902_ACEOF
56694dd9 8903
093e61a6 8904
ba479fd2
NN
8905 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8906echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 8907 # Look for .po and .gmo files in the source directory.
ba479fd2 8908 CATALOGS=
56694dd9
ZW
8909 XLINGUAS=
8910 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
8911 # If there aren't any .gmo files the shell will give us the
8912 # literal string "../path/to/srcdir/po/*.gmo" which has to be
8913 # weeded out.
8914 case "$cat" in *\**)
8915 continue;;
8916 esac
8917 # The quadruple backslash is collapsed to a double backslash
8918 # by the backticks, then collapsed again by the double quotes,
8919 # leaving us with one backslash in the sed expression (right
8920 # before the dot that mustn't act as a wildcard).
8921 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
8922 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
8923 # The user is allowed to set LINGUAS to a list of languages to
8924 # install catalogs for. If it's empty that means "all of them."
8925 if test "x$LINGUAS" = x; then
8926 CATALOGS="$CATALOGS $cat"
8927 XLINGUAS="$XLINGUAS $lang"
8928 else
8929 case "$LINGUAS" in *$lang*)
8930 CATALOGS="$CATALOGS $cat"
8931 XLINGUAS="$XLINGUAS $lang"
8932 ;;
8933 esac
8934 fi
8935 done
8936 LINGUAS="$XLINGUAS"
ba479fd2
NN
8937 echo "$as_me:$LINENO: result: $LINGUAS" >&5
8938echo "${ECHO_T}$LINGUAS" >&6
56694dd9 8939fi
861bb6c1 8940
56694dd9
ZW
8941# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
8942# -liconv on the link line twice.
8943case "$LIBINTL" in *$LIBICONV*)
8944 LIBICONV= ;;
8945esac
dc6746e7 8946
56694dd9
ZW
8947# Windows32 Registry support for specifying GCC installation paths.
8948# Check whether --enable-win32-registry or --disable-win32-registry was given.
8949if test "${enable_win32_registry+set}" = set; then
8950 enableval="$enable_win32_registry"
dc6746e7 8951
ba479fd2 8952fi;
56694dd9
ZW
8953case $host_os in
8954 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
8955echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
8956echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 8957if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
8958
8959cat >>confdefs.h <<\_ACEOF
56694dd9 8960#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
8961_ACEOF
8962
8963 echo "$as_me:$LINENO: result: yes" >&5
8964echo "${ECHO_T}yes" >&6
8965 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
8966echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
8967if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
8968 echo $ECHO_N "(cached) $ECHO_C" >&6
8969else
8970 ac_func_search_save_LIBS=$LIBS
8971ac_cv_search_RegOpenKeyExA=no
8972cat >conftest.$ac_ext <<_ACEOF
8973#line $LINENO "configure"
8974/* confdefs.h. */
8975_ACEOF
8976cat confdefs.h >>conftest.$ac_ext
8977cat >>conftest.$ac_ext <<_ACEOF
8978/* end confdefs.h. */
861bb6c1 8979
ab87f8c8 8980/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8981#ifdef __cplusplus
8982extern "C"
8983#endif
ab87f8c8 8984/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8985 builtin and then its argument prototype would still apply. */
8986char RegOpenKeyExA ();
8987int
8988main ()
8989{
8990RegOpenKeyExA ();
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext conftest$ac_exeext
8996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8997 (eval $ac_link) 2>&5
8998 ac_status=$?
8999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9000 (exit $ac_status); } &&
9001 { ac_try='test -s conftest$ac_exeext'
9002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9003 (eval $ac_try) 2>&5
9004 ac_status=$?
9005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9006 (exit $ac_status); }; }; then
56694dd9 9007 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 9008else
ba479fd2
NN
9009 echo "$as_me: failed program was:" >&5
9010sed 's/^/| /' conftest.$ac_ext >&5
9011
861bb6c1 9012fi
ba479fd2
NN
9013rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9014if test "$ac_cv_search_RegOpenKeyExA" = no; then
9015 for ac_lib in advapi32; do
9016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9017 cat >conftest.$ac_ext <<_ACEOF
9018#line $LINENO "configure"
9019/* confdefs.h. */
9020_ACEOF
9021cat confdefs.h >>conftest.$ac_ext
9022cat >>conftest.$ac_ext <<_ACEOF
9023/* end confdefs.h. */
9024
56694dd9 9025/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9026#ifdef __cplusplus
9027extern "C"
9028#endif
56694dd9 9029/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9030 builtin and then its argument prototype would still apply. */
9031char RegOpenKeyExA ();
9032int
9033main ()
9034{
9035RegOpenKeyExA ();
9036 ;
9037 return 0;
9038}
9039_ACEOF
9040rm -f conftest.$ac_objext conftest$ac_exeext
9041if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9042 (eval $ac_link) 2>&5
9043 ac_status=$?
9044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045 (exit $ac_status); } &&
9046 { ac_try='test -s conftest$ac_exeext'
9047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9048 (eval $ac_try) 2>&5
9049 ac_status=$?
9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); }; }; then
9052 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 9053break
861bb6c1 9054else
ba479fd2
NN
9055 echo "$as_me: failed program was:" >&5
9056sed 's/^/| /' conftest.$ac_ext >&5
9057
861bb6c1 9058fi
ba479fd2
NN
9059rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9060 done
6e3f3080 9061fi
ba479fd2
NN
9062LIBS=$ac_func_search_save_LIBS
9063fi
9064echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
9065echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
9066if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 9067 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 9068
ab87f8c8 9069fi
ba479fd2 9070
cafe096b 9071else
ba479fd2
NN
9072 echo "$as_me:$LINENO: result: no" >&5
9073echo "${ECHO_T}no" >&6
093e61a6 9074fi
ab87f8c8 9075
56694dd9
ZW
9076# Check if user specified a different registry key.
9077case "x${enable_win32_registry}" in
9078x | xyes)
9079 # default.
9080 gcc_cv_win32_registry_key="$VERSION"
9081 ;;
9082xno)
9083 # no registry lookup.
9084 gcc_cv_win32_registry_key=''
9085 ;;
9086*)
9087 # user-specified key.
9088 gcc_cv_win32_registry_key="$enable_win32_registry"
9089 ;;
9090esac
ab87f8c8 9091
56694dd9 9092if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9093 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
9094echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
9095
9096cat >>confdefs.h <<_ACEOF
56694dd9 9097#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 9098_ACEOF
cafe096b 9099
ba479fd2
NN
9100 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
9101echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 9102fi
56694dd9
ZW
9103;;
9104esac
ab87f8c8 9105
56694dd9
ZW
9106# Get an absolute path to the GCC top-level source directory
9107holddir=`${PWDCMD-pwd}`
9108cd $srcdir
9109topdir=`${PWDCMD-pwd}`
9110cd $holddir
ab87f8c8 9111
56694dd9 9112# Conditionalize the makefile for this host machine.
2ed26f6b 9113xmake_file=
c406e779 9114for f in ${host_xmake_file}
56694dd9
ZW
9115do
9116 if test -f ${srcdir}/config/$f
9117 then
2ed26f6b 9118 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
9119 fi
9120done
093e61a6 9121
56694dd9 9122# Conditionalize the makefile for this target machine.
2ed26f6b 9123tmake_file_=
c406e779 9124for f in ${tmake_file}
56694dd9
ZW
9125do
9126 if test -f ${srcdir}/config/$f
9127 then
2ed26f6b 9128 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
9129 fi
9130done
2ed26f6b 9131tmake_file="${tmake_file_}"
71a94577 9132
56694dd9 9133symbolic_link='ln -s'
34a86c2b 9134
ab87f8c8
JL
9135# If the host doesn't support symlinks, modify CC in
9136# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
9137# Otherwise, we can use "CC=$(CC)".
9138rm -f symtest.tem
9139if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
9140then
9141 cc_set_by_configure="\$(CC)"
5aa82ace 9142 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8 9143 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
596151e1 9144 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
ab87f8c8
JL
9145else
9146 rm -f symtest.tem
9147 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
9148 then
9149 symbolic_link="cp -p"
9150 else
9151 symbolic_link="cp"
9152 fi
9153 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 9154 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8 9155 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
596151e1 9156 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
9157fi
9158rm -f symtest.tem
9159
9160out_object_file=`basename $out_file .c`.o
9161
9162tm_file_list=
e22340b0 9163tm_include_list=
ab87f8c8 9164for f in $tm_file; do
64ccbc99 9165 case $f in
d02af173 9166 defaults.h )
e22340b0
ZW
9167 tm_file_list="${tm_file_list} \$(srcdir)/$f"
9168 tm_include_list="${tm_include_list} $f"
9169 ;;
9170 * )
9171 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
9172 tm_include_list="${tm_include_list} config/$f"
9173 ;;
64ccbc99 9174 esac
ab87f8c8
JL
9175done
9176
11642c3a 9177tm_p_file_list=
e22340b0 9178tm_p_include_list=
11642c3a 9179for f in $tm_p_file; do
4977bab6
ZW
9180 case $f in
9181 tm-preds.h )
e22340b0
ZW
9182 tm_p_file_list="${tm_p_file_list} $f"
9183 tm_p_include_list="${tm_p_include_list} $f"
9184 ;;
9185 * )
9186 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
9187 tm_p_include_list="${tm_p_include_list} config/$f"
9188 esac
9189done
9190
9191xm_file_list=
9192xm_include_list=
9193for f in $xm_file; do
9194 case $f in
9195 ansidecl.h )
9196 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
9197 xm_include_list="${xm_include_list} $f"
9198 ;;
9199 auto-host.h )
9200 xm_file_list="${xm_file_list} $f"
9201 xm_include_list="${xm_include_list} $f"
9202 ;;
9203 * )
9204 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
9205 xm_include_list="${xm_include_list} config/$f"
9206 ;;
4977bab6 9207 esac
11642c3a
ZW
9208done
9209
ab87f8c8 9210host_xm_file_list=
e22340b0 9211host_xm_include_list=
ab87f8c8 9212for f in $host_xm_file; do
64ccbc99 9213 case $f in
d02af173 9214 ansidecl.h )
e22340b0
ZW
9215 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
9216 host_xm_include_list="${host_xm_include_list} $f"
9217 ;;
e2500fed 9218 auto-host.h )
e22340b0
ZW
9219 host_xm_file_list="${host_xm_file_list} $f"
9220 host_xm_include_list="${host_xm_include_list} $f"
9221 ;;
9222 * )
9223 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
9224 host_xm_include_list="${host_xm_include_list} config/$f"
9225 ;;
64ccbc99 9226 esac
ab87f8c8
JL
9227done
9228
9229build_xm_file_list=
9230for f in $build_xm_file; do
64ccbc99 9231 case $f in
d02af173 9232 ansidecl.h )
e22340b0
ZW
9233 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
9234 build_xm_include_list="${build_xm_include_list} $f"
9235 ;;
e2500fed 9236 auto-build.h | auto-host.h )
e22340b0
ZW
9237 build_xm_file_list="${build_xm_file_list} $f"
9238 build_xm_include_list="${build_xm_include_list} $f"
9239 ;;
9240 * )
9241 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
9242 build_xm_include_list="${build_xm_include_list} config/$f"
9243 ;;
64ccbc99 9244 esac
ab87f8c8
JL
9245done
9246
a078a589
ZW
9247# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
9248# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
9249CROSS=
9250ALL=all.internal
9251SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9252if test x$host != x$target
9253then
a078a589
ZW
9254 CROSS="-DCROSS_COMPILE"
9255 ALL=all.cross
9256 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 9257 case "$host","$target" in
3a7e8b87
GK
9258 # Darwin crosses can use the host system's libraries and headers,
9259 # because of the fat library support. Of course, it must be the
9260 # same version of Darwin on both sides. Allow the user to
9261 # just say --target=foo-darwin without a version number to mean
9262 # "the version on this system".
9263 *-*-darwin*,*-*-darwin*)
9264 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
9265 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
9266 if test $hostos = $targetos -o $targetos = darwin ; then
9267 CROSS=
9268 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
9269 with_headers=yes
9270 fi
9271 ;;
9272
343f59d9
AM
9273 i?86-*-*,x86_64-*-* \
9274 | powerpc*-*-*,powerpc64*-*-*)
9275 CROSS="$CROSS -DNATIVE_CROSS" ;;
9276 esac
7a615b25
AO
9277elif test "x$TARGET_SYSTEM_ROOT" != x; then
9278 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
9279 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9280fi
9281
b39d221a
EC
9282# If this is a cross-compiler that does not
9283# have its own set of headers then define
9284# inhibit_libc
9285
dc06db20
R
9286# If this is using newlib, without having the headers available now,
9287# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
9288# This prevents libgcc2 from containing any code which requires libc
9289# support.
b39d221a 9290inhibit_libc=
dc06db20
R
9291if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
9292 test x$with_newlib = xyes ; } &&
e50084fa 9293 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 9294 inhibit_libc=-Dinhibit_libc
b39d221a
EC
9295fi
9296
9297
a078a589
ZW
9298# When building gcc with a cross-compiler, we need to adjust things so
9299# that the generator programs are still built with the native compiler.
9300# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
9301
9302# These are the normal (build=host) settings:
ba479fd2
NN
9303BUILD_PREFIX=
9304BUILD_PREFIX_1=ignore-
9305CC_FOR_BUILD='$(CC)'
9306BUILD_CFLAGS='$(ALL_CFLAGS)'
a078a589 9307
ba479fd2 9308STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
9309
9310# Possibly disable fixproto, on a per-target basis.
9311case ${use_fixproto} in
9312 no)
9313 STMP_FIXPROTO=
9314 ;;
9315 yes)
9316 STMP_FIXPROTO=stmp-fixproto
9317 ;;
9318esac
9319
a078a589 9320
83599948
NS
9321# And these apply if build != host, or we are generating coverage data
9322if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 9323then
5c35940c
NN
9324 BUILD_PREFIX=build-
9325 BUILD_PREFIX_1=build-
b11e4747 9326 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 9327
7a615b25
AO
9328 if test "x$TARGET_SYSTEM_ROOT" = x; then
9329 STMP_FIXINC=
9330 STMP_FIXPROTO=
9331 fi
ab87f8c8
JL
9332fi
9333
9334# Expand extra_headers to include complete path.
9335# This substitutes for lots of t-* files.
9336extra_headers_list=
b1ef58c8
NN
9337# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
9338for file in ${extra_headers} ; do
9339 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
9340done
ab87f8c8 9341
ab87f8c8 9342# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
9343case $use_collect2 in
9344 no) use_collect2= ;;
9345 "") ;;
ba479fd2 9346 *)
34a86c2b
NN
9347 host_xm_defines="${host_xm_defines} USE_COLLECT2"
9348 xm_defines="${xm_defines} USE_COLLECT2"
9349 ;;
9350esac
ab87f8c8 9351
d869a8c4
NN
9352# Identify the assembler which will work hand-in-glove with the newly
9353# built GCC, so that we can examine its features. This is the assembler
9354# which will be driven by the driver program.
9355#
9356# If build != host, and we aren't building gas in-tree, we identify a
9357# build->target assembler and hope that it will have the same features
9358# as the host->target assembler we'll be using.
ba479fd2
NN
9359echo "$as_me:$LINENO: checking what assembler to use" >&5
9360echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 9361in_tree_gas=no
ab87f8c8 9362gcc_cv_as=
981d4858
JM
9363gcc_cv_gas_major_version=
9364gcc_cv_gas_minor_version=
ab87f8c8
JL
9365gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
9366if test -x "$DEFAULT_ASSEMBLER"; then
9367 gcc_cv_as="$DEFAULT_ASSEMBLER"
9368elif test -x "$AS"; then
9369 gcc_cv_as="$AS"
9370elif test -x as$host_exeext; then
9371 # Build using assembler in the current directory.
9372 gcc_cv_as=./as$host_exeext
34a86c2b
NN
9373elif test -f $gcc_cv_as_gas_srcdir/configure.in \
9374 && test -f ../gas/Makefile; then
ad9c4d9f
NN
9375 # Single tree build which includes gas.
9376 in_tree_gas=yes
9377 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9378for f in $gcc_cv_as_bfd_srcdir/configure \
9379 $gcc_cv_as_gas_srcdir/configure \
9380 $gcc_cv_as_gas_srcdir/configure.in \
9381 $gcc_cv_as_gas_srcdir/Makefile.in ; do
9382 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9383 if test x$gcc_cv_gas_version != x; then
9384 break
9385 fi
9386done
9387gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
9388gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
9389gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
9390case $gcc_cv_gas_patch_version in
9391 "") gcc_cv_gas_patch_version="0" ;;
9392esac
8ada417f
ZW
9393gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
9394 + $gcc_cv_gas_minor_version \) \* 1000 \
9395 + $gcc_cv_gas_patch_version`
ad9c4d9f 9396
f9c1196a
ZW
9397 rm -f as$host_exeext
9398 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5408ac6c
HPN
9399 in_tree_gas_is_elf=no
9400 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
9401 || (grep 'obj_format = multi' ../gas/Makefile \
9402 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
9403 then
9404 in_tree_gas_is_elf=yes
9405 fi
981d4858 9406fi
9e423e6d 9407
534d0cc0 9408if test "x$gcc_cv_as" = x; then
779243f7
JL
9409 # Search the same directories that the installed compiler will
9410 # search. Else we may find the wrong assembler and lose. If we
9411 # do not find a suitable assembler binary, then try the user's
9412 # path.
9413 #
9414 # Also note we have to check MD_EXEC_PREFIX before checking the
9415 # user's path. Unfortunately, there is no good way to get at the
9416 # value of MD_EXEC_PREFIX here. So we do a brute force search
9417 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9418 # to be fixed as part of the make/configure rewrite too.
9419
9420 if test "x$exec_prefix" = xNONE; then
9421 if test "x$prefix" = xNONE; then
9422 test_prefix=/usr/local
9423 else
9424 test_prefix=$prefix
9425 fi
9426 else
9427 test_prefix=$exec_prefix
9428 fi
9429
9430 # If the loop below does not find an assembler, then use whatever
9431 # one we can find in the users's path.
9432 # user's path.
55a2ea2a
AM
9433 if test "x$program_prefix" != xNONE; then
9434 gcc_cv_as=${program_prefix}as$host_exeext
9435 else
9436 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
9437 fi
9438
caa55b1e
NN
9439 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9440 $test_prefix/lib/gcc-lib/$target_noncanonical \
9441 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9442 /usr/lib/gcc/$target_noncanonical \
9443 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9444 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9445
9446 if test x$host = x$target; then
9447 test_dirs="$test_dirs \
779243f7
JL
9448 /usr/libexec \
9449 /usr/ccs/gcc \
9450 /usr/ccs/bin \
9451 /udk/usr/ccs/bin \
9452 /bsd43/usr/lib/cmplrs/cc \
9453 /usr/cross64/usr/bin \
9454 /usr/lib/cmplrs/cc \
9455 /sysv/usr/lib/cmplrs/cc \
9456 /svr4/usr/lib/cmplrs/cc \
9457 /usr/bin"
55a2ea2a 9458 fi
779243f7
JL
9459
9460 for dir in $test_dirs; do
55a2ea2a 9461 if test -x $dir/as$host_exeext; then
779243f7
JL
9462 gcc_cv_as=$dir/as$host_exeext
9463 break;
9464 fi
9465 done
9e423e6d 9466fi
34a86c2b
NN
9467case $in_tree_gas in
9468 yes)
ba479fd2
NN
9469 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
9470echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
9471 ;;
9472 no)
ba479fd2
NN
9473 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
9474echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
9475 ;;
9476esac
981d4858 9477
d869a8c4
NN
9478# Identify the linker which will work hand-in-glove with the newly
9479# built GCC, so that we can examine its features. This is the linker
9480# which will be driven by the driver program.
9481#
9482# If build != host, and we aren't building gas in-tree, we identify a
9483# build->target linker and hope that it will have the same features
9484# as the host->target linker we'll be using.
ba479fd2
NN
9485echo "$as_me:$LINENO: checking what linker to use" >&5
9486echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 9487in_tree_ld=no
275b60d6
JJ
9488gcc_cv_ld=
9489gcc_cv_gld_major_version=
9490gcc_cv_gld_minor_version=
9491gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
9492gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9493if test -x "$DEFAULT_LINKER"; then
9494 gcc_cv_ld="$DEFAULT_LINKER"
9495elif test -x "$LD"; then
9496 gcc_cv_ld="$LD"
f9c1196a 9497elif test -x collect-ld$host_exeext; then
275b60d6 9498 # Build using linker in the current directory.
f9c1196a 9499 gcc_cv_ld=./collect-ld$host_exeext
34a86c2b
NN
9500elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
9501 && test -f ../ld/Makefile; then
275b60d6 9502 # Single tree build which includes ld.
34a86c2b 9503 in_tree_ld=yes
5408ac6c
HPN
9504 in_tree_ld_is_elf=no
9505 if (grep 'EMUL = .*elf' ../ld/Makefile \
9506 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
9507 in_tree_ld_is_elf=yes
9508 fi
275b60d6
JJ
9509 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
9510 do
9511 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9512 if test x$gcc_cv_gld_version != x; then
9513 break
9514 fi
9515 done
9516 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
9517 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f9c1196a
ZW
9518 rm -f collect-ld$host_exeext
9519 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
9520 2>/dev/null
275b60d6
JJ
9521fi
9522
534d0cc0 9523if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
9524 # Search the same directories that the installed compiler will
9525 # search. Else we may find the wrong linker and lose. If we
9526 # do not find a suitable linker binary, then try the user's
9527 # path.
9528 #
9529 # Also note we have to check MD_EXEC_PREFIX before checking the
9530 # user's path. Unfortunately, there is no good way to get at the
9531 # value of MD_EXEC_PREFIX here. So we do a brute force search
9532 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9533 # to be fixed as part of the make/configure rewrite too.
9534
9535 if test "x$exec_prefix" = xNONE; then
9536 if test "x$prefix" = xNONE; then
9537 test_prefix=/usr/local
9538 else
9539 test_prefix=$prefix
9540 fi
9541 else
9542 test_prefix=$exec_prefix
9543 fi
9544
9545 # If the loop below does not find an linker, then use whatever
9546 # one we can find in the users's path.
9547 # user's path.
55a2ea2a
AM
9548 if test "x$program_prefix" != xNONE; then
9549 gcc_cv_ld=${program_prefix}ld$host_exeext
9550 else
9551 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
9552 fi
9553
caa55b1e
NN
9554 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9555 $test_prefix/lib/gcc-lib/$target_noncanonical \
9556 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9557 /usr/lib/gcc/$target_noncanonical \
9558 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9559 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9560
9561 if test x$host = x$target; then
9562 test_dirs="$test_dirs \
275b60d6
JJ
9563 /usr/libexec \
9564 /usr/ccs/gcc \
9565 /usr/ccs/bin \
9566 /udk/usr/ccs/bin \
9567 /bsd43/usr/lib/cmplrs/cc \
9568 /usr/cross64/usr/bin \
9569 /usr/lib/cmplrs/cc \
9570 /sysv/usr/lib/cmplrs/cc \
9571 /svr4/usr/lib/cmplrs/cc \
9572 /usr/bin"
55a2ea2a 9573 fi
275b60d6
JJ
9574
9575 for dir in $test_dirs; do
55a2ea2a 9576 if test -x $dir/ld$host_exeext; then
275b60d6
JJ
9577 gcc_cv_ld=$dir/ld$host_exeext
9578 break;
9579 fi
9580 done
9581fi
34a86c2b
NN
9582case $in_tree_ld in
9583 yes)
ba479fd2
NN
9584 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
9585echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
9586 ;;
9587 no)
ba479fd2
NN
9588 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
9589echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
9590 ;;
9591esac
275b60d6 9592
981d4858 9593# Figure out what nm we will be using.
f9c1196a 9594gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
9595echo "$as_me:$LINENO: checking what nm to use" >&5
9596echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 9597in_tree_nm=no
981d4858
JM
9598if test -x nm$host_exeext; then
9599 gcc_cv_nm=./nm$host_exeext
f9c1196a
ZW
9600elif test -f $gcc_cv_binutils_srcdir/configure.in \
9601 && test -f ../binutils/Makefile; then
9602 # Single tree build which includes binutils.
9603 in_tree_nm=yes
9604 gcc_cv_nm=./nm$host_exeext
9605 rm -f nm$host_exeext
9606 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
534d0cc0
AM
9607elif test "x$program_prefix" != xNONE; then
9608 gcc_cv_nm=${program_prefix}nm$host_exeext
9609else
9610 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
981d4858 9611fi
f9c1196a 9612case $in_tree_nm in
ba479fd2
NN
9613 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
9614echo "${ECHO_T}\"newly built nm\"" >&6 ;;
9615 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
9616echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 9617esac
981d4858 9618
3cae5780 9619# Figure out what objdump we will be using.
ba479fd2
NN
9620echo "$as_me:$LINENO: checking what objdump to use" >&5
9621echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 9622in_tree_objdump=no
3cae5780
AS
9623if test -x objdump$host_exeext; then
9624 gcc_cv_objdump=./objdump$host_exeext
f9c1196a
ZW
9625elif test -f $gcc_cv_binutils_srcdir/configure.in \
9626 && test -f ../binutils/Makefile; then
9627 # Single tree build which includes binutils.
9628 in_tree_objdump=yes
9629 gcc_cv_objdump=./objdump$host_exeext
9630 rm -f objdump$host_exeext
9631 $symbolic_link ../binutils/objdump$host_exeext \
9632 objdump$host_exeext 2>/dev/null
534d0cc0
AM
9633elif test "x$program_prefix" != xNONE; then
9634 gcc_cv_objdump=${program_prefix}objdump$host_exeext
9635else
f9c1196a
ZW
9636 gcc_cv_objdump=`echo objdump | \
9637 sed ${program_transform_name}`$host_exeext
3cae5780 9638fi
f9c1196a 9639case $in_tree_objdump in
ba479fd2
NN
9640 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
9641echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
9642 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
9643echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 9644esac
3cae5780 9645
981d4858 9646# Figure out what assembler alignment features are present.
ba479fd2
NN
9647echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
9648echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
9649if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
9650 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9651else
9652 gcc_cv_as_balign_and_p2align=no
9653 if test $in_tree_gas = yes; then
9654 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
9655 then gcc_cv_as_balign_and_p2align=yes
9656fi
9657 elif test x$gcc_cv_as != x; then
6e3f3080 9658 echo '.balign 4
8ada417f 9659.p2align 2' > conftest.s
ba479fd2
NN
9660 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9662 (eval $ac_try) 2>&5
9663 ac_status=$?
9664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665 (exit $ac_status); }; }
8ada417f
ZW
9666 then
9667 gcc_cv_as_balign_and_p2align=yes
9668 else
9669 echo "configure: failed program was" >&5
9670 cat conftest.s >&5
9671 fi
9672 rm -f conftest.o conftest.s
9673 fi
9674fi
ba479fd2
NN
9675echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
9676echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 9677if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
9678
9679cat >>confdefs.h <<\_ACEOF
981d4858 9680#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 9681_ACEOF
981d4858 9682
ad9c4d9f
NN
9683fi
9684
ba479fd2
NN
9685echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
9686echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
9687if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
9688 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9689else
9690 gcc_cv_as_max_skip_p2align=no
9691 if test $in_tree_gas = yes; then
9692 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
9693 then gcc_cv_as_max_skip_p2align=yes
9694fi
9695 elif test x$gcc_cv_as != x; then
6e3f3080 9696 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
9697 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699 (eval $ac_try) 2>&5
9700 ac_status=$?
9701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702 (exit $ac_status); }; }
8ada417f
ZW
9703 then
9704 gcc_cv_as_max_skip_p2align=yes
9705 else
9706 echo "configure: failed program was" >&5
9707 cat conftest.s >&5
9708 fi
9709 rm -f conftest.o conftest.s
9710 fi
ad9c4d9f 9711fi
ba479fd2
NN
9712echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
9713echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 9714if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
9715
9716cat >>confdefs.h <<\_ACEOF
9e423e6d 9717#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 9718_ACEOF
9e423e6d 9719
9e423e6d 9720fi
ad9c4d9f 9721
ba479fd2
NN
9722echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
9723echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
9724if test "${gcc_cv_as_subsection_m1+set}" = set; then
9725 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9726else
9727 gcc_cv_as_subsection_m1=no
9728 if test $in_tree_gas = yes; then
9729 if test $in_tree_gas_is_elf = yes \
9730 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
9731 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 9732fi
8ada417f 9733 elif test x$gcc_cv_as != x; then
6e3f3080 9734 echo 'conftest_label1: .word 0
d1accaa3
JJ
9735.subsection -1
9736conftest_label2: .word 0
8ada417f 9737.previous' > conftest.s
ba479fd2
NN
9738 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9740 (eval $ac_try) 2>&5
9741 ac_status=$?
9742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743 (exit $ac_status); }; }
8ada417f
ZW
9744 then
9745 if test x$gcc_cv_nm != x; then
9746 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
9747 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
9748 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
9749 then :
9750 else gcc_cv_as_subsection_m1=yes
9751 fi
9752 rm -f conftest.nm1 conftest.nm2
9753 fi
9754 else
9755 echo "configure: failed program was" >&5
9756 cat conftest.s >&5
9757 fi
9758 rm -f conftest.o conftest.s
9759 fi
981d4858 9760fi
ba479fd2
NN
9761echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
9762echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 9763if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
9764
9765cat >>confdefs.h <<\_ACEOF
981d4858 9766#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 9767_ACEOF
981d4858 9768
d1accaa3 9769fi
ad9c4d9f 9770
ba479fd2
NN
9771echo "$as_me:$LINENO: checking assembler for .weak" >&5
9772echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
9773if test "${gcc_cv_as_weak+set}" = set; then
9774 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9775else
9776 gcc_cv_as_weak=no
9777 if test $in_tree_gas = yes; then
9778 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
9779 then gcc_cv_as_weak=yes
ad9c4d9f 9780fi
8ada417f 9781 elif test x$gcc_cv_as != x; then
6e3f3080 9782 echo ' .weak foobar' > conftest.s
ba479fd2
NN
9783 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9785 (eval $ac_try) 2>&5
9786 ac_status=$?
9787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); }; }
8ada417f
ZW
9789 then
9790 gcc_cv_as_weak=yes
9791 else
9792 echo "configure: failed program was" >&5
9793 cat conftest.s >&5
9794 fi
9795 rm -f conftest.o conftest.s
9796 fi
981d4858 9797fi
ba479fd2
NN
9798echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
9799echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 9800if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
9801
9802cat >>confdefs.h <<\_ACEOF
981d4858 9803#define HAVE_GAS_WEAK 1
ba479fd2 9804_ACEOF
981d4858 9805
12822146 9806fi
ad9c4d9f 9807
8ada417f
ZW
9808# .hidden needs to be supported in both the assembler and the linker,
9809# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
9810# This is irritatingly difficult to feature test for; we have to check the
9811# date string after the version number. If we've got an in-tree
9812# ld, we don't know its patchlevel version, so we set the baseline at 2.13
9813# to be safe.
9814# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
9815echo "$as_me:$LINENO: checking assembler for .hidden" >&5
9816echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
9817if test "${gcc_cv_as_hidden+set}" = set; then
9818 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9819else
9820 gcc_cv_as_hidden=no
9821 if test $in_tree_gas = yes; then
9822 if test $in_tree_gas_is_elf = yes \
9823 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
9824 then gcc_cv_as_hidden=yes
9825fi
9826 elif test x$gcc_cv_as != x; then
6e3f3080 9827 echo ' .hidden foobar
8ada417f 9828foobar:' > conftest.s
ba479fd2
NN
9829 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9831 (eval $ac_try) 2>&5
9832 ac_status=$?
9833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9834 (exit $ac_status); }; }
8ada417f
ZW
9835 then
9836 gcc_cv_as_hidden=yes
9837 else
9838 echo "configure: failed program was" >&5
9839 cat conftest.s >&5
9840 fi
9841 rm -f conftest.o conftest.s
9842 fi
9843fi
ba479fd2
NN
9844echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
9845echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 9846
ad9c4d9f 9847
ba479fd2
NN
9848echo "$as_me:$LINENO: checking linker for .hidden support" >&5
9849echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
9850if test "${gcc_cv_ld_hidden+set}" = set; then
9851 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9852else
9853 if test $in_tree_ld = yes ; then
9854 gcc_cv_ld_hidden=no
9855 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 \
9856 && test $in_tree_ld_is_elf = yes; then
9857 gcc_cv_ld_hidden=yes
9858 fi
9859else
9860 gcc_cv_ld_hidden=yes
bace148a 9861 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
9862 if echo "$ld_ver" | grep GNU > /dev/null; then
9863 ld_vers=`echo $ld_ver | sed -n \
9864 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9865 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9866 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9867 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9868 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9869 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
9870 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'`
9871 if test 0"$ld_date" -lt 20020404; then
9872 if test -n "$ld_date"; then
9873 # If there was date string, but was earlier than 2002-04-04, fail
9874 gcc_cv_ld_hidden=no
9875 elif test -z "$ld_vers"; then
9876 # If there was no date string nor ld version number, something is wrong
9877 gcc_cv_ld_hidden=no
9878 else
9879 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
9880 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
9881 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9882 test -z "$ld_vers_patch" && ld_vers_patch=0
9883 if test "$ld_vers_major" -lt 2; then
9884 gcc_cv_ld_hidden=no
9885 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
9886 gcc_cv_ld_hidden="no"
9887 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
9888 gcc_cv_ld_hidden=no
c72931a6 9889 fi
8ada417f 9890 fi
789b7de5 9891 fi
8ada417f 9892 else
28690784 9893 case "${target}" in
b0fd7d27 9894 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
9895 gcc_cv_ld_hidden=yes
9896 ;;
9897 *)
9898 gcc_cv_ld_hidden=no
9899 ;;
9900 esac
8ada417f
ZW
9901 fi
9902fi
6d07784a 9903fi
ba479fd2
NN
9904echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
9905echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 9906libgcc_visibility=no
ad9c4d9f 9907
8e3940b2 9908if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 9909 libgcc_visibility=yes
ba479fd2
NN
9910
9911cat >>confdefs.h <<\_ACEOF
8ada417f 9912#define HAVE_GAS_HIDDEN 1
ba479fd2 9913_ACEOF
ad9c4d9f
NN
9914
9915fi
9916
8ada417f 9917# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
9918echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
9919echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
9920if test "${gcc_cv_as_leb128+set}" = set; then
9921 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9922else
9923 gcc_cv_as_leb128=no
9924 if test $in_tree_gas = yes; then
9925 if test $in_tree_gas_is_elf = yes \
9926 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
9927 then gcc_cv_as_leb128=yes
9928fi
9929 elif test x$gcc_cv_as != x; then
6e3f3080 9930 echo ' .data
b7460f24
RH
9931 .uleb128 L2 - L1
9932L1:
9933 .uleb128 1280
9934 .sleb128 -1010
8ada417f 9935L2:' > conftest.s
ba479fd2
NN
9936 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9938 (eval $ac_try) 2>&5
9939 ac_status=$?
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); }; }
8ada417f
ZW
9942 then
9943 # GAS versions before 2.11 do not support uleb128,
9944 # despite appearing to.
9945 # ??? There exists an elf-specific test that will crash
9946 # the assembler. Perhaps it's better to figure out whether
9947 # arbitrary sections are supported and try the test.
bace148a 9948 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
9949 if echo "$as_ver" | grep GNU > /dev/null; then
9950 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
9951 as_major=`echo $as_ver | sed 's/\..*//'`
9952 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
9953 if test $as_major -eq 2 && test $as_minor -lt 11
9954 then :
9955 else gcc_cv_as_leb128=yes
9956 fi
9957 fi
9958 else
9959 echo "configure: failed program was" >&5
9960 cat conftest.s >&5
9961 fi
9962 rm -f conftest.o conftest.s
9963 fi
b7460f24 9964fi
ba479fd2
NN
9965echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
9966echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 9967if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
9968
9969cat >>confdefs.h <<\_ACEOF
b7460f24 9970#define HAVE_AS_LEB128 1
ba479fd2 9971_ACEOF
b7460f24
RH
9972
9973fi
ad9c4d9f 9974
8ada417f
ZW
9975# GAS versions up to and including 2.11.0 may mis-optimize
9976# .eh_frame data.
ba479fd2
NN
9977echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
9978echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
9979if test "${gcc_cv_as_eh_frame+set}" = set; then
9980 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9981else
9982 gcc_cv_as_eh_frame=no
9983 if test $in_tree_gas = yes; then
9984 if test $in_tree_gas_is_elf = yes \
9985 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
9986 then gcc_cv_as_eh_frame=yes
ad9c4d9f 9987fi
8ada417f 9988 elif test x$gcc_cv_as != x; then
6e3f3080 9989 echo ' .text
c64688ae
RH
9990.LFB1:
9991 .4byte 0
9992.L1:
9993 .4byte 0
9994.LFE1:
9995 .section .eh_frame,"aw",@progbits
9996__FRAME_BEGIN__:
9997 .4byte .LECIE1-.LSCIE1
9998.LSCIE1:
9999 .4byte 0x0
10000 .byte 0x1
10001 .ascii "z\0"
10002 .byte 0x1
10003 .byte 0x78
10004 .byte 0x1a
10005 .byte 0x0
10006 .byte 0x4
10007 .4byte 1
10008 .p2align 1
10009.LECIE1:
10010.LSFDE1:
10011 .4byte .LEFDE1-.LASFDE1
10012.LASFDE1:
10013 .4byte .LASFDE1-__FRAME_BEGIN__
10014 .4byte .LFB1
10015 .4byte .LFE1-.LFB1
10016 .byte 0x4
10017 .4byte .LFE1-.LFB1
10018 .byte 0x4
10019 .4byte .L1-.LFB1
8ada417f 10020.LEFDE1:' > conftest.s
ba479fd2
NN
10021 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10023 (eval $ac_try) 2>&5
10024 ac_status=$?
10025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10026 (exit $ac_status); }; }
8ada417f
ZW
10027 then
10028 cat > conftest.lit <<EOF
c64688ae
RH
10029 0000 10000000 00000000 017a0001 781a0004 .........z..x...
10030 0010 01000000 12000000 18000000 00000000 ................
093e61a6 10031 0020 08000000 04080000 0044 .........D
01efb963 10032EOF
ba479fd2 10033cat > conftest.big <<EOF
01efb963
AS
10034 0000 00000010 00000000 017a0001 781a0004 .........z..x...
10035 0010 00000001 00000012 00000018 00000000 ................
093e61a6 10036 0020 00000008 04000000 0844 .........D
c64688ae 10037EOF
8ada417f
ZW
10038 # If the assembler didn't choke, and we can objdump,
10039 # and we got the correct data, then succeed.
10040 if test x$gcc_cv_objdump != x \
10041 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
10042 | tail -3 > conftest.got \
10043 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
10044 || cmp conftest.big conftest.got > /dev/null 2>&1; }
10045 then
10046 gcc_cv_as_eh_frame=yes
ba479fd2
NN
10047 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
10048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10049 (eval $ac_try) 2>&5
10050 ac_status=$?
10051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10052 (exit $ac_status); }; }; then
8ada417f
ZW
10053 gcc_cv_as_eh_frame=buggy
10054 else
10055 # Uh oh, what do we do now?
10056 gcc_cv_as_eh_frame=no
10057 fi
10058 else
10059 echo "configure: failed program was" >&5
10060 cat conftest.s >&5
10061 fi
10062 rm -f conftest.o conftest.s
10063 fi
c64688ae 10064fi
ba479fd2
NN
10065echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
10066echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 10067
6e3f3080 10068
63cf211a 10069if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
10070
10071cat >>confdefs.h <<\_ACEOF
8ada417f 10072#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 10073_ACEOF
ad9c4d9f
NN
10074
10075fi
10076
ba479fd2
NN
10077echo "$as_me:$LINENO: checking assembler for section merging support" >&5
10078echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
10079if test "${gcc_cv_as_shf_merge+set}" = set; then
10080 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10081else
10082 gcc_cv_as_shf_merge=no
10083 if test $in_tree_gas = yes; then
10084 if test $in_tree_gas_is_elf = yes \
10085 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10086 then gcc_cv_as_shf_merge=yes
10087fi
10088 elif test x$gcc_cv_as != x; then
6e3f3080 10089 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
10090 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
10091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10092 (eval $ac_try) 2>&5
10093 ac_status=$?
10094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10095 (exit $ac_status); }; }
8ada417f
ZW
10096 then
10097 gcc_cv_as_shf_merge=yes
10098 else
10099 echo "configure: failed program was" >&5
10100 cat conftest.s >&5
10101 fi
10102 rm -f conftest.o conftest.s
10103 fi
201556f0 10104fi
ba479fd2
NN
10105echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
10106echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 10107
8ad9fb33 10108
ba479fd2 10109cat >>confdefs.h <<_ACEOF
8ad9fb33 10110#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 10111_ACEOF
201556f0 10112
201556f0 10113
8ada417f 10114# Thread-local storage - the check is heavily parametrized.
f996902d
RH
10115conftest_s=
10116tls_first_major=
10117tls_first_minor=
9739c90c 10118tls_as_opt=
f996902d 10119case "$target" in
6f9b006d
RH
10120 alpha*-*-*)
10121 conftest_s='
10122 .section ".tdata","awT",@progbits
10123foo: .long 25
10124 .text
10125 ldq $27,__tls_get_addr($29) !literal!1
10126 lda $16,foo($29) !tlsgd!1
10127 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
10128 ldq $27,__tls_get_addr($29) !literal!2
10129 lda $16,foo($29) !tlsldm!2
10130 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
10131 ldq $1,foo($29) !gotdtprel
10132 ldah $2,foo($29) !dtprelhi
10133 lda $3,foo($2) !dtprello
10134 lda $4,foo($29) !dtprel
10135 ldq $1,foo($29) !gottprel
10136 ldah $2,foo($29) !tprelhi
10137 lda $3,foo($2) !tprello
10138 lda $4,foo($29) !tprel'
10139 tls_first_major=2
10140 tls_first_minor=13
10141 ;;
f996902d
RH
10142 i[34567]86-*-*)
10143 conftest_s='
10144 .section ".tdata","awT",@progbits
10145foo: .long 25
10146 .text
10147 movl %gs:0, %eax
10148 leal foo@TLSGD(,%ebx,1), %eax
10149 leal foo@TLSLDM(%ebx), %eax
10150 leal foo@DTPOFF(%eax), %edx
10151 movl foo@GOTTPOFF(%ebx), %eax
10152 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
10153 addl foo@GOTNTPOFF(%ebx), %eax
10154 movl foo@INDNTPOFF, %eax
f996902d
RH
10155 movl $foo@TPOFF, %eax
10156 subl $foo@TPOFF, %eax
10157 leal foo@NTPOFF(%ecx), %eax'
10158 tls_first_major=2
75d38379
JJ
10159 tls_first_minor=14
10160 ;;
10161 x86_64-*-*)
10162 conftest_s='
10163 .section ".tdata","awT",@progbits
10164foo: .long 25
10165 .text
10166 movq %fs:0, %rax
10167 leaq foo@TLSGD(%rip), %rdi
10168 leaq foo@TLSLD(%rip), %rdi
10169 leaq foo@DTPOFF(%rax), %rdx
10170 movq foo@GOTTPOFF(%rip), %rax
10171 movq $foo@TPOFF, %rax'
10172 tls_first_major=2
10173 tls_first_minor=14
f996902d 10174 ;;
7b6e506e
RH
10175 ia64-*-*)
10176 conftest_s='
10177 .section ".tdata","awT",@progbits
10178foo: data8 25
10179 .text
10180 addl r16 = @ltoff(@dtpmod(foo#)), gp
10181 addl r17 = @ltoff(@dtprel(foo#)), gp
10182 addl r18 = @ltoff(@tprel(foo#)), gp
10183 addl r19 = @dtprel(foo#), gp
10184 adds r21 = @dtprel(foo#), r13
10185 movl r23 = @dtprel(foo#)
10186 addl r20 = @tprel(foo#), gp
10187 adds r22 = @tprel(foo#), r13
10188 movl r24 = @tprel(foo#)'
10189 tls_first_major=2
10190 tls_first_minor=13
10191 ;;
c4501e62
JJ
10192 powerpc-*-*)
10193 conftest_s='
10194 .section ".tdata","awT",@progbits
10195 .align 2
10196ld0: .space 4
10197ld1: .space 4
10198x1: .space 4
10199x2: .space 4
10200x3: .space 4
10201 .text
10202 addi 3,31,ld0@got@tlsgd
10203 bl __tls_get_addr
10204 addi 3,31,x1@got@tlsld
10205 bl __tls_get_addr
10206 addi 9,3,x1@dtprel
10207 addis 9,3,x2@dtprel@ha
10208 addi 9,9,x2@dtprel@l
10209 lwz 9,x3@got@tprel(31)
10210 add 9,9,x@tls
10211 addi 9,2,x1@tprel
10212 addis 9,2,x2@tprel@ha
10213 addi 9,9,x2@tprel@l'
10214 tls_first_major=2
10215 tls_first_minor=14
9739c90c 10216 tls_as_opt=-a32
c4501e62
JJ
10217 ;;
10218 powerpc64-*-*)
10219 conftest_s='
10220 .section ".tdata","awT",@progbits
10221 .align 3
10222ld0: .space 8
10223ld1: .space 8
10224x1: .space 8
10225x2: .space 8
10226x3: .space 8
10227 .text
10228 addi 3,2,ld0@got@tlsgd
10229 bl .__tls_get_addr
10230 nop
10231 addi 3,2,ld1@toc
10232 bl .__tls_get_addr
10233 nop
10234 addi 3,2,x1@got@tlsld
10235 bl .__tls_get_addr
10236 nop
10237 addi 9,3,x1@dtprel
10238 bl .__tls_get_addr
10239 nop
10240 addis 9,3,x2@dtprel@ha
10241 addi 9,9,x2@dtprel@l
10242 bl .__tls_get_addr
10243 nop
10244 ld 9,x3@got@dtprel(2)
10245 add 9,9,3
10246 bl .__tls_get_addr
10247 nop'
10248 tls_first_major=2
10249 tls_first_minor=14
9739c90c 10250 tls_as_opt=-a64
c4501e62 10251 ;;
fd3cd001
UW
10252 s390-*-*)
10253 conftest_s='
10254 .section ".tdata","awT",@progbits
10255foo: .long 25
10256 .text
10257 .long foo@TLSGD
10258 .long foo@TLSLDM
10259 .long foo@DTPOFF
10260 .long foo@NTPOFF
10261 .long foo@GOTNTPOFF
10262 .long foo@INDNTPOFF
10263 l %r1,foo@GOTNTPOFF(%r12)
10264 l %r1,0(%r1):tls_load:foo
10265 bas %r14,0(%r1,%r13):tls_gdcall:foo
10266 bas %r14,0(%r1,%r13):tls_ldcall:foo'
10267 tls_first_major=2
10268 tls_first_minor=14
9739c90c 10269 tls_as_opt=-m31
fd3cd001
UW
10270 ;;
10271 s390x-*-*)
10272 conftest_s='
10273 .section ".tdata","awT",@progbits
10274foo: .long 25
10275 .text
10276 .quad foo@TLSGD
10277 .quad foo@TLSLDM
10278 .quad foo@DTPOFF
10279 .quad foo@NTPOFF
10280 .quad foo@GOTNTPOFF
10281 lg %r1,foo@GOTNTPOFF(%r12)
10282 larl %r1,foo@INDNTPOFF
10283 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
10284 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
10285 tls_first_major=2
10286 tls_first_minor=14
9739c90c 10287 tls_as_opt="-m64 -Aesame"
fd3cd001 10288 ;;
9ff13962
KK
10289 sh-*-* | sh[34]-*-*)
10290 conftest_s='
10291 .section ".tdata","awT",@progbits
10292foo: .long 25
10293 .text
10294 .long foo@TLSGD
10295 .long foo@TLSLDM
10296 .long foo@DTPOFF
10297 .long foo@GOTTPOFF
10298 .long foo@TPOFF'
10299 tls_first_major=2
10300 tls_first_minor=13
10301 ;;
5751a10b
JJ
10302 sparc*-*-*)
10303 conftest_s='
10304 .section ".tdata","awT",@progbits
10305foo: .long 25
10306 .text
10307 sethi %tgd_hi22(foo), %o0
10308 add %o0, %tgd_lo10(foo), %o1
10309 add %l7, %o1, %o0, %tgd_add(foo)
10310 call __tls_get_addr, %tgd_call(foo)
10311 sethi %tldm_hi22(foo), %l1
10312 add %l1, %tldm_lo10(foo), %l2
10313 add %l7, %l2, %o0, %tldm_add(foo)
10314 call __tls_get_addr, %tldm_call(foo)
10315 sethi %tldo_hix22(foo), %l3
10316 xor %l3, %tldo_lox10(foo), %l4
10317 add %o0, %l4, %l5, %tldo_add(foo)
10318 sethi %tie_hi22(foo), %o3
10319 add %o3, %tie_lo10(foo), %o3
10320 ld [%l7 + %o3], %o2, %tie_ld(foo)
10321 add %g7, %o2, %o4, %tie_add(foo)
10322 sethi %tle_hix22(foo), %l1
10323 xor %l1, %tle_lox10(foo), %o5
10324 ld [%g7 + %o5], %o1'
10325 tls_first_major=2
10326 tls_first_minor=14
10327 tls_as_opt=-32
10328 ;;
f996902d
RH
10329esac
10330if test -z "$tls_first_major"; then
8ada417f
ZW
10331 : # If we don't have a check, assume no support.
10332else
ba479fd2
NN
10333 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
10334echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
10335if test "${gcc_cv_as_tls+set}" = set; then
10336 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10337else
10338 gcc_cv_as_tls=no
10339 if test $in_tree_gas = yes; then
10340 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
10341 then gcc_cv_as_tls=yes
ad9c4d9f 10342fi
8ada417f 10343 elif test x$gcc_cv_as != x; then
6e3f3080 10344 echo "$conftest_s" > conftest.s
ba479fd2
NN
10345 if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'
10346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10347 (eval $ac_try) 2>&5
10348 ac_status=$?
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); }; }
8ada417f
ZW
10351 then
10352 gcc_cv_as_tls=yes
10353 else
10354 echo "configure: failed program was" >&5
10355 cat conftest.s >&5
10356 fi
10357 rm -f conftest.o conftest.s
f996902d 10358 fi
f996902d 10359fi
ba479fd2
NN
10360echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
10361echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 10362if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
10363
10364cat >>confdefs.h <<\_ACEOF
f996902d 10365#define HAVE_AS_TLS 1
ba479fd2 10366_ACEOF
f996902d
RH
10367
10368fi
8ada417f
ZW
10369fi
10370
10371# Target-specific assembler checks.
f996902d 10372
3a37b08e
RH
10373case "$target" in
10374 # All TARGET_ABI_OSF targets.
10375 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
10376 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10377echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10378if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
10379 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 10380else
8ada417f
ZW
10381 gcc_cv_as_alpha_explicit_relocs=no
10382 if test $in_tree_gas = yes; then
10383 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10384 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 10385fi
8ada417f 10386 elif test x$gcc_cv_as != x; then
6e3f3080 10387 echo ' .set nomacro
3a37b08e
RH
10388 .text
10389 extbl $3, $2, $3 !lituse_bytoff!1
10390 ldq $2, a($29) !literal!1
10391 ldq $4, b($29) !literal!2
10392 ldq_u $3, 0($2) !lituse_base!1
10393 ldq $27, f($29) !literal!5
10394 jsr $26, ($27), f !lituse_jsr!5
10395 ldah $29, 0($26) !gpdisp!3
10396 lda $0, c($29) !gprel
10397 ldah $1, d($29) !gprelhigh
10398 lda $1, d($1) !gprellow
8ada417f 10399 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
10400 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10402 (eval $ac_try) 2>&5
10403 ac_status=$?
10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405 (exit $ac_status); }; }
8ada417f
ZW
10406 then
10407 gcc_cv_as_alpha_explicit_relocs=yes
10408 else
10409 echo "configure: failed program was" >&5
10410 cat conftest.s >&5
10411 fi
10412 rm -f conftest.o conftest.s
10413 fi
cafe096b 10414fi
ba479fd2
NN
10415echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
10416echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 10417if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
10418
10419cat >>confdefs.h <<\_ACEOF
3a37b08e 10420#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 10421_ACEOF
3a37b08e 10422
8ada417f 10423fi
3a37b08e 10424 ;;
8ada417f 10425
1cb36a98 10426 sparc*-*-*)
ba479fd2
NN
10427 echo "$as_me:$LINENO: checking assembler for .register" >&5
10428echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
10429if test "${gcc_cv_as_sparc_register_op+set}" = set; then
10430 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10431else
8ada417f
ZW
10432 gcc_cv_as_sparc_register_op=no
10433 if test x$gcc_cv_as != x; then
6e3f3080 10434 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
10435 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10437 (eval $ac_try) 2>&5
10438 ac_status=$?
10439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10440 (exit $ac_status); }; }
8ada417f
ZW
10441 then
10442 gcc_cv_as_sparc_register_op=yes
10443 else
10444 echo "configure: failed program was" >&5
10445 cat conftest.s >&5
10446 fi
10447 rm -f conftest.o conftest.s
10448 fi
cafe096b 10449fi
ba479fd2
NN
10450echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
10451echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 10452if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
10453
10454cat >>confdefs.h <<\_ACEOF
1cb36a98 10455#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 10456_ACEOF
1cb36a98 10457
8ada417f 10458fi
1cb36a98 10459
ba479fd2
NN
10460 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
10461echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
10462if test "${gcc_cv_as_sparc_relax+set}" = set; then
10463 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 10464else
8ada417f
ZW
10465 gcc_cv_as_sparc_relax=no
10466 if test x$gcc_cv_as != x; then
6e3f3080 10467 echo '.text' > conftest.s
ba479fd2
NN
10468 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
10469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10470 (eval $ac_try) 2>&5
10471 ac_status=$?
10472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10473 (exit $ac_status); }; }
8ada417f
ZW
10474 then
10475 gcc_cv_as_sparc_relax=yes
10476 else
10477 echo "configure: failed program was" >&5
10478 cat conftest.s >&5
10479 fi
10480 rm -f conftest.o conftest.s
10481 fi
cafe096b 10482fi
ba479fd2
NN
10483echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
10484echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 10485if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
10486
10487cat >>confdefs.h <<\_ACEOF
e95b1e6a 10488#define HAVE_AS_RELAX_OPTION 1
ba479fd2 10489_ACEOF
e95b1e6a 10490
8ada417f 10491fi
e95b1e6a 10492
ba479fd2
NN
10493 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
10494echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
10495if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
10496 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 10497else
8ada417f
ZW
10498 gcc_cv_as_sparc_ua_pcrel=no
10499 if test x$gcc_cv_as != x; then
6e3f3080 10500 echo '.text
8ada417f
ZW
10501foo:
10502 nop
10503.data
10504.align 4
10505.byte 0
10506.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
10507 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10509 (eval $ac_try) 2>&5
10510 ac_status=$?
10511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10512 (exit $ac_status); }; }
8ada417f
ZW
10513 then
10514 if test x$gcc_cv_ld != x \
10515 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
10516 gcc_cv_as_sparc_ua_pcrel=yes
10517 fi
10518 rm -f conftest
10519 else
10520 echo "configure: failed program was" >&5
10521 cat conftest.s >&5
10522 fi
10523 rm -f conftest.o conftest.s
10524 fi
cafe096b 10525fi
ba479fd2
NN
10526echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
10527echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 10528if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
10529
10530cat >>confdefs.h <<\_ACEOF
17e9e88c 10531#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 10532_ACEOF
17e9e88c 10533
17e9e88c 10534
ba479fd2
NN
10535 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
10536echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
10537if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
10538 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 10539else
8ada417f
ZW
10540 gcc_cv_as_sparc_ua_pcrel_hidden=no
10541 if test x$gcc_cv_as != x; then
6e3f3080 10542 echo '.data
8ada417f
ZW
10543.align 4
10544.byte 0x31
10545.uaword %r_disp32(foo)
10546.byte 0x32, 0x33, 0x34
10547.global foo
10548.hidden foo
10549foo:
10550.skip 4' > conftest.s
ba479fd2
NN
10551 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10553 (eval $ac_try) 2>&5
10554 ac_status=$?
10555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10556 (exit $ac_status); }; }
8ada417f
ZW
10557 then
10558 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
10559 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
10560 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
10561 | grep ' 31000000 07323334' > /dev/null 2>&1; then
10562 if $gcc_cv_objdump -R conftest 2> /dev/null \
10563 | grep 'DISP32' > /dev/null 2>&1; then
10564 :
10565 else
10566 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 10567 fi
8ada417f
ZW
10568 fi
10569 rm -f conftest
10570 else
10571 echo "configure: failed program was" >&5
10572 cat conftest.s >&5
10573 fi
10574 rm -f conftest.o conftest.s
10575 fi
cafe096b 10576fi
ba479fd2
NN
10577echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
10578echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 10579if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
10580
10581cat >>confdefs.h <<\_ACEOF
cf7b8b0d 10582#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 10583_ACEOF
cf7b8b0d 10584
8ada417f 10585fi
ba479fd2 10586
8ada417f 10587fi # unaligned pcrel relocs
cf7b8b0d 10588
ba479fd2
NN
10589 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
10590echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
10591if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
10592 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10593else
8ada417f
ZW
10594 gcc_cv_as_sparc_offsetable_lo10=no
10595 if test x$gcc_cv_as != x; then
6e3f3080 10596 echo '.text
8ada417f
ZW
10597 or %g1, %lo(ab) + 12, %g1
10598 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
10599 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
10600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10601 (eval $ac_try) 2>&5
10602 ac_status=$?
10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10604 (exit $ac_status); }; }
8ada417f
ZW
10605 then
10606 if test x$gcc_cv_objdump != x \
10607 && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
10608 | grep ' 82106000 82106000' > /dev/null 2>&1; then
10609 gcc_cv_as_offsetable_lo10=yes
10610 fi
10611 else
10612 echo "configure: failed program was" >&5
10613 cat conftest.s >&5
10614 fi
10615 rm -f conftest.o conftest.s
10616 fi
cafe096b 10617fi
ba479fd2
NN
10618echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
10619echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 10620if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
10621
10622cat >>confdefs.h <<\_ACEOF
1cb36a98 10623#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 10624_ACEOF
1cb36a98 10625
8ada417f 10626fi
1cb36a98
RH
10627 ;;
10628
c307e6dd 10629 i[34567]86-*-* | x86_64-*-*)
ba479fd2
NN
10630 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
10631echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
10632if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
10633 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10634else
10635 gcc_cv_as_ix86_filds_fists=no
10636 if test $in_tree_gas = yes; then
10637 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
10638 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 10639fi
8ada417f 10640 elif test x$gcc_cv_as != x; then
6e3f3080 10641 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
10642 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10644 (eval $ac_try) 2>&5
10645 ac_status=$?
10646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10647 (exit $ac_status); }; }
8ada417f
ZW
10648 then
10649 gcc_cv_as_ix86_filds_fists=yes
10650 else
10651 echo "configure: failed program was" >&5
10652 cat conftest.s >&5
981d4858 10653 fi
8ada417f
ZW
10654 rm -f conftest.o conftest.s
10655 fi
10656fi
ba479fd2
NN
10657echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
10658echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 10659if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
10660
10661cat >>confdefs.h <<\_ACEOF
8ada417f 10662#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 10663_ACEOF
ad9c4d9f 10664
f6f5dff2
RO
10665fi
10666
ba479fd2
NN
10667 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
10668echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
10669if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
10670 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
10671else
10672 gcc_cv_as_ix86_cmov_sun_syntax=no
10673 if test x$gcc_cv_as != x; then
6e3f3080 10674 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
10675 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10678 ac_status=$?
10679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10680 (exit $ac_status); }; }
f6f5dff2
RO
10681 then
10682 gcc_cv_as_ix86_cmov_sun_syntax=yes
10683 else
10684 echo "configure: failed program was" >&5
10685 cat conftest.s >&5
10686 fi
10687 rm -f conftest.o conftest.s
10688 fi
10689fi
ba479fd2
NN
10690echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
10691echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 10692if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
10693
10694cat >>confdefs.h <<\_ACEOF
f6f5dff2 10695#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 10696_ACEOF
f6f5dff2 10697
ad9c4d9f
NN
10698fi
10699
6f3ca281
ZW
10700 # This one is used unconditionally by i386.[ch]; it is to be defined
10701 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
10702 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
10703echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
10704if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
10705 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10706else
10707 gcc_cv_as_ix86_gotoff_in_data=no
10708 if test $in_tree_gas = yes; then
10709 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10710 then gcc_cv_as_ix86_gotoff_in_data=yes
10711fi
10712 elif test x$gcc_cv_as != x; then
6e3f3080 10713 echo ' .text
f88c65f7
RH
10714.L0:
10715 nop
10716 .data
8ada417f 10717 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
10718 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10720 (eval $ac_try) 2>&5
10721 ac_status=$?
10722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10723 (exit $ac_status); }; }
8ada417f
ZW
10724 then
10725 gcc_cv_as_ix86_gotoff_in_data=yes
10726 else
10727 echo "configure: failed program was" >&5
10728 cat conftest.s >&5
f88c65f7 10729 fi
8ada417f
ZW
10730 rm -f conftest.o conftest.s
10731 fi
10732fi
ba479fd2
NN
10733echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
10734echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 10735
6f3ca281 10736
ba479fd2 10737cat >>confdefs.h <<_ACEOF
6f3ca281 10738#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 10739_ACEOF
f88c65f7 10740
1cb36a98 10741 ;;
ef1ecf87
RH
10742
10743 ia64*-*-*)
ba479fd2
NN
10744 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
10745echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
10746if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 10748else
8ada417f
ZW
10749 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
10750 if test $in_tree_gas = yes; then
10751 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10752 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 10753fi
8ada417f 10754 elif test x$gcc_cv_as != x; then
6e3f3080 10755 echo ' .text
ef1ecf87
RH
10756 addl r15 = @ltoffx(x#), gp
10757 ;;
cfa9ee99 10758 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
10759 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10761 (eval $ac_try) 2>&5
10762 ac_status=$?
10763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764 (exit $ac_status); }; }
8ada417f 10765 then
cfa9ee99 10766 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
10767 else
10768 echo "configure: failed program was" >&5
10769 cat conftest.s >&5
2c4a9cff 10770 fi
8ada417f
ZW
10771 rm -f conftest.o conftest.s
10772 fi
10773fi
ba479fd2
NN
10774echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
10775echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 10776if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
10777
10778cat >>confdefs.h <<\_ACEOF
cfa9ee99 10779#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 10780_ACEOF
8ada417f 10781
cfa9ee99 10782fi
8ada417f 10783
2c4a9cff 10784 ;;
8ada417f 10785
2c4a9cff 10786 powerpc*-*-*)
8ada417f
ZW
10787 case $target in
10788 *-*-aix) conftest_s=' .csect .textPR';;
10789 *) conftest_s=' .text';;
10790 esac
10791 conftest_s="$conftest_s
10792 mfcr 3,128"
10793
ba479fd2
NN
10794 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
10795echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
10796if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
10797 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 10798else
8ada417f
ZW
10799 gcc_cv_as_powerpc_mfcrf=no
10800 if test $in_tree_gas = yes; then
10801 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10802 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 10803fi
8ada417f 10804 elif test x$gcc_cv_as != x; then
6e3f3080 10805 echo "$conftest_s" > conftest.s
ba479fd2
NN
10806 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10809 ac_status=$?
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); }; }
8ada417f
ZW
10812 then
10813 gcc_cv_as_powerpc_mfcrf=yes
10814 else
10815 echo "configure: failed program was" >&5
10816 cat conftest.s >&5
10817 fi
10818 rm -f conftest.o conftest.s
10819 fi
2c4a9cff 10820fi
ba479fd2
NN
10821echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
10822echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 10823if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
10824
10825cat >>confdefs.h <<\_ACEOF
2c4a9cff 10826#define HAVE_AS_MFCRF 1
ba479fd2 10827_ACEOF
ef1ecf87 10828
8ada417f
ZW
10829fi
10830 ;;
10831
10832 mips*-*-*)
ba479fd2
NN
10833 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10834echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10835if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10837else
10838 gcc_cv_as_mips_explicit_relocs=no
10839 if test $in_tree_gas = yes; then
10840 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10841 then gcc_cv_as_mips_explicit_relocs=yes
10842fi
10843 elif test x$gcc_cv_as != x; then
6e3f3080 10844 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
10845 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10847 (eval $ac_try) 2>&5
10848 ac_status=$?
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); }; }
8ada417f
ZW
10851 then
10852 gcc_cv_as_mips_explicit_relocs=yes
10853 else
10854 echo "configure: failed program was" >&5
10855 cat conftest.s >&5
ef1ecf87 10856 fi
8ada417f
ZW
10857 rm -f conftest.o conftest.s
10858 fi
10859fi
ba479fd2
NN
10860echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
10861echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
10862if test $gcc_cv_as_mips_explicit_relocs = yes; then
10863 if test x$target_cpu_default = x
10864 then target_cpu_default=MASK_EXPLICIT_RELOCS
10865 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
10866 fi
10867fi
10868
ef1ecf87 10869 ;;
1cb36a98 10870esac
9d147085
RH
10871# ??? Not all targets support dwarf2 debug_line, even within a version
10872# of gas. Moreover, we need to emit a valid instruction to trigger any
10873# info to the output file. So, as supported targets are added to gas 2.11,
10874# add some instruction here to (also) show we expect this might work.
10875# ??? Once 2.11 is released, probably need to add first known working
10876# version to the per-target configury.
10877case "$target" in
80486e06 10878 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 10879 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 10880 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
10881 insn="nop"
10882 ;;
10883 ia64*-*-*)
10884 insn="nop 0"
10885 ;;
2853bc5a
HPN
10886 mmix-*-*)
10887 insn="swym 0"
10888 ;;
8ada417f
ZW
10889esac
10890if test x"$insn" != x; then
10891 conftest_s="\
10892 .file 1 \"conftest.s\"
10893 .loc 1 3 0
10894 $insn"
ba479fd2
NN
10895 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
10896echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
10897if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
10898 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10899else
10900 gcc_cv_as_dwarf2_debug_line=no
10901 if test $in_tree_gas = yes; then
10902 if test $in_tree_gas_is_elf = yes \
10903 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10904 then gcc_cv_as_dwarf2_debug_line=yes
10905fi
10906 elif test x$gcc_cv_as != x; then
6e3f3080 10907 echo "$conftest_s" > conftest.s
ba479fd2
NN
10908 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10910 (eval $ac_try) 2>&5
10911 ac_status=$?
10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913 (exit $ac_status); }; }
8ada417f
ZW
10914 then
10915 # ??? This fails with non-gnu grep. Maybe use objdump?
10916 if grep debug_line conftest.o > /dev/null 2>&1; then
10917 gcc_cv_as_dwarf2_debug_line=yes
10918 fi
10919 else
10920 echo "configure: failed program was" >&5
10921 cat conftest.s >&5
10922 fi
10923 rm -f conftest.o conftest.s
10924 fi
10925fi
ba479fd2
NN
10926echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
10927echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 10928
ad9c4d9f 10929
8ada417f
ZW
10930# The .debug_line file table must be in the exact order that
10931# we specified the files, since these indices are also used
10932# by DW_AT_decl_file. Approximate this test by testing if
10933# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
10934 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
10935echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
10936if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10938else
10939 gcc_cv_as_dwarf2_file_buggy=no
10940 if test x$gcc_cv_as != x; then
6e3f3080 10941 echo ' .file 1 "foo.s"
8ada417f 10942 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
10943 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10945 (eval $ac_try) 2>&5
10946 ac_status=$?
10947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10948 (exit $ac_status); }; }
8ada417f
ZW
10949 then
10950 gcc_cv_as_dwarf2_file_buggy=yes
10951 else
10952 echo "configure: failed program was" >&5
10953 cat conftest.s >&5
10954 fi
10955 rm -f conftest.o conftest.s
10956 fi
ad9c4d9f 10957fi
ba479fd2
NN
10958echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
10959echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
10960
10961
10962 if test $gcc_cv_as_dwarf2_debug_line = yes \
10963 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
10964
10965cat >>confdefs.h <<\_ACEOF
9d147085 10966#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 10967_ACEOF
9d147085 10968
8ada417f 10969 fi
ad9c4d9f 10970
ba479fd2
NN
10971 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
10972echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
10973if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
10974 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10975else
10976 gcc_cv_as_gdwarf2_flag=no
10977 if test $in_tree_gas = yes; then
10978 if test $in_tree_gas_is_elf = yes \
10979 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10980 then gcc_cv_as_gdwarf2_flag=yes
10981fi
10982 elif test x$gcc_cv_as != x; then
6e3f3080 10983 echo "$insn" > conftest.s
ba479fd2
NN
10984 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
10985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10986 (eval $ac_try) 2>&5
10987 ac_status=$?
10988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10989 (exit $ac_status); }; }
8ada417f
ZW
10990 then
10991 gcc_cv_as_gdwarf2_flag=yes
10992 else
10993 echo "configure: failed program was" >&5
10994 cat conftest.s >&5
10995 fi
10996 rm -f conftest.o conftest.s
10997 fi
ad9c4d9f 10998fi
ba479fd2
NN
10999echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
11000echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 11001if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
11002
11003cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11004#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 11005_ACEOF
5f0e9ea2
GK
11006
11007fi
ad9c4d9f 11008
ba479fd2
NN
11009 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
11010echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
11011if test "${gcc_cv_as_gstabs_flag+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11013else
11014 gcc_cv_as_gstabs_flag=no
11015 if test $in_tree_gas = yes; then
11016 if test $in_tree_gas_is_elf = yes \
11017 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11018 then gcc_cv_as_gstabs_flag=yes
11019fi
11020 elif test x$gcc_cv_as != x; then
6e3f3080 11021 echo "$insn" > conftest.s
ba479fd2
NN
11022 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
11023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11024 (eval $ac_try) 2>&5
11025 ac_status=$?
11026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11027 (exit $ac_status); }; }
8ada417f
ZW
11028 then
11029 # The native Solaris 9/Intel assembler doesn't understand --gstabs
11030 # and warns about it, but still exits successfully. So check for
11031 # this.
ba479fd2
NN
11032 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
11033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11034 (eval $ac_try) 2>&5
11035 ac_status=$?
11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); }; }
8ada417f
ZW
11038 then :
11039 else gcc_cv_as_gstabs_flag=yes
11040 fi
11041 else
11042 echo "configure: failed program was" >&5
11043 cat conftest.s >&5
11044 fi
11045 rm -f conftest.o conftest.s
11046 fi
ad9c4d9f 11047fi
ba479fd2
NN
11048echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
11049echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 11050if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
11051
11052cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11053#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 11054_ACEOF
5f0e9ea2
GK
11055
11056fi
8ada417f 11057fi
5f0e9ea2 11058
ba479fd2
NN
11059echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
11060echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 11061gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 11062if test $in_tree_ld = yes ; then
5408ac6c
HPN
11063 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 \
11064 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
11065 gcc_cv_ld_ro_rw_mix=read-write
11066 fi
11067elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
11068 echo '.section myfoosect, "a"' > conftest1.s
11069 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 11070 echo '.byte 1' >> conftest2.s
90e145da 11071 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 11072 echo '.byte 0' >> conftest3.s
6cd656d0
KC
11073 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
11074 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
11075 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 11076 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 11077 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 11078 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 11079 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
11080 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
11081 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
11082 gcc_cv_ld_ro_rw_mix=read-only
11083 else
11084 gcc_cv_ld_ro_rw_mix=read-write
11085 fi
11086 fi
11087 fi
11088 rm -f conftest.* conftest[123].*
11089fi
11090if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
11091
11092cat >>confdefs.h <<\_ACEOF
96d0f4dc 11093#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 11094_ACEOF
96d0f4dc
JJ
11095
11096fi
ba479fd2
NN
11097echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
11098echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 11099
ba479fd2
NN
11100echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
11101echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 11102gcc_cv_ld_eh_frame_hdr=no
34a86c2b 11103if test $in_tree_ld = yes ; then
5408ac6c
HPN
11104 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 \
11105 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
11106 gcc_cv_ld_eh_frame_hdr=yes
11107 fi
11108elif test x$gcc_cv_ld != x; then
11109 # Check if linker supports --eh-frame-hdr option
11110 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
11111 gcc_cv_ld_eh_frame_hdr=yes
11112 fi
11113fi
11114if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
11115
11116cat >>confdefs.h <<\_ACEOF
275b60d6 11117#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 11118_ACEOF
275b60d6
JJ
11119
11120fi
ba479fd2
NN
11121echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
11122echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 11123
ba479fd2
NN
11124echo "$as_me:$LINENO: checking linker position independent executable support" >&5
11125echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
11126gcc_cv_ld_pie=no
11127if test $in_tree_ld = yes ; then
5408ac6c
HPN
11128 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 \
11129 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
11130 gcc_cv_ld_pie=yes
11131 fi
11132elif test x$gcc_cv_ld != x; then
11133 # Check if linker supports -pie option
11134 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
11135 gcc_cv_ld_pie=yes
11136 fi
11137fi
11138if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
11139
11140cat >>confdefs.h <<\_ACEOF
24a4dd31 11141#define HAVE_LD_PIE 1
ba479fd2 11142_ACEOF
24a4dd31
JJ
11143
11144fi
ba479fd2
NN
11145echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
11146echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 11147
9fb28a67 11148if test x$with_sysroot = x && test x$host = x$target \
047d636f 11149 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
11150
11151cat >>confdefs.h <<_ACEOF
793e9558 11152#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 11153_ACEOF
793e9558
PB
11154
11155fi
11156
861bb6c1 11157# Figure out what language subdirectories are present.
71205e0b
MH
11158# Look if the user specified --enable-languages="..."; if not, use
11159# the environment variable $LANGUAGES if defined. $LANGUAGES might
11160# go away some day.
cc9a08e0 11161# NB: embedded tabs in this IF block -- do not untabify
71205e0b
MH
11162if test x"${enable_languages+set}" != xset; then
11163 if test x"${LANGUAGES+set}" = xset; then
cc9a08e0 11164 enable_languages="${LANGUAGES}"
ba479fd2
NN
11165 { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5
11166echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;}
cc9a08e0 11167
71205e0b
MH
11168 else
11169 enable_languages=all
11170 fi
d6c6b553 11171else
015089dd
TJ
11172 if test x"${enable_languages}" = x \
11173 || test x"${enable_languages}" = xyes;
cc9a08e0 11174 then
ba479fd2
NN
11175 { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5
11176echo "$as_me: error: --enable-languages needs at least one language argument" >&2;}
11177 { (exit 1); exit 1; }; }
d6c6b553 11178 fi
71205e0b 11179fi
cc9a08e0 11180enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
75382c6d
TT
11181
11182# First scan to see if an enabled language requires some other language.
11183# We assume that a given config-lang.in will list all the language
11184# front ends it requires, even if some are required indirectly.
c406e779 11185for lang in ${srcdir}/*/config-lang.in
75382c6d
TT
11186do
11187 case $lang in
75382c6d
TT
11188 # The odd quoting in the next line works around
11189 # an apparent bug in bash 1.12 on linux.
11190 ${srcdir}/[*]/config-lang.in)
11191 ;;
11192 *)
11193 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
11194 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
11195 for other in $this_lang_requires
11196 do
11197 case ,${enable_languages}, in
11198 *,$other,*)
11199 ;;
11200 *,all,*)
11201 ;;
1bf17cc4 11202 *,$lang_alias,*)
75382c6d
TT
11203 enable_languages="$enable_languages,$other"
11204 ;;
11205 esac
11206 done
11207 ;;
11208 esac
11209done
11210
015089dd
TJ
11211expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
11212found_languages=
861bb6c1 11213subdirs=
c406e779 11214for lang in ${srcdir}/*/config-lang.in
861bb6c1
JL
11215do
11216 case $lang in
861bb6c1
JL
11217 # The odd quoting in the next line works around
11218 # an apparent bug in bash 1.12 on linux.
11219 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
11220 *)
11221 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
2b60b2cb
AO
11222 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
11223 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
71205e0b
MH
11224 if test "x$lang_alias" = x
11225 then
11226 echo "$lang doesn't set \$language." 1>&2
11227 exit 1
11228 fi
2b60b2cb
AO
11229 case ${build_by_default},${enable_languages}, in
11230 *,$lang_alias,*) add_this_lang=yes ;;
11231 no,*) add_this_lang=no ;;
11232 *,all,*) add_this_lang=yes ;;
11233 *) add_this_lang=no ;;
11234 esac
015089dd 11235 found_languages="${found_languages} ${lang_alias}"
71205e0b
MH
11236 if test x"${add_this_lang}" = xyes; then
11237 case $lang in
11238 ${srcdir}/ada/config-lang.in)
1ffc5c6e 11239 if test x$have_gnat = xyes ; then
71205e0b
MH
11240 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11241 fi
11242 ;;
11243 *)
11244 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11245 ;;
11246 esac
11247 fi
11248 ;;
861bb6c1
JL
11249 esac
11250done
11251
015089dd
TJ
11252missing_languages=
11253for expected_language in ${expected_languages} ..
ba479fd2 11254do
015089dd
TJ
11255 if test "${expected_language}" != ..; then
11256 missing_language="${expected_language}"
11257 if test "${expected_language}" = "c" \
11258 || test "${expected_language}" = "all"; then
11259 missing_language=
11260 fi
11261 for found_language in ${found_languages} ..
ba479fd2 11262 do
015089dd
TJ
11263 if test "${found_language}" != ..; then
11264 if test "${expected_language}" = "${found_language}"; then
11265 missing_language=
11266 fi
11267 fi
11268 done
11269 if test "x${missing_language}" != x; then
11270 missing_languages="${missing_languages} ${missing_language}"
11271 fi
11272 fi
11273done
11274
11275if test "x$missing_languages" != x; then
ba479fd2 11276 { { echo "$as_me:$LINENO: error:
015089dd 11277The following requested languages were not found:${missing_languages}
ba479fd2
NN
11278The following languages were available: c${found_languages}" >&5
11279echo "$as_me: error:
11280The following requested languages were not found:${missing_languages}
11281The following languages were available: c${found_languages}" >&2;}
11282 { (exit 1); exit 1; }; }
02ef40d9
TJ
11283fi
11284
f24af81b
TT
11285# Make gthr-default.h if we have a thread file.
11286gthread_flags=
75bffa71 11287if test $thread_file != single; then
f24af81b 11288 rm -f gthr-default.h
db0d1ed9 11289 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
11290 gthread_flags=-DHAVE_GTHR_DEFAULT
11291fi
11292
11293
81bf3d9e 11294# Find out what GC implementation we want, or may, use.
ba479fd2 11295
81bf3d9e
RH
11296# Check whether --with-gc or --without-gc was given.
11297if test "${with_gc+set}" = set; then
11298 withval="$with_gc"
11299 case "$withval" in
59415997 11300 page | zone)
81bf3d9e
RH
11301 GGC=ggc-$withval
11302 ;;
11303 *)
ba479fd2
NN
11304 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
11305echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
11306 { (exit 1); exit 1; }; }
81bf3d9e
RH
11307 ;;
11308esac
11309else
005537df 11310 GGC=ggc-page
ba479fd2 11311fi;
81bf3d9e
RH
11312
11313echo "Using $GGC for garbage collection."
11314
3c809ba4 11315# Use the system's zlib library.
b8dad04b
ZW
11316zlibdir=-L../zlib
11317zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 11318
3c809ba4
AG
11319# Check whether --with-system-zlib or --without-system-zlib was given.
11320if test "${with_system_zlib+set}" = set; then
11321 withval="$with_system_zlib"
11322 zlibdir=
11323zlibinc=
11324
ba479fd2 11325fi;
3c809ba4
AG
11326
11327
11328
dc6746e7 11329
ba479fd2
NN
11330echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
11331echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
11332 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
11333if test "${enable_maintainer_mode+set}" = set; then
11334 enableval="$enable_maintainer_mode"
11335 maintainer_mode=$enableval
11336else
11337 maintainer_mode=no
ba479fd2 11338fi;
63cf211a 11339
ba479fd2
NN
11340echo "$as_me:$LINENO: result: $maintainer_mode" >&5
11341echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
11342
11343if test "$maintainer_mode" = "yes"; then
11344 MAINT=''
11345else
11346 MAINT='#'
11347fi
11348
861bb6c1
JL
11349# Make empty files to contain the specs and options for each language.
11350# Then add #include lines to for a compiler that has specs and/or options.
11351
d7b42618 11352lang_opt_files=
861bb6c1 11353lang_specs_files=
3103b7db 11354lang_tree_files=
861bb6c1
JL
11355for subdir in . $subdirs
11356do
d7b42618
NB
11357 if test -f $srcdir/$subdir/lang.opt; then
11358 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
11359 fi
75bffa71 11360 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 11361 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 11362 fi
3103b7db 11363 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 11364 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 11365 fi
861bb6c1
JL
11366done
11367
11368# These (without "all_") are set in each config-lang.in.
11369# `language' must be a single word so is spelled singularly.
11370all_languages=
11371all_boot_languages=
11372all_compilers=
11373all_stagestuff=
6eb95e99 11374all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
861bb6c1 11375# List of language makefile fragments.
2ed26f6b
ZW
11376all_lang_makefrags=
11377# List of language subdirectory makefiles. Deprecated.
861bb6c1 11378all_lang_makefiles=
e2500fed 11379# Files for gengtype
ef69da62 11380all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
11381# Files for gengtype with language
11382all_gtfiles_files_langs=
11383all_gtfiles_files_files=
861bb6c1
JL
11384
11385# Add the language fragments.
11386# Languages are added via two mechanisms. Some information must be
11387# recorded in makefile variables, these are defined in config-lang.in.
11388# We accumulate them and plug them into the main Makefile.
11389# The other mechanism is a set of hooks for each of the main targets
11390# like `clean', `install', etc.
11391
861bb6c1 11392language_hooks="Make-hooks"
861bb6c1 11393
c406e779 11394for s in $subdirs
861bb6c1 11395do
861bb6c1
JL
11396 language=
11397 boot_language=
11398 compilers=
11399 stagestuff=
861bb6c1 11400 outputs=
e2500fed 11401 gtfiles=
861bb6c1 11402 . ${srcdir}/$s/config-lang.in
75bffa71 11403 if test "x$language" = x
861bb6c1
JL
11404 then
11405 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
11406 exit 1
11407 fi
2ed26f6b 11408 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 11409 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 11410 then all_lang_makefiles="$s/Makefile"
72aaffbd 11411 fi
861bb6c1 11412 all_languages="$all_languages $language"
75bffa71 11413 if test "x$boot_language" = xyes
861bb6c1
JL
11414 then
11415 all_boot_languages="$all_boot_languages $language"
11416 fi
11417 all_compilers="$all_compilers $compilers"
11418 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 11419 all_outputs="$all_outputs $outputs"
e2500fed 11420 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11421 for f in $gtfiles
8ac9d31f 11422 do
8ac9d31f
TJ
11423 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11424 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 11425 done
861bb6c1
JL
11426done
11427
8ac9d31f
TJ
11428# Pick up gtfiles for c
11429gtfiles=
11430s="c"
11431. ${srcdir}/c-config-lang.in
11432all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11433for f in $gtfiles
8ac9d31f 11434do
8ac9d31f
TJ
11435 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11436 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
11437done
11438
cbc59f01 11439check_languages=
c406e779 11440for language in $all_languages
cbc59f01 11441do
cbc59f01 11442 check_languages="$check_languages check-$language"
cbc59f01
DD
11443done
11444
62b81e45
MM
11445# We link each language in with a set of hooks, reached indirectly via
11446# lang.${target}.
861bb6c1
JL
11447
11448rm -f Make-hooks
11449touch Make-hooks
65ebbf81 11450target_list="all.build all.cross start.encap rest.encap tags \
a207b594 11451 install-normal install-common install-man \
03787dfd 11452 uninstall srcextra \
a03ad584 11453 mostlyclean clean distclean maintainer-clean \
8f231b5d 11454 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
11455for t in $target_list
11456do
11457 x=
c406e779 11458 for lang in $all_languages
861bb6c1 11459 do
ab87f8c8 11460 x="$x $lang.$t"
861bb6c1
JL
11461 done
11462 echo "lang.$t: $x" >> Make-hooks
11463done
11464
cc06d68c 11465# Create .gdbinit.
861bb6c1 11466
cc06d68c
GP
11467echo "dir ." > .gdbinit
11468echo "dir ${srcdir}" >> .gdbinit
11469if test x$gdb_needs_out_file_path = xyes
11470then
11471 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
11472fi
11473if test "x$subdirs" != x; then
11474 for s in $subdirs
11475 do
11476 echo "dir ${srcdir}/$s" >> .gdbinit
11477 done
861bb6c1 11478fi
cc06d68c 11479echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 11480
8f8d3278
NC
11481# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
11482# absolute path for gcc_tooldir based on inserting the number of up-directory
11483# movements required to get from $(exec_prefix) to $(prefix) into the basic
11484# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
11485# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
11486# make and thus we'd get different behavior depending on where we built the
11487# sources.
5949a9fc 11488if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 11489 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 11490else
8f8d3278
NC
11491# An explanation of the sed strings:
11492# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
11493# -e 's|/$||' match a trailing forward slash and eliminates it
11494# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 11495# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
11496#
11497# (*) Note this pattern overwrites the first character of the string
11498# with a forward slash if one is not already present. This is not a
11499# problem because the exact names of the sub-directories concerned is
11500# unimportant, just the number of them matters.
11501#
11502# The practical upshot of these patterns is like this:
11503#
11504# prefix exec_prefix result
11505# ------ ----------- ------
11506# /foo /foo/bar ../
11507# /foo/ /foo/bar ../
11508# /foo /foo/bar/ ../
11509# /foo/ /foo/bar/ ../
11510# /foo /foo/bar/ugg ../../
11511#
4c112cda 11512 dollar='$$'
caa55b1e 11513 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
11514fi
11515
11516
2ce3c6c6 11517
2bbea3a6
RH
11518# Find a directory in which to install a shared libgcc.
11519
11520# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
11521if test "${enable_version_specific_runtime_libs+set}" = set; then
11522 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
11523
11524fi;
2bbea3a6
RH
11525
11526
5b15f277
RH
11527# Check whether --with-slibdir or --without-slibdir was given.
11528if test "${with_slibdir+set}" = set; then
11529 withval="$with_slibdir"
11530 slibdir="$with_slibdir"
11531else
11532 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 11533 slibdir='$(libsubdir)'
5b15f277 11534elif test "$host" != "$target"; then
2bbea3a6
RH
11535 slibdir='$(build_tooldir)/lib'
11536else
5b15f277 11537 slibdir='$(libdir)'
2bbea3a6 11538fi
ba479fd2 11539fi;
2bbea3a6
RH
11540
11541
1e6347d8 11542objdir=`${PWDCMD-pwd}`
7e717196
JL
11543
11544
861bb6c1
JL
11545# Substitute configuration variables
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
9b16d2c4 11592
e9a25f70 11593
6e26218f 11594
c8724862 11595
e061d1ce 11596
d8bb17c8 11597
11642c3a
ZW
11598
11599
11600
11601
11602
11603
11604
3d9d2476 11605
596151e1 11606
8ac9d31f
TJ
11607
11608
11609
e2500fed 11610
51b9ff45
KC
11611
11612
861bb6c1
JL
11613
11614
6e3f3080
NN
11615# Echo link setup.
11616if test x${build} = x${host} ; then
11617 if test x${host} = x${target} ; then
11618 echo "Links are now set up to build a native compiler for ${target}." 1>&2
11619 else
11620 echo "Links are now set up to build a cross-compiler" 1>&2
11621 echo " from ${host} to ${target}." 1>&2
11622 fi
11623else
11624 if test x${host} = x${target} ; then
11625 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
11626 echo " for ${target}." 1>&2
11627 else
11628 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
11629 echo " from ${host} to ${target}." 1>&2
11630 fi
11631fi
11632
11633# Configure the subdirectories
11634# AC_CONFIG_SUBDIRS($subdirs)
11635
11636# Create the Makefile
11637# and configure language subdirectories
ba479fd2 11638 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
11639
11640
ba479fd2 11641 ac_config_commands="$ac_config_commands default"
914c5af7 11642
ba479fd2 11643cat >confcache <<\_ACEOF
6e3f3080
NN
11644# This file is a shell script that caches the results of configure
11645# tests run on this system so they can be shared between configure
ba479fd2
NN
11646# scripts and configure runs, see configure's option --config-cache.
11647# It is not useful on other systems. If it contains results you don't
11648# want to keep, you may remove or edit it.
6e3f3080 11649#
ba479fd2
NN
11650# config.status only pays attention to the cache file if you give it
11651# the --recheck option to rerun configure.
6e3f3080 11652#
ba479fd2
NN
11653# `ac_cv_env_foo' variables (set or unset) will be overridden when
11654# loading this file, other *unset* `ac_cv_foo' will be assigned the
11655# following values.
11656
11657_ACEOF
11658
6e3f3080
NN
11659# The following way of writing the cache mishandles newlines in values,
11660# but we know of no workaround that is simple, portable, and efficient.
11661# So, don't put newlines in cache variables' values.
11662# Ultrix sh set writes to stderr and can't be redirected directly,
11663# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
11664{
11665 (set) 2>&1 |
11666 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11667 *ac_space=\ *)
11668 # `set' does not quote correctly, so add quotes (double-quote
11669 # substitution turns \\\\ into \\, and sed turns \\ into \).
11670 sed -n \
11671 "s/'/'\\\\''/g;
11672 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11673 ;;
11674 *)
11675 # `set' quotes correctly as required by POSIX, so do not add quotes.
11676 sed -n \
11677 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11678 ;;
11679 esac;
11680} |
11681 sed '
11682 t clear
11683 : clear
11684 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11685 t end
11686 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11687 : end' >>confcache
11688if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 11689 if test -w $cache_file; then
ba479fd2
NN
11690 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11691 cat confcache >$cache_file
6e3f3080
NN
11692 else
11693 echo "not updating unwritable cache $cache_file"
11694 fi
11695fi
11696rm -f confcache
11697
11698test "x$prefix" = xNONE && prefix=$ac_default_prefix
11699# Let make expand exec_prefix.
11700test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11701
ba479fd2
NN
11702# VPATH may cause trouble with some makes, so we remove $(srcdir),
11703# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11704# trailing colons and then remove the whole line if VPATH becomes empty
11705# (actually we leave an empty line to preserve line numbers).
6e3f3080 11706if test "x$srcdir" = x.; then
ba479fd2
NN
11707 ac_vpsub='/^[ ]*VPATH[ ]*=/{
11708s/:*\$(srcdir):*/:/;
11709s/:*\${srcdir}:*/:/;
11710s/:*@srcdir@:*/:/;
11711s/^\([^=]*=[ ]*\):*/\1/;
11712s/:*$//;
11713s/^[^=]*=[ ]*$//;
11714}'
6e3f3080
NN
11715fi
11716
63cf211a 11717DEFS=-DHAVE_CONFIG_H
6e3f3080 11718
ba479fd2
NN
11719ac_libobjs=
11720ac_ltlibobjs=
11721for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11722 # 1. Remove the extension, and $U if already installed.
11723 ac_i=`echo "$ac_i" |
11724 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
11725 # 2. Add them.
11726 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
11727 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
11728done
11729LIBOBJS=$ac_libobjs
63cf211a 11730
ba479fd2
NN
11731LTLIBOBJS=$ac_ltlibobjs
11732
11733
11734
11735: ${CONFIG_STATUS=./config.status}
11736ac_clean_files_save=$ac_clean_files
11737ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11738{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11739echo "$as_me: creating $CONFIG_STATUS" >&6;}
11740cat >$CONFIG_STATUS <<_ACEOF
11741#! $SHELL
11742# Generated by $as_me.
6e3f3080
NN
11743# Run this file to recreate the current configuration.
11744# Compiler output produced by configure, useful for debugging
ba479fd2 11745# configure, is in config.log if it exists.
6e3f3080 11746
ba479fd2
NN
11747debug=false
11748ac_cs_recheck=false
11749ac_cs_silent=false
11750SHELL=\${CONFIG_SHELL-$SHELL}
11751_ACEOF
11752
11753cat >>$CONFIG_STATUS <<\_ACEOF
11754## --------------------- ##
11755## M4sh Initialization. ##
11756## --------------------- ##
11757
11758# Be Bourne compatible
11759if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11760 emulate sh
11761 NULLCMD=:
11762 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11763 # is contrary to our usage. Disable this feature.
11764 alias -g '${1+"$@"}'='"$@"'
11765elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11766 set -o posix
11767fi
11768
11769# Support unset when possible.
11770if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11771 as_unset=unset
11772else
11773 as_unset=false
11774fi
11775
11776
11777# Work around bugs in pre-3.0 UWIN ksh.
11778$as_unset ENV MAIL MAILPATH
11779PS1='$ '
11780PS2='> '
11781PS4='+ '
11782
11783# NLS nuisances.
11784for as_var in \
11785 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11786 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11787 LC_TELEPHONE LC_TIME
6e3f3080 11788do
ba479fd2
NN
11789 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
11790 eval $as_var=C; export $as_var
11791 else
11792 $as_unset $as_var
11793 fi
6e3f3080
NN
11794done
11795
ba479fd2
NN
11796# Required to use basename.
11797if expr a : '\(a\)' >/dev/null 2>&1; then
11798 as_expr=expr
11799else
11800 as_expr=false
11801fi
6e3f3080 11802
ba479fd2
NN
11803if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
11804 as_basename=basename
11805else
11806 as_basename=false
11807fi
6e3f3080
NN
11808
11809
ba479fd2
NN
11810# Name of the executable.
11811as_me=`$as_basename "$0" ||
11812$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11813 X"$0" : 'X\(//\)$' \| \
11814 X"$0" : 'X\(/\)$' \| \
11815 . : '\(.\)' 2>/dev/null ||
11816echo X/"$0" |
11817 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
11818 /^X\/\(\/\/\)$/{ s//\1/; q; }
11819 /^X\/\(\/\).*/{ s//\1/; q; }
11820 s/.*/./; q'`
11821
6e3f3080 11822
ba479fd2
NN
11823# PATH needs CR, and LINENO needs CR and PATH.
11824# Avoid depending upon Character Ranges.
11825as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11826as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11827as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11828as_cr_digits='0123456789'
11829as_cr_alnum=$as_cr_Letters$as_cr_digits
11830
11831# The user is always right.
11832if test "${PATH_SEPARATOR+set}" != set; then
11833 echo "#! /bin/sh" >conf$$.sh
11834 echo "exit 0" >>conf$$.sh
11835 chmod +x conf$$.sh
11836 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11837 PATH_SEPARATOR=';'
6e3f3080 11838 else
ba479fd2
NN
11839 PATH_SEPARATOR=:
11840 fi
11841 rm -f conf$$.sh
11842fi
11843
11844
11845 as_lineno_1=$LINENO
11846 as_lineno_2=$LINENO
11847 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11848 test "x$as_lineno_1" != "x$as_lineno_2" &&
11849 test "x$as_lineno_3" = "x$as_lineno_2" || {
11850 # Find who we are. Look in the path if we contain no path at all
11851 # relative or not.
11852 case $0 in
11853 *[\\/]* ) as_myself=$0 ;;
11854 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11855for as_dir in $PATH
11856do
11857 IFS=$as_save_IFS
11858 test -z "$as_dir" && as_dir=.
11859 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11860done
11861
11862 ;;
11863 esac
11864 # We did not find ourselves, most probably we were run as `sh COMMAND'
11865 # in which case we are not to be found in the path.
11866 if test "x$as_myself" = x; then
11867 as_myself=$0
11868 fi
11869 if test ! -f "$as_myself"; then
11870 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
11871echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
11872 { (exit 1); exit 1; }; }
6e3f3080 11873 fi
ba479fd2
NN
11874 case $CONFIG_SHELL in
11875 '')
11876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11877for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
11878do
11879 IFS=$as_save_IFS
11880 test -z "$as_dir" && as_dir=.
11881 for as_base in sh bash ksh sh5; do
11882 case $as_dir in
11883 /*)
11884 if ("$as_dir/$as_base" -c '
11885 as_lineno_1=$LINENO
11886 as_lineno_2=$LINENO
11887 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11888 test "x$as_lineno_1" != "x$as_lineno_2" &&
11889 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
11890 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
11891 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
11892 CONFIG_SHELL=$as_dir/$as_base
11893 export CONFIG_SHELL
11894 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
11895 fi;;
11896 esac
11897 done
11898done
11899;;
11900 esac
11901
11902 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11903 # uniformly replaced by the line number. The first 'sed' inserts a
11904 # line-number line before each line; the second 'sed' does the real
11905 # work. The second script uses 'N' to pair each line-number line
11906 # with the numbered line, and appends trailing '-' during
11907 # substitution so that $LINENO is not a special case at line end.
11908 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11909 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
11910 sed '=' <$as_myself |
11911 sed '
11912 N
11913 s,$,-,
11914 : loop
11915 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
11916 t loop
11917 s,-$,,
11918 s,^['$as_cr_digits']*\n,,
11919 ' >$as_me.lineno &&
11920 chmod +x $as_me.lineno ||
11921 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
11922echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
11923 { (exit 1); exit 1; }; }
11924
11925 # Don't try to exec as it changes $[0], causing all sort of problems
11926 # (the dirname of $[0] is not the place where we might find the
11927 # original and so on. Autoconf is especially sensible to this).
11928 . ./$as_me.lineno
11929 # Exit status is that of the last command.
11930 exit
11931}
11932
11933
11934case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
11935 *c*,-n*) ECHO_N= ECHO_C='
11936' ECHO_T=' ' ;;
11937 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
11938 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
11939esac
11940
11941if expr a : '\(a\)' >/dev/null 2>&1; then
11942 as_expr=expr
11943else
11944 as_expr=false
11945fi
11946
11947rm -f conf$$ conf$$.exe conf$$.file
11948echo >conf$$.file
11949if ln -s conf$$.file conf$$ 2>/dev/null; then
11950 # We could just check for DJGPP; but this test a) works b) is more generic
11951 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11952 if test -f conf$$.exe; then
11953 # Don't use ln at all; we don't have any links
11954 as_ln_s='cp -p'
6e3f3080 11955 else
ba479fd2 11956 as_ln_s='ln -s'
6e3f3080 11957 fi
ba479fd2
NN
11958elif ln conf$$.file conf$$ 2>/dev/null; then
11959 as_ln_s=ln
11960else
11961 as_ln_s='cp -p'
11962fi
11963rm -f conf$$ conf$$.exe conf$$.file
11964
11965if mkdir -p . 2>/dev/null; then
11966 as_mkdir_p=:
11967else
11968 as_mkdir_p=false
11969fi
11970
11971as_executable_p="test -f"
11972
11973# Sed expression to map a string onto a valid CPP name.
11974as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
11975
11976# Sed expression to map a string onto a valid variable name.
11977as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
11978
11979
11980# IFS
11981# We need space, tab and new line, in precisely that order.
11982as_nl='
11983'
11984IFS=" $as_nl"
11985
11986# CDPATH.
11987$as_unset CDPATH
11988
11989exec 6>&1
11990
11991# Open the log real soon, to keep \$[0] and so on meaningful, and to
11992# report actual input values of CONFIG_FILES etc. instead of their
11993# values after options handling. Logging --version etc. is OK.
11994exec 5>>config.log
11995{
11996 echo
11997 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11998## Running $as_me. ##
11999_ASBOX
12000} >&5
12001cat >&5 <<_CSEOF
12002
12003This file was extended by $as_me, which was
12004generated by GNU Autoconf 2.57. Invocation command line was
12005
12006 CONFIG_FILES = $CONFIG_FILES
12007 CONFIG_HEADERS = $CONFIG_HEADERS
12008 CONFIG_LINKS = $CONFIG_LINKS
12009 CONFIG_COMMANDS = $CONFIG_COMMANDS
12010 $ $0 $@
12011
12012_CSEOF
12013echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12014echo >&5
12015_ACEOF
12016
12017# Files that config.status was made for.
12018if test -n "$ac_config_files"; then
12019 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12020fi
12021
12022if test -n "$ac_config_headers"; then
12023 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12024fi
12025
12026if test -n "$ac_config_links"; then
12027 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12028fi
12029
12030if test -n "$ac_config_commands"; then
12031 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12032fi
12033
12034cat >>$CONFIG_STATUS <<\_ACEOF
12035
12036ac_cs_usage="\
12037\`$as_me' instantiates files from templates according to the
12038current configuration.
12039
12040Usage: $0 [OPTIONS] [FILE]...
12041
12042 -h, --help print this help, then exit
12043 -V, --version print version number, then exit
12044 -q, --quiet do not print progress messages
12045 -d, --debug don't remove temporary files
12046 --recheck update $as_me by reconfiguring in the same conditions
12047 --file=FILE[:TEMPLATE]
12048 instantiate the configuration file FILE
12049 --header=FILE[:TEMPLATE]
12050 instantiate the configuration header FILE
12051
12052Configuration files:
12053$config_files
12054
12055Configuration headers:
12056$config_headers
12057
12058Configuration commands:
12059$config_commands
12060
12061Report bugs to <bug-autoconf@gnu.org>."
12062_ACEOF
12063
12064cat >>$CONFIG_STATUS <<_ACEOF
12065ac_cs_version="\\
12066config.status
12067configured by $0, generated by GNU Autoconf 2.57,
12068 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12069
12070Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12071Free Software Foundation, Inc.
12072This config.status script is free software; the Free Software Foundation
12073gives unlimited permission to copy, distribute and modify it."
12074srcdir=$srcdir
12075_ACEOF
12076
12077cat >>$CONFIG_STATUS <<\_ACEOF
12078# If no file are specified by the user, then we need to provide default
12079# value. By we need to know if files were specified by the user.
12080ac_need_defaults=:
12081while test $# != 0
12082do
12083 case $1 in
12084 --*=*)
12085 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12086 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12087 ac_shift=:
12088 ;;
12089 -*)
12090 ac_option=$1
12091 ac_optarg=$2
12092 ac_shift=shift
12093 ;;
12094 *) # This is not an option, so the user has probably given explicit
12095 # arguments.
12096 ac_option=$1
12097 ac_need_defaults=false;;
12098 esac
12099
12100 case $ac_option in
12101 # Handling of the options.
12102_ACEOF
12103cat >>$CONFIG_STATUS <<\_ACEOF
12104 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12105 ac_cs_recheck=: ;;
12106 --version | --vers* | -V )
12107 echo "$ac_cs_version"; exit 0 ;;
12108 --he | --h)
12109 # Conflict between --help and --header
12110 { { echo "$as_me:$LINENO: error: ambiguous option: $1
12111Try \`$0 --help' for more information." >&5
12112echo "$as_me: error: ambiguous option: $1
12113Try \`$0 --help' for more information." >&2;}
12114 { (exit 1); exit 1; }; };;
12115 --help | --hel | -h )
12116 echo "$ac_cs_usage"; exit 0 ;;
12117 --debug | --d* | -d )
12118 debug=: ;;
12119 --file | --fil | --fi | --f )
12120 $ac_shift
12121 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12122 ac_need_defaults=false;;
12123 --header | --heade | --head | --hea )
12124 $ac_shift
12125 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12126 ac_need_defaults=false;;
12127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12128 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12129 ac_cs_silent=: ;;
12130
12131 # This is an error.
12132 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12133Try \`$0 --help' for more information." >&5
12134echo "$as_me: error: unrecognized option: $1
12135Try \`$0 --help' for more information." >&2;}
12136 { (exit 1); exit 1; }; } ;;
12137
12138 *) ac_config_targets="$ac_config_targets $1" ;;
12139
12140 esac
12141 shift
6e3f3080 12142done
ba479fd2
NN
12143
12144ac_configure_extra_args=
12145
12146if $ac_cs_silent; then
12147 exec 6>/dev/null
12148 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
12149fi
12150
ba479fd2
NN
12151_ACEOF
12152cat >>$CONFIG_STATUS <<_ACEOF
12153if \$ac_cs_recheck; then
12154 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12155 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12156fi
861bb6c1 12157
ba479fd2
NN
12158_ACEOF
12159
12160cat >>$CONFIG_STATUS <<_ACEOF
12161#
12162# INIT-COMMANDS section.
12163#
12164
12165subdirs='$subdirs'
12166symbolic_link='$symbolic_link'
12167
12168
12169_ACEOF
12170
12171
12172
12173cat >>$CONFIG_STATUS <<\_ACEOF
12174for ac_config_target in $ac_config_targets
12175do
12176 case "$ac_config_target" in
12177 # Handling of arguments.
12178 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
12179 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12180 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
12181 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12182echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12183 { (exit 1); exit 1; }; };;
861bb6c1 12184 esac
ba479fd2
NN
12185done
12186
12187# If the user did not use the arguments to specify the items to instantiate,
12188# then the envvar interface is used. Set only those that are not.
12189# We use the long form for the default assignment because of an extremely
12190# bizarre bug on SunOS 4.1.3.
12191if $ac_need_defaults; then
12192 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12193 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12194 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12195fi
12196
12197# Have a temporary directory for convenience. Make it in the build tree
12198# simply because there is no reason to put it here, and in addition,
12199# creating and moving files from /tmp can sometimes cause problems.
12200# Create a temporary directory, and hook for its removal unless debugging.
12201$debug ||
12202{
12203 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12204 trap '{ (exit 1); exit 1; }' 1 2 13 15
12205}
861bb6c1 12206
ba479fd2 12207# Create a (secure) tmp directory for tmp files.
6e3f3080 12208
ba479fd2
NN
12209{
12210 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
12211 test -n "$tmp" && test -d "$tmp"
12212} ||
12213{
12214 tmp=./confstat$$-$RANDOM
12215 (umask 077 && mkdir $tmp)
12216} ||
12217{
12218 echo "$me: cannot create a temporary directory in ." >&2
12219 { (exit 1); exit 1; }
12220}
12221
12222_ACEOF
12223
12224cat >>$CONFIG_STATUS <<_ACEOF
12225
12226#
12227# CONFIG_FILES section.
12228#
12229
12230# No need to generate the scripts if there are no CONFIG_FILES.
12231# This happens for instance when ./config.status config.h
12232if test -n "\$CONFIG_FILES"; then
12233 # Protect against being on the right side of a sed subst in config.status.
12234 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12235 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12236s,@SHELL@,$SHELL,;t t
12237s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12238s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12239s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12240s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12241s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12242s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12243s,@exec_prefix@,$exec_prefix,;t t
12244s,@prefix@,$prefix,;t t
12245s,@program_transform_name@,$program_transform_name,;t t
12246s,@bindir@,$bindir,;t t
12247s,@sbindir@,$sbindir,;t t
12248s,@libexecdir@,$libexecdir,;t t
12249s,@datadir@,$datadir,;t t
12250s,@sysconfdir@,$sysconfdir,;t t
12251s,@sharedstatedir@,$sharedstatedir,;t t
12252s,@localstatedir@,$localstatedir,;t t
12253s,@libdir@,$libdir,;t t
12254s,@includedir@,$includedir,;t t
12255s,@oldincludedir@,$oldincludedir,;t t
12256s,@infodir@,$infodir,;t t
12257s,@mandir@,$mandir,;t t
12258s,@build_alias@,$build_alias,;t t
12259s,@host_alias@,$host_alias,;t t
12260s,@target_alias@,$target_alias,;t t
12261s,@DEFS@,$DEFS,;t t
12262s,@ECHO_C@,$ECHO_C,;t t
12263s,@ECHO_N@,$ECHO_N,;t t
12264s,@ECHO_T@,$ECHO_T,;t t
12265s,@LIBS@,$LIBS,;t t
12266s,@build@,$build,;t t
12267s,@build_cpu@,$build_cpu,;t t
12268s,@build_vendor@,$build_vendor,;t t
12269s,@build_os@,$build_os,;t t
12270s,@host@,$host,;t t
12271s,@host_cpu@,$host_cpu,;t t
12272s,@host_vendor@,$host_vendor,;t t
12273s,@host_os@,$host_os,;t t
12274s,@target@,$target,;t t
12275s,@target_cpu@,$target_cpu,;t t
12276s,@target_vendor@,$target_vendor,;t t
12277s,@target_os@,$target_os,;t t
12278s,@build_subdir@,$build_subdir,;t t
12279s,@host_subdir@,$host_subdir,;t t
12280s,@target_subdir@,$target_subdir,;t t
03787dfd 12281s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
12282s,@CC@,$CC,;t t
12283s,@CFLAGS@,$CFLAGS,;t t
12284s,@LDFLAGS@,$LDFLAGS,;t t
12285s,@CPPFLAGS@,$CPPFLAGS,;t t
12286s,@ac_ct_CC@,$ac_ct_CC,;t t
12287s,@EXEEXT@,$EXEEXT,;t t
12288s,@OBJEXT@,$OBJEXT,;t t
12289s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
12290s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
12291s,@CPP@,$CPP,;t t
12292s,@GNATBIND@,$GNATBIND,;t t
12293s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
12294s,@strict1_warn@,$strict1_warn,;t t
12295s,@warn_cflags@,$warn_cflags,;t t
12296s,@WERROR@,$WERROR,;t t
12297s,@nocommon_flag@,$nocommon_flag,;t t
12298s,@EGREP@,$EGREP,;t t
12299s,@valgrind_path@,$valgrind_path,;t t
12300s,@valgrind_path_defines@,$valgrind_path_defines,;t t
12301s,@valgrind_command@,$valgrind_command,;t t
12302s,@coverage_flags@,$coverage_flags,;t t
12303s,@enable_multilib@,$enable_multilib,;t t
12304s,@enable_shared@,$enable_shared,;t t
12305s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
12306s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
12307s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
12308s,@onestep@,$onestep,;t t
12309s,@SET_MAKE@,$SET_MAKE,;t t
12310s,@AWK@,$AWK,;t t
12311s,@LN@,$LN,;t t
12312s,@LN_S@,$LN_S,;t t
12313s,@RANLIB@,$RANLIB,;t t
12314s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12315s,@INSTALL@,$INSTALL,;t t
12316s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12317s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12318s,@make_compare_target@,$make_compare_target,;t t
12319s,@have_mktemp_command@,$have_mktemp_command,;t t
12320s,@MAKEINFO@,$MAKEINFO,;t t
12321s,@BUILD_INFO@,$BUILD_INFO,;t t
12322s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
12323s,@FLEX@,$FLEX,;t t
12324s,@BISON@,$BISON,;t t
12325s,@stage1_cflags@,$stage1_cflags,;t t
12326s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
12327s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
12328s,@LDEXP_LIB@,$LDEXP_LIB,;t t
12329s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
12330s,@LIBICONV@,$LIBICONV,;t t
12331s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
12332s,@manext@,$manext,;t t
12333s,@objext@,$objext,;t t
12334s,@extra_modes_file@,$extra_modes_file,;t t
12335s,@FORBUILD@,$FORBUILD,;t t
12336s,@PACKAGE@,$PACKAGE,;t t
12337s,@VERSION@,$VERSION,;t t
12338s,@USE_NLS@,$USE_NLS,;t t
12339s,@LIBINTL@,$LIBINTL,;t t
12340s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
12341s,@INCINTL@,$INCINTL,;t t
12342s,@XGETTEXT@,$XGETTEXT,;t t
12343s,@GMSGFMT@,$GMSGFMT,;t t
12344s,@POSUB@,$POSUB,;t t
12345s,@CATALOGS@,$CATALOGS,;t t
12346s,@CROSS@,$CROSS,;t t
12347s,@ALL@,$ALL,;t t
12348s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
12349s,@inhibit_libc@,$inhibit_libc,;t t
12350s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t
12351s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t
12352s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
12353s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12354s,@STMP_FIXINC@,$STMP_FIXINC,;t t
12355s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
12356s,@libgcc_visibility@,$libgcc_visibility,;t t
12357s,@gthread_flags@,$gthread_flags,;t t
12358s,@GGC@,$GGC,;t t
12359s,@zlibdir@,$zlibdir,;t t
12360s,@zlibinc@,$zlibinc,;t t
12361s,@MAINT@,$MAINT,;t t
12362s,@gcc_tooldir@,$gcc_tooldir,;t t
12363s,@dollar@,$dollar,;t t
12364s,@slibdir@,$slibdir,;t t
12365s,@objdir@,$objdir,;t t
12366s,@subdirs@,$subdirs,;t t
12367s,@srcdir@,$srcdir,;t t
12368s,@docobjdir@,$docobjdir,;t t
ba479fd2
NN
12369s,@all_boot_languages@,$all_boot_languages,;t t
12370s,@all_compilers@,$all_compilers,;t t
12371s,@all_gtfiles@,$all_gtfiles,;t t
12372s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
12373s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
12374s,@all_lang_makefrags@,$all_lang_makefrags,;t t
12375s,@all_lang_makefiles@,$all_lang_makefiles,;t t
12376s,@all_languages@,$all_languages,;t t
12377s,@all_stagestuff@,$all_stagestuff,;t t
12378s,@build_exeext@,$build_exeext,;t t
12379s,@build_install_headers_dir@,$build_install_headers_dir,;t t
12380s,@build_xm_file_list@,$build_xm_file_list,;t t
12381s,@build_xm_include_list@,$build_xm_include_list,;t t
12382s,@build_xm_defines@,$build_xm_defines,;t t
12383s,@check_languages@,$check_languages,;t t
12384s,@cc_set_by_configure@,$cc_set_by_configure,;t t
12385s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
12386s,@cpp_install_dir@,$cpp_install_dir,;t t
12387s,@xmake_file@,$xmake_file,;t t
12388s,@tmake_file@,$tmake_file,;t t
12389s,@extra_headers_list@,$extra_headers_list,;t t
12390s,@extra_objs@,$extra_objs,;t t
12391s,@extra_parts@,$extra_parts,;t t
12392s,@extra_passes@,$extra_passes,;t t
12393s,@extra_programs@,$extra_programs,;t t
12394s,@float_h_file@,$float_h_file,;t t
12395s,@gcc_config_arguments@,$gcc_config_arguments,;t t
12396s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
12397s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
12398s,@gcc_version@,$gcc_version,;t t
12399s,@gcc_version_full@,$gcc_version_full,;t t
12400s,@gcc_version_trigger@,$gcc_version_trigger,;t t
12401s,@host_exeext@,$host_exeext,;t t
12402s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t
12403s,@host_xm_file_list@,$host_xm_file_list,;t t
12404s,@host_xm_include_list@,$host_xm_include_list,;t t
12405s,@host_xm_defines@,$host_xm_defines,;t t
12406s,@out_host_hook_obj@,$out_host_hook_obj,;t t
12407s,@install@,$install,;t t
12408s,@lang_opt_files@,$lang_opt_files,;t t
12409s,@lang_specs_files@,$lang_specs_files,;t t
12410s,@lang_tree_files@,$lang_tree_files,;t t
12411s,@local_prefix@,$local_prefix,;t t
12412s,@md_file@,$md_file,;t t
12413s,@objc_boehm_gc@,$objc_boehm_gc,;t t
12414s,@out_file@,$out_file,;t t
12415s,@out_object_file@,$out_object_file,;t t
12416s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
12417s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
12418s,@symbolic_link@,$symbolic_link,;t t
12419s,@thread_file@,$thread_file,;t t
12420s,@tm_file_list@,$tm_file_list,;t t
12421s,@tm_include_list@,$tm_include_list,;t t
12422s,@tm_defines@,$tm_defines,;t t
12423s,@tm_p_file_list@,$tm_p_file_list,;t t
12424s,@tm_p_include_list@,$tm_p_include_list,;t t
12425s,@xm_file_list@,$xm_file_list,;t t
12426s,@xm_include_list@,$xm_include_list,;t t
12427s,@xm_defines@,$xm_defines,;t t
12428s,@target_noncanonical@,$target_noncanonical,;t t
12429s,@c_target_objs@,$c_target_objs,;t t
12430s,@cxx_target_objs@,$cxx_target_objs,;t t
12431s,@target_cpu_default@,$target_cpu_default,;t t
12432s,@LIBOBJS@,$LIBOBJS,;t t
12433s,@LTLIBOBJS@,$LTLIBOBJS,;t t
12434/@language_hooks@/r $language_hooks
12435s,@language_hooks@,,;t t
12436CEOF
12437
12438_ACEOF
12439
12440 cat >>$CONFIG_STATUS <<\_ACEOF
12441 # Split the substitutions into bite-sized pieces for seds with
12442 # small command number limits, like on Digital OSF/1 and HP-UX.
12443 ac_max_sed_lines=48
12444 ac_sed_frag=1 # Number of current file.
12445 ac_beg=1 # First line for current file.
12446 ac_end=$ac_max_sed_lines # Line after last line for current file.
12447 ac_more_lines=:
12448 ac_sed_cmds=
12449 while $ac_more_lines; do
12450 if test $ac_beg -gt 1; then
12451 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12452 else
12453 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12454 fi
12455 if test ! -s $tmp/subs.frag; then
12456 ac_more_lines=false
12457 else
12458 # The purpose of the label and of the branching condition is to
12459 # speed up the sed processing (if there are no `@' at all, there
12460 # is no need to browse any of the substitutions).
12461 # These are the two extra sed commands mentioned above.
12462 (echo ':t
12463 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12464 if test -z "$ac_sed_cmds"; then
12465 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12466 else
12467 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12468 fi
12469 ac_sed_frag=`expr $ac_sed_frag + 1`
12470 ac_beg=$ac_end
12471 ac_end=`expr $ac_end + $ac_max_sed_lines`
12472 fi
12473 done
12474 if test -z "$ac_sed_cmds"; then
12475 ac_sed_cmds=cat
63cf211a 12476 fi
ba479fd2 12477fi # test -n "$CONFIG_FILES"
cafe096b 12478
ba479fd2
NN
12479_ACEOF
12480cat >>$CONFIG_STATUS <<\_ACEOF
12481for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12482 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12483 case $ac_file in
12484 - | *:- | *:-:* ) # input from stdin
12485 cat >$tmp/stdin
12486 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12487 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12488 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12489 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12490 * ) ac_file_in=$ac_file.in ;;
63cf211a 12491 esac
cafe096b 12492
ba479fd2
NN
12493 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12494 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12495$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12496 X"$ac_file" : 'X\(//\)[^/]' \| \
12497 X"$ac_file" : 'X\(//\)$' \| \
12498 X"$ac_file" : 'X\(/\)' \| \
12499 . : '\(.\)' 2>/dev/null ||
12500echo X"$ac_file" |
12501 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12502 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12503 /^X\(\/\/\)$/{ s//\1/; q; }
12504 /^X\(\/\).*/{ s//\1/; q; }
12505 s/.*/./; q'`
12506 { if $as_mkdir_p; then
12507 mkdir -p "$ac_dir"
12508 else
12509 as_dir="$ac_dir"
12510 as_dirs=
12511 while test ! -d "$as_dir"; do
12512 as_dirs="$as_dir $as_dirs"
12513 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12514$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12515 X"$as_dir" : 'X\(//\)[^/]' \| \
12516 X"$as_dir" : 'X\(//\)$' \| \
12517 X"$as_dir" : 'X\(/\)' \| \
12518 . : '\(.\)' 2>/dev/null ||
12519echo X"$as_dir" |
12520 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12521 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12522 /^X\(\/\/\)$/{ s//\1/; q; }
12523 /^X\(\/\).*/{ s//\1/; q; }
12524 s/.*/./; q'`
12525 done
12526 test ! -n "$as_dirs" || mkdir $as_dirs
12527 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12528echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12529 { (exit 1); exit 1; }; }; }
6e3f3080 12530
ba479fd2
NN
12531 ac_builddir=.
12532
12533if test "$ac_dir" != .; then
12534 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12535 # A "../" for each directory in $ac_dir_suffix.
12536 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12537else
12538 ac_dir_suffix= ac_top_builddir=
12539fi
12540
12541case $srcdir in
12542 .) # No --srcdir option. We are building in place.
12543 ac_srcdir=.
12544 if test -z "$ac_top_builddir"; then
12545 ac_top_srcdir=.
12546 else
12547 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12548 fi ;;
12549 [\\/]* | ?:[\\/]* ) # Absolute path.
12550 ac_srcdir=$srcdir$ac_dir_suffix;
12551 ac_top_srcdir=$srcdir ;;
12552 *) # Relative path.
12553 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12554 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12555esac
12556# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12557# absolute.
12558ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12559ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12560ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12561ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12562
12563
12564
12565 if test x"$ac_file" != x-; then
12566 { echo "$as_me:$LINENO: creating $ac_file" >&5
12567echo "$as_me: creating $ac_file" >&6;}
12568 rm -f "$ac_file"
12569 fi
12570 # Let's still pretend it is `configure' which instantiates (i.e., don't
12571 # use $as_me), people would be surprised to read:
12572 # /* config.h. Generated by config.status. */
12573 if test x"$ac_file" = x-; then
12574 configure_input=
12575 else
12576 configure_input="$ac_file. "
12577 fi
12578 configure_input=$configure_input"Generated from `echo $ac_file_in |
12579 sed 's,.*/,,'` by configure."
12580
12581 # First look for the input files in the build tree, otherwise in the
12582 # src tree.
12583 ac_file_inputs=`IFS=:
12584 for f in $ac_file_in; do
12585 case $f in
12586 -) echo $tmp/stdin ;;
12587 [\\/$]*)
12588 # Absolute (can't be DOS-style, as IFS=:)
12589 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12590echo "$as_me: error: cannot find input file: $f" >&2;}
12591 { (exit 1); exit 1; }; }
12592 echo $f;;
12593 *) # Relative
12594 if test -f "$f"; then
12595 # Build tree
12596 echo $f
12597 elif test -f "$srcdir/$f"; then
12598 # Source tree
12599 echo $srcdir/$f
12600 else
12601 # /dev/null tree
12602 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12603echo "$as_me: error: cannot find input file: $f" >&2;}
12604 { (exit 1); exit 1; }; }
12605 fi;;
12606 esac
12607 done` || { (exit 1); exit 1; }
12608_ACEOF
12609cat >>$CONFIG_STATUS <<_ACEOF
12610 sed "$ac_vpsub
12611$extrasub
12612_ACEOF
12613cat >>$CONFIG_STATUS <<\_ACEOF
12614:t
12615/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12616s,@configure_input@,$configure_input,;t t
12617s,@srcdir@,$ac_srcdir,;t t
12618s,@abs_srcdir@,$ac_abs_srcdir,;t t
12619s,@top_srcdir@,$ac_top_srcdir,;t t
12620s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
12621s,@builddir@,$ac_builddir,;t t
12622s,@abs_builddir@,$ac_abs_builddir,;t t
12623s,@top_builddir@,$ac_top_builddir,;t t
12624s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
12625" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12626 rm -f $tmp/stdin
12627 if test x"$ac_file" != x-; then
12628 mv $tmp/out $ac_file
12629 else
12630 cat $tmp/out
12631 rm -f $tmp/out
12632 fi
12633
12634done
12635_ACEOF
12636cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 12637
ba479fd2
NN
12638#
12639# CONFIG_HEADER section.
12640#
861bb6c1
JL
12641
12642# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12643# NAME is the cpp macro being defined and VALUE is the value it is being given.
12644#
12645# ac_d sets the value in "#define NAME VALUE" lines.
ba479fd2
NN
12646ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
12647ac_dB='[ ].*$,\1#\2'
12648ac_dC=' '
12649ac_dD=',;t'
12650# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12651ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
12652ac_uB='$,\1#\2define\3'
861bb6c1 12653ac_uC=' '
ba479fd2
NN
12654ac_uD=',;t'
12655
12656for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 12657 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
12658 case $ac_file in
12659 - | *:- | *:-:* ) # input from stdin
12660 cat >$tmp/stdin
12661 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12662 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12663 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12664 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12665 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
12666 esac
12667
ba479fd2
NN
12668 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
12669echo "$as_me: creating $ac_file" >&6;}
12670
12671 # First look for the input files in the build tree, otherwise in the
12672 # src tree.
12673 ac_file_inputs=`IFS=:
12674 for f in $ac_file_in; do
12675 case $f in
12676 -) echo $tmp/stdin ;;
12677 [\\/$]*)
12678 # Absolute (can't be DOS-style, as IFS=:)
12679 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12680echo "$as_me: error: cannot find input file: $f" >&2;}
12681 { (exit 1); exit 1; }; }
12682 echo $f;;
12683 *) # Relative
12684 if test -f "$f"; then
12685 # Build tree
12686 echo $f
12687 elif test -f "$srcdir/$f"; then
12688 # Source tree
12689 echo $srcdir/$f
12690 else
12691 # /dev/null tree
12692 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12693echo "$as_me: error: cannot find input file: $f" >&2;}
12694 { (exit 1); exit 1; }; }
12695 fi;;
12696 esac
12697 done` || { (exit 1); exit 1; }
12698 # Remove the trailing spaces.
12699 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
12700
12701_ACEOF
12702
12703# Transform confdefs.h into two sed scripts, `conftest.defines' and
12704# `conftest.undefs', that substitutes the proper values into
12705# config.h.in to produce config.h. The first handles `#define'
12706# templates, and the second `#undef' templates.
12707# And first: Protect against being on the right side of a sed subst in
12708# config.status. Protect against being in an unquoted here document
12709# in config.status.
12710rm -f conftest.defines conftest.undefs
12711# Using a here document instead of a string reduces the quoting nightmare.
12712# Putting comments in sed scripts is not portable.
12713#
12714# `end' is used to avoid that the second main sed command (meant for
12715# 0-ary CPP macros) applies to n-ary macro definitions.
12716# See the Autoconf documentation for `clear'.
12717cat >confdef2sed.sed <<\_ACEOF
12718s/[\\&,]/\\&/g
12719s,[\\$`],\\&,g
12720t clear
12721: clear
12722s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
12723t end
12724s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
12725: end
12726_ACEOF
12727# If some macros were called several times there might be several times
12728# the same #defines, which is useless. Nevertheless, we may not want to
12729# sort them, since we want the *last* AC-DEFINE to be honored.
12730uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
12731sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
12732rm -f confdef2sed.sed
861bb6c1
JL
12733
12734# This sed command replaces #undef with comments. This is necessary, for
12735# example, in the case of _POSIX_SOURCE, which is predefined and required
12736# on some systems where configure will not decide to define it.
ba479fd2
NN
12737cat >>conftest.undefs <<\_ACEOF
12738s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
12739_ACEOF
12740
12741# Break up conftest.defines because some shells have a limit on the size
12742# of here documents, and old seds have small limits too (100 cmds).
12743echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
12744echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
12745echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
12746echo ' :' >>$CONFIG_STATUS
12747rm -f conftest.tail
12748while grep . conftest.defines >/dev/null
12749do
12750 # Write a limited-size here document to $tmp/defines.sed.
12751 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
12752 # Speed up: don't consider the non `#define' lines.
12753 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
12754 # Work around the forget-to-reset-the-flag bug.
12755 echo 't clr' >>$CONFIG_STATUS
12756 echo ': clr' >>$CONFIG_STATUS
12757 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
12758 echo 'CEOF
12759 sed -f $tmp/defines.sed $tmp/in >$tmp/out
12760 rm -f $tmp/in
12761 mv $tmp/out $tmp/in
12762' >>$CONFIG_STATUS
12763 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
12764 rm -f conftest.defines
12765 mv conftest.tail conftest.defines
12766done
12767rm -f conftest.defines
12768echo ' fi # grep' >>$CONFIG_STATUS
12769echo >>$CONFIG_STATUS
861bb6c1 12770
ba479fd2
NN
12771# Break up conftest.undefs because some shells have a limit on the size
12772# of here documents, and old seds have small limits too (100 cmds).
12773echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 12774rm -f conftest.tail
ba479fd2 12775while grep . conftest.undefs >/dev/null
861bb6c1 12776do
ba479fd2
NN
12777 # Write a limited-size here document to $tmp/undefs.sed.
12778 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
12779 # Speed up: don't consider the non `#undef'
12780 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
12781 # Work around the forget-to-reset-the-flag bug.
12782 echo 't clr' >>$CONFIG_STATUS
12783 echo ': clr' >>$CONFIG_STATUS
12784 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 12785 echo 'CEOF
ba479fd2
NN
12786 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
12787 rm -f $tmp/in
12788 mv $tmp/out $tmp/in
12789' >>$CONFIG_STATUS
12790 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
12791 rm -f conftest.undefs
12792 mv conftest.tail conftest.undefs
861bb6c1 12793done
ba479fd2
NN
12794rm -f conftest.undefs
12795
12796cat >>$CONFIG_STATUS <<\_ACEOF
12797 # Let's still pretend it is `configure' which instantiates (i.e., don't
12798 # use $as_me), people would be surprised to read:
12799 # /* config.h. Generated by config.status. */
12800 if test x"$ac_file" = x-; then
12801 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 12802 else
ba479fd2 12803 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 12804 fi
ba479fd2
NN
12805 cat $tmp/in >>$tmp/config.h
12806 rm -f $tmp/in
12807 if test x"$ac_file" != x-; then
12808 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
12809 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
12810echo "$as_me: $ac_file is unchanged" >&6;}
12811 else
12812 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12813$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12814 X"$ac_file" : 'X\(//\)[^/]' \| \
12815 X"$ac_file" : 'X\(//\)$' \| \
12816 X"$ac_file" : 'X\(/\)' \| \
12817 . : '\(.\)' 2>/dev/null ||
12818echo X"$ac_file" |
12819 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12820 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12821 /^X\(\/\/\)$/{ s//\1/; q; }
12822 /^X\(\/\).*/{ s//\1/; q; }
12823 s/.*/./; q'`
12824 { if $as_mkdir_p; then
12825 mkdir -p "$ac_dir"
12826 else
12827 as_dir="$ac_dir"
12828 as_dirs=
12829 while test ! -d "$as_dir"; do
12830 as_dirs="$as_dir $as_dirs"
12831 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12832$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12833 X"$as_dir" : 'X\(//\)[^/]' \| \
12834 X"$as_dir" : 'X\(//\)$' \| \
12835 X"$as_dir" : 'X\(/\)' \| \
12836 . : '\(.\)' 2>/dev/null ||
12837echo X"$as_dir" |
12838 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12839 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12840 /^X\(\/\/\)$/{ s//\1/; q; }
12841 /^X\(\/\).*/{ s//\1/; q; }
12842 s/.*/./; q'`
12843 done
12844 test ! -n "$as_dirs" || mkdir $as_dirs
12845 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12846echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12847 { (exit 1); exit 1; }; }; }
63cf211a 12848
ba479fd2
NN
12849 rm -f $ac_file
12850 mv $tmp/config.h $ac_file
12851 fi
12852 else
12853 cat $tmp/config.h
12854 rm -f $tmp/config.h
12855 fi
12856done
12857_ACEOF
12858cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 12859
ba479fd2
NN
12860#
12861# CONFIG_COMMANDS section.
12862#
12863for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12864 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12865 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12866 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
12867$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12868 X"$ac_dest" : 'X\(//\)[^/]' \| \
12869 X"$ac_dest" : 'X\(//\)$' \| \
12870 X"$ac_dest" : 'X\(/\)' \| \
12871 . : '\(.\)' 2>/dev/null ||
12872echo X"$ac_dest" |
12873 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12874 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12875 /^X\(\/\/\)$/{ s//\1/; q; }
12876 /^X\(\/\).*/{ s//\1/; q; }
12877 s/.*/./; q'`
12878 ac_builddir=.
12879
12880if test "$ac_dir" != .; then
12881 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12882 # A "../" for each directory in $ac_dir_suffix.
12883 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12884else
12885 ac_dir_suffix= ac_top_builddir=
12886fi
12887
12888case $srcdir in
12889 .) # No --srcdir option. We are building in place.
12890 ac_srcdir=.
12891 if test -z "$ac_top_builddir"; then
12892 ac_top_srcdir=.
12893 else
12894 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12895 fi ;;
12896 [\\/]* | ?:[\\/]* ) # Absolute path.
12897 ac_srcdir=$srcdir$ac_dir_suffix;
12898 ac_top_srcdir=$srcdir ;;
12899 *) # Relative path.
12900 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12901 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12902esac
12903# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12904# absolute.
12905ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12906ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12907ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12908ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12909
12910
12911 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
12912echo "$as_me: executing $ac_dest commands" >&6;}
12913 case $ac_dest in
12914 default )
f1faaabd
NN
12915case ${CONFIG_HEADERS} in
12916 *auto-host.h:config.in*)
12917 echo > cstamp-h ;;
861bb6c1 12918esac
2ed26f6b 12919# Make sure all the subdirs exist.
c406e779 12920for d in $subdirs
2ed26f6b 12921do
2ed26f6b 12922 test -d $d || mkdir $d
2ed26f6b 12923done
93cf819d
BK
12924# If the host supports symlinks, point stage[1234] at ../stage[1234] so
12925# bootstrapping and the installation procedure can still use
12926# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
12927# FLAGS_TO_PASS has been modified to solve the problem there.
12928# This is virtually a duplicate of what happens in configure.lang; we do
12929# an extra check to make sure this only happens if ln -s can be used.
75bffa71 12930if test "$symbolic_link" = "ln -s"; then
c406e779 12931 for d in ${subdirs} fixinc ; do
1e6347d8 12932 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 12933 cd $d
6a1b7268 12934 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
12935 do
12936 rm -f $t
12937 $symbolic_link ../$t $t 2>/dev/null
12938 done
12939 cd $STARTDIR
93cf819d
BK
12940 done
12941else true ; fi
ba479fd2
NN
12942 ;;
12943 esac
12944done
12945_ACEOF
cafe096b 12946
ba479fd2
NN
12947cat >>$CONFIG_STATUS <<\_ACEOF
12948
12949{ (exit 0); exit 0; }
12950_ACEOF
861bb6c1 12951chmod +x $CONFIG_STATUS
ba479fd2
NN
12952ac_clean_files=$ac_clean_files_save
12953
12954
12955# configure is writing to config.log, and then calls config.status.
12956# config.status does its own redirection, appending to config.log.
12957# Unfortunately, on DOS this fails, as config.log is still kept open
12958# by configure, so config.status won't be able to write to it; its
12959# output is simply discarded. So we exec the FD to /dev/null,
12960# effectively closing config.log, so it can be properly (re)opened and
12961# appended to by config.status. When coming back to configure, we
12962# need to make the FD available again.
12963if test "$no_create" != yes; then
12964 ac_cs_success=:
12965 ac_config_status_args=
12966 test "$silent" = yes &&
12967 ac_config_status_args="$ac_config_status_args --quiet"
12968 exec 5>/dev/null
12969 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12970 exec 5>>config.log
12971 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12972 # would make configure fail if this is the last instruction.
12973 $ac_cs_success || { (exit 1); exit 1; }
12974fi
861bb6c1 12975