]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
* doc/tm.texi (FUNCTION_VALUE): Fix a typo.
[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
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 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 parsedir 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'
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]
852 --enable-generated-files-in-srcdir Put generated files in source dir
853 --enable-werror enable -Werror in bootstrap stage2 and later
854 --enable-checking=LIST
855 enable expensive run-time checks. With LIST,
856 enable only specific categories of checks.
857 Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
858 default is misc,tree,gc,rtlflag
859 --enable-coverage=LEVEL
860 enable compiler\'s code coverage collection.
861 Use to measure compiler performance and locate
862 unused parts of the compiler. With LEVEL, specify
863 optimization. Values are opt, noopt,
864 default is noopt
865 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
866 --enable-multilib enable library support for multiple ABIs
867 --enable-__cxa_atexit enable __cxa_atexit for C++
868 --enable-threads enable thread usage for target GCC
869 --enable-threads=LIB use LIB thread package for target GCC
870 --enable-objc-gc enable the use of Boehm's garbage collector with
871 the GNU Objective-C runtime
872 --disable-shared don't provide a shared libgcc
873 --enable-intermodule build the compiler in one step
874 --enable-initfini-array use .init_array/.fini_array sections
875 --enable-sjlj-exceptions
876 arrange to use setjmp/longjmp exception handling
877 --enable-libunwind-exceptions force use libunwind for exceptions
878 --disable-win32-registry
879 disable lookup of installation paths in the
880 Registry on Windows hosts
881 --enable-win32-registry enable registry lookup (default)
882 --enable-win32-registry=KEY
883 use KEY instead of GCC version as the last portion
884 of the registry key
885 --enable-maintainer-mode
886 enable make rules and dependencies not useful
887 (and sometimes confusing) to the casual installer
888 --enable-version-specific-runtime-libs
889 specify that runtime libraries should be
890 installed in a compiler-specific directory
093e61a6 891
ba479fd2
NN
892Optional Packages:
893 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
894 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
895 --with-local-prefix=DIR specifies directory to put local include
896 --with-gxx-include-dir=DIR
897 specifies directory to put g++ header files
898 --with-cpp-install-dir=DIR
899 install the user visible C preprocessor in DIR
900 (relative to PREFIX) as well as PREFIX/bin
901 --with-gnu-ld arrange to work with GNU ld.
902 --with-ld arrange to use the specified ld (full pathname)
903 --with-gnu-as arrange to work with GNU as
904 --with-as arrange to use the specified as (full pathname)
905 --with-stabs arrange to use stabs instead of host debug format
906 --with-dwarf2 force the default debug format to be DWARF 2
907 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
908 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
909 --with-gc={simple,page,zone} choose the garbage collection mechanism to use
910 with the compiler
911 --with-system-zlib use installed libz
912 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 913
ba479fd2
NN
914Some influential environment variables:
915 CC C compiler command
916 CFLAGS C compiler flags
917 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
918 nonstandard directory <lib dir>
919 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
920 headers in a nonstandard directory <include dir>
921 CPP C preprocessor
13c22933 922
ba479fd2
NN
923Use these variables to override the choices made by `configure' or to help
924it to find libraries and programs with nonstandard names/locations.
73458fb7 925
ba479fd2
NN
926_ACEOF
927fi
6e3f3080 928
ba479fd2
NN
929if test "$ac_init_help" = "recursive"; then
930 # If there are subdirs, report their specific --help.
931 ac_popdir=`pwd`
932 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
933 test -d $ac_dir || continue
934 ac_builddir=.
935
936if test "$ac_dir" != .; then
937 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
938 # A "../" for each directory in $ac_dir_suffix.
939 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
940else
941 ac_dir_suffix= ac_top_builddir=
942fi
943
944case $srcdir in
945 .) # No --srcdir option. We are building in place.
946 ac_srcdir=.
947 if test -z "$ac_top_builddir"; then
948 ac_top_srcdir=.
949 else
950 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
951 fi ;;
952 [\\/]* | ?:[\\/]* ) # Absolute path.
953 ac_srcdir=$srcdir$ac_dir_suffix;
954 ac_top_srcdir=$srcdir ;;
955 *) # Relative path.
956 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
957 ac_top_srcdir=$ac_top_builddir$srcdir ;;
958esac
959# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
960# absolute.
961ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
962ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
963ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
964ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
965
966 cd $ac_dir
967 # Check for guested configure; otherwise get Cygnus style configure.
968 if test -f $ac_srcdir/configure.gnu; then
969 echo
970 $SHELL $ac_srcdir/configure.gnu --help=recursive
971 elif test -f $ac_srcdir/configure; then
972 echo
973 $SHELL $ac_srcdir/configure --help=recursive
974 elif test -f $ac_srcdir/configure.ac ||
975 test -f $ac_srcdir/configure.in; then
976 echo
977 $ac_configure --help
978 else
979 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
980 fi
a6a5e4c9 981 cd $ac_popdir
ba479fd2
NN
982 done
983fi
984
985test -n "$ac_init_help" && exit 0
986if $ac_init_version; then
987 cat <<\_ACEOF
988
989Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
990Free Software Foundation, Inc.
991This configure script is free software; the Free Software Foundation
992gives unlimited permission to copy, distribute and modify it.
993_ACEOF
994 exit 0
995fi
996exec 5>config.log
997cat >&5 <<_ACEOF
998This file contains any messages produced by compilers while
999running configure, to aid debugging if configure makes a mistake.
1000
1001It was created by $as_me, which was
1002generated by GNU Autoconf 2.57. Invocation command line was
1003
1004 $ $0 $@
1005
1006_ACEOF
1007{
1008cat <<_ASUNAME
1009## --------- ##
1010## Platform. ##
1011## --------- ##
1012
1013hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1014uname -m = `(uname -m) 2>/dev/null || echo unknown`
1015uname -r = `(uname -r) 2>/dev/null || echo unknown`
1016uname -s = `(uname -s) 2>/dev/null || echo unknown`
1017uname -v = `(uname -v) 2>/dev/null || echo unknown`
1018
1019/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1020/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1021
1022/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1023/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1024/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1025hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1026/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1027/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1028/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1029
1030_ASUNAME
1031
1032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1033for as_dir in $PATH
1034do
1035 IFS=$as_save_IFS
1036 test -z "$as_dir" && as_dir=.
1037 echo "PATH: $as_dir"
1038done
1039
1040} >&5
1041
1042cat >&5 <<_ACEOF
1043
1044
1045## ----------- ##
1046## Core tests. ##
1047## ----------- ##
1048
1049_ACEOF
1050
1051
1052# Keep a trace of the command line.
1053# Strip out --no-create and --no-recursion so they do not pile up.
1054# Strip out --silent because we don't want to record it for future runs.
1055# Also quote any args containing shell meta-characters.
1056# Make two passes to allow for proper duplicate-argument suppression.
1057ac_configure_args=
1058ac_configure_args0=
1059ac_configure_args1=
1060ac_sep=
1061ac_must_keep_next=false
1062for ac_pass in 1 2
1063do
1064 for ac_arg
1065 do
1066 case $ac_arg in
1067 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 continue ;;
1071 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1072 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1073 esac
1074 case $ac_pass in
1075 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1076 2)
1077 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1078 if test $ac_must_keep_next = true; then
1079 ac_must_keep_next=false # Got value, back to normal.
1080 else
1081 case $ac_arg in
1082 *=* | --config-cache | -C | -disable-* | --disable-* \
1083 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1084 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1085 | -with-* | --with-* | -without-* | --without-* | --x)
1086 case "$ac_configure_args0 " in
1087 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1088 esac
1089 ;;
1090 -* ) ac_must_keep_next=true ;;
1091 esac
1092 fi
1093 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1094 # Get rid of the leading space.
1095 ac_sep=" "
1096 ;;
1097 esac
1098 done
1099done
1100$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1101$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1102
1103# When interrupted or exit'd, cleanup temporary files, and complete
1104# config.log. We remove comments because anyway the quotes in there
1105# would cause problems or look ugly.
1106# WARNING: Be sure not to use single quotes in there, as some shells,
1107# such as our DU 5.0 friend, will then `close' the trap.
1108trap 'exit_status=$?
1109 # Save into config.log some information that might help in debugging.
1110 {
1111 echo
1112
1113 cat <<\_ASBOX
1114## ---------------- ##
1115## Cache variables. ##
1116## ---------------- ##
1117_ASBOX
1118 echo
1119 # The following way of writing the cache mishandles newlines in values,
1120{
1121 (set) 2>&1 |
1122 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1123 *ac_space=\ *)
1124 sed -n \
1125 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1126 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1127 ;;
1128 *)
1129 sed -n \
1130 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1131 ;;
1132 esac;
1133}
1134 echo
1135
1136 cat <<\_ASBOX
1137## ----------------- ##
1138## Output variables. ##
1139## ----------------- ##
1140_ASBOX
1141 echo
1142 for ac_var in $ac_subst_vars
1143 do
1144 eval ac_val=$`echo $ac_var`
1145 echo "$ac_var='"'"'$ac_val'"'"'"
1146 done | sort
1147 echo
1148
1149 if test -n "$ac_subst_files"; then
1150 cat <<\_ASBOX
1151## ------------- ##
1152## Output files. ##
1153## ------------- ##
1154_ASBOX
1155 echo
1156 for ac_var in $ac_subst_files
1157 do
1158 eval ac_val=$`echo $ac_var`
1159 echo "$ac_var='"'"'$ac_val'"'"'"
1160 done | sort
1161 echo
1162 fi
1163
1164 if test -s confdefs.h; then
1165 cat <<\_ASBOX
1166## ----------- ##
1167## confdefs.h. ##
1168## ----------- ##
1169_ASBOX
1170 echo
1171 sed "/^$/d" confdefs.h | sort
1172 echo
1173 fi
1174 test "$ac_signal" != 0 &&
1175 echo "$as_me: caught signal $ac_signal"
1176 echo "$as_me: exit $exit_status"
1177 } >&5
a6a5e4c9 1178 rm -f core core.* *.core &&
ba479fd2
NN
1179 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1180 exit $exit_status
1181 ' 0
1182for ac_signal in 1 2 13 15; do
1183 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1184done
1185ac_signal=0
1186
1187# confdefs.h avoids OS command line length limits that DEFS can exceed.
1188rm -rf conftest* confdefs.h
1189# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1190echo >confdefs.h
1191
1192# Predefined preprocessor variables.
1193
1194cat >>confdefs.h <<_ACEOF
1195#define PACKAGE_NAME "$PACKAGE_NAME"
1196_ACEOF
1197
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_VERSION "$PACKAGE_VERSION"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_STRING "$PACKAGE_STRING"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1216_ACEOF
1217
1218
1219# Let the site file select an alternate cache file if it wants to.
1220# Prefer explicitly selected file to automatically selected ones.
1221if test -z "$CONFIG_SITE"; then
1222 if test "x$prefix" != xNONE; then
1223 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1224 else
1225 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1226 fi
1227fi
1228for ac_site_file in $CONFIG_SITE; do
1229 if test -r "$ac_site_file"; then
1230 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1231echo "$as_me: loading site script $ac_site_file" >&6;}
1232 sed 's/^/| /' "$ac_site_file" >&5
1233 . "$ac_site_file"
1234 fi
1235done
1236
1237if test -r "$cache_file"; then
1238 # Some versions of bash will fail to source /dev/null (special
1239 # files actually), so we avoid doing that.
1240 if test -f "$cache_file"; then
1241 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1242echo "$as_me: loading cache $cache_file" >&6;}
1243 case $cache_file in
1244 [\\/]* | ?:[\\/]* ) . $cache_file;;
1245 *) . ./$cache_file;;
1246 esac
1247 fi
1248else
1249 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1250echo "$as_me: creating cache $cache_file" >&6;}
1251 >$cache_file
1252fi
1253
1254# Check that the precious variables saved in the cache have kept the same
1255# value.
1256ac_cache_corrupted=false
1257for ac_var in `(set) 2>&1 |
1258 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1259 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1260 eval ac_new_set=\$ac_env_${ac_var}_set
1261 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1262 eval ac_new_val="\$ac_env_${ac_var}_value"
1263 case $ac_old_set,$ac_new_set in
1264 set,)
1265 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1266echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1267 ac_cache_corrupted=: ;;
1268 ,set)
1269 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1270echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1271 ac_cache_corrupted=: ;;
1272 ,);;
1273 *)
1274 if test "x$ac_old_val" != "x$ac_new_val"; then
1275 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1276echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1277 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1278echo "$as_me: former value: $ac_old_val" >&2;}
1279 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1280echo "$as_me: current value: $ac_new_val" >&2;}
1281 ac_cache_corrupted=:
1282 fi;;
1283 esac
1284 # Pass precious variables to config.status.
1285 if test "$ac_new_set" = set; then
1286 case $ac_new_val in
1287 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1288 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1289 *) ac_arg=$ac_var=$ac_new_val ;;
1290 esac
1291 case " $ac_configure_args " in
1292 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1293 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1294 esac
1295 fi
1296done
1297if $ac_cache_corrupted; then
1298 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1299echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1300 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1301echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1302 { (exit 1); exit 1; }; }
1303fi
1304
1305ac_ext=c
1306ac_cpp='$CPP $CPPFLAGS'
1307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1309ac_compiler_gnu=$ac_cv_c_compiler_gnu
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
914c5af7 1329
ba479fd2
NN
1330 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1331
1332
1333# Determine the host, build, and target systems
1334ac_aux_dir=
1335for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1336 if test -f $ac_dir/install-sh; then
1337 ac_aux_dir=$ac_dir
1338 ac_install_sh="$ac_aux_dir/install-sh -c"
1339 break
1340 elif test -f $ac_dir/install.sh; then
1341 ac_aux_dir=$ac_dir
1342 ac_install_sh="$ac_aux_dir/install.sh -c"
1343 break
1344 elif test -f $ac_dir/shtool; then
1345 ac_aux_dir=$ac_dir
1346 ac_install_sh="$ac_aux_dir/shtool install -c"
1347 break
1348 fi
1349done
1350if test -z "$ac_aux_dir"; then
1351 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1352echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1353 { (exit 1); exit 1; }; }
1354fi
1355ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1356ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1357ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1358
1359# Make sure we can run config.sub.
1360$ac_config_sub sun4 >/dev/null 2>&1 ||
1361 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1362echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1363 { (exit 1); exit 1; }; }
1364
1365echo "$as_me:$LINENO: checking build system type" >&5
1366echo $ECHO_N "checking build system type... $ECHO_C" >&6
1367if test "${ac_cv_build+set}" = set; then
1368 echo $ECHO_N "(cached) $ECHO_C" >&6
1369else
1370 ac_cv_build_alias=$build_alias
1371test -z "$ac_cv_build_alias" &&
1372 ac_cv_build_alias=`$ac_config_guess`
1373test -z "$ac_cv_build_alias" &&
1374 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1375echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1376 { (exit 1); exit 1; }; }
1377ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1378 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1379echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1380 { (exit 1); exit 1; }; }
1381
1382fi
1383echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1384echo "${ECHO_T}$ac_cv_build" >&6
1385build=$ac_cv_build
1386build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1387build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1388build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1389
1390
1391echo "$as_me:$LINENO: checking host system type" >&5
1392echo $ECHO_N "checking host system type... $ECHO_C" >&6
1393if test "${ac_cv_host+set}" = set; then
1394 echo $ECHO_N "(cached) $ECHO_C" >&6
1395else
1396 ac_cv_host_alias=$host_alias
1397test -z "$ac_cv_host_alias" &&
1398 ac_cv_host_alias=$ac_cv_build_alias
1399ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1400 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1401echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1402 { (exit 1); exit 1; }; }
1403
1404fi
1405echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1406echo "${ECHO_T}$ac_cv_host" >&6
1407host=$ac_cv_host
1408host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1409host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1410host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1411
1412
1413echo "$as_me:$LINENO: checking target system type" >&5
1414echo $ECHO_N "checking target system type... $ECHO_C" >&6
1415if test "${ac_cv_target+set}" = set; then
1416 echo $ECHO_N "(cached) $ECHO_C" >&6
1417else
1418 ac_cv_target_alias=$target_alias
1419test "x$ac_cv_target_alias" = "x" &&
1420 ac_cv_target_alias=$ac_cv_host_alias
1421ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1422 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1423echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1424 { (exit 1); exit 1; }; }
1425
1426fi
1427echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1428echo "${ECHO_T}$ac_cv_target" >&6
1429target=$ac_cv_target
1430target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1431target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1432target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1433
1434
1435# The aliases save the names the user supplied, while $host etc.
1436# will get canonicalized.
1437test -n "$target_alias" &&
1438 test "$program_prefix$program_suffix$program_transform_name" = \
1439 NONENONEs,x,x, &&
1440 program_prefix=${target_alias}-
1441
1442# Determine the noncanonical target name, for directory use.
1443 case ${build_alias} in
1444 "") build_noncanonical=${build} ;;
6e3f3080
NN
1445 *) build_noncanonical=${build_alias} ;;
1446esac
73458fb7 1447
4665e56c
NN
1448 case ${host_alias} in
1449 "") host_noncanonical=${build_noncanonical} ;;
1450 *) host_noncanonical=${host_alias} ;;
1451esac
73458fb7 1452
4665e56c
NN
1453 case ${target_alias} in
1454 "") target_noncanonical=${host_noncanonical} ;;
1455 *) target_noncanonical=${target_alias} ;;
1456esac
093e61a6 1457
caa55b1e
NN
1458
1459# Determine the target- and build-specific subdirectories
4665e56c
NN
1460 # Prefix 'build-' so this never conflicts with target_subdir.
1461build_subdir="build-${build_noncanonical}"
1462# Not really a subdirectory, but here for completeness.
1463host_subdir=.
1464# No prefix.
1465target_subdir=${target_noncanonical}
ba479fd2 1466
73458fb7 1467
093e61a6 1468# Set program_transform_name
13c22933 1469test "$program_prefix" != NONE &&
ba479fd2 1470 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1471# Use a double $ so make ignores it.
1472test "$program_suffix" != NONE &&
ba479fd2
NN
1473 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1474# Double any \ or $. echo might interpret backslashes.
1475# By default was `s,x,x', remove it if useless.
1476cat <<\_ACEOF >conftest.sed
1477s/[\\$]/&&/g;s/;s,x,x,$//
1478_ACEOF
1479program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1480rm conftest.sed
13c22933
JJ
1481
1482
34a86c2b
NN
1483# Check for bogus environment variables.
1484# Test if LIBRARY_PATH contains the notation for the current directory
1485# since this would lead to problems installing/building glibc.
1486# LIBRARY_PATH contains the current directory if one of the following
1487# is true:
1488# - one of the terminals (":" and ";") is the first or last sign
1489# - two terminals occur directly after each other
1490# - the path contains an element with a dot in it
ba479fd2
NN
1491echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1492echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1493case ${LIBRARY_PATH} in
1494 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1495 library_path_setting="contains current directory"
1496 ;;
1497 *)
1498 library_path_setting="ok"
1499 ;;
1500esac
ba479fd2
NN
1501echo "$as_me:$LINENO: result: $library_path_setting" >&5
1502echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1503if test "$library_path_setting" != "ok"; then
ba479fd2 1504{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1505*** LIBRARY_PATH shouldn't contain the current directory when
1506*** building gcc. Please change the environment variable
ba479fd2
NN
1507*** and run configure again." >&5
1508echo "$as_me: error:
1509*** LIBRARY_PATH shouldn't contain the current directory when
1510*** building gcc. Please change the environment variable
1511*** and run configure again." >&2;}
1512 { (exit 1); exit 1; }; }
e9a25f70
JL
1513fi
1514
34a86c2b
NN
1515# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1516# since this would lead to problems installing/building glibc.
1517# GCC_EXEC_PREFIX contains the current directory if one of the following
1518# is true:
1519# - one of the terminals (":" and ";") is the first or last sign
1520# - two terminals occur directly after each other
1521# - the path contains an element with a dot in it
ba479fd2
NN
1522echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1523echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1524case ${GCC_EXEC_PREFIX} in
1525 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1526 gcc_exec_prefix_setting="contains current directory"
1527 ;;
1528 *)
1529 gcc_exec_prefix_setting="ok"
1530 ;;
1531esac
ba479fd2
NN
1532echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1533echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1534if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1535{ { echo "$as_me:$LINENO: error:
1536*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1537*** building gcc. Please change the environment variable
1538*** and run configure again." >&5
1539echo "$as_me: error:
cafe096b
EC
1540*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1541*** building gcc. Please change the environment variable
ba479fd2
NN
1542*** and run configure again." >&2;}
1543 { (exit 1); exit 1; }; }
34a86c2b
NN
1544fi
1545
1546# -----------
1547# Directories
1548# -----------
1549
1550# Specify the local prefix
1551local_prefix=
ba479fd2 1552
34a86c2b
NN
1553# Check whether --with-local-prefix or --without-local-prefix was given.
1554if test "${with_local_prefix+set}" = set; then
1555 withval="$with_local_prefix"
1556 case "${withval}" in
ba479fd2
NN
1557yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1558echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1559 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1560no) ;;
1561*) local_prefix=$with_local_prefix ;;
1562esac
ba479fd2 1563fi;
34a86c2b
NN
1564
1565# Default local prefix if it is empty
1566if test x$local_prefix = x; then
1567 local_prefix=/usr/local
1568fi
1569
1570# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1571# passed in by the toplevel make and thus we'd get different behavior
1572# depending on where we built the sources.
1573gcc_gxx_include_dir=
1574# Specify the g++ header file directory
ba479fd2 1575
34a86c2b
NN
1576# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1577if test "${with_gxx_include_dir+set}" = set; then
1578 withval="$with_gxx_include_dir"
1579 case "${withval}" in
ba479fd2
NN
1580yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1581echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1582 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1583no) ;;
1584*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1585esac
ba479fd2 1586fi;
34a86c2b
NN
1587
1588if test x${gcc_gxx_include_dir} = x; then
1589 if test x${enable_version_specific_runtime_libs} = xyes; then
1590 gcc_gxx_include_dir='${libsubdir}/include/c++'
1591 else
1592 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
1593 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1594 fi
1595fi
1596
ba479fd2 1597
34a86c2b
NN
1598# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1599if test "${with_cpp_install_dir+set}" = set; then
1600 withval="$with_cpp_install_dir"
1601 if test x$withval = xyes; then
ba479fd2
NN
1602 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1603echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1604 { (exit 1); exit 1; }; }
34a86c2b
NN
1605elif test x$withval != xno; then
1606 cpp_install_dir=$withval
1607fi
ba479fd2 1608fi;
34a86c2b 1609
51b9ff45 1610# We would like to our source tree to be readonly. However when releases or
ba479fd2 1611# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1612# various formats of manuals need to be included along with the rest of the
ba479fd2 1613# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1614# just that.
1615
1616# Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
1617if test "${enable_generated_files_in_srcdir+set}" = set; then
1618 enableval="$enable_generated_files_in_srcdir"
1619 case ${enableval} in
1620 no) parsedir='$(objdir)'; docobjdir='$(objdir)/doc';;
941ba69d 1621 *) parsedir='$(srcdir)'; docobjdir='$(srcdir)/doc';;
51b9ff45
KC
1622esac
1623else
1624 parsedir='$(objdir)'; docobjdir='$(objdir)/doc';
ba479fd2 1625fi;
51b9ff45 1626
34a86c2b
NN
1627# -------------------
1628# Find default linker
1629# -------------------
1630
1631# With GNU ld
ba479fd2 1632
34a86c2b
NN
1633# Check whether --with-gnu-ld or --without-gnu-ld was given.
1634if test "${with_gnu_ld+set}" = set; then
1635 withval="$with_gnu_ld"
1636 gnu_ld_flag="$with_gnu_ld"
1637else
1638 gnu_ld_flag=no
ba479fd2 1639fi;
6e3f3080 1640
63cf211a 1641# With pre-defined ld
ba479fd2 1642
34a86c2b
NN
1643# Check whether --with-ld or --without-ld was given.
1644if test "${with_ld+set}" = set; then
1645 withval="$with_ld"
1646 DEFAULT_LINKER="$with_ld"
ba479fd2 1647fi;
34a86c2b
NN
1648if test x"${DEFAULT_LINKER+set}" = x"set"; then
1649 if test ! -x "$DEFAULT_LINKER"; then
ba479fd2
NN
1650 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1651echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
34a86c2b
NN
1652 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1653 gnu_ld_flag=yes
1654 fi
ba479fd2
NN
1655
1656cat >>confdefs.h <<_ACEOF
34a86c2b 1657#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1658_ACEOF
34a86c2b
NN
1659
1660fi
1661
ba479fd2
NN
1662echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1663echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1664if test x"${DEFAULT_LINKER+set}" = x"set"; then
1665 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1666 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1667echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1668 else
ba479fd2
NN
1669 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1670echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1671 fi
1672else
ba479fd2
NN
1673 echo "$as_me:$LINENO: result: no" >&5
1674echo "${ECHO_T}no" >&6
34a86c2b
NN
1675fi
1676
1677# ----------------------
1678# Find default assembler
1679# ----------------------
1680
1681# With GNU as
ba479fd2 1682
34a86c2b
NN
1683# Check whether --with-gnu-as or --without-gnu-as was given.
1684if test "${with_gnu_as+set}" = set; then
1685 withval="$with_gnu_as"
1686 gas_flag="$with_gnu_as"
1687else
1688 gas_flag=no
ba479fd2 1689fi;
34a86c2b
NN
1690
1691
1692# Check whether --with-as or --without-as was given.
1693if test "${with_as+set}" = set; then
1694 withval="$with_as"
1695 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1696fi;
34a86c2b
NN
1697if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1698 if test ! -x "$DEFAULT_ASSEMBLER"; then
ba479fd2
NN
1699 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1700echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
34a86c2b
NN
1701 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1702 gas_flag=yes
1703 fi
ba479fd2
NN
1704
1705cat >>confdefs.h <<_ACEOF
34a86c2b 1706#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1707_ACEOF
34a86c2b
NN
1708
1709fi
1710
ba479fd2
NN
1711echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1712echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1713if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1714 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1715 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1716echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1717 else
ba479fd2
NN
1718 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1719echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1720 fi
1721else
ba479fd2
NN
1722 echo "$as_me:$LINENO: result: no" >&5
1723echo "${ECHO_T}no" >&6
34a86c2b
NN
1724fi
1725
1726# ---------------
1727# Find C compiler
1728# ---------------
1729
1730# Find the native compiler
ba479fd2
NN
1731ac_ext=c
1732ac_cpp='$CPP $CPPFLAGS'
1733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1735ac_compiler_gnu=$ac_cv_c_compiler_gnu
1736if test -n "$ac_tool_prefix"; then
1737 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1738set dummy ${ac_tool_prefix}gcc; ac_word=$2
1739echo "$as_me:$LINENO: checking for $ac_word" >&5
1740echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1741if test "${ac_cv_prog_CC+set}" = set; then
1742 echo $ECHO_N "(cached) $ECHO_C" >&6
1743else
1744 if test -n "$CC"; then
1745 ac_cv_prog_CC="$CC" # Let the user override the test.
1746else
1747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1748for as_dir in $PATH
1749do
1750 IFS=$as_save_IFS
1751 test -z "$as_dir" && as_dir=.
1752 for ac_exec_ext in '' $ac_executable_extensions; do
1753 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1754 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1755 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1756 break 2
1757 fi
1758done
1759done
1760
1761fi
1762fi
1763CC=$ac_cv_prog_CC
1764if test -n "$CC"; then
1765 echo "$as_me:$LINENO: result: $CC" >&5
1766echo "${ECHO_T}$CC" >&6
1767else
1768 echo "$as_me:$LINENO: result: no" >&5
1769echo "${ECHO_T}no" >&6
1770fi
1771
1772fi
1773if test -z "$ac_cv_prog_CC"; then
1774 ac_ct_CC=$CC
1775 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1776set dummy gcc; ac_word=$2
ba479fd2
NN
1777echo "$as_me:$LINENO: checking for $ac_word" >&5
1778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1779if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1780 echo $ECHO_N "(cached) $ECHO_C" >&6
1781else
1782 if test -n "$ac_ct_CC"; then
1783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1784else
1785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1786for as_dir in $PATH
1787do
1788 IFS=$as_save_IFS
1789 test -z "$as_dir" && as_dir=.
1790 for ac_exec_ext in '' $ac_executable_extensions; do
1791 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1792 ac_cv_prog_ac_ct_CC="gcc"
1793 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1794 break 2
1795 fi
1796done
1797done
1798
1799fi
1800fi
1801ac_ct_CC=$ac_cv_prog_ac_ct_CC
1802if test -n "$ac_ct_CC"; then
1803 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1804echo "${ECHO_T}$ac_ct_CC" >&6
1805else
1806 echo "$as_me:$LINENO: result: no" >&5
1807echo "${ECHO_T}no" >&6
1808fi
1809
1810 CC=$ac_ct_CC
1811else
1812 CC="$ac_cv_prog_CC"
1813fi
1814
1815if test -z "$CC"; then
1816 if test -n "$ac_tool_prefix"; then
1817 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1818set dummy ${ac_tool_prefix}cc; ac_word=$2
1819echo "$as_me:$LINENO: checking for $ac_word" >&5
1820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821if test "${ac_cv_prog_CC+set}" = set; then
1822 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1823else
1824 if test -n "$CC"; then
1825 ac_cv_prog_CC="$CC" # Let the user override the test.
1826else
ba479fd2
NN
1827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1828for as_dir in $PATH
1829do
1830 IFS=$as_save_IFS
1831 test -z "$as_dir" && as_dir=.
1832 for ac_exec_ext in '' $ac_executable_extensions; do
1833 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1834 ac_cv_prog_CC="${ac_tool_prefix}cc"
1835 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1836 break 2
1837 fi
1838done
1839done
1840
cd9e5e7c
MK
1841fi
1842fi
ba479fd2 1843CC=$ac_cv_prog_CC
cd9e5e7c 1844if test -n "$CC"; then
ba479fd2
NN
1845 echo "$as_me:$LINENO: result: $CC" >&5
1846echo "${ECHO_T}$CC" >&6
1847else
1848 echo "$as_me:$LINENO: result: no" >&5
1849echo "${ECHO_T}no" >&6
1850fi
1851
1852fi
1853if test -z "$ac_cv_prog_CC"; then
1854 ac_ct_CC=$CC
1855 # Extract the first word of "cc", so it can be a program name with args.
1856set dummy cc; ac_word=$2
1857echo "$as_me:$LINENO: checking for $ac_word" >&5
1858echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1859if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1860 echo $ECHO_N "(cached) $ECHO_C" >&6
1861else
1862 if test -n "$ac_ct_CC"; then
1863 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1864else
1865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1866for as_dir in $PATH
1867do
1868 IFS=$as_save_IFS
1869 test -z "$as_dir" && as_dir=.
1870 for ac_exec_ext in '' $ac_executable_extensions; do
1871 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1872 ac_cv_prog_ac_ct_CC="cc"
1873 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1874 break 2
1875 fi
1876done
1877done
1878
1879fi
1880fi
1881ac_ct_CC=$ac_cv_prog_ac_ct_CC
1882if test -n "$ac_ct_CC"; then
1883 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1884echo "${ECHO_T}$ac_ct_CC" >&6
1885else
1886 echo "$as_me:$LINENO: result: no" >&5
1887echo "${ECHO_T}no" >&6
1888fi
1889
1890 CC=$ac_ct_CC
cd9e5e7c 1891else
ba479fd2 1892 CC="$ac_cv_prog_CC"
e9a25f70 1893fi
6e3f3080 1894
ba479fd2 1895fi
6e3f3080
NN
1896if test -z "$CC"; then
1897 # Extract the first word of "cc", so it can be a program name with args.
1898set dummy cc; ac_word=$2
ba479fd2
NN
1899echo "$as_me:$LINENO: checking for $ac_word" >&5
1900echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1901if test "${ac_cv_prog_CC+set}" = set; then
1902 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1903else
1904 if test -n "$CC"; then
1905 ac_cv_prog_CC="$CC" # Let the user override the test.
1906else
1907 ac_prog_rejected=no
ba479fd2
NN
1908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1909for as_dir in $PATH
1910do
1911 IFS=$as_save_IFS
1912 test -z "$as_dir" && as_dir=.
1913 for ac_exec_ext in '' $ac_executable_extensions; do
1914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1915 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1916 ac_prog_rejected=yes
1917 continue
1918 fi
1919 ac_cv_prog_CC="cc"
1920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1921 break 2
1922 fi
1923done
1924done
1925
6e3f3080
NN
1926if test $ac_prog_rejected = yes; then
1927 # We found a bogon in the path, so make sure we never use it.
1928 set dummy $ac_cv_prog_CC
1929 shift
ba479fd2 1930 if test $# != 0; then
6e3f3080
NN
1931 # We chose a different compiler from the bogus one.
1932 # However, it has the same basename, so the bogon will be chosen
1933 # first if we set CC to just the basename; use the full file name.
1934 shift
ba479fd2 1935 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 1936 fi
6e3f3080
NN
1937fi
1938fi
1939fi
ba479fd2 1940CC=$ac_cv_prog_CC
6e3f3080 1941if test -n "$CC"; then
ba479fd2
NN
1942 echo "$as_me:$LINENO: result: $CC" >&5
1943echo "${ECHO_T}$CC" >&6
e9a25f70 1944else
ba479fd2
NN
1945 echo "$as_me:$LINENO: result: no" >&5
1946echo "${ECHO_T}no" >&6
e9a25f70 1947fi
6e3f3080 1948
ba479fd2
NN
1949fi
1950if test -z "$CC"; then
1951 if test -n "$ac_tool_prefix"; then
1952 for ac_prog in cl
1953 do
1954 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1955set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1956echo "$as_me:$LINENO: checking for $ac_word" >&5
1957echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1958if test "${ac_cv_prog_CC+set}" = set; then
1959 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 1960else
6e3f3080
NN
1961 if test -n "$CC"; then
1962 ac_cv_prog_CC="$CC" # Let the user override the test.
1963else
ba479fd2
NN
1964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1965for as_dir in $PATH
1966do
1967 IFS=$as_save_IFS
1968 test -z "$as_dir" && as_dir=.
1969 for ac_exec_ext in '' $ac_executable_extensions; do
1970 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1971 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1972 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1973 break 2
1974 fi
1975done
1976done
1977
093e61a6 1978fi
6e3f3080 1979fi
ba479fd2 1980CC=$ac_cv_prog_CC
6e3f3080 1981if test -n "$CC"; then
ba479fd2
NN
1982 echo "$as_me:$LINENO: result: $CC" >&5
1983echo "${ECHO_T}$CC" >&6
6e3f3080 1984else
ba479fd2
NN
1985 echo "$as_me:$LINENO: result: no" >&5
1986echo "${ECHO_T}no" >&6
093e61a6 1987fi
cafe096b 1988
ba479fd2
NN
1989 test -n "$CC" && break
1990 done
1991fi
1992if test -z "$CC"; then
1993 ac_ct_CC=$CC
1994 for ac_prog in cl
1995do
1996 # Extract the first word of "$ac_prog", so it can be a program name with args.
1997set dummy $ac_prog; ac_word=$2
1998echo "$as_me:$LINENO: checking for $ac_word" >&5
1999echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2000if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2001 echo $ECHO_N "(cached) $ECHO_C" >&6
2002else
2003 if test -n "$ac_ct_CC"; then
2004 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2005else
2006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2007for as_dir in $PATH
2008do
2009 IFS=$as_save_IFS
2010 test -z "$as_dir" && as_dir=.
2011 for ac_exec_ext in '' $ac_executable_extensions; do
2012 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2013 ac_cv_prog_ac_ct_CC="$ac_prog"
2014 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2015 break 2
2016 fi
2017done
2018done
6e3f3080 2019
ba479fd2
NN
2020fi
2021fi
2022ac_ct_CC=$ac_cv_prog_ac_ct_CC
2023if test -n "$ac_ct_CC"; then
2024 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2025echo "${ECHO_T}$ac_ct_CC" >&6
2026else
2027 echo "$as_me:$LINENO: result: no" >&5
2028echo "${ECHO_T}no" >&6
2029fi
6e3f3080 2030
ba479fd2
NN
2031 test -n "$ac_ct_CC" && break
2032done
63cf211a 2033
ba479fd2
NN
2034 CC=$ac_ct_CC
2035fi
2036
2037fi
2038
2039
2040test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2041See \`config.log' for more details." >&5
2042echo "$as_me: error: no acceptable C compiler found in \$PATH
2043See \`config.log' for more details." >&2;}
2044 { (exit 1); exit 1; }; }
2045
2046# Provide some information about the compiler.
2047echo "$as_me:$LINENO:" \
2048 "checking for C compiler version" >&5
2049ac_compiler=`set X $ac_compile; echo $2`
2050{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2051 (eval $ac_compiler --version </dev/null >&5) 2>&5
2052 ac_status=$?
2053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2054 (exit $ac_status); }
2055{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2056 (eval $ac_compiler -v </dev/null >&5) 2>&5
2057 ac_status=$?
2058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2059 (exit $ac_status); }
2060{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2061 (eval $ac_compiler -V </dev/null >&5) 2>&5
2062 ac_status=$?
2063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064 (exit $ac_status); }
2065
2066cat >conftest.$ac_ext <<_ACEOF
2067#line $LINENO "configure"
2068/* confdefs.h. */
2069_ACEOF
2070cat confdefs.h >>conftest.$ac_ext
2071cat >>conftest.$ac_ext <<_ACEOF
2072/* end confdefs.h. */
2073
2074int
2075main ()
2076{
63cf211a 2077
ba479fd2
NN
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082ac_clean_files_save=$ac_clean_files
2083ac_clean_files="$ac_clean_files a.out a.exe b.out"
2084# Try to create an executable without -o first, disregard a.out.
2085# It will help us diagnose broken compilers, and finding out an intuition
2086# of exeext.
2087echo "$as_me:$LINENO: checking for C compiler default output" >&5
2088echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2089ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2090if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2091 (eval $ac_link_default) 2>&5
2092 ac_status=$?
2093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2094 (exit $ac_status); }; then
2095 # Find the output, starting from the most likely. This scheme is
2096# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2097# resort.
2098
2099# Be careful to initialize this variable, since it used to be cached.
2100# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2101ac_cv_exeext=
2102# b.out is created by i960 compilers.
2103for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2104do
2105 test -f "$ac_file" || continue
2106 case $ac_file in
2107 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2108 ;;
2109 conftest.$ac_ext )
2110 # This is the source file.
2111 ;;
2112 [ab].out )
2113 # We found the default executable, but exeext='' is most
2114 # certainly right.
2115 break;;
2116 *.* )
2117 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2118 # FIXME: I believe we export ac_cv_exeext for Libtool,
2119 # but it would be cool to find out if it's true. Does anybody
2120 # maintain Libtool? --akim.
2121 export ac_cv_exeext
2122 break;;
2123 * )
2124 break;;
2125 esac
2126done
2127else
2128 echo "$as_me: failed program was:" >&5
2129sed 's/^/| /' conftest.$ac_ext >&5
2130
2131{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2132See \`config.log' for more details." >&5
2133echo "$as_me: error: C compiler cannot create executables
2134See \`config.log' for more details." >&2;}
2135 { (exit 77); exit 77; }; }
2136fi
2137
2138ac_exeext=$ac_cv_exeext
2139echo "$as_me:$LINENO: result: $ac_file" >&5
2140echo "${ECHO_T}$ac_file" >&6
2141
2142# Check the compiler produces executables we can run. If not, either
2143# the compiler is broken, or we cross compile.
2144echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2145echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2146# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2147# If not cross compiling, check that we can run a simple program.
2148if test "$cross_compiling" != yes; then
2149 if { ac_try='./$ac_file'
2150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151 (eval $ac_try) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }; }; then
2155 cross_compiling=no
6e3f3080 2156 else
ba479fd2
NN
2157 if test "$cross_compiling" = maybe; then
2158 cross_compiling=yes
2159 else
2160 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2161If you meant to cross compile, use \`--host'.
2162See \`config.log' for more details." >&5
2163echo "$as_me: error: cannot run C compiled programs.
2164If you meant to cross compile, use \`--host'.
2165See \`config.log' for more details." >&2;}
2166 { (exit 1); exit 1; }; }
2167 fi
6e3f3080
NN
2168 fi
2169fi
ba479fd2
NN
2170echo "$as_me:$LINENO: result: yes" >&5
2171echo "${ECHO_T}yes" >&6
2172
2173rm -f a.out a.exe conftest$ac_cv_exeext b.out
2174ac_clean_files=$ac_clean_files_save
2175# Check the compiler produces executables we can run. If not, either
2176# the compiler is broken, or we cross compile.
2177echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2178echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2179echo "$as_me:$LINENO: result: $cross_compiling" >&5
2180echo "${ECHO_T}$cross_compiling" >&6
2181
2182echo "$as_me:$LINENO: checking for suffix of executables" >&5
2183echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2185 (eval $ac_link) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); }; then
2189 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2190# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2191# work properly (i.e., refer to `conftest.exe'), while it won't with
2192# `rm'.
2193for ac_file in conftest.exe conftest conftest.*; do
2194 test -f "$ac_file" || continue
2195 case $ac_file in
2196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2197 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2198 export ac_cv_exeext
2199 break;;
2200 * ) break;;
2201 esac
2202done
e9a25f70 2203else
ba479fd2
NN
2204 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2205See \`config.log' for more details." >&5
2206echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2207See \`config.log' for more details." >&2;}
2208 { (exit 1); exit 1; }; }
2209fi
2210
2211rm -f conftest$ac_cv_exeext
2212echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2213echo "${ECHO_T}$ac_cv_exeext" >&6
2214
2215rm -f conftest.$ac_ext
2216EXEEXT=$ac_cv_exeext
2217ac_exeext=$EXEEXT
2218echo "$as_me:$LINENO: checking for suffix of object files" >&5
2219echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2220if test "${ac_cv_objext+set}" = set; then
2221 echo $ECHO_N "(cached) $ECHO_C" >&6
2222else
2223 cat >conftest.$ac_ext <<_ACEOF
2224#line $LINENO "configure"
2225/* confdefs.h. */
2226_ACEOF
2227cat confdefs.h >>conftest.$ac_ext
2228cat >>conftest.$ac_ext <<_ACEOF
2229/* end confdefs.h. */
2230
2231int
2232main ()
2233{
6e3f3080 2234
ba479fd2
NN
2235 ;
2236 return 0;
2237}
2238_ACEOF
2239rm -f conftest.o conftest.obj
2240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2241 (eval $ac_compile) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); }; then
2245 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2246 case $ac_file in
2247 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2248 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2249 break;;
2250 esac
2251done
63cf211a 2252else
ba479fd2
NN
2253 echo "$as_me: failed program was:" >&5
2254sed 's/^/| /' conftest.$ac_ext >&5
2255
2256{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2257See \`config.log' for more details." >&5
2258echo "$as_me: error: cannot compute suffix of object files: cannot compile
2259See \`config.log' for more details." >&2;}
2260 { (exit 1); exit 1; }; }
2261fi
2262
2263rm -f conftest.$ac_cv_objext conftest.$ac_ext
2264fi
2265echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2266echo "${ECHO_T}$ac_cv_objext" >&6
2267OBJEXT=$ac_cv_objext
2268ac_objext=$OBJEXT
2269echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2270echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2271if test "${ac_cv_c_compiler_gnu+set}" = set; then
2272 echo $ECHO_N "(cached) $ECHO_C" >&6
2273else
2274 cat >conftest.$ac_ext <<_ACEOF
2275#line $LINENO "configure"
2276/* confdefs.h. */
2277_ACEOF
2278cat confdefs.h >>conftest.$ac_ext
2279cat >>conftest.$ac_ext <<_ACEOF
2280/* end confdefs.h. */
2281
2282int
2283main ()
2284{
2285#ifndef __GNUC__
2286 choke me
2287#endif
6e3f3080 2288
ba479fd2
NN
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293rm -f conftest.$ac_objext
2294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2295 (eval $ac_compile) 2>&5
2296 ac_status=$?
2297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2298 (exit $ac_status); } &&
2299 { ac_try='test -s conftest.$ac_objext'
2300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2301 (eval $ac_try) 2>&5
2302 ac_status=$?
2303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2304 (exit $ac_status); }; }; then
2305 ac_compiler_gnu=yes
2306else
2307 echo "$as_me: failed program was:" >&5
2308sed 's/^/| /' conftest.$ac_ext >&5
2309
2310ac_compiler_gnu=no
2311fi
2312rm -f conftest.$ac_objext conftest.$ac_ext
2313ac_cv_c_compiler_gnu=$ac_compiler_gnu
2314
2315fi
2316echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2317echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2318GCC=`test $ac_compiler_gnu = yes && echo yes`
2319ac_test_CFLAGS=${CFLAGS+set}
2320ac_save_CFLAGS=$CFLAGS
2321CFLAGS="-g"
2322echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2323echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2324if test "${ac_cv_prog_cc_g+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
2326else
2327 cat >conftest.$ac_ext <<_ACEOF
2328#line $LINENO "configure"
2329/* confdefs.h. */
2330_ACEOF
2331cat confdefs.h >>conftest.$ac_ext
2332cat >>conftest.$ac_ext <<_ACEOF
2333/* end confdefs.h. */
2334
2335int
2336main ()
2337{
2338
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343rm -f conftest.$ac_objext
2344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2345 (eval $ac_compile) 2>&5
2346 ac_status=$?
2347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2348 (exit $ac_status); } &&
2349 { ac_try='test -s conftest.$ac_objext'
2350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351 (eval $ac_try) 2>&5
2352 ac_status=$?
2353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354 (exit $ac_status); }; }; then
6e3f3080
NN
2355 ac_cv_prog_cc_g=yes
2356else
ba479fd2
NN
2357 echo "$as_me: failed program was:" >&5
2358sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2359
ba479fd2 2360ac_cv_prog_cc_g=no
6e3f3080 2361fi
ba479fd2
NN
2362rm -f conftest.$ac_objext conftest.$ac_ext
2363fi
2364echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2365echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2366if test "$ac_test_CFLAGS" = set; then
ba479fd2 2367 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2368elif test $ac_cv_prog_cc_g = yes; then
2369 if test "$GCC" = yes; then
e9a25f70
JL
2370 CFLAGS="-g -O2"
2371 else
cd9e5e7c 2372 CFLAGS="-g"
81814e35 2373 fi
3723cad9 2374else
cd9e5e7c
MK
2375 if test "$GCC" = yes; then
2376 CFLAGS="-O2"
2377 else
2378 CFLAGS=
2379 fi
e9a25f70 2380fi
ba479fd2
NN
2381echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2382echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2383if test "${ac_cv_prog_cc_stdc+set}" = set; then
2384 echo $ECHO_N "(cached) $ECHO_C" >&6
2385else
2386 ac_cv_prog_cc_stdc=no
2387ac_save_CC=$CC
2388cat >conftest.$ac_ext <<_ACEOF
2389#line $LINENO "configure"
2390/* confdefs.h. */
2391_ACEOF
2392cat confdefs.h >>conftest.$ac_ext
2393cat >>conftest.$ac_ext <<_ACEOF
2394/* end confdefs.h. */
2395#include <stdarg.h>
2396#include <stdio.h>
2397#include <sys/types.h>
2398#include <sys/stat.h>
2399/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2400struct buf { int x; };
2401FILE * (*rcsopen) (struct buf *, struct stat *, int);
2402static char *e (p, i)
2403 char **p;
2404 int i;
2405{
2406 return p[i];
2407}
2408static char *f (char * (*g) (char **, int), char **p, ...)
2409{
2410 char *s;
2411 va_list v;
2412 va_start (v,p);
2413 s = g (p, va_arg (v,int));
2414 va_end (v);
2415 return s;
2416}
2417int test (int i, double x);
2418struct s1 {int (*f) (int a);};
2419struct s2 {int (*f) (double a);};
2420int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2421int argc;
2422char **argv;
2423int
2424main ()
2425{
2426return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431# Don't try gcc -ansi; that turns off useful extensions and
2432# breaks some systems' header files.
2433# AIX -qlanglvl=ansi
2434# Ultrix and OSF/1 -std1
2435# HP-UX 10.20 and later -Ae
2436# HP-UX older versions -Aa -D_HPUX_SOURCE
2437# SVR4 -Xc -D__EXTENSIONS__
2438for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2439do
2440 CC="$ac_save_CC $ac_arg"
2441 rm -f conftest.$ac_objext
2442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2443 (eval $ac_compile) 2>&5
2444 ac_status=$?
2445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446 (exit $ac_status); } &&
2447 { ac_try='test -s conftest.$ac_objext'
2448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2449 (eval $ac_try) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; }; then
2453 ac_cv_prog_cc_stdc=$ac_arg
2454break
2455else
2456 echo "$as_me: failed program was:" >&5
2457sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2458
ba479fd2
NN
2459fi
2460rm -f conftest.$ac_objext
2461done
2462rm -f conftest.$ac_ext conftest.$ac_objext
2463CC=$ac_save_CC
2464
2465fi
2466
2467case "x$ac_cv_prog_cc_stdc" in
2468 x|xno)
2469 echo "$as_me:$LINENO: result: none needed" >&5
2470echo "${ECHO_T}none needed" >&6 ;;
2471 *)
2472 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2473echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2474 CC="$CC $ac_cv_prog_cc_stdc" ;;
2475esac
2476
2477# Some people use a C++ compiler to compile C. Since we use `exit',
2478# in C++ we need to declare it. In case someone uses the same compiler
2479# for both compiling C and C++ we need to have the C++ compiler decide
2480# the declaration of exit, since it's the most demanding environment.
2481cat >conftest.$ac_ext <<_ACEOF
2482#ifndef __cplusplus
2483 choke me
2484#endif
2485_ACEOF
2486rm -f conftest.$ac_objext
2487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2488 (eval $ac_compile) 2>&5
2489 ac_status=$?
2490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2491 (exit $ac_status); } &&
2492 { ac_try='test -s conftest.$ac_objext'
2493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2494 (eval $ac_try) 2>&5
2495 ac_status=$?
2496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2497 (exit $ac_status); }; }; then
2498 for ac_declaration in \
a6a5e4c9
KC
2499 ''\
2500 '#include <stdlib.h>' \
ba479fd2
NN
2501 'extern "C" void std::exit (int) throw (); using std::exit;' \
2502 'extern "C" void std::exit (int); using std::exit;' \
2503 'extern "C" void exit (int) throw ();' \
2504 'extern "C" void exit (int);' \
2505 'void exit (int);'
2506do
2507 cat >conftest.$ac_ext <<_ACEOF
2508#line $LINENO "configure"
2509/* confdefs.h. */
2510_ACEOF
2511cat confdefs.h >>conftest.$ac_ext
2512cat >>conftest.$ac_ext <<_ACEOF
2513/* end confdefs.h. */
ba479fd2 2514#include <stdlib.h>
a6a5e4c9 2515$ac_declaration
ba479fd2
NN
2516int
2517main ()
2518{
2519exit (42);
2520 ;
2521 return 0;
2522}
2523_ACEOF
2524rm -f conftest.$ac_objext
2525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2526 (eval $ac_compile) 2>&5
2527 ac_status=$?
2528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2529 (exit $ac_status); } &&
2530 { ac_try='test -s conftest.$ac_objext'
2531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2532 (eval $ac_try) 2>&5
2533 ac_status=$?
2534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535 (exit $ac_status); }; }; then
2536 :
2537else
2538 echo "$as_me: failed program was:" >&5
2539sed 's/^/| /' conftest.$ac_ext >&5
2540
2541continue
2542fi
2543rm -f conftest.$ac_objext conftest.$ac_ext
2544 cat >conftest.$ac_ext <<_ACEOF
2545#line $LINENO "configure"
2546/* confdefs.h. */
2547_ACEOF
2548cat confdefs.h >>conftest.$ac_ext
2549cat >>conftest.$ac_ext <<_ACEOF
2550/* end confdefs.h. */
2551$ac_declaration
2552int
2553main ()
2554{
2555exit (42);
2556 ;
2557 return 0;
2558}
2559_ACEOF
2560rm -f conftest.$ac_objext
2561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2562 (eval $ac_compile) 2>&5
2563 ac_status=$?
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); } &&
2566 { ac_try='test -s conftest.$ac_objext'
2567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568 (eval $ac_try) 2>&5
2569 ac_status=$?
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); }; }; then
2572 break
3ec83fc2 2573else
ba479fd2
NN
2574 echo "$as_me: failed program was:" >&5
2575sed 's/^/| /' conftest.$ac_ext >&5
2576
6e3f3080 2577fi
ba479fd2
NN
2578rm -f conftest.$ac_objext conftest.$ac_ext
2579done
2580rm -f conftest*
2581if test -n "$ac_declaration"; then
2582 echo '#ifdef __cplusplus' >>confdefs.h
2583 echo $ac_declaration >>confdefs.h
2584 echo '#endif' >>confdefs.h
2585fi
2586
3ec83fc2 2587else
ba479fd2
NN
2588 echo "$as_me: failed program was:" >&5
2589sed 's/^/| /' conftest.$ac_ext >&5
2590
2591fi
2592rm -f conftest.$ac_objext conftest.$ac_ext
2593ac_ext=c
2594ac_cpp='$CPP $CPPFLAGS'
2595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2597ac_compiler_gnu=$ac_cv_c_compiler_gnu
2598
2599if test "x$CC" != xcc; then
2600 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2601echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2602else
2603 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2604echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2605fi
2606set dummy $CC; ac_cc=`echo $2 |
2607 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2608if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2609 echo $ECHO_N "(cached) $ECHO_C" >&6
2610else
2611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613/* confdefs.h. */
2614_ACEOF
2615cat confdefs.h >>conftest.$ac_ext
2616cat >>conftest.$ac_ext <<_ACEOF
2617/* end confdefs.h. */
2618
2619int
2620main ()
2621{
2622
2623 ;
2624 return 0;
2625}
2626_ACEOF
3ec83fc2
RH
2627# Make sure it works both with $CC and with simple cc.
2628# We do the test twice because some compilers refuse to overwrite an
2629# existing .o file with -o, though they will create one.
ba479fd2
NN
2630ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2631if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2632 (eval $ac_try) 2>&5
2633 ac_status=$?
2634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2635 (exit $ac_status); } &&
2636 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2637 (eval $ac_try) 2>&5
2638 ac_status=$?
2639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640 (exit $ac_status); };
3ec83fc2
RH
2641then
2642 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2643 if test "x$CC" != xcc; then
2644 # Test first that cc exists at all.
ba479fd2
NN
2645 if { ac_try='cc -c conftest.$ac_ext >&5'
2646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2647 (eval $ac_try) 2>&5
2648 ac_status=$?
2649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2650 (exit $ac_status); }; }; then
2651 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2652 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2653 (eval $ac_try) 2>&5
2654 ac_status=$?
2655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2656 (exit $ac_status); } &&
2657 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658 (eval $ac_try) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); };
3ec83fc2 2662 then
e1366e0c
NN
2663 # cc works too.
2664 :
3ec83fc2 2665 else
e1366e0c
NN
2666 # cc exists but doesn't like -o.
2667 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2668 fi
2669 fi
2670 fi
2671else
2672 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2673fi
2674rm -f conftest*
2675
2676fi
2677if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2678 echo "$as_me:$LINENO: result: yes" >&5
2679echo "${ECHO_T}yes" >&6
3ec83fc2 2680else
ba479fd2
NN
2681 echo "$as_me:$LINENO: result: no" >&5
2682echo "${ECHO_T}no" >&6
2683
2684cat >>confdefs.h <<\_ACEOF
3ec83fc2 2685#define NO_MINUS_C_MINUS_O 1
ba479fd2 2686_ACEOF
3ec83fc2
RH
2687
2688fi
2689
414d23ae
HPN
2690# autoconf is lame and doesn't give us any substitution variable for this.
2691if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2692 NO_MINUS_C_MINUS_O=yes
2693else
2694 OUTPUT_OPTION='-o $@'
2695fi
2696
2697
2698
73458fb7
NN
2699# -------------------------
2700# Check C compiler features
2701# -------------------------
2702
ba479fd2
NN
2703
2704echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5
2705echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6
2706if test "${ac_cv_prog_cc_no_long_long+set}" = set; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
2708else
2709 save_CFLAGS="$CFLAGS"
2710CFLAGS="-Wno-long-long"
ba479fd2
NN
2711cat >conftest.$ac_ext <<_ACEOF
2712#line $LINENO "configure"
2713/* confdefs.h. */
2714_ACEOF
2715cat confdefs.h >>conftest.$ac_ext
2716cat >>conftest.$ac_ext <<_ACEOF
2717/* end confdefs.h. */
2718
2719int
2720main ()
2721{
63cf211a 2722
ba479fd2
NN
2723 ;
2724 return 0;
2725}
2726_ACEOF
2727rm -f conftest.$ac_objext
2728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2729 (eval $ac_compile) 2>&5
2730 ac_status=$?
2731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732 (exit $ac_status); } &&
2733 { ac_try='test -s conftest.$ac_objext'
2734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2735 (eval $ac_try) 2>&5
2736 ac_status=$?
2737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738 (exit $ac_status); }; }; then
34a86c2b 2739 ac_cv_prog_cc_no_long_long=yes
200ef634 2740else
ba479fd2
NN
2741 echo "$as_me: failed program was:" >&5
2742sed 's/^/| /' conftest.$ac_ext >&5
2743
2744ac_cv_prog_cc_no_long_long=no
200ef634 2745fi
ba479fd2 2746rm -f conftest.$ac_objext conftest.$ac_ext
34a86c2b 2747CFLAGS="$save_CFLAGS"
75e93faa 2748fi
ba479fd2
NN
2749echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5
2750echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6
75e93faa 2751
ba479fd2
NN
2752ac_ext=c
2753ac_cpp='$CPP $CPPFLAGS'
2754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2756ac_compiler_gnu=$ac_cv_c_compiler_gnu
2757echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2758echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2759# On Suns, sometimes $CPP names a directory.
2760if test -n "$CPP" && test -d "$CPP"; then
2761 CPP=
2762fi
2763if test -z "$CPP"; then
ba479fd2
NN
2764 if test "${ac_cv_prog_CPP+set}" = set; then
2765 echo $ECHO_N "(cached) $ECHO_C" >&6
2766else
2767 # Double quotes because CPP needs to be expanded
2768 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2769 do
2770 ac_preproc_ok=false
2771for ac_c_preproc_warn_flag in '' yes
2772do
2773 # Use a header file that comes with gcc, so configuring glibc
2774 # with a fresh cross-compiler works.
2775 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2776 # <limits.h> exists even on freestanding compilers.
84c041a1 2777 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2778 # not just through cpp. "Syntax error" is here to catch this case.
2779 cat >conftest.$ac_ext <<_ACEOF
2780#line $LINENO "configure"
2781/* confdefs.h. */
2782_ACEOF
2783cat confdefs.h >>conftest.$ac_ext
2784cat >>conftest.$ac_ext <<_ACEOF
2785/* end confdefs.h. */
2786#ifdef __STDC__
2787# include <limits.h>
2788#else
2789# include <assert.h>
2790#endif
2791 Syntax error
2792_ACEOF
2793if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2794 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2795 ac_status=$?
2796 grep -v '^ *+' conftest.er1 >conftest.err
2797 rm -f conftest.er1
2798 cat conftest.err >&5
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); } >/dev/null; then
2801 if test -s conftest.err; then
2802 ac_cpp_err=$ac_c_preproc_warn_flag
2803 else
2804 ac_cpp_err=
2805 fi
2806else
2807 ac_cpp_err=yes
2808fi
2809if test -z "$ac_cpp_err"; then
093e61a6 2810 :
cafe096b 2811else
ba479fd2
NN
2812 echo "$as_me: failed program was:" >&5
2813sed 's/^/| /' conftest.$ac_ext >&5
2814
2815 # Broken: fails on valid input.
2816continue
2817fi
2818rm -f conftest.err conftest.$ac_ext
2819
2820 # OK, works on sane cases. Now check whether non-existent headers
2821 # can be detected and how.
2822 cat >conftest.$ac_ext <<_ACEOF
2823#line $LINENO "configure"
2824/* confdefs.h. */
2825_ACEOF
2826cat confdefs.h >>conftest.$ac_ext
2827cat >>conftest.$ac_ext <<_ACEOF
2828/* end confdefs.h. */
2829#include <ac_nonexistent.h>
2830_ACEOF
2831if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2832 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2833 ac_status=$?
2834 grep -v '^ *+' conftest.er1 >conftest.err
2835 rm -f conftest.er1
2836 cat conftest.err >&5
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); } >/dev/null; then
2839 if test -s conftest.err; then
2840 ac_cpp_err=$ac_c_preproc_warn_flag
2841 else
2842 ac_cpp_err=
2843 fi
2844else
2845 ac_cpp_err=yes
2846fi
2847if test -z "$ac_cpp_err"; then
2848 # Broken: success on invalid input.
2849continue
2850else
2851 echo "$as_me: failed program was:" >&5
2852sed 's/^/| /' conftest.$ac_ext >&5
2853
2854 # Passes both tests.
2855ac_preproc_ok=:
2856break
2857fi
2858rm -f conftest.err conftest.$ac_ext
2859
2860done
2861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2862rm -f conftest.err conftest.$ac_ext
2863if $ac_preproc_ok; then
2864 break
2865fi
2866
2867 done
2868 ac_cv_prog_CPP=$CPP
2869
2870fi
2871 CPP=$ac_cv_prog_CPP
2872else
2873 ac_cv_prog_CPP=$CPP
2874fi
2875echo "$as_me:$LINENO: result: $CPP" >&5
2876echo "${ECHO_T}$CPP" >&6
2877ac_preproc_ok=false
2878for ac_c_preproc_warn_flag in '' yes
2879do
2880 # Use a header file that comes with gcc, so configuring glibc
2881 # with a fresh cross-compiler works.
2882 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2883 # <limits.h> exists even on freestanding compilers.
2884 # On the NeXT, cc -E runs the code through the compiler's parser,
2885 # not just through cpp. "Syntax error" is here to catch this case.
2886 cat >conftest.$ac_ext <<_ACEOF
2887#line $LINENO "configure"
2888/* confdefs.h. */
2889_ACEOF
2890cat confdefs.h >>conftest.$ac_ext
2891cat >>conftest.$ac_ext <<_ACEOF
2892/* end confdefs.h. */
2893#ifdef __STDC__
2894# include <limits.h>
2895#else
2896# include <assert.h>
2897#endif
2898 Syntax error
2899_ACEOF
2900if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2901 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2902 ac_status=$?
2903 grep -v '^ *+' conftest.er1 >conftest.err
2904 rm -f conftest.er1
2905 cat conftest.err >&5
2906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2907 (exit $ac_status); } >/dev/null; then
2908 if test -s conftest.err; then
2909 ac_cpp_err=$ac_c_preproc_warn_flag
2910 else
2911 ac_cpp_err=
2912 fi
2913else
2914 ac_cpp_err=yes
2915fi
2916if test -z "$ac_cpp_err"; then
6e3f3080 2917 :
414d23ae 2918else
ba479fd2
NN
2919 echo "$as_me: failed program was:" >&5
2920sed 's/^/| /' conftest.$ac_ext >&5
2921
2922 # Broken: fails on valid input.
2923continue
2924fi
2925rm -f conftest.err conftest.$ac_ext
2926
2927 # OK, works on sane cases. Now check whether non-existent headers
2928 # can be detected and how.
2929 cat >conftest.$ac_ext <<_ACEOF
2930#line $LINENO "configure"
2931/* confdefs.h. */
2932_ACEOF
2933cat confdefs.h >>conftest.$ac_ext
2934cat >>conftest.$ac_ext <<_ACEOF
2935/* end confdefs.h. */
2936#include <ac_nonexistent.h>
2937_ACEOF
2938if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2939 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2940 ac_status=$?
2941 grep -v '^ *+' conftest.er1 >conftest.err
2942 rm -f conftest.er1
2943 cat conftest.err >&5
2944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2945 (exit $ac_status); } >/dev/null; then
2946 if test -s conftest.err; then
2947 ac_cpp_err=$ac_c_preproc_warn_flag
2948 else
2949 ac_cpp_err=
2950 fi
6e3f3080 2951else
ba479fd2 2952 ac_cpp_err=yes
63cf211a 2953fi
ba479fd2
NN
2954if test -z "$ac_cpp_err"; then
2955 # Broken: success on invalid input.
2956continue
2957else
2958 echo "$as_me: failed program was:" >&5
2959sed 's/^/| /' conftest.$ac_ext >&5
2960
2961 # Passes both tests.
2962ac_preproc_ok=:
2963break
63cf211a 2964fi
ba479fd2
NN
2965rm -f conftest.err conftest.$ac_ext
2966
2967done
2968# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2969rm -f conftest.err conftest.$ac_ext
2970if $ac_preproc_ok; then
2971 :
6e3f3080 2972else
ba479fd2
NN
2973 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2974See \`config.log' for more details." >&5
2975echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2976See \`config.log' for more details." >&2;}
2977 { (exit 1); exit 1; }; }
6e3f3080
NN
2978fi
2979
ba479fd2
NN
2980ac_ext=c
2981ac_cpp='$CPP $CPPFLAGS'
2982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2984ac_compiler_gnu=$ac_cv_c_compiler_gnu
2985
2986echo "$as_me:$LINENO: checking for inline" >&5
2987echo $ECHO_N "checking for inline... $ECHO_C" >&6
2988if test "${ac_cv_c_inline+set}" = set; then
2989 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
2990else
2991 ac_cv_c_inline=no
2992for ac_kw in inline __inline__ __inline; do
ba479fd2
NN
2993 cat >conftest.$ac_ext <<_ACEOF
2994#line $LINENO "configure"
2995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
3000#ifndef __cplusplus
3001typedef int foo_t;
3002static $ac_kw foo_t static_foo () {return 0; }
3003$ac_kw foo_t foo () {return 0; }
3004#endif
414d23ae 3005
ba479fd2
NN
3006_ACEOF
3007rm -f conftest.$ac_objext
3008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3009 (eval $ac_compile) 2>&5
3010 ac_status=$?
3011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3012 (exit $ac_status); } &&
3013 { ac_try='test -s conftest.$ac_objext'
3014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3015 (eval $ac_try) 2>&5
3016 ac_status=$?
3017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3018 (exit $ac_status); }; }; then
414d23ae
HPN
3019 ac_cv_c_inline=$ac_kw; break
3020else
ba479fd2
NN
3021 echo "$as_me: failed program was:" >&5
3022sed 's/^/| /' conftest.$ac_ext >&5
3023
414d23ae 3024fi
ba479fd2 3025rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3026done
3027
3028fi
ba479fd2
NN
3029echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3030echo "${ECHO_T}$ac_cv_c_inline" >&6
3031case $ac_cv_c_inline in
414d23ae 3032 inline | yes) ;;
ba479fd2
NN
3033 no)
3034cat >>confdefs.h <<\_ACEOF
3035#define inline
3036_ACEOF
e1366e0c 3037 ;;
ba479fd2 3038 *) cat >>confdefs.h <<_ACEOF
e1366e0c 3039#define inline $ac_cv_c_inline
ba479fd2 3040_ACEOF
e1366e0c 3041 ;;
414d23ae
HPN
3042esac
3043
414d23ae 3044
ba479fd2
NN
3045echo "$as_me:$LINENO: checking for long long int" >&5
3046echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3047if test "${ac_cv_c_long_long+set}" = set; then
3048 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3049else
ba479fd2
NN
3050 cat >conftest.$ac_ext <<_ACEOF
3051#line $LINENO "configure"
3052/* confdefs.h. */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h. */
414d23ae 3057
ba479fd2
NN
3058int
3059main ()
3060{
414d23ae 3061long long int i;
ba479fd2
NN
3062 ;
3063 return 0;
3064}
3065_ACEOF
3066rm -f conftest.$ac_objext
3067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3068 (eval $ac_compile) 2>&5
3069 ac_status=$?
3070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071 (exit $ac_status); } &&
3072 { ac_try='test -s conftest.$ac_objext'
3073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3074 (eval $ac_try) 2>&5
3075 ac_status=$?
3076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077 (exit $ac_status); }; }; then
414d23ae
HPN
3078 ac_cv_c_long_long=yes
3079else
ba479fd2
NN
3080 echo "$as_me: failed program was:" >&5
3081sed 's/^/| /' conftest.$ac_ext >&5
3082
3083ac_cv_c_long_long=no
414d23ae 3084fi
ba479fd2 3085rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3086fi
ba479fd2
NN
3087echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3088echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3089 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3090
3091cat >>confdefs.h <<\_ACEOF
414d23ae 3092#define HAVE_LONG_LONG 1
ba479fd2 3093_ACEOF
414d23ae
HPN
3094
3095 fi
ba479fd2
NN
3096echo "$as_me:$LINENO: checking for __int64" >&5
3097echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3098if test "${ac_cv_c___int64+set}" = set; then
3099 echo $ECHO_N "(cached) $ECHO_C" >&6
3100else
3101 cat >conftest.$ac_ext <<_ACEOF
3102#line $LINENO "configure"
3103/* confdefs.h. */
3104_ACEOF
3105cat confdefs.h >>conftest.$ac_ext
3106cat >>conftest.$ac_ext <<_ACEOF
3107/* end confdefs.h. */
3108
3109int
3110main ()
3111{
414d23ae 3112__int64 i;
ba479fd2
NN
3113 ;
3114 return 0;
3115}
3116_ACEOF
3117rm -f conftest.$ac_objext
3118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3119 (eval $ac_compile) 2>&5
3120 ac_status=$?
3121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3122 (exit $ac_status); } &&
3123 { ac_try='test -s conftest.$ac_objext'
3124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3125 (eval $ac_try) 2>&5
3126 ac_status=$?
3127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3128 (exit $ac_status); }; }; then
414d23ae
HPN
3129 ac_cv_c___int64=yes
3130else
ba479fd2
NN
3131 echo "$as_me: failed program was:" >&5
3132sed 's/^/| /' conftest.$ac_ext >&5
3133
3134ac_cv_c___int64=no
414d23ae 3135fi
ba479fd2 3136rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3137fi
ba479fd2
NN
3138echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3139echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3140 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3141
3142cat >>confdefs.h <<\_ACEOF
414d23ae 3143#define HAVE___INT64 1
ba479fd2 3144_ACEOF
414d23ae
HPN
3145
3146 fi
3147
ba479fd2
NN
3148echo "$as_me:$LINENO: checking for built-in _Bool" >&5
3149echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6
3150if test "${gcc_cv_c__bool+set}" = set; then
3151 echo $ECHO_N "(cached) $ECHO_C" >&6
3152else
3153 cat >conftest.$ac_ext <<_ACEOF
3154#line $LINENO "configure"
3155/* confdefs.h. */
3156_ACEOF
3157cat confdefs.h >>conftest.$ac_ext
3158cat >>conftest.$ac_ext <<_ACEOF
3159/* end confdefs.h. */
3160
3161int
3162main ()
3163{
414d23ae 3164_Bool foo;
ba479fd2
NN
3165 ;
3166 return 0;
3167}
3168_ACEOF
3169rm -f conftest.$ac_objext
3170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3171 (eval $ac_compile) 2>&5
3172 ac_status=$?
3173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3174 (exit $ac_status); } &&
3175 { ac_try='test -s conftest.$ac_objext'
3176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3177 (eval $ac_try) 2>&5
3178 ac_status=$?
3179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3180 (exit $ac_status); }; }; then
414d23ae
HPN
3181 gcc_cv_c__bool=yes
3182else
ba479fd2
NN
3183 echo "$as_me: failed program was:" >&5
3184sed 's/^/| /' conftest.$ac_ext >&5
cafe096b 3185
ba479fd2 3186gcc_cv_c__bool=no
6e3f3080 3187fi
ba479fd2 3188rm -f conftest.$ac_objext conftest.$ac_ext
6e3f3080 3189
ba479fd2
NN
3190fi
3191echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5
3192echo "${ECHO_T}$gcc_cv_c__bool" >&6
63cf211a 3193if test $gcc_cv_c__bool = yes; then
ba479fd2
NN
3194
3195cat >>confdefs.h <<\_ACEOF
414d23ae 3196#define HAVE__BOOL 1
ba479fd2 3197_ACEOF
414d23ae
HPN
3198
3199fi
3200
3201
3202# sizeof(char) is 1 by definition.
ba479fd2
NN
3203echo "$as_me:$LINENO: checking size of void *" >&5
3204echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3205if test "${ac_cv_sizeof_void_p+set}" = set; then
3206 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd
KG
3207else
3208 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3209 cat >conftest.$ac_ext <<_ACEOF
3210#line $LINENO "configure"
3211/* confdefs.h. */
3212_ACEOF
3213cat confdefs.h >>conftest.$ac_ext
3214cat >>conftest.$ac_ext <<_ACEOF
3215/* end confdefs.h. */
75b6f3fd
KG
3216#include "confdefs.h"
3217#include <sys/types.h>
3218
3219
ba479fd2
NN
3220int
3221main ()
3222{
75b6f3fd 3223switch (0) case 0: case (sizeof (void *) == $ac_size):;
ba479fd2
NN
3224 ;
3225 return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3230 (eval $ac_compile) 2>&5
3231 ac_status=$?
3232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3233 (exit $ac_status); } &&
3234 { ac_try='test -s conftest.$ac_objext'
3235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3236 (eval $ac_try) 2>&5
3237 ac_status=$?
3238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3239 (exit $ac_status); }; }; then
75b6f3fd
KG
3240 ac_cv_sizeof_void_p=$ac_size
3241else
ba479fd2
NN
3242 echo "$as_me: failed program was:" >&5
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
75b6f3fd 3245fi
ba479fd2 3246rm -f conftest.$ac_objext conftest.$ac_ext
75b6f3fd
KG
3247 if test x$ac_cv_sizeof_void_p != x ; then break; fi
3248done
3249
3250fi
3251
3252if test x$ac_cv_sizeof_void_p = x ; then
ba479fd2
NN
3253 { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5
3254echo "$as_me: error: cannot determine a size for void *" >&2;}
3255 { (exit 1); exit 1; }; }
75b6f3fd 3256fi
ba479fd2
NN
3257echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3258echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3259
3260cat >>confdefs.h <<_ACEOF
75b6f3fd 3261#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
ba479fd2 3262_ACEOF
75b6f3fd
KG
3263
3264
ba479fd2
NN
3265echo "$as_me:$LINENO: checking size of short" >&5
3266echo $ECHO_N "checking size of short... $ECHO_C" >&6
3267if test "${ac_cv_sizeof_short+set}" = set; then
3268 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3269else
4977bab6 3270 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3271 cat >conftest.$ac_ext <<_ACEOF
3272#line $LINENO "configure"
3273/* confdefs.h. */
3274_ACEOF
3275cat confdefs.h >>conftest.$ac_ext
3276cat >>conftest.$ac_ext <<_ACEOF
3277/* end confdefs.h. */
414d23ae
HPN
3278#include "confdefs.h"
3279#include <sys/types.h>
3280
3281
ba479fd2
NN
3282int
3283main ()
3284{
414d23ae 3285switch (0) case 0: case (sizeof (short) == $ac_size):;
ba479fd2
NN
3286 ;
3287 return 0;
3288}
3289_ACEOF
3290rm -f conftest.$ac_objext
3291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3292 (eval $ac_compile) 2>&5
3293 ac_status=$?
3294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3295 (exit $ac_status); } &&
3296 { ac_try='test -s conftest.$ac_objext'
3297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3298 (eval $ac_try) 2>&5
3299 ac_status=$?
3300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3301 (exit $ac_status); }; }; then
414d23ae
HPN
3302 ac_cv_sizeof_short=$ac_size
3303else
ba479fd2
NN
3304 echo "$as_me: failed program was:" >&5
3305sed 's/^/| /' conftest.$ac_ext >&5
3306
84c041a1 3307fi
ba479fd2 3308rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3309 if test x$ac_cv_sizeof_short != x ; then break; fi
3310done
3311
84c041a1 3312fi
414d23ae
HPN
3313
3314if test x$ac_cv_sizeof_short = x ; then
ba479fd2
NN
3315 { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
3316echo "$as_me: error: cannot determine a size for short" >&2;}
3317 { (exit 1); exit 1; }; }
84c041a1 3318fi
ba479fd2
NN
3319echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
3320echo "${ECHO_T}$ac_cv_sizeof_short" >&6
3321
3322cat >>confdefs.h <<_ACEOF
414d23ae 3323#define SIZEOF_SHORT $ac_cv_sizeof_short
ba479fd2 3324_ACEOF
84c041a1 3325
414d23ae 3326
ba479fd2
NN
3327echo "$as_me:$LINENO: checking size of int" >&5
3328echo $ECHO_N "checking size of int... $ECHO_C" >&6
3329if test "${ac_cv_sizeof_int+set}" = set; then
3330 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3331else
4977bab6 3332 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3333 cat >conftest.$ac_ext <<_ACEOF
3334#line $LINENO "configure"
3335/* confdefs.h. */
3336_ACEOF
3337cat confdefs.h >>conftest.$ac_ext
3338cat >>conftest.$ac_ext <<_ACEOF
3339/* end confdefs.h. */
414d23ae
HPN
3340#include "confdefs.h"
3341#include <sys/types.h>
3342
75e93faa 3343
ba479fd2
NN
3344int
3345main ()
3346{
414d23ae 3347switch (0) case 0: case (sizeof (int) == $ac_size):;
ba479fd2
NN
3348 ;
3349 return 0;
3350}
3351_ACEOF
3352rm -f conftest.$ac_objext
3353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3354 (eval $ac_compile) 2>&5
3355 ac_status=$?
3356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3357 (exit $ac_status); } &&
3358 { ac_try='test -s conftest.$ac_objext'
3359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3360 (eval $ac_try) 2>&5
3361 ac_status=$?
3362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3363 (exit $ac_status); }; }; then
414d23ae 3364 ac_cv_sizeof_int=$ac_size
75e93faa 3365else
ba479fd2
NN
3366 echo "$as_me: failed program was:" >&5
3367sed 's/^/| /' conftest.$ac_ext >&5
3368
75e93faa 3369fi
ba479fd2 3370rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3371 if test x$ac_cv_sizeof_int != x ; then break; fi
75e93faa
ZW
3372done
3373
3374fi
3375
414d23ae 3376if test x$ac_cv_sizeof_int = x ; then
ba479fd2
NN
3377 { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
3378echo "$as_me: error: cannot determine a size for int" >&2;}
3379 { (exit 1); exit 1; }; }
414d23ae 3380fi
ba479fd2
NN
3381echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
3382echo "${ECHO_T}$ac_cv_sizeof_int" >&6
3383
3384cat >>confdefs.h <<_ACEOF
414d23ae 3385#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 3386_ACEOF
75e93faa 3387
414d23ae 3388
ba479fd2
NN
3389echo "$as_me:$LINENO: checking size of long" >&5
3390echo $ECHO_N "checking size of long... $ECHO_C" >&6
3391if test "${ac_cv_sizeof_long+set}" = set; then
3392 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3393else
4977bab6 3394 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3395 cat >conftest.$ac_ext <<_ACEOF
3396#line $LINENO "configure"
3397/* confdefs.h. */
3398_ACEOF
3399cat confdefs.h >>conftest.$ac_ext
3400cat >>conftest.$ac_ext <<_ACEOF
3401/* end confdefs.h. */
75e93faa 3402#include "confdefs.h"
414d23ae
HPN
3403#include <sys/types.h>
3404
75e93faa 3405
ba479fd2
NN
3406int
3407main ()
3408{
414d23ae 3409switch (0) case 0: case (sizeof (long) == $ac_size):;
ba479fd2
NN
3410 ;
3411 return 0;
3412}
3413_ACEOF
3414rm -f conftest.$ac_objext
3415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3416 (eval $ac_compile) 2>&5
3417 ac_status=$?
3418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3419 (exit $ac_status); } &&
3420 { ac_try='test -s conftest.$ac_objext'
3421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3422 (eval $ac_try) 2>&5
3423 ac_status=$?
3424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3425 (exit $ac_status); }; }; then
414d23ae 3426 ac_cv_sizeof_long=$ac_size
75e93faa 3427else
ba479fd2
NN
3428 echo "$as_me: failed program was:" >&5
3429sed 's/^/| /' conftest.$ac_ext >&5
3430
75e93faa 3431fi
ba479fd2 3432rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3433 if test x$ac_cv_sizeof_long != x ; then break; fi
3434done
75e93faa 3435
414d23ae 3436fi
75e93faa 3437
414d23ae 3438if test x$ac_cv_sizeof_long = x ; then
ba479fd2
NN
3439 { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
3440echo "$as_me: error: cannot determine a size for long" >&2;}
3441 { (exit 1); exit 1; }; }
75e93faa 3442fi
ba479fd2
NN
3443echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
3444echo "${ECHO_T}$ac_cv_sizeof_long" >&6
3445
3446cat >>confdefs.h <<_ACEOF
414d23ae 3447#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 3448_ACEOF
75e93faa
ZW
3449
3450
414d23ae 3451if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3452 echo "$as_me:$LINENO: checking size of long long" >&5
3453echo $ECHO_N "checking size of long long... $ECHO_C" >&6
3454if test "${ac_cv_sizeof_long_long+set}" = set; then
3455 echo $ECHO_N "(cached) $ECHO_C" >&6
04cabffc 3456else
4977bab6 3457 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3458 cat >conftest.$ac_ext <<_ACEOF
3459#line $LINENO "configure"
3460/* confdefs.h. */
3461_ACEOF
3462cat confdefs.h >>conftest.$ac_ext
3463cat >>conftest.$ac_ext <<_ACEOF
3464/* end confdefs.h. */
414d23ae
HPN
3465#include "confdefs.h"
3466#include <sys/types.h>
3467
04cabffc 3468
ba479fd2
NN
3469int
3470main ()
3471{
414d23ae 3472switch (0) case 0: case (sizeof (long long) == $ac_size):;
ba479fd2
NN
3473 ;
3474 return 0;
3475}
3476_ACEOF
3477rm -f conftest.$ac_objext
3478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3479 (eval $ac_compile) 2>&5
3480 ac_status=$?
3481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3482 (exit $ac_status); } &&
3483 { ac_try='test -s conftest.$ac_objext'
3484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3485 (eval $ac_try) 2>&5
3486 ac_status=$?
3487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3488 (exit $ac_status); }; }; then
414d23ae 3489 ac_cv_sizeof_long_long=$ac_size
04cabffc 3490else
ba479fd2
NN
3491 echo "$as_me: failed program was:" >&5
3492sed 's/^/| /' conftest.$ac_ext >&5
3493
04cabffc 3494fi
ba479fd2 3495rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3496 if test x$ac_cv_sizeof_long_long != x ; then break; fi
3497done
3498
04cabffc
KG
3499fi
3500
414d23ae 3501if test x$ac_cv_sizeof_long_long = x ; then
ba479fd2
NN
3502 { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
3503echo "$as_me: error: cannot determine a size for long long" >&2;}
3504 { (exit 1); exit 1; }; }
414d23ae 3505fi
ba479fd2
NN
3506echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
3507echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
3508
3509cat >>confdefs.h <<_ACEOF
414d23ae 3510#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 3511_ACEOF
04cabffc 3512
04cabffc 3513
414d23ae
HPN
3514fi
3515if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3516 echo "$as_me:$LINENO: checking size of __int64" >&5
3517echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
3518if test "${ac_cv_sizeof___int64+set}" = set; then
3519 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3520else
4977bab6 3521 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3522 cat >conftest.$ac_ext <<_ACEOF
3523#line $LINENO "configure"
3524/* confdefs.h. */
3525_ACEOF
3526cat confdefs.h >>conftest.$ac_ext
3527cat >>conftest.$ac_ext <<_ACEOF
3528/* end confdefs.h. */
414d23ae
HPN
3529#include "confdefs.h"
3530#include <sys/types.h>
3531
61842080 3532
ba479fd2
NN
3533int
3534main ()
3535{
414d23ae 3536switch (0) case 0: case (sizeof (__int64) == $ac_size):;
ba479fd2
NN
3537 ;
3538 return 0;
3539}
3540_ACEOF
3541rm -f conftest.$ac_objext
3542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3543 (eval $ac_compile) 2>&5
3544 ac_status=$?
3545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3546 (exit $ac_status); } &&
3547 { ac_try='test -s conftest.$ac_objext'
3548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3549 (eval $ac_try) 2>&5
3550 ac_status=$?
3551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552 (exit $ac_status); }; }; then
414d23ae 3553 ac_cv_sizeof___int64=$ac_size
75e93faa 3554else
ba479fd2
NN
3555 echo "$as_me: failed program was:" >&5
3556sed 's/^/| /' conftest.$ac_ext >&5
3557
75e93faa 3558fi
ba479fd2 3559rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3560 if test x$ac_cv_sizeof___int64 != x ; then break; fi
3561done
3562
75e93faa
ZW
3563fi
3564
414d23ae 3565if test x$ac_cv_sizeof___int64 = x ; then
ba479fd2
NN
3566 { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
3567echo "$as_me: error: cannot determine a size for __int64" >&2;}
3568 { (exit 1); exit 1; }; }
414d23ae 3569fi
ba479fd2
NN
3570echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
3571echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
3572
3573cat >>confdefs.h <<_ACEOF
414d23ae 3574#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 3575_ACEOF
414d23ae 3576
cafe096b 3577
414d23ae
HPN
3578fi
3579
34a86c2b
NN
3580# -----------------
3581# Find Ada compiler
3582# -----------------
3583
3584# See if GNAT has been installed
34a86c2b
NN
3585
3586
e0520fa7 3587
ba479fd2
NN
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
34a86c2b 3590set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
ba479fd2
NN
3591echo "$as_me:$LINENO: checking for $ac_word" >&5
3592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3593if test "${ac_cv_prog_GNATBIND+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3595else
3596 if test -n "$GNATBIND"; then
3597 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3598else
ba479fd2
NN
3599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
3604 for ac_exec_ext in '' $ac_executable_extensions; do
3605 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3606 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3607 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3608 break 2
3609 fi
3610done
3611done
3612
34a86c2b
NN
3613fi
3614fi
ba479fd2 3615GNATBIND=$ac_cv_prog_GNATBIND
34a86c2b 3616if test -n "$GNATBIND"; then
ba479fd2
NN
3617 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3618echo "${ECHO_T}$GNATBIND" >&6
34a86c2b 3619else
ba479fd2
NN
3620 echo "$as_me:$LINENO: result: no" >&5
3621echo "${ECHO_T}no" >&6
34a86c2b
NN
3622fi
3623
ba479fd2 3624fi
34a86c2b 3625if test -z "$ac_cv_prog_GNATBIND"; then
ba479fd2 3626 ac_ct_GNATBIND=$GNATBIND
34a86c2b
NN
3627 # Extract the first word of "gnatbind", so it can be a program name with args.
3628set dummy gnatbind; ac_word=$2
ba479fd2
NN
3629echo "$as_me:$LINENO: checking for $ac_word" >&5
3630echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3631if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3632 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b 3633else
ba479fd2
NN
3634 if test -n "$ac_ct_GNATBIND"; then
3635 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
34a86c2b 3636else
ba479fd2
NN
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_exec_ext in '' $ac_executable_extensions; do
3643 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3644 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3645 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3646 break 2
3647 fi
3648done
3649done
3650
3651 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
34a86c2b
NN
3652fi
3653fi
ba479fd2
NN
3654ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3655if test -n "$ac_ct_GNATBIND"; then
3656 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3657echo "${ECHO_T}$ac_ct_GNATBIND" >&6
34a86c2b 3658else
ba479fd2
NN
3659 echo "$as_me:$LINENO: result: no" >&5
3660echo "${ECHO_T}no" >&6
34a86c2b
NN
3661fi
3662
ba479fd2 3663 GNATBIND=$ac_ct_GNATBIND
34a86c2b 3664else
ba479fd2 3665 GNATBIND="$ac_cv_prog_GNATBIND"
34a86c2b
NN
3666fi
3667
ba479fd2
NN
3668echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3669echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3670if test "${gcc_cv_cc_supports_ada+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3672else
3673 cat >conftest.adb <<EOF
3674procedure conftest is begin null; end conftest;
3675EOF
e0520fa7
NN
3676gcc_cv_cc_supports_ada=no
3677# There is a bug in old released versions of GCC which causes the
3678# driver to exit successfully when the appropriate language module
3679# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3680# Therefore we must check for the error message as well as an
3681# unsuccessful exit.
3682errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
3683if test x"$errors" = x; then
3684 gcc_cv_cc_supports_ada=yes
3685 break
3686fi
34a86c2b
NN
3687rm -f conftest.*
3688fi
ba479fd2
NN
3689echo "$as_me:$LINENO: result: $gcc_cv_cc_supports_ada" >&5
3690echo "${ECHO_T}$gcc_cv_cc_supports_ada" >&6
34a86c2b 3691
e0520fa7 3692if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then
34a86c2b
NN
3693 have_gnat=yes
3694else
3695 have_gnat=no
3696fi
3697
3698
34a86c2b
NN
3699# ---------------------
3700# Warnings and checking
3701# ---------------------
3702
3703strict1_warn=
f73ccc50 3704if test $ac_cv_prog_cc_no_long_long = yes ; then
34a86c2b
NN
3705 strict1_warn="-pedantic -Wno-long-long"
3706fi
3707
3708
ba479fd2 3709# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
3710# That's useful for people building cross-compilers, or just running a
3711# quick `make'.
3712warn_cflags=
3713if test "x$GCC" = "xyes"; then
3714 warn_cflags='$(GCC_WARN_CFLAGS)'
3715fi
3716
3717
dd859b8a
KG
3718# Enable -Werror in bootstrap stage2 and later.
3719# Change the default to "no" on release branches.
3720# Check whether --enable-werror or --disable-werror was given.
3721if test "${enable_werror+set}" = set; then
3722 enableval="$enable_werror"
ba479fd2 3723
dd859b8a
KG
3724else
3725 enable_werror=yes
ba479fd2 3726fi;
dd859b8a
KG
3727if test x$enable_werror = xyes ; then
3728 WERROR=-Werror
3729fi
3730
3731
414d23ae
HPN
3732# Enable expensive internal checks
3733# Check whether --enable-checking or --disable-checking was given.
3734if test "${enable_checking+set}" = set; then
3735 enableval="$enable_checking"
3736 ac_checking=
3737ac_tree_checking=
3738ac_rtl_checking=
3739ac_rtlflag_checking=
3740ac_gc_checking=
3741ac_gc_always_collect=
5dfa45d0 3742ac_fold_checking=
414d23ae
HPN
3743case "${enableval}" in
3744yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
3745 ac_rtlflag_checking=1 ;;
3746no) ;;
3747*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
3748 set fnord $enableval; shift
3749 IFS="$ac_save_IFS"
3750 for check
3751 do
3752 case $check in
3753 misc) ac_checking=1 ;;
3754 tree) ac_tree_checking=1 ;;
3755 rtlflag) ac_rtlflag_checking=1 ;;
3756 rtl) ac_rtl_checking=1 ;;
3757 gc) ac_gc_checking=1 ;;
3758 gcac) ac_gc_always_collect=1 ;;
5dfa45d0 3759 fold) ac_fold_checking=1 ;;
414d23ae 3760 valgrind) ac_checking_valgrind=1 ;;
ba479fd2
NN
3761 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
3762echo "$as_me: error: unknown check category $check" >&2;}
3763 { (exit 1); exit 1; }; } ;;
414d23ae
HPN
3764 esac
3765 done
3766 ;;
3767esac
3768
75e93faa 3769else
414d23ae
HPN
3770 # Enable some checks by default for development versions of GCC
3771ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
ba479fd2
NN
3772fi;
3773nocommon_flag=""
3774if test x$ac_checking != x ; then
3775
3776cat >>confdefs.h <<\_ACEOF
3777#define ENABLE_CHECKING 1
3778_ACEOF
3779
3780 nocommon_flag=-fno-common
3781fi
3782
3783if test x$ac_tree_checking != x ; then
3784
3785cat >>confdefs.h <<\_ACEOF
3786#define ENABLE_TREE_CHECKING 1
3787_ACEOF
3788
3789fi
3790if test x$ac_rtl_checking != x ; then
3791
3792cat >>confdefs.h <<\_ACEOF
3793#define ENABLE_RTL_CHECKING 1
3794_ACEOF
3795
3796fi
3797if test x$ac_rtlflag_checking != x ; then
3798
3799cat >>confdefs.h <<\_ACEOF
3800#define ENABLE_RTL_FLAG_CHECKING 1
3801_ACEOF
3802
3803fi
3804if test x$ac_gc_checking != x ; then
3805
3806cat >>confdefs.h <<\_ACEOF
3807#define ENABLE_GC_CHECKING 1
3808_ACEOF
3809
3810fi
3811if test x$ac_gc_always_collect != x ; then
3812
3813cat >>confdefs.h <<\_ACEOF
3814#define ENABLE_GC_ALWAYS_COLLECT 1
3815_ACEOF
3816
3817fi
3818if test x$ac_fold_checking != x ; then
3819
3820cat >>confdefs.h <<\_ACEOF
3821#define ENABLE_FOLD_CHECKING 1
3822_ACEOF
3823
3824fi
3825valgrind_path_defines=
3826valgrind_command=
3827
3828
3829echo "$as_me:$LINENO: checking for egrep" >&5
3830echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3831if test "${ac_cv_prog_egrep+set}" = set; then
3832 echo $ECHO_N "(cached) $ECHO_C" >&6
3833else
3834 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3835 then ac_cv_prog_egrep='grep -E'
3836 else ac_cv_prog_egrep='egrep'
3837 fi
3838fi
3839echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3840echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3841 EGREP=$ac_cv_prog_egrep
3842
3843
3844echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3845echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3846if test "${ac_cv_header_stdc+set}" = set; then
3847 echo $ECHO_N "(cached) $ECHO_C" >&6
3848else
3849 cat >conftest.$ac_ext <<_ACEOF
3850#line $LINENO "configure"
3851/* confdefs.h. */
3852_ACEOF
3853cat confdefs.h >>conftest.$ac_ext
3854cat >>conftest.$ac_ext <<_ACEOF
3855/* end confdefs.h. */
3856#include <stdlib.h>
3857#include <stdarg.h>
3858#include <string.h>
3859#include <float.h>
3860
3861int
3862main ()
3863{
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
3869rm -f conftest.$ac_objext
3870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3871 (eval $ac_compile) 2>&5
3872 ac_status=$?
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } &&
3875 { ac_try='test -s conftest.$ac_objext'
3876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3877 (eval $ac_try) 2>&5
3878 ac_status=$?
3879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3880 (exit $ac_status); }; }; then
3881 ac_cv_header_stdc=yes
3882else
3883 echo "$as_me: failed program was:" >&5
3884sed 's/^/| /' conftest.$ac_ext >&5
3885
3886ac_cv_header_stdc=no
3887fi
3888rm -f conftest.$ac_objext conftest.$ac_ext
3889
3890if test $ac_cv_header_stdc = yes; then
3891 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3892 cat >conftest.$ac_ext <<_ACEOF
3893#line $LINENO "configure"
3894/* confdefs.h. */
3895_ACEOF
3896cat confdefs.h >>conftest.$ac_ext
3897cat >>conftest.$ac_ext <<_ACEOF
3898/* end confdefs.h. */
3899#include <string.h>
3900
3901_ACEOF
3902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3903 $EGREP "memchr" >/dev/null 2>&1; then
3904 :
3905else
3906 ac_cv_header_stdc=no
3907fi
3908rm -f conftest*
3909
3910fi
3911
3912if test $ac_cv_header_stdc = yes; then
3913 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3914 cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
3916/* confdefs.h. */
3917_ACEOF
3918cat confdefs.h >>conftest.$ac_ext
3919cat >>conftest.$ac_ext <<_ACEOF
3920/* end confdefs.h. */
3921#include <stdlib.h>
3922
3923_ACEOF
3924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3925 $EGREP "free" >/dev/null 2>&1; then
3926 :
3927else
3928 ac_cv_header_stdc=no
3929fi
3930rm -f conftest*
3931
3932fi
3933
3934if test $ac_cv_header_stdc = yes; then
3935 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3936 if test "$cross_compiling" = yes; then
3937 :
3938else
3939 cat >conftest.$ac_ext <<_ACEOF
3940#line $LINENO "configure"
3941/* confdefs.h. */
3942_ACEOF
3943cat confdefs.h >>conftest.$ac_ext
3944cat >>conftest.$ac_ext <<_ACEOF
3945/* end confdefs.h. */
3946#include <ctype.h>
3947#if ((' ' & 0x0FF) == 0x020)
3948# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3949# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3950#else
3951# define ISLOWER(c) \
3952 (('a' <= (c) && (c) <= 'i') \
3953 || ('j' <= (c) && (c) <= 'r') \
3954 || ('s' <= (c) && (c) <= 'z'))
3955# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3956#endif
3957
3958#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3959int
3960main ()
3961{
3962 int i;
3963 for (i = 0; i < 256; i++)
3964 if (XOR (islower (i), ISLOWER (i))
3965 || toupper (i) != TOUPPER (i))
3966 exit(2);
3967 exit (0);
3968}
3969_ACEOF
3970rm -f conftest$ac_exeext
3971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3972 (eval $ac_link) 2>&5
3973 ac_status=$?
3974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3977 (eval $ac_try) 2>&5
3978 ac_status=$?
3979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3980 (exit $ac_status); }; }; then
3981 :
3982else
3983 echo "$as_me: program exited with status $ac_status" >&5
3984echo "$as_me: failed program was:" >&5
3985sed 's/^/| /' conftest.$ac_ext >&5
3986
3987( exit $ac_status )
3988ac_cv_header_stdc=no
63cf211a 3989fi
a6a5e4c9 3990rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3991fi
3992fi
3993fi
3994echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3995echo "${ECHO_T}$ac_cv_header_stdc" >&6
3996if test $ac_cv_header_stdc = yes; then
63cf211a 3997
ba479fd2
NN
3998cat >>confdefs.h <<\_ACEOF
3999#define STDC_HEADERS 1
4000_ACEOF
75e93faa 4001
414d23ae 4002fi
827ae6cf 4003
ba479fd2
NN
4004# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4005
4006
4007
827ae6cf 4008
6e3f3080
NN
4009
4010
6e3f3080 4011
6e3f3080 4012
ba479fd2
NN
4013
4014for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4015 inttypes.h stdint.h unistd.h
4016do
4017as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4018echo "$as_me:$LINENO: checking for $ac_header" >&5
4019echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4020if eval "test \"\${$as_ac_Header+set}\" = set"; then
4021 echo $ECHO_N "(cached) $ECHO_C" >&6
4022else
4023 cat >conftest.$ac_ext <<_ACEOF
4024#line $LINENO "configure"
4025/* confdefs.h. */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h. */
4030$ac_includes_default
4031
4032#include <$ac_header>
4033_ACEOF
4034rm -f conftest.$ac_objext
4035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4036 (eval $ac_compile) 2>&5
4037 ac_status=$?
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); } &&
4040 { ac_try='test -s conftest.$ac_objext'
4041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4042 (eval $ac_try) 2>&5
4043 ac_status=$?
4044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4045 (exit $ac_status); }; }; then
4046 eval "$as_ac_Header=yes"
4047else
4048 echo "$as_me: failed program was:" >&5
4049sed 's/^/| /' conftest.$ac_ext >&5
4050
4051eval "$as_ac_Header=no"
4052fi
4053rm -f conftest.$ac_objext conftest.$ac_ext
4054fi
4055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4057if test `eval echo '${'$as_ac_Header'}'` = yes; then
4058 cat >>confdefs.h <<_ACEOF
4059#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4060_ACEOF
6e3f3080 4061
63cf211a 4062fi
6e3f3080 4063
ba479fd2
NN
4064done
4065
4066
4067if test "${ac_cv_header_valgrind_h+set}" = set; then
4068 echo "$as_me:$LINENO: checking for valgrind.h" >&5
4069echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4070if test "${ac_cv_header_valgrind_h+set}" = set; then
4071 echo $ECHO_N "(cached) $ECHO_C" >&6
4072fi
4073echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4074echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4075else
4076 # Is the header compilable?
4077echo "$as_me:$LINENO: checking valgrind.h usability" >&5
4078echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
4079cat >conftest.$ac_ext <<_ACEOF
4080#line $LINENO "configure"
4081/* confdefs.h. */
4082_ACEOF
4083cat confdefs.h >>conftest.$ac_ext
4084cat >>conftest.$ac_ext <<_ACEOF
4085/* end confdefs.h. */
4086$ac_includes_default
63cf211a 4087#include <valgrind.h>
ba479fd2
NN
4088_ACEOF
4089rm -f conftest.$ac_objext
4090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4091 (eval $ac_compile) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); } &&
4095 { ac_try='test -s conftest.$ac_objext'
4096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4097 (eval $ac_try) 2>&5
4098 ac_status=$?
4099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4100 (exit $ac_status); }; }; then
4101 ac_header_compiler=yes
4102else
4103 echo "$as_me: failed program was:" >&5
4104sed 's/^/| /' conftest.$ac_ext >&5
4105
4106ac_header_compiler=no
4107fi
4108rm -f conftest.$ac_objext conftest.$ac_ext
4109echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4110echo "${ECHO_T}$ac_header_compiler" >&6
4111
4112# Is the header present?
4113echo "$as_me:$LINENO: checking valgrind.h presence" >&5
4114echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
4115cat >conftest.$ac_ext <<_ACEOF
4116#line $LINENO "configure"
4117/* confdefs.h. */
4118_ACEOF
4119cat confdefs.h >>conftest.$ac_ext
4120cat >>conftest.$ac_ext <<_ACEOF
4121/* end confdefs.h. */
4122#include <valgrind.h>
4123_ACEOF
4124if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4125 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4126 ac_status=$?
4127 grep -v '^ *+' conftest.er1 >conftest.err
4128 rm -f conftest.er1
4129 cat conftest.err >&5
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); } >/dev/null; then
4132 if test -s conftest.err; then
4133 ac_cpp_err=$ac_c_preproc_warn_flag
4134 else
4135 ac_cpp_err=
4136 fi
4137else
4138 ac_cpp_err=yes
4139fi
4140if test -z "$ac_cpp_err"; then
4141 ac_header_preproc=yes
4142else
4143 echo "$as_me: failed program was:" >&5
4144sed 's/^/| /' conftest.$ac_ext >&5
4145
4146 ac_header_preproc=no
4147fi
4148rm -f conftest.err conftest.$ac_ext
4149echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4150echo "${ECHO_T}$ac_header_preproc" >&6
4151
4152# So? What about this header?
4153case $ac_header_compiler:$ac_header_preproc in
4154 yes:no )
4155 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
4156echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4157 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4158echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4159 (
4160 cat <<\_ASBOX
4161## ------------------------------------ ##
4162## Report this to bug-autoconf@gnu.org. ##
4163## ------------------------------------ ##
4164_ASBOX
4165 ) |
4166 sed "s/^/$as_me: WARNING: /" >&2
4167 ;;
4168 no:yes )
4169 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
4170echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
4171 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
4172echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
4173 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4174echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4175 (
4176 cat <<\_ASBOX
4177## ------------------------------------ ##
4178## Report this to bug-autoconf@gnu.org. ##
4179## ------------------------------------ ##
4180_ASBOX
4181 ) |
4182 sed "s/^/$as_me: WARNING: /" >&2
4183 ;;
4184esac
4185echo "$as_me:$LINENO: checking for valgrind.h" >&5
4186echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4187if test "${ac_cv_header_valgrind_h+set}" = set; then
4188 echo $ECHO_N "(cached) $ECHO_C" >&6
4189else
4190 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 4191fi
ba479fd2
NN
4192echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4193echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4194
6e3f3080 4195fi
ba479fd2 4196if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
4197 have_valgrind_h=yes
4198else
ba479fd2 4199 have_valgrind_h=no
6938ec6c
NN
4200fi
4201
4202
ba479fd2 4203
414d23ae
HPN
4204if test x$ac_checking_valgrind != x ; then
4205 # It is certainly possible that there's valgrind but no valgrind.h.
4206 # GCC relies on making annotations so we must have both.
ba479fd2
NN
4207 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
4208echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
4209 cat >conftest.$ac_ext <<_ACEOF
4210#line $LINENO "configure"
4211/* confdefs.h. */
4212_ACEOF
4213cat confdefs.h >>conftest.$ac_ext
4214cat >>conftest.$ac_ext <<_ACEOF
4215/* end confdefs.h. */
a207b594 4216#include <valgrind/memcheck.h>
14011ca4
AJ
4217#ifndef VALGRIND_DISCARD
4218#error VALGRIND_DISCARD not defined
4219#endif
ba479fd2
NN
4220_ACEOF
4221if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4222 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4223 ac_status=$?
4224 grep -v '^ *+' conftest.er1 >conftest.err
4225 rm -f conftest.er1
4226 cat conftest.err >&5
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); } >/dev/null; then
4229 if test -s conftest.err; then
4230 ac_cpp_err=$ac_c_preproc_warn_flag
4231 else
4232 ac_cpp_err=
4233 fi
4234else
4235 ac_cpp_err=yes
4236fi
4237if test -z "$ac_cpp_err"; then
a207b594
HPN
4238 gcc_cv_header_valgrind_memcheck_h=yes
4239else
ba479fd2
NN
4240 echo "$as_me: failed program was:" >&5
4241sed 's/^/| /' conftest.$ac_ext >&5
4242
a207b594
HPN
4243 gcc_cv_header_valgrind_memcheck_h=no
4244fi
ba479fd2
NN
4245rm -f conftest.err conftest.$ac_ext
4246 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
4247echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
4248 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
4249echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
4250 cat >conftest.$ac_ext <<_ACEOF
4251#line $LINENO "configure"
4252/* confdefs.h. */
4253_ACEOF
4254cat confdefs.h >>conftest.$ac_ext
4255cat >>conftest.$ac_ext <<_ACEOF
4256/* end confdefs.h. */
a207b594
HPN
4257#include <memcheck.h>
4258#ifndef VALGRIND_DISCARD
4259#error VALGRIND_DISCARD not defined
4260#endif
ba479fd2
NN
4261_ACEOF
4262if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4264 ac_status=$?
4265 grep -v '^ *+' conftest.er1 >conftest.err
4266 rm -f conftest.er1
4267 cat conftest.err >&5
4268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269 (exit $ac_status); } >/dev/null; then
4270 if test -s conftest.err; then
4271 ac_cpp_err=$ac_c_preproc_warn_flag
4272 else
4273 ac_cpp_err=
4274 fi
4275else
4276 ac_cpp_err=yes
4277fi
4278if test -z "$ac_cpp_err"; then
14011ca4
AJ
4279 gcc_cv_header_memcheck_h=yes
4280else
ba479fd2
NN
4281 echo "$as_me: failed program was:" >&5
4282sed 's/^/| /' conftest.$ac_ext >&5
4283
cafe096b
EC
4284 gcc_cv_header_memcheck_h=no
4285fi
ba479fd2
NN
4286rm -f conftest.err conftest.$ac_ext
4287 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
4288echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
4289
56694dd9
ZW
4290# Prepare PATH_SEPARATOR.
4291# The user is always right.
4292if test "${PATH_SEPARATOR+set}" != set; then
4293 echo "#! /bin/sh" >conf$$.sh
4294 echo "exit 0" >>conf$$.sh
4295 chmod +x conf$$.sh
4296 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4297 PATH_SEPARATOR=';'
4298 else
4299 PATH_SEPARATOR=:
4300 fi
4301 rm -f conf$$.sh
4302fi
4303
4304# Find out how to test for executable files. Don't use a zero-byte file,
4305# as systems may use methods other than mode bits to determine executability.
4306cat >conf$$.file <<_ASEOF
4307#! /bin/sh
4308exit 0
4309_ASEOF
4310chmod +x conf$$.file
4311if test -x conf$$.file >/dev/null 2>&1; then
4312 ac_executable_p="test -x"
4313else
4314 ac_executable_p="test -f"
4315fi
4316rm -f conf$$.file
4317
4318# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 4319set dummy valgrind; ac_word=$2
ba479fd2
NN
4320echo "$as_me:$LINENO: checking for $ac_word" >&5
4321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4322if test "${ac_cv_path_valgrind_path+set}" = set; then
4323 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
4324else
4325 case "$valgrind_path" in
56694dd9
ZW
4326 [\\/]* | ?:[\\/]*)
4327 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
4328 ;;
414d23ae 4329 *)
56694dd9
ZW
4330 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
4331 for ac_dir in $PATH; do
4332 IFS="$ac_save_IFS"
4333 test -z "$ac_dir" && ac_dir=.
4334 for ac_exec_ext in '' $ac_executable_extensions; do
4335 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
4336 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
4337 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
4338 break 2
4339 fi
4340 fi
4341 done
4342 done
4343 IFS="$ac_save_IFS"
4344 ;;
414d23ae 4345esac
75e93faa 4346fi
414d23ae
HPN
4347valgrind_path="$ac_cv_path_valgrind_path"
4348if test -n "$valgrind_path"; then
ba479fd2
NN
4349 echo "$as_me:$LINENO: result: $valgrind_path" >&5
4350echo "${ECHO_T}$valgrind_path" >&6
414d23ae 4351else
ba479fd2
NN
4352 echo "$as_me:$LINENO: result: no" >&5
4353echo "${ECHO_T}no" >&6
414d23ae
HPN
4354fi
4355
a207b594
HPN
4356 if test "x$valgrind_path" = "x" \
4357 || (test $have_valgrind_h = no \
4358 && test $gcc_cv_header_memcheck_h = no \
4359 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
4360 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
4361echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
4362 { (exit 1); exit 1; }; }
414d23ae
HPN
4363 fi
4364 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
4365 valgrind_command="$valgrind_path -q"
ba479fd2
NN
4366
4367cat >>confdefs.h <<\_ACEOF
414d23ae 4368#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 4369_ACEOF
75e93faa 4370
a207b594 4371 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
4372
4373cat >>confdefs.h <<\_ACEOF
a207b594 4374#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 4375_ACEOF
a207b594
HPN
4376
4377 fi
14011ca4 4378 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
4379
4380cat >>confdefs.h <<\_ACEOF
14011ca4 4381#define HAVE_MEMCHECK_H 1
ba479fd2 4382_ACEOF
14011ca4
AJ
4383
4384 fi
414d23ae 4385fi
75e93faa 4386
75e93faa
ZW
4387
4388
414d23ae
HPN
4389# Enable code coverage collection
4390# Check whether --enable-coverage or --disable-coverage was given.
4391if test "${enable_coverage+set}" = set; then
4392 enableval="$enable_coverage"
4393 case "${enableval}" in
4394yes|noopt)
e61a2eb7 4395 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
414d23ae
HPN
4396 ;;
4397opt)
e61a2eb7 4398 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
414d23ae
HPN
4399 ;;
4400*)
ba479fd2
NN
4401 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
4402echo "$as_me: error: unknown coverage setting $enableval" >&2;}
4403 { (exit 1); exit 1; }; }
414d23ae
HPN
4404 ;;
4405esac
75e93faa 4406else
414d23ae 4407 coverage_flags=""
ba479fd2 4408fi;
5c3bc9fb 4409
414d23ae 4410
439a7e54
DN
4411# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
4412if test "${enable_gather_detailed_mem_stats+set}" = set; then
4413 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 4414
439a7e54
DN
4415else
4416 enable_gather_detailed_mem_stats=no
ba479fd2 4417fi;
439a7e54 4418if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
4419
4420cat >>confdefs.h <<\_ACEOF
439a7e54 4421#define GATHER_STATISTICS 1
ba479fd2 4422_ACEOF
439a7e54
DN
4423
4424fi
4425
73458fb7
NN
4426# -------------------------------
4427# Miscenalleous configure options
4428# -------------------------------
34a86c2b
NN
4429
4430# With stabs
ba479fd2 4431
34a86c2b
NN
4432# Check whether --with-stabs or --without-stabs was given.
4433if test "${with_stabs+set}" = set; then
4434 withval="$with_stabs"
4435 stabs="$with_stabs"
4436else
4437 stabs=no
ba479fd2 4438fi;
cafe096b 4439
34a86c2b
NN
4440# Determine whether or not multilibs are enabled.
4441# Check whether --enable-multilib or --disable-multilib was given.
4442if test "${enable_multilib+set}" = set; then
4443 enableval="$enable_multilib"
ba479fd2 4444
34a86c2b
NN
4445else
4446 enable_multilib=yes
ba479fd2 4447fi;
75e93faa 4448
34a86c2b 4449
414d23ae
HPN
4450# Enable __cxa_atexit for C++.
4451# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
4452if test "${enable___cxa_atexit+set}" = set; then
4453 enableval="$enable___cxa_atexit"
75e93faa 4454
ba479fd2 4455fi;
75e93faa 4456
414d23ae
HPN
4457# Enable threads
4458# Pass with no value to take the default
4459# Pass with a value to specify a thread package
4460# Check whether --enable-threads or --disable-threads was given.
4461if test "${enable_threads+set}" = set; then
4462 enableval="$enable_threads"
ba479fd2 4463
414d23ae
HPN
4464else
4465 enable_threads=''
ba479fd2 4466fi;
c2e494a8 4467# Save in case it gets overwritten in config.gcc
414d23ae 4468enable_threads_flag=$enable_threads
414d23ae
HPN
4469
4470# Check whether --enable-objc-gc or --disable-objc-gc was given.
4471if test "${enable_objc_gc+set}" = set; then
4472 enableval="$enable_objc_gc"
4473 if test x$enable_objc_gc = xno; then
4474 objc_boehm_gc=''
4475else
4476 objc_boehm_gc=1
4477fi
4478else
4479 objc_boehm_gc=''
ba479fd2 4480fi;
75e93faa
ZW
4481
4482
414d23ae
HPN
4483# Check whether --with-dwarf2 or --without-dwarf2 was given.
4484if test "${with_dwarf2+set}" = set; then
4485 withval="$with_dwarf2"
4486 dwarf2="$with_dwarf2"
75e93faa 4487else
414d23ae 4488 dwarf2=no
ba479fd2 4489fi;
75e93faa 4490
414d23ae
HPN
4491# Check whether --enable-shared or --disable-shared was given.
4492if test "${enable_shared+set}" = set; then
4493 enableval="$enable_shared"
ba479fd2 4494
414d23ae
HPN
4495 case $enable_shared in
4496 yes | no) ;;
4497 *)
4498 enable_shared=no
4499 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4500 for pkg in $enableval; do
4501 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
4502 enable_shared=yes
4503 fi
4504 done
4505 IFS="$ac_save_ifs"
4506 ;;
4507 esac
4508
75e93faa 4509else
414d23ae 4510 enable_shared=yes
ba479fd2 4511fi;
75e93faa 4512
75e93faa 4513
75e93faa 4514
4977bab6
ZW
4515# Check whether --with-sysroot or --without-sysroot was given.
4516if test "${with_sysroot+set}" = set; then
4517 withval="$with_sysroot"
ba479fd2 4518
4977bab6 4519 case ${with_sysroot} in
caa55b1e 4520 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
4521 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
4522 esac
ba479fd2 4523
4977bab6
ZW
4524 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
4525 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
4526
047d636f
DJ
4527 if test "x$exec_prefix" = xNONE; then
4528 if test "x$prefix" = xNONE; then
4529 test_prefix=/usr/local
4530 else
4531 test_prefix=$prefix
4532 fi
4533 else
4534 test_prefix=$exec_prefix
4535 fi
4536 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
4537 "${test_prefix}"|"${test_prefix}/"*|\
4538 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
4539 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
4540 TARGET_SYSTEM_ROOT_DEFINE="$t"
4541 ;;
4542 esac
4543
4977bab6 4544else
ba479fd2 4545
4977bab6 4546 TARGET_SYSTEM_ROOT=
db720d9a 4547 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
4548 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
4549
ba479fd2 4550fi;
4977bab6
ZW
4551
4552
4553
4554
d1bd0ded 4555# Build with intermodule optimisations
d1bd0ded
GK
4556# Check whether --enable-intermodule or --disable-intermodule was given.
4557if test "${enable_intermodule+set}" = set; then
4558 enableval="$enable_intermodule"
0c46c5c7
KC
4559 case ${enable_intermodule} in
4560 yes) onestep="-onestep";;
4561 *) onestep="";;
d1bd0ded 4562esac
0c46c5c7
KC
4563else
4564 onestep=""
ba479fd2 4565fi;
d1bd0ded
GK
4566
4567
73458fb7
NN
4568# -------------------------
4569# Checks for other programs
4570# -------------------------
5b67ad6f 4571
ba479fd2
NN
4572echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4573echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
4574set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4575if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4576 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 4577else
ba479fd2 4578 cat >conftest.make <<\_ACEOF
e9a25f70 4579all:
ba479fd2
NN
4580 @echo 'ac_maketemp="$(MAKE)"'
4581_ACEOF
e9a25f70 4582# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 4583eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
4584if test -n "$ac_maketemp"; then
4585 eval ac_cv_prog_make_${ac_make}_set=yes
4586else
4587 eval ac_cv_prog_make_${ac_make}_set=no
4588fi
ba479fd2 4589rm -f conftest.make
e9a25f70
JL
4590fi
4591if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
4592 echo "$as_me:$LINENO: result: yes" >&5
4593echo "${ECHO_T}yes" >&6
e9a25f70
JL
4594 SET_MAKE=
4595else
ba479fd2
NN
4596 echo "$as_me:$LINENO: result: no" >&5
4597echo "${ECHO_T}no" >&6
e9a25f70
JL
4598 SET_MAKE="MAKE=${MAKE-make}"
4599fi
4600
4601
861bb6c1 4602# Find some useful tools
ba479fd2 4603for ac_prog in gawk mawk nawk awk
861bb6c1 4604do
ba479fd2 4605 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 4606set dummy $ac_prog; ac_word=$2
ba479fd2
NN
4607echo "$as_me:$LINENO: checking for $ac_word" >&5
4608echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4609if test "${ac_cv_prog_AWK+set}" = set; then
4610 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4611else
4612 if test -n "$AWK"; then
4613 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4614else
ba479fd2
NN
4615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616for as_dir in $PATH
4617do
4618 IFS=$as_save_IFS
4619 test -z "$as_dir" && as_dir=.
4620 for ac_exec_ext in '' $ac_executable_extensions; do
4621 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4622 ac_cv_prog_AWK="$ac_prog"
4623 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4624 break 2
4625 fi
4626done
4627done
4628
861bb6c1
JL
4629fi
4630fi
ba479fd2 4631AWK=$ac_cv_prog_AWK
861bb6c1 4632if test -n "$AWK"; then
ba479fd2
NN
4633 echo "$as_me:$LINENO: result: $AWK" >&5
4634echo "${ECHO_T}$AWK" >&6
861bb6c1 4635else
ba479fd2
NN
4636 echo "$as_me:$LINENO: result: no" >&5
4637echo "${ECHO_T}no" >&6
861bb6c1
JL
4638fi
4639
ba479fd2 4640 test -n "$AWK" && break
861bb6c1
JL
4641done
4642
2c4902b9
NN
4643# We need awk to run opts.sh (to create options.c and options.h).
4644# Bail out if it's missing.
4645case ${AWK} in
ba479fd2
NN
4646 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
4647echo "$as_me: error: can't build without awk, bailing out" >&2;}
4648 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
4649esac
4650
ba479fd2
NN
4651echo "$as_me:$LINENO: checking whether ln works" >&5
4652echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
4653if test "${gcc_cv_prog_LN+set}" = set; then
4654 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4655else
4656 rm -f conftestdata_t
4657echo >conftestdata_f
4658if ln conftestdata_f conftestdata_t 2>/dev/null
4659then
4660 gcc_cv_prog_LN="ln"
4661else
4662 if ln -s conftestdata_f conftestdata_t 2>/dev/null
4663 then
4664 gcc_cv_prog_LN="ln -s"
4665 else
4666 gcc_cv_prog_LN=cp
4667 fi
4668fi
4669rm -f conftestdata_f conftestdata_t
4670
4671fi
4672LN="$gcc_cv_prog_LN"
4673if test "$gcc_cv_prog_LN" = "ln"; then
ba479fd2
NN
4674 echo "$as_me:$LINENO: result: yes" >&5
4675echo "${ECHO_T}yes" >&6
0a4b6309
RL
4676else
4677 if test "$gcc_cv_prog_LN" = "ln -s"; then
ba479fd2
NN
4678 echo "$as_me:$LINENO: result: no, using ln -s" >&5
4679echo "${ECHO_T}no, using ln -s" >&6
0a4b6309 4680 else
ba479fd2
NN
4681 echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5
4682echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6
0a4b6309
RL
4683 fi
4684fi
4685
ba479fd2
NN
4686echo "$as_me:$LINENO: checking whether ln -s works" >&5
4687echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4688if test "${gcc_cv_prog_LN_S+set}" = set; then
4689 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4690else
4691 rm -f conftestdata_t
4692echo >conftestdata_f
4693if ln -s conftestdata_f conftestdata_t 2>/dev/null
4694then
4695 gcc_cv_prog_LN_S="ln -s"
4696else
4697 if ln conftestdata_f conftestdata_t 2>/dev/null
4698 then
4699 gcc_cv_prog_LN_S=ln
4700 else
4701 gcc_cv_prog_LN_S=cp
4702 fi
4703fi
4704rm -f conftestdata_f conftestdata_t
4705
4706fi
4707LN_S="$gcc_cv_prog_LN_S"
4708if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
4709 echo "$as_me:$LINENO: result: yes" >&5
4710echo "${ECHO_T}yes" >&6
0a4b6309
RL
4711else
4712 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
4713 echo "$as_me:$LINENO: result: no, using ln" >&5
4714echo "${ECHO_T}no, using ln" >&6
0a4b6309 4715 else
ba479fd2
NN
4716 echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
4717echo "${ECHO_T}no, and neither does ln, so using cp" >&6
0a4b6309
RL
4718 fi
4719fi
4720
ba479fd2
NN
4721if test -n "$ac_tool_prefix"; then
4722 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4723set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4724echo "$as_me:$LINENO: checking for $ac_word" >&5
4725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726if test "${ac_cv_prog_RANLIB+set}" = set; then
4727 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4728else
4729 if test -n "$RANLIB"; then
4730 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4731else
ba479fd2
NN
4732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4733for as_dir in $PATH
4734do
4735 IFS=$as_save_IFS
4736 test -z "$as_dir" && as_dir=.
4737 for ac_exec_ext in '' $ac_executable_extensions; do
4738 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4739 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4740 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4741 break 2
4742 fi
4743done
4744done
4745
6e3f3080
NN
4746fi
4747fi
ba479fd2 4748RANLIB=$ac_cv_prog_RANLIB
6e3f3080 4749if test -n "$RANLIB"; then
ba479fd2
NN
4750 echo "$as_me:$LINENO: result: $RANLIB" >&5
4751echo "${ECHO_T}$RANLIB" >&6
4752else
4753 echo "$as_me:$LINENO: result: no" >&5
4754echo "${ECHO_T}no" >&6
4755fi
4756
4757fi
4758if test -z "$ac_cv_prog_RANLIB"; then
4759 ac_ct_RANLIB=$RANLIB
4760 # Extract the first word of "ranlib", so it can be a program name with args.
4761set dummy ranlib; ac_word=$2
4762echo "$as_me:$LINENO: checking for $ac_word" >&5
4763echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4764if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4766else
4767 if test -n "$ac_ct_RANLIB"; then
4768 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4769else
4770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in $PATH
4772do
4773 IFS=$as_save_IFS
4774 test -z "$as_dir" && as_dir=.
4775 for ac_exec_ext in '' $ac_executable_extensions; do
4776 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4777 ac_cv_prog_ac_ct_RANLIB="ranlib"
4778 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4779 break 2
4780 fi
4781done
4782done
4783
4784 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4785fi
4786fi
4787ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4788if test -n "$ac_ct_RANLIB"; then
4789 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4790echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 4791else
ba479fd2
NN
4792 echo "$as_me:$LINENO: result: no" >&5
4793echo "${ECHO_T}no" >&6
4794fi
4795
4796 RANLIB=$ac_ct_RANLIB
4797else
4798 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
4799fi
4800
0a4b6309
RL
4801# Find a good install program. We prefer a C program (faster),
4802# so one script is as good as another. But avoid the broken or
4803# incompatible versions:
4804# SysV /etc/install, /usr/sbin/install
4805# SunOS /usr/etc/install
4806# IRIX /sbin/install
4807# AIX /bin/install
4808# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4809# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4810# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
4811echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
4812echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 4813if test -z "$INSTALL"; then
ba479fd2
NN
4814if test "${ac_cv_path_install+set}" = set; then
4815 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4816else
4817 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
4818 for ac_dir in $PATH; do
4819 # Account for people who put trailing slashes in PATH elements.
4820 case "$ac_dir/" in
4821 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4822 *)
4823 # OSF1 and SCO ODT 3.0 have their own names for install.
4824 for ac_prog in ginstall scoinst install; do
4825 if test -f $ac_dir/$ac_prog; then
4826 if test $ac_prog = install &&
4827 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4828 # AIX install. It has an incompatible calling convention.
4829 # OSF/1 installbsd also uses dspmsg, but is usable.
4830 :
4831 else
4832 ac_cv_path_install="$ac_dir/$ac_prog -c"
4833 break 2
4834 fi
4835 fi
4836 done
4837 ;;
4838 esac
4839 done
4840 IFS="$ac_save_IFS"
4841
4842fi
4843 if test "${ac_cv_path_install+set}" = set; then
4844 INSTALL="$ac_cv_path_install"
4845 else
4846 # As a last resort, use the slow shell script. We don't cache a
4847 # path for INSTALL within a source directory, because that will
4848 # break other packages using the cache if that directory is
4849 # removed, or if the path is relative.
4850 INSTALL="$ac_install_sh"
4851 fi
4852fi
ba479fd2
NN
4853echo "$as_me:$LINENO: result: $INSTALL" >&5
4854echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
4855
4856# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4857# It thinks the first close brace ends the variable substitution.
4858test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4859
4860test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4861
861bb6c1 4862
3a000df0 4863# See if cmp has --ignore-initial.
ba479fd2
NN
4864echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
4865echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
4866if test "${gcc_cv_prog_cmp_skip+set}" = set; then
4867 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
4868else
4869 echo abfoo >t1
4870 echo cdfoo >t2
269a7343 4871 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
4872 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
4873 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 4874 :
3a000df0
KC
4875 else
4876 gcc_cv_prog_cmp_skip=gnucompare
4877 fi
269a7343
KG
4878 fi
4879 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
4880 if cmp t1 t2 2 2 > /dev/null 2>&1; then
4881 if cmp t1 t2 1 1 > /dev/null 2>&1; then
4882 :
4883 else
4884 gcc_cv_prog_cmp_skip=fastcompare
4885 fi
4886 fi
3a000df0
KC
4887 fi
4888 rm t1 t2
4889
4890fi
ba479fd2
NN
4891echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
4892echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
4893make_compare_target=$gcc_cv_prog_cmp_skip
4894
4895
4896
73458fb7
NN
4897# See if we have the mktemp command.
4898# Extract the first word of "mktemp", so it can be a program name with args.
4899set dummy mktemp; ac_word=$2
ba479fd2
NN
4900echo "$as_me:$LINENO: checking for $ac_word" >&5
4901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4902if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
4903 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4904else
4905 if test -n "$have_mktemp_command"; then
4906 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
4907else
ba479fd2
NN
4908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911 IFS=$as_save_IFS
4912 test -z "$as_dir" && as_dir=.
4913 for ac_exec_ext in '' $ac_executable_extensions; do
4914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915 ac_cv_prog_have_mktemp_command="yes"
4916 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4917 break 2
4918 fi
4919done
4920done
4921
73458fb7
NN
4922 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
4923fi
4924fi
ba479fd2 4925have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 4926if test -n "$have_mktemp_command"; then
ba479fd2
NN
4927 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
4928echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 4929else
ba479fd2
NN
4930 echo "$as_me:$LINENO: result: no" >&5
4931echo "${ECHO_T}no" >&6
73458fb7
NN
4932fi
4933
4934
4935# Do we have a single-tree copy of texinfo?
4936if test -f $srcdir/../texinfo/Makefile.in; then
4937 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
4938 gcc_cv_prog_makeinfo_modern=yes
ba479fd2
NN
4939 echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5
4940echo "${ECHO_T}Using makeinfo from the unified source tree." >&6
73458fb7
NN
4941else
4942 # See if makeinfo has been installed and is modern enough
4943 # that we can use it.
4944 # Extract the first word of "makeinfo", so it can be a program name with args.
4945set dummy makeinfo; ac_word=$2
ba479fd2
NN
4946echo "$as_me:$LINENO: checking for $ac_word" >&5
4947echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4948if test "${ac_cv_prog_MAKEINFO+set}" = set; then
4949 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4950else
4951 if test -n "$MAKEINFO"; then
4952 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
4953else
ba479fd2
NN
4954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4961 ac_cv_prog_MAKEINFO="makeinfo"
4962 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966done
4967
73458fb7
NN
4968fi
4969fi
ba479fd2 4970MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 4971if test -n "$MAKEINFO"; then
ba479fd2
NN
4972 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
4973echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 4974else
ba479fd2
NN
4975 echo "$as_me:$LINENO: result: no" >&5
4976echo "${ECHO_T}no" >&6
73458fb7
NN
4977fi
4978
4979if test -n "$MAKEINFO"; then
4980 # Found it, now check the version.
ba479fd2
NN
4981 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
4982echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
4983if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
4984 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4985else
4986 ac_prog_version=`$MAKEINFO --version 2>&1 |
4987 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
a6a5e4c9 4988 echo "configure:4988: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
4989 case $ac_prog_version in
4990 '') gcc_cv_prog_makeinfo_modern=no;;
4991 4.[2-9]*)
4992 gcc_cv_prog_makeinfo_modern=yes;;
4993 *) gcc_cv_prog_makeinfo_modern=no;;
4994 esac
4995
4996fi
ba479fd2
NN
4997echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
4998echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
4999else
5000 gcc_cv_prog_makeinfo_modern=no
5001fi
5002
5003fi
5004
5005if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
5006 { echo "$as_me:$LINENO: WARNING:
5007*** Makeinfo is missing or too old.
5008*** Info documentation will not be built." >&5
5009echo "$as_me: WARNING:
cafe096b 5010*** Makeinfo is missing or too old.
ba479fd2 5011*** Info documentation will not be built." >&2;}
73458fb7
NN
5012 BUILD_INFO=
5013else
ba479fd2 5014 BUILD_INFO=info
73458fb7
NN
5015fi
5016
5017# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
5018echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
5019echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 5020if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
5021 echo "$as_me:$LINENO: result: yes" >&5
5022echo "${ECHO_T}yes" >&6
5023 GENERATED_MANPAGES=generated-manpages
73458fb7 5024else
ba479fd2
NN
5025 echo "$as_me:$LINENO: result: no" >&5
5026echo "${ECHO_T}no" >&6
73458fb7
NN
5027 GENERATED_MANPAGES=
5028fi
5029
5030# How about lex?
5031if test -f $srcdir/../flex/skel.c; then
5032 FLEX='$(objdir)/../flex/flex'
5033else
5034 # Extract the first word of "flex", so it can be a program name with args.
5035set dummy flex; ac_word=$2
ba479fd2
NN
5036echo "$as_me:$LINENO: checking for $ac_word" >&5
5037echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5038if test "${ac_cv_prog_FLEX+set}" = set; then
5039 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5040else
5041 if test -n "$FLEX"; then
5042 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
5043else
ba479fd2
NN
5044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in $PATH
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_prog_FLEX="flex"
5052 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055done
5056done
5057
73458fb7
NN
5058 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
5059fi
5060fi
ba479fd2 5061FLEX=$ac_cv_prog_FLEX
73458fb7 5062if test -n "$FLEX"; then
ba479fd2
NN
5063 echo "$as_me:$LINENO: result: $FLEX" >&5
5064echo "${ECHO_T}$FLEX" >&6
73458fb7 5065else
ba479fd2
NN
5066 echo "$as_me:$LINENO: result: no" >&5
5067echo "${ECHO_T}no" >&6
73458fb7
NN
5068fi
5069
5070fi
5071
5072# Bison?
5073# The -L switch is so bison can find its skeleton file.
5074if test -f $srcdir/../bison/bison.simple; then
5075 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
5076else
5077 # Extract the first word of "bison", so it can be a program name with args.
5078set dummy bison; ac_word=$2
ba479fd2
NN
5079echo "$as_me:$LINENO: checking for $ac_word" >&5
5080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5081if test "${ac_cv_prog_BISON+set}" = set; then
5082 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5083else
5084 if test -n "$BISON"; then
5085 ac_cv_prog_BISON="$BISON" # Let the user override the test.
5086else
ba479fd2
NN
5087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
5092 for ac_exec_ext in '' $ac_executable_extensions; do
5093 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5094 ac_cv_prog_BISON="bison"
5095 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5096 break 2
5097 fi
5098done
5099done
5100
73458fb7
NN
5101 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
5102fi
5103fi
ba479fd2 5104BISON=$ac_cv_prog_BISON
73458fb7 5105if test -n "$BISON"; then
ba479fd2
NN
5106 echo "$as_me:$LINENO: result: $BISON" >&5
5107echo "${ECHO_T}$BISON" >&6
73458fb7 5108else
ba479fd2
NN
5109 echo "$as_me:$LINENO: result: no" >&5
5110echo "${ECHO_T}no" >&6
73458fb7
NN
5111fi
5112
5113fi
5114
5115# --------------------
5116# Checks for C headers
5117# --------------------
5118
ba479fd2
NN
5119echo "$as_me:$LINENO: checking for GNU C library" >&5
5120echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
5121if test "${gcc_cv_glibc+set}" = set; then
5122 echo $ECHO_N "(cached) $ECHO_C" >&6
5123else
5124 cat >conftest.$ac_ext <<_ACEOF
5125#line $LINENO "configure"
5126/* confdefs.h. */
5127_ACEOF
5128cat confdefs.h >>conftest.$ac_ext
5129cat >>conftest.$ac_ext <<_ACEOF
5130/* end confdefs.h. */
73458fb7 5131#include <features.h>
ba479fd2
NN
5132int
5133main ()
5134{
73458fb7
NN
5135
5136#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
5137#error Not a GNU C library system
5138#endif
ba479fd2
NN
5139 ;
5140 return 0;
5141}
5142_ACEOF
5143rm -f conftest.$ac_objext
5144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5145 (eval $ac_compile) 2>&5
5146 ac_status=$?
5147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5148 (exit $ac_status); } &&
5149 { ac_try='test -s conftest.$ac_objext'
5150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5151 (eval $ac_try) 2>&5
5152 ac_status=$?
5153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154 (exit $ac_status); }; }; then
73458fb7
NN
5155 gcc_cv_glibc=yes
5156else
ba479fd2
NN
5157 echo "$as_me: failed program was:" >&5
5158sed 's/^/| /' conftest.$ac_ext >&5
5159
5160gcc_cv_glibc=no
73458fb7 5161fi
ba479fd2 5162rm -f conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
5163fi
5164
ba479fd2
NN
5165echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
5166echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 5167if test $gcc_cv_glibc = yes; then
ba479fd2
NN
5168
5169cat >>confdefs.h <<\_ACEOF
73458fb7 5170#define _GNU_SOURCE 1
ba479fd2 5171_ACEOF
73458fb7
NN
5172
5173fi
5174
ca9bc441
NN
5175# Need to reject headers which give warnings, so that the -Werror bootstrap
5176# works later. *sigh* This needs to come before all header checks.
5177
5178ac_c_preproc_warn_flag=yes
5179
ba479fd2
NN
5180echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5181echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5182if test "${ac_cv_header_stdc+set}" = set; then
5183 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5184else
ba479fd2
NN
5185 cat >conftest.$ac_ext <<_ACEOF
5186#line $LINENO "configure"
5187/* confdefs.h. */
5188_ACEOF
5189cat confdefs.h >>conftest.$ac_ext
5190cat >>conftest.$ac_ext <<_ACEOF
5191/* end confdefs.h. */
956d6950
JL
5192#include <stdlib.h>
5193#include <stdarg.h>
5194#include <string.h>
5195#include <float.h>
ba479fd2
NN
5196
5197int
5198main ()
5199{
5200
5201 ;
5202 return 0;
5203}
5204_ACEOF
5205rm -f conftest.$ac_objext
5206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5207 (eval $ac_compile) 2>&5
5208 ac_status=$?
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); } &&
5211 { ac_try='test -s conftest.$ac_objext'
5212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5213 (eval $ac_try) 2>&5
5214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); }; }; then
956d6950
JL
5217 ac_cv_header_stdc=yes
5218else
ba479fd2
NN
5219 echo "$as_me: failed program was:" >&5
5220sed 's/^/| /' conftest.$ac_ext >&5
5221
5222ac_cv_header_stdc=no
956d6950 5223fi
ba479fd2 5224rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
5225
5226if test $ac_cv_header_stdc = yes; then
5227 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2
NN
5228 cat >conftest.$ac_ext <<_ACEOF
5229#line $LINENO "configure"
5230/* confdefs.h. */
5231_ACEOF
5232cat confdefs.h >>conftest.$ac_ext
5233cat >>conftest.$ac_ext <<_ACEOF
5234/* end confdefs.h. */
956d6950 5235#include <string.h>
ba479fd2
NN
5236
5237_ACEOF
956d6950 5238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5239 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
5240 :
5241else
956d6950
JL
5242 ac_cv_header_stdc=no
5243fi
5244rm -f conftest*
5245
5246fi
5247
5248if test $ac_cv_header_stdc = yes; then
5249 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2
NN
5250 cat >conftest.$ac_ext <<_ACEOF
5251#line $LINENO "configure"
5252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
956d6950 5257#include <stdlib.h>
ba479fd2
NN
5258
5259_ACEOF
956d6950 5260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5261 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
5262 :
5263else
956d6950
JL
5264 ac_cv_header_stdc=no
5265fi
5266rm -f conftest*
5267
5268fi
5269
5270if test $ac_cv_header_stdc = yes; then
5271 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 5272 if test "$cross_compiling" = yes; then
956d6950
JL
5273 :
5274else
ba479fd2
NN
5275 cat >conftest.$ac_ext <<_ACEOF
5276#line $LINENO "configure"
5277/* confdefs.h. */
5278_ACEOF
5279cat confdefs.h >>conftest.$ac_ext
5280cat >>conftest.$ac_ext <<_ACEOF
5281/* end confdefs.h. */
956d6950 5282#include <ctype.h>
ba479fd2
NN
5283#if ((' ' & 0x0FF) == 0x020)
5284# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5285# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5286#else
5287# define ISLOWER(c) \
5288 (('a' <= (c) && (c) <= 'i') \
5289 || ('j' <= (c) && (c) <= 'r') \
5290 || ('s' <= (c) && (c) <= 'z'))
5291# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5292#endif
63cf211a 5293
ba479fd2
NN
5294#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5295int
5296main ()
5297{
5298 int i;
5299 for (i = 0; i < 256; i++)
5300 if (XOR (islower (i), ISLOWER (i))
5301 || toupper (i) != TOUPPER (i))
5302 exit(2);
5303 exit (0);
5304}
5305_ACEOF
5306rm -f conftest$ac_exeext
5307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5308 (eval $ac_link) 2>&5
5309 ac_status=$?
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5313 (eval $ac_try) 2>&5
5314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); }; }; then
956d6950
JL
5317 :
5318else
ba479fd2
NN
5319 echo "$as_me: program exited with status $ac_status" >&5
5320echo "$as_me: failed program was:" >&5
5321sed 's/^/| /' conftest.$ac_ext >&5
5322
5323( exit $ac_status )
5324ac_cv_header_stdc=no
956d6950 5325fi
a6a5e4c9 5326rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 5327fi
956d6950
JL
5328fi
5329fi
ba479fd2
NN
5330echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5331echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 5332if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
5333
5334cat >>confdefs.h <<\_ACEOF
956d6950 5335#define STDC_HEADERS 1
ba479fd2 5336_ACEOF
956d6950
JL
5337
5338fi
5339
ba479fd2
NN
5340echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5341echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5342if test "${ac_cv_header_time+set}" = set; then
5343 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5344else
ba479fd2
NN
5345 cat >conftest.$ac_ext <<_ACEOF
5346#line $LINENO "configure"
5347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
956d6950
JL
5352#include <sys/types.h>
5353#include <sys/time.h>
5354#include <time.h>
ba479fd2
NN
5355
5356int
5357main ()
5358{
5359if ((struct tm *) 0)
5360return 0;
5361 ;
5362 return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5367 (eval $ac_compile) 2>&5
5368 ac_status=$?
5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370 (exit $ac_status); } &&
5371 { ac_try='test -s conftest.$ac_objext'
5372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5373 (eval $ac_try) 2>&5
5374 ac_status=$?
5375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376 (exit $ac_status); }; }; then
956d6950
JL
5377 ac_cv_header_time=yes
5378else
ba479fd2
NN
5379 echo "$as_me: failed program was:" >&5
5380sed 's/^/| /' conftest.$ac_ext >&5
5381
5382ac_cv_header_time=no
956d6950 5383fi
ba479fd2 5384rm -f conftest.$ac_objext conftest.$ac_ext
956d6950 5385fi
ba479fd2
NN
5386echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5387echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 5388if test $ac_cv_header_time = yes; then
ba479fd2
NN
5389
5390cat >>confdefs.h <<\_ACEOF
956d6950 5391#define TIME_WITH_SYS_TIME 1
ba479fd2 5392_ACEOF
956d6950
JL
5393
5394fi
5395
ba479fd2
NN
5396echo "$as_me:$LINENO: checking for working stdbool.h" >&5
5397echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6
5398if test "${ac_cv_header_stdbool_h+set}" = set; then
5399 echo $ECHO_N "(cached) $ECHO_C" >&6
827ae6cf 5400else
ba479fd2
NN
5401 cat >conftest.$ac_ext <<_ACEOF
5402#line $LINENO "configure"
5403/* confdefs.h. */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h. */
827ae6cf 5408#include <stdbool.h>
ba479fd2
NN
5409int
5410main ()
5411{
827ae6cf 5412bool foo = false;
ba479fd2
NN
5413 ;
5414 return 0;
5415}
5416_ACEOF
5417rm -f conftest.$ac_objext
5418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5419 (eval $ac_compile) 2>&5
5420 ac_status=$?
5421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422 (exit $ac_status); } &&
5423 { ac_try='test -s conftest.$ac_objext'
5424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5425 (eval $ac_try) 2>&5
5426 ac_status=$?
5427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5428 (exit $ac_status); }; }; then
827ae6cf
RO
5429 ac_cv_header_stdbool_h=yes
5430else
ba479fd2
NN
5431 echo "$as_me: failed program was:" >&5
5432sed 's/^/| /' conftest.$ac_ext >&5
5433
5434ac_cv_header_stdbool_h=no
827ae6cf 5435fi
ba479fd2 5436rm -f conftest.$ac_objext conftest.$ac_ext
827ae6cf 5437fi
ba479fd2
NN
5438echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
5439echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
63cf211a 5440if test $ac_cv_header_stdbool_h = yes; then
ba479fd2
NN
5441
5442cat >>confdefs.h <<\_ACEOF
827ae6cf 5443#define HAVE_STDBOOL_H 1
ba479fd2 5444_ACEOF
827ae6cf
RO
5445
5446fi
5447
ba479fd2
NN
5448echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
5449echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
5450if test "${gcc_cv_header_string+set}" = set; then
5451 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309 5452else
ba479fd2
NN
5453 cat >conftest.$ac_ext <<_ACEOF
5454#line $LINENO "configure"
5455/* confdefs.h. */
5456_ACEOF
5457cat confdefs.h >>conftest.$ac_ext
5458cat >>conftest.$ac_ext <<_ACEOF
5459/* end confdefs.h. */
0a4b6309
RL
5460#include <string.h>
5461#include <strings.h>
ba479fd2
NN
5462int
5463main ()
5464{
0a4b6309 5465
ba479fd2
NN
5466 ;
5467 return 0;
5468}
5469_ACEOF
5470rm -f conftest.$ac_objext
5471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5472 (eval $ac_compile) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); } &&
5476 { ac_try='test -s conftest.$ac_objext'
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5478 (eval $ac_try) 2>&5
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; }; then
0a4b6309
RL
5482 gcc_cv_header_string=yes
5483else
ba479fd2
NN
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487gcc_cv_header_string=no
0a4b6309 5488fi
ba479fd2 5489rm -f conftest.$ac_objext conftest.$ac_ext
0a4b6309 5490fi
ba479fd2
NN
5491echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
5492echo "${ECHO_T}$gcc_cv_header_string" >&6
63cf211a 5493if test $gcc_cv_header_string = yes; then
ba479fd2
NN
5494
5495cat >>confdefs.h <<\_ACEOF
0a4b6309 5496#define STRING_WITH_STRINGS 1
ba479fd2 5497_ACEOF
0a4b6309
RL
5498
5499fi
5500
ba479fd2
NN
5501echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5502echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5503if test "${ac_cv_header_sys_wait_h+set}" = set; then
5504 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 5505else
ba479fd2
NN
5506 cat >conftest.$ac_ext <<_ACEOF
5507#line $LINENO "configure"
5508/* confdefs.h. */
5509_ACEOF
5510cat confdefs.h >>conftest.$ac_ext
5511cat >>conftest.$ac_ext <<_ACEOF
5512/* end confdefs.h. */
e9831ca0
KG
5513#include <sys/types.h>
5514#include <sys/wait.h>
5515#ifndef WEXITSTATUS
ba479fd2 5516# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
5517#endif
5518#ifndef WIFEXITED
ba479fd2 5519# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 5520#endif
ba479fd2
NN
5521
5522int
5523main ()
5524{
5525 int s;
5526 wait (&s);
5527 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5528 ;
5529 return 0;
5530}
5531_ACEOF
5532rm -f conftest.$ac_objext
5533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5534 (eval $ac_compile) 2>&5
5535 ac_status=$?
5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537 (exit $ac_status); } &&
5538 { ac_try='test -s conftest.$ac_objext'
5539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5540 (eval $ac_try) 2>&5
5541 ac_status=$?
5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543 (exit $ac_status); }; }; then
e9831ca0
KG
5544 ac_cv_header_sys_wait_h=yes
5545else
ba479fd2
NN
5546 echo "$as_me: failed program was:" >&5
5547sed 's/^/| /' conftest.$ac_ext >&5
5548
5549ac_cv_header_sys_wait_h=no
e9831ca0 5550fi
ba479fd2 5551rm -f conftest.$ac_objext conftest.$ac_ext
e9831ca0 5552fi
ba479fd2
NN
5553echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5554echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 5555if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
5556
5557cat >>confdefs.h <<\_ACEOF
e9831ca0 5558#define HAVE_SYS_WAIT_H 1
ba479fd2 5559_ACEOF
6e3f3080 5560
63cf211a 5561fi
6e3f3080 5562
ba479fd2
NN
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
1072ec3f 5585 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 5586 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 5587 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 5588do
ba479fd2 5589as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 5590echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
5591echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5592if eval "test \"\${$as_ac_Header+set}\" = set"; then
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5594else
ca9bc441 5595 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5596#line $LINENO "configure"
5597/* confdefs.h. */
5598_ACEOF
5599cat confdefs.h >>conftest.$ac_ext
5600cat >>conftest.$ac_ext <<_ACEOF
5601/* end confdefs.h. */
5602#include <$ac_header>
5603_ACEOF
5604if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5605 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5606 ac_status=$?
5607 grep -v '^ *+' conftest.er1 >conftest.err
5608 rm -f conftest.er1
5609 cat conftest.err >&5
5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); } >/dev/null; then
5612 if test -s conftest.err; then
5613 ac_cpp_err=$ac_c_preproc_warn_flag
5614 else
5615 ac_cpp_err=
5616 fi
5617else
5618 ac_cpp_err=yes
5619fi
5620if test -z "$ac_cpp_err"; then
ca9bc441 5621 eval "$as_ac_Header=yes"
ba479fd2
NN
5622else
5623 echo "$as_me: failed program was:" >&5
5624sed 's/^/| /' conftest.$ac_ext >&5
5625
ca9bc441 5626 eval "$as_ac_Header=no"
ba479fd2
NN
5627fi
5628rm -f conftest.err conftest.$ac_ext
6e3f3080 5629fi
ba479fd2
NN
5630echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5631echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
5632if test `eval echo '${'$as_ac_Header'}'` = yes; then
5633 cat >>confdefs.h <<_ACEOF
5634#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5635_ACEOF
5636
956d6950
JL
5637fi
5638done
5639
5640
f24af81b 5641# Check for thread headers.
ca9bc441 5642echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
5643echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
5644if test "${ac_cv_header_thread_h+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5646else
ca9bc441 5647 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5648#line $LINENO "configure"
5649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
5654#include <thread.h>
5655_ACEOF
5656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5658 ac_status=$?
5659 grep -v '^ *+' conftest.er1 >conftest.err
5660 rm -f conftest.er1
5661 cat conftest.err >&5
5662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5663 (exit $ac_status); } >/dev/null; then
5664 if test -s conftest.err; then
5665 ac_cpp_err=$ac_c_preproc_warn_flag
5666 else
5667 ac_cpp_err=
5668 fi
5669else
5670 ac_cpp_err=yes
5671fi
5672if test -z "$ac_cpp_err"; then
ca9bc441 5673 ac_cv_header_thread_h=yes
ba479fd2
NN
5674else
5675 echo "$as_me: failed program was:" >&5
5676sed 's/^/| /' conftest.$ac_ext >&5
5677
ca9bc441 5678 ac_cv_header_thread_h=no
ba479fd2
NN
5679fi
5680rm -f conftest.err conftest.$ac_ext
6e3f3080 5681fi
ba479fd2
NN
5682echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
5683echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 5684if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
5685 have_thread_h=yes
5686else
ba479fd2 5687 have_thread_h=
f24af81b
TT
5688fi
5689
ca9bc441 5690echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
5691echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
5692if test "${ac_cv_header_pthread_h+set}" = set; then
5693 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 5694else
ca9bc441 5695 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5696#line $LINENO "configure"
5697/* confdefs.h. */
5698_ACEOF
5699cat confdefs.h >>conftest.$ac_ext
5700cat >>conftest.$ac_ext <<_ACEOF
5701/* end confdefs.h. */
5702#include <pthread.h>
5703_ACEOF
5704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5706 ac_status=$?
5707 grep -v '^ *+' conftest.er1 >conftest.err
5708 rm -f conftest.er1
5709 cat conftest.err >&5
5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711 (exit $ac_status); } >/dev/null; then
5712 if test -s conftest.err; then
5713 ac_cpp_err=$ac_c_preproc_warn_flag
5714 else
5715 ac_cpp_err=
5716 fi
5717else
5718 ac_cpp_err=yes
5719fi
5720if test -z "$ac_cpp_err"; then
ca9bc441 5721 ac_cv_header_pthread_h=yes
ba479fd2
NN
5722else
5723 echo "$as_me: failed program was:" >&5
5724sed 's/^/| /' conftest.$ac_ext >&5
5725
ca9bc441 5726 ac_cv_header_pthread_h=no
ba479fd2
NN
5727fi
5728rm -f conftest.err conftest.$ac_ext
6e3f3080 5729fi
ba479fd2
NN
5730echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
5731echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 5732if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
5733 have_pthread_h=yes
5734else
ba479fd2 5735 have_pthread_h=
f24af81b
TT
5736fi
5737
5738
84c041a1 5739# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
5740echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
5741echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
5742if test "${gcc_cv_decl_char_bit+set}" = set; then
5743 echo $ECHO_N "(cached) $ECHO_C" >&6
5744else
5745 cat >conftest.$ac_ext <<_ACEOF
5746#line $LINENO "configure"
5747/* confdefs.h. */
5748_ACEOF
5749cat confdefs.h >>conftest.$ac_ext
5750cat >>conftest.$ac_ext <<_ACEOF
5751/* end confdefs.h. */
75e93faa
ZW
5752#ifdef HAVE_LIMITS_H
5753#include <limits.h>
5754#endif
5755#ifdef CHAR_BIT
5756found
5757#endif
ba479fd2 5758_ACEOF
75e93faa 5759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5760 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
5761 gcc_cv_decl_char_bit=yes
5762else
75e93faa
ZW
5763 gcc_cv_decl_char_bit=no
5764fi
5765rm -f conftest*
5766
5767
5768fi
ba479fd2
NN
5769echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
5770echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 5771if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
5772 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
5773echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
5774if test "${gcc_cv_c_nbby+set}" = set; then
5775 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
5776else
5777 i=8
5778 gcc_cv_c_nbby=
5779 while test $i -lt 65; do
ba479fd2
NN
5780 cat >conftest.$ac_ext <<_ACEOF
5781#line $LINENO "configure"
5782/* confdefs.h. */
5783_ACEOF
5784cat confdefs.h >>conftest.$ac_ext
5785cat >>conftest.$ac_ext <<_ACEOF
5786/* end confdefs.h. */
5787
5788int
5789main ()
5790{
4e70264f
ZW
5791switch(0) {
5792 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
5793 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
5794 ; }
ba479fd2
NN
5795 ;
5796 return 0;
5797}
5798_ACEOF
5799rm -f conftest.$ac_objext
5800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5801 (eval $ac_compile) 2>&5
5802 ac_status=$?
5803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804 (exit $ac_status); } &&
5805 { ac_try='test -s conftest.$ac_objext'
5806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5807 (eval $ac_try) 2>&5
5808 ac_status=$?
5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810 (exit $ac_status); }; }; then
4e70264f 5811 gcc_cv_c_nbby=$i; break
75e93faa 5812else
ba479fd2
NN
5813 echo "$as_me: failed program was:" >&5
5814sed 's/^/| /' conftest.$ac_ext >&5
5815
75e93faa 5816fi
ba479fd2 5817rm -f conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
5818 i=`expr $i + 1`
5819 done
5820 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
5821
5822fi
ba479fd2
NN
5823echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
5824echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 5825if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
5826 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
5827echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
5828 { (exit 1); exit 1; }; }
75e93faa 5829else
ba479fd2
NN
5830
5831cat >>confdefs.h <<_ACEOF
75e93faa 5832#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 5833_ACEOF
75e93faa
ZW
5834
5835fi
5836fi
ba479fd2
NN
5837echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
5838echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
5839if test "${ac_cv_c_bigendian+set}" = set; then
5840 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 5841else
4977bab6
ZW
5842 ac_cv_c_bigendian=unknown
5843# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2
NN
5844cat >conftest.$ac_ext <<_ACEOF
5845#line $LINENO "configure"
5846/* confdefs.h. */
5847_ACEOF
5848cat confdefs.h >>conftest.$ac_ext
5849cat >>conftest.$ac_ext <<_ACEOF
5850/* end confdefs.h. */
4977bab6
ZW
5851#include <sys/types.h>
5852#include <sys/param.h>
ba479fd2
NN
5853int
5854main ()
5855{
2d6eb5bf 5856
4977bab6
ZW
5857#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5858 bogus endian macros
84c041a1 5859#endif
ba479fd2
NN
5860 ;
5861 return 0;
5862}
5863_ACEOF
5864rm -f conftest.$ac_objext
5865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5866 (eval $ac_compile) 2>&5
5867 ac_status=$?
5868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5869 (exit $ac_status); } &&
5870 { ac_try='test -s conftest.$ac_objext'
5871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5872 (eval $ac_try) 2>&5
5873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); }; }; then
4977bab6 5876 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2
NN
5877cat >conftest.$ac_ext <<_ACEOF
5878#line $LINENO "configure"
5879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
4977bab6
ZW
5884#include <sys/types.h>
5885#include <sys/param.h>
ba479fd2
NN
5886int
5887main ()
5888{
4977bab6
ZW
5889
5890#if BYTE_ORDER != BIG_ENDIAN
5891 not big endian
84c041a1 5892#endif
ba479fd2
NN
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); } &&
5903 { ac_try='test -s conftest.$ac_objext'
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
4977bab6
ZW
5909 ac_cv_c_bigendian=yes
5910else
ba479fd2
NN
5911 echo "$as_me: failed program was:" >&5
5912sed 's/^/| /' conftest.$ac_ext >&5
5913
5914ac_cv_c_bigendian=no
4977bab6 5915fi
ba479fd2 5916rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6 5917else
ba479fd2
NN
5918 echo "$as_me: failed program was:" >&5
5919sed 's/^/| /' conftest.$ac_ext >&5
5920
4977bab6 5921fi
ba479fd2 5922rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
5923if test $ac_cv_c_bigendian = unknown; then
5924if test "$cross_compiling" = yes; then
ba479fd2
NN
5925 echo $ac_n "cross-compiling... " 2>&6
5926else
5927 cat >conftest.$ac_ext <<_ACEOF
5928#line $LINENO "configure"
5929/* confdefs.h. */
5930_ACEOF
5931cat confdefs.h >>conftest.$ac_ext
5932cat >>conftest.$ac_ext <<_ACEOF
5933/* end confdefs.h. */
4977bab6
ZW
5934main () {
5935 /* Are we little or big endian? From Harbison&Steele. */
5936 union
5937 {
5938 long l;
5939 char c[sizeof (long)];
5940 } u;
5941 u.l = 1;
5942 exit (u.c[sizeof (long) - 1] == 1);
5943}
ba479fd2
NN
5944_ACEOF
5945rm -f conftest$ac_exeext
5946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5947 (eval $ac_link) 2>&5
5948 ac_status=$?
5949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952 (eval $ac_try) 2>&5
5953 ac_status=$?
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); }; }; then
4977bab6
ZW
5956 ac_cv_c_bigendian=no
5957else
ba479fd2
NN
5958 echo "$as_me: program exited with status $ac_status" >&5
5959echo "$as_me: failed program was:" >&5
5960sed 's/^/| /' conftest.$ac_ext >&5
5961
5962( exit $ac_status )
5963ac_cv_c_bigendian=yes
4977bab6 5964fi
a6a5e4c9 5965rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 5966fi
4977bab6
ZW
5967fi
5968fi
ba479fd2
NN
5969echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
5970echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 5971if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
5972echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
5973echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 5974
4977bab6
ZW
5975cat >conftest.c <<EOF
5976short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5977short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5978void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
5979short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5980short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5981void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
5982int main() { _ascii (); _ebcdic (); return 0; }
5983EOF
5984 if test -f conftest.c ; then
5985 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
5986 if test `grep -l BIGenDianSyS conftest.o` ; then
5987 echo $ac_n ' big endian probe OK, ' 1>&6
5988 ac_cv_c_bigendian=yes
5989 fi
5990 if test `grep -l LiTTleEnDian conftest.o` ; then
5991 echo $ac_n ' little endian probe OK, ' 1>&6
5992 if test $ac_cv_c_bigendian = yes ; then
5993 ac_cv_c_bigendian=unknown;
5994 else
5995 ac_cv_c_bigendian=no
5996 fi
5997 fi
5998 echo $ac_n 'guessing bigendian ... ' >&6
5999 fi
6000 fi
ba479fd2
NN
6001echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6002echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 6003fi
4977bab6 6004if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
6005
6006cat >>confdefs.h <<\_ACEOF
4977bab6 6007#define WORDS_BIGENDIAN 1
ba479fd2 6008_ACEOF
cafe096b 6009
ba479fd2
NN
6010
6011cat >>confdefs.h <<\_ACEOF
84c041a1 6012#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 6013_ACEOF
84c041a1 6014
4977bab6
ZW
6015 BYTEORDER=4321
6016else
6017 BYTEORDER=1234
6018fi
ba479fd2
NN
6019
6020cat >>confdefs.h <<_ACEOF
4977bab6 6021#define BYTEORDER $BYTEORDER
ba479fd2 6022_ACEOF
4977bab6
ZW
6023
6024if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
6025 { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
6026echo "$as_me: error: unknown endianess - sorry" >&2;}
6027 { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
84c041a1
ZW
6028fi
6029
75e93faa 6030
73458fb7
NN
6031# --------
6032# UNSORTED
6033# --------
1e608388 6034
73458fb7
NN
6035# Stage specific cflags for build.
6036stage1_cflags=
6037case $build in
6038vax-*-*)
6039 if test x$GCC = xyes
6040 then
6041 stage1_cflags="-Wa,-J"
6042 else
6043 stage1_cflags="-J"
6044 fi
6045 ;;
6046powerpc-*-darwin*)
6047 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6048 # sources; use -no-cpp-precomp to get to GNU cpp.
6049 # Apple's GCC has bugs in designated initializer handling, so disable
6050 # that too.
6051 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6052 ;;
6053esac
1e608388 6054
1e608388 6055
4e70264f
ZW
6056# These libraries may be used by collect2.
6057# We may need a special search path to get them linked.
ba479fd2
NN
6058echo "$as_me:$LINENO: checking for collect2 libraries" >&5
6059echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6060if test "${gcc_cv_collect2_libs+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
6062else
6063 save_LIBS="$LIBS"
7f2749d4 6064for libs in '' -lld -lmld \
4e70264f
ZW
6065 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
6066 '-L/usr/lib/cmplrs/cc3.11 -lmld'
6067do
6068 LIBS="$libs"
ba479fd2
NN
6069 cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
6071/* confdefs.h. */
6072_ACEOF
6073cat confdefs.h >>conftest.$ac_ext
6074cat >>conftest.$ac_ext <<_ACEOF
6075/* end confdefs.h. */
6076
4e70264f 6077/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6078#ifdef __cplusplus
6079extern "C"
6080#endif
4e70264f 6081/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6082 builtin and then its argument prototype would still apply. */
6083char ldopen ();
6084int
6085main ()
6086{
6087ldopen ();
6088 ;
6089 return 0;
6090}
6091_ACEOF
6092rm -f conftest.$ac_objext conftest$ac_exeext
6093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6094 (eval $ac_link) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); } &&
6098 { ac_try='test -s conftest$ac_exeext'
6099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6100 (eval $ac_try) 2>&5
6101 ac_status=$?
6102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); }; }; then
4e70264f
ZW
6104 gcc_cv_collect2_libs="$libs"; break
6105else
ba479fd2
NN
6106 echo "$as_me: failed program was:" >&5
6107sed 's/^/| /' conftest.$ac_ext >&5
6108
4e70264f 6109fi
ba479fd2 6110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
6111done
6112LIBS="$save_LIBS"
6113test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
6114fi
ba479fd2
NN
6115echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
6116echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
6117case $gcc_cv_collect2_libs in
6118 "none required") ;;
6119 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
6120esac
6121
6122
7f2749d4
RK
6123# When building Ada code on Alpha, we need exc_resume which is usually in
6124# -lexc. So test for it.
6125save_LIBS="$LIBS"
6126LIBS=
ba479fd2
NN
6127echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
6128echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6129if test "${ac_cv_search_exc_resume+set}" = set; then
6130 echo $ECHO_N "(cached) $ECHO_C" >&6
6131else
6132 ac_func_search_save_LIBS=$LIBS
6133ac_cv_search_exc_resume=no
6134cat >conftest.$ac_ext <<_ACEOF
6135#line $LINENO "configure"
6136/* confdefs.h. */
6137_ACEOF
6138cat confdefs.h >>conftest.$ac_ext
6139cat >>conftest.$ac_ext <<_ACEOF
6140/* end confdefs.h. */
7f2749d4 6141
7f2749d4 6142/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6143#ifdef __cplusplus
6144extern "C"
6145#endif
7f2749d4 6146/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6147 builtin and then its argument prototype would still apply. */
6148char exc_resume ();
6149int
6150main ()
6151{
6152exc_resume ();
6153 ;
6154 return 0;
6155}
6156_ACEOF
6157rm -f conftest.$ac_objext conftest$ac_exeext
6158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6159 (eval $ac_link) 2>&5
6160 ac_status=$?
6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162 (exit $ac_status); } &&
6163 { ac_try='test -s conftest$ac_exeext'
6164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6165 (eval $ac_try) 2>&5
6166 ac_status=$?
6167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168 (exit $ac_status); }; }; then
7f2749d4
RK
6169 ac_cv_search_exc_resume="none required"
6170else
ba479fd2
NN
6171 echo "$as_me: failed program was:" >&5
6172sed 's/^/| /' conftest.$ac_ext >&5
6173
7f2749d4 6174fi
ba479fd2
NN
6175rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6176if test "$ac_cv_search_exc_resume" = no; then
6177 for ac_lib in exc; do
6178 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6179 cat >conftest.$ac_ext <<_ACEOF
6180#line $LINENO "configure"
6181/* confdefs.h. */
6182_ACEOF
6183cat confdefs.h >>conftest.$ac_ext
6184cat >>conftest.$ac_ext <<_ACEOF
6185/* end confdefs.h. */
6186
7f2749d4 6187/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6188#ifdef __cplusplus
6189extern "C"
6190#endif
7f2749d4 6191/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6192 builtin and then its argument prototype would still apply. */
6193char exc_resume ();
6194int
6195main ()
6196{
6197exc_resume ();
6198 ;
6199 return 0;
6200}
6201_ACEOF
6202rm -f conftest.$ac_objext conftest$ac_exeext
6203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6204 (eval $ac_link) 2>&5
6205 ac_status=$?
6206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest$ac_exeext'
6209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6210 (eval $ac_try) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
6215break
6216else
ba479fd2
NN
6217 echo "$as_me: failed program was:" >&5
6218sed 's/^/| /' conftest.$ac_ext >&5
6219
cafe096b 6220fi
ba479fd2
NN
6221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6222 done
6e3f3080 6223fi
ba479fd2
NN
6224LIBS=$ac_func_search_save_LIBS
6225fi
6226echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
6227echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
6228if test "$ac_cv_search_exc_resume" != no; then
63cf211a 6229 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 6230
7f2749d4 6231fi
ba479fd2 6232
7f2749d4
RK
6233GNAT_LIBEXC="$LIBS"
6234LIBS="$save_LIBS"
6235
6236
62c9aa5f
ZW
6237# Some systems put ldexp and frexp in libm instead of libc; assume
6238# they're both in the same place. jcf-dump needs them.
6239save_LIBS="$LIBS"
6240LIBS=
ba479fd2
NN
6241echo "$as_me:$LINENO: checking for library containing ldexp" >&5
6242echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
6243if test "${ac_cv_search_ldexp+set}" = set; then
6244 echo $ECHO_N "(cached) $ECHO_C" >&6
6245else
6246 ac_func_search_save_LIBS=$LIBS
6247ac_cv_search_ldexp=no
6248cat >conftest.$ac_ext <<_ACEOF
6249#line $LINENO "configure"
6250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
62c9aa5f 6255
62c9aa5f 6256/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6257#ifdef __cplusplus
6258extern "C"
6259#endif
62c9aa5f 6260/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6261 builtin and then its argument prototype would still apply. */
6262char ldexp ();
6263int
6264main ()
6265{
6266ldexp ();
6267 ;
6268 return 0;
6269}
6270_ACEOF
6271rm -f conftest.$ac_objext conftest$ac_exeext
6272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6273 (eval $ac_link) 2>&5
6274 ac_status=$?
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276 (exit $ac_status); } &&
6277 { ac_try='test -s conftest$ac_exeext'
6278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6279 (eval $ac_try) 2>&5
6280 ac_status=$?
6281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282 (exit $ac_status); }; }; then
62c9aa5f
ZW
6283 ac_cv_search_ldexp="none required"
6284else
ba479fd2
NN
6285 echo "$as_me: failed program was:" >&5
6286sed 's/^/| /' conftest.$ac_ext >&5
6287
62c9aa5f 6288fi
ba479fd2
NN
6289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6290if test "$ac_cv_search_ldexp" = no; then
6291 for ac_lib in m; do
6292 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6293 cat >conftest.$ac_ext <<_ACEOF
6294#line $LINENO "configure"
6295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
6300
62c9aa5f 6301/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6302#ifdef __cplusplus
6303extern "C"
6304#endif
62c9aa5f 6305/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6306 builtin and then its argument prototype would still apply. */
6307char ldexp ();
6308int
6309main ()
6310{
6311ldexp ();
6312 ;
6313 return 0;
6314}
6315_ACEOF
6316rm -f conftest.$ac_objext conftest$ac_exeext
6317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6318 (eval $ac_link) 2>&5
6319 ac_status=$?
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321 (exit $ac_status); } &&
6322 { ac_try='test -s conftest$ac_exeext'
6323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6324 (eval $ac_try) 2>&5
6325 ac_status=$?
6326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327 (exit $ac_status); }; }; then
6328 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
6329break
6330else
ba479fd2
NN
6331 echo "$as_me: failed program was:" >&5
6332sed 's/^/| /' conftest.$ac_ext >&5
6333
cafe096b 6334fi
ba479fd2
NN
6335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6336 done
6e3f3080 6337fi
ba479fd2
NN
6338LIBS=$ac_func_search_save_LIBS
6339fi
6340echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
6341echo "${ECHO_T}$ac_cv_search_ldexp" >&6
6342if test "$ac_cv_search_ldexp" != no; then
63cf211a 6343 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 6344
62c9aa5f 6345fi
ba479fd2 6346
62c9aa5f
ZW
6347LDEXP_LIB="$LIBS"
6348LIBS="$save_LIBS"
6349
6350
956d6950
JL
6351# Use <inttypes.h> only if it exists,
6352# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
6353echo "$as_me:$LINENO: checking for inttypes.h" >&5
6354echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
6355if test "${gcc_cv_header_inttypes_h+set}" = set; then
6356 echo $ECHO_N "(cached) $ECHO_C" >&6
6357else
6358 cat >conftest.$ac_ext <<_ACEOF
6359#line $LINENO "configure"
6360/* confdefs.h. */
6361_ACEOF
6362cat confdefs.h >>conftest.$ac_ext
6363cat >>conftest.$ac_ext <<_ACEOF
6364/* end confdefs.h. */
956d6950
JL
6365#include <sys/types.h>
6366#include <inttypes.h>
ba479fd2
NN
6367int
6368main ()
6369{
956d6950 6370intmax_t i = -1;
ba479fd2
NN
6371 ;
6372 return 0;
6373}
6374_ACEOF
6375rm -f conftest.$ac_objext
6376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6377 (eval $ac_compile) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); } &&
6381 { ac_try='test -s conftest.$ac_objext'
6382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6383 (eval $ac_try) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
0056a9b5 6387 gcc_cv_header_inttypes_h=yes
956d6950 6388else
ba479fd2
NN
6389 echo "$as_me: failed program was:" >&5
6390sed 's/^/| /' conftest.$ac_ext >&5
6391
6392gcc_cv_header_inttypes_h=no
956d6950 6393fi
ba479fd2 6394rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
6395fi
6396
ba479fd2
NN
6397echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
6398echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 6399if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
6400
6401cat >>confdefs.h <<\_ACEOF
0056a9b5 6402#define HAVE_INTTYPES_H 1
ba479fd2 6403_ACEOF
0056a9b5
KG
6404
6405fi
956d6950 6406
c149cc37 6407
ba479fd2
NN
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6af8c740
KG
6433for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
6434 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 6435 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
6436 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
6437 setlocale
956d6950 6438do
ba479fd2
NN
6439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6440echo "$as_me:$LINENO: checking for $ac_func" >&5
6441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6442if eval "test \"\${$as_ac_var+set}\" = set"; then
6443 echo $ECHO_N "(cached) $ECHO_C" >&6
6444else
6445 cat >conftest.$ac_ext <<_ACEOF
6446#line $LINENO "configure"
6447/* confdefs.h. */
6448_ACEOF
6449cat confdefs.h >>conftest.$ac_ext
6450cat >>conftest.$ac_ext <<_ACEOF
6451/* end confdefs.h. */
956d6950 6452/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
6453 which can conflict with char $ac_func (); below.
6454 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6455 <limits.h> exists even on freestanding compilers. */
6456#ifdef __STDC__
6457# include <limits.h>
6458#else
6459# include <assert.h>
6460#endif
6e3f3080 6461/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6462#ifdef __cplusplus
6463extern "C"
6464{
6465#endif
6e3f3080 6466/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6467 builtin and then its argument prototype would still apply. */
6468char $ac_func ();
956d6950
JL
6469/* The GNU C library defines this for functions which it implements
6470 to always fail with ENOSYS. Some functions are actually named
6471 something starting with __ and the normal name is an alias. */
6472#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6473choke me
6474#else
ba479fd2
NN
6475char (*f) () = $ac_func;
6476#endif
6477#ifdef __cplusplus
6478}
956d6950
JL
6479#endif
6480
ba479fd2
NN
6481int
6482main ()
6483{
6484return f != $ac_func;
6485 ;
6486 return 0;
6487}
6488_ACEOF
6489rm -f conftest.$ac_objext conftest$ac_exeext
6490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6491 (eval $ac_link) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); } &&
6495 { ac_try='test -s conftest$ac_exeext'
6496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6497 (eval $ac_try) 2>&5
6498 ac_status=$?
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500 (exit $ac_status); }; }; then
6501 eval "$as_ac_var=yes"
6502else
6503 echo "$as_me: failed program was:" >&5
6504sed 's/^/| /' conftest.$ac_ext >&5
6505
6506eval "$as_ac_var=no"
6507fi
6508rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6509fi
6510echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6511echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6512if test `eval echo '${'$as_ac_var'}'` = yes; then
6513 cat >>confdefs.h <<_ACEOF
6514#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6515_ACEOF
956d6950 6516
956d6950
JL
6517fi
6518done
6519
6885fc87 6520
39f6c4c8 6521if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
6522 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
6523echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6524if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
6525 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
6526else
6527 if test "$cross_compiling" = yes; then
6528 gcc_cv_func_mbstowcs_works=yes
6529else
ba479fd2
NN
6530 cat >conftest.$ac_ext <<_ACEOF
6531#line $LINENO "configure"
6532/* confdefs.h. */
6533_ACEOF
6534cat confdefs.h >>conftest.$ac_ext
6535cat >>conftest.$ac_ext <<_ACEOF
6536/* end confdefs.h. */
39f6c4c8
KW
6537#include <stdlib.h>
6538int main()
6539{
6540 mbstowcs(0, "", 0);
6541 return 0;
6542}
ba479fd2
NN
6543_ACEOF
6544rm -f conftest$ac_exeext
6545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6546 (eval $ac_link) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6551 (eval $ac_try) 2>&5
6552 ac_status=$?
6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554 (exit $ac_status); }; }; then
39f6c4c8
KW
6555 gcc_cv_func_mbstowcs_works=yes
6556else
ba479fd2
NN
6557 echo "$as_me: program exited with status $ac_status" >&5
6558echo "$as_me: failed program was:" >&5
6559sed 's/^/| /' conftest.$ac_ext >&5
6560
6561( exit $ac_status )
6562gcc_cv_func_mbstowcs_works=no
39f6c4c8 6563fi
a6a5e4c9 6564rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 6565fi
39f6c4c8 6566fi
ba479fd2
NN
6567echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
6568echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 6569 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
6570
6571cat >>confdefs.h <<\_ACEOF
39f6c4c8 6572#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 6573_ACEOF
39f6c4c8
KW
6574
6575 fi
6576fi
6577
ba479fd2
NN
6578echo "$as_me:$LINENO: checking for ssize_t" >&5
6579echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6580if test "${ac_cv_type_ssize_t+set}" = set; then
6581 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 6582else
ba479fd2
NN
6583 cat >conftest.$ac_ext <<_ACEOF
6584#line $LINENO "configure"
6585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
8b4fc07a
NN
6590$ac_includes_default
6591int
6592main ()
6593{
6594if ((ssize_t *) 0)
6595 return 0;
6596if (sizeof (ssize_t))
6597 return 0;
6598 ;
6599 return 0;
6600}
ba479fd2 6601_ACEOF
8b4fc07a
NN
6602rm -f conftest.$ac_objext
6603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6604 (eval $ac_compile) 2>&5
6605 ac_status=$?
6606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607 (exit $ac_status); } &&
6608 { ac_try='test -s conftest.$ac_objext'
6609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6610 (eval $ac_try) 2>&5
6611 ac_status=$?
6612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6613 (exit $ac_status); }; }; then
cb65112a 6614 ac_cv_type_ssize_t=yes
f12bc141 6615else
8b4fc07a
NN
6616 echo "$as_me: failed program was:" >&5
6617sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 6618
8b4fc07a
NN
6619ac_cv_type_ssize_t=no
6620fi
6621rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 6622fi
ba479fd2
NN
6623echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6624echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
6625if test $ac_cv_type_ssize_t = yes; then
6626 :
6627else
ba479fd2 6628
8b4fc07a 6629cat >>confdefs.h <<_ACEOF
f12bc141 6630#define ssize_t int
ba479fd2 6631_ACEOF
f12bc141
ZW
6632
6633fi
6634
0b9d02c6 6635
e256b8b6
DA
6636# Try to determine the array type of the second argument of getgroups
6637# for the target system (int or gid_t).
ba479fd2
NN
6638echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6639echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6640if test "${ac_cv_type_uid_t+set}" = set; then
6641 echo $ECHO_N "(cached) $ECHO_C" >&6
6642else
6643 cat >conftest.$ac_ext <<_ACEOF
6644#line $LINENO "configure"
6645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
e256b8b6 6650#include <sys/types.h>
ba479fd2
NN
6651
6652_ACEOF
e256b8b6 6653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6654 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
6655 ac_cv_type_uid_t=yes
6656else
e256b8b6
DA
6657 ac_cv_type_uid_t=no
6658fi
6659rm -f conftest*
6660
6661fi
ba479fd2
NN
6662echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6663echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 6664if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
6665
6666cat >>confdefs.h <<\_ACEOF
e256b8b6 6667#define uid_t int
ba479fd2 6668_ACEOF
cafe096b 6669
ba479fd2
NN
6670
6671cat >>confdefs.h <<\_ACEOF
e256b8b6 6672#define gid_t int
ba479fd2 6673_ACEOF
e256b8b6
DA
6674
6675fi
6676
ba479fd2
NN
6677echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
6678echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
6679if test "${ac_cv_type_getgroups+set}" = set; then
6680 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
6681else
6682 if test "$cross_compiling" = yes; then
6683 ac_cv_type_getgroups=cross
6684else
ba479fd2
NN
6685 cat >conftest.$ac_ext <<_ACEOF
6686#line $LINENO "configure"
6687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
e256b8b6
DA
6692/* Thanks to Mike Rendell for this test. */
6693#include <sys/types.h>
6694#define NGID 256
6695#undef MAX
6696#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
6697
6698int
6699main ()
e256b8b6
DA
6700{
6701 gid_t gidset[NGID];
6702 int i, n;
6703 union { gid_t gval; long lval; } val;
6704
6705 val.lval = -1;
6706 for (i = 0; i < NGID; i++)
6707 gidset[i] = val.gval;
6708 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
e1366e0c 6709 gidset);
e256b8b6
DA
6710 /* Exit non-zero if getgroups seems to require an array of ints. This
6711 happens when gid_t is short but getgroups modifies an array of ints. */
6712 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 6713}
ba479fd2
NN
6714_ACEOF
6715rm -f conftest$ac_exeext
6716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6717 (eval $ac_link) 2>&5
6718 ac_status=$?
6719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6722 (eval $ac_try) 2>&5
6723 ac_status=$?
6724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6725 (exit $ac_status); }; }; then
6726 ac_cv_type_getgroups=gid_t
63cf211a 6727else
ba479fd2
NN
6728 echo "$as_me: program exited with status $ac_status" >&5
6729echo "$as_me: failed program was:" >&5
6730sed 's/^/| /' conftest.$ac_ext >&5
6731
6732( exit $ac_status )
6733ac_cv_type_getgroups=int
e256b8b6 6734fi
a6a5e4c9 6735rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 6736fi
e256b8b6 6737if test $ac_cv_type_getgroups = cross; then
ba479fd2
NN
6738 cat >conftest.$ac_ext <<_ACEOF
6739#line $LINENO "configure"
6740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
e256b8b6 6745#include <unistd.h>
ba479fd2
NN
6746
6747_ACEOF
e256b8b6 6748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6749 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
6750 ac_cv_type_getgroups=gid_t
6751else
e256b8b6
DA
6752 ac_cv_type_getgroups=int
6753fi
6754rm -f conftest*
6755
6756fi
6757fi
ba479fd2
NN
6758echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
6759echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 6760
ba479fd2 6761cat >>confdefs.h <<_ACEOF
e256b8b6 6762#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 6763_ACEOF
e256b8b6
DA
6764
6765
6766if test "${target}" = "${build}"; then
6767 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
6768else
6769 case "${target}" in
6770 # This condition may need some tweaking. It should include all
6771 # targets where the array type of the second argument of getgroups
6772 # is int and the type of gid_t is not equivalent to int.
6773 *-*-sunos* | *-*-ultrix*)
6774 TARGET_GETGROUPS_T=int
6775 ;;
6776 *)
6777 TARGET_GETGROUPS_T=gid_t
6778 ;;
6779 esac
6780fi
6781
6782
ba479fd2
NN
6783echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
6784echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
6785if test "${gcc_cv_func_printf_ptr+set}" = set; then
6786 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
6787else
6788 if test "$cross_compiling" = yes; then
6789 gcc_cv_func_printf_ptr=no
6790else
ba479fd2
NN
6791 cat >conftest.$ac_ext <<_ACEOF
6792#line $LINENO "configure"
6793/* confdefs.h. */
6794_ACEOF
6795cat confdefs.h >>conftest.$ac_ext
6796cat >>conftest.$ac_ext <<_ACEOF
6797/* end confdefs.h. */
0a4b6309
RL
6798#include <stdio.h>
6799
86cf1cbd 6800int main()
0a4b6309
RL
6801{
6802 char buf[64];
6803 char *p = buf, *q = NULL;
6804 sprintf(buf, "%p", p);
6805 sscanf(buf, "%p", &q);
86cf1cbd 6806 return (p != q);
0a4b6309 6807}
ba479fd2
NN
6808_ACEOF
6809rm -f conftest$ac_exeext
6810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6811 (eval $ac_link) 2>&5
6812 ac_status=$?
6813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6816 (eval $ac_try) 2>&5
6817 ac_status=$?
6818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); }; }; then
0a4b6309
RL
6820 gcc_cv_func_printf_ptr=yes
6821else
ba479fd2
NN
6822 echo "$as_me: program exited with status $ac_status" >&5
6823echo "$as_me: failed program was:" >&5
6824sed 's/^/| /' conftest.$ac_ext >&5
6825
6826( exit $ac_status )
6827gcc_cv_func_printf_ptr=no
0a4b6309 6828fi
a6a5e4c9 6829rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 6830fi
0a4b6309
RL
6831rm -f core core.* *.core
6832fi
ba479fd2
NN
6833echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
6834echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 6835if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
6836
6837cat >>confdefs.h <<\_ACEOF
0a4b6309 6838#define HAVE_PRINTF_PTR 1
ba479fd2 6839_ACEOF
0a4b6309
RL
6840
6841fi
6842
1072ec3f
ZW
6843if test $ac_cv_header_sys_mman_h != yes \
6844 || test $ac_cv_func_mmap != yes; then
6845 gcc_cv_func_mmap_file=no
6846 gcc_cv_func_mmap_dev_zero=no
6847 gcc_cv_func_mmap_anon=no
6848else
ba479fd2
NN
6849 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
6850echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
6851if test "${gcc_cv_func_mmap_file+set}" = set; then
6852 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 6853else
ba479fd2 6854 # Add a system to this blacklist if
1072ec3f
ZW
6855 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
6856 # memory area containing the same data that you'd get if you applied
6857 # read() to the same fd. The only system known to have a problem here
6858 # is VMS, where text files have record structure.
6859 case "$host_os" in
ba479fd2 6860 vms* | ultrix*)
1072ec3f
ZW
6861 gcc_cv_func_mmap_file=no ;;
6862 *)
6863 gcc_cv_func_mmap_file=yes;;
6864 esac
6865fi
ba479fd2
NN
6866echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
6867echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
6868 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
6869echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
6870if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
6871 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6872else
6873 # Add a system to this blacklist if it has mmap() but /dev/zero
6874 # does not exist, or if mmapping /dev/zero does not give anonymous
6875 # zeroed pages with both the following properties:
6876 # 1. If you map N consecutive pages in with one call, and then
6877 # unmap any subset of those pages, the pages that were not
6878 # explicitly unmapped remain accessible.
6879 # 2. If you map two adjacent blocks of memory and then unmap them
6880 # both at once, they must both go away.
6881 # Systems known to be in this category are Windows (all variants),
6882 # VMS, and Darwin.
6883 case "$host_os" in
2ce240d3 6884 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
6885 gcc_cv_func_mmap_dev_zero=no ;;
6886 *)
6887 gcc_cv_func_mmap_dev_zero=yes;;
6888 esac
6889fi
ba479fd2
NN
6890echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
6891echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
6892
6893 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
6894 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
6895echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
6896if test "${gcc_cv_decl_map_anon+set}" = set; then
6897 echo $ECHO_N "(cached) $ECHO_C" >&6
6898else
6899 cat >conftest.$ac_ext <<_ACEOF
6900#line $LINENO "configure"
6901/* confdefs.h. */
6902_ACEOF
6903cat confdefs.h >>conftest.$ac_ext
6904cat >>conftest.$ac_ext <<_ACEOF
6905/* end confdefs.h. */
1072ec3f
ZW
6906#include <sys/types.h>
6907#include <sys/mman.h>
6908#include <unistd.h>
6909
6910#ifndef MAP_ANONYMOUS
6911#define MAP_ANONYMOUS MAP_ANON
6912#endif
6913
ba479fd2
NN
6914int
6915main ()
6916{
1072ec3f 6917int n = MAP_ANONYMOUS;
ba479fd2
NN
6918 ;
6919 return 0;
6920}
6921_ACEOF
6922rm -f conftest.$ac_objext
6923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6924 (eval $ac_compile) 2>&5
6925 ac_status=$?
6926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927 (exit $ac_status); } &&
6928 { ac_try='test -s conftest.$ac_objext'
6929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6930 (eval $ac_try) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); }; }; then
1072ec3f
ZW
6934 gcc_cv_decl_map_anon=yes
6935else
ba479fd2
NN
6936 echo "$as_me: failed program was:" >&5
6937sed 's/^/| /' conftest.$ac_ext >&5
6938
6939gcc_cv_decl_map_anon=no
1072ec3f 6940fi
ba479fd2 6941rm -f conftest.$ac_objext conftest.$ac_ext
1072ec3f 6942fi
ba479fd2
NN
6943echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
6944echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
6945
6946 if test $gcc_cv_decl_map_anon = no; then
6947 gcc_cv_func_mmap_anon=no
6948 else
ba479fd2
NN
6949 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
6950echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
6951if test "${gcc_cv_func_mmap_anon+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6953else
6954 # Add a system to this blacklist if it has mmap() and MAP_ANON or
6955 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
6956 # doesn't give anonymous zeroed pages with the same properties listed
6957 # above for use of /dev/zero.
6958 # Systems known to be in this category are Windows, VMS, and SCO Unix.
6959 case "$host_os" in
6960 vms* | cygwin* | pe | mingw* | sco* | udk* )
6961 gcc_cv_func_mmap_anon=no ;;
6962 *)
6963 gcc_cv_func_mmap_anon=yes;;
6964 esac
6965fi
ba479fd2
NN
6966echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
6967echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
6968 fi
6969fi
6970
6971if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
6972
6973cat >>confdefs.h <<\_ACEOF
1072ec3f 6974#define HAVE_MMAP_FILE 1
ba479fd2 6975_ACEOF
1072ec3f
ZW
6976
6977fi
6978if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
6979
6980cat >>confdefs.h <<\_ACEOF
1072ec3f 6981#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 6982_ACEOF
1072ec3f
ZW
6983
6984fi
6985if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
6986
6987cat >>confdefs.h <<\_ACEOF
1072ec3f 6988#define HAVE_MMAP_ANON 1
ba479fd2 6989_ACEOF
1072ec3f
ZW
6990
6991fi
6992
b27d2bd5
MK
6993
6994case "${host}" in
ee262b6f 6995*-*-*vms*)
ba479fd2 6996 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
6997 # won't work, and it isn't easily adaptable. It makes more sense to
6998 # just force it.
6999 ac_cv_func_vfork_works=yes
7000 ;;
b27d2bd5 7001esac
ba479fd2
NN
7002echo "$as_me:$LINENO: checking for pid_t" >&5
7003echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7004if test "${ac_cv_type_pid_t+set}" = set; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7006else
7007 cat >conftest.$ac_ext <<_ACEOF
7008#line $LINENO "configure"
7009/* confdefs.h. */
7010_ACEOF
7011cat confdefs.h >>conftest.$ac_ext
7012cat >>conftest.$ac_ext <<_ACEOF
7013/* end confdefs.h. */
7014$ac_includes_default
7015int
7016main ()
7017{
7018if ((pid_t *) 0)
7019 return 0;
7020if (sizeof (pid_t))
7021 return 0;
7022 ;
7023 return 0;
7024}
7025_ACEOF
7026rm -f conftest.$ac_objext
7027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7028 (eval $ac_compile) 2>&5
7029 ac_status=$?
7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7031 (exit $ac_status); } &&
7032 { ac_try='test -s conftest.$ac_objext'
7033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); }; }; then
cb65112a 7038 ac_cv_type_pid_t=yes
c375c43b 7039else
ba479fd2
NN
7040 echo "$as_me: failed program was:" >&5
7041sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7042
ba479fd2
NN
7043ac_cv_type_pid_t=no
7044fi
7045rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 7046fi
ba479fd2
NN
7047echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7048echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7049if test $ac_cv_type_pid_t = yes; then
7050 :
7051else
7052
7053cat >>confdefs.h <<_ACEOF
c375c43b 7054#define pid_t int
ba479fd2 7055_ACEOF
c375c43b
KG
7056
7057fi
7058
ba479fd2
NN
7059
7060
7061for ac_header in unistd.h vfork.h
7062do
7063as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7064echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7065echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7066if eval "test \"\${$as_ac_Header+set}\" = set"; then
7067 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7068else
ca9bc441 7069 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7070#line $LINENO "configure"
7071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
7076#include <$ac_header>
7077_ACEOF
7078if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7079 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7080 ac_status=$?
7081 grep -v '^ *+' conftest.er1 >conftest.err
7082 rm -f conftest.er1
7083 cat conftest.err >&5
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); } >/dev/null; then
7086 if test -s conftest.err; then
7087 ac_cpp_err=$ac_c_preproc_warn_flag
7088 else
7089 ac_cpp_err=
7090 fi
093e61a6 7091else
ba479fd2
NN
7092 ac_cpp_err=yes
7093fi
7094if test -z "$ac_cpp_err"; then
ca9bc441 7095 eval "$as_ac_Header=yes"
ba479fd2
NN
7096else
7097 echo "$as_me: failed program was:" >&5
7098sed 's/^/| /' conftest.$ac_ext >&5
7099
ca9bc441 7100 eval "$as_ac_Header=no"
ba479fd2
NN
7101fi
7102rm -f conftest.err conftest.$ac_ext
c375c43b 7103fi
ba479fd2
NN
7104echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7105echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7106if test `eval echo '${'$as_ac_Header'}'` = yes; then
7107 cat >>confdefs.h <<_ACEOF
7108#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7109_ACEOF
6e3f3080
NN
7110
7111fi
ba479fd2
NN
7112done
7113
7114
7115
7116for ac_func in fork vfork
7117do
7118as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7119echo "$as_me:$LINENO: checking for $ac_func" >&5
7120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7121if eval "test \"\${$as_ac_var+set}\" = set"; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7123else
7124 cat >conftest.$ac_ext <<_ACEOF
7125#line $LINENO "configure"
7126/* confdefs.h. */
7127_ACEOF
7128cat confdefs.h >>conftest.$ac_ext
7129cat >>conftest.$ac_ext <<_ACEOF
7130/* end confdefs.h. */
c375c43b 7131/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
7132 which can conflict with char $ac_func (); below.
7133 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7134 <limits.h> exists even on freestanding compilers. */
7135#ifdef __STDC__
7136# include <limits.h>
7137#else
7138# include <assert.h>
7139#endif
6e3f3080 7140/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
7141#ifdef __cplusplus
7142extern "C"
7143{
7144#endif
6e3f3080 7145/* We use char because int might match the return type of a gcc2
ba479fd2
NN
7146 builtin and then its argument prototype would still apply. */
7147char $ac_func ();
c375c43b
KG
7148/* The GNU C library defines this for functions which it implements
7149 to always fail with ENOSYS. Some functions are actually named
7150 something starting with __ and the normal name is an alias. */
ba479fd2 7151#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
7152choke me
7153#else
ba479fd2
NN
7154char (*f) () = $ac_func;
7155#endif
7156#ifdef __cplusplus
7157}
c375c43b
KG
7158#endif
7159
ba479fd2
NN
7160int
7161main ()
7162{
7163return f != $ac_func;
7164 ;
7165 return 0;
7166}
7167_ACEOF
7168rm -f conftest.$ac_objext conftest$ac_exeext
7169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7170 (eval $ac_link) 2>&5
7171 ac_status=$?
7172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173 (exit $ac_status); } &&
7174 { ac_try='test -s conftest$ac_exeext'
7175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7176 (eval $ac_try) 2>&5
7177 ac_status=$?
7178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179 (exit $ac_status); }; }; then
7180 eval "$as_ac_var=yes"
7181else
7182 echo "$as_me: failed program was:" >&5
7183sed 's/^/| /' conftest.$ac_ext >&5
7184
7185eval "$as_ac_var=no"
7186fi
7187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7188fi
7189echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7190echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7191if test `eval echo '${'$as_ac_var'}'` = yes; then
7192 cat >>confdefs.h <<_ACEOF
7193#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7194_ACEOF
7195
c375c43b 7196fi
ba479fd2 7197done
c375c43b 7198
ba479fd2
NN
7199if test "x$ac_cv_func_fork" = xyes; then
7200 echo "$as_me:$LINENO: checking for working fork" >&5
7201echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7202if test "${ac_cv_func_fork_works+set}" = set; then
7203 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7204else
ba479fd2
NN
7205 if test "$cross_compiling" = yes; then
7206 ac_cv_func_fork_works=cross
7207else
7208 cat >conftest.$ac_ext <<_ACEOF
7209/* By Ruediger Kuhlmann. */
7210 #include <sys/types.h>
7211 #if HAVE_UNISTD_H
7212 # include <unistd.h>
7213 #endif
7214 /* Some systems only have a dummy stub for fork() */
7215 int main ()
7216 {
7217 if (fork() < 0)
7218 exit (1);
7219 exit (0);
7220 }
7221_ACEOF
7222rm -f conftest$ac_exeext
7223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7224 (eval $ac_link) 2>&5
7225 ac_status=$?
7226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229 (eval $ac_try) 2>&5
7230 ac_status=$?
7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232 (exit $ac_status); }; }; then
7233 ac_cv_func_fork_works=yes
7234else
7235 echo "$as_me: program exited with status $ac_status" >&5
7236echo "$as_me: failed program was:" >&5
7237sed 's/^/| /' conftest.$ac_ext >&5
7238
7239( exit $ac_status )
7240ac_cv_func_fork_works=no
7241fi
a6a5e4c9 7242rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
7243fi
7244fi
7245echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7246echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7247
7248else
7249 ac_cv_func_fork_works=$ac_cv_func_fork
7250fi
7251if test "x$ac_cv_func_fork_works" = xcross; then
7252 case $host in
7253 *-*-amigaos* | *-*-msdosdjgpp*)
7254 # Override, as these systems have only a dummy fork() stub
7255 ac_cv_func_fork_works=no
7256 ;;
7257 *)
7258 ac_cv_func_fork_works=yes
7259 ;;
7260 esac
7261 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7262echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 7263fi
c375c43b 7264ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7265if test "x$ac_cv_func_vfork" = xyes; then
7266 echo "$as_me:$LINENO: checking for working vfork" >&5
7267echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7268if test "${ac_cv_func_vfork_works+set}" = set; then
7269 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7270else
ba479fd2
NN
7271 if test "$cross_compiling" = yes; then
7272 ac_cv_func_vfork_works=cross
7273else
7274 cat >conftest.$ac_ext <<_ACEOF
7275#line $LINENO "configure"
7276/* confdefs.h. */
7277_ACEOF
7278cat confdefs.h >>conftest.$ac_ext
7279cat >>conftest.$ac_ext <<_ACEOF
7280/* end confdefs.h. */
c375c43b
KG
7281/* Thanks to Paul Eggert for this test. */
7282#include <stdio.h>
ba479fd2 7283#include <stdlib.h>
c375c43b
KG
7284#include <sys/types.h>
7285#include <sys/stat.h>
ba479fd2
NN
7286#include <sys/wait.h>
7287#if HAVE_UNISTD_H
7288# include <unistd.h>
c375c43b 7289#endif
ba479fd2
NN
7290#if HAVE_VFORK_H
7291# include <vfork.h>
c375c43b
KG
7292#endif
7293/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
7294 argument registers are propagated back to the parent. The compiler
7295 is told about this with #include <vfork.h>, but some compilers
7296 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7297 static variable whose address is put into a register that is
7298 clobbered by the vfork. */
7299static void
c375c43b
KG
7300#ifdef __cplusplus
7301sparc_address_test (int arg)
ba479fd2 7302# else
c375c43b
KG
7303sparc_address_test (arg) int arg;
7304#endif
7305{
7306 static pid_t child;
7307 if (!child) {
7308 child = vfork ();
7309 if (child < 0) {
7310 perror ("vfork");
7311 _exit(2);
7312 }
7313 if (!child) {
7314 arg = getpid();
7315 write(-1, "", 0);
7316 _exit (arg);
7317 }
7318 }
7319}
ba479fd2
NN
7320
7321int
7322main ()
7323{
c375c43b
KG
7324 pid_t parent = getpid ();
7325 pid_t child;
7326
ba479fd2 7327 sparc_address_test (0);
c375c43b
KG
7328
7329 child = vfork ();
7330
7331 if (child == 0) {
ba479fd2
NN
7332 /* Here is another test for sparc vfork register problems. This
7333 test uses lots of local variables, at least as many local
7334 variables as main has allocated so far including compiler
7335 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7336 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7337 reuse the register of parent for one of the local variables,
7338 since it will think that parent can't possibly be used any more
7339 in this routine. Assigning to the local variable will thus
7340 munge parent in the parent process. */
c375c43b
KG
7341 pid_t
7342 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7343 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7344 /* Convince the compiler that p..p7 are live; otherwise, it might
7345 use the same hardware register for all 8 local variables. */
7346 if (p != p1 || p != p2 || p != p3 || p != p4
7347 || p != p5 || p != p6 || p != p7)
7348 _exit(1);
7349
ba479fd2
NN
7350 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7351 from child file descriptors. If the child closes a descriptor
7352 before it execs or exits, this munges the parent's descriptor
7353 as well. Test for this by closing stdout in the child. */
c375c43b
KG
7354 _exit(close(fileno(stdout)) != 0);
7355 } else {
7356 int status;
7357 struct stat st;
7358
7359 while (wait(&status) != child)
7360 ;
7361 exit(
7362 /* Was there some problem with vforking? */
7363 child < 0
7364
7365 /* Did the child fail? (This shouldn't happen.) */
7366 || status
7367
7368 /* Did the vfork/compiler bug occur? */
7369 || parent != getpid()
7370
7371 /* Did the file descriptor bug occur? */
7372 || fstat(fileno(stdout), &st) != 0
7373 );
7374 }
7375}
ba479fd2
NN
7376_ACEOF
7377rm -f conftest$ac_exeext
7378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7379 (eval $ac_link) 2>&5
7380 ac_status=$?
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7384 (eval $ac_try) 2>&5
7385 ac_status=$?
7386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7387 (exit $ac_status); }; }; then
c375c43b
KG
7388 ac_cv_func_vfork_works=yes
7389else
ba479fd2
NN
7390 echo "$as_me: program exited with status $ac_status" >&5
7391echo "$as_me: failed program was:" >&5
7392sed 's/^/| /' conftest.$ac_ext >&5
7393
7394( exit $ac_status )
7395ac_cv_func_vfork_works=no
cafe096b 7396fi
a6a5e4c9 7397rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 7398fi
ba479fd2
NN
7399fi
7400echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7401echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 7402
ba479fd2
NN
7403fi;
7404if test "x$ac_cv_func_fork_works" = xcross; then
7405 ac_cv_func_vfork_works=ac_cv_func_vfork
7406 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7407echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
7408fi
7409
ba479fd2
NN
7410if test "x$ac_cv_func_vfork_works" = xyes; then
7411
7412cat >>confdefs.h <<\_ACEOF
7413#define HAVE_WORKING_VFORK 1
7414_ACEOF
7415
7416else
7417
7418cat >>confdefs.h <<\_ACEOF
c375c43b 7419#define vfork fork
ba479fd2 7420_ACEOF
c375c43b
KG
7421
7422fi
ba479fd2
NN
7423if test "x$ac_cv_func_fork_works" = xyes; then
7424
7425cat >>confdefs.h <<\_ACEOF
7426#define HAVE_WORKING_FORK 1
7427_ACEOF
7428
7429fi
7430
c375c43b 7431
81bf3d9e 7432
f91abfce 7433
b7f2fb96 7434 am_cv_lib_iconv_ldpath=
ba479fd2
NN
7435
7436# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
f91abfce
TT
7437if test "${with_libiconv_prefix+set}" = set; then
7438 withval="$with_libiconv_prefix"
ba479fd2 7439
f91abfce
TT
7440 for dir in `echo "$withval" | tr : ' '`; do
7441 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
b7f2fb96 7442 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
f91abfce 7443 done
ba479fd2
NN
7444
7445fi;
f91abfce
TT
7446
7447
ba479fd2 7448for ac_header in iconv.h
eb158727 7449do
ba479fd2 7450as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7451echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7452echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7453if eval "test \"\${$as_ac_Header+set}\" = set"; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7455else
ca9bc441 7456 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7457#line $LINENO "configure"
7458/* confdefs.h. */
7459_ACEOF
7460cat confdefs.h >>conftest.$ac_ext
7461cat >>conftest.$ac_ext <<_ACEOF
7462/* end confdefs.h. */
7463#include <$ac_header>
7464_ACEOF
7465if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7466 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7467 ac_status=$?
7468 grep -v '^ *+' conftest.er1 >conftest.err
7469 rm -f conftest.er1
7470 cat conftest.err >&5
7471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472 (exit $ac_status); } >/dev/null; then
7473 if test -s conftest.err; then
7474 ac_cpp_err=$ac_c_preproc_warn_flag
7475 else
7476 ac_cpp_err=
7477 fi
7478else
7479 ac_cpp_err=yes
7480fi
7481if test -z "$ac_cpp_err"; then
ca9bc441 7482 eval "$as_ac_Header=yes"
ba479fd2
NN
7483else
7484 echo "$as_me: failed program was:" >&5
7485sed 's/^/| /' conftest.$ac_ext >&5
7486
ca9bc441 7487 eval "$as_ac_Header=no"
ba479fd2
NN
7488fi
7489rm -f conftest.err conftest.$ac_ext
6e3f3080 7490fi
ba479fd2
NN
7491echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7492echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7493if test `eval echo '${'$as_ac_Header'}'` = yes; then
7494 cat >>confdefs.h <<_ACEOF
7495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7496_ACEOF
7497
eb158727
ZW
7498fi
7499done
7500
7501
ba479fd2
NN
7502 echo "$as_me:$LINENO: checking for iconv" >&5
7503echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7504if test "${am_cv_func_iconv+set}" = set; then
7505 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7506else
ba479fd2 7507
f91abfce
TT
7508 am_cv_func_iconv="no, consider installing GNU libiconv"
7509 am_cv_lib_iconv=no
ba479fd2
NN
7510 cat >conftest.$ac_ext <<_ACEOF
7511#line $LINENO "configure"
7512/* confdefs.h. */
7513_ACEOF
7514cat confdefs.h >>conftest.$ac_ext
7515cat >>conftest.$ac_ext <<_ACEOF
7516/* end confdefs.h. */
f91abfce
TT
7517#include <stdlib.h>
7518#include <iconv.h>
ba479fd2
NN
7519int
7520main ()
7521{
f91abfce
TT
7522iconv_t cd = iconv_open("","");
7523 iconv(cd,NULL,NULL,NULL,NULL);
7524 iconv_close(cd);
ba479fd2
NN
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext conftest$ac_exeext
7530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7531 (eval $ac_link) 2>&5
7532 ac_status=$?
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); } &&
7535 { ac_try='test -s conftest$ac_exeext'
7536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; }; then
f91abfce
TT
7541 am_cv_func_iconv=yes
7542else
ba479fd2
NN
7543 echo "$as_me: failed program was:" >&5
7544sed 's/^/| /' conftest.$ac_ext >&5
7545
f91abfce 7546fi
ba479fd2 7547rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7548 if test "$am_cv_func_iconv" != yes; then
7549 am_save_LIBS="$LIBS"
b7f2fb96 7550 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
ba479fd2
NN
7551 cat >conftest.$ac_ext <<_ACEOF
7552#line $LINENO "configure"
7553/* confdefs.h. */
7554_ACEOF
7555cat confdefs.h >>conftest.$ac_ext
7556cat >>conftest.$ac_ext <<_ACEOF
7557/* end confdefs.h. */
f91abfce
TT
7558#include <stdlib.h>
7559#include <iconv.h>
ba479fd2
NN
7560int
7561main ()
7562{
f91abfce
TT
7563iconv_t cd = iconv_open("","");
7564 iconv(cd,NULL,NULL,NULL,NULL);
7565 iconv_close(cd);
ba479fd2
NN
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext conftest$ac_exeext
7571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7572 (eval $ac_link) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); } &&
7576 { ac_try='test -s conftest$ac_exeext'
7577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7578 (eval $ac_try) 2>&5
7579 ac_status=$?
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); }; }; then
f91abfce
TT
7582 am_cv_lib_iconv=yes
7583 am_cv_func_iconv=yes
7584else
ba479fd2
NN
7585 echo "$as_me: failed program was:" >&5
7586sed 's/^/| /' conftest.$ac_ext >&5
7587
f91abfce 7588fi
ba479fd2 7589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7590 LIBS="$am_save_LIBS"
7591 fi
6e3f3080 7592
ba479fd2
NN
7593fi
7594echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
7595echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 7596 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
7597
7598cat >>confdefs.h <<\_ACEOF
f91abfce 7599#define HAVE_ICONV 1
ba479fd2 7600_ACEOF
f91abfce 7601
ba479fd2
NN
7602 echo "$as_me:$LINENO: checking for iconv declaration" >&5
7603echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
7604 if test "${am_cv_proto_iconv+set}" = set; then
7605 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7606else
ba479fd2
NN
7607
7608 cat >conftest.$ac_ext <<_ACEOF
7609#line $LINENO "configure"
7610/* confdefs.h. */
7611_ACEOF
7612cat confdefs.h >>conftest.$ac_ext
7613cat >>conftest.$ac_ext <<_ACEOF
7614/* end confdefs.h. */
f91abfce
TT
7615
7616#include <stdlib.h>
7617#include <iconv.h>
7618extern
7619#ifdef __cplusplus
7620"C"
7621#endif
7622#if defined(__STDC__) || defined(__cplusplus)
7623size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7624#else
7625size_t iconv();
7626#endif
7627
ba479fd2
NN
7628int
7629main ()
7630{
f91abfce 7631
ba479fd2
NN
7632 ;
7633 return 0;
7634}
7635_ACEOF
7636rm -f conftest.$ac_objext
7637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7638 (eval $ac_compile) 2>&5
7639 ac_status=$?
7640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641 (exit $ac_status); } &&
7642 { ac_try='test -s conftest.$ac_objext'
7643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7644 (eval $ac_try) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); }; }; then
f91abfce
TT
7648 am_cv_proto_iconv_arg1=""
7649else
ba479fd2
NN
7650 echo "$as_me: failed program was:" >&5
7651sed 's/^/| /' conftest.$ac_ext >&5
7652
7653am_cv_proto_iconv_arg1="const"
f91abfce 7654fi
ba479fd2 7655rm -f conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
7656 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);"
7657fi
7658
7659 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
7660 echo "$as_me:$LINENO: result: ${ac_t:-
7661 }$am_cv_proto_iconv" >&5
7662echo "${ECHO_T}${ac_t:-
7663 }$am_cv_proto_iconv" >&6
7664
7665cat >>confdefs.h <<_ACEOF
f91abfce 7666#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 7667_ACEOF
f91abfce
TT
7668
7669 fi
7670 LIBICONV=
7671 if test "$am_cv_lib_iconv" = yes; then
b7f2fb96 7672 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
f91abfce 7673 fi
ba479fd2 7674
f91abfce 7675
56694dd9
ZW
7676# Until we have in-tree GNU iconv:
7677LIBICONV_DEP=
7678
7679
7680
ba479fd2
NN
7681 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7682echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7683if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7684 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 7685else
ba479fd2
NN
7686 cat >conftest.$ac_ext <<_ACEOF
7687#line $LINENO "configure"
7688/* confdefs.h. */
7689_ACEOF
7690cat confdefs.h >>conftest.$ac_ext
7691cat >>conftest.$ac_ext <<_ACEOF
7692/* end confdefs.h. */
56694dd9 7693#include <locale.h>
ba479fd2
NN
7694int
7695main ()
7696{
56694dd9 7697return LC_MESSAGES
ba479fd2
NN
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext conftest$ac_exeext
7703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7704 (eval $ac_link) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest$ac_exeext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
56694dd9
ZW
7714 am_cv_val_LC_MESSAGES=yes
7715else
ba479fd2
NN
7716 echo "$as_me: failed program was:" >&5
7717sed 's/^/| /' conftest.$ac_ext >&5
7718
7719am_cv_val_LC_MESSAGES=no
56694dd9 7720fi
ba479fd2 7721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
56694dd9 7722fi
ba479fd2
NN
7723echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7724echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 7725 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
7726
7727cat >>confdefs.h <<\_ACEOF
56694dd9 7728#define HAVE_LC_MESSAGES 1
ba479fd2 7729_ACEOF
56694dd9
ZW
7730
7731 fi
7732
f91abfce 7733
86cf1cbd
KG
7734# We will need to find libiberty.h and ansidecl.h
7735saved_CFLAGS="$CFLAGS"
7736CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
8e944909 7737for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 7738 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 7739 fprintf_unlocked strstr errno snprintf vasprintf \
c1800ec8 7740 malloc realloc calloc free basename getopt clock
81bf3d9e 7741do
f31e826b 7742 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7743echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7744echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7745if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7746 echo $ECHO_N "(cached) $ECHO_C" >&6
7747else
7748 cat >conftest.$ac_ext <<_ACEOF
7749#line $LINENO "configure"
7750/* confdefs.h. */
7751_ACEOF
7752cat confdefs.h >>conftest.$ac_ext
7753cat >>conftest.$ac_ext <<_ACEOF
7754/* end confdefs.h. */
7afe8c41
KG
7755#undef $ac_tr_decl
7756#define $ac_tr_decl 1
ba479fd2 7757
d02af173 7758#include "ansidecl.h"
86cf1cbd 7759#include "system.h"
f31e826b 7760
ba479fd2
NN
7761int
7762main ()
7763{
86cf1cbd
KG
7764#ifndef $ac_func
7765char *(*pfn) = (char *(*)) $ac_func ;
7766#endif
ba479fd2
NN
7767 ;
7768 return 0;
7769}
7770_ACEOF
7771rm -f conftest.$ac_objext
7772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7773 (eval $ac_compile) 2>&5
7774 ac_status=$?
7775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7776 (exit $ac_status); } &&
7777 { ac_try='test -s conftest.$ac_objext'
7778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7779 (eval $ac_try) 2>&5
7780 ac_status=$?
7781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); }; }; then
f31e826b 7783 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7784else
ba479fd2
NN
7785 echo "$as_me: failed program was:" >&5
7786sed 's/^/| /' conftest.$ac_ext >&5
7787
7788eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7789fi
ba479fd2 7790rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7791fi
7792
f31e826b 7793if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7794 echo "$as_me:$LINENO: result: yes" >&5
7795echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7796#define $ac_tr_decl 1
ba479fd2
NN
7797_ACEOF
7798
81bf3d9e 7799else
ba479fd2
NN
7800 echo "$as_me:$LINENO: result: no" >&5
7801echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7802#define $ac_tr_decl 0
ba479fd2
NN
7803_ACEOF
7804
81bf3d9e
RH
7805fi
7806
7807done
86cf1cbd 7808if test x = y ; then
ba479fd2
NN
7809
7810cat >>confdefs.h <<\_ACEOF
f31e826b 7811#define HAVE_DECL_GETENV 1
ba479fd2
NN
7812_ACEOF
7813
7814cat >>confdefs.h <<\_ACEOF
f31e826b 7815#define HAVE_DECL_ATOL 1
ba479fd2
NN
7816_ACEOF
7817
7818cat >>confdefs.h <<\_ACEOF
f31e826b 7819#define HAVE_DECL_SBRK 1
ba479fd2
NN
7820_ACEOF
7821
7822cat >>confdefs.h <<\_ACEOF
f31e826b 7823#define HAVE_DECL_ABORT 1
ba479fd2
NN
7824_ACEOF
7825
7826cat >>confdefs.h <<\_ACEOF
f31e826b 7827#define HAVE_DECL_ATOF 1
ba479fd2
NN
7828_ACEOF
7829
7830cat >>confdefs.h <<\_ACEOF
f31e826b 7831#define HAVE_DECL_GETCWD 1
ba479fd2
NN
7832_ACEOF
7833
7834cat >>confdefs.h <<\_ACEOF
f31e826b 7835#define HAVE_DECL_GETWD 1
ba479fd2 7836_ACEOF
86cf1cbd 7837 \
ba479fd2
NN
7838
7839cat >>confdefs.h <<\_ACEOF
f31e826b 7840#define HAVE_DECL_STRSIGNAL 1
ba479fd2
NN
7841_ACEOF
7842
7843cat >>confdefs.h <<\_ACEOF
f31e826b 7844#define HAVE_DECL_PUTC_UNLOCKED 1
ba479fd2
NN
7845_ACEOF
7846
7847cat >>confdefs.h <<\_ACEOF
f31e826b 7848#define HAVE_DECL_FPUTS_UNLOCKED 1
ba479fd2
NN
7849_ACEOF
7850
7851cat >>confdefs.h <<\_ACEOF
3b681e9d 7852#define HAVE_DECL_FWRITE_UNLOCKED 1
ba479fd2 7853_ACEOF
3b681e9d 7854 \
ba479fd2
NN
7855
7856cat >>confdefs.h <<\_ACEOF
3b681e9d 7857#define HAVE_DECL_FPRINTF_UNLOCKED 1
ba479fd2
NN
7858_ACEOF
7859
7860cat >>confdefs.h <<\_ACEOF
f31e826b 7861#define HAVE_DECL_STRSTR 1
ba479fd2
NN
7862_ACEOF
7863
7864cat >>confdefs.h <<\_ACEOF
6c889b67 7865#define HAVE_DECL_ERRNO 1
ba479fd2
NN
7866_ACEOF
7867
7868cat >>confdefs.h <<\_ACEOF
236ce4b2 7869#define HAVE_DECL_SNPRINTF 1
ba479fd2
NN
7870_ACEOF
7871
7872cat >>confdefs.h <<\_ACEOF
a7475ab1 7873#define HAVE_DECL_VASPRINTF 1
ba479fd2 7874_ACEOF
86cf1cbd 7875 \
ba479fd2
NN
7876
7877cat >>confdefs.h <<\_ACEOF
f31e826b 7878#define HAVE_DECL_MALLOC 1
ba479fd2
NN
7879_ACEOF
7880
7881cat >>confdefs.h <<\_ACEOF
f31e826b 7882#define HAVE_DECL_REALLOC 1
ba479fd2
NN
7883_ACEOF
7884
7885cat >>confdefs.h <<\_ACEOF
f31e826b 7886#define HAVE_DECL_CALLOC 1
ba479fd2
NN
7887_ACEOF
7888
7889cat >>confdefs.h <<\_ACEOF
f31e826b 7890#define HAVE_DECL_FREE 1
ba479fd2
NN
7891_ACEOF
7892
7893cat >>confdefs.h <<\_ACEOF
f31e826b 7894#define HAVE_DECL_BASENAME 1
ba479fd2
NN
7895_ACEOF
7896
7897cat >>confdefs.h <<\_ACEOF
f31e826b 7898#define HAVE_DECL_GETOPT 1
ba479fd2
NN
7899_ACEOF
7900
7901cat >>confdefs.h <<\_ACEOF
c1800ec8 7902#define HAVE_DECL_CLOCK 1
ba479fd2 7903_ACEOF
81bf3d9e
RH
7904fi
7905
81bf3d9e
RH
7906
7907for ac_func in getrlimit setrlimit getrusage
7908do
f31e826b 7909 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7910echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7911echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7912if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
7914else
7915 cat >conftest.$ac_ext <<_ACEOF
7916#line $LINENO "configure"
7917/* confdefs.h. */
7918_ACEOF
7919cat confdefs.h >>conftest.$ac_ext
7920cat >>conftest.$ac_ext <<_ACEOF
7921/* end confdefs.h. */
7afe8c41
KG
7922#undef $ac_tr_decl
7923#define $ac_tr_decl 1
ba479fd2 7924
d02af173 7925#include "ansidecl.h"
86cf1cbd 7926#include "system.h"
81bf3d9e
RH
7927#ifdef HAVE_SYS_RESOURCE_H
7928#include <sys/resource.h>
7929#endif
7930
f31e826b 7931
ba479fd2
NN
7932int
7933main ()
7934{
86cf1cbd
KG
7935#ifndef $ac_func
7936char *(*pfn) = (char *(*)) $ac_func ;
7937#endif
ba479fd2
NN
7938 ;
7939 return 0;
7940}
7941_ACEOF
7942rm -f conftest.$ac_objext
7943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7944 (eval $ac_compile) 2>&5
7945 ac_status=$?
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } &&
7948 { ac_try='test -s conftest.$ac_objext'
7949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7950 (eval $ac_try) 2>&5
7951 ac_status=$?
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); }; }; then
f31e826b 7954 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7955else
ba479fd2
NN
7956 echo "$as_me: failed program was:" >&5
7957sed 's/^/| /' conftest.$ac_ext >&5
7958
7959eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7960fi
ba479fd2 7961rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7962fi
7963
f31e826b 7964if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7965 echo "$as_me:$LINENO: result: yes" >&5
7966echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7967#define $ac_tr_decl 1
ba479fd2
NN
7968_ACEOF
7969
81bf3d9e 7970else
ba479fd2
NN
7971 echo "$as_me:$LINENO: result: no" >&5
7972echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7973#define $ac_tr_decl 0
ba479fd2
NN
7974_ACEOF
7975
81bf3d9e
RH
7976fi
7977
7978done
86cf1cbd 7979if test x = y ; then
ba479fd2
NN
7980
7981cat >>confdefs.h <<\_ACEOF
f31e826b 7982#define HAVE_DECL_GETRLIMIT 1
ba479fd2
NN
7983_ACEOF
7984
7985cat >>confdefs.h <<\_ACEOF
f31e826b 7986#define HAVE_DECL_SETRLIMIT 1
ba479fd2
NN
7987_ACEOF
7988
7989cat >>confdefs.h <<\_ACEOF
f31e826b 7990#define HAVE_DECL_GETRUSAGE 1
ba479fd2 7991_ACEOF
86cf1cbd
KG
7992fi
7993
81bf3d9e 7994
ba479fd2
NN
7995cat >conftest.$ac_ext <<_ACEOF
7996#line $LINENO "configure"
7997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
b2522d2b
HPN
8002
8003#include "ansidecl.h"
8004#include "system.h"
8005#ifdef HAVE_SYS_RESOURCE_H
8006#include <sys/resource.h>
8007#endif
8008
ba479fd2
NN
8009int
8010main ()
8011{
b2522d2b 8012rlim_t l = 0;
ba479fd2
NN
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017rm -f conftest.$ac_objext
8018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8019 (eval $ac_compile) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); } &&
8023 { ac_try='test -s conftest.$ac_objext'
8024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; }; then
b2522d2b
HPN
8029 :
8030else
ba479fd2
NN
8031 echo "$as_me: failed program was:" >&5
8032sed 's/^/| /' conftest.$ac_ext >&5
8033
8034
8035cat >>confdefs.h <<\_ACEOF
b2522d2b 8036#define rlim_t long
ba479fd2 8037_ACEOF
b2522d2b
HPN
8038
8039fi
ba479fd2 8040rm -f conftest.$ac_objext conftest.$ac_ext
b2522d2b 8041
351df804 8042for ac_func in ldgetname
c1800ec8
ZW
8043do
8044 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8045echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8046echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8047if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8048 echo $ECHO_N "(cached) $ECHO_C" >&6
8049else
8050 cat >conftest.$ac_ext <<_ACEOF
8051#line $LINENO "configure"
8052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
c1800ec8
ZW
8057#undef $ac_tr_decl
8058#define $ac_tr_decl 1
ba479fd2 8059
351df804
KG
8060#include "ansidecl.h"
8061#include "system.h"
8062#ifdef HAVE_LDFCN_H
8063#include <ldfcn.h>
8064#endif
8065
8066
ba479fd2
NN
8067int
8068main ()
8069{
351df804
KG
8070#ifndef $ac_func
8071char *(*pfn) = (char *(*)) $ac_func ;
8072#endif
ba479fd2
NN
8073 ;
8074 return 0;
8075}
8076_ACEOF
8077rm -f conftest.$ac_objext
8078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8079 (eval $ac_compile) 2>&5
8080 ac_status=$?
8081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8082 (exit $ac_status); } &&
8083 { ac_try='test -s conftest.$ac_objext'
8084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8085 (eval $ac_try) 2>&5
8086 ac_status=$?
8087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8088 (exit $ac_status); }; }; then
351df804
KG
8089 eval "gcc_cv_have_decl_$ac_func=yes"
8090else
ba479fd2
NN
8091 echo "$as_me: failed program was:" >&5
8092sed 's/^/| /' conftest.$ac_ext >&5
8093
8094eval "gcc_cv_have_decl_$ac_func=no"
351df804 8095fi
ba479fd2 8096rm -f conftest.$ac_objext conftest.$ac_ext
351df804
KG
8097fi
8098
8099if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8100 echo "$as_me:$LINENO: result: yes" >&5
8101echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8102#define $ac_tr_decl 1
ba479fd2
NN
8103_ACEOF
8104
351df804 8105else
ba479fd2
NN
8106 echo "$as_me:$LINENO: result: no" >&5
8107echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8108#define $ac_tr_decl 0
ba479fd2
NN
8109_ACEOF
8110
351df804
KG
8111fi
8112
8113done
8114if test x = y ; then
ba479fd2
NN
8115
8116cat >>confdefs.h <<\_ACEOF
351df804 8117#define HAVE_DECL_LDGETNAME 1
ba479fd2 8118_ACEOF
351df804
KG
8119fi
8120
8121
8122for ac_func in times
8123do
8124 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8125echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8126echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8127if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8128 echo $ECHO_N "(cached) $ECHO_C" >&6
8129else
8130 cat >conftest.$ac_ext <<_ACEOF
8131#line $LINENO "configure"
8132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
351df804
KG
8137#undef $ac_tr_decl
8138#define $ac_tr_decl 1
ba479fd2 8139
c1800ec8
ZW
8140#include "ansidecl.h"
8141#include "system.h"
8142#ifdef HAVE_SYS_TIMES_H
8143#include <sys/times.h>
8144#endif
8145
8146
ba479fd2
NN
8147int
8148main ()
8149{
c1800ec8
ZW
8150#ifndef $ac_func
8151char *(*pfn) = (char *(*)) $ac_func ;
8152#endif
ba479fd2
NN
8153 ;
8154 return 0;
8155}
8156_ACEOF
8157rm -f conftest.$ac_objext
8158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8159 (eval $ac_compile) 2>&5
8160 ac_status=$?
8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162 (exit $ac_status); } &&
8163 { ac_try='test -s conftest.$ac_objext'
8164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8165 (eval $ac_try) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); }; }; then
c1800ec8
ZW
8169 eval "gcc_cv_have_decl_$ac_func=yes"
8170else
ba479fd2
NN
8171 echo "$as_me: failed program was:" >&5
8172sed 's/^/| /' conftest.$ac_ext >&5
8173
8174eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 8175fi
ba479fd2 8176rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
8177fi
8178
8179if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8180 echo "$as_me:$LINENO: result: yes" >&5
8181echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8182#define $ac_tr_decl 1
ba479fd2
NN
8183_ACEOF
8184
c1800ec8 8185else
ba479fd2
NN
8186 echo "$as_me:$LINENO: result: no" >&5
8187echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8188#define $ac_tr_decl 0
ba479fd2
NN
8189_ACEOF
8190
c1800ec8
ZW
8191fi
8192
8193done
8194if test x = y ; then
ba479fd2
NN
8195
8196cat >>confdefs.h <<\_ACEOF
c1800ec8 8197#define HAVE_DECL_TIMES 1
ba479fd2 8198_ACEOF
c1800ec8
ZW
8199fi
8200
8201
8202# More time-related stuff.
ba479fd2
NN
8203echo "$as_me:$LINENO: checking for struct tms" >&5
8204echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
8205if test "${ac_cv_struct_tms+set}" = set; then
8206 echo $ECHO_N "(cached) $ECHO_C" >&6
8207else
8208
8209cat >conftest.$ac_ext <<_ACEOF
8210#line $LINENO "configure"
8211/* confdefs.h. */
8212_ACEOF
8213cat confdefs.h >>conftest.$ac_ext
8214cat >>conftest.$ac_ext <<_ACEOF
8215/* end confdefs.h. */
c1800ec8
ZW
8216
8217#include "ansidecl.h"
8218#include "system.h"
8219#ifdef HAVE_SYS_TIMES_H
8220#include <sys/times.h>
8221#endif
8222
ba479fd2
NN
8223int
8224main ()
8225{
c1800ec8 8226struct tms tms;
ba479fd2
NN
8227 ;
8228 return 0;
8229}
8230_ACEOF
8231rm -f conftest.$ac_objext
8232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8233 (eval $ac_compile) 2>&5
8234 ac_status=$?
8235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8236 (exit $ac_status); } &&
8237 { ac_try='test -s conftest.$ac_objext'
8238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8239 (eval $ac_try) 2>&5
8240 ac_status=$?
8241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242 (exit $ac_status); }; }; then
c1800ec8
ZW
8243 ac_cv_struct_tms=yes
8244else
ba479fd2
NN
8245 echo "$as_me: failed program was:" >&5
8246sed 's/^/| /' conftest.$ac_ext >&5
8247
8248ac_cv_struct_tms=no
c1800ec8 8249fi
ba479fd2 8250rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8251fi
ba479fd2
NN
8252echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
8253echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 8254if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
8255
8256cat >>confdefs.h <<\_ACEOF
c1800ec8 8257#define HAVE_STRUCT_TMS 1
ba479fd2 8258_ACEOF
c1800ec8
ZW
8259
8260fi
8261
8262# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
8263# revisit after autoconf 2.50.
ba479fd2
NN
8264echo "$as_me:$LINENO: checking for clock_t" >&5
8265echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
8266if test "${gcc_cv_type_clock_t+set}" = set; then
8267 echo $ECHO_N "(cached) $ECHO_C" >&6
8268else
8269
8270cat >conftest.$ac_ext <<_ACEOF
8271#line $LINENO "configure"
8272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
c1800ec8
ZW
8277
8278#include "ansidecl.h"
8279#include "system.h"
8280
ba479fd2
NN
8281int
8282main ()
8283{
c1800ec8 8284clock_t x;
ba479fd2
NN
8285 ;
8286 return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext
8290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8291 (eval $ac_compile) 2>&5
8292 ac_status=$?
8293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8294 (exit $ac_status); } &&
8295 { ac_try='test -s conftest.$ac_objext'
8296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8297 (eval $ac_try) 2>&5
8298 ac_status=$?
8299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8300 (exit $ac_status); }; }; then
c1800ec8
ZW
8301 gcc_cv_type_clock_t=yes
8302else
ba479fd2
NN
8303 echo "$as_me: failed program was:" >&5
8304sed 's/^/| /' conftest.$ac_ext >&5
8305
8306gcc_cv_type_clock_t=no
c1800ec8 8307fi
ba479fd2 8308rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8309fi
ba479fd2
NN
8310echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
8311echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 8312if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
8313
8314cat >>confdefs.h <<\_ACEOF
c1800ec8 8315#define HAVE_CLOCK_T 1
ba479fd2 8316_ACEOF
c1800ec8
ZW
8317
8318fi
8319
ba479fd2
NN
8320echo "$as_me:$LINENO: checking for uchar" >&5
8321echo $ECHO_N "checking for uchar... $ECHO_C" >&6
8322if test "${gcc_cv_type_uchar+set}" = set; then
8323 echo $ECHO_N "(cached) $ECHO_C" >&6
a12b5bd9 8324else
ba479fd2
NN
8325 cat >conftest.$ac_ext <<_ACEOF
8326#line $LINENO "configure"
8327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
a12b5bd9
ZW
8332
8333#include "ansidecl.h"
8334#include "system.h"
8335
ba479fd2
NN
8336int
8337main ()
8338{
a12b5bd9
ZW
8339if ((uchar *)0) return 0;
8340 if (sizeof(uchar)) return 0;
ba479fd2
NN
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
8346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353 (eval $ac_try) 2>&5
8354 ac_status=$?
8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
a12b5bd9
ZW
8357 ac_cv_type_uchar=yes
8358else
ba479fd2
NN
8359 echo "$as_me: failed program was:" >&5
8360sed 's/^/| /' conftest.$ac_ext >&5
8361
8362ac_cv_type_uchar=no
a12b5bd9 8363fi
ba479fd2 8364rm -f conftest.$ac_objext conftest.$ac_ext
a12b5bd9 8365fi
ba479fd2
NN
8366echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5
8367echo "${ECHO_T}$gcc_cv_type_uchar" >&6
63cf211a 8368if test $ac_cv_type_uchar = yes; then
ba479fd2
NN
8369
8370cat >>confdefs.h <<\_ACEOF
a12b5bd9 8371#define HAVE_UCHAR 1
ba479fd2 8372_ACEOF
a12b5bd9
ZW
8373
8374fi
8375
eb70d86d
AS
8376# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
8377CFLAGS="$saved_CFLAGS"
8378
07cf4226
DM
8379# Check whether --enable-initfini-array or --disable-initfini-array was given.
8380if test "${enable_initfini_array+set}" = set; then
8381 enableval="$enable_initfini_array"
ba479fd2 8382
07cf4226 8383else
ba479fd2
NN
8384
8385echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
8386echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
8387if test "${gcc_cv_initfini_array+set}" = set; then
8388 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 8389else
eb70d86d 8390 if test "$cross_compiling" = yes; then
918c4fe4 8391 gcc_cv_initfini_array=no
eb70d86d 8392else
ba479fd2
NN
8393 cat >conftest.$ac_ext <<_ACEOF
8394#line $LINENO "configure"
8395/* confdefs.h. */
8396_ACEOF
8397cat confdefs.h >>conftest.$ac_ext
8398cat >>conftest.$ac_ext <<_ACEOF
8399/* end confdefs.h. */
eb70d86d 8400
07cf4226
DM
8401static int x = -1;
8402int main (void) { return x; }
8403int foo (void) { x = 0; }
8404int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
8405_ACEOF
8406rm -f conftest$ac_exeext
8407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8408 (eval $ac_link) 2>&5
8409 ac_status=$?
8410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8413 (eval $ac_try) 2>&5
8414 ac_status=$?
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); }; }; then
918c4fe4 8417 gcc_cv_initfini_array=yes
eb70d86d 8418else
ba479fd2
NN
8419 echo "$as_me: program exited with status $ac_status" >&5
8420echo "$as_me: failed program was:" >&5
8421sed 's/^/| /' conftest.$ac_ext >&5
8422
8423( exit $ac_status )
8424gcc_cv_initfini_array=no
eb70d86d 8425fi
a6a5e4c9 8426rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 8427fi
07cf4226 8428fi
ba479fd2
NN
8429echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
8430echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 8431 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 8432
ba479fd2 8433fi;
63cf211a 8434if test $enable_initfini_array = yes; then
ba479fd2
NN
8435
8436cat >>confdefs.h <<\_ACEOF
eb70d86d 8437#define HAVE_INITFINI_ARRAY 1
ba479fd2 8438_ACEOF
07cf4226 8439
eb70d86d 8440fi
81bf3d9e 8441
ba479fd2
NN
8442# mkdir takes a single argument on some systems.
8443echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
8444echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
8445if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
8446 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 8447else
ba479fd2
NN
8448 cat >conftest.$ac_ext <<_ACEOF
8449#line $LINENO "configure"
8450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
75923b2f
MK
8455
8456#include <sys/types.h>
8457#ifdef HAVE_SYS_STAT_H
8458# include <sys/stat.h>
8459#endif
8460#ifdef HAVE_UNISTD_H
8461# include <unistd.h>
8462#endif
8463#ifdef HAVE_DIRECT_H
8464# include <direct.h>
8465#endif
ba479fd2
NN
8466int
8467main ()
8468{
75923b2f 8469mkdir ("foo", 0);
ba479fd2
NN
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
8475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8476 (eval $ac_compile) 2>&5
8477 ac_status=$?
8478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479 (exit $ac_status); } &&
8480 { ac_try='test -s conftest.$ac_objext'
8481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8482 (eval $ac_try) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); }; }; then
75923b2f
MK
8486 gcc_cv_mkdir_takes_one_arg=no
8487else
ba479fd2
NN
8488 echo "$as_me: failed program was:" >&5
8489sed 's/^/| /' conftest.$ac_ext >&5
8490
8491gcc_cv_mkdir_takes_one_arg=yes
75923b2f 8492fi
ba479fd2 8493rm -f conftest.$ac_objext conftest.$ac_ext
75923b2f 8494fi
ba479fd2
NN
8495echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
8496echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 8497if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
8498
8499cat >>confdefs.h <<\_ACEOF
75923b2f 8500#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 8501_ACEOF
75923b2f
MK
8502
8503fi
8504
8505
861bb6c1
JL
8506# File extensions
8507manext='.1'
8508objext='.o'
8509
8510
8511
4977bab6
ZW
8512# With Setjmp/Longjmp based exception handling.
8513# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8514if test "${enable_sjlj_exceptions+set}" = set; then
8515 enableval="$enable_sjlj_exceptions"
8516 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 8517
ba479fd2
NN
8518cat >>confdefs.h <<_ACEOF
8519#define CONFIG_SJLJ_EXCEPTIONS $sjlj
8520_ACEOF
4977bab6 8521
ba479fd2 8522fi;
4977bab6 8523
c6c51600 8524if test x$host = x$target; then
ba479fd2
NN
8525 echo "$as_me:$LINENO: checking for main in -lunwind" >&5
8526echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
8527if test "${ac_cv_lib_unwind_main+set}" = set; then
8528 echo $ECHO_N "(cached) $ECHO_C" >&6
4977bab6 8529else
ba479fd2 8530 ac_check_lib_save_LIBS=$LIBS
4977bab6 8531LIBS="-lunwind $LIBS"
ba479fd2
NN
8532cat >conftest.$ac_ext <<_ACEOF
8533#line $LINENO "configure"
8534/* confdefs.h. */
8535_ACEOF
8536cat confdefs.h >>conftest.$ac_ext
8537cat >>conftest.$ac_ext <<_ACEOF
8538/* end confdefs.h. */
4977bab6 8539
4977bab6 8540
ba479fd2
NN
8541int
8542main ()
8543{
8544main ();
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext conftest$ac_exeext
8550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8551 (eval $ac_link) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } &&
8555 { ac_try='test -s conftest$ac_exeext'
8556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557 (eval $ac_try) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); }; }; then
8561 ac_cv_lib_unwind_main=yes
8562else
8563 echo "$as_me: failed program was:" >&5
8564sed 's/^/| /' conftest.$ac_ext >&5
8565
8566ac_cv_lib_unwind_main=no
8567fi
8568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8569LIBS=$ac_check_lib_save_LIBS
8570fi
8571echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
8572echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
8573if test $ac_cv_lib_unwind_main = yes; then
4977bab6
ZW
8574 use_libunwind_default=yes
8575else
ba479fd2 8576 use_libunwind_default=no
4977bab6
ZW
8577fi
8578
c6c51600
AS
8579else
8580 use_libunwind_default=no
8581fi
4977bab6
ZW
8582# Use libunwind based exception handling.
8583# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8584if test "${enable_libunwind_exceptions+set}" = set; then
8585 enableval="$enable_libunwind_exceptions"
8586 use_libunwind_exceptions=$enableval
8587else
8588 use_libunwind_exceptions=$use_libunwind_default
ba479fd2 8589fi;
63cf211a 8590if test x"$use_libunwind_exceptions" = xyes; then
ba479fd2
NN
8591
8592cat >>confdefs.h <<\_ACEOF
4977bab6 8593#define USE_LIBUNWIND_EXCEPTIONS 1
ba479fd2 8594_ACEOF
4977bab6
ZW
8595
8596fi
8597
34a86c2b
NN
8598# --------------------------------------------------------
8599# Build, host, and target specific configuration fragments
8600# --------------------------------------------------------
8601
5b28c537
NN
8602# Collect build-machine-specific information.
8603. ${srcdir}/config.build
8604
a89ea0df
NN
8605# Collect host-machine-specific information.
8606. ${srcdir}/config.host
8607
ef69da62 8608target_gtfiles=
a89ea0df
NN
8609
8610# Collect target-machine-specific information.
8ad9fb33 8611. ${srcdir}/config.gcc
861bb6c1
JL
8612
8613extra_objs="${host_extra_objs} ${extra_objs}"
8614
8615# Default the target-machine variables that were not explicitly set.
75bffa71 8616if test x"$tm_file" = x
861bb6c1
JL
8617then tm_file=$cpu_type/$cpu_type.h; fi
8618
6b2adea9 8619if test x"$extra_headers" = x
861bb6c1
JL
8620then extra_headers=; fi
8621
75bffa71 8622if test x$md_file = x
e98e406f 8623then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 8624
75bffa71 8625if test x$out_file = x
861bb6c1
JL
8626then out_file=$cpu_type/$cpu_type.c; fi
8627
75bffa71 8628if test x"$tmake_file" = x
861bb6c1
JL
8629then tmake_file=$cpu_type/t-$cpu_type
8630fi
8631
90e6a802 8632if test x"$dwarf2" = xyes
756ee602 8633then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
8634fi
8635
861bb6c1 8636# Say what files are being used for the output code and MD file.
11642c3a 8637echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
8638echo "Using \`$srcdir/config/$md_file' as machine description file."
8639
11642c3a 8640# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
8641# about them and drop them.
8642
11642c3a
ZW
8643bx=
8644for x in $build_xm_file; do
8645 if test -f $srcdir/config/$x
8646 then bx="$bx $x"
ba479fd2
NN
8647 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8648echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8649 fi
8650done
8651build_xm_file="$bx"
8652
8653hx=
8654for x in $host_xm_file; do
8655 if test -f $srcdir/config/$x
8656 then hx="$hx $x"
ba479fd2
NN
8657 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8658echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8659 fi
8660done
8661host_xm_file="$hx"
8662
8663tx=
8664for x in $xm_file; do
8665 if test -f $srcdir/config/$x
8666 then tx="$tx $x"
ba479fd2
NN
8667 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8668echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8669 fi
8670done
8671xm_file="$tx"
8672
861bb6c1
JL
8673count=a
8674for f in $tm_file; do
8675 count=${count}x
8676done
75bffa71 8677if test $count = ax; then
861bb6c1
JL
8678 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
8679else
8680 echo "Using the following target machine macro files:"
8681 for f in $tm_file; do
8682 echo " $srcdir/config/$f"
8683 done
8684fi
8685
4977bab6 8686if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
8687
8688cat >>confdefs.h <<\_ACEOF
4977bab6 8689#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 8690_ACEOF
4977bab6
ZW
8691
8692fi
8693
861bb6c1
JL
8694count=a
8695for f in $host_xm_file; do
8696 count=${count}x
8697done
11642c3a
ZW
8698if test $count = a; then
8699 :
8700elif test $count = ax; then
861bb6c1
JL
8701 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
8702else
8703 echo "Using the following host machine macro files:"
8704 for f in $host_xm_file; do
8705 echo " $srcdir/config/$f"
8706 done
8707fi
476d9098 8708echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 8709
75bffa71 8710if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
8711 count=a
8712 for f in $build_xm_file; do
8713 count=${count}x
8714 done
11642c3a
ZW
8715 if test $count = a; then
8716 :
8717 elif test $count = ax; then
861bb6c1
JL
8718 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
8719 else
8720 echo "Using the following build machine macro files:"
8721 for f in $build_xm_file; do
8722 echo " $srcdir/config/$f"
8723 done
8724 fi
8725fi
8726
c2e494a8
NN
8727# Check if a valid thread package
8728case ${enable_threads_flag} in
8729 "" | no)
8730 # No threads
8731 target_thread_file='single'
8732 ;;
8733 yes)
8734 # default
8735 target_thread_file='single'
8736 ;;
769e49eb
NN
8737 aix | dce | gnat | irix | posix | rtems | \
8738 single | solaris | vxworks | win32 )
c2e494a8
NN
8739 target_thread_file=${enable_threads_flag}
8740 ;;
8741 *)
8742 echo "${enable_threads_flag} is an unknown thread package" 1>&2
8743 exit 1
8744 ;;
8745esac
8746
8747if test x${thread_file} = x; then
8748 # No thread file set by target-specific clauses in config.gcc,
8749 # so use file chosen by default logic above
8750 thread_file=${target_thread_file}
861bb6c1
JL
8751fi
8752
2121a768
JT
8753if test x$enable___cxa_atexit = xyes || \
8754 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
ba479fd2
NN
8755
8756cat >>confdefs.h <<\_ACEOF
2121a768 8757#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 8758_ACEOF
2121a768
JT
8759
8760fi
8761
a5381466 8762# Look for a file containing extra machine modes.
1c0ca89d
ZW
8763if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
8764 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
8765
8766
8767cat >>confdefs.h <<_ACEOF
e22340b0 8768#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 8769_ACEOF
a5381466
ZW
8770
8771fi
8772
b7cb92ad 8773# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 8774# the first file included by config.h.
4977bab6 8775# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 8776# as well. If host!=build, we are in error and need to do more
db81d74a 8777# work to find out the build config parameters.
75bffa71 8778if test x$host = x$build
db81d74a 8779then
eaf4e618 8780 build_auto=auto-host.h
06f0b04c 8781 FORBUILD=..
b7cb92ad
JL
8782else
8783 # We create a subdir, then run autoconf in the subdir.
8784 # To prevent recursion we set host and build for the new
8785 # invocation of configure to the build for this invocation
ba479fd2 8786 # of configure.
b7cb92ad
JL
8787 tempdir=build.$$
8788 rm -rf $tempdir
8789 mkdir $tempdir
8790 cd $tempdir
8791 case ${srcdir} in
255b8a49 8792 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
8793 *) realsrcdir=../${srcdir};;
8794 esac
d920e825
L
8795 saved_CFLAGS="${CFLAGS}"
8796 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
8797 ${realsrcdir}/configure \
534d0cc0 8798 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 8799 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
8800
8801 # We just finished tests for the build machine, so rename
8802 # the file auto-build.h in the gcc directory.
8803 mv auto-host.h ../auto-build.h
8804 cd ..
8805 rm -rf $tempdir
eaf4e618 8806 build_auto=auto-build.h
3b1b059c 8807 FORBUILD=../${build_subdir}
db81d74a
RH
8808fi
8809
06f0b04c 8810
eaf4e618 8811tm_file="${tm_file} defaults.h"
4977bab6
ZW
8812tm_p_file="${tm_p_file} tm-preds.h"
8813host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
8814build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 8815# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
8816# put this back in temporarily.
8817xm_file="ansidecl.h ${xm_file}"
0056a9b5 8818
34a86c2b
NN
8819# --------
8820# UNSORTED
8821# --------
8822
f1943b77 8823# Get the version trigger filename from the toplevel
75bffa71 8824if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
8825 gcc_version_trigger=$with_gcc_version_trigger
8826else
8827 gcc_version_trigger=${srcdir}/version.c
8828fi
022dae81 8829gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 8830gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 8831
cc1e60ea 8832# Compile in configure arguments.
8105825d 8833if test -f configargs.h ; then
cc1e60ea 8834 # Being re-configured.
022dae81 8835 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
8836 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
8837else
8838 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
8839fi
eeae7b41
DJ
8840
8841# Double all backslashes and backslash all quotes to turn
8842# gcc_config_arguments into a C string.
8843sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
8844$gcc_config_arguments
8845EOF
8846gcc_config_arguments_str=`cat conftest.out`
8847rm -f conftest.out
8848
cc1e60ea
JM
8849cat > configargs.h <<EOF
8850/* Generated automatically. */
eeae7b41 8851static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 8852static const char thread_model[] = "$thread_file";
7816bea0
DJ
8853
8854static const struct {
8855 const char *name, *value;
8856} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
8857EOF
8858
ab87f8c8
JL
8859# Internationalization
8860PACKAGE=gcc
8861VERSION="$gcc_version"
861bb6c1 8862
ab87f8c8
JL
8863
8864
56694dd9
ZW
8865# If we haven't got the data from the intl directory,
8866# assume NLS is disabled.
ba479fd2
NN
8867USE_NLS=no
8868LIBINTL=
8869LIBINTL_DEP=
8870INCINTL=
8871XGETTEXT=
8872GMSGFMT=
8873POSUB=
56694dd9
ZW
8874if test -f ../intl/config.intl; then
8875 . ../intl/config.intl
093e61a6 8876fi
ba479fd2
NN
8877echo "$as_me:$LINENO: checking whether NLS is requested" >&5
8878echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 8879if test x"$USE_NLS" != xyes; then
ba479fd2
NN
8880 echo "$as_me:$LINENO: result: no" >&5
8881echo "${ECHO_T}no" >&6
56694dd9 8882else
ba479fd2
NN
8883 echo "$as_me:$LINENO: result: yes" >&5
8884echo "${ECHO_T}yes" >&6
8885
8886cat >>confdefs.h <<\_ACEOF
56694dd9 8887#define ENABLE_NLS 1
ba479fd2 8888_ACEOF
56694dd9 8889
093e61a6 8890
ba479fd2
NN
8891 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8892echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 8893 # Look for .po and .gmo files in the source directory.
ba479fd2 8894 CATALOGS=
56694dd9
ZW
8895 XLINGUAS=
8896 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
8897 # If there aren't any .gmo files the shell will give us the
8898 # literal string "../path/to/srcdir/po/*.gmo" which has to be
8899 # weeded out.
8900 case "$cat" in *\**)
8901 continue;;
8902 esac
8903 # The quadruple backslash is collapsed to a double backslash
8904 # by the backticks, then collapsed again by the double quotes,
8905 # leaving us with one backslash in the sed expression (right
8906 # before the dot that mustn't act as a wildcard).
8907 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
8908 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
8909 # The user is allowed to set LINGUAS to a list of languages to
8910 # install catalogs for. If it's empty that means "all of them."
8911 if test "x$LINGUAS" = x; then
8912 CATALOGS="$CATALOGS $cat"
8913 XLINGUAS="$XLINGUAS $lang"
8914 else
8915 case "$LINGUAS" in *$lang*)
8916 CATALOGS="$CATALOGS $cat"
8917 XLINGUAS="$XLINGUAS $lang"
8918 ;;
8919 esac
8920 fi
8921 done
8922 LINGUAS="$XLINGUAS"
ba479fd2
NN
8923 echo "$as_me:$LINENO: result: $LINGUAS" >&5
8924echo "${ECHO_T}$LINGUAS" >&6
56694dd9 8925fi
861bb6c1 8926
56694dd9
ZW
8927# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
8928# -liconv on the link line twice.
8929case "$LIBINTL" in *$LIBICONV*)
8930 LIBICONV= ;;
8931esac
dc6746e7 8932
56694dd9
ZW
8933# Windows32 Registry support for specifying GCC installation paths.
8934# Check whether --enable-win32-registry or --disable-win32-registry was given.
8935if test "${enable_win32_registry+set}" = set; then
8936 enableval="$enable_win32_registry"
dc6746e7 8937
ba479fd2 8938fi;
56694dd9
ZW
8939case $host_os in
8940 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
8941echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
8942echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 8943if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
8944
8945cat >>confdefs.h <<\_ACEOF
56694dd9 8946#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
8947_ACEOF
8948
8949 echo "$as_me:$LINENO: result: yes" >&5
8950echo "${ECHO_T}yes" >&6
8951 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
8952echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
8953if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else
8956 ac_func_search_save_LIBS=$LIBS
8957ac_cv_search_RegOpenKeyExA=no
8958cat >conftest.$ac_ext <<_ACEOF
8959#line $LINENO "configure"
8960/* confdefs.h. */
8961_ACEOF
8962cat confdefs.h >>conftest.$ac_ext
8963cat >>conftest.$ac_ext <<_ACEOF
8964/* end confdefs.h. */
861bb6c1 8965
ab87f8c8 8966/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8967#ifdef __cplusplus
8968extern "C"
8969#endif
ab87f8c8 8970/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8971 builtin and then its argument prototype would still apply. */
8972char RegOpenKeyExA ();
8973int
8974main ()
8975{
8976RegOpenKeyExA ();
8977 ;
8978 return 0;
8979}
8980_ACEOF
8981rm -f conftest.$ac_objext conftest$ac_exeext
8982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8983 (eval $ac_link) 2>&5
8984 ac_status=$?
8985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); } &&
8987 { ac_try='test -s conftest$ac_exeext'
8988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989 (eval $ac_try) 2>&5
8990 ac_status=$?
8991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992 (exit $ac_status); }; }; then
56694dd9 8993 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 8994else
ba479fd2
NN
8995 echo "$as_me: failed program was:" >&5
8996sed 's/^/| /' conftest.$ac_ext >&5
8997
861bb6c1 8998fi
ba479fd2
NN
8999rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9000if test "$ac_cv_search_RegOpenKeyExA" = no; then
9001 for ac_lib in advapi32; do
9002 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9003 cat >conftest.$ac_ext <<_ACEOF
9004#line $LINENO "configure"
9005/* confdefs.h. */
9006_ACEOF
9007cat confdefs.h >>conftest.$ac_ext
9008cat >>conftest.$ac_ext <<_ACEOF
9009/* end confdefs.h. */
9010
56694dd9 9011/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9012#ifdef __cplusplus
9013extern "C"
9014#endif
56694dd9 9015/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9016 builtin and then its argument prototype would still apply. */
9017char RegOpenKeyExA ();
9018int
9019main ()
9020{
9021RegOpenKeyExA ();
9022 ;
9023 return 0;
9024}
9025_ACEOF
9026rm -f conftest.$ac_objext conftest$ac_exeext
9027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9028 (eval $ac_link) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); } &&
9032 { ac_try='test -s conftest$ac_exeext'
9033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9034 (eval $ac_try) 2>&5
9035 ac_status=$?
9036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); }; }; then
9038 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 9039break
861bb6c1 9040else
ba479fd2
NN
9041 echo "$as_me: failed program was:" >&5
9042sed 's/^/| /' conftest.$ac_ext >&5
9043
861bb6c1 9044fi
ba479fd2
NN
9045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9046 done
6e3f3080 9047fi
ba479fd2
NN
9048LIBS=$ac_func_search_save_LIBS
9049fi
9050echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
9051echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
9052if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 9053 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 9054
ab87f8c8 9055fi
ba479fd2 9056
cafe096b 9057else
ba479fd2
NN
9058 echo "$as_me:$LINENO: result: no" >&5
9059echo "${ECHO_T}no" >&6
093e61a6 9060fi
ab87f8c8 9061
56694dd9
ZW
9062# Check if user specified a different registry key.
9063case "x${enable_win32_registry}" in
9064x | xyes)
9065 # default.
9066 gcc_cv_win32_registry_key="$VERSION"
9067 ;;
9068xno)
9069 # no registry lookup.
9070 gcc_cv_win32_registry_key=''
9071 ;;
9072*)
9073 # user-specified key.
9074 gcc_cv_win32_registry_key="$enable_win32_registry"
9075 ;;
9076esac
ab87f8c8 9077
56694dd9 9078if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9079 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
9080echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
9081
9082cat >>confdefs.h <<_ACEOF
56694dd9 9083#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 9084_ACEOF
cafe096b 9085
ba479fd2
NN
9086 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
9087echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 9088fi
56694dd9
ZW
9089;;
9090esac
ab87f8c8 9091
56694dd9
ZW
9092# Get an absolute path to the GCC top-level source directory
9093holddir=`${PWDCMD-pwd}`
9094cd $srcdir
9095topdir=`${PWDCMD-pwd}`
9096cd $holddir
ab87f8c8 9097
56694dd9 9098# Conditionalize the makefile for this host machine.
2ed26f6b 9099xmake_file=
c406e779 9100for f in ${host_xmake_file}
56694dd9
ZW
9101do
9102 if test -f ${srcdir}/config/$f
9103 then
2ed26f6b 9104 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
9105 fi
9106done
093e61a6 9107
56694dd9 9108# Conditionalize the makefile for this target machine.
2ed26f6b 9109tmake_file_=
c406e779 9110for f in ${tmake_file}
56694dd9
ZW
9111do
9112 if test -f ${srcdir}/config/$f
9113 then
2ed26f6b 9114 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
9115 fi
9116done
2ed26f6b 9117tmake_file="${tmake_file_}"
71a94577 9118
56694dd9 9119symbolic_link='ln -s'
34a86c2b 9120
ab87f8c8
JL
9121# If the host doesn't support symlinks, modify CC in
9122# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
9123# Otherwise, we can use "CC=$(CC)".
9124rm -f symtest.tem
9125if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
9126then
9127 cc_set_by_configure="\$(CC)"
5aa82ace 9128 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8 9129 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
596151e1 9130 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
ab87f8c8
JL
9131else
9132 rm -f symtest.tem
9133 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
9134 then
9135 symbolic_link="cp -p"
9136 else
9137 symbolic_link="cp"
9138 fi
9139 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 9140 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8 9141 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
596151e1 9142 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
9143fi
9144rm -f symtest.tem
9145
9146out_object_file=`basename $out_file .c`.o
9147
9148tm_file_list=
e22340b0 9149tm_include_list=
ab87f8c8 9150for f in $tm_file; do
64ccbc99 9151 case $f in
d02af173 9152 defaults.h )
e22340b0
ZW
9153 tm_file_list="${tm_file_list} \$(srcdir)/$f"
9154 tm_include_list="${tm_include_list} $f"
9155 ;;
9156 * )
9157 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
9158 tm_include_list="${tm_include_list} config/$f"
9159 ;;
64ccbc99 9160 esac
ab87f8c8
JL
9161done
9162
11642c3a 9163tm_p_file_list=
e22340b0 9164tm_p_include_list=
11642c3a 9165for f in $tm_p_file; do
4977bab6
ZW
9166 case $f in
9167 tm-preds.h )
e22340b0
ZW
9168 tm_p_file_list="${tm_p_file_list} $f"
9169 tm_p_include_list="${tm_p_include_list} $f"
9170 ;;
9171 * )
9172 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
9173 tm_p_include_list="${tm_p_include_list} config/$f"
9174 esac
9175done
9176
9177xm_file_list=
9178xm_include_list=
9179for f in $xm_file; do
9180 case $f in
9181 ansidecl.h )
9182 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
9183 xm_include_list="${xm_include_list} $f"
9184 ;;
9185 auto-host.h )
9186 xm_file_list="${xm_file_list} $f"
9187 xm_include_list="${xm_include_list} $f"
9188 ;;
9189 * )
9190 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
9191 xm_include_list="${xm_include_list} config/$f"
9192 ;;
4977bab6 9193 esac
11642c3a
ZW
9194done
9195
ab87f8c8 9196host_xm_file_list=
e22340b0 9197host_xm_include_list=
ab87f8c8 9198for f in $host_xm_file; do
64ccbc99 9199 case $f in
d02af173 9200 ansidecl.h )
e22340b0
ZW
9201 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
9202 host_xm_include_list="${host_xm_include_list} $f"
9203 ;;
e2500fed 9204 auto-host.h )
e22340b0
ZW
9205 host_xm_file_list="${host_xm_file_list} $f"
9206 host_xm_include_list="${host_xm_include_list} $f"
9207 ;;
9208 * )
9209 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
9210 host_xm_include_list="${host_xm_include_list} config/$f"
9211 ;;
64ccbc99 9212 esac
ab87f8c8
JL
9213done
9214
9215build_xm_file_list=
9216for f in $build_xm_file; do
64ccbc99 9217 case $f in
d02af173 9218 ansidecl.h )
e22340b0
ZW
9219 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
9220 build_xm_include_list="${build_xm_include_list} $f"
9221 ;;
e2500fed 9222 auto-build.h | auto-host.h )
e22340b0
ZW
9223 build_xm_file_list="${build_xm_file_list} $f"
9224 build_xm_include_list="${build_xm_include_list} $f"
9225 ;;
9226 * )
9227 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
9228 build_xm_include_list="${build_xm_include_list} config/$f"
9229 ;;
64ccbc99 9230 esac
ab87f8c8
JL
9231done
9232
a078a589
ZW
9233# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
9234# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
9235CROSS=
9236ALL=all.internal
9237SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9238if test x$host != x$target
9239then
a078a589
ZW
9240 CROSS="-DCROSS_COMPILE"
9241 ALL=all.cross
9242 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 9243 case "$host","$target" in
3a7e8b87
GK
9244 # Darwin crosses can use the host system's libraries and headers,
9245 # because of the fat library support. Of course, it must be the
9246 # same version of Darwin on both sides. Allow the user to
9247 # just say --target=foo-darwin without a version number to mean
9248 # "the version on this system".
9249 *-*-darwin*,*-*-darwin*)
9250 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
9251 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
9252 if test $hostos = $targetos -o $targetos = darwin ; then
9253 CROSS=
9254 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
9255 with_headers=yes
9256 fi
9257 ;;
9258
343f59d9
AM
9259 i?86-*-*,x86_64-*-* \
9260 | powerpc*-*-*,powerpc64*-*-*)
9261 CROSS="$CROSS -DNATIVE_CROSS" ;;
9262 esac
7a615b25
AO
9263elif test "x$TARGET_SYSTEM_ROOT" != x; then
9264 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
9265 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9266fi
9267
b39d221a
EC
9268# If this is a cross-compiler that does not
9269# have its own set of headers then define
9270# inhibit_libc
9271
dc06db20
R
9272# If this is using newlib, without having the headers available now,
9273# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
9274# This prevents libgcc2 from containing any code which requires libc
9275# support.
b39d221a 9276inhibit_libc=
dc06db20
R
9277if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
9278 test x$with_newlib = xyes ; } &&
e50084fa 9279 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 9280 inhibit_libc=-Dinhibit_libc
b39d221a
EC
9281fi
9282
9283
a078a589
ZW
9284# When building gcc with a cross-compiler, we need to adjust things so
9285# that the generator programs are still built with the native compiler.
9286# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
9287
9288# These are the normal (build=host) settings:
ba479fd2
NN
9289BUILD_PREFIX=
9290BUILD_PREFIX_1=ignore-
9291CC_FOR_BUILD='$(CC)'
9292BUILD_CFLAGS='$(ALL_CFLAGS)'
a078a589 9293
ba479fd2 9294STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
9295
9296# Possibly disable fixproto, on a per-target basis.
9297case ${use_fixproto} in
9298 no)
9299 STMP_FIXPROTO=
9300 ;;
9301 yes)
9302 STMP_FIXPROTO=stmp-fixproto
9303 ;;
9304esac
9305
a078a589 9306
83599948
NS
9307# And these apply if build != host, or we are generating coverage data
9308if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 9309then
5c35940c
NN
9310 BUILD_PREFIX=build-
9311 BUILD_PREFIX_1=build-
b11e4747 9312 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 9313
7a615b25
AO
9314 if test "x$TARGET_SYSTEM_ROOT" = x; then
9315 STMP_FIXINC=
9316 STMP_FIXPROTO=
9317 fi
ab87f8c8
JL
9318fi
9319
9320# Expand extra_headers to include complete path.
9321# This substitutes for lots of t-* files.
9322extra_headers_list=
b1ef58c8
NN
9323# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
9324for file in ${extra_headers} ; do
9325 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
9326done
ab87f8c8 9327
ab87f8c8 9328# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
9329case $use_collect2 in
9330 no) use_collect2= ;;
9331 "") ;;
ba479fd2 9332 *)
34a86c2b
NN
9333 host_xm_defines="${host_xm_defines} USE_COLLECT2"
9334 xm_defines="${xm_defines} USE_COLLECT2"
9335 ;;
9336esac
ab87f8c8 9337
d869a8c4
NN
9338# Identify the assembler which will work hand-in-glove with the newly
9339# built GCC, so that we can examine its features. This is the assembler
9340# which will be driven by the driver program.
9341#
9342# If build != host, and we aren't building gas in-tree, we identify a
9343# build->target assembler and hope that it will have the same features
9344# as the host->target assembler we'll be using.
ba479fd2
NN
9345echo "$as_me:$LINENO: checking what assembler to use" >&5
9346echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 9347in_tree_gas=no
ab87f8c8 9348gcc_cv_as=
981d4858
JM
9349gcc_cv_gas_major_version=
9350gcc_cv_gas_minor_version=
ab87f8c8
JL
9351gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
9352if test -x "$DEFAULT_ASSEMBLER"; then
9353 gcc_cv_as="$DEFAULT_ASSEMBLER"
9354elif test -x "$AS"; then
9355 gcc_cv_as="$AS"
9356elif test -x as$host_exeext; then
9357 # Build using assembler in the current directory.
9358 gcc_cv_as=./as$host_exeext
34a86c2b
NN
9359elif test -f $gcc_cv_as_gas_srcdir/configure.in \
9360 && test -f ../gas/Makefile; then
ad9c4d9f
NN
9361 # Single tree build which includes gas.
9362 in_tree_gas=yes
9363 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9364for f in $gcc_cv_as_bfd_srcdir/configure \
9365 $gcc_cv_as_gas_srcdir/configure \
9366 $gcc_cv_as_gas_srcdir/configure.in \
9367 $gcc_cv_as_gas_srcdir/Makefile.in ; do
9368 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9369 if test x$gcc_cv_gas_version != x; then
9370 break
9371 fi
9372done
9373gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
9374gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
9375gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
9376case $gcc_cv_gas_patch_version in
9377 "") gcc_cv_gas_patch_version="0" ;;
9378esac
8ada417f
ZW
9379gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
9380 + $gcc_cv_gas_minor_version \) \* 1000 \
9381 + $gcc_cv_gas_patch_version`
ad9c4d9f 9382
f9c1196a
ZW
9383 rm -f as$host_exeext
9384 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5408ac6c
HPN
9385 in_tree_gas_is_elf=no
9386 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
9387 || (grep 'obj_format = multi' ../gas/Makefile \
9388 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
9389 then
9390 in_tree_gas_is_elf=yes
9391 fi
981d4858 9392fi
9e423e6d 9393
534d0cc0 9394if test "x$gcc_cv_as" = x; then
779243f7
JL
9395 # Search the same directories that the installed compiler will
9396 # search. Else we may find the wrong assembler and lose. If we
9397 # do not find a suitable assembler binary, then try the user's
9398 # path.
9399 #
9400 # Also note we have to check MD_EXEC_PREFIX before checking the
9401 # user's path. Unfortunately, there is no good way to get at the
9402 # value of MD_EXEC_PREFIX here. So we do a brute force search
9403 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9404 # to be fixed as part of the make/configure rewrite too.
9405
9406 if test "x$exec_prefix" = xNONE; then
9407 if test "x$prefix" = xNONE; then
9408 test_prefix=/usr/local
9409 else
9410 test_prefix=$prefix
9411 fi
9412 else
9413 test_prefix=$exec_prefix
9414 fi
9415
9416 # If the loop below does not find an assembler, then use whatever
9417 # one we can find in the users's path.
9418 # user's path.
55a2ea2a
AM
9419 if test "x$program_prefix" != xNONE; then
9420 gcc_cv_as=${program_prefix}as$host_exeext
9421 else
9422 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
9423 fi
9424
caa55b1e
NN
9425 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9426 $test_prefix/lib/gcc-lib/$target_noncanonical \
9427 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9428 /usr/lib/gcc/$target_noncanonical \
9429 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9430 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9431
9432 if test x$host = x$target; then
9433 test_dirs="$test_dirs \
779243f7
JL
9434 /usr/libexec \
9435 /usr/ccs/gcc \
9436 /usr/ccs/bin \
9437 /udk/usr/ccs/bin \
9438 /bsd43/usr/lib/cmplrs/cc \
9439 /usr/cross64/usr/bin \
9440 /usr/lib/cmplrs/cc \
9441 /sysv/usr/lib/cmplrs/cc \
9442 /svr4/usr/lib/cmplrs/cc \
9443 /usr/bin"
55a2ea2a 9444 fi
779243f7
JL
9445
9446 for dir in $test_dirs; do
55a2ea2a 9447 if test -x $dir/as$host_exeext; then
779243f7
JL
9448 gcc_cv_as=$dir/as$host_exeext
9449 break;
9450 fi
9451 done
9e423e6d 9452fi
34a86c2b
NN
9453case $in_tree_gas in
9454 yes)
ba479fd2
NN
9455 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
9456echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
9457 ;;
9458 no)
ba479fd2
NN
9459 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
9460echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
9461 ;;
9462esac
981d4858 9463
d869a8c4
NN
9464# Identify the linker which will work hand-in-glove with the newly
9465# built GCC, so that we can examine its features. This is the linker
9466# which will be driven by the driver program.
9467#
9468# If build != host, and we aren't building gas in-tree, we identify a
9469# build->target linker and hope that it will have the same features
9470# as the host->target linker we'll be using.
ba479fd2
NN
9471echo "$as_me:$LINENO: checking what linker to use" >&5
9472echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 9473in_tree_ld=no
275b60d6
JJ
9474gcc_cv_ld=
9475gcc_cv_gld_major_version=
9476gcc_cv_gld_minor_version=
9477gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
9478gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9479if test -x "$DEFAULT_LINKER"; then
9480 gcc_cv_ld="$DEFAULT_LINKER"
9481elif test -x "$LD"; then
9482 gcc_cv_ld="$LD"
f9c1196a 9483elif test -x collect-ld$host_exeext; then
275b60d6 9484 # Build using linker in the current directory.
f9c1196a 9485 gcc_cv_ld=./collect-ld$host_exeext
34a86c2b
NN
9486elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
9487 && test -f ../ld/Makefile; then
275b60d6 9488 # Single tree build which includes ld.
34a86c2b 9489 in_tree_ld=yes
5408ac6c
HPN
9490 in_tree_ld_is_elf=no
9491 if (grep 'EMUL = .*elf' ../ld/Makefile \
9492 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
9493 in_tree_ld_is_elf=yes
9494 fi
275b60d6
JJ
9495 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
9496 do
9497 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9498 if test x$gcc_cv_gld_version != x; then
9499 break
9500 fi
9501 done
9502 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
9503 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f9c1196a
ZW
9504 rm -f collect-ld$host_exeext
9505 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
9506 2>/dev/null
275b60d6
JJ
9507fi
9508
534d0cc0 9509if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
9510 # Search the same directories that the installed compiler will
9511 # search. Else we may find the wrong linker and lose. If we
9512 # do not find a suitable linker binary, then try the user's
9513 # path.
9514 #
9515 # Also note we have to check MD_EXEC_PREFIX before checking the
9516 # user's path. Unfortunately, there is no good way to get at the
9517 # value of MD_EXEC_PREFIX here. So we do a brute force search
9518 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9519 # to be fixed as part of the make/configure rewrite too.
9520
9521 if test "x$exec_prefix" = xNONE; then
9522 if test "x$prefix" = xNONE; then
9523 test_prefix=/usr/local
9524 else
9525 test_prefix=$prefix
9526 fi
9527 else
9528 test_prefix=$exec_prefix
9529 fi
9530
9531 # If the loop below does not find an linker, then use whatever
9532 # one we can find in the users's path.
9533 # user's path.
55a2ea2a
AM
9534 if test "x$program_prefix" != xNONE; then
9535 gcc_cv_ld=${program_prefix}ld$host_exeext
9536 else
9537 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
9538 fi
9539
caa55b1e
NN
9540 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9541 $test_prefix/lib/gcc-lib/$target_noncanonical \
9542 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9543 /usr/lib/gcc/$target_noncanonical \
9544 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9545 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9546
9547 if test x$host = x$target; then
9548 test_dirs="$test_dirs \
275b60d6
JJ
9549 /usr/libexec \
9550 /usr/ccs/gcc \
9551 /usr/ccs/bin \
9552 /udk/usr/ccs/bin \
9553 /bsd43/usr/lib/cmplrs/cc \
9554 /usr/cross64/usr/bin \
9555 /usr/lib/cmplrs/cc \
9556 /sysv/usr/lib/cmplrs/cc \
9557 /svr4/usr/lib/cmplrs/cc \
9558 /usr/bin"
55a2ea2a 9559 fi
275b60d6
JJ
9560
9561 for dir in $test_dirs; do
55a2ea2a 9562 if test -x $dir/ld$host_exeext; then
275b60d6
JJ
9563 gcc_cv_ld=$dir/ld$host_exeext
9564 break;
9565 fi
9566 done
9567fi
34a86c2b
NN
9568case $in_tree_ld in
9569 yes)
ba479fd2
NN
9570 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
9571echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
9572 ;;
9573 no)
ba479fd2
NN
9574 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
9575echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
9576 ;;
9577esac
275b60d6 9578
981d4858 9579# Figure out what nm we will be using.
f9c1196a 9580gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
9581echo "$as_me:$LINENO: checking what nm to use" >&5
9582echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 9583in_tree_nm=no
981d4858
JM
9584if test -x nm$host_exeext; then
9585 gcc_cv_nm=./nm$host_exeext
f9c1196a
ZW
9586elif test -f $gcc_cv_binutils_srcdir/configure.in \
9587 && test -f ../binutils/Makefile; then
9588 # Single tree build which includes binutils.
9589 in_tree_nm=yes
9590 gcc_cv_nm=./nm$host_exeext
9591 rm -f nm$host_exeext
9592 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
534d0cc0
AM
9593elif test "x$program_prefix" != xNONE; then
9594 gcc_cv_nm=${program_prefix}nm$host_exeext
9595else
9596 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
981d4858 9597fi
f9c1196a 9598case $in_tree_nm in
ba479fd2
NN
9599 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
9600echo "${ECHO_T}\"newly built nm\"" >&6 ;;
9601 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
9602echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 9603esac
981d4858 9604
3cae5780 9605# Figure out what objdump we will be using.
ba479fd2
NN
9606echo "$as_me:$LINENO: checking what objdump to use" >&5
9607echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 9608in_tree_objdump=no
3cae5780
AS
9609if test -x objdump$host_exeext; then
9610 gcc_cv_objdump=./objdump$host_exeext
f9c1196a
ZW
9611elif test -f $gcc_cv_binutils_srcdir/configure.in \
9612 && test -f ../binutils/Makefile; then
9613 # Single tree build which includes binutils.
9614 in_tree_objdump=yes
9615 gcc_cv_objdump=./objdump$host_exeext
9616 rm -f objdump$host_exeext
9617 $symbolic_link ../binutils/objdump$host_exeext \
9618 objdump$host_exeext 2>/dev/null
534d0cc0
AM
9619elif test "x$program_prefix" != xNONE; then
9620 gcc_cv_objdump=${program_prefix}objdump$host_exeext
9621else
f9c1196a
ZW
9622 gcc_cv_objdump=`echo objdump | \
9623 sed ${program_transform_name}`$host_exeext
3cae5780 9624fi
f9c1196a 9625case $in_tree_objdump in
ba479fd2
NN
9626 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
9627echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
9628 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
9629echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 9630esac
3cae5780 9631
981d4858 9632# Figure out what assembler alignment features are present.
ba479fd2
NN
9633echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
9634echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
9635if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
9636 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9637else
9638 gcc_cv_as_balign_and_p2align=no
9639 if test $in_tree_gas = yes; then
9640 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
9641 then gcc_cv_as_balign_and_p2align=yes
9642fi
9643 elif test x$gcc_cv_as != x; then
6e3f3080 9644 echo '.balign 4
8ada417f 9645.p2align 2' > conftest.s
ba479fd2
NN
9646 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9648 (eval $ac_try) 2>&5
9649 ac_status=$?
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); }; }
8ada417f
ZW
9652 then
9653 gcc_cv_as_balign_and_p2align=yes
9654 else
9655 echo "configure: failed program was" >&5
9656 cat conftest.s >&5
9657 fi
9658 rm -f conftest.o conftest.s
9659 fi
9660fi
ba479fd2
NN
9661echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
9662echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 9663if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
9664
9665cat >>confdefs.h <<\_ACEOF
981d4858 9666#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 9667_ACEOF
981d4858 9668
ad9c4d9f
NN
9669fi
9670
ba479fd2
NN
9671echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
9672echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
9673if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9675else
9676 gcc_cv_as_max_skip_p2align=no
9677 if test $in_tree_gas = yes; then
9678 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
9679 then gcc_cv_as_max_skip_p2align=yes
9680fi
9681 elif test x$gcc_cv_as != x; then
6e3f3080 9682 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
9683 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9685 (eval $ac_try) 2>&5
9686 ac_status=$?
9687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9688 (exit $ac_status); }; }
8ada417f
ZW
9689 then
9690 gcc_cv_as_max_skip_p2align=yes
9691 else
9692 echo "configure: failed program was" >&5
9693 cat conftest.s >&5
9694 fi
9695 rm -f conftest.o conftest.s
9696 fi
ad9c4d9f 9697fi
ba479fd2
NN
9698echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
9699echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 9700if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
9701
9702cat >>confdefs.h <<\_ACEOF
9e423e6d 9703#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 9704_ACEOF
9e423e6d 9705
9e423e6d 9706fi
ad9c4d9f 9707
ba479fd2
NN
9708echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
9709echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
9710if test "${gcc_cv_as_subsection_m1+set}" = set; then
9711 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9712else
9713 gcc_cv_as_subsection_m1=no
9714 if test $in_tree_gas = yes; then
9715 if test $in_tree_gas_is_elf = yes \
9716 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
9717 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 9718fi
8ada417f 9719 elif test x$gcc_cv_as != x; then
6e3f3080 9720 echo 'conftest_label1: .word 0
d1accaa3
JJ
9721.subsection -1
9722conftest_label2: .word 0
8ada417f 9723.previous' > conftest.s
ba479fd2
NN
9724 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726 (eval $ac_try) 2>&5
9727 ac_status=$?
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }
8ada417f
ZW
9730 then
9731 if test x$gcc_cv_nm != x; then
9732 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
9733 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
9734 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
9735 then :
9736 else gcc_cv_as_subsection_m1=yes
9737 fi
9738 rm -f conftest.nm1 conftest.nm2
9739 fi
9740 else
9741 echo "configure: failed program was" >&5
9742 cat conftest.s >&5
9743 fi
9744 rm -f conftest.o conftest.s
9745 fi
981d4858 9746fi
ba479fd2
NN
9747echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
9748echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 9749if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
9750
9751cat >>confdefs.h <<\_ACEOF
981d4858 9752#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 9753_ACEOF
981d4858 9754
d1accaa3 9755fi
ad9c4d9f 9756
ba479fd2
NN
9757echo "$as_me:$LINENO: checking assembler for .weak" >&5
9758echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
9759if test "${gcc_cv_as_weak+set}" = set; then
9760 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9761else
9762 gcc_cv_as_weak=no
9763 if test $in_tree_gas = yes; then
9764 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
9765 then gcc_cv_as_weak=yes
ad9c4d9f 9766fi
8ada417f 9767 elif test x$gcc_cv_as != x; then
6e3f3080 9768 echo ' .weak foobar' > conftest.s
ba479fd2
NN
9769 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9771 (eval $ac_try) 2>&5
9772 ac_status=$?
9773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9774 (exit $ac_status); }; }
8ada417f
ZW
9775 then
9776 gcc_cv_as_weak=yes
9777 else
9778 echo "configure: failed program was" >&5
9779 cat conftest.s >&5
9780 fi
9781 rm -f conftest.o conftest.s
9782 fi
981d4858 9783fi
ba479fd2
NN
9784echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
9785echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 9786if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
9787
9788cat >>confdefs.h <<\_ACEOF
981d4858 9789#define HAVE_GAS_WEAK 1
ba479fd2 9790_ACEOF
981d4858 9791
12822146 9792fi
ad9c4d9f 9793
8ada417f
ZW
9794# .hidden needs to be supported in both the assembler and the linker,
9795# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
9796# This is irritatingly difficult to feature test for; we have to check the
9797# date string after the version number. If we've got an in-tree
9798# ld, we don't know its patchlevel version, so we set the baseline at 2.13
9799# to be safe.
9800# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
9801echo "$as_me:$LINENO: checking assembler for .hidden" >&5
9802echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
9803if test "${gcc_cv_as_hidden+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9805else
9806 gcc_cv_as_hidden=no
9807 if test $in_tree_gas = yes; then
9808 if test $in_tree_gas_is_elf = yes \
9809 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
9810 then gcc_cv_as_hidden=yes
9811fi
9812 elif test x$gcc_cv_as != x; then
6e3f3080 9813 echo ' .hidden foobar
8ada417f 9814foobar:' > conftest.s
ba479fd2
NN
9815 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9817 (eval $ac_try) 2>&5
9818 ac_status=$?
9819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820 (exit $ac_status); }; }
8ada417f
ZW
9821 then
9822 gcc_cv_as_hidden=yes
9823 else
9824 echo "configure: failed program was" >&5
9825 cat conftest.s >&5
9826 fi
9827 rm -f conftest.o conftest.s
9828 fi
9829fi
ba479fd2
NN
9830echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
9831echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 9832
ad9c4d9f 9833
ba479fd2
NN
9834echo "$as_me:$LINENO: checking linker for .hidden support" >&5
9835echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
9836if test "${gcc_cv_ld_hidden+set}" = set; then
9837 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9838else
9839 if test $in_tree_ld = yes ; then
9840 gcc_cv_ld_hidden=no
9841 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 \
9842 && test $in_tree_ld_is_elf = yes; then
9843 gcc_cv_ld_hidden=yes
9844 fi
9845else
9846 gcc_cv_ld_hidden=yes
bace148a 9847 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
9848 if echo "$ld_ver" | grep GNU > /dev/null; then
9849 ld_vers=`echo $ld_ver | sed -n \
9850 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9851 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9852 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9853 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9854 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9855 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
9856 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'`
9857 if test 0"$ld_date" -lt 20020404; then
9858 if test -n "$ld_date"; then
9859 # If there was date string, but was earlier than 2002-04-04, fail
9860 gcc_cv_ld_hidden=no
9861 elif test -z "$ld_vers"; then
9862 # If there was no date string nor ld version number, something is wrong
9863 gcc_cv_ld_hidden=no
9864 else
9865 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
9866 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
9867 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9868 test -z "$ld_vers_patch" && ld_vers_patch=0
9869 if test "$ld_vers_major" -lt 2; then
9870 gcc_cv_ld_hidden=no
9871 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
9872 gcc_cv_ld_hidden="no"
9873 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
9874 gcc_cv_ld_hidden=no
c72931a6 9875 fi
8ada417f 9876 fi
789b7de5 9877 fi
8ada417f 9878 else
28690784 9879 case "${target}" in
b0fd7d27 9880 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
9881 gcc_cv_ld_hidden=yes
9882 ;;
9883 *)
9884 gcc_cv_ld_hidden=no
9885 ;;
9886 esac
8ada417f
ZW
9887 fi
9888fi
6d07784a 9889fi
ba479fd2
NN
9890echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
9891echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 9892libgcc_visibility=no
ad9c4d9f 9893
8e3940b2 9894if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 9895 libgcc_visibility=yes
ba479fd2
NN
9896
9897cat >>confdefs.h <<\_ACEOF
8ada417f 9898#define HAVE_GAS_HIDDEN 1
ba479fd2 9899_ACEOF
ad9c4d9f
NN
9900
9901fi
9902
8ada417f 9903# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
9904echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
9905echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
9906if test "${gcc_cv_as_leb128+set}" = set; then
9907 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9908else
9909 gcc_cv_as_leb128=no
9910 if test $in_tree_gas = yes; then
9911 if test $in_tree_gas_is_elf = yes \
9912 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
9913 then gcc_cv_as_leb128=yes
9914fi
9915 elif test x$gcc_cv_as != x; then
6e3f3080 9916 echo ' .data
b7460f24
RH
9917 .uleb128 L2 - L1
9918L1:
9919 .uleb128 1280
9920 .sleb128 -1010
8ada417f 9921L2:' > conftest.s
ba479fd2
NN
9922 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9924 (eval $ac_try) 2>&5
9925 ac_status=$?
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); }; }
8ada417f
ZW
9928 then
9929 # GAS versions before 2.11 do not support uleb128,
9930 # despite appearing to.
9931 # ??? There exists an elf-specific test that will crash
9932 # the assembler. Perhaps it's better to figure out whether
9933 # arbitrary sections are supported and try the test.
bace148a 9934 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
9935 if echo "$as_ver" | grep GNU > /dev/null; then
9936 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
9937 as_major=`echo $as_ver | sed 's/\..*//'`
9938 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
9939 if test $as_major -eq 2 && test $as_minor -lt 11
9940 then :
9941 else gcc_cv_as_leb128=yes
9942 fi
9943 fi
9944 else
9945 echo "configure: failed program was" >&5
9946 cat conftest.s >&5
9947 fi
9948 rm -f conftest.o conftest.s
9949 fi
b7460f24 9950fi
ba479fd2
NN
9951echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
9952echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 9953if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
9954
9955cat >>confdefs.h <<\_ACEOF
b7460f24 9956#define HAVE_AS_LEB128 1
ba479fd2 9957_ACEOF
b7460f24
RH
9958
9959fi
ad9c4d9f 9960
8ada417f
ZW
9961# GAS versions up to and including 2.11.0 may mis-optimize
9962# .eh_frame data.
ba479fd2
NN
9963echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
9964echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
9965if test "${gcc_cv_as_eh_frame+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9967else
9968 gcc_cv_as_eh_frame=no
9969 if test $in_tree_gas = yes; then
9970 if test $in_tree_gas_is_elf = yes \
9971 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
9972 then gcc_cv_as_eh_frame=yes
ad9c4d9f 9973fi
8ada417f 9974 elif test x$gcc_cv_as != x; then
6e3f3080 9975 echo ' .text
c64688ae
RH
9976.LFB1:
9977 .4byte 0
9978.L1:
9979 .4byte 0
9980.LFE1:
9981 .section .eh_frame,"aw",@progbits
9982__FRAME_BEGIN__:
9983 .4byte .LECIE1-.LSCIE1
9984.LSCIE1:
9985 .4byte 0x0
9986 .byte 0x1
9987 .ascii "z\0"
9988 .byte 0x1
9989 .byte 0x78
9990 .byte 0x1a
9991 .byte 0x0
9992 .byte 0x4
9993 .4byte 1
9994 .p2align 1
9995.LECIE1:
9996.LSFDE1:
9997 .4byte .LEFDE1-.LASFDE1
9998.LASFDE1:
9999 .4byte .LASFDE1-__FRAME_BEGIN__
10000 .4byte .LFB1
10001 .4byte .LFE1-.LFB1
10002 .byte 0x4
10003 .4byte .LFE1-.LFB1
10004 .byte 0x4
10005 .4byte .L1-.LFB1
8ada417f 10006.LEFDE1:' > conftest.s
ba479fd2
NN
10007 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009 (eval $ac_try) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); }; }
8ada417f
ZW
10013 then
10014 cat > conftest.lit <<EOF
c64688ae
RH
10015 0000 10000000 00000000 017a0001 781a0004 .........z..x...
10016 0010 01000000 12000000 18000000 00000000 ................
093e61a6 10017 0020 08000000 04080000 0044 .........D
01efb963 10018EOF
ba479fd2 10019cat > conftest.big <<EOF
01efb963
AS
10020 0000 00000010 00000000 017a0001 781a0004 .........z..x...
10021 0010 00000001 00000012 00000018 00000000 ................
093e61a6 10022 0020 00000008 04000000 0844 .........D
c64688ae 10023EOF
8ada417f
ZW
10024 # If the assembler didn't choke, and we can objdump,
10025 # and we got the correct data, then succeed.
10026 if test x$gcc_cv_objdump != x \
10027 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
10028 | tail -3 > conftest.got \
10029 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
10030 || cmp conftest.big conftest.got > /dev/null 2>&1; }
10031 then
10032 gcc_cv_as_eh_frame=yes
ba479fd2
NN
10033 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
10034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10035 (eval $ac_try) 2>&5
10036 ac_status=$?
10037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10038 (exit $ac_status); }; }; then
8ada417f
ZW
10039 gcc_cv_as_eh_frame=buggy
10040 else
10041 # Uh oh, what do we do now?
10042 gcc_cv_as_eh_frame=no
10043 fi
10044 else
10045 echo "configure: failed program was" >&5
10046 cat conftest.s >&5
10047 fi
10048 rm -f conftest.o conftest.s
10049 fi
c64688ae 10050fi
ba479fd2
NN
10051echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
10052echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 10053
6e3f3080 10054
63cf211a 10055if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
10056
10057cat >>confdefs.h <<\_ACEOF
8ada417f 10058#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 10059_ACEOF
ad9c4d9f
NN
10060
10061fi
10062
ba479fd2
NN
10063echo "$as_me:$LINENO: checking assembler for section merging support" >&5
10064echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
10065if test "${gcc_cv_as_shf_merge+set}" = set; then
10066 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10067else
10068 gcc_cv_as_shf_merge=no
10069 if test $in_tree_gas = yes; then
10070 if test $in_tree_gas_is_elf = yes \
10071 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10072 then gcc_cv_as_shf_merge=yes
10073fi
10074 elif test x$gcc_cv_as != x; then
6e3f3080 10075 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
10076 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
10077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10078 (eval $ac_try) 2>&5
10079 ac_status=$?
10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081 (exit $ac_status); }; }
8ada417f
ZW
10082 then
10083 gcc_cv_as_shf_merge=yes
10084 else
10085 echo "configure: failed program was" >&5
10086 cat conftest.s >&5
10087 fi
10088 rm -f conftest.o conftest.s
10089 fi
201556f0 10090fi
ba479fd2
NN
10091echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
10092echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 10093
8ad9fb33 10094
ba479fd2 10095cat >>confdefs.h <<_ACEOF
8ad9fb33 10096#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 10097_ACEOF
201556f0 10098
201556f0 10099
8ada417f 10100# Thread-local storage - the check is heavily parametrized.
f996902d
RH
10101conftest_s=
10102tls_first_major=
10103tls_first_minor=
9739c90c 10104tls_as_opt=
f996902d 10105case "$target" in
6f9b006d
RH
10106 alpha*-*-*)
10107 conftest_s='
10108 .section ".tdata","awT",@progbits
10109foo: .long 25
10110 .text
10111 ldq $27,__tls_get_addr($29) !literal!1
10112 lda $16,foo($29) !tlsgd!1
10113 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
10114 ldq $27,__tls_get_addr($29) !literal!2
10115 lda $16,foo($29) !tlsldm!2
10116 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
10117 ldq $1,foo($29) !gotdtprel
10118 ldah $2,foo($29) !dtprelhi
10119 lda $3,foo($2) !dtprello
10120 lda $4,foo($29) !dtprel
10121 ldq $1,foo($29) !gottprel
10122 ldah $2,foo($29) !tprelhi
10123 lda $3,foo($2) !tprello
10124 lda $4,foo($29) !tprel'
10125 tls_first_major=2
10126 tls_first_minor=13
10127 ;;
f996902d
RH
10128 i[34567]86-*-*)
10129 conftest_s='
10130 .section ".tdata","awT",@progbits
10131foo: .long 25
10132 .text
10133 movl %gs:0, %eax
10134 leal foo@TLSGD(,%ebx,1), %eax
10135 leal foo@TLSLDM(%ebx), %eax
10136 leal foo@DTPOFF(%eax), %edx
10137 movl foo@GOTTPOFF(%ebx), %eax
10138 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
10139 addl foo@GOTNTPOFF(%ebx), %eax
10140 movl foo@INDNTPOFF, %eax
f996902d
RH
10141 movl $foo@TPOFF, %eax
10142 subl $foo@TPOFF, %eax
10143 leal foo@NTPOFF(%ecx), %eax'
10144 tls_first_major=2
75d38379
JJ
10145 tls_first_minor=14
10146 ;;
10147 x86_64-*-*)
10148 conftest_s='
10149 .section ".tdata","awT",@progbits
10150foo: .long 25
10151 .text
10152 movq %fs:0, %rax
10153 leaq foo@TLSGD(%rip), %rdi
10154 leaq foo@TLSLD(%rip), %rdi
10155 leaq foo@DTPOFF(%rax), %rdx
10156 movq foo@GOTTPOFF(%rip), %rax
10157 movq $foo@TPOFF, %rax'
10158 tls_first_major=2
10159 tls_first_minor=14
f996902d 10160 ;;
7b6e506e
RH
10161 ia64-*-*)
10162 conftest_s='
10163 .section ".tdata","awT",@progbits
10164foo: data8 25
10165 .text
10166 addl r16 = @ltoff(@dtpmod(foo#)), gp
10167 addl r17 = @ltoff(@dtprel(foo#)), gp
10168 addl r18 = @ltoff(@tprel(foo#)), gp
10169 addl r19 = @dtprel(foo#), gp
10170 adds r21 = @dtprel(foo#), r13
10171 movl r23 = @dtprel(foo#)
10172 addl r20 = @tprel(foo#), gp
10173 adds r22 = @tprel(foo#), r13
10174 movl r24 = @tprel(foo#)'
10175 tls_first_major=2
10176 tls_first_minor=13
10177 ;;
c4501e62
JJ
10178 powerpc-*-*)
10179 conftest_s='
10180 .section ".tdata","awT",@progbits
10181 .align 2
10182ld0: .space 4
10183ld1: .space 4
10184x1: .space 4
10185x2: .space 4
10186x3: .space 4
10187 .text
10188 addi 3,31,ld0@got@tlsgd
10189 bl __tls_get_addr
10190 addi 3,31,x1@got@tlsld
10191 bl __tls_get_addr
10192 addi 9,3,x1@dtprel
10193 addis 9,3,x2@dtprel@ha
10194 addi 9,9,x2@dtprel@l
10195 lwz 9,x3@got@tprel(31)
10196 add 9,9,x@tls
10197 addi 9,2,x1@tprel
10198 addis 9,2,x2@tprel@ha
10199 addi 9,9,x2@tprel@l'
10200 tls_first_major=2
10201 tls_first_minor=14
9739c90c 10202 tls_as_opt=-a32
c4501e62
JJ
10203 ;;
10204 powerpc64-*-*)
10205 conftest_s='
10206 .section ".tdata","awT",@progbits
10207 .align 3
10208ld0: .space 8
10209ld1: .space 8
10210x1: .space 8
10211x2: .space 8
10212x3: .space 8
10213 .text
10214 addi 3,2,ld0@got@tlsgd
10215 bl .__tls_get_addr
10216 nop
10217 addi 3,2,ld1@toc
10218 bl .__tls_get_addr
10219 nop
10220 addi 3,2,x1@got@tlsld
10221 bl .__tls_get_addr
10222 nop
10223 addi 9,3,x1@dtprel
10224 bl .__tls_get_addr
10225 nop
10226 addis 9,3,x2@dtprel@ha
10227 addi 9,9,x2@dtprel@l
10228 bl .__tls_get_addr
10229 nop
10230 ld 9,x3@got@dtprel(2)
10231 add 9,9,3
10232 bl .__tls_get_addr
10233 nop'
10234 tls_first_major=2
10235 tls_first_minor=14
9739c90c 10236 tls_as_opt=-a64
c4501e62 10237 ;;
fd3cd001
UW
10238 s390-*-*)
10239 conftest_s='
10240 .section ".tdata","awT",@progbits
10241foo: .long 25
10242 .text
10243 .long foo@TLSGD
10244 .long foo@TLSLDM
10245 .long foo@DTPOFF
10246 .long foo@NTPOFF
10247 .long foo@GOTNTPOFF
10248 .long foo@INDNTPOFF
10249 l %r1,foo@GOTNTPOFF(%r12)
10250 l %r1,0(%r1):tls_load:foo
10251 bas %r14,0(%r1,%r13):tls_gdcall:foo
10252 bas %r14,0(%r1,%r13):tls_ldcall:foo'
10253 tls_first_major=2
10254 tls_first_minor=14
9739c90c 10255 tls_as_opt=-m31
fd3cd001
UW
10256 ;;
10257 s390x-*-*)
10258 conftest_s='
10259 .section ".tdata","awT",@progbits
10260foo: .long 25
10261 .text
10262 .quad foo@TLSGD
10263 .quad foo@TLSLDM
10264 .quad foo@DTPOFF
10265 .quad foo@NTPOFF
10266 .quad foo@GOTNTPOFF
10267 lg %r1,foo@GOTNTPOFF(%r12)
10268 larl %r1,foo@INDNTPOFF
10269 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
10270 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
10271 tls_first_major=2
10272 tls_first_minor=14
9739c90c 10273 tls_as_opt="-m64 -Aesame"
fd3cd001 10274 ;;
9ff13962
KK
10275 sh-*-* | sh[34]-*-*)
10276 conftest_s='
10277 .section ".tdata","awT",@progbits
10278foo: .long 25
10279 .text
10280 .long foo@TLSGD
10281 .long foo@TLSLDM
10282 .long foo@DTPOFF
10283 .long foo@GOTTPOFF
10284 .long foo@TPOFF'
10285 tls_first_major=2
10286 tls_first_minor=13
10287 ;;
5751a10b
JJ
10288 sparc*-*-*)
10289 conftest_s='
10290 .section ".tdata","awT",@progbits
10291foo: .long 25
10292 .text
10293 sethi %tgd_hi22(foo), %o0
10294 add %o0, %tgd_lo10(foo), %o1
10295 add %l7, %o1, %o0, %tgd_add(foo)
10296 call __tls_get_addr, %tgd_call(foo)
10297 sethi %tldm_hi22(foo), %l1
10298 add %l1, %tldm_lo10(foo), %l2
10299 add %l7, %l2, %o0, %tldm_add(foo)
10300 call __tls_get_addr, %tldm_call(foo)
10301 sethi %tldo_hix22(foo), %l3
10302 xor %l3, %tldo_lox10(foo), %l4
10303 add %o0, %l4, %l5, %tldo_add(foo)
10304 sethi %tie_hi22(foo), %o3
10305 add %o3, %tie_lo10(foo), %o3
10306 ld [%l7 + %o3], %o2, %tie_ld(foo)
10307 add %g7, %o2, %o4, %tie_add(foo)
10308 sethi %tle_hix22(foo), %l1
10309 xor %l1, %tle_lox10(foo), %o5
10310 ld [%g7 + %o5], %o1'
10311 tls_first_major=2
10312 tls_first_minor=14
10313 tls_as_opt=-32
10314 ;;
f996902d
RH
10315esac
10316if test -z "$tls_first_major"; then
8ada417f
ZW
10317 : # If we don't have a check, assume no support.
10318else
ba479fd2
NN
10319 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
10320echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
10321if test "${gcc_cv_as_tls+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10323else
10324 gcc_cv_as_tls=no
10325 if test $in_tree_gas = yes; then
10326 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
10327 then gcc_cv_as_tls=yes
ad9c4d9f 10328fi
8ada417f 10329 elif test x$gcc_cv_as != x; then
6e3f3080 10330 echo "$conftest_s" > conftest.s
ba479fd2
NN
10331 if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'
10332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10333 (eval $ac_try) 2>&5
10334 ac_status=$?
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); }; }
8ada417f
ZW
10337 then
10338 gcc_cv_as_tls=yes
10339 else
10340 echo "configure: failed program was" >&5
10341 cat conftest.s >&5
10342 fi
10343 rm -f conftest.o conftest.s
f996902d 10344 fi
f996902d 10345fi
ba479fd2
NN
10346echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
10347echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 10348if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
10349
10350cat >>confdefs.h <<\_ACEOF
f996902d 10351#define HAVE_AS_TLS 1
ba479fd2 10352_ACEOF
f996902d
RH
10353
10354fi
8ada417f
ZW
10355fi
10356
10357# Target-specific assembler checks.
f996902d 10358
3a37b08e
RH
10359case "$target" in
10360 # All TARGET_ABI_OSF targets.
10361 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
10362 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10363echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10364if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 10366else
8ada417f
ZW
10367 gcc_cv_as_alpha_explicit_relocs=no
10368 if test $in_tree_gas = yes; then
10369 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10370 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 10371fi
8ada417f 10372 elif test x$gcc_cv_as != x; then
6e3f3080 10373 echo ' .set nomacro
3a37b08e
RH
10374 .text
10375 extbl $3, $2, $3 !lituse_bytoff!1
10376 ldq $2, a($29) !literal!1
10377 ldq $4, b($29) !literal!2
10378 ldq_u $3, 0($2) !lituse_base!1
10379 ldq $27, f($29) !literal!5
10380 jsr $26, ($27), f !lituse_jsr!5
10381 ldah $29, 0($26) !gpdisp!3
10382 lda $0, c($29) !gprel
10383 ldah $1, d($29) !gprelhigh
10384 lda $1, d($1) !gprellow
8ada417f 10385 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
10386 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10388 (eval $ac_try) 2>&5
10389 ac_status=$?
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); }; }
8ada417f
ZW
10392 then
10393 gcc_cv_as_alpha_explicit_relocs=yes
10394 else
10395 echo "configure: failed program was" >&5
10396 cat conftest.s >&5
10397 fi
10398 rm -f conftest.o conftest.s
10399 fi
cafe096b 10400fi
ba479fd2
NN
10401echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
10402echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 10403if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
10404
10405cat >>confdefs.h <<\_ACEOF
3a37b08e 10406#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 10407_ACEOF
3a37b08e 10408
8ada417f 10409fi
3a37b08e 10410 ;;
8ada417f 10411
1cb36a98 10412 sparc*-*-*)
ba479fd2
NN
10413 echo "$as_me:$LINENO: checking assembler for .register" >&5
10414echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
10415if test "${gcc_cv_as_sparc_register_op+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10417else
8ada417f
ZW
10418 gcc_cv_as_sparc_register_op=no
10419 if test x$gcc_cv_as != x; then
6e3f3080 10420 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
10421 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10423 (eval $ac_try) 2>&5
10424 ac_status=$?
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); }; }
8ada417f
ZW
10427 then
10428 gcc_cv_as_sparc_register_op=yes
10429 else
10430 echo "configure: failed program was" >&5
10431 cat conftest.s >&5
10432 fi
10433 rm -f conftest.o conftest.s
10434 fi
cafe096b 10435fi
ba479fd2
NN
10436echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
10437echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 10438if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
10439
10440cat >>confdefs.h <<\_ACEOF
1cb36a98 10441#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 10442_ACEOF
1cb36a98 10443
8ada417f 10444fi
1cb36a98 10445
ba479fd2
NN
10446 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
10447echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
10448if test "${gcc_cv_as_sparc_relax+set}" = set; then
10449 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 10450else
8ada417f
ZW
10451 gcc_cv_as_sparc_relax=no
10452 if test x$gcc_cv_as != x; then
6e3f3080 10453 echo '.text' > conftest.s
ba479fd2
NN
10454 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
10455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); }; }
8ada417f
ZW
10460 then
10461 gcc_cv_as_sparc_relax=yes
10462 else
10463 echo "configure: failed program was" >&5
10464 cat conftest.s >&5
10465 fi
10466 rm -f conftest.o conftest.s
10467 fi
cafe096b 10468fi
ba479fd2
NN
10469echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
10470echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 10471if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
10472
10473cat >>confdefs.h <<\_ACEOF
e95b1e6a 10474#define HAVE_AS_RELAX_OPTION 1
ba479fd2 10475_ACEOF
e95b1e6a 10476
8ada417f 10477fi
e95b1e6a 10478
ba479fd2
NN
10479 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
10480echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
10481if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
10482 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 10483else
8ada417f
ZW
10484 gcc_cv_as_sparc_ua_pcrel=no
10485 if test x$gcc_cv_as != x; then
6e3f3080 10486 echo '.text
8ada417f
ZW
10487foo:
10488 nop
10489.data
10490.align 4
10491.byte 0
10492.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
10493 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10495 (eval $ac_try) 2>&5
10496 ac_status=$?
10497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498 (exit $ac_status); }; }
8ada417f
ZW
10499 then
10500 if test x$gcc_cv_ld != x \
10501 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
10502 gcc_cv_as_sparc_ua_pcrel=yes
10503 fi
10504 rm -f conftest
10505 else
10506 echo "configure: failed program was" >&5
10507 cat conftest.s >&5
10508 fi
10509 rm -f conftest.o conftest.s
10510 fi
cafe096b 10511fi
ba479fd2
NN
10512echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
10513echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 10514if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
10515
10516cat >>confdefs.h <<\_ACEOF
17e9e88c 10517#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 10518_ACEOF
17e9e88c 10519
17e9e88c 10520
ba479fd2
NN
10521 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
10522echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
10523if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
10524 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 10525else
8ada417f
ZW
10526 gcc_cv_as_sparc_ua_pcrel_hidden=no
10527 if test x$gcc_cv_as != x; then
6e3f3080 10528 echo '.data
8ada417f
ZW
10529.align 4
10530.byte 0x31
10531.uaword %r_disp32(foo)
10532.byte 0x32, 0x33, 0x34
10533.global foo
10534.hidden foo
10535foo:
10536.skip 4' > conftest.s
ba479fd2
NN
10537 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10539 (eval $ac_try) 2>&5
10540 ac_status=$?
10541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10542 (exit $ac_status); }; }
8ada417f
ZW
10543 then
10544 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
10545 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
10546 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
10547 | grep ' 31000000 07323334' > /dev/null 2>&1; then
10548 if $gcc_cv_objdump -R conftest 2> /dev/null \
10549 | grep 'DISP32' > /dev/null 2>&1; then
10550 :
10551 else
10552 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 10553 fi
8ada417f
ZW
10554 fi
10555 rm -f conftest
10556 else
10557 echo "configure: failed program was" >&5
10558 cat conftest.s >&5
10559 fi
10560 rm -f conftest.o conftest.s
10561 fi
cafe096b 10562fi
ba479fd2
NN
10563echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
10564echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 10565if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
10566
10567cat >>confdefs.h <<\_ACEOF
cf7b8b0d 10568#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 10569_ACEOF
cf7b8b0d 10570
8ada417f 10571fi
ba479fd2 10572
8ada417f 10573fi # unaligned pcrel relocs
cf7b8b0d 10574
ba479fd2
NN
10575 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
10576echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
10577if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
10578 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10579else
8ada417f
ZW
10580 gcc_cv_as_sparc_offsetable_lo10=no
10581 if test x$gcc_cv_as != x; then
6e3f3080 10582 echo '.text
8ada417f
ZW
10583 or %g1, %lo(ab) + 12, %g1
10584 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
10585 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
10586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10587 (eval $ac_try) 2>&5
10588 ac_status=$?
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); }; }
8ada417f
ZW
10591 then
10592 if test x$gcc_cv_objdump != x \
10593 && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
10594 | grep ' 82106000 82106000' > /dev/null 2>&1; then
10595 gcc_cv_as_offsetable_lo10=yes
10596 fi
10597 else
10598 echo "configure: failed program was" >&5
10599 cat conftest.s >&5
10600 fi
10601 rm -f conftest.o conftest.s
10602 fi
cafe096b 10603fi
ba479fd2
NN
10604echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
10605echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 10606if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
10607
10608cat >>confdefs.h <<\_ACEOF
1cb36a98 10609#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 10610_ACEOF
1cb36a98 10611
8ada417f 10612fi
1cb36a98
RH
10613 ;;
10614
c307e6dd 10615 i[34567]86-*-* | x86_64-*-*)
ba479fd2
NN
10616 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
10617echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
10618if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
10619 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10620else
10621 gcc_cv_as_ix86_filds_fists=no
10622 if test $in_tree_gas = yes; then
10623 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
10624 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 10625fi
8ada417f 10626 elif test x$gcc_cv_as != x; then
6e3f3080 10627 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
10628 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10631 ac_status=$?
10632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10633 (exit $ac_status); }; }
8ada417f
ZW
10634 then
10635 gcc_cv_as_ix86_filds_fists=yes
10636 else
10637 echo "configure: failed program was" >&5
10638 cat conftest.s >&5
981d4858 10639 fi
8ada417f
ZW
10640 rm -f conftest.o conftest.s
10641 fi
10642fi
ba479fd2
NN
10643echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
10644echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 10645if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
10646
10647cat >>confdefs.h <<\_ACEOF
8ada417f 10648#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 10649_ACEOF
ad9c4d9f 10650
f6f5dff2
RO
10651fi
10652
ba479fd2
NN
10653 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
10654echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
10655if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
10656 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
10657else
10658 gcc_cv_as_ix86_cmov_sun_syntax=no
10659 if test x$gcc_cv_as != x; then
6e3f3080 10660 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
10661 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }
f6f5dff2
RO
10667 then
10668 gcc_cv_as_ix86_cmov_sun_syntax=yes
10669 else
10670 echo "configure: failed program was" >&5
10671 cat conftest.s >&5
10672 fi
10673 rm -f conftest.o conftest.s
10674 fi
10675fi
ba479fd2
NN
10676echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
10677echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 10678if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
10679
10680cat >>confdefs.h <<\_ACEOF
f6f5dff2 10681#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 10682_ACEOF
f6f5dff2 10683
ad9c4d9f
NN
10684fi
10685
6f3ca281
ZW
10686 # This one is used unconditionally by i386.[ch]; it is to be defined
10687 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
10688 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
10689echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
10690if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
10691 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10692else
10693 gcc_cv_as_ix86_gotoff_in_data=no
10694 if test $in_tree_gas = yes; then
10695 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10696 then gcc_cv_as_ix86_gotoff_in_data=yes
10697fi
10698 elif test x$gcc_cv_as != x; then
6e3f3080 10699 echo ' .text
f88c65f7
RH
10700.L0:
10701 nop
10702 .data
8ada417f 10703 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
10704 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10706 (eval $ac_try) 2>&5
10707 ac_status=$?
10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10709 (exit $ac_status); }; }
8ada417f
ZW
10710 then
10711 gcc_cv_as_ix86_gotoff_in_data=yes
10712 else
10713 echo "configure: failed program was" >&5
10714 cat conftest.s >&5
f88c65f7 10715 fi
8ada417f
ZW
10716 rm -f conftest.o conftest.s
10717 fi
10718fi
ba479fd2
NN
10719echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
10720echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 10721
6f3ca281 10722
ba479fd2 10723cat >>confdefs.h <<_ACEOF
6f3ca281 10724#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 10725_ACEOF
f88c65f7 10726
1cb36a98 10727 ;;
ef1ecf87
RH
10728
10729 ia64*-*-*)
ba479fd2
NN
10730 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
10731echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
10732if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 10734else
8ada417f
ZW
10735 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
10736 if test $in_tree_gas = yes; then
10737 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10738 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 10739fi
8ada417f 10740 elif test x$gcc_cv_as != x; then
6e3f3080 10741 echo ' .text
ef1ecf87
RH
10742 addl r15 = @ltoffx(x#), gp
10743 ;;
cfa9ee99 10744 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
10745 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747 (eval $ac_try) 2>&5
10748 ac_status=$?
10749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750 (exit $ac_status); }; }
8ada417f 10751 then
cfa9ee99 10752 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
10753 else
10754 echo "configure: failed program was" >&5
10755 cat conftest.s >&5
2c4a9cff 10756 fi
8ada417f
ZW
10757 rm -f conftest.o conftest.s
10758 fi
10759fi
ba479fd2
NN
10760echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
10761echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 10762if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
10763
10764cat >>confdefs.h <<\_ACEOF
cfa9ee99 10765#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 10766_ACEOF
8ada417f 10767
cfa9ee99 10768fi
8ada417f 10769
2c4a9cff 10770 ;;
8ada417f 10771
2c4a9cff 10772 powerpc*-*-*)
8ada417f
ZW
10773 case $target in
10774 *-*-aix) conftest_s=' .csect .textPR';;
10775 *) conftest_s=' .text';;
10776 esac
10777 conftest_s="$conftest_s
10778 mfcr 3,128"
10779
ba479fd2
NN
10780 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
10781echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
10782if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 10784else
8ada417f
ZW
10785 gcc_cv_as_powerpc_mfcrf=no
10786 if test $in_tree_gas = yes; then
10787 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10788 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 10789fi
8ada417f 10790 elif test x$gcc_cv_as != x; then
6e3f3080 10791 echo "$conftest_s" > conftest.s
ba479fd2
NN
10792 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10794 (eval $ac_try) 2>&5
10795 ac_status=$?
10796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10797 (exit $ac_status); }; }
8ada417f
ZW
10798 then
10799 gcc_cv_as_powerpc_mfcrf=yes
10800 else
10801 echo "configure: failed program was" >&5
10802 cat conftest.s >&5
10803 fi
10804 rm -f conftest.o conftest.s
10805 fi
2c4a9cff 10806fi
ba479fd2
NN
10807echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
10808echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 10809if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
10810
10811cat >>confdefs.h <<\_ACEOF
2c4a9cff 10812#define HAVE_AS_MFCRF 1
ba479fd2 10813_ACEOF
ef1ecf87 10814
8ada417f
ZW
10815fi
10816 ;;
10817
10818 mips*-*-*)
ba479fd2
NN
10819 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10820echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10821if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10823else
10824 gcc_cv_as_mips_explicit_relocs=no
10825 if test $in_tree_gas = yes; then
10826 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10827 then gcc_cv_as_mips_explicit_relocs=yes
10828fi
10829 elif test x$gcc_cv_as != x; then
6e3f3080 10830 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
10831 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10833 (eval $ac_try) 2>&5
10834 ac_status=$?
10835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836 (exit $ac_status); }; }
8ada417f
ZW
10837 then
10838 gcc_cv_as_mips_explicit_relocs=yes
10839 else
10840 echo "configure: failed program was" >&5
10841 cat conftest.s >&5
ef1ecf87 10842 fi
8ada417f
ZW
10843 rm -f conftest.o conftest.s
10844 fi
10845fi
ba479fd2
NN
10846echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
10847echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
10848if test $gcc_cv_as_mips_explicit_relocs = yes; then
10849 if test x$target_cpu_default = x
10850 then target_cpu_default=MASK_EXPLICIT_RELOCS
10851 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
10852 fi
10853fi
10854
ef1ecf87 10855 ;;
1cb36a98 10856esac
9d147085
RH
10857# ??? Not all targets support dwarf2 debug_line, even within a version
10858# of gas. Moreover, we need to emit a valid instruction to trigger any
10859# info to the output file. So, as supported targets are added to gas 2.11,
10860# add some instruction here to (also) show we expect this might work.
10861# ??? Once 2.11 is released, probably need to add first known working
10862# version to the per-target configury.
10863case "$target" in
80486e06 10864 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 10865 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 10866 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
10867 insn="nop"
10868 ;;
10869 ia64*-*-*)
10870 insn="nop 0"
10871 ;;
2853bc5a
HPN
10872 mmix-*-*)
10873 insn="swym 0"
10874 ;;
8ada417f
ZW
10875esac
10876if test x"$insn" != x; then
10877 conftest_s="\
10878 .file 1 \"conftest.s\"
10879 .loc 1 3 0
10880 $insn"
ba479fd2
NN
10881 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
10882echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
10883if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
10884 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10885else
10886 gcc_cv_as_dwarf2_debug_line=no
10887 if test $in_tree_gas = yes; then
10888 if test $in_tree_gas_is_elf = yes \
10889 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10890 then gcc_cv_as_dwarf2_debug_line=yes
10891fi
10892 elif test x$gcc_cv_as != x; then
6e3f3080 10893 echo "$conftest_s" > conftest.s
ba479fd2
NN
10894 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10896 (eval $ac_try) 2>&5
10897 ac_status=$?
10898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10899 (exit $ac_status); }; }
8ada417f
ZW
10900 then
10901 # ??? This fails with non-gnu grep. Maybe use objdump?
10902 if grep debug_line conftest.o > /dev/null 2>&1; then
10903 gcc_cv_as_dwarf2_debug_line=yes
10904 fi
10905 else
10906 echo "configure: failed program was" >&5
10907 cat conftest.s >&5
10908 fi
10909 rm -f conftest.o conftest.s
10910 fi
10911fi
ba479fd2
NN
10912echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
10913echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 10914
ad9c4d9f 10915
8ada417f
ZW
10916# The .debug_line file table must be in the exact order that
10917# we specified the files, since these indices are also used
10918# by DW_AT_decl_file. Approximate this test by testing if
10919# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
10920 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
10921echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
10922if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
10923 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10924else
10925 gcc_cv_as_dwarf2_file_buggy=no
10926 if test x$gcc_cv_as != x; then
6e3f3080 10927 echo ' .file 1 "foo.s"
8ada417f 10928 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
10929 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10931 (eval $ac_try) 2>&5
10932 ac_status=$?
10933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934 (exit $ac_status); }; }
8ada417f
ZW
10935 then
10936 gcc_cv_as_dwarf2_file_buggy=yes
10937 else
10938 echo "configure: failed program was" >&5
10939 cat conftest.s >&5
10940 fi
10941 rm -f conftest.o conftest.s
10942 fi
ad9c4d9f 10943fi
ba479fd2
NN
10944echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
10945echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
10946
10947
10948 if test $gcc_cv_as_dwarf2_debug_line = yes \
10949 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
10950
10951cat >>confdefs.h <<\_ACEOF
9d147085 10952#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 10953_ACEOF
9d147085 10954
8ada417f 10955 fi
ad9c4d9f 10956
ba479fd2
NN
10957 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
10958echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
10959if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
10960 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10961else
10962 gcc_cv_as_gdwarf2_flag=no
10963 if test $in_tree_gas = yes; then
10964 if test $in_tree_gas_is_elf = yes \
10965 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10966 then gcc_cv_as_gdwarf2_flag=yes
10967fi
10968 elif test x$gcc_cv_as != x; then
6e3f3080 10969 echo "$insn" > conftest.s
ba479fd2
NN
10970 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
10971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); }; }
8ada417f
ZW
10976 then
10977 gcc_cv_as_gdwarf2_flag=yes
10978 else
10979 echo "configure: failed program was" >&5
10980 cat conftest.s >&5
10981 fi
10982 rm -f conftest.o conftest.s
10983 fi
ad9c4d9f 10984fi
ba479fd2
NN
10985echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
10986echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 10987if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
10988
10989cat >>confdefs.h <<\_ACEOF
5f0e9ea2 10990#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 10991_ACEOF
5f0e9ea2
GK
10992
10993fi
ad9c4d9f 10994
ba479fd2
NN
10995 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
10996echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
10997if test "${gcc_cv_as_gstabs_flag+set}" = set; then
10998 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10999else
11000 gcc_cv_as_gstabs_flag=no
11001 if test $in_tree_gas = yes; then
11002 if test $in_tree_gas_is_elf = yes \
11003 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11004 then gcc_cv_as_gstabs_flag=yes
11005fi
11006 elif test x$gcc_cv_as != x; then
6e3f3080 11007 echo "$insn" > conftest.s
ba479fd2
NN
11008 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
11009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11010 (eval $ac_try) 2>&5
11011 ac_status=$?
11012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11013 (exit $ac_status); }; }
8ada417f
ZW
11014 then
11015 # The native Solaris 9/Intel assembler doesn't understand --gstabs
11016 # and warns about it, but still exits successfully. So check for
11017 # this.
ba479fd2
NN
11018 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
11019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11020 (eval $ac_try) 2>&5
11021 ac_status=$?
11022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023 (exit $ac_status); }; }
8ada417f
ZW
11024 then :
11025 else gcc_cv_as_gstabs_flag=yes
11026 fi
11027 else
11028 echo "configure: failed program was" >&5
11029 cat conftest.s >&5
11030 fi
11031 rm -f conftest.o conftest.s
11032 fi
ad9c4d9f 11033fi
ba479fd2
NN
11034echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
11035echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 11036if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
11037
11038cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11039#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 11040_ACEOF
5f0e9ea2
GK
11041
11042fi
8ada417f 11043fi
5f0e9ea2 11044
ba479fd2
NN
11045echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
11046echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 11047gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 11048if test $in_tree_ld = yes ; then
5408ac6c
HPN
11049 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 \
11050 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
11051 gcc_cv_ld_ro_rw_mix=read-write
11052 fi
11053elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
11054 echo '.section myfoosect, "a"' > conftest1.s
11055 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 11056 echo '.byte 1' >> conftest2.s
90e145da 11057 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 11058 echo '.byte 0' >> conftest3.s
6cd656d0
KC
11059 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
11060 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
11061 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 11062 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 11063 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 11064 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 11065 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
11066 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
11067 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
11068 gcc_cv_ld_ro_rw_mix=read-only
11069 else
11070 gcc_cv_ld_ro_rw_mix=read-write
11071 fi
11072 fi
11073 fi
11074 rm -f conftest.* conftest[123].*
11075fi
11076if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
11077
11078cat >>confdefs.h <<\_ACEOF
96d0f4dc 11079#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 11080_ACEOF
96d0f4dc
JJ
11081
11082fi
ba479fd2
NN
11083echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
11084echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 11085
ba479fd2
NN
11086echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
11087echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 11088gcc_cv_ld_eh_frame_hdr=no
34a86c2b 11089if test $in_tree_ld = yes ; then
5408ac6c
HPN
11090 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 \
11091 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
11092 gcc_cv_ld_eh_frame_hdr=yes
11093 fi
11094elif test x$gcc_cv_ld != x; then
11095 # Check if linker supports --eh-frame-hdr option
11096 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
11097 gcc_cv_ld_eh_frame_hdr=yes
11098 fi
11099fi
11100if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
11101
11102cat >>confdefs.h <<\_ACEOF
275b60d6 11103#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 11104_ACEOF
275b60d6
JJ
11105
11106fi
ba479fd2
NN
11107echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
11108echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 11109
ba479fd2
NN
11110echo "$as_me:$LINENO: checking linker position independent executable support" >&5
11111echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
11112gcc_cv_ld_pie=no
11113if test $in_tree_ld = yes ; then
5408ac6c
HPN
11114 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 \
11115 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
11116 gcc_cv_ld_pie=yes
11117 fi
11118elif test x$gcc_cv_ld != x; then
11119 # Check if linker supports -pie option
11120 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
11121 gcc_cv_ld_pie=yes
11122 fi
11123fi
11124if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
11125
11126cat >>confdefs.h <<\_ACEOF
24a4dd31 11127#define HAVE_LD_PIE 1
ba479fd2 11128_ACEOF
24a4dd31
JJ
11129
11130fi
ba479fd2
NN
11131echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
11132echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 11133
9fb28a67 11134if test x$with_sysroot = x && test x$host = x$target \
047d636f 11135 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
11136
11137cat >>confdefs.h <<_ACEOF
793e9558 11138#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 11139_ACEOF
793e9558
PB
11140
11141fi
11142
861bb6c1 11143# Figure out what language subdirectories are present.
71205e0b
MH
11144# Look if the user specified --enable-languages="..."; if not, use
11145# the environment variable $LANGUAGES if defined. $LANGUAGES might
11146# go away some day.
cc9a08e0 11147# NB: embedded tabs in this IF block -- do not untabify
71205e0b
MH
11148if test x"${enable_languages+set}" != xset; then
11149 if test x"${LANGUAGES+set}" = xset; then
cc9a08e0 11150 enable_languages="${LANGUAGES}"
ba479fd2
NN
11151 { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5
11152echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;}
cc9a08e0 11153
71205e0b
MH
11154 else
11155 enable_languages=all
11156 fi
d6c6b553 11157else
015089dd
TJ
11158 if test x"${enable_languages}" = x \
11159 || test x"${enable_languages}" = xyes;
cc9a08e0 11160 then
ba479fd2
NN
11161 { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5
11162echo "$as_me: error: --enable-languages needs at least one language argument" >&2;}
11163 { (exit 1); exit 1; }; }
d6c6b553 11164 fi
71205e0b 11165fi
cc9a08e0 11166enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
75382c6d
TT
11167
11168# First scan to see if an enabled language requires some other language.
11169# We assume that a given config-lang.in will list all the language
11170# front ends it requires, even if some are required indirectly.
c406e779 11171for lang in ${srcdir}/*/config-lang.in
75382c6d
TT
11172do
11173 case $lang in
75382c6d
TT
11174 # The odd quoting in the next line works around
11175 # an apparent bug in bash 1.12 on linux.
11176 ${srcdir}/[*]/config-lang.in)
11177 ;;
11178 *)
11179 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
11180 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
11181 for other in $this_lang_requires
11182 do
11183 case ,${enable_languages}, in
11184 *,$other,*)
11185 ;;
11186 *,all,*)
11187 ;;
1bf17cc4 11188 *,$lang_alias,*)
75382c6d
TT
11189 enable_languages="$enable_languages,$other"
11190 ;;
11191 esac
11192 done
11193 ;;
11194 esac
11195done
11196
015089dd
TJ
11197expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
11198found_languages=
861bb6c1 11199subdirs=
c406e779 11200for lang in ${srcdir}/*/config-lang.in
861bb6c1
JL
11201do
11202 case $lang in
861bb6c1
JL
11203 # The odd quoting in the next line works around
11204 # an apparent bug in bash 1.12 on linux.
11205 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
11206 *)
11207 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
2b60b2cb
AO
11208 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
11209 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
71205e0b
MH
11210 if test "x$lang_alias" = x
11211 then
11212 echo "$lang doesn't set \$language." 1>&2
11213 exit 1
11214 fi
2b60b2cb
AO
11215 case ${build_by_default},${enable_languages}, in
11216 *,$lang_alias,*) add_this_lang=yes ;;
11217 no,*) add_this_lang=no ;;
11218 *,all,*) add_this_lang=yes ;;
11219 *) add_this_lang=no ;;
11220 esac
015089dd 11221 found_languages="${found_languages} ${lang_alias}"
71205e0b
MH
11222 if test x"${add_this_lang}" = xyes; then
11223 case $lang in
11224 ${srcdir}/ada/config-lang.in)
1ffc5c6e 11225 if test x$have_gnat = xyes ; then
71205e0b
MH
11226 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11227 fi
11228 ;;
11229 *)
11230 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11231 ;;
11232 esac
11233 fi
11234 ;;
861bb6c1
JL
11235 esac
11236done
11237
015089dd
TJ
11238missing_languages=
11239for expected_language in ${expected_languages} ..
ba479fd2 11240do
015089dd
TJ
11241 if test "${expected_language}" != ..; then
11242 missing_language="${expected_language}"
11243 if test "${expected_language}" = "c" \
11244 || test "${expected_language}" = "all"; then
11245 missing_language=
11246 fi
11247 for found_language in ${found_languages} ..
ba479fd2 11248 do
015089dd
TJ
11249 if test "${found_language}" != ..; then
11250 if test "${expected_language}" = "${found_language}"; then
11251 missing_language=
11252 fi
11253 fi
11254 done
11255 if test "x${missing_language}" != x; then
11256 missing_languages="${missing_languages} ${missing_language}"
11257 fi
11258 fi
11259done
11260
11261if test "x$missing_languages" != x; then
ba479fd2 11262 { { echo "$as_me:$LINENO: error:
015089dd 11263The following requested languages were not found:${missing_languages}
ba479fd2
NN
11264The following languages were available: c${found_languages}" >&5
11265echo "$as_me: error:
11266The following requested languages were not found:${missing_languages}
11267The following languages were available: c${found_languages}" >&2;}
11268 { (exit 1); exit 1; }; }
02ef40d9
TJ
11269fi
11270
f24af81b
TT
11271# Make gthr-default.h if we have a thread file.
11272gthread_flags=
75bffa71 11273if test $thread_file != single; then
f24af81b 11274 rm -f gthr-default.h
db0d1ed9 11275 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
11276 gthread_flags=-DHAVE_GTHR_DEFAULT
11277fi
11278
11279
81bf3d9e 11280# Find out what GC implementation we want, or may, use.
ba479fd2 11281
81bf3d9e
RH
11282# Check whether --with-gc or --without-gc was given.
11283if test "${with_gc+set}" = set; then
11284 withval="$with_gc"
11285 case "$withval" in
b6f61163 11286 simple | page | zone)
81bf3d9e
RH
11287 GGC=ggc-$withval
11288 ;;
11289 *)
ba479fd2
NN
11290 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
11291echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
11292 { (exit 1); exit 1; }; }
81bf3d9e
RH
11293 ;;
11294esac
11295else
005537df 11296 GGC=ggc-page
ba479fd2 11297fi;
81bf3d9e
RH
11298
11299echo "Using $GGC for garbage collection."
11300
3c809ba4 11301# Use the system's zlib library.
b8dad04b
ZW
11302zlibdir=-L../zlib
11303zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 11304
3c809ba4
AG
11305# Check whether --with-system-zlib or --without-system-zlib was given.
11306if test "${with_system_zlib+set}" = set; then
11307 withval="$with_system_zlib"
11308 zlibdir=
11309zlibinc=
11310
ba479fd2 11311fi;
3c809ba4
AG
11312
11313
11314
dc6746e7 11315
ba479fd2
NN
11316echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
11317echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
11318 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
11319if test "${enable_maintainer_mode+set}" = set; then
11320 enableval="$enable_maintainer_mode"
11321 maintainer_mode=$enableval
11322else
11323 maintainer_mode=no
ba479fd2 11324fi;
63cf211a 11325
ba479fd2
NN
11326echo "$as_me:$LINENO: result: $maintainer_mode" >&5
11327echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
11328
11329if test "$maintainer_mode" = "yes"; then
11330 MAINT=''
11331else
11332 MAINT='#'
11333fi
11334
861bb6c1
JL
11335# Make empty files to contain the specs and options for each language.
11336# Then add #include lines to for a compiler that has specs and/or options.
11337
d7b42618 11338lang_opt_files=
861bb6c1 11339lang_specs_files=
3103b7db 11340lang_tree_files=
861bb6c1
JL
11341for subdir in . $subdirs
11342do
d7b42618
NB
11343 if test -f $srcdir/$subdir/lang.opt; then
11344 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
11345 fi
75bffa71 11346 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 11347 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 11348 fi
3103b7db 11349 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 11350 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 11351 fi
861bb6c1
JL
11352done
11353
11354# These (without "all_") are set in each config-lang.in.
11355# `language' must be a single word so is spelled singularly.
11356all_languages=
11357all_boot_languages=
11358all_compilers=
11359all_stagestuff=
6eb95e99 11360all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
861bb6c1 11361# List of language makefile fragments.
2ed26f6b
ZW
11362all_lang_makefrags=
11363# List of language subdirectory makefiles. Deprecated.
861bb6c1 11364all_lang_makefiles=
e2500fed 11365# Files for gengtype
ef69da62 11366all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
11367# Files for gengtype with language
11368all_gtfiles_files_langs=
11369all_gtfiles_files_files=
861bb6c1
JL
11370
11371# Add the language fragments.
11372# Languages are added via two mechanisms. Some information must be
11373# recorded in makefile variables, these are defined in config-lang.in.
11374# We accumulate them and plug them into the main Makefile.
11375# The other mechanism is a set of hooks for each of the main targets
11376# like `clean', `install', etc.
11377
861bb6c1 11378language_hooks="Make-hooks"
861bb6c1 11379
c406e779 11380for s in $subdirs
861bb6c1 11381do
861bb6c1
JL
11382 language=
11383 boot_language=
11384 compilers=
11385 stagestuff=
861bb6c1 11386 outputs=
e2500fed 11387 gtfiles=
861bb6c1 11388 . ${srcdir}/$s/config-lang.in
75bffa71 11389 if test "x$language" = x
861bb6c1
JL
11390 then
11391 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
11392 exit 1
11393 fi
2ed26f6b 11394 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 11395 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 11396 then all_lang_makefiles="$s/Makefile"
72aaffbd 11397 fi
861bb6c1 11398 all_languages="$all_languages $language"
75bffa71 11399 if test "x$boot_language" = xyes
861bb6c1
JL
11400 then
11401 all_boot_languages="$all_boot_languages $language"
11402 fi
11403 all_compilers="$all_compilers $compilers"
11404 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 11405 all_outputs="$all_outputs $outputs"
e2500fed 11406 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11407 for f in $gtfiles
8ac9d31f 11408 do
8ac9d31f
TJ
11409 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11410 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 11411 done
861bb6c1
JL
11412done
11413
8ac9d31f
TJ
11414# Pick up gtfiles for c
11415gtfiles=
11416s="c"
11417. ${srcdir}/c-config-lang.in
11418all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11419for f in $gtfiles
8ac9d31f 11420do
8ac9d31f
TJ
11421 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11422 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
11423done
11424
cbc59f01 11425check_languages=
c406e779 11426for language in $all_languages
cbc59f01 11427do
cbc59f01 11428 check_languages="$check_languages check-$language"
cbc59f01
DD
11429done
11430
62b81e45
MM
11431# We link each language in with a set of hooks, reached indirectly via
11432# lang.${target}.
861bb6c1
JL
11433
11434rm -f Make-hooks
11435touch Make-hooks
65ebbf81 11436target_list="all.build all.cross start.encap rest.encap tags \
a207b594 11437 install-normal install-common install-man \
436a88a6 11438 uninstall \
a03ad584 11439 mostlyclean clean distclean maintainer-clean \
8f231b5d 11440 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
11441for t in $target_list
11442do
11443 x=
c406e779 11444 for lang in $all_languages
861bb6c1 11445 do
ab87f8c8 11446 x="$x $lang.$t"
861bb6c1
JL
11447 done
11448 echo "lang.$t: $x" >> Make-hooks
11449done
11450
cc06d68c 11451# Create .gdbinit.
861bb6c1 11452
cc06d68c
GP
11453echo "dir ." > .gdbinit
11454echo "dir ${srcdir}" >> .gdbinit
11455if test x$gdb_needs_out_file_path = xyes
11456then
11457 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
11458fi
11459if test "x$subdirs" != x; then
11460 for s in $subdirs
11461 do
11462 echo "dir ${srcdir}/$s" >> .gdbinit
11463 done
861bb6c1 11464fi
cc06d68c 11465echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 11466
8f8d3278
NC
11467# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
11468# absolute path for gcc_tooldir based on inserting the number of up-directory
11469# movements required to get from $(exec_prefix) to $(prefix) into the basic
11470# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
11471# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
11472# make and thus we'd get different behavior depending on where we built the
11473# sources.
5949a9fc 11474if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 11475 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 11476else
8f8d3278
NC
11477# An explanation of the sed strings:
11478# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
11479# -e 's|/$||' match a trailing forward slash and eliminates it
11480# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 11481# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
11482#
11483# (*) Note this pattern overwrites the first character of the string
11484# with a forward slash if one is not already present. This is not a
11485# problem because the exact names of the sub-directories concerned is
11486# unimportant, just the number of them matters.
11487#
11488# The practical upshot of these patterns is like this:
11489#
11490# prefix exec_prefix result
11491# ------ ----------- ------
11492# /foo /foo/bar ../
11493# /foo/ /foo/bar ../
11494# /foo /foo/bar/ ../
11495# /foo/ /foo/bar/ ../
11496# /foo /foo/bar/ugg ../../
11497#
4c112cda 11498 dollar='$$'
caa55b1e 11499 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
11500fi
11501
11502
2ce3c6c6 11503
2bbea3a6
RH
11504# Find a directory in which to install a shared libgcc.
11505
11506# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
11507if test "${enable_version_specific_runtime_libs+set}" = set; then
11508 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
11509
11510fi;
2bbea3a6
RH
11511
11512
5b15f277
RH
11513# Check whether --with-slibdir or --without-slibdir was given.
11514if test "${with_slibdir+set}" = set; then
11515 withval="$with_slibdir"
11516 slibdir="$with_slibdir"
11517else
11518 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 11519 slibdir='$(libsubdir)'
5b15f277 11520elif test "$host" != "$target"; then
2bbea3a6
RH
11521 slibdir='$(build_tooldir)/lib'
11522else
5b15f277 11523 slibdir='$(libdir)'
2bbea3a6 11524fi
ba479fd2 11525fi;
2bbea3a6
RH
11526
11527
1e6347d8 11528objdir=`${PWDCMD-pwd}`
7e717196
JL
11529
11530
861bb6c1
JL
11531# Substitute configuration variables
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
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
9b16d2c4 11578
e9a25f70 11579
6e26218f 11580
c8724862 11581
e061d1ce 11582
d8bb17c8 11583
11642c3a
ZW
11584
11585
11586
11587
11588
11589
11590
3d9d2476 11591
596151e1 11592
8ac9d31f
TJ
11593
11594
11595
e2500fed 11596
51b9ff45
KC
11597
11598
e22340b0 11599
861bb6c1
JL
11600
11601
6e3f3080
NN
11602# Echo link setup.
11603if test x${build} = x${host} ; then
11604 if test x${host} = x${target} ; then
11605 echo "Links are now set up to build a native compiler for ${target}." 1>&2
11606 else
11607 echo "Links are now set up to build a cross-compiler" 1>&2
11608 echo " from ${host} to ${target}." 1>&2
11609 fi
11610else
11611 if test x${host} = x${target} ; then
11612 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
11613 echo " for ${target}." 1>&2
11614 else
11615 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
11616 echo " from ${host} to ${target}." 1>&2
11617 fi
11618fi
11619
11620# Configure the subdirectories
11621# AC_CONFIG_SUBDIRS($subdirs)
11622
11623# Create the Makefile
11624# and configure language subdirectories
ba479fd2 11625 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
11626
11627
ba479fd2 11628 ac_config_commands="$ac_config_commands default"
914c5af7 11629
ba479fd2 11630cat >confcache <<\_ACEOF
6e3f3080
NN
11631# This file is a shell script that caches the results of configure
11632# tests run on this system so they can be shared between configure
ba479fd2
NN
11633# scripts and configure runs, see configure's option --config-cache.
11634# It is not useful on other systems. If it contains results you don't
11635# want to keep, you may remove or edit it.
6e3f3080 11636#
ba479fd2
NN
11637# config.status only pays attention to the cache file if you give it
11638# the --recheck option to rerun configure.
6e3f3080 11639#
ba479fd2
NN
11640# `ac_cv_env_foo' variables (set or unset) will be overridden when
11641# loading this file, other *unset* `ac_cv_foo' will be assigned the
11642# following values.
11643
11644_ACEOF
11645
6e3f3080
NN
11646# The following way of writing the cache mishandles newlines in values,
11647# but we know of no workaround that is simple, portable, and efficient.
11648# So, don't put newlines in cache variables' values.
11649# Ultrix sh set writes to stderr and can't be redirected directly,
11650# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
11651{
11652 (set) 2>&1 |
11653 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11654 *ac_space=\ *)
11655 # `set' does not quote correctly, so add quotes (double-quote
11656 # substitution turns \\\\ into \\, and sed turns \\ into \).
11657 sed -n \
11658 "s/'/'\\\\''/g;
11659 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11660 ;;
11661 *)
11662 # `set' quotes correctly as required by POSIX, so do not add quotes.
11663 sed -n \
11664 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11665 ;;
11666 esac;
11667} |
11668 sed '
11669 t clear
11670 : clear
11671 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11672 t end
11673 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11674 : end' >>confcache
11675if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 11676 if test -w $cache_file; then
ba479fd2
NN
11677 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11678 cat confcache >$cache_file
6e3f3080
NN
11679 else
11680 echo "not updating unwritable cache $cache_file"
11681 fi
11682fi
11683rm -f confcache
11684
11685test "x$prefix" = xNONE && prefix=$ac_default_prefix
11686# Let make expand exec_prefix.
11687test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11688
ba479fd2
NN
11689# VPATH may cause trouble with some makes, so we remove $(srcdir),
11690# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11691# trailing colons and then remove the whole line if VPATH becomes empty
11692# (actually we leave an empty line to preserve line numbers).
6e3f3080 11693if test "x$srcdir" = x.; then
ba479fd2
NN
11694 ac_vpsub='/^[ ]*VPATH[ ]*=/{
11695s/:*\$(srcdir):*/:/;
11696s/:*\${srcdir}:*/:/;
11697s/:*@srcdir@:*/:/;
11698s/^\([^=]*=[ ]*\):*/\1/;
11699s/:*$//;
11700s/^[^=]*=[ ]*$//;
11701}'
6e3f3080
NN
11702fi
11703
63cf211a 11704DEFS=-DHAVE_CONFIG_H
6e3f3080 11705
ba479fd2
NN
11706ac_libobjs=
11707ac_ltlibobjs=
11708for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11709 # 1. Remove the extension, and $U if already installed.
11710 ac_i=`echo "$ac_i" |
11711 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
11712 # 2. Add them.
11713 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
11714 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
11715done
11716LIBOBJS=$ac_libobjs
63cf211a 11717
ba479fd2
NN
11718LTLIBOBJS=$ac_ltlibobjs
11719
11720
11721
11722: ${CONFIG_STATUS=./config.status}
11723ac_clean_files_save=$ac_clean_files
11724ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11725{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11726echo "$as_me: creating $CONFIG_STATUS" >&6;}
11727cat >$CONFIG_STATUS <<_ACEOF
11728#! $SHELL
11729# Generated by $as_me.
6e3f3080
NN
11730# Run this file to recreate the current configuration.
11731# Compiler output produced by configure, useful for debugging
ba479fd2 11732# configure, is in config.log if it exists.
6e3f3080 11733
ba479fd2
NN
11734debug=false
11735ac_cs_recheck=false
11736ac_cs_silent=false
11737SHELL=\${CONFIG_SHELL-$SHELL}
11738_ACEOF
11739
11740cat >>$CONFIG_STATUS <<\_ACEOF
11741## --------------------- ##
11742## M4sh Initialization. ##
11743## --------------------- ##
11744
11745# Be Bourne compatible
11746if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11747 emulate sh
11748 NULLCMD=:
11749 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11750 # is contrary to our usage. Disable this feature.
11751 alias -g '${1+"$@"}'='"$@"'
11752elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11753 set -o posix
11754fi
11755
11756# Support unset when possible.
11757if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11758 as_unset=unset
11759else
11760 as_unset=false
11761fi
11762
11763
11764# Work around bugs in pre-3.0 UWIN ksh.
11765$as_unset ENV MAIL MAILPATH
11766PS1='$ '
11767PS2='> '
11768PS4='+ '
11769
11770# NLS nuisances.
11771for as_var in \
11772 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11773 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11774 LC_TELEPHONE LC_TIME
6e3f3080 11775do
ba479fd2
NN
11776 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
11777 eval $as_var=C; export $as_var
11778 else
11779 $as_unset $as_var
11780 fi
6e3f3080
NN
11781done
11782
ba479fd2
NN
11783# Required to use basename.
11784if expr a : '\(a\)' >/dev/null 2>&1; then
11785 as_expr=expr
11786else
11787 as_expr=false
11788fi
6e3f3080 11789
ba479fd2
NN
11790if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
11791 as_basename=basename
11792else
11793 as_basename=false
11794fi
6e3f3080
NN
11795
11796
ba479fd2
NN
11797# Name of the executable.
11798as_me=`$as_basename "$0" ||
11799$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11800 X"$0" : 'X\(//\)$' \| \
11801 X"$0" : 'X\(/\)$' \| \
11802 . : '\(.\)' 2>/dev/null ||
11803echo X/"$0" |
11804 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
11805 /^X\/\(\/\/\)$/{ s//\1/; q; }
11806 /^X\/\(\/\).*/{ s//\1/; q; }
11807 s/.*/./; q'`
11808
6e3f3080 11809
ba479fd2
NN
11810# PATH needs CR, and LINENO needs CR and PATH.
11811# Avoid depending upon Character Ranges.
11812as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11813as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11814as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11815as_cr_digits='0123456789'
11816as_cr_alnum=$as_cr_Letters$as_cr_digits
11817
11818# The user is always right.
11819if test "${PATH_SEPARATOR+set}" != set; then
11820 echo "#! /bin/sh" >conf$$.sh
11821 echo "exit 0" >>conf$$.sh
11822 chmod +x conf$$.sh
11823 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11824 PATH_SEPARATOR=';'
6e3f3080 11825 else
ba479fd2
NN
11826 PATH_SEPARATOR=:
11827 fi
11828 rm -f conf$$.sh
11829fi
11830
11831
11832 as_lineno_1=$LINENO
11833 as_lineno_2=$LINENO
11834 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11835 test "x$as_lineno_1" != "x$as_lineno_2" &&
11836 test "x$as_lineno_3" = "x$as_lineno_2" || {
11837 # Find who we are. Look in the path if we contain no path at all
11838 # relative or not.
11839 case $0 in
11840 *[\\/]* ) as_myself=$0 ;;
11841 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11842for as_dir in $PATH
11843do
11844 IFS=$as_save_IFS
11845 test -z "$as_dir" && as_dir=.
11846 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11847done
11848
11849 ;;
11850 esac
11851 # We did not find ourselves, most probably we were run as `sh COMMAND'
11852 # in which case we are not to be found in the path.
11853 if test "x$as_myself" = x; then
11854 as_myself=$0
11855 fi
11856 if test ! -f "$as_myself"; then
11857 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
11858echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
11859 { (exit 1); exit 1; }; }
6e3f3080 11860 fi
ba479fd2
NN
11861 case $CONFIG_SHELL in
11862 '')
11863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11864for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
11865do
11866 IFS=$as_save_IFS
11867 test -z "$as_dir" && as_dir=.
11868 for as_base in sh bash ksh sh5; do
11869 case $as_dir in
11870 /*)
11871 if ("$as_dir/$as_base" -c '
11872 as_lineno_1=$LINENO
11873 as_lineno_2=$LINENO
11874 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11875 test "x$as_lineno_1" != "x$as_lineno_2" &&
11876 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
11877 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
11878 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
11879 CONFIG_SHELL=$as_dir/$as_base
11880 export CONFIG_SHELL
11881 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
11882 fi;;
11883 esac
11884 done
11885done
11886;;
11887 esac
11888
11889 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11890 # uniformly replaced by the line number. The first 'sed' inserts a
11891 # line-number line before each line; the second 'sed' does the real
11892 # work. The second script uses 'N' to pair each line-number line
11893 # with the numbered line, and appends trailing '-' during
11894 # substitution so that $LINENO is not a special case at line end.
11895 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11896 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
11897 sed '=' <$as_myself |
11898 sed '
11899 N
11900 s,$,-,
11901 : loop
11902 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
11903 t loop
11904 s,-$,,
11905 s,^['$as_cr_digits']*\n,,
11906 ' >$as_me.lineno &&
11907 chmod +x $as_me.lineno ||
11908 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
11909echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
11910 { (exit 1); exit 1; }; }
11911
11912 # Don't try to exec as it changes $[0], causing all sort of problems
11913 # (the dirname of $[0] is not the place where we might find the
11914 # original and so on. Autoconf is especially sensible to this).
11915 . ./$as_me.lineno
11916 # Exit status is that of the last command.
11917 exit
11918}
11919
11920
11921case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
11922 *c*,-n*) ECHO_N= ECHO_C='
11923' ECHO_T=' ' ;;
11924 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
11925 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
11926esac
11927
11928if expr a : '\(a\)' >/dev/null 2>&1; then
11929 as_expr=expr
11930else
11931 as_expr=false
11932fi
11933
11934rm -f conf$$ conf$$.exe conf$$.file
11935echo >conf$$.file
11936if ln -s conf$$.file conf$$ 2>/dev/null; then
11937 # We could just check for DJGPP; but this test a) works b) is more generic
11938 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11939 if test -f conf$$.exe; then
11940 # Don't use ln at all; we don't have any links
11941 as_ln_s='cp -p'
6e3f3080 11942 else
ba479fd2 11943 as_ln_s='ln -s'
6e3f3080 11944 fi
ba479fd2
NN
11945elif ln conf$$.file conf$$ 2>/dev/null; then
11946 as_ln_s=ln
11947else
11948 as_ln_s='cp -p'
11949fi
11950rm -f conf$$ conf$$.exe conf$$.file
11951
11952if mkdir -p . 2>/dev/null; then
11953 as_mkdir_p=:
11954else
11955 as_mkdir_p=false
11956fi
11957
11958as_executable_p="test -f"
11959
11960# Sed expression to map a string onto a valid CPP name.
11961as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
11962
11963# Sed expression to map a string onto a valid variable name.
11964as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
11965
11966
11967# IFS
11968# We need space, tab and new line, in precisely that order.
11969as_nl='
11970'
11971IFS=" $as_nl"
11972
11973# CDPATH.
11974$as_unset CDPATH
11975
11976exec 6>&1
11977
11978# Open the log real soon, to keep \$[0] and so on meaningful, and to
11979# report actual input values of CONFIG_FILES etc. instead of their
11980# values after options handling. Logging --version etc. is OK.
11981exec 5>>config.log
11982{
11983 echo
11984 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11985## Running $as_me. ##
11986_ASBOX
11987} >&5
11988cat >&5 <<_CSEOF
11989
11990This file was extended by $as_me, which was
11991generated by GNU Autoconf 2.57. Invocation command line was
11992
11993 CONFIG_FILES = $CONFIG_FILES
11994 CONFIG_HEADERS = $CONFIG_HEADERS
11995 CONFIG_LINKS = $CONFIG_LINKS
11996 CONFIG_COMMANDS = $CONFIG_COMMANDS
11997 $ $0 $@
11998
11999_CSEOF
12000echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12001echo >&5
12002_ACEOF
12003
12004# Files that config.status was made for.
12005if test -n "$ac_config_files"; then
12006 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12007fi
12008
12009if test -n "$ac_config_headers"; then
12010 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12011fi
12012
12013if test -n "$ac_config_links"; then
12014 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12015fi
12016
12017if test -n "$ac_config_commands"; then
12018 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12019fi
12020
12021cat >>$CONFIG_STATUS <<\_ACEOF
12022
12023ac_cs_usage="\
12024\`$as_me' instantiates files from templates according to the
12025current configuration.
12026
12027Usage: $0 [OPTIONS] [FILE]...
12028
12029 -h, --help print this help, then exit
12030 -V, --version print version number, then exit
12031 -q, --quiet do not print progress messages
12032 -d, --debug don't remove temporary files
12033 --recheck update $as_me by reconfiguring in the same conditions
12034 --file=FILE[:TEMPLATE]
12035 instantiate the configuration file FILE
12036 --header=FILE[:TEMPLATE]
12037 instantiate the configuration header FILE
12038
12039Configuration files:
12040$config_files
12041
12042Configuration headers:
12043$config_headers
12044
12045Configuration commands:
12046$config_commands
12047
12048Report bugs to <bug-autoconf@gnu.org>."
12049_ACEOF
12050
12051cat >>$CONFIG_STATUS <<_ACEOF
12052ac_cs_version="\\
12053config.status
12054configured by $0, generated by GNU Autoconf 2.57,
12055 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12056
12057Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12058Free Software Foundation, Inc.
12059This config.status script is free software; the Free Software Foundation
12060gives unlimited permission to copy, distribute and modify it."
12061srcdir=$srcdir
12062_ACEOF
12063
12064cat >>$CONFIG_STATUS <<\_ACEOF
12065# If no file are specified by the user, then we need to provide default
12066# value. By we need to know if files were specified by the user.
12067ac_need_defaults=:
12068while test $# != 0
12069do
12070 case $1 in
12071 --*=*)
12072 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12073 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12074 ac_shift=:
12075 ;;
12076 -*)
12077 ac_option=$1
12078 ac_optarg=$2
12079 ac_shift=shift
12080 ;;
12081 *) # This is not an option, so the user has probably given explicit
12082 # arguments.
12083 ac_option=$1
12084 ac_need_defaults=false;;
12085 esac
12086
12087 case $ac_option in
12088 # Handling of the options.
12089_ACEOF
12090cat >>$CONFIG_STATUS <<\_ACEOF
12091 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12092 ac_cs_recheck=: ;;
12093 --version | --vers* | -V )
12094 echo "$ac_cs_version"; exit 0 ;;
12095 --he | --h)
12096 # Conflict between --help and --header
12097 { { echo "$as_me:$LINENO: error: ambiguous option: $1
12098Try \`$0 --help' for more information." >&5
12099echo "$as_me: error: ambiguous option: $1
12100Try \`$0 --help' for more information." >&2;}
12101 { (exit 1); exit 1; }; };;
12102 --help | --hel | -h )
12103 echo "$ac_cs_usage"; exit 0 ;;
12104 --debug | --d* | -d )
12105 debug=: ;;
12106 --file | --fil | --fi | --f )
12107 $ac_shift
12108 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12109 ac_need_defaults=false;;
12110 --header | --heade | --head | --hea )
12111 $ac_shift
12112 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12113 ac_need_defaults=false;;
12114 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12115 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12116 ac_cs_silent=: ;;
12117
12118 # This is an error.
12119 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12120Try \`$0 --help' for more information." >&5
12121echo "$as_me: error: unrecognized option: $1
12122Try \`$0 --help' for more information." >&2;}
12123 { (exit 1); exit 1; }; } ;;
12124
12125 *) ac_config_targets="$ac_config_targets $1" ;;
12126
12127 esac
12128 shift
6e3f3080 12129done
ba479fd2
NN
12130
12131ac_configure_extra_args=
12132
12133if $ac_cs_silent; then
12134 exec 6>/dev/null
12135 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
12136fi
12137
ba479fd2
NN
12138_ACEOF
12139cat >>$CONFIG_STATUS <<_ACEOF
12140if \$ac_cs_recheck; then
12141 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12142 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12143fi
861bb6c1 12144
ba479fd2
NN
12145_ACEOF
12146
12147cat >>$CONFIG_STATUS <<_ACEOF
12148#
12149# INIT-COMMANDS section.
12150#
12151
12152subdirs='$subdirs'
12153symbolic_link='$symbolic_link'
12154
12155
12156_ACEOF
12157
12158
12159
12160cat >>$CONFIG_STATUS <<\_ACEOF
12161for ac_config_target in $ac_config_targets
12162do
12163 case "$ac_config_target" in
12164 # Handling of arguments.
12165 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
12166 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12167 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
12168 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12169echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12170 { (exit 1); exit 1; }; };;
861bb6c1 12171 esac
ba479fd2
NN
12172done
12173
12174# If the user did not use the arguments to specify the items to instantiate,
12175# then the envvar interface is used. Set only those that are not.
12176# We use the long form for the default assignment because of an extremely
12177# bizarre bug on SunOS 4.1.3.
12178if $ac_need_defaults; then
12179 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12180 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12181 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12182fi
12183
12184# Have a temporary directory for convenience. Make it in the build tree
12185# simply because there is no reason to put it here, and in addition,
12186# creating and moving files from /tmp can sometimes cause problems.
12187# Create a temporary directory, and hook for its removal unless debugging.
12188$debug ||
12189{
12190 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12191 trap '{ (exit 1); exit 1; }' 1 2 13 15
12192}
861bb6c1 12193
ba479fd2 12194# Create a (secure) tmp directory for tmp files.
6e3f3080 12195
ba479fd2
NN
12196{
12197 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
12198 test -n "$tmp" && test -d "$tmp"
12199} ||
12200{
12201 tmp=./confstat$$-$RANDOM
12202 (umask 077 && mkdir $tmp)
12203} ||
12204{
12205 echo "$me: cannot create a temporary directory in ." >&2
12206 { (exit 1); exit 1; }
12207}
12208
12209_ACEOF
12210
12211cat >>$CONFIG_STATUS <<_ACEOF
12212
12213#
12214# CONFIG_FILES section.
12215#
12216
12217# No need to generate the scripts if there are no CONFIG_FILES.
12218# This happens for instance when ./config.status config.h
12219if test -n "\$CONFIG_FILES"; then
12220 # Protect against being on the right side of a sed subst in config.status.
12221 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12222 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12223s,@SHELL@,$SHELL,;t t
12224s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12225s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12226s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12227s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12228s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12229s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12230s,@exec_prefix@,$exec_prefix,;t t
12231s,@prefix@,$prefix,;t t
12232s,@program_transform_name@,$program_transform_name,;t t
12233s,@bindir@,$bindir,;t t
12234s,@sbindir@,$sbindir,;t t
12235s,@libexecdir@,$libexecdir,;t t
12236s,@datadir@,$datadir,;t t
12237s,@sysconfdir@,$sysconfdir,;t t
12238s,@sharedstatedir@,$sharedstatedir,;t t
12239s,@localstatedir@,$localstatedir,;t t
12240s,@libdir@,$libdir,;t t
12241s,@includedir@,$includedir,;t t
12242s,@oldincludedir@,$oldincludedir,;t t
12243s,@infodir@,$infodir,;t t
12244s,@mandir@,$mandir,;t t
12245s,@build_alias@,$build_alias,;t t
12246s,@host_alias@,$host_alias,;t t
12247s,@target_alias@,$target_alias,;t t
12248s,@DEFS@,$DEFS,;t t
12249s,@ECHO_C@,$ECHO_C,;t t
12250s,@ECHO_N@,$ECHO_N,;t t
12251s,@ECHO_T@,$ECHO_T,;t t
12252s,@LIBS@,$LIBS,;t t
12253s,@build@,$build,;t t
12254s,@build_cpu@,$build_cpu,;t t
12255s,@build_vendor@,$build_vendor,;t t
12256s,@build_os@,$build_os,;t t
12257s,@host@,$host,;t t
12258s,@host_cpu@,$host_cpu,;t t
12259s,@host_vendor@,$host_vendor,;t t
12260s,@host_os@,$host_os,;t t
12261s,@target@,$target,;t t
12262s,@target_cpu@,$target_cpu,;t t
12263s,@target_vendor@,$target_vendor,;t t
12264s,@target_os@,$target_os,;t t
12265s,@build_subdir@,$build_subdir,;t t
12266s,@host_subdir@,$host_subdir,;t t
12267s,@target_subdir@,$target_subdir,;t t
12268s,@CC@,$CC,;t t
12269s,@CFLAGS@,$CFLAGS,;t t
12270s,@LDFLAGS@,$LDFLAGS,;t t
12271s,@CPPFLAGS@,$CPPFLAGS,;t t
12272s,@ac_ct_CC@,$ac_ct_CC,;t t
12273s,@EXEEXT@,$EXEEXT,;t t
12274s,@OBJEXT@,$OBJEXT,;t t
12275s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
12276s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
12277s,@CPP@,$CPP,;t t
12278s,@GNATBIND@,$GNATBIND,;t t
12279s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
12280s,@strict1_warn@,$strict1_warn,;t t
12281s,@warn_cflags@,$warn_cflags,;t t
12282s,@WERROR@,$WERROR,;t t
12283s,@nocommon_flag@,$nocommon_flag,;t t
12284s,@EGREP@,$EGREP,;t t
12285s,@valgrind_path@,$valgrind_path,;t t
12286s,@valgrind_path_defines@,$valgrind_path_defines,;t t
12287s,@valgrind_command@,$valgrind_command,;t t
12288s,@coverage_flags@,$coverage_flags,;t t
12289s,@enable_multilib@,$enable_multilib,;t t
12290s,@enable_shared@,$enable_shared,;t t
12291s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
12292s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
12293s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
12294s,@onestep@,$onestep,;t t
12295s,@SET_MAKE@,$SET_MAKE,;t t
12296s,@AWK@,$AWK,;t t
12297s,@LN@,$LN,;t t
12298s,@LN_S@,$LN_S,;t t
12299s,@RANLIB@,$RANLIB,;t t
12300s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12301s,@INSTALL@,$INSTALL,;t t
12302s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12303s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12304s,@make_compare_target@,$make_compare_target,;t t
12305s,@have_mktemp_command@,$have_mktemp_command,;t t
12306s,@MAKEINFO@,$MAKEINFO,;t t
12307s,@BUILD_INFO@,$BUILD_INFO,;t t
12308s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
12309s,@FLEX@,$FLEX,;t t
12310s,@BISON@,$BISON,;t t
12311s,@stage1_cflags@,$stage1_cflags,;t t
12312s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
12313s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
12314s,@LDEXP_LIB@,$LDEXP_LIB,;t t
12315s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
12316s,@LIBICONV@,$LIBICONV,;t t
12317s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
12318s,@manext@,$manext,;t t
12319s,@objext@,$objext,;t t
12320s,@extra_modes_file@,$extra_modes_file,;t t
12321s,@FORBUILD@,$FORBUILD,;t t
12322s,@PACKAGE@,$PACKAGE,;t t
12323s,@VERSION@,$VERSION,;t t
12324s,@USE_NLS@,$USE_NLS,;t t
12325s,@LIBINTL@,$LIBINTL,;t t
12326s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
12327s,@INCINTL@,$INCINTL,;t t
12328s,@XGETTEXT@,$XGETTEXT,;t t
12329s,@GMSGFMT@,$GMSGFMT,;t t
12330s,@POSUB@,$POSUB,;t t
12331s,@CATALOGS@,$CATALOGS,;t t
12332s,@CROSS@,$CROSS,;t t
12333s,@ALL@,$ALL,;t t
12334s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
12335s,@inhibit_libc@,$inhibit_libc,;t t
12336s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t
12337s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t
12338s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
12339s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12340s,@STMP_FIXINC@,$STMP_FIXINC,;t t
12341s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
12342s,@libgcc_visibility@,$libgcc_visibility,;t t
12343s,@gthread_flags@,$gthread_flags,;t t
12344s,@GGC@,$GGC,;t t
12345s,@zlibdir@,$zlibdir,;t t
12346s,@zlibinc@,$zlibinc,;t t
12347s,@MAINT@,$MAINT,;t t
12348s,@gcc_tooldir@,$gcc_tooldir,;t t
12349s,@dollar@,$dollar,;t t
12350s,@slibdir@,$slibdir,;t t
12351s,@objdir@,$objdir,;t t
12352s,@subdirs@,$subdirs,;t t
12353s,@srcdir@,$srcdir,;t t
12354s,@docobjdir@,$docobjdir,;t t
12355s,@parsedir@,$parsedir,;t t
12356s,@all_boot_languages@,$all_boot_languages,;t t
12357s,@all_compilers@,$all_compilers,;t t
12358s,@all_gtfiles@,$all_gtfiles,;t t
12359s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
12360s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
12361s,@all_lang_makefrags@,$all_lang_makefrags,;t t
12362s,@all_lang_makefiles@,$all_lang_makefiles,;t t
12363s,@all_languages@,$all_languages,;t t
12364s,@all_stagestuff@,$all_stagestuff,;t t
12365s,@build_exeext@,$build_exeext,;t t
12366s,@build_install_headers_dir@,$build_install_headers_dir,;t t
12367s,@build_xm_file_list@,$build_xm_file_list,;t t
12368s,@build_xm_include_list@,$build_xm_include_list,;t t
12369s,@build_xm_defines@,$build_xm_defines,;t t
12370s,@check_languages@,$check_languages,;t t
12371s,@cc_set_by_configure@,$cc_set_by_configure,;t t
12372s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
12373s,@cpp_install_dir@,$cpp_install_dir,;t t
12374s,@xmake_file@,$xmake_file,;t t
12375s,@tmake_file@,$tmake_file,;t t
12376s,@extra_headers_list@,$extra_headers_list,;t t
12377s,@extra_objs@,$extra_objs,;t t
12378s,@extra_parts@,$extra_parts,;t t
12379s,@extra_passes@,$extra_passes,;t t
12380s,@extra_programs@,$extra_programs,;t t
12381s,@float_h_file@,$float_h_file,;t t
12382s,@gcc_config_arguments@,$gcc_config_arguments,;t t
12383s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
12384s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
12385s,@gcc_version@,$gcc_version,;t t
12386s,@gcc_version_full@,$gcc_version_full,;t t
12387s,@gcc_version_trigger@,$gcc_version_trigger,;t t
12388s,@host_exeext@,$host_exeext,;t t
12389s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t
12390s,@host_xm_file_list@,$host_xm_file_list,;t t
12391s,@host_xm_include_list@,$host_xm_include_list,;t t
12392s,@host_xm_defines@,$host_xm_defines,;t t
12393s,@out_host_hook_obj@,$out_host_hook_obj,;t t
12394s,@install@,$install,;t t
12395s,@lang_opt_files@,$lang_opt_files,;t t
12396s,@lang_specs_files@,$lang_specs_files,;t t
12397s,@lang_tree_files@,$lang_tree_files,;t t
12398s,@local_prefix@,$local_prefix,;t t
12399s,@md_file@,$md_file,;t t
12400s,@objc_boehm_gc@,$objc_boehm_gc,;t t
12401s,@out_file@,$out_file,;t t
12402s,@out_object_file@,$out_object_file,;t t
12403s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
12404s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
12405s,@symbolic_link@,$symbolic_link,;t t
12406s,@thread_file@,$thread_file,;t t
12407s,@tm_file_list@,$tm_file_list,;t t
12408s,@tm_include_list@,$tm_include_list,;t t
12409s,@tm_defines@,$tm_defines,;t t
12410s,@tm_p_file_list@,$tm_p_file_list,;t t
12411s,@tm_p_include_list@,$tm_p_include_list,;t t
12412s,@xm_file_list@,$xm_file_list,;t t
12413s,@xm_include_list@,$xm_include_list,;t t
12414s,@xm_defines@,$xm_defines,;t t
12415s,@target_noncanonical@,$target_noncanonical,;t t
12416s,@c_target_objs@,$c_target_objs,;t t
12417s,@cxx_target_objs@,$cxx_target_objs,;t t
12418s,@target_cpu_default@,$target_cpu_default,;t t
12419s,@LIBOBJS@,$LIBOBJS,;t t
12420s,@LTLIBOBJS@,$LTLIBOBJS,;t t
12421/@language_hooks@/r $language_hooks
12422s,@language_hooks@,,;t t
12423CEOF
12424
12425_ACEOF
12426
12427 cat >>$CONFIG_STATUS <<\_ACEOF
12428 # Split the substitutions into bite-sized pieces for seds with
12429 # small command number limits, like on Digital OSF/1 and HP-UX.
12430 ac_max_sed_lines=48
12431 ac_sed_frag=1 # Number of current file.
12432 ac_beg=1 # First line for current file.
12433 ac_end=$ac_max_sed_lines # Line after last line for current file.
12434 ac_more_lines=:
12435 ac_sed_cmds=
12436 while $ac_more_lines; do
12437 if test $ac_beg -gt 1; then
12438 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12439 else
12440 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12441 fi
12442 if test ! -s $tmp/subs.frag; then
12443 ac_more_lines=false
12444 else
12445 # The purpose of the label and of the branching condition is to
12446 # speed up the sed processing (if there are no `@' at all, there
12447 # is no need to browse any of the substitutions).
12448 # These are the two extra sed commands mentioned above.
12449 (echo ':t
12450 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12451 if test -z "$ac_sed_cmds"; then
12452 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12453 else
12454 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12455 fi
12456 ac_sed_frag=`expr $ac_sed_frag + 1`
12457 ac_beg=$ac_end
12458 ac_end=`expr $ac_end + $ac_max_sed_lines`
12459 fi
12460 done
12461 if test -z "$ac_sed_cmds"; then
12462 ac_sed_cmds=cat
63cf211a 12463 fi
ba479fd2 12464fi # test -n "$CONFIG_FILES"
cafe096b 12465
ba479fd2
NN
12466_ACEOF
12467cat >>$CONFIG_STATUS <<\_ACEOF
12468for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12469 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12470 case $ac_file in
12471 - | *:- | *:-:* ) # input from stdin
12472 cat >$tmp/stdin
12473 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12474 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12475 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12476 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12477 * ) ac_file_in=$ac_file.in ;;
63cf211a 12478 esac
cafe096b 12479
ba479fd2
NN
12480 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12481 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12482$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12483 X"$ac_file" : 'X\(//\)[^/]' \| \
12484 X"$ac_file" : 'X\(//\)$' \| \
12485 X"$ac_file" : 'X\(/\)' \| \
12486 . : '\(.\)' 2>/dev/null ||
12487echo X"$ac_file" |
12488 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12489 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12490 /^X\(\/\/\)$/{ s//\1/; q; }
12491 /^X\(\/\).*/{ s//\1/; q; }
12492 s/.*/./; q'`
12493 { if $as_mkdir_p; then
12494 mkdir -p "$ac_dir"
12495 else
12496 as_dir="$ac_dir"
12497 as_dirs=
12498 while test ! -d "$as_dir"; do
12499 as_dirs="$as_dir $as_dirs"
12500 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12501$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12502 X"$as_dir" : 'X\(//\)[^/]' \| \
12503 X"$as_dir" : 'X\(//\)$' \| \
12504 X"$as_dir" : 'X\(/\)' \| \
12505 . : '\(.\)' 2>/dev/null ||
12506echo X"$as_dir" |
12507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12508 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12509 /^X\(\/\/\)$/{ s//\1/; q; }
12510 /^X\(\/\).*/{ s//\1/; q; }
12511 s/.*/./; q'`
12512 done
12513 test ! -n "$as_dirs" || mkdir $as_dirs
12514 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12515echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12516 { (exit 1); exit 1; }; }; }
6e3f3080 12517
ba479fd2
NN
12518 ac_builddir=.
12519
12520if test "$ac_dir" != .; then
12521 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12522 # A "../" for each directory in $ac_dir_suffix.
12523 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12524else
12525 ac_dir_suffix= ac_top_builddir=
12526fi
12527
12528case $srcdir in
12529 .) # No --srcdir option. We are building in place.
12530 ac_srcdir=.
12531 if test -z "$ac_top_builddir"; then
12532 ac_top_srcdir=.
12533 else
12534 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12535 fi ;;
12536 [\\/]* | ?:[\\/]* ) # Absolute path.
12537 ac_srcdir=$srcdir$ac_dir_suffix;
12538 ac_top_srcdir=$srcdir ;;
12539 *) # Relative path.
12540 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12541 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12542esac
12543# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12544# absolute.
12545ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12546ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12547ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12548ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12549
12550
12551
12552 if test x"$ac_file" != x-; then
12553 { echo "$as_me:$LINENO: creating $ac_file" >&5
12554echo "$as_me: creating $ac_file" >&6;}
12555 rm -f "$ac_file"
12556 fi
12557 # Let's still pretend it is `configure' which instantiates (i.e., don't
12558 # use $as_me), people would be surprised to read:
12559 # /* config.h. Generated by config.status. */
12560 if test x"$ac_file" = x-; then
12561 configure_input=
12562 else
12563 configure_input="$ac_file. "
12564 fi
12565 configure_input=$configure_input"Generated from `echo $ac_file_in |
12566 sed 's,.*/,,'` by configure."
12567
12568 # First look for the input files in the build tree, otherwise in the
12569 # src tree.
12570 ac_file_inputs=`IFS=:
12571 for f in $ac_file_in; do
12572 case $f in
12573 -) echo $tmp/stdin ;;
12574 [\\/$]*)
12575 # Absolute (can't be DOS-style, as IFS=:)
12576 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12577echo "$as_me: error: cannot find input file: $f" >&2;}
12578 { (exit 1); exit 1; }; }
12579 echo $f;;
12580 *) # Relative
12581 if test -f "$f"; then
12582 # Build tree
12583 echo $f
12584 elif test -f "$srcdir/$f"; then
12585 # Source tree
12586 echo $srcdir/$f
12587 else
12588 # /dev/null tree
12589 { { 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 fi;;
12593 esac
12594 done` || { (exit 1); exit 1; }
12595_ACEOF
12596cat >>$CONFIG_STATUS <<_ACEOF
12597 sed "$ac_vpsub
12598$extrasub
12599_ACEOF
12600cat >>$CONFIG_STATUS <<\_ACEOF
12601:t
12602/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12603s,@configure_input@,$configure_input,;t t
12604s,@srcdir@,$ac_srcdir,;t t
12605s,@abs_srcdir@,$ac_abs_srcdir,;t t
12606s,@top_srcdir@,$ac_top_srcdir,;t t
12607s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
12608s,@builddir@,$ac_builddir,;t t
12609s,@abs_builddir@,$ac_abs_builddir,;t t
12610s,@top_builddir@,$ac_top_builddir,;t t
12611s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
12612" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12613 rm -f $tmp/stdin
12614 if test x"$ac_file" != x-; then
12615 mv $tmp/out $ac_file
12616 else
12617 cat $tmp/out
12618 rm -f $tmp/out
12619 fi
12620
12621done
12622_ACEOF
12623cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 12624
ba479fd2
NN
12625#
12626# CONFIG_HEADER section.
12627#
861bb6c1
JL
12628
12629# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12630# NAME is the cpp macro being defined and VALUE is the value it is being given.
12631#
12632# ac_d sets the value in "#define NAME VALUE" lines.
ba479fd2
NN
12633ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
12634ac_dB='[ ].*$,\1#\2'
12635ac_dC=' '
12636ac_dD=',;t'
12637# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12638ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
12639ac_uB='$,\1#\2define\3'
861bb6c1 12640ac_uC=' '
ba479fd2
NN
12641ac_uD=',;t'
12642
12643for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 12644 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
12645 case $ac_file in
12646 - | *:- | *:-:* ) # input from stdin
12647 cat >$tmp/stdin
12648 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12649 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12650 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12651 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12652 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
12653 esac
12654
ba479fd2
NN
12655 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
12656echo "$as_me: creating $ac_file" >&6;}
12657
12658 # First look for the input files in the build tree, otherwise in the
12659 # src tree.
12660 ac_file_inputs=`IFS=:
12661 for f in $ac_file_in; do
12662 case $f in
12663 -) echo $tmp/stdin ;;
12664 [\\/$]*)
12665 # Absolute (can't be DOS-style, as IFS=:)
12666 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12667echo "$as_me: error: cannot find input file: $f" >&2;}
12668 { (exit 1); exit 1; }; }
12669 echo $f;;
12670 *) # Relative
12671 if test -f "$f"; then
12672 # Build tree
12673 echo $f
12674 elif test -f "$srcdir/$f"; then
12675 # Source tree
12676 echo $srcdir/$f
12677 else
12678 # /dev/null tree
12679 { { 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 fi;;
12683 esac
12684 done` || { (exit 1); exit 1; }
12685 # Remove the trailing spaces.
12686 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
12687
12688_ACEOF
12689
12690# Transform confdefs.h into two sed scripts, `conftest.defines' and
12691# `conftest.undefs', that substitutes the proper values into
12692# config.h.in to produce config.h. The first handles `#define'
12693# templates, and the second `#undef' templates.
12694# And first: Protect against being on the right side of a sed subst in
12695# config.status. Protect against being in an unquoted here document
12696# in config.status.
12697rm -f conftest.defines conftest.undefs
12698# Using a here document instead of a string reduces the quoting nightmare.
12699# Putting comments in sed scripts is not portable.
12700#
12701# `end' is used to avoid that the second main sed command (meant for
12702# 0-ary CPP macros) applies to n-ary macro definitions.
12703# See the Autoconf documentation for `clear'.
12704cat >confdef2sed.sed <<\_ACEOF
12705s/[\\&,]/\\&/g
12706s,[\\$`],\\&,g
12707t clear
12708: clear
12709s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
12710t end
12711s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
12712: end
12713_ACEOF
12714# If some macros were called several times there might be several times
12715# the same #defines, which is useless. Nevertheless, we may not want to
12716# sort them, since we want the *last* AC-DEFINE to be honored.
12717uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
12718sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
12719rm -f confdef2sed.sed
861bb6c1
JL
12720
12721# This sed command replaces #undef with comments. This is necessary, for
12722# example, in the case of _POSIX_SOURCE, which is predefined and required
12723# on some systems where configure will not decide to define it.
ba479fd2
NN
12724cat >>conftest.undefs <<\_ACEOF
12725s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
12726_ACEOF
12727
12728# Break up conftest.defines because some shells have a limit on the size
12729# of here documents, and old seds have small limits too (100 cmds).
12730echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
12731echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
12732echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
12733echo ' :' >>$CONFIG_STATUS
12734rm -f conftest.tail
12735while grep . conftest.defines >/dev/null
12736do
12737 # Write a limited-size here document to $tmp/defines.sed.
12738 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
12739 # Speed up: don't consider the non `#define' lines.
12740 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
12741 # Work around the forget-to-reset-the-flag bug.
12742 echo 't clr' >>$CONFIG_STATUS
12743 echo ': clr' >>$CONFIG_STATUS
12744 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
12745 echo 'CEOF
12746 sed -f $tmp/defines.sed $tmp/in >$tmp/out
12747 rm -f $tmp/in
12748 mv $tmp/out $tmp/in
12749' >>$CONFIG_STATUS
12750 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
12751 rm -f conftest.defines
12752 mv conftest.tail conftest.defines
12753done
12754rm -f conftest.defines
12755echo ' fi # grep' >>$CONFIG_STATUS
12756echo >>$CONFIG_STATUS
861bb6c1 12757
ba479fd2
NN
12758# Break up conftest.undefs because some shells have a limit on the size
12759# of here documents, and old seds have small limits too (100 cmds).
12760echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 12761rm -f conftest.tail
ba479fd2 12762while grep . conftest.undefs >/dev/null
861bb6c1 12763do
ba479fd2
NN
12764 # Write a limited-size here document to $tmp/undefs.sed.
12765 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
12766 # Speed up: don't consider the non `#undef'
12767 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
12768 # Work around the forget-to-reset-the-flag bug.
12769 echo 't clr' >>$CONFIG_STATUS
12770 echo ': clr' >>$CONFIG_STATUS
12771 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 12772 echo 'CEOF
ba479fd2
NN
12773 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
12774 rm -f $tmp/in
12775 mv $tmp/out $tmp/in
12776' >>$CONFIG_STATUS
12777 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
12778 rm -f conftest.undefs
12779 mv conftest.tail conftest.undefs
861bb6c1 12780done
ba479fd2
NN
12781rm -f conftest.undefs
12782
12783cat >>$CONFIG_STATUS <<\_ACEOF
12784 # Let's still pretend it is `configure' which instantiates (i.e., don't
12785 # use $as_me), people would be surprised to read:
12786 # /* config.h. Generated by config.status. */
12787 if test x"$ac_file" = x-; then
12788 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 12789 else
ba479fd2 12790 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 12791 fi
ba479fd2
NN
12792 cat $tmp/in >>$tmp/config.h
12793 rm -f $tmp/in
12794 if test x"$ac_file" != x-; then
12795 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
12796 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
12797echo "$as_me: $ac_file is unchanged" >&6;}
12798 else
12799 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12800$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12801 X"$ac_file" : 'X\(//\)[^/]' \| \
12802 X"$ac_file" : 'X\(//\)$' \| \
12803 X"$ac_file" : 'X\(/\)' \| \
12804 . : '\(.\)' 2>/dev/null ||
12805echo X"$ac_file" |
12806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12807 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12808 /^X\(\/\/\)$/{ s//\1/; q; }
12809 /^X\(\/\).*/{ s//\1/; q; }
12810 s/.*/./; q'`
12811 { if $as_mkdir_p; then
12812 mkdir -p "$ac_dir"
12813 else
12814 as_dir="$ac_dir"
12815 as_dirs=
12816 while test ! -d "$as_dir"; do
12817 as_dirs="$as_dir $as_dirs"
12818 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12819$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12820 X"$as_dir" : 'X\(//\)[^/]' \| \
12821 X"$as_dir" : 'X\(//\)$' \| \
12822 X"$as_dir" : 'X\(/\)' \| \
12823 . : '\(.\)' 2>/dev/null ||
12824echo X"$as_dir" |
12825 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12826 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12827 /^X\(\/\/\)$/{ s//\1/; q; }
12828 /^X\(\/\).*/{ s//\1/; q; }
12829 s/.*/./; q'`
12830 done
12831 test ! -n "$as_dirs" || mkdir $as_dirs
12832 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12833echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12834 { (exit 1); exit 1; }; }; }
63cf211a 12835
ba479fd2
NN
12836 rm -f $ac_file
12837 mv $tmp/config.h $ac_file
12838 fi
12839 else
12840 cat $tmp/config.h
12841 rm -f $tmp/config.h
12842 fi
12843done
12844_ACEOF
12845cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 12846
ba479fd2
NN
12847#
12848# CONFIG_COMMANDS section.
12849#
12850for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12851 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12852 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12853 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
12854$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12855 X"$ac_dest" : 'X\(//\)[^/]' \| \
12856 X"$ac_dest" : 'X\(//\)$' \| \
12857 X"$ac_dest" : 'X\(/\)' \| \
12858 . : '\(.\)' 2>/dev/null ||
12859echo X"$ac_dest" |
12860 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12861 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12862 /^X\(\/\/\)$/{ s//\1/; q; }
12863 /^X\(\/\).*/{ s//\1/; q; }
12864 s/.*/./; q'`
12865 ac_builddir=.
12866
12867if test "$ac_dir" != .; then
12868 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12869 # A "../" for each directory in $ac_dir_suffix.
12870 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12871else
12872 ac_dir_suffix= ac_top_builddir=
12873fi
12874
12875case $srcdir in
12876 .) # No --srcdir option. We are building in place.
12877 ac_srcdir=.
12878 if test -z "$ac_top_builddir"; then
12879 ac_top_srcdir=.
12880 else
12881 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12882 fi ;;
12883 [\\/]* | ?:[\\/]* ) # Absolute path.
12884 ac_srcdir=$srcdir$ac_dir_suffix;
12885 ac_top_srcdir=$srcdir ;;
12886 *) # Relative path.
12887 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12888 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12889esac
12890# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12891# absolute.
12892ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12893ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12894ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12895ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12896
12897
12898 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
12899echo "$as_me: executing $ac_dest commands" >&6;}
12900 case $ac_dest in
12901 default )
f1faaabd
NN
12902case ${CONFIG_HEADERS} in
12903 *auto-host.h:config.in*)
12904 echo > cstamp-h ;;
861bb6c1 12905esac
2ed26f6b 12906# Make sure all the subdirs exist.
c406e779 12907for d in $subdirs
2ed26f6b 12908do
2ed26f6b 12909 test -d $d || mkdir $d
2ed26f6b 12910done
93cf819d
BK
12911# If the host supports symlinks, point stage[1234] at ../stage[1234] so
12912# bootstrapping and the installation procedure can still use
12913# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
12914# FLAGS_TO_PASS has been modified to solve the problem there.
12915# This is virtually a duplicate of what happens in configure.lang; we do
12916# an extra check to make sure this only happens if ln -s can be used.
75bffa71 12917if test "$symbolic_link" = "ln -s"; then
c406e779 12918 for d in ${subdirs} fixinc ; do
1e6347d8 12919 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 12920 cd $d
6a1b7268 12921 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
12922 do
12923 rm -f $t
12924 $symbolic_link ../$t $t 2>/dev/null
12925 done
12926 cd $STARTDIR
93cf819d
BK
12927 done
12928else true ; fi
ba479fd2
NN
12929 ;;
12930 esac
12931done
12932_ACEOF
cafe096b 12933
ba479fd2
NN
12934cat >>$CONFIG_STATUS <<\_ACEOF
12935
12936{ (exit 0); exit 0; }
12937_ACEOF
861bb6c1 12938chmod +x $CONFIG_STATUS
ba479fd2
NN
12939ac_clean_files=$ac_clean_files_save
12940
12941
12942# configure is writing to config.log, and then calls config.status.
12943# config.status does its own redirection, appending to config.log.
12944# Unfortunately, on DOS this fails, as config.log is still kept open
12945# by configure, so config.status won't be able to write to it; its
12946# output is simply discarded. So we exec the FD to /dev/null,
12947# effectively closing config.log, so it can be properly (re)opened and
12948# appended to by config.status. When coming back to configure, we
12949# need to make the FD available again.
12950if test "$no_create" != yes; then
12951 ac_cs_success=:
12952 ac_config_status_args=
12953 test "$silent" = yes &&
12954 ac_config_status_args="$ac_config_status_args --quiet"
12955 exec 5>/dev/null
12956 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12957 exec 5>>config.log
12958 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12959 # would make configure fail if this is the last instruction.
12960 $ac_cs_success || { (exit 1); exit 1; }
12961fi
861bb6c1 12962