]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
check_performance: Only compile with $THREAD_FLAG when test is marked to require it.
[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
a541f69d 311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_extra_gcc_objs host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS'
ba479fd2 312ac_subst_files='language_hooks'
861bb6c1
JL
313
314# Initialize some variables set by options.
ba479fd2
NN
315ac_init_help=
316ac_init_version=false
861bb6c1
JL
317# The variables have the same names as the options, with
318# dashes changed to underlines.
ba479fd2 319cache_file=/dev/null
861bb6c1 320exec_prefix=NONE
861bb6c1 321no_create=
861bb6c1
JL
322no_recursion=
323prefix=NONE
324program_prefix=NONE
325program_suffix=NONE
326program_transform_name=s,x,x,
327silent=
328site=
329srcdir=
861bb6c1
JL
330verbose=
331x_includes=NONE
332x_libraries=NONE
ba479fd2
NN
333
334# Installation directory options.
335# These are left unexpanded so users can "make install exec_prefix=/foo"
336# and all the variables that are supposed to be based on exec_prefix
337# by default will actually change.
338# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
339bindir='${exec_prefix}/bin'
340sbindir='${exec_prefix}/sbin'
341libexecdir='${exec_prefix}/libexec'
342datadir='${prefix}/share'
343sysconfdir='${prefix}/etc'
344sharedstatedir='${prefix}/com'
345localstatedir='${prefix}/var'
346libdir='${exec_prefix}/lib'
347includedir='${prefix}/include'
348oldincludedir='/usr/include'
349infodir='${prefix}/info'
350mandir='${prefix}/man'
351
861bb6c1
JL
352ac_prev=
353for ac_option
354do
861bb6c1
JL
355 # If the previous option needs an argument, assign it.
356 if test -n "$ac_prev"; then
357 eval "$ac_prev=\$ac_option"
358 ac_prev=
359 continue
360 fi
361
ba479fd2 362 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
363
364 # Accept the important Cygnus configure options, so we can diagnose typos.
365
ba479fd2 366 case $ac_option in
861bb6c1
JL
367
368 -bindir | --bindir | --bindi | --bind | --bin | --bi)
369 ac_prev=bindir ;;
370 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 371 bindir=$ac_optarg ;;
861bb6c1
JL
372
373 -build | --build | --buil | --bui | --bu)
ba479fd2 374 ac_prev=build_alias ;;
861bb6c1 375 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 376 build_alias=$ac_optarg ;;
861bb6c1
JL
377
378 -cache-file | --cache-file | --cache-fil | --cache-fi \
379 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380 ac_prev=cache_file ;;
381 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
383 cache_file=$ac_optarg ;;
384
385 --config-cache | -C)
386 cache_file=config.cache ;;
861bb6c1
JL
387
388 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389 ac_prev=datadir ;;
390 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391 | --da=*)
ba479fd2 392 datadir=$ac_optarg ;;
861bb6c1
JL
393
394 -disable-* | --disable-*)
ba479fd2 395 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 396 # Reject names that are not valid shell variable names.
ba479fd2
NN
397 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399 { (exit 1); exit 1; }; }
400 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
402
403 -enable-* | --enable-*)
ba479fd2 404 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 405 # Reject names that are not valid shell variable names.
ba479fd2
NN
406 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408 { (exit 1); exit 1; }; }
409 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410 case $ac_option in
411 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
412 *) ac_optarg=yes ;;
413 esac
ba479fd2 414 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
415
416 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418 | --exec | --exe | --ex)
419 ac_prev=exec_prefix ;;
420 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422 | --exec=* | --exe=* | --ex=*)
ba479fd2 423 exec_prefix=$ac_optarg ;;
861bb6c1
JL
424
425 -gas | --gas | --ga | --g)
426 # Obsolete; use --with-gas.
427 with_gas=yes ;;
428
ba479fd2
NN
429 -help | --help | --hel | --he | -h)
430 ac_init_help=long ;;
431 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432 ac_init_help=recursive ;;
433 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434 ac_init_help=short ;;
861bb6c1
JL
435
436 -host | --host | --hos | --ho)
ba479fd2 437 ac_prev=host_alias ;;
861bb6c1 438 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 439 host_alias=$ac_optarg ;;
861bb6c1
JL
440
441 -includedir | --includedir | --includedi | --included | --include \
442 | --includ | --inclu | --incl | --inc)
443 ac_prev=includedir ;;
444 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 446 includedir=$ac_optarg ;;
861bb6c1
JL
447
448 -infodir | --infodir | --infodi | --infod | --info | --inf)
449 ac_prev=infodir ;;
450 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 451 infodir=$ac_optarg ;;
861bb6c1
JL
452
453 -libdir | --libdir | --libdi | --libd)
454 ac_prev=libdir ;;
455 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 456 libdir=$ac_optarg ;;
861bb6c1
JL
457
458 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459 | --libexe | --libex | --libe)
460 ac_prev=libexecdir ;;
461 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462 | --libexe=* | --libex=* | --libe=*)
ba479fd2 463 libexecdir=$ac_optarg ;;
861bb6c1
JL
464
465 -localstatedir | --localstatedir | --localstatedi | --localstated \
466 | --localstate | --localstat | --localsta | --localst \
467 | --locals | --local | --loca | --loc | --lo)
468 ac_prev=localstatedir ;;
469 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 472 localstatedir=$ac_optarg ;;
861bb6c1
JL
473
474 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475 ac_prev=mandir ;;
476 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 477 mandir=$ac_optarg ;;
861bb6c1
JL
478
479 -nfp | --nfp | --nf)
480 # Obsolete; use --without-fp.
481 with_fp=no ;;
482
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 484 | --no-cr | --no-c | -n)
861bb6c1
JL
485 no_create=yes ;;
486
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489 no_recursion=yes ;;
490
491 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493 | --oldin | --oldi | --old | --ol | --o)
494 ac_prev=oldincludedir ;;
495 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 498 oldincludedir=$ac_optarg ;;
861bb6c1
JL
499
500 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501 ac_prev=prefix ;;
502 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 503 prefix=$ac_optarg ;;
861bb6c1
JL
504
505 -program-prefix | --program-prefix | --program-prefi | --program-pref \
506 | --program-pre | --program-pr | --program-p)
507 ac_prev=program_prefix ;;
508 -program-prefix=* | --program-prefix=* | --program-prefi=* \
509 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 510 program_prefix=$ac_optarg ;;
861bb6c1
JL
511
512 -program-suffix | --program-suffix | --program-suffi | --program-suff \
513 | --program-suf | --program-su | --program-s)
514 ac_prev=program_suffix ;;
515 -program-suffix=* | --program-suffix=* | --program-suffi=* \
516 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 517 program_suffix=$ac_optarg ;;
861bb6c1
JL
518
519 -program-transform-name | --program-transform-name \
520 | --program-transform-nam | --program-transform-na \
521 | --program-transform-n | --program-transform- \
522 | --program-transform | --program-transfor \
523 | --program-transfo | --program-transf \
524 | --program-trans | --program-tran \
525 | --progr-tra | --program-tr | --program-t)
526 ac_prev=program_transform_name ;;
527 -program-transform-name=* | --program-transform-name=* \
528 | --program-transform-nam=* | --program-transform-na=* \
529 | --program-transform-n=* | --program-transform-=* \
530 | --program-transform=* | --program-transfor=* \
531 | --program-transfo=* | --program-transf=* \
532 | --program-trans=* | --program-tran=* \
533 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 534 program_transform_name=$ac_optarg ;;
861bb6c1
JL
535
536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537 | -silent | --silent | --silen | --sile | --sil)
538 silent=yes ;;
539
540 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541 ac_prev=sbindir ;;
542 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543 | --sbi=* | --sb=*)
ba479fd2 544 sbindir=$ac_optarg ;;
861bb6c1
JL
545
546 -sharedstatedir | --sharedstatedir | --sharedstatedi \
547 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548 | --sharedst | --shareds | --shared | --share | --shar \
549 | --sha | --sh)
550 ac_prev=sharedstatedir ;;
551 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554 | --sha=* | --sh=*)
ba479fd2 555 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
556
557 -site | --site | --sit)
558 ac_prev=site ;;
559 -site=* | --site=* | --sit=*)
ba479fd2 560 site=$ac_optarg ;;
861bb6c1
JL
561
562 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563 ac_prev=srcdir ;;
564 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 565 srcdir=$ac_optarg ;;
861bb6c1
JL
566
567 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568 | --syscon | --sysco | --sysc | --sys | --sy)
569 ac_prev=sysconfdir ;;
570 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 572 sysconfdir=$ac_optarg ;;
861bb6c1
JL
573
574 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 575 ac_prev=target_alias ;;
861bb6c1 576 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 577 target_alias=$ac_optarg ;;
861bb6c1
JL
578
579 -v | -verbose | --verbose | --verbos | --verbo | --verb)
580 verbose=yes ;;
581
ba479fd2
NN
582 -version | --version | --versio | --versi | --vers | -V)
583 ac_init_version=: ;;
861bb6c1
JL
584
585 -with-* | --with-*)
ba479fd2 586 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 587 # Reject names that are not valid shell variable names.
ba479fd2
NN
588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
861bb6c1 591 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
592 case $ac_option in
593 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
594 *) ac_optarg=yes ;;
595 esac
ba479fd2 596 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
597
598 -without-* | --without-*)
ba479fd2 599 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 600 # Reject names that are not valid shell variable names.
ba479fd2
NN
601 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602 { echo "$as_me: error: invalid package name: $ac_package" >&2
603 { (exit 1); exit 1; }; }
604 ac_package=`echo $ac_package | sed 's/-/_/g'`
605 eval "with_$ac_package=no" ;;
861bb6c1
JL
606
607 --x)
608 # Obsolete; use --with-x.
609 with_x=yes ;;
610
611 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612 | --x-incl | --x-inc | --x-in | --x-i)
613 ac_prev=x_includes ;;
614 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 616 x_includes=$ac_optarg ;;
861bb6c1
JL
617
618 -x-libraries | --x-libraries | --x-librarie | --x-librari \
619 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620 ac_prev=x_libraries ;;
621 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 623 x_libraries=$ac_optarg ;;
861bb6c1 624
ba479fd2
NN
625 -*) { echo "$as_me: error: unrecognized option: $ac_option
626Try \`$0 --help' for more information." >&2
627 { (exit 1); exit 1; }; }
861bb6c1
JL
628 ;;
629
ba479fd2
NN
630 *=*)
631 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632 # Reject names that are not valid shell variable names.
633 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635 { (exit 1); exit 1; }; }
636 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637 eval "$ac_envvar='$ac_optarg'"
638 export $ac_envvar ;;
639
861bb6c1 640 *)
ba479fd2
NN
641 # FIXME: should be removed in autoconf 3.0.
642 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
646 ;;
647
648 esac
649done
650
651if test -n "$ac_prev"; then
ba479fd2
NN
652 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653 { echo "$as_me: error: missing argument to $ac_option" >&2
654 { (exit 1); exit 1; }; }
63cf211a 655fi
63cf211a 656
ba479fd2
NN
657# Be sure to have absolute paths.
658for ac_var in exec_prefix prefix
659do
660 eval ac_val=$`echo $ac_var`
661 case $ac_val in
662 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664 { (exit 1); exit 1; }; };;
665 esac
666done
093e61a6 667
ba479fd2
NN
668# Be sure to have absolute paths.
669for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 671do
ba479fd2
NN
672 eval ac_val=$`echo $ac_var`
673 case $ac_val in
674 [\\/$]* | ?:[\\/]* ) ;;
675 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676 { (exit 1); exit 1; }; };;
861bb6c1
JL
677 esac
678done
679
ba479fd2
NN
680# There might be people who depend on the old broken behavior: `$host'
681# used to hold the argument of --host etc.
682# FIXME: To remove some day.
683build=$build_alias
684host=$host_alias
685target=$target_alias
686
687# FIXME: To remove some day.
688if test "x$host_alias" != x; then
689 if test "x$build_alias" = x; then
690 cross_compiling=maybe
691 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692 If a cross compiler is detected then cross compile mode will be used." >&2
693 elif test "x$build_alias" != "x$host_alias"; then
694 cross_compiling=yes
695 fi
696fi
6e3f3080 697
ba479fd2
NN
698ac_tool_prefix=
699test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701test "$silent" = yes && exec 6>/dev/null
861bb6c1 702
861bb6c1
JL
703
704# Find the source files, if location was not specified.
705if test -z "$srcdir"; then
706 ac_srcdir_defaulted=yes
707 # Try the directory containing this script, then its parent.
ba479fd2
NN
708 ac_confdir=`(dirname "$0") 2>/dev/null ||
709$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710 X"$0" : 'X\(//\)[^/]' \| \
711 X"$0" : 'X\(//\)$' \| \
712 X"$0" : 'X\(/\)' \| \
713 . : '\(.\)' 2>/dev/null ||
714echo X"$0" |
715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717 /^X\(\/\/\)$/{ s//\1/; q; }
718 /^X\(\/\).*/{ s//\1/; q; }
719 s/.*/./; q'`
861bb6c1
JL
720 srcdir=$ac_confdir
721 if test ! -r $srcdir/$ac_unique_file; then
722 srcdir=..
723 fi
724else
725 ac_srcdir_defaulted=no
726fi
727if test ! -r $srcdir/$ac_unique_file; then
728 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
729 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730 { (exit 1); exit 1; }; }
63cf211a 731 else
ba479fd2
NN
732 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733 { (exit 1); exit 1; }; }
63cf211a
NN
734 fi
735fi
ba479fd2
NN
736(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738 { (exit 1); exit 1; }; }
739srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740ac_env_build_alias_set=${build_alias+set}
741ac_env_build_alias_value=$build_alias
742ac_cv_env_build_alias_set=${build_alias+set}
743ac_cv_env_build_alias_value=$build_alias
744ac_env_host_alias_set=${host_alias+set}
745ac_env_host_alias_value=$host_alias
746ac_cv_env_host_alias_set=${host_alias+set}
747ac_cv_env_host_alias_value=$host_alias
748ac_env_target_alias_set=${target_alias+set}
749ac_env_target_alias_value=$target_alias
750ac_cv_env_target_alias_set=${target_alias+set}
751ac_cv_env_target_alias_value=$target_alias
752ac_env_CC_set=${CC+set}
753ac_env_CC_value=$CC
754ac_cv_env_CC_set=${CC+set}
755ac_cv_env_CC_value=$CC
756ac_env_CFLAGS_set=${CFLAGS+set}
757ac_env_CFLAGS_value=$CFLAGS
758ac_cv_env_CFLAGS_set=${CFLAGS+set}
759ac_cv_env_CFLAGS_value=$CFLAGS
760ac_env_LDFLAGS_set=${LDFLAGS+set}
761ac_env_LDFLAGS_value=$LDFLAGS
762ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763ac_cv_env_LDFLAGS_value=$LDFLAGS
764ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765ac_env_CPPFLAGS_value=$CPPFLAGS
766ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768ac_env_CPP_set=${CPP+set}
769ac_env_CPP_value=$CPP
770ac_cv_env_CPP_set=${CPP+set}
771ac_cv_env_CPP_value=$CPP
63cf211a 772
ba479fd2
NN
773#
774# Report the --help message.
775#
776if test "$ac_init_help" = "long"; then
777 # Omit some internal or obsolete options to make the list less imposing.
778 # This message is too long to be a string in the A/UX 3.1 sh.
779 cat <<_ACEOF
780\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 781
ba479fd2 782Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 783
ba479fd2
NN
784To assign environment variables (e.g., CC, CFLAGS...), specify them as
785VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 786
ba479fd2 787Defaults for the options are specified in brackets.
861bb6c1 788
ba479fd2
NN
789Configuration:
790 -h, --help display this help and exit
791 --help=short display options specific to this package
792 --help=recursive display the short help of all the included packages
793 -V, --version display version information and exit
794 -q, --quiet, --silent do not print \`checking...' messages
795 --cache-file=FILE cache test results in FILE [disabled]
796 -C, --config-cache alias for \`--cache-file=config.cache'
797 -n, --no-create do not create output files
798 --srcdir=DIR find the sources in DIR [configure dir or \`..']
799
800_ACEOF
801
802 cat <<_ACEOF
803Installation directories:
804 --prefix=PREFIX install architecture-independent files in PREFIX
805 [$ac_default_prefix]
806 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
807 [PREFIX]
861bb6c1 808
ba479fd2
NN
809By default, \`make install' will install all the files in
810\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
811an installation prefix other than \`$ac_default_prefix' using \`--prefix',
812for instance \`--prefix=\$HOME'.
13c22933 813
ba479fd2 814For better control, use the options below.
13c22933 815
ba479fd2
NN
816Fine tuning of the installation directories:
817 --bindir=DIR user executables [EPREFIX/bin]
818 --sbindir=DIR system admin executables [EPREFIX/sbin]
819 --libexecdir=DIR program executables [EPREFIX/libexec]
820 --datadir=DIR read-only architecture-independent data [PREFIX/share]
821 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
822 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
823 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
824 --libdir=DIR object code libraries [EPREFIX/lib]
825 --includedir=DIR C header files [PREFIX/include]
826 --oldincludedir=DIR C header files for non-gcc [/usr/include]
827 --infodir=DIR info documentation [PREFIX/info]
828 --mandir=DIR man documentation [PREFIX/man]
829_ACEOF
13c22933 830
ba479fd2 831 cat <<\_ACEOF
13c22933 832
ba479fd2
NN
833Program names:
834 --program-prefix=PREFIX prepend PREFIX to installed program names
835 --program-suffix=SUFFIX append SUFFIX to installed program names
836 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 837
ba479fd2
NN
838System types:
839 --build=BUILD configure for building on BUILD [guessed]
840 --host=HOST cross-compile to build programs to run on HOST [BUILD]
841 --target=TARGET configure for building compilers for TARGET [HOST]
842_ACEOF
13c22933
JJ
843fi
844
ba479fd2 845if test -n "$ac_init_help"; then
13c22933 846
ba479fd2 847 cat <<\_ACEOF
13c22933 848
ba479fd2
NN
849Optional Features:
850 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
851 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
852 --enable-generated-files-in-srcdir
853 put copies of generated files in source dir
854 intended for creating source tarballs for users
855 without texinfo bison or flex.
ba479fd2
NN
856 --enable-werror enable -Werror in bootstrap stage2 and later
857 --enable-checking=LIST
858 enable expensive run-time checks. With LIST,
859 enable only specific categories of checks.
860 Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
861 default is misc,tree,gc,rtlflag
862 --enable-coverage=LEVEL
863 enable compiler\'s code coverage collection.
864 Use to measure compiler performance and locate
865 unused parts of the compiler. With LEVEL, specify
866 optimization. Values are opt, noopt,
867 default is noopt
868 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
869 --enable-multilib enable library support for multiple ABIs
870 --enable-__cxa_atexit enable __cxa_atexit for C++
871 --enable-threads enable thread usage for target GCC
872 --enable-threads=LIB use LIB thread package for target GCC
873 --enable-objc-gc enable the use of Boehm's garbage collector with
874 the GNU Objective-C runtime
875 --disable-shared don't provide a shared libgcc
876 --enable-intermodule build the compiler in one step
877 --enable-initfini-array use .init_array/.fini_array sections
878 --enable-sjlj-exceptions
879 arrange to use setjmp/longjmp exception handling
880 --enable-libunwind-exceptions force use libunwind for exceptions
881 --disable-win32-registry
882 disable lookup of installation paths in the
883 Registry on Windows hosts
884 --enable-win32-registry enable registry lookup (default)
885 --enable-win32-registry=KEY
886 use KEY instead of GCC version as the last portion
887 of the registry key
888 --enable-maintainer-mode
889 enable make rules and dependencies not useful
890 (and sometimes confusing) to the casual installer
891 --enable-version-specific-runtime-libs
892 specify that runtime libraries should be
893 installed in a compiler-specific directory
093e61a6 894
ba479fd2
NN
895Optional Packages:
896 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
897 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
898 --with-local-prefix=DIR specifies directory to put local include
899 --with-gxx-include-dir=DIR
900 specifies directory to put g++ header files
901 --with-cpp-install-dir=DIR
902 install the user visible C preprocessor in DIR
903 (relative to PREFIX) as well as PREFIX/bin
904 --with-gnu-ld arrange to work with GNU ld.
905 --with-ld arrange to use the specified ld (full pathname)
906 --with-gnu-as arrange to work with GNU as
907 --with-as arrange to use the specified as (full pathname)
908 --with-stabs arrange to use stabs instead of host debug format
909 --with-dwarf2 force the default debug format to be DWARF 2
910 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
911 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
59415997 912 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
913 with the compiler
914 --with-system-zlib use installed libz
915 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 916
ba479fd2
NN
917Some influential environment variables:
918 CC C compiler command
919 CFLAGS C compiler flags
920 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
921 nonstandard directory <lib dir>
922 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
923 headers in a nonstandard directory <include dir>
924 CPP C preprocessor
13c22933 925
ba479fd2
NN
926Use these variables to override the choices made by `configure' or to help
927it to find libraries and programs with nonstandard names/locations.
73458fb7 928
ba479fd2
NN
929_ACEOF
930fi
6e3f3080 931
ba479fd2
NN
932if test "$ac_init_help" = "recursive"; then
933 # If there are subdirs, report their specific --help.
934 ac_popdir=`pwd`
935 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
936 test -d $ac_dir || continue
937 ac_builddir=.
938
939if test "$ac_dir" != .; then
940 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
941 # A "../" for each directory in $ac_dir_suffix.
942 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
943else
944 ac_dir_suffix= ac_top_builddir=
945fi
946
947case $srcdir in
948 .) # No --srcdir option. We are building in place.
949 ac_srcdir=.
950 if test -z "$ac_top_builddir"; then
951 ac_top_srcdir=.
952 else
953 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
954 fi ;;
955 [\\/]* | ?:[\\/]* ) # Absolute path.
956 ac_srcdir=$srcdir$ac_dir_suffix;
957 ac_top_srcdir=$srcdir ;;
958 *) # Relative path.
959 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
960 ac_top_srcdir=$ac_top_builddir$srcdir ;;
961esac
962# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
963# absolute.
964ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
965ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
966ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
967ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
968
969 cd $ac_dir
970 # Check for guested configure; otherwise get Cygnus style configure.
971 if test -f $ac_srcdir/configure.gnu; then
972 echo
973 $SHELL $ac_srcdir/configure.gnu --help=recursive
974 elif test -f $ac_srcdir/configure; then
975 echo
976 $SHELL $ac_srcdir/configure --help=recursive
977 elif test -f $ac_srcdir/configure.ac ||
978 test -f $ac_srcdir/configure.in; then
979 echo
980 $ac_configure --help
981 else
982 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
983 fi
a6a5e4c9 984 cd $ac_popdir
ba479fd2
NN
985 done
986fi
987
988test -n "$ac_init_help" && exit 0
989if $ac_init_version; then
990 cat <<\_ACEOF
991
992Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
993Free Software Foundation, Inc.
994This configure script is free software; the Free Software Foundation
995gives unlimited permission to copy, distribute and modify it.
996_ACEOF
997 exit 0
998fi
999exec 5>config.log
1000cat >&5 <<_ACEOF
1001This file contains any messages produced by compilers while
1002running configure, to aid debugging if configure makes a mistake.
1003
1004It was created by $as_me, which was
1005generated by GNU Autoconf 2.57. Invocation command line was
1006
1007 $ $0 $@
1008
1009_ACEOF
1010{
1011cat <<_ASUNAME
1012## --------- ##
1013## Platform. ##
1014## --------- ##
1015
1016hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1017uname -m = `(uname -m) 2>/dev/null || echo unknown`
1018uname -r = `(uname -r) 2>/dev/null || echo unknown`
1019uname -s = `(uname -s) 2>/dev/null || echo unknown`
1020uname -v = `(uname -v) 2>/dev/null || echo unknown`
1021
1022/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1023/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1024
1025/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1026/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1027/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1028hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1029/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1030/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1031/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1032
1033_ASUNAME
1034
1035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1036for as_dir in $PATH
1037do
1038 IFS=$as_save_IFS
1039 test -z "$as_dir" && as_dir=.
1040 echo "PATH: $as_dir"
1041done
1042
1043} >&5
1044
1045cat >&5 <<_ACEOF
1046
1047
1048## ----------- ##
1049## Core tests. ##
1050## ----------- ##
1051
1052_ACEOF
1053
1054
1055# Keep a trace of the command line.
1056# Strip out --no-create and --no-recursion so they do not pile up.
1057# Strip out --silent because we don't want to record it for future runs.
1058# Also quote any args containing shell meta-characters.
1059# Make two passes to allow for proper duplicate-argument suppression.
1060ac_configure_args=
1061ac_configure_args0=
1062ac_configure_args1=
1063ac_sep=
1064ac_must_keep_next=false
1065for ac_pass in 1 2
1066do
1067 for ac_arg
1068 do
1069 case $ac_arg in
1070 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 continue ;;
1074 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1075 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1076 esac
1077 case $ac_pass in
1078 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1079 2)
1080 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1081 if test $ac_must_keep_next = true; then
1082 ac_must_keep_next=false # Got value, back to normal.
1083 else
1084 case $ac_arg in
1085 *=* | --config-cache | -C | -disable-* | --disable-* \
1086 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1087 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1088 | -with-* | --with-* | -without-* | --without-* | --x)
1089 case "$ac_configure_args0 " in
1090 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1091 esac
1092 ;;
1093 -* ) ac_must_keep_next=true ;;
1094 esac
1095 fi
1096 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1097 # Get rid of the leading space.
1098 ac_sep=" "
1099 ;;
1100 esac
1101 done
1102done
1103$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1104$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1105
1106# When interrupted or exit'd, cleanup temporary files, and complete
1107# config.log. We remove comments because anyway the quotes in there
1108# would cause problems or look ugly.
1109# WARNING: Be sure not to use single quotes in there, as some shells,
1110# such as our DU 5.0 friend, will then `close' the trap.
1111trap 'exit_status=$?
1112 # Save into config.log some information that might help in debugging.
1113 {
1114 echo
1115
1116 cat <<\_ASBOX
1117## ---------------- ##
1118## Cache variables. ##
1119## ---------------- ##
1120_ASBOX
1121 echo
1122 # The following way of writing the cache mishandles newlines in values,
1123{
1124 (set) 2>&1 |
1125 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1126 *ac_space=\ *)
1127 sed -n \
1128 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1129 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1130 ;;
1131 *)
1132 sed -n \
1133 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1134 ;;
1135 esac;
1136}
1137 echo
1138
1139 cat <<\_ASBOX
1140## ----------------- ##
1141## Output variables. ##
1142## ----------------- ##
1143_ASBOX
1144 echo
1145 for ac_var in $ac_subst_vars
1146 do
1147 eval ac_val=$`echo $ac_var`
1148 echo "$ac_var='"'"'$ac_val'"'"'"
1149 done | sort
1150 echo
1151
1152 if test -n "$ac_subst_files"; then
1153 cat <<\_ASBOX
1154## ------------- ##
1155## Output files. ##
1156## ------------- ##
1157_ASBOX
1158 echo
1159 for ac_var in $ac_subst_files
1160 do
1161 eval ac_val=$`echo $ac_var`
1162 echo "$ac_var='"'"'$ac_val'"'"'"
1163 done | sort
1164 echo
1165 fi
1166
1167 if test -s confdefs.h; then
1168 cat <<\_ASBOX
1169## ----------- ##
1170## confdefs.h. ##
1171## ----------- ##
1172_ASBOX
1173 echo
1174 sed "/^$/d" confdefs.h | sort
1175 echo
1176 fi
1177 test "$ac_signal" != 0 &&
1178 echo "$as_me: caught signal $ac_signal"
1179 echo "$as_me: exit $exit_status"
1180 } >&5
a6a5e4c9 1181 rm -f core core.* *.core &&
ba479fd2
NN
1182 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1183 exit $exit_status
1184 ' 0
1185for ac_signal in 1 2 13 15; do
1186 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1187done
1188ac_signal=0
1189
1190# confdefs.h avoids OS command line length limits that DEFS can exceed.
1191rm -rf conftest* confdefs.h
1192# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1193echo >confdefs.h
1194
1195# Predefined preprocessor variables.
1196
1197cat >>confdefs.h <<_ACEOF
1198#define PACKAGE_NAME "$PACKAGE_NAME"
1199_ACEOF
1200
1201
1202cat >>confdefs.h <<_ACEOF
1203#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1204_ACEOF
1205
1206
1207cat >>confdefs.h <<_ACEOF
1208#define PACKAGE_VERSION "$PACKAGE_VERSION"
1209_ACEOF
1210
1211
1212cat >>confdefs.h <<_ACEOF
1213#define PACKAGE_STRING "$PACKAGE_STRING"
1214_ACEOF
1215
1216
1217cat >>confdefs.h <<_ACEOF
1218#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1219_ACEOF
1220
1221
1222# Let the site file select an alternate cache file if it wants to.
1223# Prefer explicitly selected file to automatically selected ones.
1224if test -z "$CONFIG_SITE"; then
1225 if test "x$prefix" != xNONE; then
1226 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1227 else
1228 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1229 fi
1230fi
1231for ac_site_file in $CONFIG_SITE; do
1232 if test -r "$ac_site_file"; then
1233 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1234echo "$as_me: loading site script $ac_site_file" >&6;}
1235 sed 's/^/| /' "$ac_site_file" >&5
1236 . "$ac_site_file"
1237 fi
1238done
1239
1240if test -r "$cache_file"; then
1241 # Some versions of bash will fail to source /dev/null (special
1242 # files actually), so we avoid doing that.
1243 if test -f "$cache_file"; then
1244 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1245echo "$as_me: loading cache $cache_file" >&6;}
1246 case $cache_file in
1247 [\\/]* | ?:[\\/]* ) . $cache_file;;
1248 *) . ./$cache_file;;
1249 esac
1250 fi
1251else
1252 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1253echo "$as_me: creating cache $cache_file" >&6;}
1254 >$cache_file
1255fi
1256
1257# Check that the precious variables saved in the cache have kept the same
1258# value.
1259ac_cache_corrupted=false
1260for ac_var in `(set) 2>&1 |
1261 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1262 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1263 eval ac_new_set=\$ac_env_${ac_var}_set
1264 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1265 eval ac_new_val="\$ac_env_${ac_var}_value"
1266 case $ac_old_set,$ac_new_set in
1267 set,)
1268 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1269echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1270 ac_cache_corrupted=: ;;
1271 ,set)
1272 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1273echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1274 ac_cache_corrupted=: ;;
1275 ,);;
1276 *)
1277 if test "x$ac_old_val" != "x$ac_new_val"; then
1278 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1279echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1280 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1281echo "$as_me: former value: $ac_old_val" >&2;}
1282 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1283echo "$as_me: current value: $ac_new_val" >&2;}
1284 ac_cache_corrupted=:
1285 fi;;
1286 esac
1287 # Pass precious variables to config.status.
1288 if test "$ac_new_set" = set; then
1289 case $ac_new_val in
1290 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1291 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1292 *) ac_arg=$ac_var=$ac_new_val ;;
1293 esac
1294 case " $ac_configure_args " in
1295 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1296 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1297 esac
1298 fi
1299done
1300if $ac_cache_corrupted; then
1301 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1302echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1303 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1304echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1305 { (exit 1); exit 1; }; }
1306fi
1307
1308ac_ext=c
1309ac_cpp='$CPP $CPPFLAGS'
1310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1312ac_compiler_gnu=$ac_cv_c_compiler_gnu
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
914c5af7 1332
ba479fd2
NN
1333 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1334
1335
1336# Determine the host, build, and target systems
1337ac_aux_dir=
1338for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1339 if test -f $ac_dir/install-sh; then
1340 ac_aux_dir=$ac_dir
1341 ac_install_sh="$ac_aux_dir/install-sh -c"
1342 break
1343 elif test -f $ac_dir/install.sh; then
1344 ac_aux_dir=$ac_dir
1345 ac_install_sh="$ac_aux_dir/install.sh -c"
1346 break
1347 elif test -f $ac_dir/shtool; then
1348 ac_aux_dir=$ac_dir
1349 ac_install_sh="$ac_aux_dir/shtool install -c"
1350 break
1351 fi
1352done
1353if test -z "$ac_aux_dir"; then
1354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1355echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1356 { (exit 1); exit 1; }; }
1357fi
1358ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1359ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1360ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1361
1362# Make sure we can run config.sub.
1363$ac_config_sub sun4 >/dev/null 2>&1 ||
1364 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1365echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1366 { (exit 1); exit 1; }; }
1367
1368echo "$as_me:$LINENO: checking build system type" >&5
1369echo $ECHO_N "checking build system type... $ECHO_C" >&6
1370if test "${ac_cv_build+set}" = set; then
1371 echo $ECHO_N "(cached) $ECHO_C" >&6
1372else
1373 ac_cv_build_alias=$build_alias
1374test -z "$ac_cv_build_alias" &&
1375 ac_cv_build_alias=`$ac_config_guess`
1376test -z "$ac_cv_build_alias" &&
1377 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1378echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1379 { (exit 1); exit 1; }; }
1380ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1381 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1382echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1383 { (exit 1); exit 1; }; }
1384
1385fi
1386echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1387echo "${ECHO_T}$ac_cv_build" >&6
1388build=$ac_cv_build
1389build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1390build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1391build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1392
1393
1394echo "$as_me:$LINENO: checking host system type" >&5
1395echo $ECHO_N "checking host system type... $ECHO_C" >&6
1396if test "${ac_cv_host+set}" = set; then
1397 echo $ECHO_N "(cached) $ECHO_C" >&6
1398else
1399 ac_cv_host_alias=$host_alias
1400test -z "$ac_cv_host_alias" &&
1401 ac_cv_host_alias=$ac_cv_build_alias
1402ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1403 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1404echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1405 { (exit 1); exit 1; }; }
1406
1407fi
1408echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1409echo "${ECHO_T}$ac_cv_host" >&6
1410host=$ac_cv_host
1411host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1412host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1413host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1414
1415
1416echo "$as_me:$LINENO: checking target system type" >&5
1417echo $ECHO_N "checking target system type... $ECHO_C" >&6
1418if test "${ac_cv_target+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
1420else
1421 ac_cv_target_alias=$target_alias
1422test "x$ac_cv_target_alias" = "x" &&
1423 ac_cv_target_alias=$ac_cv_host_alias
1424ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1425 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1426echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1427 { (exit 1); exit 1; }; }
1428
1429fi
1430echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1431echo "${ECHO_T}$ac_cv_target" >&6
1432target=$ac_cv_target
1433target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1434target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1435target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1436
1437
1438# The aliases save the names the user supplied, while $host etc.
1439# will get canonicalized.
1440test -n "$target_alias" &&
1441 test "$program_prefix$program_suffix$program_transform_name" = \
1442 NONENONEs,x,x, &&
1443 program_prefix=${target_alias}-
1444
1445# Determine the noncanonical target name, for directory use.
1446 case ${build_alias} in
1447 "") build_noncanonical=${build} ;;
6e3f3080
NN
1448 *) build_noncanonical=${build_alias} ;;
1449esac
73458fb7 1450
4665e56c
NN
1451 case ${host_alias} in
1452 "") host_noncanonical=${build_noncanonical} ;;
1453 *) host_noncanonical=${host_alias} ;;
1454esac
73458fb7 1455
4665e56c
NN
1456 case ${target_alias} in
1457 "") target_noncanonical=${host_noncanonical} ;;
1458 *) target_noncanonical=${target_alias} ;;
1459esac
093e61a6 1460
caa55b1e
NN
1461
1462# Determine the target- and build-specific subdirectories
4665e56c
NN
1463 # Prefix 'build-' so this never conflicts with target_subdir.
1464build_subdir="build-${build_noncanonical}"
1465# Not really a subdirectory, but here for completeness.
1466host_subdir=.
1467# No prefix.
1468target_subdir=${target_noncanonical}
ba479fd2 1469
73458fb7 1470
093e61a6 1471# Set program_transform_name
13c22933 1472test "$program_prefix" != NONE &&
ba479fd2 1473 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1474# Use a double $ so make ignores it.
1475test "$program_suffix" != NONE &&
ba479fd2
NN
1476 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1477# Double any \ or $. echo might interpret backslashes.
1478# By default was `s,x,x', remove it if useless.
1479cat <<\_ACEOF >conftest.sed
1480s/[\\$]/&&/g;s/;s,x,x,$//
1481_ACEOF
1482program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1483rm conftest.sed
13c22933
JJ
1484
1485
34a86c2b
NN
1486# Check for bogus environment variables.
1487# Test if LIBRARY_PATH contains the notation for the current directory
1488# since this would lead to problems installing/building glibc.
1489# LIBRARY_PATH contains the current directory if one of the following
1490# is true:
1491# - one of the terminals (":" and ";") is the first or last sign
1492# - two terminals occur directly after each other
1493# - the path contains an element with a dot in it
ba479fd2
NN
1494echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1495echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1496case ${LIBRARY_PATH} in
1497 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1498 library_path_setting="contains current directory"
1499 ;;
1500 *)
1501 library_path_setting="ok"
1502 ;;
1503esac
ba479fd2
NN
1504echo "$as_me:$LINENO: result: $library_path_setting" >&5
1505echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1506if test "$library_path_setting" != "ok"; then
ba479fd2 1507{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1508*** LIBRARY_PATH shouldn't contain the current directory when
1509*** building gcc. Please change the environment variable
ba479fd2
NN
1510*** and run configure again." >&5
1511echo "$as_me: error:
1512*** LIBRARY_PATH shouldn't contain the current directory when
1513*** building gcc. Please change the environment variable
1514*** and run configure again." >&2;}
1515 { (exit 1); exit 1; }; }
e9a25f70
JL
1516fi
1517
34a86c2b
NN
1518# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1519# since this would lead to problems installing/building glibc.
1520# GCC_EXEC_PREFIX contains the current directory if one of the following
1521# is true:
1522# - one of the terminals (":" and ";") is the first or last sign
1523# - two terminals occur directly after each other
1524# - the path contains an element with a dot in it
ba479fd2
NN
1525echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1526echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1527case ${GCC_EXEC_PREFIX} in
1528 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1529 gcc_exec_prefix_setting="contains current directory"
1530 ;;
1531 *)
1532 gcc_exec_prefix_setting="ok"
1533 ;;
1534esac
ba479fd2
NN
1535echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1536echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1537if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1538{ { echo "$as_me:$LINENO: error:
1539*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1540*** building gcc. Please change the environment variable
1541*** and run configure again." >&5
1542echo "$as_me: error:
cafe096b
EC
1543*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1544*** building gcc. Please change the environment variable
ba479fd2
NN
1545*** and run configure again." >&2;}
1546 { (exit 1); exit 1; }; }
34a86c2b
NN
1547fi
1548
1549# -----------
1550# Directories
1551# -----------
1552
1553# Specify the local prefix
1554local_prefix=
ba479fd2 1555
34a86c2b
NN
1556# Check whether --with-local-prefix or --without-local-prefix was given.
1557if test "${with_local_prefix+set}" = set; then
1558 withval="$with_local_prefix"
1559 case "${withval}" in
ba479fd2
NN
1560yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1561echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1562 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1563no) ;;
1564*) local_prefix=$with_local_prefix ;;
1565esac
ba479fd2 1566fi;
34a86c2b
NN
1567
1568# Default local prefix if it is empty
1569if test x$local_prefix = x; then
1570 local_prefix=/usr/local
1571fi
1572
1573# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1574# passed in by the toplevel make and thus we'd get different behavior
1575# depending on where we built the sources.
1576gcc_gxx_include_dir=
1577# Specify the g++ header file directory
ba479fd2 1578
34a86c2b
NN
1579# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1580if test "${with_gxx_include_dir+set}" = set; then
1581 withval="$with_gxx_include_dir"
1582 case "${withval}" in
ba479fd2
NN
1583yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1584echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1585 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1586no) ;;
1587*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1588esac
ba479fd2 1589fi;
34a86c2b
NN
1590
1591if test x${gcc_gxx_include_dir} = x; then
1592 if test x${enable_version_specific_runtime_libs} = xyes; then
1593 gcc_gxx_include_dir='${libsubdir}/include/c++'
1594 else
1595 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
1596 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1597 fi
1598fi
1599
ba479fd2 1600
34a86c2b
NN
1601# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1602if test "${with_cpp_install_dir+set}" = set; then
1603 withval="$with_cpp_install_dir"
1604 if test x$withval = xyes; then
ba479fd2
NN
1605 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1606echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1607 { (exit 1); exit 1; }; }
34a86c2b
NN
1608elif test x$withval != xno; then
1609 cpp_install_dir=$withval
1610fi
ba479fd2 1611fi;
34a86c2b 1612
51b9ff45 1613# We would like to our source tree to be readonly. However when releases or
ba479fd2 1614# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1615# various formats of manuals need to be included along with the rest of the
ba479fd2 1616# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1617# just that.
1618
03787dfd
KC
1619echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1620echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1621 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1622if test "${enable_generated_files_in_srcdir+set}" = set; then
1623 enableval="$enable_generated_files_in_srcdir"
03787dfd 1624 generated_files_in_srcdir=$enableval
51b9ff45 1625else
03787dfd 1626 generated_files_in_srcdir=no
ba479fd2 1627fi;
51b9ff45 1628
03787dfd
KC
1629echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1630echo "${ECHO_T}$generated_files_in_srcdir" >&6
1631
1632if test "$generated_files_in_srcdir" = "yes"; then
1633 GENINSRC=''
03787dfd
KC
1634else
1635 GENINSRC='#'
03787dfd
KC
1636fi
1637
1638
34a86c2b
NN
1639# -------------------
1640# Find default linker
1641# -------------------
1642
1643# With GNU ld
ba479fd2 1644
34a86c2b
NN
1645# Check whether --with-gnu-ld or --without-gnu-ld was given.
1646if test "${with_gnu_ld+set}" = set; then
1647 withval="$with_gnu_ld"
1648 gnu_ld_flag="$with_gnu_ld"
1649else
1650 gnu_ld_flag=no
ba479fd2 1651fi;
6e3f3080 1652
63cf211a 1653# With pre-defined ld
ba479fd2 1654
34a86c2b
NN
1655# Check whether --with-ld or --without-ld was given.
1656if test "${with_ld+set}" = set; then
1657 withval="$with_ld"
1658 DEFAULT_LINKER="$with_ld"
ba479fd2 1659fi;
34a86c2b
NN
1660if test x"${DEFAULT_LINKER+set}" = x"set"; then
1661 if test ! -x "$DEFAULT_LINKER"; then
ba479fd2
NN
1662 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1663echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
34a86c2b
NN
1664 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1665 gnu_ld_flag=yes
1666 fi
ba479fd2
NN
1667
1668cat >>confdefs.h <<_ACEOF
34a86c2b 1669#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1670_ACEOF
34a86c2b
NN
1671
1672fi
1673
ba479fd2
NN
1674echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1675echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1676if test x"${DEFAULT_LINKER+set}" = x"set"; then
1677 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1678 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1679echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1680 else
ba479fd2
NN
1681 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1682echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1683 fi
1684else
ba479fd2
NN
1685 echo "$as_me:$LINENO: result: no" >&5
1686echo "${ECHO_T}no" >&6
34a86c2b
NN
1687fi
1688
1689# ----------------------
1690# Find default assembler
1691# ----------------------
1692
1693# With GNU as
ba479fd2 1694
34a86c2b
NN
1695# Check whether --with-gnu-as or --without-gnu-as was given.
1696if test "${with_gnu_as+set}" = set; then
1697 withval="$with_gnu_as"
1698 gas_flag="$with_gnu_as"
1699else
1700 gas_flag=no
ba479fd2 1701fi;
34a86c2b
NN
1702
1703
1704# Check whether --with-as or --without-as was given.
1705if test "${with_as+set}" = set; then
1706 withval="$with_as"
1707 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1708fi;
34a86c2b
NN
1709if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1710 if test ! -x "$DEFAULT_ASSEMBLER"; then
ba479fd2
NN
1711 { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1712echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
34a86c2b
NN
1713 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1714 gas_flag=yes
1715 fi
ba479fd2
NN
1716
1717cat >>confdefs.h <<_ACEOF
34a86c2b 1718#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1719_ACEOF
34a86c2b
NN
1720
1721fi
1722
ba479fd2
NN
1723echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1724echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1725if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1726 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1727 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1728echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1729 else
ba479fd2
NN
1730 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1731echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1732 fi
1733else
ba479fd2
NN
1734 echo "$as_me:$LINENO: result: no" >&5
1735echo "${ECHO_T}no" >&6
34a86c2b
NN
1736fi
1737
1738# ---------------
1739# Find C compiler
1740# ---------------
1741
1742# Find the native compiler
ba479fd2
NN
1743ac_ext=c
1744ac_cpp='$CPP $CPPFLAGS'
1745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1747ac_compiler_gnu=$ac_cv_c_compiler_gnu
1748if test -n "$ac_tool_prefix"; then
1749 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1750set dummy ${ac_tool_prefix}gcc; ac_word=$2
1751echo "$as_me:$LINENO: checking for $ac_word" >&5
1752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1753if test "${ac_cv_prog_CC+set}" = set; then
1754 echo $ECHO_N "(cached) $ECHO_C" >&6
1755else
1756 if test -n "$CC"; then
1757 ac_cv_prog_CC="$CC" # Let the user override the test.
1758else
1759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1760for as_dir in $PATH
1761do
1762 IFS=$as_save_IFS
1763 test -z "$as_dir" && as_dir=.
1764 for ac_exec_ext in '' $ac_executable_extensions; do
1765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1766 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1768 break 2
1769 fi
1770done
1771done
1772
1773fi
1774fi
1775CC=$ac_cv_prog_CC
1776if test -n "$CC"; then
1777 echo "$as_me:$LINENO: result: $CC" >&5
1778echo "${ECHO_T}$CC" >&6
1779else
1780 echo "$as_me:$LINENO: result: no" >&5
1781echo "${ECHO_T}no" >&6
1782fi
1783
1784fi
1785if test -z "$ac_cv_prog_CC"; then
1786 ac_ct_CC=$CC
1787 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1788set dummy gcc; ac_word=$2
ba479fd2
NN
1789echo "$as_me:$LINENO: checking for $ac_word" >&5
1790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1791if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1792 echo $ECHO_N "(cached) $ECHO_C" >&6
1793else
1794 if test -n "$ac_ct_CC"; then
1795 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1796else
1797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 ac_cv_prog_ac_ct_CC="gcc"
1805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1806 break 2
1807 fi
1808done
1809done
1810
1811fi
1812fi
1813ac_ct_CC=$ac_cv_prog_ac_ct_CC
1814if test -n "$ac_ct_CC"; then
1815 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1816echo "${ECHO_T}$ac_ct_CC" >&6
1817else
1818 echo "$as_me:$LINENO: result: no" >&5
1819echo "${ECHO_T}no" >&6
1820fi
1821
1822 CC=$ac_ct_CC
1823else
1824 CC="$ac_cv_prog_CC"
1825fi
1826
1827if test -z "$CC"; then
1828 if test -n "$ac_tool_prefix"; then
1829 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1830set dummy ${ac_tool_prefix}cc; ac_word=$2
1831echo "$as_me:$LINENO: checking for $ac_word" >&5
1832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1833if test "${ac_cv_prog_CC+set}" = set; then
1834 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1835else
1836 if test -n "$CC"; then
1837 ac_cv_prog_CC="$CC" # Let the user override the test.
1838else
ba479fd2
NN
1839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1840for as_dir in $PATH
1841do
1842 IFS=$as_save_IFS
1843 test -z "$as_dir" && as_dir=.
1844 for ac_exec_ext in '' $ac_executable_extensions; do
1845 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1846 ac_cv_prog_CC="${ac_tool_prefix}cc"
1847 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1848 break 2
1849 fi
1850done
1851done
1852
cd9e5e7c
MK
1853fi
1854fi
ba479fd2 1855CC=$ac_cv_prog_CC
cd9e5e7c 1856if test -n "$CC"; then
ba479fd2
NN
1857 echo "$as_me:$LINENO: result: $CC" >&5
1858echo "${ECHO_T}$CC" >&6
1859else
1860 echo "$as_me:$LINENO: result: no" >&5
1861echo "${ECHO_T}no" >&6
1862fi
1863
1864fi
1865if test -z "$ac_cv_prog_CC"; then
1866 ac_ct_CC=$CC
1867 # Extract the first word of "cc", so it can be a program name with args.
1868set dummy cc; ac_word=$2
1869echo "$as_me:$LINENO: checking for $ac_word" >&5
1870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1871if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1872 echo $ECHO_N "(cached) $ECHO_C" >&6
1873else
1874 if test -n "$ac_ct_CC"; then
1875 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1876else
1877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1878for as_dir in $PATH
1879do
1880 IFS=$as_save_IFS
1881 test -z "$as_dir" && as_dir=.
1882 for ac_exec_ext in '' $ac_executable_extensions; do
1883 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1884 ac_cv_prog_ac_ct_CC="cc"
1885 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1886 break 2
1887 fi
1888done
1889done
1890
1891fi
1892fi
1893ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894if test -n "$ac_ct_CC"; then
1895 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1896echo "${ECHO_T}$ac_ct_CC" >&6
1897else
1898 echo "$as_me:$LINENO: result: no" >&5
1899echo "${ECHO_T}no" >&6
1900fi
1901
1902 CC=$ac_ct_CC
cd9e5e7c 1903else
ba479fd2 1904 CC="$ac_cv_prog_CC"
e9a25f70 1905fi
6e3f3080 1906
ba479fd2 1907fi
6e3f3080
NN
1908if test -z "$CC"; then
1909 # Extract the first word of "cc", so it can be a program name with args.
1910set dummy cc; ac_word=$2
ba479fd2
NN
1911echo "$as_me:$LINENO: checking for $ac_word" >&5
1912echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1913if test "${ac_cv_prog_CC+set}" = set; then
1914 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1915else
1916 if test -n "$CC"; then
1917 ac_cv_prog_CC="$CC" # Let the user override the test.
1918else
1919 ac_prog_rejected=no
ba479fd2
NN
1920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921for as_dir in $PATH
1922do
1923 IFS=$as_save_IFS
1924 test -z "$as_dir" && as_dir=.
1925 for ac_exec_ext in '' $ac_executable_extensions; do
1926 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1927 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1928 ac_prog_rejected=yes
1929 continue
1930 fi
1931 ac_cv_prog_CC="cc"
1932 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1933 break 2
1934 fi
1935done
1936done
1937
6e3f3080
NN
1938if test $ac_prog_rejected = yes; then
1939 # We found a bogon in the path, so make sure we never use it.
1940 set dummy $ac_cv_prog_CC
1941 shift
ba479fd2 1942 if test $# != 0; then
6e3f3080
NN
1943 # We chose a different compiler from the bogus one.
1944 # However, it has the same basename, so the bogon will be chosen
1945 # first if we set CC to just the basename; use the full file name.
1946 shift
ba479fd2 1947 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 1948 fi
6e3f3080
NN
1949fi
1950fi
1951fi
ba479fd2 1952CC=$ac_cv_prog_CC
6e3f3080 1953if test -n "$CC"; then
ba479fd2
NN
1954 echo "$as_me:$LINENO: result: $CC" >&5
1955echo "${ECHO_T}$CC" >&6
e9a25f70 1956else
ba479fd2
NN
1957 echo "$as_me:$LINENO: result: no" >&5
1958echo "${ECHO_T}no" >&6
e9a25f70 1959fi
6e3f3080 1960
ba479fd2
NN
1961fi
1962if test -z "$CC"; then
1963 if test -n "$ac_tool_prefix"; then
1964 for ac_prog in cl
1965 do
1966 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1967set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1968echo "$as_me:$LINENO: checking for $ac_word" >&5
1969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1970if test "${ac_cv_prog_CC+set}" = set; then
1971 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 1972else
6e3f3080
NN
1973 if test -n "$CC"; then
1974 ac_cv_prog_CC="$CC" # Let the user override the test.
1975else
ba479fd2
NN
1976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1977for as_dir in $PATH
1978do
1979 IFS=$as_save_IFS
1980 test -z "$as_dir" && as_dir=.
1981 for ac_exec_ext in '' $ac_executable_extensions; do
1982 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1983 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1984 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1985 break 2
1986 fi
1987done
1988done
1989
093e61a6 1990fi
6e3f3080 1991fi
ba479fd2 1992CC=$ac_cv_prog_CC
6e3f3080 1993if test -n "$CC"; then
ba479fd2
NN
1994 echo "$as_me:$LINENO: result: $CC" >&5
1995echo "${ECHO_T}$CC" >&6
6e3f3080 1996else
ba479fd2
NN
1997 echo "$as_me:$LINENO: result: no" >&5
1998echo "${ECHO_T}no" >&6
093e61a6 1999fi
cafe096b 2000
ba479fd2
NN
2001 test -n "$CC" && break
2002 done
2003fi
2004if test -z "$CC"; then
2005 ac_ct_CC=$CC
2006 for ac_prog in cl
2007do
2008 # Extract the first word of "$ac_prog", so it can be a program name with args.
2009set dummy $ac_prog; ac_word=$2
2010echo "$as_me:$LINENO: checking for $ac_word" >&5
2011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2012if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2013 echo $ECHO_N "(cached) $ECHO_C" >&6
2014else
2015 if test -n "$ac_ct_CC"; then
2016 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2017else
2018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2019for as_dir in $PATH
2020do
2021 IFS=$as_save_IFS
2022 test -z "$as_dir" && as_dir=.
2023 for ac_exec_ext in '' $ac_executable_extensions; do
2024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2025 ac_cv_prog_ac_ct_CC="$ac_prog"
2026 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2027 break 2
2028 fi
2029done
2030done
6e3f3080 2031
ba479fd2
NN
2032fi
2033fi
2034ac_ct_CC=$ac_cv_prog_ac_ct_CC
2035if test -n "$ac_ct_CC"; then
2036 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2037echo "${ECHO_T}$ac_ct_CC" >&6
2038else
2039 echo "$as_me:$LINENO: result: no" >&5
2040echo "${ECHO_T}no" >&6
2041fi
6e3f3080 2042
ba479fd2
NN
2043 test -n "$ac_ct_CC" && break
2044done
63cf211a 2045
ba479fd2
NN
2046 CC=$ac_ct_CC
2047fi
2048
2049fi
2050
2051
2052test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2053See \`config.log' for more details." >&5
2054echo "$as_me: error: no acceptable C compiler found in \$PATH
2055See \`config.log' for more details." >&2;}
2056 { (exit 1); exit 1; }; }
2057
2058# Provide some information about the compiler.
2059echo "$as_me:$LINENO:" \
2060 "checking for C compiler version" >&5
2061ac_compiler=`set X $ac_compile; echo $2`
2062{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2063 (eval $ac_compiler --version </dev/null >&5) 2>&5
2064 ac_status=$?
2065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2066 (exit $ac_status); }
2067{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2068 (eval $ac_compiler -v </dev/null >&5) 2>&5
2069 ac_status=$?
2070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071 (exit $ac_status); }
2072{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2073 (eval $ac_compiler -V </dev/null >&5) 2>&5
2074 ac_status=$?
2075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076 (exit $ac_status); }
2077
2078cat >conftest.$ac_ext <<_ACEOF
2079#line $LINENO "configure"
2080/* confdefs.h. */
2081_ACEOF
2082cat confdefs.h >>conftest.$ac_ext
2083cat >>conftest.$ac_ext <<_ACEOF
2084/* end confdefs.h. */
2085
2086int
2087main ()
2088{
63cf211a 2089
ba479fd2
NN
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094ac_clean_files_save=$ac_clean_files
2095ac_clean_files="$ac_clean_files a.out a.exe b.out"
2096# Try to create an executable without -o first, disregard a.out.
2097# It will help us diagnose broken compilers, and finding out an intuition
2098# of exeext.
2099echo "$as_me:$LINENO: checking for C compiler default output" >&5
2100echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2101ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2102if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2103 (eval $ac_link_default) 2>&5
2104 ac_status=$?
2105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2106 (exit $ac_status); }; then
2107 # Find the output, starting from the most likely. This scheme is
2108# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2109# resort.
2110
2111# Be careful to initialize this variable, since it used to be cached.
2112# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2113ac_cv_exeext=
2114# b.out is created by i960 compilers.
2115for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2116do
2117 test -f "$ac_file" || continue
2118 case $ac_file in
2119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2120 ;;
2121 conftest.$ac_ext )
2122 # This is the source file.
2123 ;;
2124 [ab].out )
2125 # We found the default executable, but exeext='' is most
2126 # certainly right.
2127 break;;
2128 *.* )
2129 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2130 # FIXME: I believe we export ac_cv_exeext for Libtool,
2131 # but it would be cool to find out if it's true. Does anybody
2132 # maintain Libtool? --akim.
2133 export ac_cv_exeext
2134 break;;
2135 * )
2136 break;;
2137 esac
2138done
2139else
2140 echo "$as_me: failed program was:" >&5
2141sed 's/^/| /' conftest.$ac_ext >&5
2142
2143{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2144See \`config.log' for more details." >&5
2145echo "$as_me: error: C compiler cannot create executables
2146See \`config.log' for more details." >&2;}
2147 { (exit 77); exit 77; }; }
2148fi
2149
2150ac_exeext=$ac_cv_exeext
2151echo "$as_me:$LINENO: result: $ac_file" >&5
2152echo "${ECHO_T}$ac_file" >&6
2153
2154# Check the compiler produces executables we can run. If not, either
2155# the compiler is broken, or we cross compile.
2156echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2157echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2158# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2159# If not cross compiling, check that we can run a simple program.
2160if test "$cross_compiling" != yes; then
2161 if { ac_try='./$ac_file'
2162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2163 (eval $ac_try) 2>&5
2164 ac_status=$?
2165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2166 (exit $ac_status); }; }; then
2167 cross_compiling=no
6e3f3080 2168 else
ba479fd2
NN
2169 if test "$cross_compiling" = maybe; then
2170 cross_compiling=yes
2171 else
2172 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2173If you meant to cross compile, use \`--host'.
2174See \`config.log' for more details." >&5
2175echo "$as_me: error: cannot run C compiled programs.
2176If you meant to cross compile, use \`--host'.
2177See \`config.log' for more details." >&2;}
2178 { (exit 1); exit 1; }; }
2179 fi
6e3f3080
NN
2180 fi
2181fi
ba479fd2
NN
2182echo "$as_me:$LINENO: result: yes" >&5
2183echo "${ECHO_T}yes" >&6
2184
2185rm -f a.out a.exe conftest$ac_cv_exeext b.out
2186ac_clean_files=$ac_clean_files_save
2187# Check the compiler produces executables we can run. If not, either
2188# the compiler is broken, or we cross compile.
2189echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2190echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2191echo "$as_me:$LINENO: result: $cross_compiling" >&5
2192echo "${ECHO_T}$cross_compiling" >&6
2193
2194echo "$as_me:$LINENO: checking for suffix of executables" >&5
2195echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2197 (eval $ac_link) 2>&5
2198 ac_status=$?
2199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2200 (exit $ac_status); }; then
2201 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2202# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2203# work properly (i.e., refer to `conftest.exe'), while it won't with
2204# `rm'.
2205for ac_file in conftest.exe conftest conftest.*; do
2206 test -f "$ac_file" || continue
2207 case $ac_file in
2208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2209 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2210 export ac_cv_exeext
2211 break;;
2212 * ) break;;
2213 esac
2214done
e9a25f70 2215else
ba479fd2
NN
2216 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2217See \`config.log' for more details." >&5
2218echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2219See \`config.log' for more details." >&2;}
2220 { (exit 1); exit 1; }; }
2221fi
2222
2223rm -f conftest$ac_cv_exeext
2224echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2225echo "${ECHO_T}$ac_cv_exeext" >&6
2226
2227rm -f conftest.$ac_ext
2228EXEEXT=$ac_cv_exeext
2229ac_exeext=$EXEEXT
2230echo "$as_me:$LINENO: checking for suffix of object files" >&5
2231echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2232if test "${ac_cv_objext+set}" = set; then
2233 echo $ECHO_N "(cached) $ECHO_C" >&6
2234else
2235 cat >conftest.$ac_ext <<_ACEOF
2236#line $LINENO "configure"
2237/* confdefs.h. */
2238_ACEOF
2239cat confdefs.h >>conftest.$ac_ext
2240cat >>conftest.$ac_ext <<_ACEOF
2241/* end confdefs.h. */
2242
2243int
2244main ()
2245{
6e3f3080 2246
ba479fd2
NN
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251rm -f conftest.o conftest.obj
2252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253 (eval $ac_compile) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); }; then
2257 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2258 case $ac_file in
2259 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2260 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2261 break;;
2262 esac
2263done
63cf211a 2264else
ba479fd2
NN
2265 echo "$as_me: failed program was:" >&5
2266sed 's/^/| /' conftest.$ac_ext >&5
2267
2268{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2269See \`config.log' for more details." >&5
2270echo "$as_me: error: cannot compute suffix of object files: cannot compile
2271See \`config.log' for more details." >&2;}
2272 { (exit 1); exit 1; }; }
2273fi
2274
2275rm -f conftest.$ac_cv_objext conftest.$ac_ext
2276fi
2277echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2278echo "${ECHO_T}$ac_cv_objext" >&6
2279OBJEXT=$ac_cv_objext
2280ac_objext=$OBJEXT
2281echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2282echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2283if test "${ac_cv_c_compiler_gnu+set}" = set; then
2284 echo $ECHO_N "(cached) $ECHO_C" >&6
2285else
2286 cat >conftest.$ac_ext <<_ACEOF
2287#line $LINENO "configure"
2288/* confdefs.h. */
2289_ACEOF
2290cat confdefs.h >>conftest.$ac_ext
2291cat >>conftest.$ac_ext <<_ACEOF
2292/* end confdefs.h. */
2293
2294int
2295main ()
2296{
2297#ifndef __GNUC__
2298 choke me
2299#endif
6e3f3080 2300
ba479fd2
NN
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305rm -f conftest.$ac_objext
2306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2307 (eval $ac_compile) 2>&5
2308 ac_status=$?
2309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310 (exit $ac_status); } &&
2311 { ac_try='test -s conftest.$ac_objext'
2312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2313 (eval $ac_try) 2>&5
2314 ac_status=$?
2315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2316 (exit $ac_status); }; }; then
2317 ac_compiler_gnu=yes
2318else
2319 echo "$as_me: failed program was:" >&5
2320sed 's/^/| /' conftest.$ac_ext >&5
2321
2322ac_compiler_gnu=no
2323fi
2324rm -f conftest.$ac_objext conftest.$ac_ext
2325ac_cv_c_compiler_gnu=$ac_compiler_gnu
2326
2327fi
2328echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2329echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2330GCC=`test $ac_compiler_gnu = yes && echo yes`
2331ac_test_CFLAGS=${CFLAGS+set}
2332ac_save_CFLAGS=$CFLAGS
2333CFLAGS="-g"
2334echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2335echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2336if test "${ac_cv_prog_cc_g+set}" = set; then
2337 echo $ECHO_N "(cached) $ECHO_C" >&6
2338else
2339 cat >conftest.$ac_ext <<_ACEOF
2340#line $LINENO "configure"
2341/* confdefs.h. */
2342_ACEOF
2343cat confdefs.h >>conftest.$ac_ext
2344cat >>conftest.$ac_ext <<_ACEOF
2345/* end confdefs.h. */
2346
2347int
2348main ()
2349{
2350
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355rm -f conftest.$ac_objext
2356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2357 (eval $ac_compile) 2>&5
2358 ac_status=$?
2359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2360 (exit $ac_status); } &&
2361 { ac_try='test -s conftest.$ac_objext'
2362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2363 (eval $ac_try) 2>&5
2364 ac_status=$?
2365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366 (exit $ac_status); }; }; then
6e3f3080
NN
2367 ac_cv_prog_cc_g=yes
2368else
ba479fd2
NN
2369 echo "$as_me: failed program was:" >&5
2370sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2371
ba479fd2 2372ac_cv_prog_cc_g=no
6e3f3080 2373fi
ba479fd2
NN
2374rm -f conftest.$ac_objext conftest.$ac_ext
2375fi
2376echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2377echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2378if test "$ac_test_CFLAGS" = set; then
ba479fd2 2379 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2380elif test $ac_cv_prog_cc_g = yes; then
2381 if test "$GCC" = yes; then
e9a25f70
JL
2382 CFLAGS="-g -O2"
2383 else
cd9e5e7c 2384 CFLAGS="-g"
81814e35 2385 fi
3723cad9 2386else
cd9e5e7c
MK
2387 if test "$GCC" = yes; then
2388 CFLAGS="-O2"
2389 else
2390 CFLAGS=
2391 fi
e9a25f70 2392fi
ba479fd2
NN
2393echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2394echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2395if test "${ac_cv_prog_cc_stdc+set}" = set; then
2396 echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398 ac_cv_prog_cc_stdc=no
2399ac_save_CC=$CC
2400cat >conftest.$ac_ext <<_ACEOF
2401#line $LINENO "configure"
2402/* confdefs.h. */
2403_ACEOF
2404cat confdefs.h >>conftest.$ac_ext
2405cat >>conftest.$ac_ext <<_ACEOF
2406/* end confdefs.h. */
2407#include <stdarg.h>
2408#include <stdio.h>
2409#include <sys/types.h>
2410#include <sys/stat.h>
2411/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2412struct buf { int x; };
2413FILE * (*rcsopen) (struct buf *, struct stat *, int);
2414static char *e (p, i)
2415 char **p;
2416 int i;
2417{
2418 return p[i];
2419}
2420static char *f (char * (*g) (char **, int), char **p, ...)
2421{
2422 char *s;
2423 va_list v;
2424 va_start (v,p);
2425 s = g (p, va_arg (v,int));
2426 va_end (v);
2427 return s;
2428}
2429int test (int i, double x);
2430struct s1 {int (*f) (int a);};
2431struct s2 {int (*f) (double a);};
2432int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2433int argc;
2434char **argv;
2435int
2436main ()
2437{
2438return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443# Don't try gcc -ansi; that turns off useful extensions and
2444# breaks some systems' header files.
2445# AIX -qlanglvl=ansi
2446# Ultrix and OSF/1 -std1
2447# HP-UX 10.20 and later -Ae
2448# HP-UX older versions -Aa -D_HPUX_SOURCE
2449# SVR4 -Xc -D__EXTENSIONS__
2450for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2451do
2452 CC="$ac_save_CC $ac_arg"
2453 rm -f conftest.$ac_objext
2454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2455 (eval $ac_compile) 2>&5
2456 ac_status=$?
2457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2458 (exit $ac_status); } &&
2459 { ac_try='test -s conftest.$ac_objext'
2460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2461 (eval $ac_try) 2>&5
2462 ac_status=$?
2463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); }; }; then
2465 ac_cv_prog_cc_stdc=$ac_arg
2466break
2467else
2468 echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2470
ba479fd2
NN
2471fi
2472rm -f conftest.$ac_objext
2473done
2474rm -f conftest.$ac_ext conftest.$ac_objext
2475CC=$ac_save_CC
2476
2477fi
2478
2479case "x$ac_cv_prog_cc_stdc" in
2480 x|xno)
2481 echo "$as_me:$LINENO: result: none needed" >&5
2482echo "${ECHO_T}none needed" >&6 ;;
2483 *)
2484 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2485echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2486 CC="$CC $ac_cv_prog_cc_stdc" ;;
2487esac
2488
2489# Some people use a C++ compiler to compile C. Since we use `exit',
2490# in C++ we need to declare it. In case someone uses the same compiler
2491# for both compiling C and C++ we need to have the C++ compiler decide
2492# the declaration of exit, since it's the most demanding environment.
2493cat >conftest.$ac_ext <<_ACEOF
2494#ifndef __cplusplus
2495 choke me
2496#endif
2497_ACEOF
2498rm -f conftest.$ac_objext
2499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2500 (eval $ac_compile) 2>&5
2501 ac_status=$?
2502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2503 (exit $ac_status); } &&
2504 { ac_try='test -s conftest.$ac_objext'
2505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2506 (eval $ac_try) 2>&5
2507 ac_status=$?
2508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509 (exit $ac_status); }; }; then
2510 for ac_declaration in \
a6a5e4c9
KC
2511 ''\
2512 '#include <stdlib.h>' \
ba479fd2
NN
2513 'extern "C" void std::exit (int) throw (); using std::exit;' \
2514 'extern "C" void std::exit (int); using std::exit;' \
2515 'extern "C" void exit (int) throw ();' \
2516 'extern "C" void exit (int);' \
2517 'void exit (int);'
2518do
2519 cat >conftest.$ac_ext <<_ACEOF
2520#line $LINENO "configure"
2521/* confdefs.h. */
2522_ACEOF
2523cat confdefs.h >>conftest.$ac_ext
2524cat >>conftest.$ac_ext <<_ACEOF
2525/* end confdefs.h. */
ba479fd2 2526#include <stdlib.h>
a6a5e4c9 2527$ac_declaration
ba479fd2
NN
2528int
2529main ()
2530{
2531exit (42);
2532 ;
2533 return 0;
2534}
2535_ACEOF
2536rm -f conftest.$ac_objext
2537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2538 (eval $ac_compile) 2>&5
2539 ac_status=$?
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } &&
2542 { ac_try='test -s conftest.$ac_objext'
2543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2544 (eval $ac_try) 2>&5
2545 ac_status=$?
2546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547 (exit $ac_status); }; }; then
2548 :
2549else
2550 echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
2552
2553continue
2554fi
2555rm -f conftest.$ac_objext conftest.$ac_ext
2556 cat >conftest.$ac_ext <<_ACEOF
2557#line $LINENO "configure"
2558/* confdefs.h. */
2559_ACEOF
2560cat confdefs.h >>conftest.$ac_ext
2561cat >>conftest.$ac_ext <<_ACEOF
2562/* end confdefs.h. */
2563$ac_declaration
2564int
2565main ()
2566{
2567exit (42);
2568 ;
2569 return 0;
2570}
2571_ACEOF
2572rm -f conftest.$ac_objext
2573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2574 (eval $ac_compile) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); } &&
2578 { ac_try='test -s conftest.$ac_objext'
2579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
2584 break
3ec83fc2 2585else
ba479fd2
NN
2586 echo "$as_me: failed program was:" >&5
2587sed 's/^/| /' conftest.$ac_ext >&5
2588
6e3f3080 2589fi
ba479fd2
NN
2590rm -f conftest.$ac_objext conftest.$ac_ext
2591done
2592rm -f conftest*
2593if test -n "$ac_declaration"; then
2594 echo '#ifdef __cplusplus' >>confdefs.h
2595 echo $ac_declaration >>confdefs.h
2596 echo '#endif' >>confdefs.h
2597fi
2598
3ec83fc2 2599else
ba479fd2
NN
2600 echo "$as_me: failed program was:" >&5
2601sed 's/^/| /' conftest.$ac_ext >&5
2602
2603fi
2604rm -f conftest.$ac_objext conftest.$ac_ext
2605ac_ext=c
2606ac_cpp='$CPP $CPPFLAGS'
2607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2609ac_compiler_gnu=$ac_cv_c_compiler_gnu
2610
2611if test "x$CC" != xcc; then
2612 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2613echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2614else
2615 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2616echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2617fi
2618set dummy $CC; ac_cc=`echo $2 |
2619 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2620if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2621 echo $ECHO_N "(cached) $ECHO_C" >&6
2622else
2623 cat >conftest.$ac_ext <<_ACEOF
2624#line $LINENO "configure"
2625/* confdefs.h. */
2626_ACEOF
2627cat confdefs.h >>conftest.$ac_ext
2628cat >>conftest.$ac_ext <<_ACEOF
2629/* end confdefs.h. */
2630
2631int
2632main ()
2633{
2634
2635 ;
2636 return 0;
2637}
2638_ACEOF
3ec83fc2
RH
2639# Make sure it works both with $CC and with simple cc.
2640# We do the test twice because some compilers refuse to overwrite an
2641# existing .o file with -o, though they will create one.
ba479fd2
NN
2642ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2643if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2644 (eval $ac_try) 2>&5
2645 ac_status=$?
2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647 (exit $ac_status); } &&
2648 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2649 (eval $ac_try) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); };
3ec83fc2
RH
2653then
2654 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2655 if test "x$CC" != xcc; then
2656 # Test first that cc exists at all.
ba479fd2
NN
2657 if { ac_try='cc -c conftest.$ac_ext >&5'
2658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2659 (eval $ac_try) 2>&5
2660 ac_status=$?
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); }; }; then
2663 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2664 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2665 (eval $ac_try) 2>&5
2666 ac_status=$?
2667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668 (exit $ac_status); } &&
2669 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2670 (eval $ac_try) 2>&5
2671 ac_status=$?
2672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673 (exit $ac_status); };
3ec83fc2 2674 then
e1366e0c
NN
2675 # cc works too.
2676 :
3ec83fc2 2677 else
e1366e0c
NN
2678 # cc exists but doesn't like -o.
2679 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2680 fi
2681 fi
2682 fi
2683else
2684 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2685fi
2686rm -f conftest*
2687
2688fi
2689if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2690 echo "$as_me:$LINENO: result: yes" >&5
2691echo "${ECHO_T}yes" >&6
3ec83fc2 2692else
ba479fd2
NN
2693 echo "$as_me:$LINENO: result: no" >&5
2694echo "${ECHO_T}no" >&6
2695
2696cat >>confdefs.h <<\_ACEOF
3ec83fc2 2697#define NO_MINUS_C_MINUS_O 1
ba479fd2 2698_ACEOF
3ec83fc2
RH
2699
2700fi
2701
414d23ae
HPN
2702# autoconf is lame and doesn't give us any substitution variable for this.
2703if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2704 NO_MINUS_C_MINUS_O=yes
2705else
2706 OUTPUT_OPTION='-o $@'
2707fi
2708
2709
2710
73458fb7
NN
2711# -------------------------
2712# Check C compiler features
2713# -------------------------
2714
ba479fd2
NN
2715
2716echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5
2717echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6
2718if test "${ac_cv_prog_cc_no_long_long+set}" = set; then
2719 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
2720else
2721 save_CFLAGS="$CFLAGS"
2722CFLAGS="-Wno-long-long"
ba479fd2
NN
2723cat >conftest.$ac_ext <<_ACEOF
2724#line $LINENO "configure"
2725/* confdefs.h. */
2726_ACEOF
2727cat confdefs.h >>conftest.$ac_ext
2728cat >>conftest.$ac_ext <<_ACEOF
2729/* end confdefs.h. */
2730
2731int
2732main ()
2733{
63cf211a 2734
ba479fd2
NN
2735 ;
2736 return 0;
2737}
2738_ACEOF
2739rm -f conftest.$ac_objext
2740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2741 (eval $ac_compile) 2>&5
2742 ac_status=$?
2743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744 (exit $ac_status); } &&
2745 { ac_try='test -s conftest.$ac_objext'
2746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2747 (eval $ac_try) 2>&5
2748 ac_status=$?
2749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2750 (exit $ac_status); }; }; then
34a86c2b 2751 ac_cv_prog_cc_no_long_long=yes
200ef634 2752else
ba479fd2
NN
2753 echo "$as_me: failed program was:" >&5
2754sed 's/^/| /' conftest.$ac_ext >&5
2755
2756ac_cv_prog_cc_no_long_long=no
200ef634 2757fi
ba479fd2 2758rm -f conftest.$ac_objext conftest.$ac_ext
34a86c2b 2759CFLAGS="$save_CFLAGS"
75e93faa 2760fi
ba479fd2
NN
2761echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5
2762echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6
75e93faa 2763
ba479fd2
NN
2764ac_ext=c
2765ac_cpp='$CPP $CPPFLAGS'
2766ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2770echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2771# On Suns, sometimes $CPP names a directory.
2772if test -n "$CPP" && test -d "$CPP"; then
2773 CPP=
2774fi
2775if test -z "$CPP"; then
ba479fd2
NN
2776 if test "${ac_cv_prog_CPP+set}" = set; then
2777 echo $ECHO_N "(cached) $ECHO_C" >&6
2778else
2779 # Double quotes because CPP needs to be expanded
2780 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2781 do
2782 ac_preproc_ok=false
2783for ac_c_preproc_warn_flag in '' yes
2784do
2785 # Use a header file that comes with gcc, so configuring glibc
2786 # with a fresh cross-compiler works.
2787 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2788 # <limits.h> exists even on freestanding compilers.
84c041a1 2789 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2790 # not just through cpp. "Syntax error" is here to catch this case.
2791 cat >conftest.$ac_ext <<_ACEOF
2792#line $LINENO "configure"
2793/* confdefs.h. */
2794_ACEOF
2795cat confdefs.h >>conftest.$ac_ext
2796cat >>conftest.$ac_ext <<_ACEOF
2797/* end confdefs.h. */
2798#ifdef __STDC__
2799# include <limits.h>
2800#else
2801# include <assert.h>
2802#endif
2803 Syntax error
2804_ACEOF
2805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2807 ac_status=$?
2808 grep -v '^ *+' conftest.er1 >conftest.err
2809 rm -f conftest.er1
2810 cat conftest.err >&5
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); } >/dev/null; then
2813 if test -s conftest.err; then
2814 ac_cpp_err=$ac_c_preproc_warn_flag
2815 else
2816 ac_cpp_err=
2817 fi
2818else
2819 ac_cpp_err=yes
2820fi
2821if test -z "$ac_cpp_err"; then
093e61a6 2822 :
cafe096b 2823else
ba479fd2
NN
2824 echo "$as_me: failed program was:" >&5
2825sed 's/^/| /' conftest.$ac_ext >&5
2826
2827 # Broken: fails on valid input.
2828continue
2829fi
2830rm -f conftest.err conftest.$ac_ext
2831
2832 # OK, works on sane cases. Now check whether non-existent headers
2833 # can be detected and how.
2834 cat >conftest.$ac_ext <<_ACEOF
2835#line $LINENO "configure"
2836/* confdefs.h. */
2837_ACEOF
2838cat confdefs.h >>conftest.$ac_ext
2839cat >>conftest.$ac_ext <<_ACEOF
2840/* end confdefs.h. */
2841#include <ac_nonexistent.h>
2842_ACEOF
2843if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2844 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2845 ac_status=$?
2846 grep -v '^ *+' conftest.er1 >conftest.err
2847 rm -f conftest.er1
2848 cat conftest.err >&5
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); } >/dev/null; then
2851 if test -s conftest.err; then
2852 ac_cpp_err=$ac_c_preproc_warn_flag
2853 else
2854 ac_cpp_err=
2855 fi
2856else
2857 ac_cpp_err=yes
2858fi
2859if test -z "$ac_cpp_err"; then
2860 # Broken: success on invalid input.
2861continue
2862else
2863 echo "$as_me: failed program was:" >&5
2864sed 's/^/| /' conftest.$ac_ext >&5
2865
2866 # Passes both tests.
2867ac_preproc_ok=:
2868break
2869fi
2870rm -f conftest.err conftest.$ac_ext
2871
2872done
2873# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2874rm -f conftest.err conftest.$ac_ext
2875if $ac_preproc_ok; then
2876 break
2877fi
2878
2879 done
2880 ac_cv_prog_CPP=$CPP
2881
2882fi
2883 CPP=$ac_cv_prog_CPP
2884else
2885 ac_cv_prog_CPP=$CPP
2886fi
2887echo "$as_me:$LINENO: result: $CPP" >&5
2888echo "${ECHO_T}$CPP" >&6
2889ac_preproc_ok=false
2890for ac_c_preproc_warn_flag in '' yes
2891do
2892 # Use a header file that comes with gcc, so configuring glibc
2893 # with a fresh cross-compiler works.
2894 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2895 # <limits.h> exists even on freestanding compilers.
2896 # On the NeXT, cc -E runs the code through the compiler's parser,
2897 # not just through cpp. "Syntax error" is here to catch this case.
2898 cat >conftest.$ac_ext <<_ACEOF
2899#line $LINENO "configure"
2900/* confdefs.h. */
2901_ACEOF
2902cat confdefs.h >>conftest.$ac_ext
2903cat >>conftest.$ac_ext <<_ACEOF
2904/* end confdefs.h. */
2905#ifdef __STDC__
2906# include <limits.h>
2907#else
2908# include <assert.h>
2909#endif
2910 Syntax error
2911_ACEOF
2912if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2914 ac_status=$?
2915 grep -v '^ *+' conftest.er1 >conftest.err
2916 rm -f conftest.er1
2917 cat conftest.err >&5
2918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 (exit $ac_status); } >/dev/null; then
2920 if test -s conftest.err; then
2921 ac_cpp_err=$ac_c_preproc_warn_flag
2922 else
2923 ac_cpp_err=
2924 fi
2925else
2926 ac_cpp_err=yes
2927fi
2928if test -z "$ac_cpp_err"; then
6e3f3080 2929 :
414d23ae 2930else
ba479fd2
NN
2931 echo "$as_me: failed program was:" >&5
2932sed 's/^/| /' conftest.$ac_ext >&5
2933
2934 # Broken: fails on valid input.
2935continue
2936fi
2937rm -f conftest.err conftest.$ac_ext
2938
2939 # OK, works on sane cases. Now check whether non-existent headers
2940 # can be detected and how.
2941 cat >conftest.$ac_ext <<_ACEOF
2942#line $LINENO "configure"
2943/* confdefs.h. */
2944_ACEOF
2945cat confdefs.h >>conftest.$ac_ext
2946cat >>conftest.$ac_ext <<_ACEOF
2947/* end confdefs.h. */
2948#include <ac_nonexistent.h>
2949_ACEOF
2950if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2952 ac_status=$?
2953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957 (exit $ac_status); } >/dev/null; then
2958 if test -s conftest.err; then
2959 ac_cpp_err=$ac_c_preproc_warn_flag
2960 else
2961 ac_cpp_err=
2962 fi
6e3f3080 2963else
ba479fd2 2964 ac_cpp_err=yes
63cf211a 2965fi
ba479fd2
NN
2966if test -z "$ac_cpp_err"; then
2967 # Broken: success on invalid input.
2968continue
2969else
2970 echo "$as_me: failed program was:" >&5
2971sed 's/^/| /' conftest.$ac_ext >&5
2972
2973 # Passes both tests.
2974ac_preproc_ok=:
2975break
63cf211a 2976fi
ba479fd2
NN
2977rm -f conftest.err conftest.$ac_ext
2978
2979done
2980# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2981rm -f conftest.err conftest.$ac_ext
2982if $ac_preproc_ok; then
2983 :
6e3f3080 2984else
ba479fd2
NN
2985 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2986See \`config.log' for more details." >&5
2987echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2988See \`config.log' for more details." >&2;}
2989 { (exit 1); exit 1; }; }
6e3f3080
NN
2990fi
2991
ba479fd2
NN
2992ac_ext=c
2993ac_cpp='$CPP $CPPFLAGS'
2994ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997
2998echo "$as_me:$LINENO: checking for inline" >&5
2999echo $ECHO_N "checking for inline... $ECHO_C" >&6
3000if test "${ac_cv_c_inline+set}" = set; then
3001 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3002else
3003 ac_cv_c_inline=no
3004for ac_kw in inline __inline__ __inline; do
ba479fd2
NN
3005 cat >conftest.$ac_ext <<_ACEOF
3006#line $LINENO "configure"
3007/* confdefs.h. */
3008_ACEOF
3009cat confdefs.h >>conftest.$ac_ext
3010cat >>conftest.$ac_ext <<_ACEOF
3011/* end confdefs.h. */
3012#ifndef __cplusplus
3013typedef int foo_t;
3014static $ac_kw foo_t static_foo () {return 0; }
3015$ac_kw foo_t foo () {return 0; }
3016#endif
414d23ae 3017
ba479fd2
NN
3018_ACEOF
3019rm -f conftest.$ac_objext
3020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3021 (eval $ac_compile) 2>&5
3022 ac_status=$?
3023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3024 (exit $ac_status); } &&
3025 { ac_try='test -s conftest.$ac_objext'
3026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3027 (eval $ac_try) 2>&5
3028 ac_status=$?
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); }; }; then
414d23ae
HPN
3031 ac_cv_c_inline=$ac_kw; break
3032else
ba479fd2
NN
3033 echo "$as_me: failed program was:" >&5
3034sed 's/^/| /' conftest.$ac_ext >&5
3035
414d23ae 3036fi
ba479fd2 3037rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3038done
3039
3040fi
ba479fd2
NN
3041echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3042echo "${ECHO_T}$ac_cv_c_inline" >&6
3043case $ac_cv_c_inline in
414d23ae 3044 inline | yes) ;;
ba479fd2
NN
3045 no)
3046cat >>confdefs.h <<\_ACEOF
3047#define inline
3048_ACEOF
e1366e0c 3049 ;;
ba479fd2 3050 *) cat >>confdefs.h <<_ACEOF
e1366e0c 3051#define inline $ac_cv_c_inline
ba479fd2 3052_ACEOF
e1366e0c 3053 ;;
414d23ae
HPN
3054esac
3055
414d23ae 3056
ba479fd2
NN
3057echo "$as_me:$LINENO: checking for long long int" >&5
3058echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3059if test "${ac_cv_c_long_long+set}" = set; then
3060 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3061else
ba479fd2
NN
3062 cat >conftest.$ac_ext <<_ACEOF
3063#line $LINENO "configure"
3064/* confdefs.h. */
3065_ACEOF
3066cat confdefs.h >>conftest.$ac_ext
3067cat >>conftest.$ac_ext <<_ACEOF
3068/* end confdefs.h. */
414d23ae 3069
ba479fd2
NN
3070int
3071main ()
3072{
414d23ae 3073long long int i;
ba479fd2
NN
3074 ;
3075 return 0;
3076}
3077_ACEOF
3078rm -f conftest.$ac_objext
3079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3080 (eval $ac_compile) 2>&5
3081 ac_status=$?
3082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083 (exit $ac_status); } &&
3084 { ac_try='test -s conftest.$ac_objext'
3085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3086 (eval $ac_try) 2>&5
3087 ac_status=$?
3088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3089 (exit $ac_status); }; }; then
414d23ae
HPN
3090 ac_cv_c_long_long=yes
3091else
ba479fd2
NN
3092 echo "$as_me: failed program was:" >&5
3093sed 's/^/| /' conftest.$ac_ext >&5
3094
3095ac_cv_c_long_long=no
414d23ae 3096fi
ba479fd2 3097rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3098fi
ba479fd2
NN
3099echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3100echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3101 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3102
3103cat >>confdefs.h <<\_ACEOF
414d23ae 3104#define HAVE_LONG_LONG 1
ba479fd2 3105_ACEOF
414d23ae
HPN
3106
3107 fi
ba479fd2
NN
3108echo "$as_me:$LINENO: checking for __int64" >&5
3109echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3110if test "${ac_cv_c___int64+set}" = set; then
3111 echo $ECHO_N "(cached) $ECHO_C" >&6
3112else
3113 cat >conftest.$ac_ext <<_ACEOF
3114#line $LINENO "configure"
3115/* confdefs.h. */
3116_ACEOF
3117cat confdefs.h >>conftest.$ac_ext
3118cat >>conftest.$ac_ext <<_ACEOF
3119/* end confdefs.h. */
3120
3121int
3122main ()
3123{
414d23ae 3124__int64 i;
ba479fd2
NN
3125 ;
3126 return 0;
3127}
3128_ACEOF
3129rm -f conftest.$ac_objext
3130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3131 (eval $ac_compile) 2>&5
3132 ac_status=$?
3133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134 (exit $ac_status); } &&
3135 { ac_try='test -s conftest.$ac_objext'
3136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3137 (eval $ac_try) 2>&5
3138 ac_status=$?
3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140 (exit $ac_status); }; }; then
414d23ae
HPN
3141 ac_cv_c___int64=yes
3142else
ba479fd2
NN
3143 echo "$as_me: failed program was:" >&5
3144sed 's/^/| /' conftest.$ac_ext >&5
3145
3146ac_cv_c___int64=no
414d23ae 3147fi
ba479fd2 3148rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3149fi
ba479fd2
NN
3150echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3151echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3152 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3153
3154cat >>confdefs.h <<\_ACEOF
414d23ae 3155#define HAVE___INT64 1
ba479fd2 3156_ACEOF
414d23ae
HPN
3157
3158 fi
3159
ba479fd2
NN
3160echo "$as_me:$LINENO: checking for built-in _Bool" >&5
3161echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6
3162if test "${gcc_cv_c__bool+set}" = set; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3164else
3165 cat >conftest.$ac_ext <<_ACEOF
3166#line $LINENO "configure"
3167/* confdefs.h. */
3168_ACEOF
3169cat confdefs.h >>conftest.$ac_ext
3170cat >>conftest.$ac_ext <<_ACEOF
3171/* end confdefs.h. */
3172
3173int
3174main ()
3175{
414d23ae 3176_Bool foo;
ba479fd2
NN
3177 ;
3178 return 0;
3179}
3180_ACEOF
3181rm -f conftest.$ac_objext
3182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3183 (eval $ac_compile) 2>&5
3184 ac_status=$?
3185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3186 (exit $ac_status); } &&
3187 { ac_try='test -s conftest.$ac_objext'
3188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189 (eval $ac_try) 2>&5
3190 ac_status=$?
3191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192 (exit $ac_status); }; }; then
414d23ae
HPN
3193 gcc_cv_c__bool=yes
3194else
ba479fd2
NN
3195 echo "$as_me: failed program was:" >&5
3196sed 's/^/| /' conftest.$ac_ext >&5
cafe096b 3197
ba479fd2 3198gcc_cv_c__bool=no
6e3f3080 3199fi
ba479fd2 3200rm -f conftest.$ac_objext conftest.$ac_ext
6e3f3080 3201
ba479fd2
NN
3202fi
3203echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5
3204echo "${ECHO_T}$gcc_cv_c__bool" >&6
63cf211a 3205if test $gcc_cv_c__bool = yes; then
ba479fd2
NN
3206
3207cat >>confdefs.h <<\_ACEOF
414d23ae 3208#define HAVE__BOOL 1
ba479fd2 3209_ACEOF
414d23ae
HPN
3210
3211fi
3212
3213
3214# sizeof(char) is 1 by definition.
ba479fd2
NN
3215echo "$as_me:$LINENO: checking size of void *" >&5
3216echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3217if test "${ac_cv_sizeof_void_p+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd
KG
3219else
3220 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3221 cat >conftest.$ac_ext <<_ACEOF
3222#line $LINENO "configure"
3223/* confdefs.h. */
3224_ACEOF
3225cat confdefs.h >>conftest.$ac_ext
3226cat >>conftest.$ac_ext <<_ACEOF
3227/* end confdefs.h. */
75b6f3fd
KG
3228#include "confdefs.h"
3229#include <sys/types.h>
3230
3231
ba479fd2
NN
3232int
3233main ()
3234{
75b6f3fd 3235switch (0) case 0: case (sizeof (void *) == $ac_size):;
ba479fd2
NN
3236 ;
3237 return 0;
3238}
3239_ACEOF
3240rm -f conftest.$ac_objext
3241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3242 (eval $ac_compile) 2>&5
3243 ac_status=$?
3244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3245 (exit $ac_status); } &&
3246 { ac_try='test -s conftest.$ac_objext'
3247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3248 (eval $ac_try) 2>&5
3249 ac_status=$?
3250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3251 (exit $ac_status); }; }; then
75b6f3fd
KG
3252 ac_cv_sizeof_void_p=$ac_size
3253else
ba479fd2
NN
3254 echo "$as_me: failed program was:" >&5
3255sed 's/^/| /' conftest.$ac_ext >&5
3256
75b6f3fd 3257fi
ba479fd2 3258rm -f conftest.$ac_objext conftest.$ac_ext
75b6f3fd
KG
3259 if test x$ac_cv_sizeof_void_p != x ; then break; fi
3260done
3261
3262fi
3263
3264if test x$ac_cv_sizeof_void_p = x ; then
ba479fd2
NN
3265 { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5
3266echo "$as_me: error: cannot determine a size for void *" >&2;}
3267 { (exit 1); exit 1; }; }
75b6f3fd 3268fi
ba479fd2
NN
3269echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3270echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3271
3272cat >>confdefs.h <<_ACEOF
75b6f3fd 3273#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
ba479fd2 3274_ACEOF
75b6f3fd
KG
3275
3276
ba479fd2
NN
3277echo "$as_me:$LINENO: checking size of short" >&5
3278echo $ECHO_N "checking size of short... $ECHO_C" >&6
3279if test "${ac_cv_sizeof_short+set}" = set; then
3280 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3281else
4977bab6 3282 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3283 cat >conftest.$ac_ext <<_ACEOF
3284#line $LINENO "configure"
3285/* confdefs.h. */
3286_ACEOF
3287cat confdefs.h >>conftest.$ac_ext
3288cat >>conftest.$ac_ext <<_ACEOF
3289/* end confdefs.h. */
414d23ae
HPN
3290#include "confdefs.h"
3291#include <sys/types.h>
3292
3293
ba479fd2
NN
3294int
3295main ()
3296{
414d23ae 3297switch (0) case 0: case (sizeof (short) == $ac_size):;
ba479fd2
NN
3298 ;
3299 return 0;
3300}
3301_ACEOF
3302rm -f conftest.$ac_objext
3303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3304 (eval $ac_compile) 2>&5
3305 ac_status=$?
3306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3307 (exit $ac_status); } &&
3308 { ac_try='test -s conftest.$ac_objext'
3309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3310 (eval $ac_try) 2>&5
3311 ac_status=$?
3312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3313 (exit $ac_status); }; }; then
414d23ae
HPN
3314 ac_cv_sizeof_short=$ac_size
3315else
ba479fd2
NN
3316 echo "$as_me: failed program was:" >&5
3317sed 's/^/| /' conftest.$ac_ext >&5
3318
84c041a1 3319fi
ba479fd2 3320rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3321 if test x$ac_cv_sizeof_short != x ; then break; fi
3322done
3323
84c041a1 3324fi
414d23ae
HPN
3325
3326if test x$ac_cv_sizeof_short = x ; then
ba479fd2
NN
3327 { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
3328echo "$as_me: error: cannot determine a size for short" >&2;}
3329 { (exit 1); exit 1; }; }
84c041a1 3330fi
ba479fd2
NN
3331echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
3332echo "${ECHO_T}$ac_cv_sizeof_short" >&6
3333
3334cat >>confdefs.h <<_ACEOF
414d23ae 3335#define SIZEOF_SHORT $ac_cv_sizeof_short
ba479fd2 3336_ACEOF
84c041a1 3337
414d23ae 3338
ba479fd2
NN
3339echo "$as_me:$LINENO: checking size of int" >&5
3340echo $ECHO_N "checking size of int... $ECHO_C" >&6
3341if test "${ac_cv_sizeof_int+set}" = set; then
3342 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3343else
4977bab6 3344 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3345 cat >conftest.$ac_ext <<_ACEOF
3346#line $LINENO "configure"
3347/* confdefs.h. */
3348_ACEOF
3349cat confdefs.h >>conftest.$ac_ext
3350cat >>conftest.$ac_ext <<_ACEOF
3351/* end confdefs.h. */
414d23ae
HPN
3352#include "confdefs.h"
3353#include <sys/types.h>
3354
75e93faa 3355
ba479fd2
NN
3356int
3357main ()
3358{
414d23ae 3359switch (0) case 0: case (sizeof (int) == $ac_size):;
ba479fd2
NN
3360 ;
3361 return 0;
3362}
3363_ACEOF
3364rm -f conftest.$ac_objext
3365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3366 (eval $ac_compile) 2>&5
3367 ac_status=$?
3368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3369 (exit $ac_status); } &&
3370 { ac_try='test -s conftest.$ac_objext'
3371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3372 (eval $ac_try) 2>&5
3373 ac_status=$?
3374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3375 (exit $ac_status); }; }; then
414d23ae 3376 ac_cv_sizeof_int=$ac_size
75e93faa 3377else
ba479fd2
NN
3378 echo "$as_me: failed program was:" >&5
3379sed 's/^/| /' conftest.$ac_ext >&5
3380
75e93faa 3381fi
ba479fd2 3382rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae 3383 if test x$ac_cv_sizeof_int != x ; then break; fi
75e93faa
ZW
3384done
3385
3386fi
3387
414d23ae 3388if test x$ac_cv_sizeof_int = x ; then
ba479fd2
NN
3389 { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
3390echo "$as_me: error: cannot determine a size for int" >&2;}
3391 { (exit 1); exit 1; }; }
414d23ae 3392fi
ba479fd2
NN
3393echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
3394echo "${ECHO_T}$ac_cv_sizeof_int" >&6
3395
3396cat >>confdefs.h <<_ACEOF
414d23ae 3397#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 3398_ACEOF
75e93faa 3399
414d23ae 3400
ba479fd2
NN
3401echo "$as_me:$LINENO: checking size of long" >&5
3402echo $ECHO_N "checking size of long... $ECHO_C" >&6
3403if test "${ac_cv_sizeof_long+set}" = set; then
3404 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3405else
4977bab6 3406 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3407 cat >conftest.$ac_ext <<_ACEOF
3408#line $LINENO "configure"
3409/* confdefs.h. */
3410_ACEOF
3411cat confdefs.h >>conftest.$ac_ext
3412cat >>conftest.$ac_ext <<_ACEOF
3413/* end confdefs.h. */
75e93faa 3414#include "confdefs.h"
414d23ae
HPN
3415#include <sys/types.h>
3416
75e93faa 3417
ba479fd2
NN
3418int
3419main ()
3420{
414d23ae 3421switch (0) case 0: case (sizeof (long) == $ac_size):;
ba479fd2
NN
3422 ;
3423 return 0;
3424}
3425_ACEOF
3426rm -f conftest.$ac_objext
3427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3428 (eval $ac_compile) 2>&5
3429 ac_status=$?
3430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3431 (exit $ac_status); } &&
3432 { ac_try='test -s conftest.$ac_objext'
3433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3434 (eval $ac_try) 2>&5
3435 ac_status=$?
3436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3437 (exit $ac_status); }; }; then
414d23ae 3438 ac_cv_sizeof_long=$ac_size
75e93faa 3439else
ba479fd2
NN
3440 echo "$as_me: failed program was:" >&5
3441sed 's/^/| /' conftest.$ac_ext >&5
3442
75e93faa 3443fi
ba479fd2 3444rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3445 if test x$ac_cv_sizeof_long != x ; then break; fi
3446done
75e93faa 3447
414d23ae 3448fi
75e93faa 3449
414d23ae 3450if test x$ac_cv_sizeof_long = x ; then
ba479fd2
NN
3451 { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
3452echo "$as_me: error: cannot determine a size for long" >&2;}
3453 { (exit 1); exit 1; }; }
75e93faa 3454fi
ba479fd2
NN
3455echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
3456echo "${ECHO_T}$ac_cv_sizeof_long" >&6
3457
3458cat >>confdefs.h <<_ACEOF
414d23ae 3459#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 3460_ACEOF
75e93faa
ZW
3461
3462
414d23ae 3463if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3464 echo "$as_me:$LINENO: checking size of long long" >&5
3465echo $ECHO_N "checking size of long long... $ECHO_C" >&6
3466if test "${ac_cv_sizeof_long_long+set}" = set; then
3467 echo $ECHO_N "(cached) $ECHO_C" >&6
04cabffc 3468else
4977bab6 3469 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3470 cat >conftest.$ac_ext <<_ACEOF
3471#line $LINENO "configure"
3472/* confdefs.h. */
3473_ACEOF
3474cat confdefs.h >>conftest.$ac_ext
3475cat >>conftest.$ac_ext <<_ACEOF
3476/* end confdefs.h. */
414d23ae
HPN
3477#include "confdefs.h"
3478#include <sys/types.h>
3479
04cabffc 3480
ba479fd2
NN
3481int
3482main ()
3483{
414d23ae 3484switch (0) case 0: case (sizeof (long long) == $ac_size):;
ba479fd2
NN
3485 ;
3486 return 0;
3487}
3488_ACEOF
3489rm -f conftest.$ac_objext
3490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3491 (eval $ac_compile) 2>&5
3492 ac_status=$?
3493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3494 (exit $ac_status); } &&
3495 { ac_try='test -s conftest.$ac_objext'
3496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3497 (eval $ac_try) 2>&5
3498 ac_status=$?
3499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3500 (exit $ac_status); }; }; then
414d23ae 3501 ac_cv_sizeof_long_long=$ac_size
04cabffc 3502else
ba479fd2
NN
3503 echo "$as_me: failed program was:" >&5
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
04cabffc 3506fi
ba479fd2 3507rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3508 if test x$ac_cv_sizeof_long_long != x ; then break; fi
3509done
3510
04cabffc
KG
3511fi
3512
414d23ae 3513if test x$ac_cv_sizeof_long_long = x ; then
ba479fd2
NN
3514 { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
3515echo "$as_me: error: cannot determine a size for long long" >&2;}
3516 { (exit 1); exit 1; }; }
414d23ae 3517fi
ba479fd2
NN
3518echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
3519echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
3520
3521cat >>confdefs.h <<_ACEOF
414d23ae 3522#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 3523_ACEOF
04cabffc 3524
04cabffc 3525
414d23ae
HPN
3526fi
3527if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3528 echo "$as_me:$LINENO: checking size of __int64" >&5
3529echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
3530if test "${ac_cv_sizeof___int64+set}" = set; then
3531 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3532else
4977bab6 3533 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2
NN
3534 cat >conftest.$ac_ext <<_ACEOF
3535#line $LINENO "configure"
3536/* confdefs.h. */
3537_ACEOF
3538cat confdefs.h >>conftest.$ac_ext
3539cat >>conftest.$ac_ext <<_ACEOF
3540/* end confdefs.h. */
414d23ae
HPN
3541#include "confdefs.h"
3542#include <sys/types.h>
3543
61842080 3544
ba479fd2
NN
3545int
3546main ()
3547{
414d23ae 3548switch (0) case 0: case (sizeof (__int64) == $ac_size):;
ba479fd2
NN
3549 ;
3550 return 0;
3551}
3552_ACEOF
3553rm -f conftest.$ac_objext
3554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3555 (eval $ac_compile) 2>&5
3556 ac_status=$?
3557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3558 (exit $ac_status); } &&
3559 { ac_try='test -s conftest.$ac_objext'
3560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3561 (eval $ac_try) 2>&5
3562 ac_status=$?
3563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564 (exit $ac_status); }; }; then
414d23ae 3565 ac_cv_sizeof___int64=$ac_size
75e93faa 3566else
ba479fd2
NN
3567 echo "$as_me: failed program was:" >&5
3568sed 's/^/| /' conftest.$ac_ext >&5
3569
75e93faa 3570fi
ba479fd2 3571rm -f conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3572 if test x$ac_cv_sizeof___int64 != x ; then break; fi
3573done
3574
75e93faa
ZW
3575fi
3576
414d23ae 3577if test x$ac_cv_sizeof___int64 = x ; then
ba479fd2
NN
3578 { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
3579echo "$as_me: error: cannot determine a size for __int64" >&2;}
3580 { (exit 1); exit 1; }; }
414d23ae 3581fi
ba479fd2
NN
3582echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
3583echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
3584
3585cat >>confdefs.h <<_ACEOF
414d23ae 3586#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 3587_ACEOF
414d23ae 3588
cafe096b 3589
414d23ae
HPN
3590fi
3591
34a86c2b
NN
3592# -----------------
3593# Find Ada compiler
3594# -----------------
3595
3596# See if GNAT has been installed
34a86c2b
NN
3597
3598
e0520fa7 3599
ba479fd2
NN
3600if test -n "$ac_tool_prefix"; then
3601 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
34a86c2b 3602set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
ba479fd2
NN
3603echo "$as_me:$LINENO: checking for $ac_word" >&5
3604echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3605if test "${ac_cv_prog_GNATBIND+set}" = set; then
3606 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3607else
3608 if test -n "$GNATBIND"; then
3609 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
3610else
ba479fd2
NN
3611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
3616 for ac_exec_ext in '' $ac_executable_extensions; do
3617 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3618 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
3619 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3620 break 2
3621 fi
3622done
3623done
3624
34a86c2b
NN
3625fi
3626fi
ba479fd2 3627GNATBIND=$ac_cv_prog_GNATBIND
34a86c2b 3628if test -n "$GNATBIND"; then
ba479fd2
NN
3629 echo "$as_me:$LINENO: result: $GNATBIND" >&5
3630echo "${ECHO_T}$GNATBIND" >&6
34a86c2b 3631else
ba479fd2
NN
3632 echo "$as_me:$LINENO: result: no" >&5
3633echo "${ECHO_T}no" >&6
34a86c2b
NN
3634fi
3635
ba479fd2 3636fi
34a86c2b 3637if test -z "$ac_cv_prog_GNATBIND"; then
ba479fd2 3638 ac_ct_GNATBIND=$GNATBIND
34a86c2b
NN
3639 # Extract the first word of "gnatbind", so it can be a program name with args.
3640set dummy gnatbind; ac_word=$2
ba479fd2
NN
3641echo "$as_me:$LINENO: checking for $ac_word" >&5
3642echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
3644 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b 3645else
ba479fd2
NN
3646 if test -n "$ac_ct_GNATBIND"; then
3647 ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test.
34a86c2b 3648else
ba479fd2
NN
3649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
3654 for ac_exec_ext in '' $ac_executable_extensions; do
3655 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3656 ac_cv_prog_ac_ct_GNATBIND="gnatbind"
3657 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3658 break 2
3659 fi
3660done
3661done
3662
3663 test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
34a86c2b
NN
3664fi
3665fi
ba479fd2
NN
3666ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
3667if test -n "$ac_ct_GNATBIND"; then
3668 echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
3669echo "${ECHO_T}$ac_ct_GNATBIND" >&6
34a86c2b 3670else
ba479fd2
NN
3671 echo "$as_me:$LINENO: result: no" >&5
3672echo "${ECHO_T}no" >&6
34a86c2b
NN
3673fi
3674
ba479fd2 3675 GNATBIND=$ac_ct_GNATBIND
34a86c2b 3676else
ba479fd2 3677 GNATBIND="$ac_cv_prog_GNATBIND"
34a86c2b
NN
3678fi
3679
ba479fd2
NN
3680echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
3681echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
3682if test "${gcc_cv_cc_supports_ada+set}" = set; then
3683 echo $ECHO_N "(cached) $ECHO_C" >&6
34a86c2b
NN
3684else
3685 cat >conftest.adb <<EOF
3686procedure conftest is begin null; end conftest;
3687EOF
e0520fa7
NN
3688gcc_cv_cc_supports_ada=no
3689# There is a bug in old released versions of GCC which causes the
3690# driver to exit successfully when the appropriate language module
3691# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
3692# Therefore we must check for the error message as well as an
3693# unsuccessful exit.
3694errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
3695if test x"$errors" = x; then
3696 gcc_cv_cc_supports_ada=yes
3697 break
3698fi
34a86c2b
NN
3699rm -f conftest.*
3700fi
ba479fd2
NN
3701echo "$as_me:$LINENO: result: $gcc_cv_cc_supports_ada" >&5
3702echo "${ECHO_T}$gcc_cv_cc_supports_ada" >&6
34a86c2b 3703
e0520fa7 3704if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then
34a86c2b
NN
3705 have_gnat=yes
3706else
3707 have_gnat=no
3708fi
3709
3710
34a86c2b
NN
3711# ---------------------
3712# Warnings and checking
3713# ---------------------
3714
3715strict1_warn=
f73ccc50 3716if test $ac_cv_prog_cc_no_long_long = yes ; then
34a86c2b
NN
3717 strict1_warn="-pedantic -Wno-long-long"
3718fi
3719
3720
ba479fd2 3721# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
3722# That's useful for people building cross-compilers, or just running a
3723# quick `make'.
3724warn_cflags=
3725if test "x$GCC" = "xyes"; then
3726 warn_cflags='$(GCC_WARN_CFLAGS)'
3727fi
3728
3729
dd859b8a
KG
3730# Enable -Werror in bootstrap stage2 and later.
3731# Change the default to "no" on release branches.
3732# Check whether --enable-werror or --disable-werror was given.
3733if test "${enable_werror+set}" = set; then
3734 enableval="$enable_werror"
ba479fd2 3735
dd859b8a
KG
3736else
3737 enable_werror=yes
ba479fd2 3738fi;
dd859b8a
KG
3739if test x$enable_werror = xyes ; then
3740 WERROR=-Werror
3741fi
3742
3743
414d23ae
HPN
3744# Enable expensive internal checks
3745# Check whether --enable-checking or --disable-checking was given.
3746if test "${enable_checking+set}" = set; then
3747 enableval="$enable_checking"
3748 ac_checking=
3749ac_tree_checking=
3750ac_rtl_checking=
3751ac_rtlflag_checking=
3752ac_gc_checking=
3753ac_gc_always_collect=
5dfa45d0 3754ac_fold_checking=
414d23ae
HPN
3755case "${enableval}" in
3756yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
3757 ac_rtlflag_checking=1 ;;
3758no) ;;
3759*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
3760 set fnord $enableval; shift
3761 IFS="$ac_save_IFS"
3762 for check
3763 do
3764 case $check in
3765 misc) ac_checking=1 ;;
3766 tree) ac_tree_checking=1 ;;
3767 rtlflag) ac_rtlflag_checking=1 ;;
3768 rtl) ac_rtl_checking=1 ;;
3769 gc) ac_gc_checking=1 ;;
3770 gcac) ac_gc_always_collect=1 ;;
5dfa45d0 3771 fold) ac_fold_checking=1 ;;
414d23ae 3772 valgrind) ac_checking_valgrind=1 ;;
ba479fd2
NN
3773 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
3774echo "$as_me: error: unknown check category $check" >&2;}
3775 { (exit 1); exit 1; }; } ;;
414d23ae
HPN
3776 esac
3777 done
3778 ;;
3779esac
3780
75e93faa 3781else
414d23ae
HPN
3782 # Enable some checks by default for development versions of GCC
3783ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
ba479fd2
NN
3784fi;
3785nocommon_flag=""
3786if test x$ac_checking != x ; then
3787
3788cat >>confdefs.h <<\_ACEOF
3789#define ENABLE_CHECKING 1
3790_ACEOF
3791
3792 nocommon_flag=-fno-common
3793fi
3794
3795if test x$ac_tree_checking != x ; then
3796
3797cat >>confdefs.h <<\_ACEOF
3798#define ENABLE_TREE_CHECKING 1
3799_ACEOF
3800
3801fi
3802if test x$ac_rtl_checking != x ; then
3803
3804cat >>confdefs.h <<\_ACEOF
3805#define ENABLE_RTL_CHECKING 1
3806_ACEOF
3807
3808fi
3809if test x$ac_rtlflag_checking != x ; then
3810
3811cat >>confdefs.h <<\_ACEOF
3812#define ENABLE_RTL_FLAG_CHECKING 1
3813_ACEOF
3814
3815fi
3816if test x$ac_gc_checking != x ; then
3817
3818cat >>confdefs.h <<\_ACEOF
3819#define ENABLE_GC_CHECKING 1
3820_ACEOF
3821
3822fi
3823if test x$ac_gc_always_collect != x ; then
3824
3825cat >>confdefs.h <<\_ACEOF
3826#define ENABLE_GC_ALWAYS_COLLECT 1
3827_ACEOF
3828
3829fi
3830if test x$ac_fold_checking != x ; then
3831
3832cat >>confdefs.h <<\_ACEOF
3833#define ENABLE_FOLD_CHECKING 1
3834_ACEOF
3835
3836fi
3837valgrind_path_defines=
3838valgrind_command=
3839
3840
3841echo "$as_me:$LINENO: checking for egrep" >&5
3842echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3843if test "${ac_cv_prog_egrep+set}" = set; then
3844 echo $ECHO_N "(cached) $ECHO_C" >&6
3845else
3846 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3847 then ac_cv_prog_egrep='grep -E'
3848 else ac_cv_prog_egrep='egrep'
3849 fi
3850fi
3851echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3852echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3853 EGREP=$ac_cv_prog_egrep
3854
3855
3856echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3857echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3858if test "${ac_cv_header_stdc+set}" = set; then
3859 echo $ECHO_N "(cached) $ECHO_C" >&6
3860else
3861 cat >conftest.$ac_ext <<_ACEOF
3862#line $LINENO "configure"
3863/* confdefs.h. */
3864_ACEOF
3865cat confdefs.h >>conftest.$ac_ext
3866cat >>conftest.$ac_ext <<_ACEOF
3867/* end confdefs.h. */
3868#include <stdlib.h>
3869#include <stdarg.h>
3870#include <string.h>
3871#include <float.h>
3872
3873int
3874main ()
3875{
3876
3877 ;
3878 return 0;
3879}
3880_ACEOF
3881rm -f conftest.$ac_objext
3882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3883 (eval $ac_compile) 2>&5
3884 ac_status=$?
3885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3886 (exit $ac_status); } &&
3887 { ac_try='test -s conftest.$ac_objext'
3888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3889 (eval $ac_try) 2>&5
3890 ac_status=$?
3891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892 (exit $ac_status); }; }; then
3893 ac_cv_header_stdc=yes
3894else
3895 echo "$as_me: failed program was:" >&5
3896sed 's/^/| /' conftest.$ac_ext >&5
3897
3898ac_cv_header_stdc=no
3899fi
3900rm -f conftest.$ac_objext conftest.$ac_ext
3901
3902if test $ac_cv_header_stdc = yes; then
3903 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3904 cat >conftest.$ac_ext <<_ACEOF
3905#line $LINENO "configure"
3906/* confdefs.h. */
3907_ACEOF
3908cat confdefs.h >>conftest.$ac_ext
3909cat >>conftest.$ac_ext <<_ACEOF
3910/* end confdefs.h. */
3911#include <string.h>
3912
3913_ACEOF
3914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915 $EGREP "memchr" >/dev/null 2>&1; then
3916 :
3917else
3918 ac_cv_header_stdc=no
3919fi
3920rm -f conftest*
3921
3922fi
3923
3924if test $ac_cv_header_stdc = yes; then
3925 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3926 cat >conftest.$ac_ext <<_ACEOF
3927#line $LINENO "configure"
3928/* confdefs.h. */
3929_ACEOF
3930cat confdefs.h >>conftest.$ac_ext
3931cat >>conftest.$ac_ext <<_ACEOF
3932/* end confdefs.h. */
3933#include <stdlib.h>
3934
3935_ACEOF
3936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3937 $EGREP "free" >/dev/null 2>&1; then
3938 :
3939else
3940 ac_cv_header_stdc=no
3941fi
3942rm -f conftest*
3943
3944fi
3945
3946if test $ac_cv_header_stdc = yes; then
3947 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3948 if test "$cross_compiling" = yes; then
3949 :
3950else
3951 cat >conftest.$ac_ext <<_ACEOF
3952#line $LINENO "configure"
3953/* confdefs.h. */
3954_ACEOF
3955cat confdefs.h >>conftest.$ac_ext
3956cat >>conftest.$ac_ext <<_ACEOF
3957/* end confdefs.h. */
3958#include <ctype.h>
3959#if ((' ' & 0x0FF) == 0x020)
3960# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3961# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3962#else
3963# define ISLOWER(c) \
3964 (('a' <= (c) && (c) <= 'i') \
3965 || ('j' <= (c) && (c) <= 'r') \
3966 || ('s' <= (c) && (c) <= 'z'))
3967# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3968#endif
3969
3970#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3971int
3972main ()
3973{
3974 int i;
3975 for (i = 0; i < 256; i++)
3976 if (XOR (islower (i), ISLOWER (i))
3977 || toupper (i) != TOUPPER (i))
3978 exit(2);
3979 exit (0);
3980}
3981_ACEOF
3982rm -f conftest$ac_exeext
3983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3984 (eval $ac_link) 2>&5
3985 ac_status=$?
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3989 (eval $ac_try) 2>&5
3990 ac_status=$?
3991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992 (exit $ac_status); }; }; then
3993 :
3994else
3995 echo "$as_me: program exited with status $ac_status" >&5
3996echo "$as_me: failed program was:" >&5
3997sed 's/^/| /' conftest.$ac_ext >&5
3998
3999( exit $ac_status )
4000ac_cv_header_stdc=no
63cf211a 4001fi
a6a5e4c9 4002rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4003fi
4004fi
4005fi
4006echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4007echo "${ECHO_T}$ac_cv_header_stdc" >&6
4008if test $ac_cv_header_stdc = yes; then
63cf211a 4009
ba479fd2
NN
4010cat >>confdefs.h <<\_ACEOF
4011#define STDC_HEADERS 1
4012_ACEOF
75e93faa 4013
414d23ae 4014fi
827ae6cf 4015
ba479fd2
NN
4016# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4017
4018
4019
827ae6cf 4020
6e3f3080
NN
4021
4022
6e3f3080 4023
6e3f3080 4024
ba479fd2
NN
4025
4026for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4027 inttypes.h stdint.h unistd.h
4028do
4029as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4030echo "$as_me:$LINENO: checking for $ac_header" >&5
4031echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4032if eval "test \"\${$as_ac_Header+set}\" = set"; then
4033 echo $ECHO_N "(cached) $ECHO_C" >&6
4034else
4035 cat >conftest.$ac_ext <<_ACEOF
4036#line $LINENO "configure"
4037/* confdefs.h. */
4038_ACEOF
4039cat confdefs.h >>conftest.$ac_ext
4040cat >>conftest.$ac_ext <<_ACEOF
4041/* end confdefs.h. */
4042$ac_includes_default
4043
4044#include <$ac_header>
4045_ACEOF
4046rm -f conftest.$ac_objext
4047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4048 (eval $ac_compile) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 eval "$as_ac_Header=yes"
4059else
4060 echo "$as_me: failed program was:" >&5
4061sed 's/^/| /' conftest.$ac_ext >&5
4062
4063eval "$as_ac_Header=no"
4064fi
4065rm -f conftest.$ac_objext conftest.$ac_ext
4066fi
4067echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4068echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4069if test `eval echo '${'$as_ac_Header'}'` = yes; then
4070 cat >>confdefs.h <<_ACEOF
4071#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4072_ACEOF
6e3f3080 4073
63cf211a 4074fi
6e3f3080 4075
ba479fd2
NN
4076done
4077
4078
4079if test "${ac_cv_header_valgrind_h+set}" = set; then
4080 echo "$as_me:$LINENO: checking for valgrind.h" >&5
4081echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4082if test "${ac_cv_header_valgrind_h+set}" = set; then
4083 echo $ECHO_N "(cached) $ECHO_C" >&6
4084fi
4085echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4086echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4087else
4088 # Is the header compilable?
4089echo "$as_me:$LINENO: checking valgrind.h usability" >&5
4090echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
4091cat >conftest.$ac_ext <<_ACEOF
4092#line $LINENO "configure"
4093/* confdefs.h. */
4094_ACEOF
4095cat confdefs.h >>conftest.$ac_ext
4096cat >>conftest.$ac_ext <<_ACEOF
4097/* end confdefs.h. */
4098$ac_includes_default
63cf211a 4099#include <valgrind.h>
ba479fd2
NN
4100_ACEOF
4101rm -f conftest.$ac_objext
4102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4103 (eval $ac_compile) 2>&5
4104 ac_status=$?
4105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4106 (exit $ac_status); } &&
4107 { ac_try='test -s conftest.$ac_objext'
4108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4109 (eval $ac_try) 2>&5
4110 ac_status=$?
4111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4112 (exit $ac_status); }; }; then
4113 ac_header_compiler=yes
4114else
4115 echo "$as_me: failed program was:" >&5
4116sed 's/^/| /' conftest.$ac_ext >&5
4117
4118ac_header_compiler=no
4119fi
4120rm -f conftest.$ac_objext conftest.$ac_ext
4121echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4122echo "${ECHO_T}$ac_header_compiler" >&6
4123
4124# Is the header present?
4125echo "$as_me:$LINENO: checking valgrind.h presence" >&5
4126echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
4127cat >conftest.$ac_ext <<_ACEOF
4128#line $LINENO "configure"
4129/* confdefs.h. */
4130_ACEOF
4131cat confdefs.h >>conftest.$ac_ext
4132cat >>conftest.$ac_ext <<_ACEOF
4133/* end confdefs.h. */
4134#include <valgrind.h>
4135_ACEOF
4136if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4137 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4138 ac_status=$?
4139 grep -v '^ *+' conftest.er1 >conftest.err
4140 rm -f conftest.er1
4141 cat conftest.err >&5
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); } >/dev/null; then
4144 if test -s conftest.err; then
4145 ac_cpp_err=$ac_c_preproc_warn_flag
4146 else
4147 ac_cpp_err=
4148 fi
4149else
4150 ac_cpp_err=yes
4151fi
4152if test -z "$ac_cpp_err"; then
4153 ac_header_preproc=yes
4154else
4155 echo "$as_me: failed program was:" >&5
4156sed 's/^/| /' conftest.$ac_ext >&5
4157
4158 ac_header_preproc=no
4159fi
4160rm -f conftest.err conftest.$ac_ext
4161echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4162echo "${ECHO_T}$ac_header_preproc" >&6
4163
4164# So? What about this header?
4165case $ac_header_compiler:$ac_header_preproc in
4166 yes:no )
4167 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
4168echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4169 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4170echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4171 (
4172 cat <<\_ASBOX
4173## ------------------------------------ ##
4174## Report this to bug-autoconf@gnu.org. ##
4175## ------------------------------------ ##
4176_ASBOX
4177 ) |
4178 sed "s/^/$as_me: WARNING: /" >&2
4179 ;;
4180 no:yes )
4181 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
4182echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
4183 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
4184echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
4185 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4186echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
4187 (
4188 cat <<\_ASBOX
4189## ------------------------------------ ##
4190## Report this to bug-autoconf@gnu.org. ##
4191## ------------------------------------ ##
4192_ASBOX
4193 ) |
4194 sed "s/^/$as_me: WARNING: /" >&2
4195 ;;
4196esac
4197echo "$as_me:$LINENO: checking for valgrind.h" >&5
4198echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4199if test "${ac_cv_header_valgrind_h+set}" = set; then
4200 echo $ECHO_N "(cached) $ECHO_C" >&6
4201else
4202 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 4203fi
ba479fd2
NN
4204echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4205echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4206
6e3f3080 4207fi
ba479fd2 4208if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
4209 have_valgrind_h=yes
4210else
ba479fd2 4211 have_valgrind_h=no
6938ec6c
NN
4212fi
4213
4214
ba479fd2 4215
414d23ae
HPN
4216if test x$ac_checking_valgrind != x ; then
4217 # It is certainly possible that there's valgrind but no valgrind.h.
4218 # GCC relies on making annotations so we must have both.
ba479fd2
NN
4219 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
4220echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
4221 cat >conftest.$ac_ext <<_ACEOF
4222#line $LINENO "configure"
4223/* confdefs.h. */
4224_ACEOF
4225cat confdefs.h >>conftest.$ac_ext
4226cat >>conftest.$ac_ext <<_ACEOF
4227/* end confdefs.h. */
a207b594 4228#include <valgrind/memcheck.h>
14011ca4
AJ
4229#ifndef VALGRIND_DISCARD
4230#error VALGRIND_DISCARD not defined
4231#endif
ba479fd2
NN
4232_ACEOF
4233if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4234 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4235 ac_status=$?
4236 grep -v '^ *+' conftest.er1 >conftest.err
4237 rm -f conftest.er1
4238 cat conftest.err >&5
4239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240 (exit $ac_status); } >/dev/null; then
4241 if test -s conftest.err; then
4242 ac_cpp_err=$ac_c_preproc_warn_flag
4243 else
4244 ac_cpp_err=
4245 fi
4246else
4247 ac_cpp_err=yes
4248fi
4249if test -z "$ac_cpp_err"; then
a207b594
HPN
4250 gcc_cv_header_valgrind_memcheck_h=yes
4251else
ba479fd2
NN
4252 echo "$as_me: failed program was:" >&5
4253sed 's/^/| /' conftest.$ac_ext >&5
4254
a207b594
HPN
4255 gcc_cv_header_valgrind_memcheck_h=no
4256fi
ba479fd2
NN
4257rm -f conftest.err conftest.$ac_ext
4258 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
4259echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
4260 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
4261echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
4262 cat >conftest.$ac_ext <<_ACEOF
4263#line $LINENO "configure"
4264/* confdefs.h. */
4265_ACEOF
4266cat confdefs.h >>conftest.$ac_ext
4267cat >>conftest.$ac_ext <<_ACEOF
4268/* end confdefs.h. */
a207b594
HPN
4269#include <memcheck.h>
4270#ifndef VALGRIND_DISCARD
4271#error VALGRIND_DISCARD not defined
4272#endif
ba479fd2
NN
4273_ACEOF
4274if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4275 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4276 ac_status=$?
4277 grep -v '^ *+' conftest.er1 >conftest.err
4278 rm -f conftest.er1
4279 cat conftest.err >&5
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); } >/dev/null; then
4282 if test -s conftest.err; then
4283 ac_cpp_err=$ac_c_preproc_warn_flag
4284 else
4285 ac_cpp_err=
4286 fi
4287else
4288 ac_cpp_err=yes
4289fi
4290if test -z "$ac_cpp_err"; then
14011ca4
AJ
4291 gcc_cv_header_memcheck_h=yes
4292else
ba479fd2
NN
4293 echo "$as_me: failed program was:" >&5
4294sed 's/^/| /' conftest.$ac_ext >&5
4295
cafe096b
EC
4296 gcc_cv_header_memcheck_h=no
4297fi
ba479fd2
NN
4298rm -f conftest.err conftest.$ac_ext
4299 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
4300echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
4301
56694dd9
ZW
4302# Prepare PATH_SEPARATOR.
4303# The user is always right.
4304if test "${PATH_SEPARATOR+set}" != set; then
4305 echo "#! /bin/sh" >conf$$.sh
4306 echo "exit 0" >>conf$$.sh
4307 chmod +x conf$$.sh
4308 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4309 PATH_SEPARATOR=';'
4310 else
4311 PATH_SEPARATOR=:
4312 fi
4313 rm -f conf$$.sh
4314fi
4315
4316# Find out how to test for executable files. Don't use a zero-byte file,
4317# as systems may use methods other than mode bits to determine executability.
4318cat >conf$$.file <<_ASEOF
4319#! /bin/sh
4320exit 0
4321_ASEOF
4322chmod +x conf$$.file
4323if test -x conf$$.file >/dev/null 2>&1; then
4324 ac_executable_p="test -x"
4325else
4326 ac_executable_p="test -f"
4327fi
4328rm -f conf$$.file
4329
4330# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 4331set dummy valgrind; ac_word=$2
ba479fd2
NN
4332echo "$as_me:$LINENO: checking for $ac_word" >&5
4333echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334if test "${ac_cv_path_valgrind_path+set}" = set; then
4335 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
4336else
4337 case "$valgrind_path" in
56694dd9
ZW
4338 [\\/]* | ?:[\\/]*)
4339 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
4340 ;;
414d23ae 4341 *)
56694dd9
ZW
4342 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
4343 for ac_dir in $PATH; do
4344 IFS="$ac_save_IFS"
4345 test -z "$ac_dir" && ac_dir=.
4346 for ac_exec_ext in '' $ac_executable_extensions; do
4347 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
4348 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
4349 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
4350 break 2
4351 fi
4352 fi
4353 done
4354 done
4355 IFS="$ac_save_IFS"
4356 ;;
414d23ae 4357esac
75e93faa 4358fi
414d23ae
HPN
4359valgrind_path="$ac_cv_path_valgrind_path"
4360if test -n "$valgrind_path"; then
ba479fd2
NN
4361 echo "$as_me:$LINENO: result: $valgrind_path" >&5
4362echo "${ECHO_T}$valgrind_path" >&6
414d23ae 4363else
ba479fd2
NN
4364 echo "$as_me:$LINENO: result: no" >&5
4365echo "${ECHO_T}no" >&6
414d23ae
HPN
4366fi
4367
a207b594
HPN
4368 if test "x$valgrind_path" = "x" \
4369 || (test $have_valgrind_h = no \
4370 && test $gcc_cv_header_memcheck_h = no \
4371 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
4372 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
4373echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
4374 { (exit 1); exit 1; }; }
414d23ae
HPN
4375 fi
4376 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
4377 valgrind_command="$valgrind_path -q"
ba479fd2
NN
4378
4379cat >>confdefs.h <<\_ACEOF
414d23ae 4380#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 4381_ACEOF
75e93faa 4382
a207b594 4383 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
4384
4385cat >>confdefs.h <<\_ACEOF
a207b594 4386#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 4387_ACEOF
a207b594
HPN
4388
4389 fi
14011ca4 4390 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
4391
4392cat >>confdefs.h <<\_ACEOF
14011ca4 4393#define HAVE_MEMCHECK_H 1
ba479fd2 4394_ACEOF
14011ca4
AJ
4395
4396 fi
414d23ae 4397fi
75e93faa 4398
75e93faa
ZW
4399
4400
414d23ae
HPN
4401# Enable code coverage collection
4402# Check whether --enable-coverage or --disable-coverage was given.
4403if test "${enable_coverage+set}" = set; then
4404 enableval="$enable_coverage"
4405 case "${enableval}" in
4406yes|noopt)
e61a2eb7 4407 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
414d23ae
HPN
4408 ;;
4409opt)
e61a2eb7 4410 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
414d23ae
HPN
4411 ;;
4412*)
ba479fd2
NN
4413 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
4414echo "$as_me: error: unknown coverage setting $enableval" >&2;}
4415 { (exit 1); exit 1; }; }
414d23ae
HPN
4416 ;;
4417esac
75e93faa 4418else
414d23ae 4419 coverage_flags=""
ba479fd2 4420fi;
5c3bc9fb 4421
414d23ae 4422
439a7e54
DN
4423# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
4424if test "${enable_gather_detailed_mem_stats+set}" = set; then
4425 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 4426
439a7e54
DN
4427else
4428 enable_gather_detailed_mem_stats=no
ba479fd2 4429fi;
439a7e54 4430if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
4431
4432cat >>confdefs.h <<\_ACEOF
439a7e54 4433#define GATHER_STATISTICS 1
ba479fd2 4434_ACEOF
439a7e54
DN
4435
4436fi
4437
73458fb7
NN
4438# -------------------------------
4439# Miscenalleous configure options
4440# -------------------------------
34a86c2b
NN
4441
4442# With stabs
ba479fd2 4443
34a86c2b
NN
4444# Check whether --with-stabs or --without-stabs was given.
4445if test "${with_stabs+set}" = set; then
4446 withval="$with_stabs"
4447 stabs="$with_stabs"
4448else
4449 stabs=no
ba479fd2 4450fi;
cafe096b 4451
34a86c2b
NN
4452# Determine whether or not multilibs are enabled.
4453# Check whether --enable-multilib or --disable-multilib was given.
4454if test "${enable_multilib+set}" = set; then
4455 enableval="$enable_multilib"
ba479fd2 4456
34a86c2b
NN
4457else
4458 enable_multilib=yes
ba479fd2 4459fi;
75e93faa 4460
34a86c2b 4461
414d23ae
HPN
4462# Enable __cxa_atexit for C++.
4463# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
4464if test "${enable___cxa_atexit+set}" = set; then
4465 enableval="$enable___cxa_atexit"
75e93faa 4466
ba479fd2 4467fi;
75e93faa 4468
414d23ae
HPN
4469# Enable threads
4470# Pass with no value to take the default
4471# Pass with a value to specify a thread package
4472# Check whether --enable-threads or --disable-threads was given.
4473if test "${enable_threads+set}" = set; then
4474 enableval="$enable_threads"
ba479fd2 4475
414d23ae
HPN
4476else
4477 enable_threads=''
ba479fd2 4478fi;
c2e494a8 4479# Save in case it gets overwritten in config.gcc
414d23ae 4480enable_threads_flag=$enable_threads
414d23ae
HPN
4481
4482# Check whether --enable-objc-gc or --disable-objc-gc was given.
4483if test "${enable_objc_gc+set}" = set; then
4484 enableval="$enable_objc_gc"
4485 if test x$enable_objc_gc = xno; then
4486 objc_boehm_gc=''
4487else
4488 objc_boehm_gc=1
4489fi
4490else
4491 objc_boehm_gc=''
ba479fd2 4492fi;
75e93faa
ZW
4493
4494
414d23ae
HPN
4495# Check whether --with-dwarf2 or --without-dwarf2 was given.
4496if test "${with_dwarf2+set}" = set; then
4497 withval="$with_dwarf2"
4498 dwarf2="$with_dwarf2"
75e93faa 4499else
414d23ae 4500 dwarf2=no
ba479fd2 4501fi;
75e93faa 4502
414d23ae
HPN
4503# Check whether --enable-shared or --disable-shared was given.
4504if test "${enable_shared+set}" = set; then
4505 enableval="$enable_shared"
ba479fd2 4506
414d23ae
HPN
4507 case $enable_shared in
4508 yes | no) ;;
4509 *)
4510 enable_shared=no
4511 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4512 for pkg in $enableval; do
4513 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
4514 enable_shared=yes
4515 fi
4516 done
4517 IFS="$ac_save_ifs"
4518 ;;
4519 esac
4520
75e93faa 4521else
414d23ae 4522 enable_shared=yes
ba479fd2 4523fi;
75e93faa 4524
75e93faa 4525
75e93faa 4526
4977bab6
ZW
4527# Check whether --with-sysroot or --without-sysroot was given.
4528if test "${with_sysroot+set}" = set; then
4529 withval="$with_sysroot"
ba479fd2 4530
4977bab6 4531 case ${with_sysroot} in
caa55b1e 4532 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
4533 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
4534 esac
ba479fd2 4535
4977bab6
ZW
4536 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
4537 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
4538
047d636f
DJ
4539 if test "x$exec_prefix" = xNONE; then
4540 if test "x$prefix" = xNONE; then
4541 test_prefix=/usr/local
4542 else
4543 test_prefix=$prefix
4544 fi
4545 else
4546 test_prefix=$exec_prefix
4547 fi
4548 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
4549 "${test_prefix}"|"${test_prefix}/"*|\
4550 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
4551 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
4552 TARGET_SYSTEM_ROOT_DEFINE="$t"
4553 ;;
4554 esac
4555
4977bab6 4556else
ba479fd2 4557
4977bab6 4558 TARGET_SYSTEM_ROOT=
db720d9a 4559 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
4560 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
4561
ba479fd2 4562fi;
4977bab6
ZW
4563
4564
4565
4566
d1bd0ded 4567# Build with intermodule optimisations
d1bd0ded
GK
4568# Check whether --enable-intermodule or --disable-intermodule was given.
4569if test "${enable_intermodule+set}" = set; then
4570 enableval="$enable_intermodule"
0c46c5c7
KC
4571 case ${enable_intermodule} in
4572 yes) onestep="-onestep";;
4573 *) onestep="";;
d1bd0ded 4574esac
0c46c5c7
KC
4575else
4576 onestep=""
ba479fd2 4577fi;
d1bd0ded
GK
4578
4579
73458fb7
NN
4580# -------------------------
4581# Checks for other programs
4582# -------------------------
5b67ad6f 4583
ba479fd2
NN
4584echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4585echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
4586set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4587if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4588 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 4589else
ba479fd2 4590 cat >conftest.make <<\_ACEOF
e9a25f70 4591all:
ba479fd2
NN
4592 @echo 'ac_maketemp="$(MAKE)"'
4593_ACEOF
e9a25f70 4594# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 4595eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
4596if test -n "$ac_maketemp"; then
4597 eval ac_cv_prog_make_${ac_make}_set=yes
4598else
4599 eval ac_cv_prog_make_${ac_make}_set=no
4600fi
ba479fd2 4601rm -f conftest.make
e9a25f70
JL
4602fi
4603if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
4604 echo "$as_me:$LINENO: result: yes" >&5
4605echo "${ECHO_T}yes" >&6
e9a25f70
JL
4606 SET_MAKE=
4607else
ba479fd2
NN
4608 echo "$as_me:$LINENO: result: no" >&5
4609echo "${ECHO_T}no" >&6
e9a25f70
JL
4610 SET_MAKE="MAKE=${MAKE-make}"
4611fi
4612
4613
861bb6c1 4614# Find some useful tools
ba479fd2 4615for ac_prog in gawk mawk nawk awk
861bb6c1 4616do
ba479fd2 4617 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 4618set dummy $ac_prog; ac_word=$2
ba479fd2
NN
4619echo "$as_me:$LINENO: checking for $ac_word" >&5
4620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4621if test "${ac_cv_prog_AWK+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4623else
4624 if test -n "$AWK"; then
4625 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4626else
ba479fd2
NN
4627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628for as_dir in $PATH
4629do
4630 IFS=$as_save_IFS
4631 test -z "$as_dir" && as_dir=.
4632 for ac_exec_ext in '' $ac_executable_extensions; do
4633 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4634 ac_cv_prog_AWK="$ac_prog"
4635 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4636 break 2
4637 fi
4638done
4639done
4640
861bb6c1
JL
4641fi
4642fi
ba479fd2 4643AWK=$ac_cv_prog_AWK
861bb6c1 4644if test -n "$AWK"; then
ba479fd2
NN
4645 echo "$as_me:$LINENO: result: $AWK" >&5
4646echo "${ECHO_T}$AWK" >&6
861bb6c1 4647else
ba479fd2
NN
4648 echo "$as_me:$LINENO: result: no" >&5
4649echo "${ECHO_T}no" >&6
861bb6c1
JL
4650fi
4651
ba479fd2 4652 test -n "$AWK" && break
861bb6c1
JL
4653done
4654
2c4902b9
NN
4655# We need awk to run opts.sh (to create options.c and options.h).
4656# Bail out if it's missing.
4657case ${AWK} in
ba479fd2
NN
4658 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
4659echo "$as_me: error: can't build without awk, bailing out" >&2;}
4660 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
4661esac
4662
ba479fd2
NN
4663echo "$as_me:$LINENO: checking whether ln works" >&5
4664echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
4665if test "${gcc_cv_prog_LN+set}" = set; then
4666 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4667else
4668 rm -f conftestdata_t
4669echo >conftestdata_f
4670if ln conftestdata_f conftestdata_t 2>/dev/null
4671then
4672 gcc_cv_prog_LN="ln"
4673else
4674 if ln -s conftestdata_f conftestdata_t 2>/dev/null
4675 then
4676 gcc_cv_prog_LN="ln -s"
4677 else
4678 gcc_cv_prog_LN=cp
4679 fi
4680fi
4681rm -f conftestdata_f conftestdata_t
4682
4683fi
4684LN="$gcc_cv_prog_LN"
4685if test "$gcc_cv_prog_LN" = "ln"; then
ba479fd2
NN
4686 echo "$as_me:$LINENO: result: yes" >&5
4687echo "${ECHO_T}yes" >&6
0a4b6309
RL
4688else
4689 if test "$gcc_cv_prog_LN" = "ln -s"; then
ba479fd2
NN
4690 echo "$as_me:$LINENO: result: no, using ln -s" >&5
4691echo "${ECHO_T}no, using ln -s" >&6
0a4b6309 4692 else
ba479fd2
NN
4693 echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5
4694echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6
0a4b6309
RL
4695 fi
4696fi
4697
ba479fd2
NN
4698echo "$as_me:$LINENO: checking whether ln -s works" >&5
4699echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4700if test "${gcc_cv_prog_LN_S+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4702else
4703 rm -f conftestdata_t
4704echo >conftestdata_f
4705if ln -s conftestdata_f conftestdata_t 2>/dev/null
4706then
4707 gcc_cv_prog_LN_S="ln -s"
4708else
4709 if ln conftestdata_f conftestdata_t 2>/dev/null
4710 then
4711 gcc_cv_prog_LN_S=ln
4712 else
4713 gcc_cv_prog_LN_S=cp
4714 fi
4715fi
4716rm -f conftestdata_f conftestdata_t
4717
4718fi
4719LN_S="$gcc_cv_prog_LN_S"
4720if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
4721 echo "$as_me:$LINENO: result: yes" >&5
4722echo "${ECHO_T}yes" >&6
0a4b6309
RL
4723else
4724 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
4725 echo "$as_me:$LINENO: result: no, using ln" >&5
4726echo "${ECHO_T}no, using ln" >&6
0a4b6309 4727 else
ba479fd2
NN
4728 echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
4729echo "${ECHO_T}no, and neither does ln, so using cp" >&6
0a4b6309
RL
4730 fi
4731fi
4732
ba479fd2
NN
4733if test -n "$ac_tool_prefix"; then
4734 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4735set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4736echo "$as_me:$LINENO: checking for $ac_word" >&5
4737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4738if test "${ac_cv_prog_RANLIB+set}" = set; then
4739 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4740else
4741 if test -n "$RANLIB"; then
4742 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4743else
ba479fd2
NN
4744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in $PATH
4746do
4747 IFS=$as_save_IFS
4748 test -z "$as_dir" && as_dir=.
4749 for ac_exec_ext in '' $ac_executable_extensions; do
4750 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4753 break 2
4754 fi
4755done
4756done
4757
6e3f3080
NN
4758fi
4759fi
ba479fd2 4760RANLIB=$ac_cv_prog_RANLIB
6e3f3080 4761if test -n "$RANLIB"; then
ba479fd2
NN
4762 echo "$as_me:$LINENO: result: $RANLIB" >&5
4763echo "${ECHO_T}$RANLIB" >&6
4764else
4765 echo "$as_me:$LINENO: result: no" >&5
4766echo "${ECHO_T}no" >&6
4767fi
4768
4769fi
4770if test -z "$ac_cv_prog_RANLIB"; then
4771 ac_ct_RANLIB=$RANLIB
4772 # Extract the first word of "ranlib", so it can be a program name with args.
4773set dummy ranlib; ac_word=$2
4774echo "$as_me:$LINENO: checking for $ac_word" >&5
4775echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4776if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4777 echo $ECHO_N "(cached) $ECHO_C" >&6
4778else
4779 if test -n "$ac_ct_RANLIB"; then
4780 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4781else
4782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in $PATH
4784do
4785 IFS=$as_save_IFS
4786 test -z "$as_dir" && as_dir=.
4787 for ac_exec_ext in '' $ac_executable_extensions; do
4788 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4789 ac_cv_prog_ac_ct_RANLIB="ranlib"
4790 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4791 break 2
4792 fi
4793done
4794done
4795
4796 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4797fi
4798fi
4799ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4800if test -n "$ac_ct_RANLIB"; then
4801 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4802echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 4803else
ba479fd2
NN
4804 echo "$as_me:$LINENO: result: no" >&5
4805echo "${ECHO_T}no" >&6
4806fi
4807
4808 RANLIB=$ac_ct_RANLIB
4809else
4810 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
4811fi
4812
0a4b6309
RL
4813# Find a good install program. We prefer a C program (faster),
4814# so one script is as good as another. But avoid the broken or
4815# incompatible versions:
4816# SysV /etc/install, /usr/sbin/install
4817# SunOS /usr/etc/install
4818# IRIX /sbin/install
4819# AIX /bin/install
4820# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4821# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4822# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
4823echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
4824echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 4825if test -z "$INSTALL"; then
ba479fd2
NN
4826if test "${ac_cv_path_install+set}" = set; then
4827 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4828else
4829 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
4830 for ac_dir in $PATH; do
4831 # Account for people who put trailing slashes in PATH elements.
4832 case "$ac_dir/" in
4833 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4834 *)
4835 # OSF1 and SCO ODT 3.0 have their own names for install.
4836 for ac_prog in ginstall scoinst install; do
4837 if test -f $ac_dir/$ac_prog; then
4838 if test $ac_prog = install &&
4839 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4840 # AIX install. It has an incompatible calling convention.
4841 # OSF/1 installbsd also uses dspmsg, but is usable.
4842 :
4843 else
4844 ac_cv_path_install="$ac_dir/$ac_prog -c"
4845 break 2
4846 fi
4847 fi
4848 done
4849 ;;
4850 esac
4851 done
4852 IFS="$ac_save_IFS"
4853
4854fi
4855 if test "${ac_cv_path_install+set}" = set; then
4856 INSTALL="$ac_cv_path_install"
4857 else
4858 # As a last resort, use the slow shell script. We don't cache a
4859 # path for INSTALL within a source directory, because that will
4860 # break other packages using the cache if that directory is
4861 # removed, or if the path is relative.
4862 INSTALL="$ac_install_sh"
4863 fi
4864fi
ba479fd2
NN
4865echo "$as_me:$LINENO: result: $INSTALL" >&5
4866echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
4867
4868# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4869# It thinks the first close brace ends the variable substitution.
4870test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4871
4872test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4873
861bb6c1 4874
3a000df0 4875# See if cmp has --ignore-initial.
ba479fd2
NN
4876echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
4877echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
4878if test "${gcc_cv_prog_cmp_skip+set}" = set; then
4879 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
4880else
4881 echo abfoo >t1
4882 echo cdfoo >t2
269a7343 4883 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
4884 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
4885 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 4886 :
3a000df0
KC
4887 else
4888 gcc_cv_prog_cmp_skip=gnucompare
4889 fi
269a7343
KG
4890 fi
4891 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
4892 if cmp t1 t2 2 2 > /dev/null 2>&1; then
4893 if cmp t1 t2 1 1 > /dev/null 2>&1; then
4894 :
4895 else
4896 gcc_cv_prog_cmp_skip=fastcompare
4897 fi
4898 fi
3a000df0
KC
4899 fi
4900 rm t1 t2
4901
4902fi
ba479fd2
NN
4903echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
4904echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
4905make_compare_target=$gcc_cv_prog_cmp_skip
4906
4907
4908
73458fb7
NN
4909# See if we have the mktemp command.
4910# Extract the first word of "mktemp", so it can be a program name with args.
4911set dummy mktemp; ac_word=$2
ba479fd2
NN
4912echo "$as_me:$LINENO: checking for $ac_word" >&5
4913echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4914if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
4915 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4916else
4917 if test -n "$have_mktemp_command"; then
4918 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
4919else
ba479fd2
NN
4920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in $PATH
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
4926 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4927 ac_cv_prog_have_mktemp_command="yes"
4928 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932done
4933
73458fb7
NN
4934 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
4935fi
4936fi
ba479fd2 4937have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 4938if test -n "$have_mktemp_command"; then
ba479fd2
NN
4939 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
4940echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 4941else
ba479fd2
NN
4942 echo "$as_me:$LINENO: result: no" >&5
4943echo "${ECHO_T}no" >&6
73458fb7
NN
4944fi
4945
4946
4947# Do we have a single-tree copy of texinfo?
4948if test -f $srcdir/../texinfo/Makefile.in; then
4949 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
4950 gcc_cv_prog_makeinfo_modern=yes
ba479fd2
NN
4951 echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5
4952echo "${ECHO_T}Using makeinfo from the unified source tree." >&6
73458fb7
NN
4953else
4954 # See if makeinfo has been installed and is modern enough
4955 # that we can use it.
4956 # Extract the first word of "makeinfo", so it can be a program name with args.
4957set dummy makeinfo; ac_word=$2
ba479fd2
NN
4958echo "$as_me:$LINENO: checking for $ac_word" >&5
4959echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4960if test "${ac_cv_prog_MAKEINFO+set}" = set; then
4961 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4962else
4963 if test -n "$MAKEINFO"; then
4964 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
4965else
ba479fd2
NN
4966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973 ac_cv_prog_MAKEINFO="makeinfo"
4974 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978done
4979
73458fb7
NN
4980fi
4981fi
ba479fd2 4982MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 4983if test -n "$MAKEINFO"; then
ba479fd2
NN
4984 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
4985echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 4986else
ba479fd2
NN
4987 echo "$as_me:$LINENO: result: no" >&5
4988echo "${ECHO_T}no" >&6
73458fb7
NN
4989fi
4990
4991if test -n "$MAKEINFO"; then
4992 # Found it, now check the version.
ba479fd2
NN
4993 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
4994echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
4995if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
4996 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
4997else
4998 ac_prog_version=`$MAKEINFO --version 2>&1 |
4999 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
a541f69d 5000 echo "configure:5000: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
5001 case $ac_prog_version in
5002 '') gcc_cv_prog_makeinfo_modern=no;;
5003 4.[2-9]*)
5004 gcc_cv_prog_makeinfo_modern=yes;;
5005 *) gcc_cv_prog_makeinfo_modern=no;;
5006 esac
5007
5008fi
ba479fd2
NN
5009echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
5010echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
5011else
5012 gcc_cv_prog_makeinfo_modern=no
5013fi
5014
5015fi
5016
5017if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
5018 { echo "$as_me:$LINENO: WARNING:
5019*** Makeinfo is missing or too old.
5020*** Info documentation will not be built." >&5
5021echo "$as_me: WARNING:
cafe096b 5022*** Makeinfo is missing or too old.
ba479fd2 5023*** Info documentation will not be built." >&2;}
73458fb7
NN
5024 BUILD_INFO=
5025else
ba479fd2 5026 BUILD_INFO=info
73458fb7
NN
5027fi
5028
5029# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
5030echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
5031echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 5032if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
5033 echo "$as_me:$LINENO: result: yes" >&5
5034echo "${ECHO_T}yes" >&6
5035 GENERATED_MANPAGES=generated-manpages
73458fb7 5036else
ba479fd2
NN
5037 echo "$as_me:$LINENO: result: no" >&5
5038echo "${ECHO_T}no" >&6
73458fb7
NN
5039 GENERATED_MANPAGES=
5040fi
5041
5042# How about lex?
5043if test -f $srcdir/../flex/skel.c; then
5044 FLEX='$(objdir)/../flex/flex'
5045else
5046 # Extract the first word of "flex", so it can be a program name with args.
5047set dummy flex; ac_word=$2
ba479fd2
NN
5048echo "$as_me:$LINENO: checking for $ac_word" >&5
5049echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5050if test "${ac_cv_prog_FLEX+set}" = set; then
5051 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5052else
5053 if test -n "$FLEX"; then
5054 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
5055else
ba479fd2
NN
5056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5063 ac_cv_prog_FLEX="flex"
5064 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5066 fi
5067done
5068done
5069
73458fb7
NN
5070 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
5071fi
5072fi
ba479fd2 5073FLEX=$ac_cv_prog_FLEX
73458fb7 5074if test -n "$FLEX"; then
ba479fd2
NN
5075 echo "$as_me:$LINENO: result: $FLEX" >&5
5076echo "${ECHO_T}$FLEX" >&6
73458fb7 5077else
ba479fd2
NN
5078 echo "$as_me:$LINENO: result: no" >&5
5079echo "${ECHO_T}no" >&6
73458fb7
NN
5080fi
5081
5082fi
5083
5084# Bison?
5085# The -L switch is so bison can find its skeleton file.
5086if test -f $srcdir/../bison/bison.simple; then
5087 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
5088else
5089 # Extract the first word of "bison", so it can be a program name with args.
5090set dummy bison; ac_word=$2
ba479fd2
NN
5091echo "$as_me:$LINENO: checking for $ac_word" >&5
5092echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5093if test "${ac_cv_prog_BISON+set}" = set; then
5094 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5095else
5096 if test -n "$BISON"; then
5097 ac_cv_prog_BISON="$BISON" # Let the user override the test.
5098else
ba479fd2
NN
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5106 ac_cv_prog_BISON="bison"
5107 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5108 break 2
5109 fi
5110done
5111done
5112
73458fb7
NN
5113 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
5114fi
5115fi
ba479fd2 5116BISON=$ac_cv_prog_BISON
73458fb7 5117if test -n "$BISON"; then
ba479fd2
NN
5118 echo "$as_me:$LINENO: result: $BISON" >&5
5119echo "${ECHO_T}$BISON" >&6
73458fb7 5120else
ba479fd2
NN
5121 echo "$as_me:$LINENO: result: no" >&5
5122echo "${ECHO_T}no" >&6
73458fb7
NN
5123fi
5124
5125fi
5126
5127# --------------------
5128# Checks for C headers
5129# --------------------
5130
ba479fd2
NN
5131echo "$as_me:$LINENO: checking for GNU C library" >&5
5132echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
5133if test "${gcc_cv_glibc+set}" = set; then
5134 echo $ECHO_N "(cached) $ECHO_C" >&6
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
5137#line $LINENO "configure"
5138/* confdefs.h. */
5139_ACEOF
5140cat confdefs.h >>conftest.$ac_ext
5141cat >>conftest.$ac_ext <<_ACEOF
5142/* end confdefs.h. */
73458fb7 5143#include <features.h>
ba479fd2
NN
5144int
5145main ()
5146{
73458fb7
NN
5147
5148#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
5149#error Not a GNU C library system
5150#endif
ba479fd2
NN
5151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext
5156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5157 (eval $ac_compile) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest.$ac_objext'
5162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
73458fb7
NN
5167 gcc_cv_glibc=yes
5168else
ba479fd2
NN
5169 echo "$as_me: failed program was:" >&5
5170sed 's/^/| /' conftest.$ac_ext >&5
5171
5172gcc_cv_glibc=no
73458fb7 5173fi
ba479fd2 5174rm -f conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
5175fi
5176
ba479fd2
NN
5177echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
5178echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 5179if test $gcc_cv_glibc = yes; then
ba479fd2
NN
5180
5181cat >>confdefs.h <<\_ACEOF
73458fb7 5182#define _GNU_SOURCE 1
ba479fd2 5183_ACEOF
73458fb7
NN
5184
5185fi
5186
ca9bc441
NN
5187# Need to reject headers which give warnings, so that the -Werror bootstrap
5188# works later. *sigh* This needs to come before all header checks.
5189
5190ac_c_preproc_warn_flag=yes
5191
ba479fd2
NN
5192echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5193echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5194if test "${ac_cv_header_stdc+set}" = set; then
5195 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5196else
ba479fd2
NN
5197 cat >conftest.$ac_ext <<_ACEOF
5198#line $LINENO "configure"
5199/* confdefs.h. */
5200_ACEOF
5201cat confdefs.h >>conftest.$ac_ext
5202cat >>conftest.$ac_ext <<_ACEOF
5203/* end confdefs.h. */
956d6950
JL
5204#include <stdlib.h>
5205#include <stdarg.h>
5206#include <string.h>
5207#include <float.h>
ba479fd2
NN
5208
5209int
5210main ()
5211{
5212
5213 ;
5214 return 0;
5215}
5216_ACEOF
5217rm -f conftest.$ac_objext
5218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5219 (eval $ac_compile) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); } &&
5223 { ac_try='test -s conftest.$ac_objext'
5224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5225 (eval $ac_try) 2>&5
5226 ac_status=$?
5227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228 (exit $ac_status); }; }; then
956d6950
JL
5229 ac_cv_header_stdc=yes
5230else
ba479fd2
NN
5231 echo "$as_me: failed program was:" >&5
5232sed 's/^/| /' conftest.$ac_ext >&5
5233
5234ac_cv_header_stdc=no
956d6950 5235fi
ba479fd2 5236rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
5237
5238if test $ac_cv_header_stdc = yes; then
5239 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2
NN
5240 cat >conftest.$ac_ext <<_ACEOF
5241#line $LINENO "configure"
5242/* confdefs.h. */
5243_ACEOF
5244cat confdefs.h >>conftest.$ac_ext
5245cat >>conftest.$ac_ext <<_ACEOF
5246/* end confdefs.h. */
956d6950 5247#include <string.h>
ba479fd2
NN
5248
5249_ACEOF
956d6950 5250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5251 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
5252 :
5253else
956d6950
JL
5254 ac_cv_header_stdc=no
5255fi
5256rm -f conftest*
5257
5258fi
5259
5260if test $ac_cv_header_stdc = yes; then
5261 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2
NN
5262 cat >conftest.$ac_ext <<_ACEOF
5263#line $LINENO "configure"
5264/* confdefs.h. */
5265_ACEOF
5266cat confdefs.h >>conftest.$ac_ext
5267cat >>conftest.$ac_ext <<_ACEOF
5268/* end confdefs.h. */
956d6950 5269#include <stdlib.h>
ba479fd2
NN
5270
5271_ACEOF
956d6950 5272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5273 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
5274 :
5275else
956d6950
JL
5276 ac_cv_header_stdc=no
5277fi
5278rm -f conftest*
5279
5280fi
5281
5282if test $ac_cv_header_stdc = yes; then
5283 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 5284 if test "$cross_compiling" = yes; then
956d6950
JL
5285 :
5286else
ba479fd2
NN
5287 cat >conftest.$ac_ext <<_ACEOF
5288#line $LINENO "configure"
5289/* confdefs.h. */
5290_ACEOF
5291cat confdefs.h >>conftest.$ac_ext
5292cat >>conftest.$ac_ext <<_ACEOF
5293/* end confdefs.h. */
956d6950 5294#include <ctype.h>
ba479fd2
NN
5295#if ((' ' & 0x0FF) == 0x020)
5296# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5297# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5298#else
5299# define ISLOWER(c) \
5300 (('a' <= (c) && (c) <= 'i') \
5301 || ('j' <= (c) && (c) <= 'r') \
5302 || ('s' <= (c) && (c) <= 'z'))
5303# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5304#endif
63cf211a 5305
ba479fd2
NN
5306#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5307int
5308main ()
5309{
5310 int i;
5311 for (i = 0; i < 256; i++)
5312 if (XOR (islower (i), ISLOWER (i))
5313 || toupper (i) != TOUPPER (i))
5314 exit(2);
5315 exit (0);
5316}
5317_ACEOF
5318rm -f conftest$ac_exeext
5319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5320 (eval $ac_link) 2>&5
5321 ac_status=$?
5322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5325 (eval $ac_try) 2>&5
5326 ac_status=$?
5327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328 (exit $ac_status); }; }; then
956d6950
JL
5329 :
5330else
ba479fd2
NN
5331 echo "$as_me: program exited with status $ac_status" >&5
5332echo "$as_me: failed program was:" >&5
5333sed 's/^/| /' conftest.$ac_ext >&5
5334
5335( exit $ac_status )
5336ac_cv_header_stdc=no
956d6950 5337fi
a6a5e4c9 5338rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 5339fi
956d6950
JL
5340fi
5341fi
ba479fd2
NN
5342echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5343echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 5344if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
5345
5346cat >>confdefs.h <<\_ACEOF
956d6950 5347#define STDC_HEADERS 1
ba479fd2 5348_ACEOF
956d6950
JL
5349
5350fi
5351
ba479fd2
NN
5352echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5353echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5354if test "${ac_cv_header_time+set}" = set; then
5355 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5356else
ba479fd2
NN
5357 cat >conftest.$ac_ext <<_ACEOF
5358#line $LINENO "configure"
5359/* confdefs.h. */
5360_ACEOF
5361cat confdefs.h >>conftest.$ac_ext
5362cat >>conftest.$ac_ext <<_ACEOF
5363/* end confdefs.h. */
956d6950
JL
5364#include <sys/types.h>
5365#include <sys/time.h>
5366#include <time.h>
ba479fd2
NN
5367
5368int
5369main ()
5370{
5371if ((struct tm *) 0)
5372return 0;
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377rm -f conftest.$ac_objext
5378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5379 (eval $ac_compile) 2>&5
5380 ac_status=$?
5381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5382 (exit $ac_status); } &&
5383 { ac_try='test -s conftest.$ac_objext'
5384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5385 (eval $ac_try) 2>&5
5386 ac_status=$?
5387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5388 (exit $ac_status); }; }; then
956d6950
JL
5389 ac_cv_header_time=yes
5390else
ba479fd2
NN
5391 echo "$as_me: failed program was:" >&5
5392sed 's/^/| /' conftest.$ac_ext >&5
5393
5394ac_cv_header_time=no
956d6950 5395fi
ba479fd2 5396rm -f conftest.$ac_objext conftest.$ac_ext
956d6950 5397fi
ba479fd2
NN
5398echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5399echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 5400if test $ac_cv_header_time = yes; then
ba479fd2
NN
5401
5402cat >>confdefs.h <<\_ACEOF
956d6950 5403#define TIME_WITH_SYS_TIME 1
ba479fd2 5404_ACEOF
956d6950
JL
5405
5406fi
5407
ba479fd2
NN
5408echo "$as_me:$LINENO: checking for working stdbool.h" >&5
5409echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6
5410if test "${ac_cv_header_stdbool_h+set}" = set; then
5411 echo $ECHO_N "(cached) $ECHO_C" >&6
827ae6cf 5412else
ba479fd2
NN
5413 cat >conftest.$ac_ext <<_ACEOF
5414#line $LINENO "configure"
5415/* confdefs.h. */
5416_ACEOF
5417cat confdefs.h >>conftest.$ac_ext
5418cat >>conftest.$ac_ext <<_ACEOF
5419/* end confdefs.h. */
827ae6cf 5420#include <stdbool.h>
ba479fd2
NN
5421int
5422main ()
5423{
827ae6cf 5424bool foo = false;
ba479fd2
NN
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext
5430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5431 (eval $ac_compile) 2>&5
5432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); } &&
5435 { ac_try='test -s conftest.$ac_objext'
5436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
827ae6cf
RO
5441 ac_cv_header_stdbool_h=yes
5442else
ba479fd2
NN
5443 echo "$as_me: failed program was:" >&5
5444sed 's/^/| /' conftest.$ac_ext >&5
5445
5446ac_cv_header_stdbool_h=no
827ae6cf 5447fi
ba479fd2 5448rm -f conftest.$ac_objext conftest.$ac_ext
827ae6cf 5449fi
ba479fd2
NN
5450echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
5451echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
63cf211a 5452if test $ac_cv_header_stdbool_h = yes; then
ba479fd2
NN
5453
5454cat >>confdefs.h <<\_ACEOF
827ae6cf 5455#define HAVE_STDBOOL_H 1
ba479fd2 5456_ACEOF
827ae6cf
RO
5457
5458fi
5459
ba479fd2
NN
5460echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
5461echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
5462if test "${gcc_cv_header_string+set}" = set; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309 5464else
ba479fd2
NN
5465 cat >conftest.$ac_ext <<_ACEOF
5466#line $LINENO "configure"
5467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
0a4b6309
RL
5472#include <string.h>
5473#include <strings.h>
ba479fd2
NN
5474int
5475main ()
5476{
0a4b6309 5477
ba479fd2
NN
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482rm -f conftest.$ac_objext
5483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5484 (eval $ac_compile) 2>&5
5485 ac_status=$?
5486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487 (exit $ac_status); } &&
5488 { ac_try='test -s conftest.$ac_objext'
5489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490 (eval $ac_try) 2>&5
5491 ac_status=$?
5492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493 (exit $ac_status); }; }; then
0a4b6309
RL
5494 gcc_cv_header_string=yes
5495else
ba479fd2
NN
5496 echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499gcc_cv_header_string=no
0a4b6309 5500fi
ba479fd2 5501rm -f conftest.$ac_objext conftest.$ac_ext
0a4b6309 5502fi
ba479fd2
NN
5503echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
5504echo "${ECHO_T}$gcc_cv_header_string" >&6
63cf211a 5505if test $gcc_cv_header_string = yes; then
ba479fd2
NN
5506
5507cat >>confdefs.h <<\_ACEOF
0a4b6309 5508#define STRING_WITH_STRINGS 1
ba479fd2 5509_ACEOF
0a4b6309
RL
5510
5511fi
5512
ba479fd2
NN
5513echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5514echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5515if test "${ac_cv_header_sys_wait_h+set}" = set; then
5516 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 5517else
ba479fd2
NN
5518 cat >conftest.$ac_ext <<_ACEOF
5519#line $LINENO "configure"
5520/* confdefs.h. */
5521_ACEOF
5522cat confdefs.h >>conftest.$ac_ext
5523cat >>conftest.$ac_ext <<_ACEOF
5524/* end confdefs.h. */
e9831ca0
KG
5525#include <sys/types.h>
5526#include <sys/wait.h>
5527#ifndef WEXITSTATUS
ba479fd2 5528# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
5529#endif
5530#ifndef WIFEXITED
ba479fd2 5531# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 5532#endif
ba479fd2
NN
5533
5534int
5535main ()
5536{
5537 int s;
5538 wait (&s);
5539 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5540 ;
5541 return 0;
5542}
5543_ACEOF
5544rm -f conftest.$ac_objext
5545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5546 (eval $ac_compile) 2>&5
5547 ac_status=$?
5548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549 (exit $ac_status); } &&
5550 { ac_try='test -s conftest.$ac_objext'
5551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5552 (eval $ac_try) 2>&5
5553 ac_status=$?
5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555 (exit $ac_status); }; }; then
e9831ca0
KG
5556 ac_cv_header_sys_wait_h=yes
5557else
ba479fd2
NN
5558 echo "$as_me: failed program was:" >&5
5559sed 's/^/| /' conftest.$ac_ext >&5
5560
5561ac_cv_header_sys_wait_h=no
e9831ca0 5562fi
ba479fd2 5563rm -f conftest.$ac_objext conftest.$ac_ext
e9831ca0 5564fi
ba479fd2
NN
5565echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5566echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 5567if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
5568
5569cat >>confdefs.h <<\_ACEOF
e9831ca0 5570#define HAVE_SYS_WAIT_H 1
ba479fd2 5571_ACEOF
6e3f3080 5572
63cf211a 5573fi
6e3f3080 5574
ba479fd2
NN
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
1072ec3f 5597 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 5598 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 5599 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 5600do
ba479fd2 5601as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 5602echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
5603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5604if eval "test \"\${$as_ac_Header+set}\" = set"; then
5605 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5606else
ca9bc441 5607 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5608#line $LINENO "configure"
5609/* confdefs.h. */
5610_ACEOF
5611cat confdefs.h >>conftest.$ac_ext
5612cat >>conftest.$ac_ext <<_ACEOF
5613/* end confdefs.h. */
5614#include <$ac_header>
5615_ACEOF
5616if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5617 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5618 ac_status=$?
5619 grep -v '^ *+' conftest.er1 >conftest.err
5620 rm -f conftest.er1
5621 cat conftest.err >&5
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); } >/dev/null; then
5624 if test -s conftest.err; then
5625 ac_cpp_err=$ac_c_preproc_warn_flag
5626 else
5627 ac_cpp_err=
5628 fi
5629else
5630 ac_cpp_err=yes
5631fi
5632if test -z "$ac_cpp_err"; then
ca9bc441 5633 eval "$as_ac_Header=yes"
ba479fd2
NN
5634else
5635 echo "$as_me: failed program was:" >&5
5636sed 's/^/| /' conftest.$ac_ext >&5
5637
ca9bc441 5638 eval "$as_ac_Header=no"
ba479fd2
NN
5639fi
5640rm -f conftest.err conftest.$ac_ext
6e3f3080 5641fi
ba479fd2
NN
5642echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5643echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
5644if test `eval echo '${'$as_ac_Header'}'` = yes; then
5645 cat >>confdefs.h <<_ACEOF
5646#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5647_ACEOF
5648
956d6950
JL
5649fi
5650done
5651
5652
f24af81b 5653# Check for thread headers.
ca9bc441 5654echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
5655echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
5656if test "${ac_cv_header_thread_h+set}" = set; then
5657 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5658else
ca9bc441 5659 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5660#line $LINENO "configure"
5661/* confdefs.h. */
5662_ACEOF
5663cat confdefs.h >>conftest.$ac_ext
5664cat >>conftest.$ac_ext <<_ACEOF
5665/* end confdefs.h. */
5666#include <thread.h>
5667_ACEOF
5668if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5669 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5670 ac_status=$?
5671 grep -v '^ *+' conftest.er1 >conftest.err
5672 rm -f conftest.er1
5673 cat conftest.err >&5
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); } >/dev/null; then
5676 if test -s conftest.err; then
5677 ac_cpp_err=$ac_c_preproc_warn_flag
5678 else
5679 ac_cpp_err=
5680 fi
5681else
5682 ac_cpp_err=yes
5683fi
5684if test -z "$ac_cpp_err"; then
ca9bc441 5685 ac_cv_header_thread_h=yes
ba479fd2
NN
5686else
5687 echo "$as_me: failed program was:" >&5
5688sed 's/^/| /' conftest.$ac_ext >&5
5689
ca9bc441 5690 ac_cv_header_thread_h=no
ba479fd2
NN
5691fi
5692rm -f conftest.err conftest.$ac_ext
6e3f3080 5693fi
ba479fd2
NN
5694echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
5695echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 5696if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
5697 have_thread_h=yes
5698else
ba479fd2 5699 have_thread_h=
f24af81b
TT
5700fi
5701
ca9bc441 5702echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
5703echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
5704if test "${ac_cv_header_pthread_h+set}" = set; then
5705 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 5706else
ca9bc441 5707 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5708#line $LINENO "configure"
5709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
5714#include <pthread.h>
5715_ACEOF
5716if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5718 ac_status=$?
5719 grep -v '^ *+' conftest.er1 >conftest.err
5720 rm -f conftest.er1
5721 cat conftest.err >&5
5722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723 (exit $ac_status); } >/dev/null; then
5724 if test -s conftest.err; then
5725 ac_cpp_err=$ac_c_preproc_warn_flag
5726 else
5727 ac_cpp_err=
5728 fi
5729else
5730 ac_cpp_err=yes
5731fi
5732if test -z "$ac_cpp_err"; then
ca9bc441 5733 ac_cv_header_pthread_h=yes
ba479fd2
NN
5734else
5735 echo "$as_me: failed program was:" >&5
5736sed 's/^/| /' conftest.$ac_ext >&5
5737
ca9bc441 5738 ac_cv_header_pthread_h=no
ba479fd2
NN
5739fi
5740rm -f conftest.err conftest.$ac_ext
6e3f3080 5741fi
ba479fd2
NN
5742echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
5743echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 5744if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
5745 have_pthread_h=yes
5746else
ba479fd2 5747 have_pthread_h=
f24af81b
TT
5748fi
5749
5750
84c041a1 5751# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
5752echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
5753echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
5754if test "${gcc_cv_decl_char_bit+set}" = set; then
5755 echo $ECHO_N "(cached) $ECHO_C" >&6
5756else
5757 cat >conftest.$ac_ext <<_ACEOF
5758#line $LINENO "configure"
5759/* confdefs.h. */
5760_ACEOF
5761cat confdefs.h >>conftest.$ac_ext
5762cat >>conftest.$ac_ext <<_ACEOF
5763/* end confdefs.h. */
75e93faa
ZW
5764#ifdef HAVE_LIMITS_H
5765#include <limits.h>
5766#endif
5767#ifdef CHAR_BIT
5768found
5769#endif
ba479fd2 5770_ACEOF
75e93faa 5771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5772 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
5773 gcc_cv_decl_char_bit=yes
5774else
75e93faa
ZW
5775 gcc_cv_decl_char_bit=no
5776fi
5777rm -f conftest*
5778
5779
5780fi
ba479fd2
NN
5781echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
5782echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 5783if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
5784 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
5785echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
5786if test "${gcc_cv_c_nbby+set}" = set; then
5787 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
5788else
5789 i=8
5790 gcc_cv_c_nbby=
5791 while test $i -lt 65; do
ba479fd2
NN
5792 cat >conftest.$ac_ext <<_ACEOF
5793#line $LINENO "configure"
5794/* confdefs.h. */
5795_ACEOF
5796cat confdefs.h >>conftest.$ac_ext
5797cat >>conftest.$ac_ext <<_ACEOF
5798/* end confdefs.h. */
5799
5800int
5801main ()
5802{
4e70264f
ZW
5803switch(0) {
5804 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
5805 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
5806 ; }
ba479fd2
NN
5807 ;
5808 return 0;
5809}
5810_ACEOF
5811rm -f conftest.$ac_objext
5812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5813 (eval $ac_compile) 2>&5
5814 ac_status=$?
5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816 (exit $ac_status); } &&
5817 { ac_try='test -s conftest.$ac_objext'
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; }; then
4e70264f 5823 gcc_cv_c_nbby=$i; break
75e93faa 5824else
ba479fd2
NN
5825 echo "$as_me: failed program was:" >&5
5826sed 's/^/| /' conftest.$ac_ext >&5
5827
75e93faa 5828fi
ba479fd2 5829rm -f conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
5830 i=`expr $i + 1`
5831 done
5832 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
5833
5834fi
ba479fd2
NN
5835echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
5836echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 5837if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
5838 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
5839echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
5840 { (exit 1); exit 1; }; }
75e93faa 5841else
ba479fd2
NN
5842
5843cat >>confdefs.h <<_ACEOF
75e93faa 5844#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 5845_ACEOF
75e93faa
ZW
5846
5847fi
5848fi
ba479fd2
NN
5849echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
5850echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
5851if test "${ac_cv_c_bigendian+set}" = set; then
5852 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 5853else
4977bab6
ZW
5854 ac_cv_c_bigendian=unknown
5855# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2
NN
5856cat >conftest.$ac_ext <<_ACEOF
5857#line $LINENO "configure"
5858/* confdefs.h. */
5859_ACEOF
5860cat confdefs.h >>conftest.$ac_ext
5861cat >>conftest.$ac_ext <<_ACEOF
5862/* end confdefs.h. */
4977bab6
ZW
5863#include <sys/types.h>
5864#include <sys/param.h>
ba479fd2
NN
5865int
5866main ()
5867{
2d6eb5bf 5868
4977bab6
ZW
5869#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5870 bogus endian macros
84c041a1 5871#endif
ba479fd2
NN
5872 ;
5873 return 0;
5874}
5875_ACEOF
5876rm -f conftest.$ac_objext
5877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5878 (eval $ac_compile) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); } &&
5882 { ac_try='test -s conftest.$ac_objext'
5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884 (eval $ac_try) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; }; then
4977bab6 5888 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2
NN
5889cat >conftest.$ac_ext <<_ACEOF
5890#line $LINENO "configure"
5891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
4977bab6
ZW
5896#include <sys/types.h>
5897#include <sys/param.h>
ba479fd2
NN
5898int
5899main ()
5900{
4977bab6
ZW
5901
5902#if BYTE_ORDER != BIG_ENDIAN
5903 not big endian
84c041a1 5904#endif
ba479fd2
NN
5905 ;
5906 return 0;
5907}
5908_ACEOF
5909rm -f conftest.$ac_objext
5910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5911 (eval $ac_compile) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); } &&
5915 { ac_try='test -s conftest.$ac_objext'
5916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917 (eval $ac_try) 2>&5
5918 ac_status=$?
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); }; }; then
4977bab6
ZW
5921 ac_cv_c_bigendian=yes
5922else
ba479fd2
NN
5923 echo "$as_me: failed program was:" >&5
5924sed 's/^/| /' conftest.$ac_ext >&5
5925
5926ac_cv_c_bigendian=no
4977bab6 5927fi
ba479fd2 5928rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6 5929else
ba479fd2
NN
5930 echo "$as_me: failed program was:" >&5
5931sed 's/^/| /' conftest.$ac_ext >&5
5932
4977bab6 5933fi
ba479fd2 5934rm -f conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
5935if test $ac_cv_c_bigendian = unknown; then
5936if test "$cross_compiling" = yes; then
ba479fd2
NN
5937 echo $ac_n "cross-compiling... " 2>&6
5938else
5939 cat >conftest.$ac_ext <<_ACEOF
5940#line $LINENO "configure"
5941/* confdefs.h. */
5942_ACEOF
5943cat confdefs.h >>conftest.$ac_ext
5944cat >>conftest.$ac_ext <<_ACEOF
5945/* end confdefs.h. */
4977bab6
ZW
5946main () {
5947 /* Are we little or big endian? From Harbison&Steele. */
5948 union
5949 {
5950 long l;
5951 char c[sizeof (long)];
5952 } u;
5953 u.l = 1;
5954 exit (u.c[sizeof (long) - 1] == 1);
5955}
ba479fd2
NN
5956_ACEOF
5957rm -f conftest$ac_exeext
5958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5959 (eval $ac_link) 2>&5
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; }; then
4977bab6
ZW
5968 ac_cv_c_bigendian=no
5969else
ba479fd2
NN
5970 echo "$as_me: program exited with status $ac_status" >&5
5971echo "$as_me: failed program was:" >&5
5972sed 's/^/| /' conftest.$ac_ext >&5
5973
5974( exit $ac_status )
5975ac_cv_c_bigendian=yes
4977bab6 5976fi
a6a5e4c9 5977rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 5978fi
4977bab6
ZW
5979fi
5980fi
ba479fd2
NN
5981echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
5982echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 5983if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
5984echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
5985echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 5986
4977bab6
ZW
5987cat >conftest.c <<EOF
5988short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5989short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5990void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
5991short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5992short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5993void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
5994int main() { _ascii (); _ebcdic (); return 0; }
5995EOF
5996 if test -f conftest.c ; then
5997 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
5998 if test `grep -l BIGenDianSyS conftest.o` ; then
5999 echo $ac_n ' big endian probe OK, ' 1>&6
6000 ac_cv_c_bigendian=yes
6001 fi
6002 if test `grep -l LiTTleEnDian conftest.o` ; then
6003 echo $ac_n ' little endian probe OK, ' 1>&6
6004 if test $ac_cv_c_bigendian = yes ; then
6005 ac_cv_c_bigendian=unknown;
6006 else
6007 ac_cv_c_bigendian=no
6008 fi
6009 fi
6010 echo $ac_n 'guessing bigendian ... ' >&6
6011 fi
6012 fi
ba479fd2
NN
6013echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6014echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 6015fi
4977bab6 6016if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
6017
6018cat >>confdefs.h <<\_ACEOF
4977bab6 6019#define WORDS_BIGENDIAN 1
ba479fd2 6020_ACEOF
cafe096b 6021
ba479fd2
NN
6022
6023cat >>confdefs.h <<\_ACEOF
84c041a1 6024#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 6025_ACEOF
84c041a1 6026
4977bab6
ZW
6027 BYTEORDER=4321
6028else
6029 BYTEORDER=1234
6030fi
ba479fd2
NN
6031
6032cat >>confdefs.h <<_ACEOF
4977bab6 6033#define BYTEORDER $BYTEORDER
ba479fd2 6034_ACEOF
4977bab6
ZW
6035
6036if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
6037 { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
6038echo "$as_me: error: unknown endianess - sorry" >&2;}
6039 { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
84c041a1
ZW
6040fi
6041
75e93faa 6042
73458fb7
NN
6043# --------
6044# UNSORTED
6045# --------
1e608388 6046
73458fb7
NN
6047# Stage specific cflags for build.
6048stage1_cflags=
6049case $build in
6050vax-*-*)
6051 if test x$GCC = xyes
6052 then
6053 stage1_cflags="-Wa,-J"
6054 else
6055 stage1_cflags="-J"
6056 fi
6057 ;;
6058powerpc-*-darwin*)
6059 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6060 # sources; use -no-cpp-precomp to get to GNU cpp.
6061 # Apple's GCC has bugs in designated initializer handling, so disable
6062 # that too.
6063 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6064 ;;
6065esac
1e608388 6066
1e608388 6067
4e70264f
ZW
6068# These libraries may be used by collect2.
6069# We may need a special search path to get them linked.
ba479fd2
NN
6070echo "$as_me:$LINENO: checking for collect2 libraries" >&5
6071echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6072if test "${gcc_cv_collect2_libs+set}" = set; then
6073 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
6074else
6075 save_LIBS="$LIBS"
7f2749d4 6076for libs in '' -lld -lmld \
4e70264f
ZW
6077 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
6078 '-L/usr/lib/cmplrs/cc3.11 -lmld'
6079do
6080 LIBS="$libs"
ba479fd2
NN
6081 cat >conftest.$ac_ext <<_ACEOF
6082#line $LINENO "configure"
6083/* confdefs.h. */
6084_ACEOF
6085cat confdefs.h >>conftest.$ac_ext
6086cat >>conftest.$ac_ext <<_ACEOF
6087/* end confdefs.h. */
6088
4e70264f 6089/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6090#ifdef __cplusplus
6091extern "C"
6092#endif
4e70264f 6093/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6094 builtin and then its argument prototype would still apply. */
6095char ldopen ();
6096int
6097main ()
6098{
6099ldopen ();
6100 ;
6101 return 0;
6102}
6103_ACEOF
6104rm -f conftest.$ac_objext conftest$ac_exeext
6105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6106 (eval $ac_link) 2>&5
6107 ac_status=$?
6108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109 (exit $ac_status); } &&
6110 { ac_try='test -s conftest$ac_exeext'
6111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6112 (eval $ac_try) 2>&5
6113 ac_status=$?
6114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6115 (exit $ac_status); }; }; then
4e70264f
ZW
6116 gcc_cv_collect2_libs="$libs"; break
6117else
ba479fd2
NN
6118 echo "$as_me: failed program was:" >&5
6119sed 's/^/| /' conftest.$ac_ext >&5
6120
4e70264f 6121fi
ba479fd2 6122rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
6123done
6124LIBS="$save_LIBS"
6125test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
6126fi
ba479fd2
NN
6127echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
6128echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
6129case $gcc_cv_collect2_libs in
6130 "none required") ;;
6131 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
6132esac
6133
6134
7f2749d4
RK
6135# When building Ada code on Alpha, we need exc_resume which is usually in
6136# -lexc. So test for it.
6137save_LIBS="$LIBS"
6138LIBS=
ba479fd2
NN
6139echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
6140echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6141if test "${ac_cv_search_exc_resume+set}" = set; then
6142 echo $ECHO_N "(cached) $ECHO_C" >&6
6143else
6144 ac_func_search_save_LIBS=$LIBS
6145ac_cv_search_exc_resume=no
6146cat >conftest.$ac_ext <<_ACEOF
6147#line $LINENO "configure"
6148/* confdefs.h. */
6149_ACEOF
6150cat confdefs.h >>conftest.$ac_ext
6151cat >>conftest.$ac_ext <<_ACEOF
6152/* end confdefs.h. */
7f2749d4 6153
7f2749d4 6154/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6155#ifdef __cplusplus
6156extern "C"
6157#endif
7f2749d4 6158/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6159 builtin and then its argument prototype would still apply. */
6160char exc_resume ();
6161int
6162main ()
6163{
6164exc_resume ();
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext conftest$ac_exeext
6170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6171 (eval $ac_link) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest$ac_exeext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
7f2749d4
RK
6181 ac_cv_search_exc_resume="none required"
6182else
ba479fd2
NN
6183 echo "$as_me: failed program was:" >&5
6184sed 's/^/| /' conftest.$ac_ext >&5
6185
7f2749d4 6186fi
ba479fd2
NN
6187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6188if test "$ac_cv_search_exc_resume" = no; then
6189 for ac_lib in exc; do
6190 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6191 cat >conftest.$ac_ext <<_ACEOF
6192#line $LINENO "configure"
6193/* confdefs.h. */
6194_ACEOF
6195cat confdefs.h >>conftest.$ac_ext
6196cat >>conftest.$ac_ext <<_ACEOF
6197/* end confdefs.h. */
6198
7f2749d4 6199/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6200#ifdef __cplusplus
6201extern "C"
6202#endif
7f2749d4 6203/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6204 builtin and then its argument prototype would still apply. */
6205char exc_resume ();
6206int
6207main ()
6208{
6209exc_resume ();
6210 ;
6211 return 0;
6212}
6213_ACEOF
6214rm -f conftest.$ac_objext conftest$ac_exeext
6215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6216 (eval $ac_link) 2>&5
6217 ac_status=$?
6218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219 (exit $ac_status); } &&
6220 { ac_try='test -s conftest$ac_exeext'
6221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6222 (eval $ac_try) 2>&5
6223 ac_status=$?
6224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225 (exit $ac_status); }; }; then
6226 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
6227break
6228else
ba479fd2
NN
6229 echo "$as_me: failed program was:" >&5
6230sed 's/^/| /' conftest.$ac_ext >&5
6231
cafe096b 6232fi
ba479fd2
NN
6233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6234 done
6e3f3080 6235fi
ba479fd2
NN
6236LIBS=$ac_func_search_save_LIBS
6237fi
6238echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
6239echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
6240if test "$ac_cv_search_exc_resume" != no; then
63cf211a 6241 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 6242
7f2749d4 6243fi
ba479fd2 6244
7f2749d4
RK
6245GNAT_LIBEXC="$LIBS"
6246LIBS="$save_LIBS"
6247
6248
62c9aa5f
ZW
6249# Some systems put ldexp and frexp in libm instead of libc; assume
6250# they're both in the same place. jcf-dump needs them.
6251save_LIBS="$LIBS"
6252LIBS=
ba479fd2
NN
6253echo "$as_me:$LINENO: checking for library containing ldexp" >&5
6254echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
6255if test "${ac_cv_search_ldexp+set}" = set; then
6256 echo $ECHO_N "(cached) $ECHO_C" >&6
6257else
6258 ac_func_search_save_LIBS=$LIBS
6259ac_cv_search_ldexp=no
6260cat >conftest.$ac_ext <<_ACEOF
6261#line $LINENO "configure"
6262/* confdefs.h. */
6263_ACEOF
6264cat confdefs.h >>conftest.$ac_ext
6265cat >>conftest.$ac_ext <<_ACEOF
6266/* end confdefs.h. */
62c9aa5f 6267
62c9aa5f 6268/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6269#ifdef __cplusplus
6270extern "C"
6271#endif
62c9aa5f 6272/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6273 builtin and then its argument prototype would still apply. */
6274char ldexp ();
6275int
6276main ()
6277{
6278ldexp ();
6279 ;
6280 return 0;
6281}
6282_ACEOF
6283rm -f conftest.$ac_objext conftest$ac_exeext
6284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6285 (eval $ac_link) 2>&5
6286 ac_status=$?
6287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6288 (exit $ac_status); } &&
6289 { ac_try='test -s conftest$ac_exeext'
6290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6291 (eval $ac_try) 2>&5
6292 ac_status=$?
6293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6294 (exit $ac_status); }; }; then
62c9aa5f
ZW
6295 ac_cv_search_ldexp="none required"
6296else
ba479fd2
NN
6297 echo "$as_me: failed program was:" >&5
6298sed 's/^/| /' conftest.$ac_ext >&5
6299
62c9aa5f 6300fi
ba479fd2
NN
6301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6302if test "$ac_cv_search_ldexp" = no; then
6303 for ac_lib in m; do
6304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6305 cat >conftest.$ac_ext <<_ACEOF
6306#line $LINENO "configure"
6307/* confdefs.h. */
6308_ACEOF
6309cat confdefs.h >>conftest.$ac_ext
6310cat >>conftest.$ac_ext <<_ACEOF
6311/* end confdefs.h. */
6312
62c9aa5f 6313/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6314#ifdef __cplusplus
6315extern "C"
6316#endif
62c9aa5f 6317/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6318 builtin and then its argument prototype would still apply. */
6319char ldexp ();
6320int
6321main ()
6322{
6323ldexp ();
6324 ;
6325 return 0;
6326}
6327_ACEOF
6328rm -f conftest.$ac_objext conftest$ac_exeext
6329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6330 (eval $ac_link) 2>&5
6331 ac_status=$?
6332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6333 (exit $ac_status); } &&
6334 { ac_try='test -s conftest$ac_exeext'
6335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6336 (eval $ac_try) 2>&5
6337 ac_status=$?
6338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339 (exit $ac_status); }; }; then
6340 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
6341break
6342else
ba479fd2
NN
6343 echo "$as_me: failed program was:" >&5
6344sed 's/^/| /' conftest.$ac_ext >&5
6345
cafe096b 6346fi
ba479fd2
NN
6347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6348 done
6e3f3080 6349fi
ba479fd2
NN
6350LIBS=$ac_func_search_save_LIBS
6351fi
6352echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
6353echo "${ECHO_T}$ac_cv_search_ldexp" >&6
6354if test "$ac_cv_search_ldexp" != no; then
63cf211a 6355 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 6356
62c9aa5f 6357fi
ba479fd2 6358
62c9aa5f
ZW
6359LDEXP_LIB="$LIBS"
6360LIBS="$save_LIBS"
6361
6362
956d6950
JL
6363# Use <inttypes.h> only if it exists,
6364# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
6365echo "$as_me:$LINENO: checking for inttypes.h" >&5
6366echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
6367if test "${gcc_cv_header_inttypes_h+set}" = set; then
6368 echo $ECHO_N "(cached) $ECHO_C" >&6
6369else
6370 cat >conftest.$ac_ext <<_ACEOF
6371#line $LINENO "configure"
6372/* confdefs.h. */
6373_ACEOF
6374cat confdefs.h >>conftest.$ac_ext
6375cat >>conftest.$ac_ext <<_ACEOF
6376/* end confdefs.h. */
956d6950
JL
6377#include <sys/types.h>
6378#include <inttypes.h>
ba479fd2
NN
6379int
6380main ()
6381{
956d6950 6382intmax_t i = -1;
ba479fd2
NN
6383 ;
6384 return 0;
6385}
6386_ACEOF
6387rm -f conftest.$ac_objext
6388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6389 (eval $ac_compile) 2>&5
6390 ac_status=$?
6391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392 (exit $ac_status); } &&
6393 { ac_try='test -s conftest.$ac_objext'
6394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6395 (eval $ac_try) 2>&5
6396 ac_status=$?
6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6398 (exit $ac_status); }; }; then
0056a9b5 6399 gcc_cv_header_inttypes_h=yes
956d6950 6400else
ba479fd2
NN
6401 echo "$as_me: failed program was:" >&5
6402sed 's/^/| /' conftest.$ac_ext >&5
6403
6404gcc_cv_header_inttypes_h=no
956d6950 6405fi
ba479fd2 6406rm -f conftest.$ac_objext conftest.$ac_ext
956d6950
JL
6407fi
6408
ba479fd2
NN
6409echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
6410echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 6411if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
6412
6413cat >>confdefs.h <<\_ACEOF
0056a9b5 6414#define HAVE_INTTYPES_H 1
ba479fd2 6415_ACEOF
0056a9b5
KG
6416
6417fi
956d6950 6418
c149cc37 6419
ba479fd2
NN
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6af8c740
KG
6445for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
6446 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 6447 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
6448 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
6449 setlocale
956d6950 6450do
ba479fd2
NN
6451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6452echo "$as_me:$LINENO: checking for $ac_func" >&5
6453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6454if eval "test \"\${$as_ac_var+set}\" = set"; then
6455 echo $ECHO_N "(cached) $ECHO_C" >&6
6456else
6457 cat >conftest.$ac_ext <<_ACEOF
6458#line $LINENO "configure"
6459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
956d6950 6464/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
6465 which can conflict with char $ac_func (); below.
6466 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6467 <limits.h> exists even on freestanding compilers. */
6468#ifdef __STDC__
6469# include <limits.h>
6470#else
6471# include <assert.h>
6472#endif
6e3f3080 6473/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6474#ifdef __cplusplus
6475extern "C"
6476{
6477#endif
6e3f3080 6478/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6479 builtin and then its argument prototype would still apply. */
6480char $ac_func ();
956d6950
JL
6481/* The GNU C library defines this for functions which it implements
6482 to always fail with ENOSYS. Some functions are actually named
6483 something starting with __ and the normal name is an alias. */
6484#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6485choke me
6486#else
ba479fd2
NN
6487char (*f) () = $ac_func;
6488#endif
6489#ifdef __cplusplus
6490}
956d6950
JL
6491#endif
6492
ba479fd2
NN
6493int
6494main ()
6495{
6496return f != $ac_func;
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501rm -f conftest.$ac_objext conftest$ac_exeext
6502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6503 (eval $ac_link) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); } &&
6507 { ac_try='test -s conftest$ac_exeext'
6508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6509 (eval $ac_try) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); }; }; then
6513 eval "$as_ac_var=yes"
6514else
6515 echo "$as_me: failed program was:" >&5
6516sed 's/^/| /' conftest.$ac_ext >&5
6517
6518eval "$as_ac_var=no"
6519fi
6520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6521fi
6522echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6523echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6524if test `eval echo '${'$as_ac_var'}'` = yes; then
6525 cat >>confdefs.h <<_ACEOF
6526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6527_ACEOF
956d6950 6528
956d6950
JL
6529fi
6530done
6531
6885fc87 6532
39f6c4c8 6533if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
6534 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
6535echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6536if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
6537 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
6538else
6539 if test "$cross_compiling" = yes; then
6540 gcc_cv_func_mbstowcs_works=yes
6541else
ba479fd2
NN
6542 cat >conftest.$ac_ext <<_ACEOF
6543#line $LINENO "configure"
6544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
39f6c4c8
KW
6549#include <stdlib.h>
6550int main()
6551{
6552 mbstowcs(0, "", 0);
6553 return 0;
6554}
ba479fd2
NN
6555_ACEOF
6556rm -f conftest$ac_exeext
6557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6558 (eval $ac_link) 2>&5
6559 ac_status=$?
6560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6563 (eval $ac_try) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); }; }; then
39f6c4c8
KW
6567 gcc_cv_func_mbstowcs_works=yes
6568else
ba479fd2
NN
6569 echo "$as_me: program exited with status $ac_status" >&5
6570echo "$as_me: failed program was:" >&5
6571sed 's/^/| /' conftest.$ac_ext >&5
6572
6573( exit $ac_status )
6574gcc_cv_func_mbstowcs_works=no
39f6c4c8 6575fi
a6a5e4c9 6576rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 6577fi
39f6c4c8 6578fi
ba479fd2
NN
6579echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
6580echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 6581 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
6582
6583cat >>confdefs.h <<\_ACEOF
39f6c4c8 6584#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 6585_ACEOF
39f6c4c8
KW
6586
6587 fi
6588fi
6589
ba479fd2
NN
6590echo "$as_me:$LINENO: checking for ssize_t" >&5
6591echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6592if test "${ac_cv_type_ssize_t+set}" = set; then
6593 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 6594else
ba479fd2
NN
6595 cat >conftest.$ac_ext <<_ACEOF
6596#line $LINENO "configure"
6597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
8b4fc07a
NN
6602$ac_includes_default
6603int
6604main ()
6605{
6606if ((ssize_t *) 0)
6607 return 0;
6608if (sizeof (ssize_t))
6609 return 0;
6610 ;
6611 return 0;
6612}
ba479fd2 6613_ACEOF
8b4fc07a
NN
6614rm -f conftest.$ac_objext
6615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6616 (eval $ac_compile) 2>&5
6617 ac_status=$?
6618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6619 (exit $ac_status); } &&
6620 { ac_try='test -s conftest.$ac_objext'
6621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6622 (eval $ac_try) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); }; }; then
cb65112a 6626 ac_cv_type_ssize_t=yes
f12bc141 6627else
8b4fc07a
NN
6628 echo "$as_me: failed program was:" >&5
6629sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 6630
8b4fc07a
NN
6631ac_cv_type_ssize_t=no
6632fi
6633rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 6634fi
ba479fd2
NN
6635echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6636echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
6637if test $ac_cv_type_ssize_t = yes; then
6638 :
6639else
ba479fd2 6640
8b4fc07a 6641cat >>confdefs.h <<_ACEOF
f12bc141 6642#define ssize_t int
ba479fd2 6643_ACEOF
f12bc141
ZW
6644
6645fi
6646
0b9d02c6 6647
e256b8b6
DA
6648# Try to determine the array type of the second argument of getgroups
6649# for the target system (int or gid_t).
ba479fd2
NN
6650echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6651echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6652if test "${ac_cv_type_uid_t+set}" = set; then
6653 echo $ECHO_N "(cached) $ECHO_C" >&6
6654else
6655 cat >conftest.$ac_ext <<_ACEOF
6656#line $LINENO "configure"
6657/* confdefs.h. */
6658_ACEOF
6659cat confdefs.h >>conftest.$ac_ext
6660cat >>conftest.$ac_ext <<_ACEOF
6661/* end confdefs.h. */
e256b8b6 6662#include <sys/types.h>
ba479fd2
NN
6663
6664_ACEOF
e256b8b6 6665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6666 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
6667 ac_cv_type_uid_t=yes
6668else
e256b8b6
DA
6669 ac_cv_type_uid_t=no
6670fi
6671rm -f conftest*
6672
6673fi
ba479fd2
NN
6674echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6675echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 6676if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
6677
6678cat >>confdefs.h <<\_ACEOF
e256b8b6 6679#define uid_t int
ba479fd2 6680_ACEOF
cafe096b 6681
ba479fd2
NN
6682
6683cat >>confdefs.h <<\_ACEOF
e256b8b6 6684#define gid_t int
ba479fd2 6685_ACEOF
e256b8b6
DA
6686
6687fi
6688
ba479fd2
NN
6689echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
6690echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
6691if test "${ac_cv_type_getgroups+set}" = set; then
6692 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
6693else
6694 if test "$cross_compiling" = yes; then
6695 ac_cv_type_getgroups=cross
6696else
ba479fd2
NN
6697 cat >conftest.$ac_ext <<_ACEOF
6698#line $LINENO "configure"
6699/* confdefs.h. */
6700_ACEOF
6701cat confdefs.h >>conftest.$ac_ext
6702cat >>conftest.$ac_ext <<_ACEOF
6703/* end confdefs.h. */
e256b8b6
DA
6704/* Thanks to Mike Rendell for this test. */
6705#include <sys/types.h>
6706#define NGID 256
6707#undef MAX
6708#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
6709
6710int
6711main ()
e256b8b6
DA
6712{
6713 gid_t gidset[NGID];
6714 int i, n;
6715 union { gid_t gval; long lval; } val;
6716
6717 val.lval = -1;
6718 for (i = 0; i < NGID; i++)
6719 gidset[i] = val.gval;
6720 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
e1366e0c 6721 gidset);
e256b8b6
DA
6722 /* Exit non-zero if getgroups seems to require an array of ints. This
6723 happens when gid_t is short but getgroups modifies an array of ints. */
6724 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 6725}
ba479fd2
NN
6726_ACEOF
6727rm -f conftest$ac_exeext
6728if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6729 (eval $ac_link) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6734 (eval $ac_try) 2>&5
6735 ac_status=$?
6736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6737 (exit $ac_status); }; }; then
6738 ac_cv_type_getgroups=gid_t
63cf211a 6739else
ba479fd2
NN
6740 echo "$as_me: program exited with status $ac_status" >&5
6741echo "$as_me: failed program was:" >&5
6742sed 's/^/| /' conftest.$ac_ext >&5
6743
6744( exit $ac_status )
6745ac_cv_type_getgroups=int
e256b8b6 6746fi
a6a5e4c9 6747rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 6748fi
e256b8b6 6749if test $ac_cv_type_getgroups = cross; then
ba479fd2
NN
6750 cat >conftest.$ac_ext <<_ACEOF
6751#line $LINENO "configure"
6752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
e256b8b6 6757#include <unistd.h>
ba479fd2
NN
6758
6759_ACEOF
e256b8b6 6760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6761 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
6762 ac_cv_type_getgroups=gid_t
6763else
e256b8b6
DA
6764 ac_cv_type_getgroups=int
6765fi
6766rm -f conftest*
6767
6768fi
6769fi
ba479fd2
NN
6770echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
6771echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 6772
ba479fd2 6773cat >>confdefs.h <<_ACEOF
e256b8b6 6774#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 6775_ACEOF
e256b8b6
DA
6776
6777
6778if test "${target}" = "${build}"; then
6779 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
6780else
6781 case "${target}" in
6782 # This condition may need some tweaking. It should include all
6783 # targets where the array type of the second argument of getgroups
6784 # is int and the type of gid_t is not equivalent to int.
6785 *-*-sunos* | *-*-ultrix*)
6786 TARGET_GETGROUPS_T=int
6787 ;;
6788 *)
6789 TARGET_GETGROUPS_T=gid_t
6790 ;;
6791 esac
6792fi
6793
6794
ba479fd2
NN
6795echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
6796echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
6797if test "${gcc_cv_func_printf_ptr+set}" = set; then
6798 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
6799else
6800 if test "$cross_compiling" = yes; then
6801 gcc_cv_func_printf_ptr=no
6802else
ba479fd2
NN
6803 cat >conftest.$ac_ext <<_ACEOF
6804#line $LINENO "configure"
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
0a4b6309
RL
6810#include <stdio.h>
6811
86cf1cbd 6812int main()
0a4b6309
RL
6813{
6814 char buf[64];
6815 char *p = buf, *q = NULL;
6816 sprintf(buf, "%p", p);
6817 sscanf(buf, "%p", &q);
86cf1cbd 6818 return (p != q);
0a4b6309 6819}
ba479fd2
NN
6820_ACEOF
6821rm -f conftest$ac_exeext
6822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6823 (eval $ac_link) 2>&5
6824 ac_status=$?
6825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6828 (eval $ac_try) 2>&5
6829 ac_status=$?
6830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6831 (exit $ac_status); }; }; then
0a4b6309
RL
6832 gcc_cv_func_printf_ptr=yes
6833else
ba479fd2
NN
6834 echo "$as_me: program exited with status $ac_status" >&5
6835echo "$as_me: failed program was:" >&5
6836sed 's/^/| /' conftest.$ac_ext >&5
6837
6838( exit $ac_status )
6839gcc_cv_func_printf_ptr=no
0a4b6309 6840fi
a6a5e4c9 6841rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 6842fi
0a4b6309
RL
6843rm -f core core.* *.core
6844fi
ba479fd2
NN
6845echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
6846echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 6847if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
6848
6849cat >>confdefs.h <<\_ACEOF
0a4b6309 6850#define HAVE_PRINTF_PTR 1
ba479fd2 6851_ACEOF
0a4b6309
RL
6852
6853fi
6854
1072ec3f
ZW
6855if test $ac_cv_header_sys_mman_h != yes \
6856 || test $ac_cv_func_mmap != yes; then
6857 gcc_cv_func_mmap_file=no
6858 gcc_cv_func_mmap_dev_zero=no
6859 gcc_cv_func_mmap_anon=no
6860else
ba479fd2
NN
6861 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
6862echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
6863if test "${gcc_cv_func_mmap_file+set}" = set; then
6864 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 6865else
ba479fd2 6866 # Add a system to this blacklist if
1072ec3f
ZW
6867 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
6868 # memory area containing the same data that you'd get if you applied
6869 # read() to the same fd. The only system known to have a problem here
6870 # is VMS, where text files have record structure.
6871 case "$host_os" in
ba479fd2 6872 vms* | ultrix*)
1072ec3f
ZW
6873 gcc_cv_func_mmap_file=no ;;
6874 *)
6875 gcc_cv_func_mmap_file=yes;;
6876 esac
6877fi
ba479fd2
NN
6878echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
6879echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
6880 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
6881echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
6882if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
6883 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6884else
6885 # Add a system to this blacklist if it has mmap() but /dev/zero
6886 # does not exist, or if mmapping /dev/zero does not give anonymous
6887 # zeroed pages with both the following properties:
6888 # 1. If you map N consecutive pages in with one call, and then
6889 # unmap any subset of those pages, the pages that were not
6890 # explicitly unmapped remain accessible.
6891 # 2. If you map two adjacent blocks of memory and then unmap them
6892 # both at once, they must both go away.
6893 # Systems known to be in this category are Windows (all variants),
6894 # VMS, and Darwin.
6895 case "$host_os" in
2ce240d3 6896 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
6897 gcc_cv_func_mmap_dev_zero=no ;;
6898 *)
6899 gcc_cv_func_mmap_dev_zero=yes;;
6900 esac
6901fi
ba479fd2
NN
6902echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
6903echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
6904
6905 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
6906 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
6907echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
6908if test "${gcc_cv_decl_map_anon+set}" = set; then
6909 echo $ECHO_N "(cached) $ECHO_C" >&6
6910else
6911 cat >conftest.$ac_ext <<_ACEOF
6912#line $LINENO "configure"
6913/* confdefs.h. */
6914_ACEOF
6915cat confdefs.h >>conftest.$ac_ext
6916cat >>conftest.$ac_ext <<_ACEOF
6917/* end confdefs.h. */
1072ec3f
ZW
6918#include <sys/types.h>
6919#include <sys/mman.h>
6920#include <unistd.h>
6921
6922#ifndef MAP_ANONYMOUS
6923#define MAP_ANONYMOUS MAP_ANON
6924#endif
6925
ba479fd2
NN
6926int
6927main ()
6928{
1072ec3f 6929int n = MAP_ANONYMOUS;
ba479fd2
NN
6930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); } &&
6940 { ac_try='test -s conftest.$ac_objext'
6941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6942 (eval $ac_try) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); }; }; then
1072ec3f
ZW
6946 gcc_cv_decl_map_anon=yes
6947else
ba479fd2
NN
6948 echo "$as_me: failed program was:" >&5
6949sed 's/^/| /' conftest.$ac_ext >&5
6950
6951gcc_cv_decl_map_anon=no
1072ec3f 6952fi
ba479fd2 6953rm -f conftest.$ac_objext conftest.$ac_ext
1072ec3f 6954fi
ba479fd2
NN
6955echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
6956echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
6957
6958 if test $gcc_cv_decl_map_anon = no; then
6959 gcc_cv_func_mmap_anon=no
6960 else
ba479fd2
NN
6961 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
6962echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
6963if test "${gcc_cv_func_mmap_anon+set}" = set; then
6964 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
6965else
6966 # Add a system to this blacklist if it has mmap() and MAP_ANON or
6967 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
6968 # doesn't give anonymous zeroed pages with the same properties listed
6969 # above for use of /dev/zero.
6970 # Systems known to be in this category are Windows, VMS, and SCO Unix.
6971 case "$host_os" in
6972 vms* | cygwin* | pe | mingw* | sco* | udk* )
6973 gcc_cv_func_mmap_anon=no ;;
6974 *)
6975 gcc_cv_func_mmap_anon=yes;;
6976 esac
6977fi
ba479fd2
NN
6978echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
6979echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
6980 fi
6981fi
6982
6983if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
6984
6985cat >>confdefs.h <<\_ACEOF
1072ec3f 6986#define HAVE_MMAP_FILE 1
ba479fd2 6987_ACEOF
1072ec3f
ZW
6988
6989fi
6990if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
6991
6992cat >>confdefs.h <<\_ACEOF
1072ec3f 6993#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 6994_ACEOF
1072ec3f
ZW
6995
6996fi
6997if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
6998
6999cat >>confdefs.h <<\_ACEOF
1072ec3f 7000#define HAVE_MMAP_ANON 1
ba479fd2 7001_ACEOF
1072ec3f
ZW
7002
7003fi
7004
b27d2bd5
MK
7005
7006case "${host}" in
ee262b6f 7007*-*-*vms*)
ba479fd2 7008 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
7009 # won't work, and it isn't easily adaptable. It makes more sense to
7010 # just force it.
7011 ac_cv_func_vfork_works=yes
7012 ;;
b27d2bd5 7013esac
ba479fd2
NN
7014echo "$as_me:$LINENO: checking for pid_t" >&5
7015echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7016if test "${ac_cv_type_pid_t+set}" = set; then
7017 echo $ECHO_N "(cached) $ECHO_C" >&6
7018else
7019 cat >conftest.$ac_ext <<_ACEOF
7020#line $LINENO "configure"
7021/* confdefs.h. */
7022_ACEOF
7023cat confdefs.h >>conftest.$ac_ext
7024cat >>conftest.$ac_ext <<_ACEOF
7025/* end confdefs.h. */
7026$ac_includes_default
7027int
7028main ()
7029{
7030if ((pid_t *) 0)
7031 return 0;
7032if (sizeof (pid_t))
7033 return 0;
7034 ;
7035 return 0;
7036}
7037_ACEOF
7038rm -f conftest.$ac_objext
7039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7040 (eval $ac_compile) 2>&5
7041 ac_status=$?
7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); } &&
7044 { ac_try='test -s conftest.$ac_objext'
7045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7046 (eval $ac_try) 2>&5
7047 ac_status=$?
7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7049 (exit $ac_status); }; }; then
cb65112a 7050 ac_cv_type_pid_t=yes
c375c43b 7051else
ba479fd2
NN
7052 echo "$as_me: failed program was:" >&5
7053sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7054
ba479fd2
NN
7055ac_cv_type_pid_t=no
7056fi
7057rm -f conftest.$ac_objext conftest.$ac_ext
63cf211a 7058fi
ba479fd2
NN
7059echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7060echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7061if test $ac_cv_type_pid_t = yes; then
7062 :
7063else
7064
7065cat >>confdefs.h <<_ACEOF
c375c43b 7066#define pid_t int
ba479fd2 7067_ACEOF
c375c43b
KG
7068
7069fi
7070
ba479fd2
NN
7071
7072
7073for ac_header in unistd.h vfork.h
7074do
7075as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7076echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7077echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7078if eval "test \"\${$as_ac_Header+set}\" = set"; then
7079 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7080else
ca9bc441 7081 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7082#line $LINENO "configure"
7083/* confdefs.h. */
7084_ACEOF
7085cat confdefs.h >>conftest.$ac_ext
7086cat >>conftest.$ac_ext <<_ACEOF
7087/* end confdefs.h. */
7088#include <$ac_header>
7089_ACEOF
7090if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7091 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7092 ac_status=$?
7093 grep -v '^ *+' conftest.er1 >conftest.err
7094 rm -f conftest.er1
7095 cat conftest.err >&5
7096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7097 (exit $ac_status); } >/dev/null; then
7098 if test -s conftest.err; then
7099 ac_cpp_err=$ac_c_preproc_warn_flag
7100 else
7101 ac_cpp_err=
7102 fi
093e61a6 7103else
ba479fd2
NN
7104 ac_cpp_err=yes
7105fi
7106if test -z "$ac_cpp_err"; then
ca9bc441 7107 eval "$as_ac_Header=yes"
ba479fd2
NN
7108else
7109 echo "$as_me: failed program was:" >&5
7110sed 's/^/| /' conftest.$ac_ext >&5
7111
ca9bc441 7112 eval "$as_ac_Header=no"
ba479fd2
NN
7113fi
7114rm -f conftest.err conftest.$ac_ext
c375c43b 7115fi
ba479fd2
NN
7116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7117echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7118if test `eval echo '${'$as_ac_Header'}'` = yes; then
7119 cat >>confdefs.h <<_ACEOF
7120#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7121_ACEOF
6e3f3080
NN
7122
7123fi
ba479fd2
NN
7124done
7125
7126
7127
7128for ac_func in fork vfork
7129do
7130as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7131echo "$as_me:$LINENO: checking for $ac_func" >&5
7132echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7133if eval "test \"\${$as_ac_var+set}\" = set"; then
7134 echo $ECHO_N "(cached) $ECHO_C" >&6
7135else
7136 cat >conftest.$ac_ext <<_ACEOF
7137#line $LINENO "configure"
7138/* confdefs.h. */
7139_ACEOF
7140cat confdefs.h >>conftest.$ac_ext
7141cat >>conftest.$ac_ext <<_ACEOF
7142/* end confdefs.h. */
c375c43b 7143/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
7144 which can conflict with char $ac_func (); below.
7145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7146 <limits.h> exists even on freestanding compilers. */
7147#ifdef __STDC__
7148# include <limits.h>
7149#else
7150# include <assert.h>
7151#endif
6e3f3080 7152/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
7153#ifdef __cplusplus
7154extern "C"
7155{
7156#endif
6e3f3080 7157/* We use char because int might match the return type of a gcc2
ba479fd2
NN
7158 builtin and then its argument prototype would still apply. */
7159char $ac_func ();
c375c43b
KG
7160/* The GNU C library defines this for functions which it implements
7161 to always fail with ENOSYS. Some functions are actually named
7162 something starting with __ and the normal name is an alias. */
ba479fd2 7163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
7164choke me
7165#else
ba479fd2
NN
7166char (*f) () = $ac_func;
7167#endif
7168#ifdef __cplusplus
7169}
c375c43b
KG
7170#endif
7171
ba479fd2
NN
7172int
7173main ()
7174{
7175return f != $ac_func;
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext conftest$ac_exeext
7181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7182 (eval $ac_link) 2>&5
7183 ac_status=$?
7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185 (exit $ac_status); } &&
7186 { ac_try='test -s conftest$ac_exeext'
7187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188 (eval $ac_try) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); }; }; then
7192 eval "$as_ac_var=yes"
7193else
7194 echo "$as_me: failed program was:" >&5
7195sed 's/^/| /' conftest.$ac_ext >&5
7196
7197eval "$as_ac_var=no"
7198fi
7199rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7200fi
7201echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7202echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7203if test `eval echo '${'$as_ac_var'}'` = yes; then
7204 cat >>confdefs.h <<_ACEOF
7205#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7206_ACEOF
7207
c375c43b 7208fi
ba479fd2 7209done
c375c43b 7210
ba479fd2
NN
7211if test "x$ac_cv_func_fork" = xyes; then
7212 echo "$as_me:$LINENO: checking for working fork" >&5
7213echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7214if test "${ac_cv_func_fork_works+set}" = set; then
7215 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7216else
ba479fd2
NN
7217 if test "$cross_compiling" = yes; then
7218 ac_cv_func_fork_works=cross
7219else
7220 cat >conftest.$ac_ext <<_ACEOF
7221/* By Ruediger Kuhlmann. */
7222 #include <sys/types.h>
7223 #if HAVE_UNISTD_H
7224 # include <unistd.h>
7225 #endif
7226 /* Some systems only have a dummy stub for fork() */
7227 int main ()
7228 {
7229 if (fork() < 0)
7230 exit (1);
7231 exit (0);
7232 }
7233_ACEOF
7234rm -f conftest$ac_exeext
7235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7236 (eval $ac_link) 2>&5
7237 ac_status=$?
7238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7241 (eval $ac_try) 2>&5
7242 ac_status=$?
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); }; }; then
7245 ac_cv_func_fork_works=yes
7246else
7247 echo "$as_me: program exited with status $ac_status" >&5
7248echo "$as_me: failed program was:" >&5
7249sed 's/^/| /' conftest.$ac_ext >&5
7250
7251( exit $ac_status )
7252ac_cv_func_fork_works=no
7253fi
a6a5e4c9 7254rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
7255fi
7256fi
7257echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7258echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7259
7260else
7261 ac_cv_func_fork_works=$ac_cv_func_fork
7262fi
7263if test "x$ac_cv_func_fork_works" = xcross; then
7264 case $host in
7265 *-*-amigaos* | *-*-msdosdjgpp*)
7266 # Override, as these systems have only a dummy fork() stub
7267 ac_cv_func_fork_works=no
7268 ;;
7269 *)
7270 ac_cv_func_fork_works=yes
7271 ;;
7272 esac
7273 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7274echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 7275fi
c375c43b 7276ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7277if test "x$ac_cv_func_vfork" = xyes; then
7278 echo "$as_me:$LINENO: checking for working vfork" >&5
7279echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7280if test "${ac_cv_func_vfork_works+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7282else
ba479fd2
NN
7283 if test "$cross_compiling" = yes; then
7284 ac_cv_func_vfork_works=cross
7285else
7286 cat >conftest.$ac_ext <<_ACEOF
7287#line $LINENO "configure"
7288/* confdefs.h. */
7289_ACEOF
7290cat confdefs.h >>conftest.$ac_ext
7291cat >>conftest.$ac_ext <<_ACEOF
7292/* end confdefs.h. */
c375c43b
KG
7293/* Thanks to Paul Eggert for this test. */
7294#include <stdio.h>
ba479fd2 7295#include <stdlib.h>
c375c43b
KG
7296#include <sys/types.h>
7297#include <sys/stat.h>
ba479fd2
NN
7298#include <sys/wait.h>
7299#if HAVE_UNISTD_H
7300# include <unistd.h>
c375c43b 7301#endif
ba479fd2
NN
7302#if HAVE_VFORK_H
7303# include <vfork.h>
c375c43b
KG
7304#endif
7305/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
7306 argument registers are propagated back to the parent. The compiler
7307 is told about this with #include <vfork.h>, but some compilers
7308 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7309 static variable whose address is put into a register that is
7310 clobbered by the vfork. */
7311static void
c375c43b
KG
7312#ifdef __cplusplus
7313sparc_address_test (int arg)
ba479fd2 7314# else
c375c43b
KG
7315sparc_address_test (arg) int arg;
7316#endif
7317{
7318 static pid_t child;
7319 if (!child) {
7320 child = vfork ();
7321 if (child < 0) {
7322 perror ("vfork");
7323 _exit(2);
7324 }
7325 if (!child) {
7326 arg = getpid();
7327 write(-1, "", 0);
7328 _exit (arg);
7329 }
7330 }
7331}
ba479fd2
NN
7332
7333int
7334main ()
7335{
c375c43b
KG
7336 pid_t parent = getpid ();
7337 pid_t child;
7338
ba479fd2 7339 sparc_address_test (0);
c375c43b
KG
7340
7341 child = vfork ();
7342
7343 if (child == 0) {
ba479fd2
NN
7344 /* Here is another test for sparc vfork register problems. This
7345 test uses lots of local variables, at least as many local
7346 variables as main has allocated so far including compiler
7347 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7348 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7349 reuse the register of parent for one of the local variables,
7350 since it will think that parent can't possibly be used any more
7351 in this routine. Assigning to the local variable will thus
7352 munge parent in the parent process. */
c375c43b
KG
7353 pid_t
7354 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7355 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7356 /* Convince the compiler that p..p7 are live; otherwise, it might
7357 use the same hardware register for all 8 local variables. */
7358 if (p != p1 || p != p2 || p != p3 || p != p4
7359 || p != p5 || p != p6 || p != p7)
7360 _exit(1);
7361
ba479fd2
NN
7362 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7363 from child file descriptors. If the child closes a descriptor
7364 before it execs or exits, this munges the parent's descriptor
7365 as well. Test for this by closing stdout in the child. */
c375c43b
KG
7366 _exit(close(fileno(stdout)) != 0);
7367 } else {
7368 int status;
7369 struct stat st;
7370
7371 while (wait(&status) != child)
7372 ;
7373 exit(
7374 /* Was there some problem with vforking? */
7375 child < 0
7376
7377 /* Did the child fail? (This shouldn't happen.) */
7378 || status
7379
7380 /* Did the vfork/compiler bug occur? */
7381 || parent != getpid()
7382
7383 /* Did the file descriptor bug occur? */
7384 || fstat(fileno(stdout), &st) != 0
7385 );
7386 }
7387}
ba479fd2
NN
7388_ACEOF
7389rm -f conftest$ac_exeext
7390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7391 (eval $ac_link) 2>&5
7392 ac_status=$?
7393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; }; then
c375c43b
KG
7400 ac_cv_func_vfork_works=yes
7401else
ba479fd2
NN
7402 echo "$as_me: program exited with status $ac_status" >&5
7403echo "$as_me: failed program was:" >&5
7404sed 's/^/| /' conftest.$ac_ext >&5
7405
7406( exit $ac_status )
7407ac_cv_func_vfork_works=no
cafe096b 7408fi
a6a5e4c9 7409rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 7410fi
ba479fd2
NN
7411fi
7412echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7413echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 7414
ba479fd2
NN
7415fi;
7416if test "x$ac_cv_func_fork_works" = xcross; then
7417 ac_cv_func_vfork_works=ac_cv_func_vfork
7418 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7419echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
7420fi
7421
ba479fd2
NN
7422if test "x$ac_cv_func_vfork_works" = xyes; then
7423
7424cat >>confdefs.h <<\_ACEOF
7425#define HAVE_WORKING_VFORK 1
7426_ACEOF
7427
7428else
7429
7430cat >>confdefs.h <<\_ACEOF
c375c43b 7431#define vfork fork
ba479fd2 7432_ACEOF
c375c43b
KG
7433
7434fi
ba479fd2
NN
7435if test "x$ac_cv_func_fork_works" = xyes; then
7436
7437cat >>confdefs.h <<\_ACEOF
7438#define HAVE_WORKING_FORK 1
7439_ACEOF
7440
7441fi
7442
c375c43b 7443
81bf3d9e 7444
f91abfce 7445
b7f2fb96 7446 am_cv_lib_iconv_ldpath=
ba479fd2
NN
7447
7448# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
f91abfce
TT
7449if test "${with_libiconv_prefix+set}" = set; then
7450 withval="$with_libiconv_prefix"
ba479fd2 7451
f91abfce
TT
7452 for dir in `echo "$withval" | tr : ' '`; do
7453 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
b7f2fb96 7454 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
f91abfce 7455 done
ba479fd2
NN
7456
7457fi;
f91abfce
TT
7458
7459
ba479fd2 7460for ac_header in iconv.h
eb158727 7461do
ba479fd2 7462as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7463echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7464echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7465if eval "test \"\${$as_ac_Header+set}\" = set"; then
7466 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7467else
ca9bc441 7468 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7469#line $LINENO "configure"
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475#include <$ac_header>
7476_ACEOF
7477if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7478 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7479 ac_status=$?
7480 grep -v '^ *+' conftest.er1 >conftest.err
7481 rm -f conftest.er1
7482 cat conftest.err >&5
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484 (exit $ac_status); } >/dev/null; then
7485 if test -s conftest.err; then
7486 ac_cpp_err=$ac_c_preproc_warn_flag
7487 else
7488 ac_cpp_err=
7489 fi
7490else
7491 ac_cpp_err=yes
7492fi
7493if test -z "$ac_cpp_err"; then
ca9bc441 7494 eval "$as_ac_Header=yes"
ba479fd2
NN
7495else
7496 echo "$as_me: failed program was:" >&5
7497sed 's/^/| /' conftest.$ac_ext >&5
7498
ca9bc441 7499 eval "$as_ac_Header=no"
ba479fd2
NN
7500fi
7501rm -f conftest.err conftest.$ac_ext
6e3f3080 7502fi
ba479fd2
NN
7503echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7504echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7505if test `eval echo '${'$as_ac_Header'}'` = yes; then
7506 cat >>confdefs.h <<_ACEOF
7507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7508_ACEOF
7509
eb158727
ZW
7510fi
7511done
7512
7513
ba479fd2
NN
7514 echo "$as_me:$LINENO: checking for iconv" >&5
7515echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7516if test "${am_cv_func_iconv+set}" = set; then
7517 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7518else
ba479fd2 7519
f91abfce
TT
7520 am_cv_func_iconv="no, consider installing GNU libiconv"
7521 am_cv_lib_iconv=no
ba479fd2
NN
7522 cat >conftest.$ac_ext <<_ACEOF
7523#line $LINENO "configure"
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
f91abfce
TT
7529#include <stdlib.h>
7530#include <iconv.h>
ba479fd2
NN
7531int
7532main ()
7533{
f91abfce
TT
7534iconv_t cd = iconv_open("","");
7535 iconv(cd,NULL,NULL,NULL,NULL);
7536 iconv_close(cd);
ba479fd2
NN
7537 ;
7538 return 0;
7539}
7540_ACEOF
7541rm -f conftest.$ac_objext conftest$ac_exeext
7542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7543 (eval $ac_link) 2>&5
7544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); } &&
7547 { ac_try='test -s conftest$ac_exeext'
7548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7549 (eval $ac_try) 2>&5
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); }; }; then
f91abfce
TT
7553 am_cv_func_iconv=yes
7554else
ba479fd2
NN
7555 echo "$as_me: failed program was:" >&5
7556sed 's/^/| /' conftest.$ac_ext >&5
7557
f91abfce 7558fi
ba479fd2 7559rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7560 if test "$am_cv_func_iconv" != yes; then
7561 am_save_LIBS="$LIBS"
b7f2fb96 7562 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
ba479fd2
NN
7563 cat >conftest.$ac_ext <<_ACEOF
7564#line $LINENO "configure"
7565/* confdefs.h. */
7566_ACEOF
7567cat confdefs.h >>conftest.$ac_ext
7568cat >>conftest.$ac_ext <<_ACEOF
7569/* end confdefs.h. */
f91abfce
TT
7570#include <stdlib.h>
7571#include <iconv.h>
ba479fd2
NN
7572int
7573main ()
7574{
f91abfce
TT
7575iconv_t cd = iconv_open("","");
7576 iconv(cd,NULL,NULL,NULL,NULL);
7577 iconv_close(cd);
ba479fd2
NN
7578 ;
7579 return 0;
7580}
7581_ACEOF
7582rm -f conftest.$ac_objext conftest$ac_exeext
7583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7584 (eval $ac_link) 2>&5
7585 ac_status=$?
7586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7587 (exit $ac_status); } &&
7588 { ac_try='test -s conftest$ac_exeext'
7589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7590 (eval $ac_try) 2>&5
7591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); }; }; then
f91abfce
TT
7594 am_cv_lib_iconv=yes
7595 am_cv_func_iconv=yes
7596else
ba479fd2
NN
7597 echo "$as_me: failed program was:" >&5
7598sed 's/^/| /' conftest.$ac_ext >&5
7599
f91abfce 7600fi
ba479fd2 7601rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7602 LIBS="$am_save_LIBS"
7603 fi
6e3f3080 7604
ba479fd2
NN
7605fi
7606echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
7607echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 7608 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
7609
7610cat >>confdefs.h <<\_ACEOF
f91abfce 7611#define HAVE_ICONV 1
ba479fd2 7612_ACEOF
f91abfce 7613
ba479fd2
NN
7614 echo "$as_me:$LINENO: checking for iconv declaration" >&5
7615echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
7616 if test "${am_cv_proto_iconv+set}" = set; then
7617 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7618else
ba479fd2
NN
7619
7620 cat >conftest.$ac_ext <<_ACEOF
7621#line $LINENO "configure"
7622/* confdefs.h. */
7623_ACEOF
7624cat confdefs.h >>conftest.$ac_ext
7625cat >>conftest.$ac_ext <<_ACEOF
7626/* end confdefs.h. */
f91abfce
TT
7627
7628#include <stdlib.h>
7629#include <iconv.h>
7630extern
7631#ifdef __cplusplus
7632"C"
7633#endif
7634#if defined(__STDC__) || defined(__cplusplus)
7635size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7636#else
7637size_t iconv();
7638#endif
7639
ba479fd2
NN
7640int
7641main ()
7642{
f91abfce 7643
ba479fd2
NN
7644 ;
7645 return 0;
7646}
7647_ACEOF
7648rm -f conftest.$ac_objext
7649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7650 (eval $ac_compile) 2>&5
7651 ac_status=$?
7652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7653 (exit $ac_status); } &&
7654 { ac_try='test -s conftest.$ac_objext'
7655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7656 (eval $ac_try) 2>&5
7657 ac_status=$?
7658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659 (exit $ac_status); }; }; then
f91abfce
TT
7660 am_cv_proto_iconv_arg1=""
7661else
ba479fd2
NN
7662 echo "$as_me: failed program was:" >&5
7663sed 's/^/| /' conftest.$ac_ext >&5
7664
7665am_cv_proto_iconv_arg1="const"
f91abfce 7666fi
ba479fd2 7667rm -f conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
7668 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);"
7669fi
7670
7671 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
7672 echo "$as_me:$LINENO: result: ${ac_t:-
7673 }$am_cv_proto_iconv" >&5
7674echo "${ECHO_T}${ac_t:-
7675 }$am_cv_proto_iconv" >&6
7676
7677cat >>confdefs.h <<_ACEOF
f91abfce 7678#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 7679_ACEOF
f91abfce
TT
7680
7681 fi
7682 LIBICONV=
7683 if test "$am_cv_lib_iconv" = yes; then
b7f2fb96 7684 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
f91abfce 7685 fi
ba479fd2 7686
f91abfce 7687
56694dd9
ZW
7688# Until we have in-tree GNU iconv:
7689LIBICONV_DEP=
7690
7691
7692
ba479fd2
NN
7693 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7694echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7695if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7696 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 7697else
ba479fd2
NN
7698 cat >conftest.$ac_ext <<_ACEOF
7699#line $LINENO "configure"
7700/* confdefs.h. */
7701_ACEOF
7702cat confdefs.h >>conftest.$ac_ext
7703cat >>conftest.$ac_ext <<_ACEOF
7704/* end confdefs.h. */
56694dd9 7705#include <locale.h>
ba479fd2
NN
7706int
7707main ()
7708{
56694dd9 7709return LC_MESSAGES
ba479fd2
NN
7710 ;
7711 return 0;
7712}
7713_ACEOF
7714rm -f conftest.$ac_objext conftest$ac_exeext
7715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7716 (eval $ac_link) 2>&5
7717 ac_status=$?
7718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719 (exit $ac_status); } &&
7720 { ac_try='test -s conftest$ac_exeext'
7721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7722 (eval $ac_try) 2>&5
7723 ac_status=$?
7724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7725 (exit $ac_status); }; }; then
56694dd9
ZW
7726 am_cv_val_LC_MESSAGES=yes
7727else
ba479fd2
NN
7728 echo "$as_me: failed program was:" >&5
7729sed 's/^/| /' conftest.$ac_ext >&5
7730
7731am_cv_val_LC_MESSAGES=no
56694dd9 7732fi
ba479fd2 7733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
56694dd9 7734fi
ba479fd2
NN
7735echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7736echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 7737 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
7738
7739cat >>confdefs.h <<\_ACEOF
56694dd9 7740#define HAVE_LC_MESSAGES 1
ba479fd2 7741_ACEOF
56694dd9
ZW
7742
7743 fi
7744
f91abfce 7745
86cf1cbd
KG
7746# We will need to find libiberty.h and ansidecl.h
7747saved_CFLAGS="$CFLAGS"
7748CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
8e944909 7749for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 7750 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 7751 fprintf_unlocked strstr errno snprintf vasprintf \
c1800ec8 7752 malloc realloc calloc free basename getopt clock
81bf3d9e 7753do
f31e826b 7754 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7755echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7756echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7757if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7758 echo $ECHO_N "(cached) $ECHO_C" >&6
7759else
7760 cat >conftest.$ac_ext <<_ACEOF
7761#line $LINENO "configure"
7762/* confdefs.h. */
7763_ACEOF
7764cat confdefs.h >>conftest.$ac_ext
7765cat >>conftest.$ac_ext <<_ACEOF
7766/* end confdefs.h. */
7afe8c41
KG
7767#undef $ac_tr_decl
7768#define $ac_tr_decl 1
ba479fd2 7769
d02af173 7770#include "ansidecl.h"
86cf1cbd 7771#include "system.h"
f31e826b 7772
ba479fd2
NN
7773int
7774main ()
7775{
86cf1cbd
KG
7776#ifndef $ac_func
7777char *(*pfn) = (char *(*)) $ac_func ;
7778#endif
ba479fd2
NN
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext
7784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7785 (eval $ac_compile) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); } &&
7789 { ac_try='test -s conftest.$ac_objext'
7790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7791 (eval $ac_try) 2>&5
7792 ac_status=$?
7793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7794 (exit $ac_status); }; }; then
f31e826b 7795 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7796else
ba479fd2
NN
7797 echo "$as_me: failed program was:" >&5
7798sed 's/^/| /' conftest.$ac_ext >&5
7799
7800eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7801fi
ba479fd2 7802rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7803fi
7804
f31e826b 7805if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7806 echo "$as_me:$LINENO: result: yes" >&5
7807echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7808#define $ac_tr_decl 1
ba479fd2
NN
7809_ACEOF
7810
81bf3d9e 7811else
ba479fd2
NN
7812 echo "$as_me:$LINENO: result: no" >&5
7813echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7814#define $ac_tr_decl 0
ba479fd2
NN
7815_ACEOF
7816
81bf3d9e
RH
7817fi
7818
7819done
86cf1cbd 7820if test x = y ; then
ba479fd2
NN
7821
7822cat >>confdefs.h <<\_ACEOF
f31e826b 7823#define HAVE_DECL_GETENV 1
ba479fd2
NN
7824_ACEOF
7825
7826cat >>confdefs.h <<\_ACEOF
f31e826b 7827#define HAVE_DECL_ATOL 1
ba479fd2
NN
7828_ACEOF
7829
7830cat >>confdefs.h <<\_ACEOF
f31e826b 7831#define HAVE_DECL_SBRK 1
ba479fd2
NN
7832_ACEOF
7833
7834cat >>confdefs.h <<\_ACEOF
f31e826b 7835#define HAVE_DECL_ABORT 1
ba479fd2
NN
7836_ACEOF
7837
7838cat >>confdefs.h <<\_ACEOF
f31e826b 7839#define HAVE_DECL_ATOF 1
ba479fd2
NN
7840_ACEOF
7841
7842cat >>confdefs.h <<\_ACEOF
f31e826b 7843#define HAVE_DECL_GETCWD 1
ba479fd2
NN
7844_ACEOF
7845
7846cat >>confdefs.h <<\_ACEOF
f31e826b 7847#define HAVE_DECL_GETWD 1
ba479fd2 7848_ACEOF
86cf1cbd 7849 \
ba479fd2
NN
7850
7851cat >>confdefs.h <<\_ACEOF
f31e826b 7852#define HAVE_DECL_STRSIGNAL 1
ba479fd2
NN
7853_ACEOF
7854
7855cat >>confdefs.h <<\_ACEOF
f31e826b 7856#define HAVE_DECL_PUTC_UNLOCKED 1
ba479fd2
NN
7857_ACEOF
7858
7859cat >>confdefs.h <<\_ACEOF
f31e826b 7860#define HAVE_DECL_FPUTS_UNLOCKED 1
ba479fd2
NN
7861_ACEOF
7862
7863cat >>confdefs.h <<\_ACEOF
3b681e9d 7864#define HAVE_DECL_FWRITE_UNLOCKED 1
ba479fd2 7865_ACEOF
3b681e9d 7866 \
ba479fd2
NN
7867
7868cat >>confdefs.h <<\_ACEOF
3b681e9d 7869#define HAVE_DECL_FPRINTF_UNLOCKED 1
ba479fd2
NN
7870_ACEOF
7871
7872cat >>confdefs.h <<\_ACEOF
f31e826b 7873#define HAVE_DECL_STRSTR 1
ba479fd2
NN
7874_ACEOF
7875
7876cat >>confdefs.h <<\_ACEOF
6c889b67 7877#define HAVE_DECL_ERRNO 1
ba479fd2
NN
7878_ACEOF
7879
7880cat >>confdefs.h <<\_ACEOF
236ce4b2 7881#define HAVE_DECL_SNPRINTF 1
ba479fd2
NN
7882_ACEOF
7883
7884cat >>confdefs.h <<\_ACEOF
a7475ab1 7885#define HAVE_DECL_VASPRINTF 1
ba479fd2 7886_ACEOF
86cf1cbd 7887 \
ba479fd2
NN
7888
7889cat >>confdefs.h <<\_ACEOF
f31e826b 7890#define HAVE_DECL_MALLOC 1
ba479fd2
NN
7891_ACEOF
7892
7893cat >>confdefs.h <<\_ACEOF
f31e826b 7894#define HAVE_DECL_REALLOC 1
ba479fd2
NN
7895_ACEOF
7896
7897cat >>confdefs.h <<\_ACEOF
f31e826b 7898#define HAVE_DECL_CALLOC 1
ba479fd2
NN
7899_ACEOF
7900
7901cat >>confdefs.h <<\_ACEOF
f31e826b 7902#define HAVE_DECL_FREE 1
ba479fd2
NN
7903_ACEOF
7904
7905cat >>confdefs.h <<\_ACEOF
f31e826b 7906#define HAVE_DECL_BASENAME 1
ba479fd2
NN
7907_ACEOF
7908
7909cat >>confdefs.h <<\_ACEOF
f31e826b 7910#define HAVE_DECL_GETOPT 1
ba479fd2
NN
7911_ACEOF
7912
7913cat >>confdefs.h <<\_ACEOF
c1800ec8 7914#define HAVE_DECL_CLOCK 1
ba479fd2 7915_ACEOF
81bf3d9e
RH
7916fi
7917
81bf3d9e
RH
7918
7919for ac_func in getrlimit setrlimit getrusage
7920do
f31e826b 7921 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
7922echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
7923echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
7924if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
7925 echo $ECHO_N "(cached) $ECHO_C" >&6
7926else
7927 cat >conftest.$ac_ext <<_ACEOF
7928#line $LINENO "configure"
7929/* confdefs.h. */
7930_ACEOF
7931cat confdefs.h >>conftest.$ac_ext
7932cat >>conftest.$ac_ext <<_ACEOF
7933/* end confdefs.h. */
7afe8c41
KG
7934#undef $ac_tr_decl
7935#define $ac_tr_decl 1
ba479fd2 7936
d02af173 7937#include "ansidecl.h"
86cf1cbd 7938#include "system.h"
81bf3d9e
RH
7939#ifdef HAVE_SYS_RESOURCE_H
7940#include <sys/resource.h>
7941#endif
7942
f31e826b 7943
ba479fd2
NN
7944int
7945main ()
7946{
86cf1cbd
KG
7947#ifndef $ac_func
7948char *(*pfn) = (char *(*)) $ac_func ;
7949#endif
ba479fd2
NN
7950 ;
7951 return 0;
7952}
7953_ACEOF
7954rm -f conftest.$ac_objext
7955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7956 (eval $ac_compile) 2>&5
7957 ac_status=$?
7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959 (exit $ac_status); } &&
7960 { ac_try='test -s conftest.$ac_objext'
7961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7962 (eval $ac_try) 2>&5
7963 ac_status=$?
7964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7965 (exit $ac_status); }; }; then
f31e826b 7966 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 7967else
ba479fd2
NN
7968 echo "$as_me: failed program was:" >&5
7969sed 's/^/| /' conftest.$ac_ext >&5
7970
7971eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 7972fi
ba479fd2 7973rm -f conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
7974fi
7975
f31e826b 7976if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
7977 echo "$as_me:$LINENO: result: yes" >&5
7978echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 7979#define $ac_tr_decl 1
ba479fd2
NN
7980_ACEOF
7981
81bf3d9e 7982else
ba479fd2
NN
7983 echo "$as_me:$LINENO: result: no" >&5
7984echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 7985#define $ac_tr_decl 0
ba479fd2
NN
7986_ACEOF
7987
81bf3d9e
RH
7988fi
7989
7990done
86cf1cbd 7991if test x = y ; then
ba479fd2
NN
7992
7993cat >>confdefs.h <<\_ACEOF
f31e826b 7994#define HAVE_DECL_GETRLIMIT 1
ba479fd2
NN
7995_ACEOF
7996
7997cat >>confdefs.h <<\_ACEOF
f31e826b 7998#define HAVE_DECL_SETRLIMIT 1
ba479fd2
NN
7999_ACEOF
8000
8001cat >>confdefs.h <<\_ACEOF
f31e826b 8002#define HAVE_DECL_GETRUSAGE 1
ba479fd2 8003_ACEOF
86cf1cbd
KG
8004fi
8005
81bf3d9e 8006
ba479fd2
NN
8007cat >conftest.$ac_ext <<_ACEOF
8008#line $LINENO "configure"
8009/* confdefs.h. */
8010_ACEOF
8011cat confdefs.h >>conftest.$ac_ext
8012cat >>conftest.$ac_ext <<_ACEOF
8013/* end confdefs.h. */
b2522d2b
HPN
8014
8015#include "ansidecl.h"
8016#include "system.h"
8017#ifdef HAVE_SYS_RESOURCE_H
8018#include <sys/resource.h>
8019#endif
8020
ba479fd2
NN
8021int
8022main ()
8023{
b2522d2b 8024rlim_t l = 0;
ba479fd2
NN
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext
8030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8031 (eval $ac_compile) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); } &&
8035 { ac_try='test -s conftest.$ac_objext'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
b2522d2b
HPN
8041 :
8042else
ba479fd2
NN
8043 echo "$as_me: failed program was:" >&5
8044sed 's/^/| /' conftest.$ac_ext >&5
8045
8046
8047cat >>confdefs.h <<\_ACEOF
b2522d2b 8048#define rlim_t long
ba479fd2 8049_ACEOF
b2522d2b
HPN
8050
8051fi
ba479fd2 8052rm -f conftest.$ac_objext conftest.$ac_ext
b2522d2b 8053
351df804 8054for ac_func in ldgetname
c1800ec8
ZW
8055do
8056 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8057echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8058echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8059if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8060 echo $ECHO_N "(cached) $ECHO_C" >&6
8061else
8062 cat >conftest.$ac_ext <<_ACEOF
8063#line $LINENO "configure"
8064/* confdefs.h. */
8065_ACEOF
8066cat confdefs.h >>conftest.$ac_ext
8067cat >>conftest.$ac_ext <<_ACEOF
8068/* end confdefs.h. */
c1800ec8
ZW
8069#undef $ac_tr_decl
8070#define $ac_tr_decl 1
ba479fd2 8071
351df804
KG
8072#include "ansidecl.h"
8073#include "system.h"
8074#ifdef HAVE_LDFCN_H
8075#include <ldfcn.h>
8076#endif
8077
8078
ba479fd2
NN
8079int
8080main ()
8081{
351df804
KG
8082#ifndef $ac_func
8083char *(*pfn) = (char *(*)) $ac_func ;
8084#endif
ba479fd2
NN
8085 ;
8086 return 0;
8087}
8088_ACEOF
8089rm -f conftest.$ac_objext
8090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8091 (eval $ac_compile) 2>&5
8092 ac_status=$?
8093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8094 (exit $ac_status); } &&
8095 { ac_try='test -s conftest.$ac_objext'
8096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8097 (eval $ac_try) 2>&5
8098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
351df804
KG
8101 eval "gcc_cv_have_decl_$ac_func=yes"
8102else
ba479fd2
NN
8103 echo "$as_me: failed program was:" >&5
8104sed 's/^/| /' conftest.$ac_ext >&5
8105
8106eval "gcc_cv_have_decl_$ac_func=no"
351df804 8107fi
ba479fd2 8108rm -f conftest.$ac_objext conftest.$ac_ext
351df804
KG
8109fi
8110
8111if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8112 echo "$as_me:$LINENO: result: yes" >&5
8113echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8114#define $ac_tr_decl 1
ba479fd2
NN
8115_ACEOF
8116
351df804 8117else
ba479fd2
NN
8118 echo "$as_me:$LINENO: result: no" >&5
8119echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8120#define $ac_tr_decl 0
ba479fd2
NN
8121_ACEOF
8122
351df804
KG
8123fi
8124
8125done
8126if test x = y ; then
ba479fd2
NN
8127
8128cat >>confdefs.h <<\_ACEOF
351df804 8129#define HAVE_DECL_LDGETNAME 1
ba479fd2 8130_ACEOF
351df804
KG
8131fi
8132
8133
8134for ac_func in times
8135do
8136 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ba479fd2
NN
8137echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8138echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8139if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8140 echo $ECHO_N "(cached) $ECHO_C" >&6
8141else
8142 cat >conftest.$ac_ext <<_ACEOF
8143#line $LINENO "configure"
8144/* confdefs.h. */
8145_ACEOF
8146cat confdefs.h >>conftest.$ac_ext
8147cat >>conftest.$ac_ext <<_ACEOF
8148/* end confdefs.h. */
351df804
KG
8149#undef $ac_tr_decl
8150#define $ac_tr_decl 1
ba479fd2 8151
c1800ec8
ZW
8152#include "ansidecl.h"
8153#include "system.h"
8154#ifdef HAVE_SYS_TIMES_H
8155#include <sys/times.h>
8156#endif
8157
8158
ba479fd2
NN
8159int
8160main ()
8161{
c1800ec8
ZW
8162#ifndef $ac_func
8163char *(*pfn) = (char *(*)) $ac_func ;
8164#endif
ba479fd2
NN
8165 ;
8166 return 0;
8167}
8168_ACEOF
8169rm -f conftest.$ac_objext
8170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8171 (eval $ac_compile) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); } &&
8175 { ac_try='test -s conftest.$ac_objext'
8176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8177 (eval $ac_try) 2>&5
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then
c1800ec8
ZW
8181 eval "gcc_cv_have_decl_$ac_func=yes"
8182else
ba479fd2
NN
8183 echo "$as_me: failed program was:" >&5
8184sed 's/^/| /' conftest.$ac_ext >&5
8185
8186eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 8187fi
ba479fd2 8188rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
8189fi
8190
8191if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8192 echo "$as_me:$LINENO: result: yes" >&5
8193echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8194#define $ac_tr_decl 1
ba479fd2
NN
8195_ACEOF
8196
c1800ec8 8197else
ba479fd2
NN
8198 echo "$as_me:$LINENO: result: no" >&5
8199echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8200#define $ac_tr_decl 0
ba479fd2
NN
8201_ACEOF
8202
c1800ec8
ZW
8203fi
8204
8205done
8206if test x = y ; then
ba479fd2
NN
8207
8208cat >>confdefs.h <<\_ACEOF
c1800ec8 8209#define HAVE_DECL_TIMES 1
ba479fd2 8210_ACEOF
c1800ec8
ZW
8211fi
8212
8213
8214# More time-related stuff.
ba479fd2
NN
8215echo "$as_me:$LINENO: checking for struct tms" >&5
8216echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
8217if test "${ac_cv_struct_tms+set}" = set; then
8218 echo $ECHO_N "(cached) $ECHO_C" >&6
8219else
8220
8221cat >conftest.$ac_ext <<_ACEOF
8222#line $LINENO "configure"
8223/* confdefs.h. */
8224_ACEOF
8225cat confdefs.h >>conftest.$ac_ext
8226cat >>conftest.$ac_ext <<_ACEOF
8227/* end confdefs.h. */
c1800ec8
ZW
8228
8229#include "ansidecl.h"
8230#include "system.h"
8231#ifdef HAVE_SYS_TIMES_H
8232#include <sys/times.h>
8233#endif
8234
ba479fd2
NN
8235int
8236main ()
8237{
c1800ec8 8238struct tms tms;
ba479fd2
NN
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
8244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8245 (eval $ac_compile) 2>&5
8246 ac_status=$?
8247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8248 (exit $ac_status); } &&
8249 { ac_try='test -s conftest.$ac_objext'
8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8251 (eval $ac_try) 2>&5
8252 ac_status=$?
8253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8254 (exit $ac_status); }; }; then
c1800ec8
ZW
8255 ac_cv_struct_tms=yes
8256else
ba479fd2
NN
8257 echo "$as_me: failed program was:" >&5
8258sed 's/^/| /' conftest.$ac_ext >&5
8259
8260ac_cv_struct_tms=no
c1800ec8 8261fi
ba479fd2 8262rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8263fi
ba479fd2
NN
8264echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
8265echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 8266if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
8267
8268cat >>confdefs.h <<\_ACEOF
c1800ec8 8269#define HAVE_STRUCT_TMS 1
ba479fd2 8270_ACEOF
c1800ec8
ZW
8271
8272fi
8273
8274# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
8275# revisit after autoconf 2.50.
ba479fd2
NN
8276echo "$as_me:$LINENO: checking for clock_t" >&5
8277echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
8278if test "${gcc_cv_type_clock_t+set}" = set; then
8279 echo $ECHO_N "(cached) $ECHO_C" >&6
8280else
8281
8282cat >conftest.$ac_ext <<_ACEOF
8283#line $LINENO "configure"
8284/* confdefs.h. */
8285_ACEOF
8286cat confdefs.h >>conftest.$ac_ext
8287cat >>conftest.$ac_ext <<_ACEOF
8288/* end confdefs.h. */
c1800ec8
ZW
8289
8290#include "ansidecl.h"
8291#include "system.h"
8292
ba479fd2
NN
8293int
8294main ()
8295{
c1800ec8 8296clock_t x;
ba479fd2
NN
8297 ;
8298 return 0;
8299}
8300_ACEOF
8301rm -f conftest.$ac_objext
8302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8303 (eval $ac_compile) 2>&5
8304 ac_status=$?
8305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8306 (exit $ac_status); } &&
8307 { ac_try='test -s conftest.$ac_objext'
8308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8309 (eval $ac_try) 2>&5
8310 ac_status=$?
8311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312 (exit $ac_status); }; }; then
c1800ec8
ZW
8313 gcc_cv_type_clock_t=yes
8314else
ba479fd2
NN
8315 echo "$as_me: failed program was:" >&5
8316sed 's/^/| /' conftest.$ac_ext >&5
8317
8318gcc_cv_type_clock_t=no
c1800ec8 8319fi
ba479fd2 8320rm -f conftest.$ac_objext conftest.$ac_ext
c1800ec8 8321fi
ba479fd2
NN
8322echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
8323echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 8324if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
8325
8326cat >>confdefs.h <<\_ACEOF
c1800ec8 8327#define HAVE_CLOCK_T 1
ba479fd2 8328_ACEOF
c1800ec8
ZW
8329
8330fi
8331
ba479fd2
NN
8332echo "$as_me:$LINENO: checking for uchar" >&5
8333echo $ECHO_N "checking for uchar... $ECHO_C" >&6
8334if test "${gcc_cv_type_uchar+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
a12b5bd9 8336else
ba479fd2
NN
8337 cat >conftest.$ac_ext <<_ACEOF
8338#line $LINENO "configure"
8339/* confdefs.h. */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h. */
a12b5bd9
ZW
8344
8345#include "ansidecl.h"
8346#include "system.h"
8347
ba479fd2
NN
8348int
8349main ()
8350{
a12b5bd9
ZW
8351if ((uchar *)0) return 0;
8352 if (sizeof(uchar)) return 0;
ba479fd2
NN
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
8358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8359 (eval $ac_compile) 2>&5
8360 ac_status=$?
8361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362 (exit $ac_status); } &&
8363 { ac_try='test -s conftest.$ac_objext'
8364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8365 (eval $ac_try) 2>&5
8366 ac_status=$?
8367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8368 (exit $ac_status); }; }; then
a12b5bd9
ZW
8369 ac_cv_type_uchar=yes
8370else
ba479fd2
NN
8371 echo "$as_me: failed program was:" >&5
8372sed 's/^/| /' conftest.$ac_ext >&5
8373
8374ac_cv_type_uchar=no
a12b5bd9 8375fi
ba479fd2 8376rm -f conftest.$ac_objext conftest.$ac_ext
a12b5bd9 8377fi
ba479fd2
NN
8378echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5
8379echo "${ECHO_T}$gcc_cv_type_uchar" >&6
63cf211a 8380if test $ac_cv_type_uchar = yes; then
ba479fd2
NN
8381
8382cat >>confdefs.h <<\_ACEOF
a12b5bd9 8383#define HAVE_UCHAR 1
ba479fd2 8384_ACEOF
a12b5bd9
ZW
8385
8386fi
8387
eb70d86d
AS
8388# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
8389CFLAGS="$saved_CFLAGS"
8390
07cf4226
DM
8391# Check whether --enable-initfini-array or --disable-initfini-array was given.
8392if test "${enable_initfini_array+set}" = set; then
8393 enableval="$enable_initfini_array"
ba479fd2 8394
07cf4226 8395else
ba479fd2
NN
8396
8397echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
8398echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
8399if test "${gcc_cv_initfini_array+set}" = set; then
8400 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 8401else
eb70d86d 8402 if test "$cross_compiling" = yes; then
918c4fe4 8403 gcc_cv_initfini_array=no
eb70d86d 8404else
ba479fd2
NN
8405 cat >conftest.$ac_ext <<_ACEOF
8406#line $LINENO "configure"
8407/* confdefs.h. */
8408_ACEOF
8409cat confdefs.h >>conftest.$ac_ext
8410cat >>conftest.$ac_ext <<_ACEOF
8411/* end confdefs.h. */
eb70d86d 8412
07cf4226
DM
8413static int x = -1;
8414int main (void) { return x; }
8415int foo (void) { x = 0; }
8416int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
8417_ACEOF
8418rm -f conftest$ac_exeext
8419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8420 (eval $ac_link) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
918c4fe4 8429 gcc_cv_initfini_array=yes
eb70d86d 8430else
ba479fd2
NN
8431 echo "$as_me: program exited with status $ac_status" >&5
8432echo "$as_me: failed program was:" >&5
8433sed 's/^/| /' conftest.$ac_ext >&5
8434
8435( exit $ac_status )
8436gcc_cv_initfini_array=no
eb70d86d 8437fi
a6a5e4c9 8438rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 8439fi
07cf4226 8440fi
ba479fd2
NN
8441echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
8442echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 8443 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 8444
ba479fd2 8445fi;
63cf211a 8446if test $enable_initfini_array = yes; then
ba479fd2
NN
8447
8448cat >>confdefs.h <<\_ACEOF
eb70d86d 8449#define HAVE_INITFINI_ARRAY 1
ba479fd2 8450_ACEOF
07cf4226 8451
eb70d86d 8452fi
81bf3d9e 8453
ba479fd2
NN
8454# mkdir takes a single argument on some systems.
8455echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
8456echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
8457if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
8458 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 8459else
ba479fd2
NN
8460 cat >conftest.$ac_ext <<_ACEOF
8461#line $LINENO "configure"
8462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
75923b2f
MK
8467
8468#include <sys/types.h>
8469#ifdef HAVE_SYS_STAT_H
8470# include <sys/stat.h>
8471#endif
8472#ifdef HAVE_UNISTD_H
8473# include <unistd.h>
8474#endif
8475#ifdef HAVE_DIRECT_H
8476# include <direct.h>
8477#endif
ba479fd2
NN
8478int
8479main ()
8480{
75923b2f 8481mkdir ("foo", 0);
ba479fd2
NN
8482 ;
8483 return 0;
8484}
8485_ACEOF
8486rm -f conftest.$ac_objext
8487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8488 (eval $ac_compile) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); } &&
8492 { ac_try='test -s conftest.$ac_objext'
8493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494 (eval $ac_try) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; }; then
75923b2f
MK
8498 gcc_cv_mkdir_takes_one_arg=no
8499else
ba479fd2
NN
8500 echo "$as_me: failed program was:" >&5
8501sed 's/^/| /' conftest.$ac_ext >&5
8502
8503gcc_cv_mkdir_takes_one_arg=yes
75923b2f 8504fi
ba479fd2 8505rm -f conftest.$ac_objext conftest.$ac_ext
75923b2f 8506fi
ba479fd2
NN
8507echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
8508echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 8509if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
8510
8511cat >>confdefs.h <<\_ACEOF
75923b2f 8512#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 8513_ACEOF
75923b2f
MK
8514
8515fi
8516
8517
861bb6c1
JL
8518# File extensions
8519manext='.1'
8520objext='.o'
8521
8522
8523
4977bab6
ZW
8524# With Setjmp/Longjmp based exception handling.
8525# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8526if test "${enable_sjlj_exceptions+set}" = set; then
8527 enableval="$enable_sjlj_exceptions"
8528 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 8529
ba479fd2
NN
8530cat >>confdefs.h <<_ACEOF
8531#define CONFIG_SJLJ_EXCEPTIONS $sjlj
8532_ACEOF
4977bab6 8533
ba479fd2 8534fi;
4977bab6 8535
c6c51600 8536if test x$host = x$target; then
ba479fd2
NN
8537 echo "$as_me:$LINENO: checking for main in -lunwind" >&5
8538echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
8539if test "${ac_cv_lib_unwind_main+set}" = set; then
8540 echo $ECHO_N "(cached) $ECHO_C" >&6
4977bab6 8541else
ba479fd2 8542 ac_check_lib_save_LIBS=$LIBS
4977bab6 8543LIBS="-lunwind $LIBS"
ba479fd2
NN
8544cat >conftest.$ac_ext <<_ACEOF
8545#line $LINENO "configure"
8546/* confdefs.h. */
8547_ACEOF
8548cat confdefs.h >>conftest.$ac_ext
8549cat >>conftest.$ac_ext <<_ACEOF
8550/* end confdefs.h. */
4977bab6 8551
4977bab6 8552
ba479fd2
NN
8553int
8554main ()
8555{
8556main ();
8557 ;
8558 return 0;
8559}
8560_ACEOF
8561rm -f conftest.$ac_objext conftest$ac_exeext
8562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8563 (eval $ac_link) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); } &&
8567 { ac_try='test -s conftest$ac_exeext'
8568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8569 (eval $ac_try) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); }; }; then
8573 ac_cv_lib_unwind_main=yes
8574else
8575 echo "$as_me: failed program was:" >&5
8576sed 's/^/| /' conftest.$ac_ext >&5
8577
8578ac_cv_lib_unwind_main=no
8579fi
8580rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8581LIBS=$ac_check_lib_save_LIBS
8582fi
8583echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
8584echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
8585if test $ac_cv_lib_unwind_main = yes; then
4977bab6
ZW
8586 use_libunwind_default=yes
8587else
ba479fd2 8588 use_libunwind_default=no
4977bab6
ZW
8589fi
8590
c6c51600
AS
8591else
8592 use_libunwind_default=no
8593fi
4977bab6
ZW
8594# Use libunwind based exception handling.
8595# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8596if test "${enable_libunwind_exceptions+set}" = set; then
8597 enableval="$enable_libunwind_exceptions"
8598 use_libunwind_exceptions=$enableval
8599else
8600 use_libunwind_exceptions=$use_libunwind_default
ba479fd2 8601fi;
63cf211a 8602if test x"$use_libunwind_exceptions" = xyes; then
ba479fd2
NN
8603
8604cat >>confdefs.h <<\_ACEOF
4977bab6 8605#define USE_LIBUNWIND_EXCEPTIONS 1
ba479fd2 8606_ACEOF
4977bab6
ZW
8607
8608fi
8609
34a86c2b
NN
8610# --------------------------------------------------------
8611# Build, host, and target specific configuration fragments
8612# --------------------------------------------------------
8613
5b28c537
NN
8614# Collect build-machine-specific information.
8615. ${srcdir}/config.build
8616
a89ea0df
NN
8617# Collect host-machine-specific information.
8618. ${srcdir}/config.host
8619
ef69da62 8620target_gtfiles=
a89ea0df
NN
8621
8622# Collect target-machine-specific information.
8ad9fb33 8623. ${srcdir}/config.gcc
861bb6c1
JL
8624
8625extra_objs="${host_extra_objs} ${extra_objs}"
8626
8627# Default the target-machine variables that were not explicitly set.
75bffa71 8628if test x"$tm_file" = x
861bb6c1
JL
8629then tm_file=$cpu_type/$cpu_type.h; fi
8630
6b2adea9 8631if test x"$extra_headers" = x
861bb6c1
JL
8632then extra_headers=; fi
8633
75bffa71 8634if test x$md_file = x
e98e406f 8635then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 8636
75bffa71 8637if test x$out_file = x
861bb6c1
JL
8638then out_file=$cpu_type/$cpu_type.c; fi
8639
75bffa71 8640if test x"$tmake_file" = x
861bb6c1
JL
8641then tmake_file=$cpu_type/t-$cpu_type
8642fi
8643
90e6a802 8644if test x"$dwarf2" = xyes
756ee602 8645then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
8646fi
8647
861bb6c1 8648# Say what files are being used for the output code and MD file.
11642c3a 8649echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
8650echo "Using \`$srcdir/config/$md_file' as machine description file."
8651
11642c3a 8652# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
8653# about them and drop them.
8654
11642c3a
ZW
8655bx=
8656for x in $build_xm_file; do
8657 if test -f $srcdir/config/$x
8658 then bx="$bx $x"
ba479fd2
NN
8659 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8660echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8661 fi
8662done
8663build_xm_file="$bx"
8664
8665hx=
8666for x in $host_xm_file; do
8667 if test -f $srcdir/config/$x
8668 then hx="$hx $x"
ba479fd2
NN
8669 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8670echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8671 fi
8672done
8673host_xm_file="$hx"
8674
8675tx=
8676for x in $xm_file; do
8677 if test -f $srcdir/config/$x
8678 then tx="$tx $x"
ba479fd2
NN
8679 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
8680echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
8681 fi
8682done
8683xm_file="$tx"
8684
861bb6c1
JL
8685count=a
8686for f in $tm_file; do
8687 count=${count}x
8688done
75bffa71 8689if test $count = ax; then
861bb6c1
JL
8690 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
8691else
8692 echo "Using the following target machine macro files:"
8693 for f in $tm_file; do
8694 echo " $srcdir/config/$f"
8695 done
8696fi
8697
4977bab6 8698if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
8699
8700cat >>confdefs.h <<\_ACEOF
4977bab6 8701#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 8702_ACEOF
4977bab6
ZW
8703
8704fi
8705
861bb6c1
JL
8706count=a
8707for f in $host_xm_file; do
8708 count=${count}x
8709done
11642c3a
ZW
8710if test $count = a; then
8711 :
8712elif test $count = ax; then
861bb6c1
JL
8713 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
8714else
8715 echo "Using the following host machine macro files:"
8716 for f in $host_xm_file; do
8717 echo " $srcdir/config/$f"
8718 done
8719fi
476d9098 8720echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 8721
75bffa71 8722if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
8723 count=a
8724 for f in $build_xm_file; do
8725 count=${count}x
8726 done
11642c3a
ZW
8727 if test $count = a; then
8728 :
8729 elif test $count = ax; then
861bb6c1
JL
8730 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
8731 else
8732 echo "Using the following build machine macro files:"
8733 for f in $build_xm_file; do
8734 echo " $srcdir/config/$f"
8735 done
8736 fi
8737fi
8738
c2e494a8
NN
8739# Check if a valid thread package
8740case ${enable_threads_flag} in
8741 "" | no)
8742 # No threads
8743 target_thread_file='single'
8744 ;;
8745 yes)
8746 # default
8747 target_thread_file='single'
8748 ;;
769e49eb
NN
8749 aix | dce | gnat | irix | posix | rtems | \
8750 single | solaris | vxworks | win32 )
c2e494a8
NN
8751 target_thread_file=${enable_threads_flag}
8752 ;;
8753 *)
8754 echo "${enable_threads_flag} is an unknown thread package" 1>&2
8755 exit 1
8756 ;;
8757esac
8758
8759if test x${thread_file} = x; then
8760 # No thread file set by target-specific clauses in config.gcc,
8761 # so use file chosen by default logic above
8762 thread_file=${target_thread_file}
861bb6c1
JL
8763fi
8764
2121a768
JT
8765if test x$enable___cxa_atexit = xyes || \
8766 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
ba479fd2
NN
8767
8768cat >>confdefs.h <<\_ACEOF
2121a768 8769#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 8770_ACEOF
2121a768
JT
8771
8772fi
8773
a5381466 8774# Look for a file containing extra machine modes.
1c0ca89d
ZW
8775if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
8776 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
8777
8778
8779cat >>confdefs.h <<_ACEOF
e22340b0 8780#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 8781_ACEOF
a5381466
ZW
8782
8783fi
8784
b7cb92ad 8785# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 8786# the first file included by config.h.
4977bab6 8787# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 8788# as well. If host!=build, we are in error and need to do more
db81d74a 8789# work to find out the build config parameters.
75bffa71 8790if test x$host = x$build
db81d74a 8791then
eaf4e618 8792 build_auto=auto-host.h
06f0b04c 8793 FORBUILD=..
b7cb92ad
JL
8794else
8795 # We create a subdir, then run autoconf in the subdir.
8796 # To prevent recursion we set host and build for the new
8797 # invocation of configure to the build for this invocation
ba479fd2 8798 # of configure.
b7cb92ad
JL
8799 tempdir=build.$$
8800 rm -rf $tempdir
8801 mkdir $tempdir
8802 cd $tempdir
8803 case ${srcdir} in
255b8a49 8804 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
8805 *) realsrcdir=../${srcdir};;
8806 esac
d920e825
L
8807 saved_CFLAGS="${CFLAGS}"
8808 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
8809 ${realsrcdir}/configure \
534d0cc0 8810 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 8811 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
8812
8813 # We just finished tests for the build machine, so rename
8814 # the file auto-build.h in the gcc directory.
8815 mv auto-host.h ../auto-build.h
8816 cd ..
8817 rm -rf $tempdir
eaf4e618 8818 build_auto=auto-build.h
3b1b059c 8819 FORBUILD=../${build_subdir}
db81d74a
RH
8820fi
8821
06f0b04c 8822
eaf4e618 8823tm_file="${tm_file} defaults.h"
4977bab6
ZW
8824tm_p_file="${tm_p_file} tm-preds.h"
8825host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
8826build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 8827# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
8828# put this back in temporarily.
8829xm_file="ansidecl.h ${xm_file}"
0056a9b5 8830
34a86c2b
NN
8831# --------
8832# UNSORTED
8833# --------
8834
f1943b77 8835# Get the version trigger filename from the toplevel
75bffa71 8836if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
8837 gcc_version_trigger=$with_gcc_version_trigger
8838else
8839 gcc_version_trigger=${srcdir}/version.c
8840fi
022dae81 8841gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 8842gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 8843
cc1e60ea 8844# Compile in configure arguments.
8105825d 8845if test -f configargs.h ; then
cc1e60ea 8846 # Being re-configured.
022dae81 8847 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
8848 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
8849else
8850 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
8851fi
eeae7b41
DJ
8852
8853# Double all backslashes and backslash all quotes to turn
8854# gcc_config_arguments into a C string.
8855sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
8856$gcc_config_arguments
8857EOF
8858gcc_config_arguments_str=`cat conftest.out`
8859rm -f conftest.out
8860
cc1e60ea
JM
8861cat > configargs.h <<EOF
8862/* Generated automatically. */
eeae7b41 8863static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 8864static const char thread_model[] = "$thread_file";
7816bea0
DJ
8865
8866static const struct {
8867 const char *name, *value;
8868} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
8869EOF
8870
ab87f8c8
JL
8871# Internationalization
8872PACKAGE=gcc
8873VERSION="$gcc_version"
861bb6c1 8874
ab87f8c8
JL
8875
8876
56694dd9
ZW
8877# If we haven't got the data from the intl directory,
8878# assume NLS is disabled.
ba479fd2
NN
8879USE_NLS=no
8880LIBINTL=
8881LIBINTL_DEP=
8882INCINTL=
8883XGETTEXT=
8884GMSGFMT=
8885POSUB=
56694dd9
ZW
8886if test -f ../intl/config.intl; then
8887 . ../intl/config.intl
093e61a6 8888fi
ba479fd2
NN
8889echo "$as_me:$LINENO: checking whether NLS is requested" >&5
8890echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 8891if test x"$USE_NLS" != xyes; then
ba479fd2
NN
8892 echo "$as_me:$LINENO: result: no" >&5
8893echo "${ECHO_T}no" >&6
56694dd9 8894else
ba479fd2
NN
8895 echo "$as_me:$LINENO: result: yes" >&5
8896echo "${ECHO_T}yes" >&6
8897
8898cat >>confdefs.h <<\_ACEOF
56694dd9 8899#define ENABLE_NLS 1
ba479fd2 8900_ACEOF
56694dd9 8901
093e61a6 8902
ba479fd2
NN
8903 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8904echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 8905 # Look for .po and .gmo files in the source directory.
ba479fd2 8906 CATALOGS=
56694dd9
ZW
8907 XLINGUAS=
8908 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
8909 # If there aren't any .gmo files the shell will give us the
8910 # literal string "../path/to/srcdir/po/*.gmo" which has to be
8911 # weeded out.
8912 case "$cat" in *\**)
8913 continue;;
8914 esac
8915 # The quadruple backslash is collapsed to a double backslash
8916 # by the backticks, then collapsed again by the double quotes,
8917 # leaving us with one backslash in the sed expression (right
8918 # before the dot that mustn't act as a wildcard).
8919 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
8920 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
8921 # The user is allowed to set LINGUAS to a list of languages to
8922 # install catalogs for. If it's empty that means "all of them."
8923 if test "x$LINGUAS" = x; then
8924 CATALOGS="$CATALOGS $cat"
8925 XLINGUAS="$XLINGUAS $lang"
8926 else
8927 case "$LINGUAS" in *$lang*)
8928 CATALOGS="$CATALOGS $cat"
8929 XLINGUAS="$XLINGUAS $lang"
8930 ;;
8931 esac
8932 fi
8933 done
8934 LINGUAS="$XLINGUAS"
ba479fd2
NN
8935 echo "$as_me:$LINENO: result: $LINGUAS" >&5
8936echo "${ECHO_T}$LINGUAS" >&6
56694dd9 8937fi
861bb6c1 8938
56694dd9
ZW
8939# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
8940# -liconv on the link line twice.
8941case "$LIBINTL" in *$LIBICONV*)
8942 LIBICONV= ;;
8943esac
dc6746e7 8944
56694dd9
ZW
8945# Windows32 Registry support for specifying GCC installation paths.
8946# Check whether --enable-win32-registry or --disable-win32-registry was given.
8947if test "${enable_win32_registry+set}" = set; then
8948 enableval="$enable_win32_registry"
dc6746e7 8949
ba479fd2 8950fi;
56694dd9
ZW
8951case $host_os in
8952 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
8953echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
8954echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 8955if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
8956
8957cat >>confdefs.h <<\_ACEOF
56694dd9 8958#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
8959_ACEOF
8960
8961 echo "$as_me:$LINENO: result: yes" >&5
8962echo "${ECHO_T}yes" >&6
8963 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
8964echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
8965if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
8966 echo $ECHO_N "(cached) $ECHO_C" >&6
8967else
8968 ac_func_search_save_LIBS=$LIBS
8969ac_cv_search_RegOpenKeyExA=no
8970cat >conftest.$ac_ext <<_ACEOF
8971#line $LINENO "configure"
8972/* confdefs.h. */
8973_ACEOF
8974cat confdefs.h >>conftest.$ac_ext
8975cat >>conftest.$ac_ext <<_ACEOF
8976/* end confdefs.h. */
861bb6c1 8977
ab87f8c8 8978/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
8979#ifdef __cplusplus
8980extern "C"
8981#endif
ab87f8c8 8982/* We use char because int might match the return type of a gcc2
ba479fd2
NN
8983 builtin and then its argument prototype would still apply. */
8984char RegOpenKeyExA ();
8985int
8986main ()
8987{
8988RegOpenKeyExA ();
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993rm -f conftest.$ac_objext conftest$ac_exeext
8994if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8995 (eval $ac_link) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); } &&
8999 { ac_try='test -s conftest$ac_exeext'
9000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; }; then
56694dd9 9005 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 9006else
ba479fd2
NN
9007 echo "$as_me: failed program was:" >&5
9008sed 's/^/| /' conftest.$ac_ext >&5
9009
861bb6c1 9010fi
ba479fd2
NN
9011rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9012if test "$ac_cv_search_RegOpenKeyExA" = no; then
9013 for ac_lib in advapi32; do
9014 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9015 cat >conftest.$ac_ext <<_ACEOF
9016#line $LINENO "configure"
9017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
9022
56694dd9 9023/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9024#ifdef __cplusplus
9025extern "C"
9026#endif
56694dd9 9027/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9028 builtin and then its argument prototype would still apply. */
9029char RegOpenKeyExA ();
9030int
9031main ()
9032{
9033RegOpenKeyExA ();
9034 ;
9035 return 0;
9036}
9037_ACEOF
9038rm -f conftest.$ac_objext conftest$ac_exeext
9039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9040 (eval $ac_link) 2>&5
9041 ac_status=$?
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9043 (exit $ac_status); } &&
9044 { ac_try='test -s conftest$ac_exeext'
9045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9046 (eval $ac_try) 2>&5
9047 ac_status=$?
9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9049 (exit $ac_status); }; }; then
9050 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 9051break
861bb6c1 9052else
ba479fd2
NN
9053 echo "$as_me: failed program was:" >&5
9054sed 's/^/| /' conftest.$ac_ext >&5
9055
861bb6c1 9056fi
ba479fd2
NN
9057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9058 done
6e3f3080 9059fi
ba479fd2
NN
9060LIBS=$ac_func_search_save_LIBS
9061fi
9062echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
9063echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
9064if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 9065 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 9066
ab87f8c8 9067fi
ba479fd2 9068
cafe096b 9069else
ba479fd2
NN
9070 echo "$as_me:$LINENO: result: no" >&5
9071echo "${ECHO_T}no" >&6
093e61a6 9072fi
ab87f8c8 9073
56694dd9
ZW
9074# Check if user specified a different registry key.
9075case "x${enable_win32_registry}" in
9076x | xyes)
9077 # default.
9078 gcc_cv_win32_registry_key="$VERSION"
9079 ;;
9080xno)
9081 # no registry lookup.
9082 gcc_cv_win32_registry_key=''
9083 ;;
9084*)
9085 # user-specified key.
9086 gcc_cv_win32_registry_key="$enable_win32_registry"
9087 ;;
9088esac
ab87f8c8 9089
56694dd9 9090if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9091 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
9092echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
9093
9094cat >>confdefs.h <<_ACEOF
56694dd9 9095#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 9096_ACEOF
cafe096b 9097
ba479fd2
NN
9098 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
9099echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 9100fi
56694dd9
ZW
9101;;
9102esac
ab87f8c8 9103
56694dd9
ZW
9104# Get an absolute path to the GCC top-level source directory
9105holddir=`${PWDCMD-pwd}`
9106cd $srcdir
9107topdir=`${PWDCMD-pwd}`
9108cd $holddir
ab87f8c8 9109
56694dd9 9110# Conditionalize the makefile for this host machine.
2ed26f6b 9111xmake_file=
c406e779 9112for f in ${host_xmake_file}
56694dd9
ZW
9113do
9114 if test -f ${srcdir}/config/$f
9115 then
2ed26f6b 9116 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
9117 fi
9118done
093e61a6 9119
56694dd9 9120# Conditionalize the makefile for this target machine.
2ed26f6b 9121tmake_file_=
c406e779 9122for f in ${tmake_file}
56694dd9
ZW
9123do
9124 if test -f ${srcdir}/config/$f
9125 then
2ed26f6b 9126 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
9127 fi
9128done
2ed26f6b 9129tmake_file="${tmake_file_}"
71a94577 9130
56694dd9 9131symbolic_link='ln -s'
34a86c2b 9132
ab87f8c8
JL
9133# If the host doesn't support symlinks, modify CC in
9134# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
9135# Otherwise, we can use "CC=$(CC)".
9136rm -f symtest.tem
9137if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
9138then
9139 cc_set_by_configure="\$(CC)"
5aa82ace 9140 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8 9141 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
596151e1 9142 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
ab87f8c8
JL
9143else
9144 rm -f symtest.tem
9145 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
9146 then
9147 symbolic_link="cp -p"
9148 else
9149 symbolic_link="cp"
9150 fi
9151 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 9152 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8 9153 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
596151e1 9154 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
9155fi
9156rm -f symtest.tem
9157
9158out_object_file=`basename $out_file .c`.o
9159
9160tm_file_list=
e22340b0 9161tm_include_list=
ab87f8c8 9162for f in $tm_file; do
64ccbc99 9163 case $f in
d02af173 9164 defaults.h )
e22340b0
ZW
9165 tm_file_list="${tm_file_list} \$(srcdir)/$f"
9166 tm_include_list="${tm_include_list} $f"
9167 ;;
9168 * )
9169 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
9170 tm_include_list="${tm_include_list} config/$f"
9171 ;;
64ccbc99 9172 esac
ab87f8c8
JL
9173done
9174
11642c3a 9175tm_p_file_list=
e22340b0 9176tm_p_include_list=
11642c3a 9177for f in $tm_p_file; do
4977bab6
ZW
9178 case $f in
9179 tm-preds.h )
e22340b0
ZW
9180 tm_p_file_list="${tm_p_file_list} $f"
9181 tm_p_include_list="${tm_p_include_list} $f"
9182 ;;
9183 * )
9184 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
9185 tm_p_include_list="${tm_p_include_list} config/$f"
9186 esac
9187done
9188
9189xm_file_list=
9190xm_include_list=
9191for f in $xm_file; do
9192 case $f in
9193 ansidecl.h )
9194 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
9195 xm_include_list="${xm_include_list} $f"
9196 ;;
9197 auto-host.h )
9198 xm_file_list="${xm_file_list} $f"
9199 xm_include_list="${xm_include_list} $f"
9200 ;;
9201 * )
9202 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
9203 xm_include_list="${xm_include_list} config/$f"
9204 ;;
4977bab6 9205 esac
11642c3a
ZW
9206done
9207
ab87f8c8 9208host_xm_file_list=
e22340b0 9209host_xm_include_list=
ab87f8c8 9210for f in $host_xm_file; do
64ccbc99 9211 case $f in
d02af173 9212 ansidecl.h )
e22340b0
ZW
9213 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
9214 host_xm_include_list="${host_xm_include_list} $f"
9215 ;;
e2500fed 9216 auto-host.h )
e22340b0
ZW
9217 host_xm_file_list="${host_xm_file_list} $f"
9218 host_xm_include_list="${host_xm_include_list} $f"
9219 ;;
9220 * )
9221 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
9222 host_xm_include_list="${host_xm_include_list} config/$f"
9223 ;;
64ccbc99 9224 esac
ab87f8c8
JL
9225done
9226
9227build_xm_file_list=
9228for f in $build_xm_file; do
64ccbc99 9229 case $f in
d02af173 9230 ansidecl.h )
e22340b0
ZW
9231 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
9232 build_xm_include_list="${build_xm_include_list} $f"
9233 ;;
e2500fed 9234 auto-build.h | auto-host.h )
e22340b0
ZW
9235 build_xm_file_list="${build_xm_file_list} $f"
9236 build_xm_include_list="${build_xm_include_list} $f"
9237 ;;
9238 * )
9239 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
9240 build_xm_include_list="${build_xm_include_list} config/$f"
9241 ;;
64ccbc99 9242 esac
ab87f8c8
JL
9243done
9244
a078a589
ZW
9245# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
9246# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
9247CROSS=
9248ALL=all.internal
9249SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9250if test x$host != x$target
9251then
a078a589
ZW
9252 CROSS="-DCROSS_COMPILE"
9253 ALL=all.cross
9254 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 9255 case "$host","$target" in
3a7e8b87
GK
9256 # Darwin crosses can use the host system's libraries and headers,
9257 # because of the fat library support. Of course, it must be the
9258 # same version of Darwin on both sides. Allow the user to
9259 # just say --target=foo-darwin without a version number to mean
9260 # "the version on this system".
9261 *-*-darwin*,*-*-darwin*)
9262 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
9263 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
9264 if test $hostos = $targetos -o $targetos = darwin ; then
9265 CROSS=
9266 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
9267 with_headers=yes
9268 fi
9269 ;;
9270
343f59d9
AM
9271 i?86-*-*,x86_64-*-* \
9272 | powerpc*-*-*,powerpc64*-*-*)
9273 CROSS="$CROSS -DNATIVE_CROSS" ;;
9274 esac
7a615b25
AO
9275elif test "x$TARGET_SYSTEM_ROOT" != x; then
9276 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
9277 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9278fi
9279
b39d221a
EC
9280# If this is a cross-compiler that does not
9281# have its own set of headers then define
9282# inhibit_libc
9283
dc06db20
R
9284# If this is using newlib, without having the headers available now,
9285# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
9286# This prevents libgcc2 from containing any code which requires libc
9287# support.
b39d221a 9288inhibit_libc=
dc06db20
R
9289if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
9290 test x$with_newlib = xyes ; } &&
e50084fa 9291 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 9292 inhibit_libc=-Dinhibit_libc
b39d221a
EC
9293fi
9294
9295
a078a589
ZW
9296# When building gcc with a cross-compiler, we need to adjust things so
9297# that the generator programs are still built with the native compiler.
9298# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
9299
9300# These are the normal (build=host) settings:
ba479fd2
NN
9301BUILD_PREFIX=
9302BUILD_PREFIX_1=ignore-
9303CC_FOR_BUILD='$(CC)'
9304BUILD_CFLAGS='$(ALL_CFLAGS)'
a078a589 9305
ba479fd2 9306STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
9307
9308# Possibly disable fixproto, on a per-target basis.
9309case ${use_fixproto} in
9310 no)
9311 STMP_FIXPROTO=
9312 ;;
9313 yes)
9314 STMP_FIXPROTO=stmp-fixproto
9315 ;;
9316esac
9317
a078a589 9318
83599948
NS
9319# And these apply if build != host, or we are generating coverage data
9320if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 9321then
5c35940c
NN
9322 BUILD_PREFIX=build-
9323 BUILD_PREFIX_1=build-
b11e4747 9324 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 9325
7a615b25
AO
9326 if test "x$TARGET_SYSTEM_ROOT" = x; then
9327 STMP_FIXINC=
9328 STMP_FIXPROTO=
9329 fi
ab87f8c8
JL
9330fi
9331
9332# Expand extra_headers to include complete path.
9333# This substitutes for lots of t-* files.
9334extra_headers_list=
b1ef58c8
NN
9335# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
9336for file in ${extra_headers} ; do
9337 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
9338done
ab87f8c8 9339
ab87f8c8 9340# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
9341case $use_collect2 in
9342 no) use_collect2= ;;
9343 "") ;;
ba479fd2 9344 *)
34a86c2b
NN
9345 host_xm_defines="${host_xm_defines} USE_COLLECT2"
9346 xm_defines="${xm_defines} USE_COLLECT2"
9347 ;;
9348esac
ab87f8c8 9349
d869a8c4
NN
9350# Identify the assembler which will work hand-in-glove with the newly
9351# built GCC, so that we can examine its features. This is the assembler
9352# which will be driven by the driver program.
9353#
9354# If build != host, and we aren't building gas in-tree, we identify a
9355# build->target assembler and hope that it will have the same features
9356# as the host->target assembler we'll be using.
ba479fd2
NN
9357echo "$as_me:$LINENO: checking what assembler to use" >&5
9358echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 9359in_tree_gas=no
ab87f8c8 9360gcc_cv_as=
981d4858
JM
9361gcc_cv_gas_major_version=
9362gcc_cv_gas_minor_version=
ab87f8c8
JL
9363gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
9364if test -x "$DEFAULT_ASSEMBLER"; then
9365 gcc_cv_as="$DEFAULT_ASSEMBLER"
9366elif test -x "$AS"; then
9367 gcc_cv_as="$AS"
9368elif test -x as$host_exeext; then
9369 # Build using assembler in the current directory.
9370 gcc_cv_as=./as$host_exeext
34a86c2b
NN
9371elif test -f $gcc_cv_as_gas_srcdir/configure.in \
9372 && test -f ../gas/Makefile; then
ad9c4d9f
NN
9373 # Single tree build which includes gas.
9374 in_tree_gas=yes
9375 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9376for f in $gcc_cv_as_bfd_srcdir/configure \
9377 $gcc_cv_as_gas_srcdir/configure \
9378 $gcc_cv_as_gas_srcdir/configure.in \
9379 $gcc_cv_as_gas_srcdir/Makefile.in ; do
9380 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9381 if test x$gcc_cv_gas_version != x; then
9382 break
9383 fi
9384done
9385gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
9386gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
9387gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
9388case $gcc_cv_gas_patch_version in
9389 "") gcc_cv_gas_patch_version="0" ;;
9390esac
8ada417f
ZW
9391gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
9392 + $gcc_cv_gas_minor_version \) \* 1000 \
9393 + $gcc_cv_gas_patch_version`
ad9c4d9f 9394
f9c1196a
ZW
9395 rm -f as$host_exeext
9396 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5408ac6c
HPN
9397 in_tree_gas_is_elf=no
9398 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
9399 || (grep 'obj_format = multi' ../gas/Makefile \
9400 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
9401 then
9402 in_tree_gas_is_elf=yes
9403 fi
981d4858 9404fi
9e423e6d 9405
534d0cc0 9406if test "x$gcc_cv_as" = x; then
779243f7
JL
9407 # Search the same directories that the installed compiler will
9408 # search. Else we may find the wrong assembler and lose. If we
9409 # do not find a suitable assembler binary, then try the user's
9410 # path.
9411 #
9412 # Also note we have to check MD_EXEC_PREFIX before checking the
9413 # user's path. Unfortunately, there is no good way to get at the
9414 # value of MD_EXEC_PREFIX here. So we do a brute force search
9415 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9416 # to be fixed as part of the make/configure rewrite too.
9417
9418 if test "x$exec_prefix" = xNONE; then
9419 if test "x$prefix" = xNONE; then
9420 test_prefix=/usr/local
9421 else
9422 test_prefix=$prefix
9423 fi
9424 else
9425 test_prefix=$exec_prefix
9426 fi
9427
9428 # If the loop below does not find an assembler, then use whatever
9429 # one we can find in the users's path.
9430 # user's path.
55a2ea2a
AM
9431 if test "x$program_prefix" != xNONE; then
9432 gcc_cv_as=${program_prefix}as$host_exeext
9433 else
9434 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
9435 fi
9436
caa55b1e
NN
9437 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9438 $test_prefix/lib/gcc-lib/$target_noncanonical \
9439 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9440 /usr/lib/gcc/$target_noncanonical \
9441 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9442 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9443
9444 if test x$host = x$target; then
9445 test_dirs="$test_dirs \
779243f7
JL
9446 /usr/libexec \
9447 /usr/ccs/gcc \
9448 /usr/ccs/bin \
9449 /udk/usr/ccs/bin \
9450 /bsd43/usr/lib/cmplrs/cc \
9451 /usr/cross64/usr/bin \
9452 /usr/lib/cmplrs/cc \
9453 /sysv/usr/lib/cmplrs/cc \
9454 /svr4/usr/lib/cmplrs/cc \
9455 /usr/bin"
55a2ea2a 9456 fi
779243f7
JL
9457
9458 for dir in $test_dirs; do
55a2ea2a 9459 if test -x $dir/as$host_exeext; then
779243f7
JL
9460 gcc_cv_as=$dir/as$host_exeext
9461 break;
9462 fi
9463 done
9e423e6d 9464fi
34a86c2b
NN
9465case $in_tree_gas in
9466 yes)
ba479fd2
NN
9467 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
9468echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
9469 ;;
9470 no)
ba479fd2
NN
9471 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
9472echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
9473 ;;
9474esac
981d4858 9475
d869a8c4
NN
9476# Identify the linker which will work hand-in-glove with the newly
9477# built GCC, so that we can examine its features. This is the linker
9478# which will be driven by the driver program.
9479#
9480# If build != host, and we aren't building gas in-tree, we identify a
9481# build->target linker and hope that it will have the same features
9482# as the host->target linker we'll be using.
ba479fd2
NN
9483echo "$as_me:$LINENO: checking what linker to use" >&5
9484echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 9485in_tree_ld=no
275b60d6
JJ
9486gcc_cv_ld=
9487gcc_cv_gld_major_version=
9488gcc_cv_gld_minor_version=
9489gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
9490gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9491if test -x "$DEFAULT_LINKER"; then
9492 gcc_cv_ld="$DEFAULT_LINKER"
9493elif test -x "$LD"; then
9494 gcc_cv_ld="$LD"
f9c1196a 9495elif test -x collect-ld$host_exeext; then
275b60d6 9496 # Build using linker in the current directory.
f9c1196a 9497 gcc_cv_ld=./collect-ld$host_exeext
34a86c2b
NN
9498elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
9499 && test -f ../ld/Makefile; then
275b60d6 9500 # Single tree build which includes ld.
34a86c2b 9501 in_tree_ld=yes
5408ac6c
HPN
9502 in_tree_ld_is_elf=no
9503 if (grep 'EMUL = .*elf' ../ld/Makefile \
9504 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
9505 in_tree_ld_is_elf=yes
9506 fi
275b60d6
JJ
9507 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
9508 do
9509 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9510 if test x$gcc_cv_gld_version != x; then
9511 break
9512 fi
9513 done
9514 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
9515 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f9c1196a
ZW
9516 rm -f collect-ld$host_exeext
9517 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
9518 2>/dev/null
275b60d6
JJ
9519fi
9520
534d0cc0 9521if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
9522 # Search the same directories that the installed compiler will
9523 # search. Else we may find the wrong linker and lose. If we
9524 # do not find a suitable linker binary, then try the user's
9525 # path.
9526 #
9527 # Also note we have to check MD_EXEC_PREFIX before checking the
9528 # user's path. Unfortunately, there is no good way to get at the
9529 # value of MD_EXEC_PREFIX here. So we do a brute force search
9530 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9531 # to be fixed as part of the make/configure rewrite too.
9532
9533 if test "x$exec_prefix" = xNONE; then
9534 if test "x$prefix" = xNONE; then
9535 test_prefix=/usr/local
9536 else
9537 test_prefix=$prefix
9538 fi
9539 else
9540 test_prefix=$exec_prefix
9541 fi
9542
9543 # If the loop below does not find an linker, then use whatever
9544 # one we can find in the users's path.
9545 # user's path.
55a2ea2a
AM
9546 if test "x$program_prefix" != xNONE; then
9547 gcc_cv_ld=${program_prefix}ld$host_exeext
9548 else
9549 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
9550 fi
9551
caa55b1e
NN
9552 test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
9553 $test_prefix/lib/gcc-lib/$target_noncanonical \
9554 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9555 /usr/lib/gcc/$target_noncanonical \
9556 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9557 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9558
9559 if test x$host = x$target; then
9560 test_dirs="$test_dirs \
275b60d6
JJ
9561 /usr/libexec \
9562 /usr/ccs/gcc \
9563 /usr/ccs/bin \
9564 /udk/usr/ccs/bin \
9565 /bsd43/usr/lib/cmplrs/cc \
9566 /usr/cross64/usr/bin \
9567 /usr/lib/cmplrs/cc \
9568 /sysv/usr/lib/cmplrs/cc \
9569 /svr4/usr/lib/cmplrs/cc \
9570 /usr/bin"
55a2ea2a 9571 fi
275b60d6
JJ
9572
9573 for dir in $test_dirs; do
55a2ea2a 9574 if test -x $dir/ld$host_exeext; then
275b60d6
JJ
9575 gcc_cv_ld=$dir/ld$host_exeext
9576 break;
9577 fi
9578 done
9579fi
34a86c2b
NN
9580case $in_tree_ld in
9581 yes)
ba479fd2
NN
9582 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
9583echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
9584 ;;
9585 no)
ba479fd2
NN
9586 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
9587echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
9588 ;;
9589esac
275b60d6 9590
981d4858 9591# Figure out what nm we will be using.
f9c1196a 9592gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
9593echo "$as_me:$LINENO: checking what nm to use" >&5
9594echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 9595in_tree_nm=no
981d4858
JM
9596if test -x nm$host_exeext; then
9597 gcc_cv_nm=./nm$host_exeext
f9c1196a
ZW
9598elif test -f $gcc_cv_binutils_srcdir/configure.in \
9599 && test -f ../binutils/Makefile; then
9600 # Single tree build which includes binutils.
9601 in_tree_nm=yes
9602 gcc_cv_nm=./nm$host_exeext
9603 rm -f nm$host_exeext
9604 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
534d0cc0
AM
9605elif test "x$program_prefix" != xNONE; then
9606 gcc_cv_nm=${program_prefix}nm$host_exeext
9607else
9608 gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
981d4858 9609fi
f9c1196a 9610case $in_tree_nm in
ba479fd2
NN
9611 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
9612echo "${ECHO_T}\"newly built nm\"" >&6 ;;
9613 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
9614echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 9615esac
981d4858 9616
3cae5780 9617# Figure out what objdump we will be using.
ba479fd2
NN
9618echo "$as_me:$LINENO: checking what objdump to use" >&5
9619echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 9620in_tree_objdump=no
3cae5780
AS
9621if test -x objdump$host_exeext; then
9622 gcc_cv_objdump=./objdump$host_exeext
f9c1196a
ZW
9623elif test -f $gcc_cv_binutils_srcdir/configure.in \
9624 && test -f ../binutils/Makefile; then
9625 # Single tree build which includes binutils.
9626 in_tree_objdump=yes
9627 gcc_cv_objdump=./objdump$host_exeext
9628 rm -f objdump$host_exeext
9629 $symbolic_link ../binutils/objdump$host_exeext \
9630 objdump$host_exeext 2>/dev/null
534d0cc0
AM
9631elif test "x$program_prefix" != xNONE; then
9632 gcc_cv_objdump=${program_prefix}objdump$host_exeext
9633else
f9c1196a
ZW
9634 gcc_cv_objdump=`echo objdump | \
9635 sed ${program_transform_name}`$host_exeext
3cae5780 9636fi
f9c1196a 9637case $in_tree_objdump in
ba479fd2
NN
9638 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
9639echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
9640 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
9641echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 9642esac
3cae5780 9643
981d4858 9644# Figure out what assembler alignment features are present.
ba479fd2
NN
9645echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
9646echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
9647if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
9648 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9649else
9650 gcc_cv_as_balign_and_p2align=no
9651 if test $in_tree_gas = yes; then
9652 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
9653 then gcc_cv_as_balign_and_p2align=yes
9654fi
9655 elif test x$gcc_cv_as != x; then
6e3f3080 9656 echo '.balign 4
8ada417f 9657.p2align 2' > conftest.s
ba479fd2
NN
9658 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9660 (eval $ac_try) 2>&5
9661 ac_status=$?
9662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9663 (exit $ac_status); }; }
8ada417f
ZW
9664 then
9665 gcc_cv_as_balign_and_p2align=yes
9666 else
9667 echo "configure: failed program was" >&5
9668 cat conftest.s >&5
9669 fi
9670 rm -f conftest.o conftest.s
9671 fi
9672fi
ba479fd2
NN
9673echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
9674echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 9675if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
9676
9677cat >>confdefs.h <<\_ACEOF
981d4858 9678#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 9679_ACEOF
981d4858 9680
ad9c4d9f
NN
9681fi
9682
ba479fd2
NN
9683echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
9684echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
9685if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
9686 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9687else
9688 gcc_cv_as_max_skip_p2align=no
9689 if test $in_tree_gas = yes; then
9690 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
9691 then gcc_cv_as_max_skip_p2align=yes
9692fi
9693 elif test x$gcc_cv_as != x; then
6e3f3080 9694 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
9695 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9697 (eval $ac_try) 2>&5
9698 ac_status=$?
9699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9700 (exit $ac_status); }; }
8ada417f
ZW
9701 then
9702 gcc_cv_as_max_skip_p2align=yes
9703 else
9704 echo "configure: failed program was" >&5
9705 cat conftest.s >&5
9706 fi
9707 rm -f conftest.o conftest.s
9708 fi
ad9c4d9f 9709fi
ba479fd2
NN
9710echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
9711echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 9712if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
9713
9714cat >>confdefs.h <<\_ACEOF
9e423e6d 9715#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 9716_ACEOF
9e423e6d 9717
9e423e6d 9718fi
ad9c4d9f 9719
ba479fd2
NN
9720echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
9721echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
9722if test "${gcc_cv_as_subsection_m1+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9724else
9725 gcc_cv_as_subsection_m1=no
9726 if test $in_tree_gas = yes; then
9727 if test $in_tree_gas_is_elf = yes \
9728 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
9729 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 9730fi
8ada417f 9731 elif test x$gcc_cv_as != x; then
6e3f3080 9732 echo 'conftest_label1: .word 0
d1accaa3
JJ
9733.subsection -1
9734conftest_label2: .word 0
8ada417f 9735.previous' > conftest.s
ba479fd2
NN
9736 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738 (eval $ac_try) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); }; }
8ada417f
ZW
9742 then
9743 if test x$gcc_cv_nm != x; then
9744 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
9745 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
9746 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
9747 then :
9748 else gcc_cv_as_subsection_m1=yes
9749 fi
9750 rm -f conftest.nm1 conftest.nm2
9751 fi
9752 else
9753 echo "configure: failed program was" >&5
9754 cat conftest.s >&5
9755 fi
9756 rm -f conftest.o conftest.s
9757 fi
981d4858 9758fi
ba479fd2
NN
9759echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
9760echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 9761if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
9762
9763cat >>confdefs.h <<\_ACEOF
981d4858 9764#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 9765_ACEOF
981d4858 9766
d1accaa3 9767fi
ad9c4d9f 9768
ba479fd2
NN
9769echo "$as_me:$LINENO: checking assembler for .weak" >&5
9770echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
9771if test "${gcc_cv_as_weak+set}" = set; then
9772 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9773else
9774 gcc_cv_as_weak=no
9775 if test $in_tree_gas = yes; then
9776 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
9777 then gcc_cv_as_weak=yes
ad9c4d9f 9778fi
8ada417f 9779 elif test x$gcc_cv_as != x; then
6e3f3080 9780 echo ' .weak foobar' > conftest.s
ba479fd2
NN
9781 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9783 (eval $ac_try) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); }; }
8ada417f
ZW
9787 then
9788 gcc_cv_as_weak=yes
9789 else
9790 echo "configure: failed program was" >&5
9791 cat conftest.s >&5
9792 fi
9793 rm -f conftest.o conftest.s
9794 fi
981d4858 9795fi
ba479fd2
NN
9796echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
9797echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 9798if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
9799
9800cat >>confdefs.h <<\_ACEOF
981d4858 9801#define HAVE_GAS_WEAK 1
ba479fd2 9802_ACEOF
981d4858 9803
12822146 9804fi
ad9c4d9f 9805
8ada417f
ZW
9806# .hidden needs to be supported in both the assembler and the linker,
9807# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
9808# This is irritatingly difficult to feature test for; we have to check the
9809# date string after the version number. If we've got an in-tree
9810# ld, we don't know its patchlevel version, so we set the baseline at 2.13
9811# to be safe.
9812# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
9813echo "$as_me:$LINENO: checking assembler for .hidden" >&5
9814echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
9815if test "${gcc_cv_as_hidden+set}" = set; then
9816 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9817else
9818 gcc_cv_as_hidden=no
9819 if test $in_tree_gas = yes; then
9820 if test $in_tree_gas_is_elf = yes \
9821 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
9822 then gcc_cv_as_hidden=yes
9823fi
9824 elif test x$gcc_cv_as != x; then
6e3f3080 9825 echo ' .hidden foobar
8ada417f 9826foobar:' > conftest.s
ba479fd2
NN
9827 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9829 (eval $ac_try) 2>&5
9830 ac_status=$?
9831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832 (exit $ac_status); }; }
8ada417f
ZW
9833 then
9834 gcc_cv_as_hidden=yes
9835 else
9836 echo "configure: failed program was" >&5
9837 cat conftest.s >&5
9838 fi
9839 rm -f conftest.o conftest.s
9840 fi
9841fi
ba479fd2
NN
9842echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
9843echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 9844
ad9c4d9f 9845
ba479fd2
NN
9846echo "$as_me:$LINENO: checking linker for .hidden support" >&5
9847echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
9848if test "${gcc_cv_ld_hidden+set}" = set; then
9849 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9850else
9851 if test $in_tree_ld = yes ; then
9852 gcc_cv_ld_hidden=no
9853 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 \
9854 && test $in_tree_ld_is_elf = yes; then
9855 gcc_cv_ld_hidden=yes
9856 fi
9857else
9858 gcc_cv_ld_hidden=yes
bace148a 9859 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
9860 if echo "$ld_ver" | grep GNU > /dev/null; then
9861 ld_vers=`echo $ld_ver | sed -n \
9862 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9863 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9864 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
9865 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9866 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
9867 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
9868 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'`
9869 if test 0"$ld_date" -lt 20020404; then
9870 if test -n "$ld_date"; then
9871 # If there was date string, but was earlier than 2002-04-04, fail
9872 gcc_cv_ld_hidden=no
9873 elif test -z "$ld_vers"; then
9874 # If there was no date string nor ld version number, something is wrong
9875 gcc_cv_ld_hidden=no
9876 else
9877 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
9878 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
9879 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9880 test -z "$ld_vers_patch" && ld_vers_patch=0
9881 if test "$ld_vers_major" -lt 2; then
9882 gcc_cv_ld_hidden=no
9883 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
9884 gcc_cv_ld_hidden="no"
9885 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
9886 gcc_cv_ld_hidden=no
c72931a6 9887 fi
8ada417f 9888 fi
789b7de5 9889 fi
8ada417f 9890 else
28690784 9891 case "${target}" in
b0fd7d27 9892 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
9893 gcc_cv_ld_hidden=yes
9894 ;;
9895 *)
9896 gcc_cv_ld_hidden=no
9897 ;;
9898 esac
8ada417f
ZW
9899 fi
9900fi
6d07784a 9901fi
ba479fd2
NN
9902echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
9903echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 9904libgcc_visibility=no
ad9c4d9f 9905
8e3940b2 9906if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 9907 libgcc_visibility=yes
ba479fd2
NN
9908
9909cat >>confdefs.h <<\_ACEOF
8ada417f 9910#define HAVE_GAS_HIDDEN 1
ba479fd2 9911_ACEOF
ad9c4d9f
NN
9912
9913fi
9914
8ada417f 9915# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
9916echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
9917echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
9918if test "${gcc_cv_as_leb128+set}" = set; then
9919 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9920else
9921 gcc_cv_as_leb128=no
9922 if test $in_tree_gas = yes; then
9923 if test $in_tree_gas_is_elf = yes \
9924 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
9925 then gcc_cv_as_leb128=yes
9926fi
9927 elif test x$gcc_cv_as != x; then
6e3f3080 9928 echo ' .data
b7460f24
RH
9929 .uleb128 L2 - L1
9930L1:
9931 .uleb128 1280
9932 .sleb128 -1010
8ada417f 9933L2:' > conftest.s
ba479fd2
NN
9934 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
9935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9936 (eval $ac_try) 2>&5
9937 ac_status=$?
9938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9939 (exit $ac_status); }; }
8ada417f
ZW
9940 then
9941 # GAS versions before 2.11 do not support uleb128,
9942 # despite appearing to.
9943 # ??? There exists an elf-specific test that will crash
9944 # the assembler. Perhaps it's better to figure out whether
9945 # arbitrary sections are supported and try the test.
bace148a 9946 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
9947 if echo "$as_ver" | grep GNU > /dev/null; then
9948 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
9949 as_major=`echo $as_ver | sed 's/\..*//'`
9950 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
9951 if test $as_major -eq 2 && test $as_minor -lt 11
9952 then :
9953 else gcc_cv_as_leb128=yes
9954 fi
9955 fi
9956 else
9957 echo "configure: failed program was" >&5
9958 cat conftest.s >&5
9959 fi
9960 rm -f conftest.o conftest.s
9961 fi
b7460f24 9962fi
ba479fd2
NN
9963echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
9964echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 9965if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
9966
9967cat >>confdefs.h <<\_ACEOF
b7460f24 9968#define HAVE_AS_LEB128 1
ba479fd2 9969_ACEOF
b7460f24
RH
9970
9971fi
ad9c4d9f 9972
8ada417f
ZW
9973# GAS versions up to and including 2.11.0 may mis-optimize
9974# .eh_frame data.
ba479fd2
NN
9975echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
9976echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
9977if test "${gcc_cv_as_eh_frame+set}" = set; then
9978 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
9979else
9980 gcc_cv_as_eh_frame=no
9981 if test $in_tree_gas = yes; then
9982 if test $in_tree_gas_is_elf = yes \
9983 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
9984 then gcc_cv_as_eh_frame=yes
ad9c4d9f 9985fi
8ada417f 9986 elif test x$gcc_cv_as != x; then
6e3f3080 9987 echo ' .text
c64688ae
RH
9988.LFB1:
9989 .4byte 0
9990.L1:
9991 .4byte 0
9992.LFE1:
9993 .section .eh_frame,"aw",@progbits
9994__FRAME_BEGIN__:
9995 .4byte .LECIE1-.LSCIE1
9996.LSCIE1:
9997 .4byte 0x0
9998 .byte 0x1
9999 .ascii "z\0"
10000 .byte 0x1
10001 .byte 0x78
10002 .byte 0x1a
10003 .byte 0x0
10004 .byte 0x4
10005 .4byte 1
10006 .p2align 1
10007.LECIE1:
10008.LSFDE1:
10009 .4byte .LEFDE1-.LASFDE1
10010.LASFDE1:
10011 .4byte .LASFDE1-__FRAME_BEGIN__
10012 .4byte .LFB1
10013 .4byte .LFE1-.LFB1
10014 .byte 0x4
10015 .4byte .LFE1-.LFB1
10016 .byte 0x4
10017 .4byte .L1-.LFB1
8ada417f 10018.LEFDE1:' > conftest.s
ba479fd2
NN
10019 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10021 (eval $ac_try) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); }; }
8ada417f
ZW
10025 then
10026 cat > conftest.lit <<EOF
c64688ae
RH
10027 0000 10000000 00000000 017a0001 781a0004 .........z..x...
10028 0010 01000000 12000000 18000000 00000000 ................
093e61a6 10029 0020 08000000 04080000 0044 .........D
01efb963 10030EOF
ba479fd2 10031cat > conftest.big <<EOF
01efb963
AS
10032 0000 00000010 00000000 017a0001 781a0004 .........z..x...
10033 0010 00000001 00000012 00000018 00000000 ................
093e61a6 10034 0020 00000008 04000000 0844 .........D
c64688ae 10035EOF
8ada417f
ZW
10036 # If the assembler didn't choke, and we can objdump,
10037 # and we got the correct data, then succeed.
10038 if test x$gcc_cv_objdump != x \
10039 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
10040 | tail -3 > conftest.got \
10041 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
10042 || cmp conftest.big conftest.got > /dev/null 2>&1; }
10043 then
10044 gcc_cv_as_eh_frame=yes
ba479fd2
NN
10045 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
10046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10047 (eval $ac_try) 2>&5
10048 ac_status=$?
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); }; }; then
8ada417f
ZW
10051 gcc_cv_as_eh_frame=buggy
10052 else
10053 # Uh oh, what do we do now?
10054 gcc_cv_as_eh_frame=no
10055 fi
10056 else
10057 echo "configure: failed program was" >&5
10058 cat conftest.s >&5
10059 fi
10060 rm -f conftest.o conftest.s
10061 fi
c64688ae 10062fi
ba479fd2
NN
10063echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
10064echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 10065
6e3f3080 10066
63cf211a 10067if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
10068
10069cat >>confdefs.h <<\_ACEOF
8ada417f 10070#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 10071_ACEOF
ad9c4d9f
NN
10072
10073fi
10074
ba479fd2
NN
10075echo "$as_me:$LINENO: checking assembler for section merging support" >&5
10076echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
10077if test "${gcc_cv_as_shf_merge+set}" = set; then
10078 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10079else
10080 gcc_cv_as_shf_merge=no
10081 if test $in_tree_gas = yes; then
10082 if test $in_tree_gas_is_elf = yes \
10083 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10084 then gcc_cv_as_shf_merge=yes
10085fi
10086 elif test x$gcc_cv_as != x; then
6e3f3080 10087 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
10088 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }
8ada417f
ZW
10094 then
10095 gcc_cv_as_shf_merge=yes
10096 else
10097 echo "configure: failed program was" >&5
10098 cat conftest.s >&5
10099 fi
10100 rm -f conftest.o conftest.s
10101 fi
201556f0 10102fi
ba479fd2
NN
10103echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
10104echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 10105
8ad9fb33 10106
ba479fd2 10107cat >>confdefs.h <<_ACEOF
8ad9fb33 10108#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 10109_ACEOF
201556f0 10110
201556f0 10111
8ada417f 10112# Thread-local storage - the check is heavily parametrized.
f996902d
RH
10113conftest_s=
10114tls_first_major=
10115tls_first_minor=
9739c90c 10116tls_as_opt=
f996902d 10117case "$target" in
6f9b006d
RH
10118 alpha*-*-*)
10119 conftest_s='
10120 .section ".tdata","awT",@progbits
10121foo: .long 25
10122 .text
10123 ldq $27,__tls_get_addr($29) !literal!1
10124 lda $16,foo($29) !tlsgd!1
10125 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
10126 ldq $27,__tls_get_addr($29) !literal!2
10127 lda $16,foo($29) !tlsldm!2
10128 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
10129 ldq $1,foo($29) !gotdtprel
10130 ldah $2,foo($29) !dtprelhi
10131 lda $3,foo($2) !dtprello
10132 lda $4,foo($29) !dtprel
10133 ldq $1,foo($29) !gottprel
10134 ldah $2,foo($29) !tprelhi
10135 lda $3,foo($2) !tprello
10136 lda $4,foo($29) !tprel'
10137 tls_first_major=2
10138 tls_first_minor=13
2f3321ca 10139 tls_as_opt=--fatal-warnings
6f9b006d 10140 ;;
f996902d
RH
10141 i[34567]86-*-*)
10142 conftest_s='
10143 .section ".tdata","awT",@progbits
10144foo: .long 25
10145 .text
10146 movl %gs:0, %eax
10147 leal foo@TLSGD(,%ebx,1), %eax
10148 leal foo@TLSLDM(%ebx), %eax
10149 leal foo@DTPOFF(%eax), %edx
10150 movl foo@GOTTPOFF(%ebx), %eax
10151 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
10152 addl foo@GOTNTPOFF(%ebx), %eax
10153 movl foo@INDNTPOFF, %eax
f996902d
RH
10154 movl $foo@TPOFF, %eax
10155 subl $foo@TPOFF, %eax
10156 leal foo@NTPOFF(%ecx), %eax'
10157 tls_first_major=2
75d38379 10158 tls_first_minor=14
2f3321ca 10159 tls_as_opt=--fatal-warnings
75d38379
JJ
10160 ;;
10161 x86_64-*-*)
10162 conftest_s='
10163 .section ".tdata","awT",@progbits
10164foo: .long 25
10165 .text
10166 movq %fs:0, %rax
10167 leaq foo@TLSGD(%rip), %rdi
10168 leaq foo@TLSLD(%rip), %rdi
10169 leaq foo@DTPOFF(%rax), %rdx
10170 movq foo@GOTTPOFF(%rip), %rax
10171 movq $foo@TPOFF, %rax'
10172 tls_first_major=2
10173 tls_first_minor=14
2f3321ca 10174 tls_as_opt=--fatal-warnings
f996902d 10175 ;;
7b6e506e
RH
10176 ia64-*-*)
10177 conftest_s='
10178 .section ".tdata","awT",@progbits
10179foo: data8 25
10180 .text
10181 addl r16 = @ltoff(@dtpmod(foo#)), gp
10182 addl r17 = @ltoff(@dtprel(foo#)), gp
10183 addl r18 = @ltoff(@tprel(foo#)), gp
10184 addl r19 = @dtprel(foo#), gp
10185 adds r21 = @dtprel(foo#), r13
10186 movl r23 = @dtprel(foo#)
10187 addl r20 = @tprel(foo#), gp
10188 adds r22 = @tprel(foo#), r13
10189 movl r24 = @tprel(foo#)'
10190 tls_first_major=2
10191 tls_first_minor=13
2f3321ca 10192 tls_as_opt=--fatal-warnings
7b6e506e 10193 ;;
c4501e62
JJ
10194 powerpc-*-*)
10195 conftest_s='
10196 .section ".tdata","awT",@progbits
10197 .align 2
10198ld0: .space 4
10199ld1: .space 4
10200x1: .space 4
10201x2: .space 4
10202x3: .space 4
10203 .text
10204 addi 3,31,ld0@got@tlsgd
10205 bl __tls_get_addr
10206 addi 3,31,x1@got@tlsld
10207 bl __tls_get_addr
10208 addi 9,3,x1@dtprel
10209 addis 9,3,x2@dtprel@ha
10210 addi 9,9,x2@dtprel@l
10211 lwz 9,x3@got@tprel(31)
10212 add 9,9,x@tls
10213 addi 9,2,x1@tprel
10214 addis 9,2,x2@tprel@ha
10215 addi 9,9,x2@tprel@l'
10216 tls_first_major=2
10217 tls_first_minor=14
2f3321ca 10218 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
10219 ;;
10220 powerpc64-*-*)
10221 conftest_s='
10222 .section ".tdata","awT",@progbits
10223 .align 3
10224ld0: .space 8
10225ld1: .space 8
10226x1: .space 8
10227x2: .space 8
10228x3: .space 8
10229 .text
10230 addi 3,2,ld0@got@tlsgd
10231 bl .__tls_get_addr
10232 nop
10233 addi 3,2,ld1@toc
10234 bl .__tls_get_addr
10235 nop
10236 addi 3,2,x1@got@tlsld
10237 bl .__tls_get_addr
10238 nop
10239 addi 9,3,x1@dtprel
10240 bl .__tls_get_addr
10241 nop
10242 addis 9,3,x2@dtprel@ha
10243 addi 9,9,x2@dtprel@l
10244 bl .__tls_get_addr
10245 nop
10246 ld 9,x3@got@dtprel(2)
10247 add 9,9,3
10248 bl .__tls_get_addr
10249 nop'
10250 tls_first_major=2
10251 tls_first_minor=14
2f3321ca 10252 tls_as_opt="-a64 --fatal-warnings"
c4501e62 10253 ;;
fd3cd001
UW
10254 s390-*-*)
10255 conftest_s='
10256 .section ".tdata","awT",@progbits
10257foo: .long 25
10258 .text
10259 .long foo@TLSGD
10260 .long foo@TLSLDM
10261 .long foo@DTPOFF
10262 .long foo@NTPOFF
10263 .long foo@GOTNTPOFF
10264 .long foo@INDNTPOFF
10265 l %r1,foo@GOTNTPOFF(%r12)
10266 l %r1,0(%r1):tls_load:foo
10267 bas %r14,0(%r1,%r13):tls_gdcall:foo
10268 bas %r14,0(%r1,%r13):tls_ldcall:foo'
10269 tls_first_major=2
10270 tls_first_minor=14
2f3321ca 10271 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
10272 ;;
10273 s390x-*-*)
10274 conftest_s='
10275 .section ".tdata","awT",@progbits
10276foo: .long 25
10277 .text
10278 .quad foo@TLSGD
10279 .quad foo@TLSLDM
10280 .quad foo@DTPOFF
10281 .quad foo@NTPOFF
10282 .quad foo@GOTNTPOFF
10283 lg %r1,foo@GOTNTPOFF(%r12)
10284 larl %r1,foo@INDNTPOFF
10285 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
10286 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
10287 tls_first_major=2
10288 tls_first_minor=14
2f3321ca 10289 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 10290 ;;
9ff13962
KK
10291 sh-*-* | sh[34]-*-*)
10292 conftest_s='
10293 .section ".tdata","awT",@progbits
10294foo: .long 25
10295 .text
10296 .long foo@TLSGD
10297 .long foo@TLSLDM
10298 .long foo@DTPOFF
10299 .long foo@GOTTPOFF
10300 .long foo@TPOFF'
10301 tls_first_major=2
10302 tls_first_minor=13
2f3321ca 10303 tls_as_opt=--fatal-warnings
9ff13962 10304 ;;
5751a10b 10305 sparc*-*-*)
2f3321ca
EB
10306 case "$target" in
10307 sparc*-sun-solaris2.*)
10308 on_solaris=yes
10309 ;;
10310 *)
10311 on_solaris=no
10312 ;;
10313 esac
10314 if test x$on_solaris = xyes && test x$gas_flag = xno; then
10315 conftest_s='
10316 .section ".tdata",#alloc,#write,#tls
10317foo: .long 25
10318 .text
10319 sethi %tgd_hi22(foo), %o0
10320 add %o0, %tgd_lo10(foo), %o1
10321 add %l7, %o1, %o0, %tgd_add(foo)
10322 call __tls_get_addr, %tgd_call(foo)
10323 sethi %tldm_hi22(foo), %l1
10324 add %l1, %tldm_lo10(foo), %l2
10325 add %l7, %l2, %o0, %tldm_add(foo)
10326 call __tls_get_addr, %tldm_call(foo)
10327 sethi %tldo_hix22(foo), %l3
10328 xor %l3, %tldo_lox10(foo), %l4
10329 add %o0, %l4, %l5, %tldo_add(foo)
10330 sethi %tie_hi22(foo), %o3
10331 add %o3, %tie_lo10(foo), %o3
10332 ld [%l7 + %o3], %o2, %tie_ld(foo)
10333 add %g7, %o2, %o4, %tie_add(foo)
10334 sethi %tle_hix22(foo), %l1
10335 xor %l1, %tle_lox10(foo), %o5
10336 ld [%g7 + %o5], %o1'
10337 tls_first_major=0
10338 tls_first_minor=0
10339 else
10340 conftest_s='
5751a10b
JJ
10341 .section ".tdata","awT",@progbits
10342foo: .long 25
10343 .text
10344 sethi %tgd_hi22(foo), %o0
10345 add %o0, %tgd_lo10(foo), %o1
10346 add %l7, %o1, %o0, %tgd_add(foo)
10347 call __tls_get_addr, %tgd_call(foo)
10348 sethi %tldm_hi22(foo), %l1
10349 add %l1, %tldm_lo10(foo), %l2
10350 add %l7, %l2, %o0, %tldm_add(foo)
10351 call __tls_get_addr, %tldm_call(foo)
10352 sethi %tldo_hix22(foo), %l3
10353 xor %l3, %tldo_lox10(foo), %l4
10354 add %o0, %l4, %l5, %tldo_add(foo)
10355 sethi %tie_hi22(foo), %o3
10356 add %o3, %tie_lo10(foo), %o3
10357 ld [%l7 + %o3], %o2, %tie_ld(foo)
10358 add %g7, %o2, %o4, %tie_add(foo)
10359 sethi %tle_hix22(foo), %l1
10360 xor %l1, %tle_lox10(foo), %o5
10361 ld [%g7 + %o5], %o1'
10362 tls_first_major=2
10363 tls_first_minor=14
2f3321ca
EB
10364 tls_as_opt="-32 --fatal-warnings"
10365 fi
5751a10b 10366 ;;
f996902d
RH
10367esac
10368if test -z "$tls_first_major"; then
8ada417f
ZW
10369 : # If we don't have a check, assume no support.
10370else
ba479fd2
NN
10371 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
10372echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
10373if test "${gcc_cv_as_tls+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10375else
10376 gcc_cv_as_tls=no
10377 if test $in_tree_gas = yes; then
10378 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
10379 then gcc_cv_as_tls=yes
ad9c4d9f 10380fi
8ada417f 10381 elif test x$gcc_cv_as != x; then
6e3f3080 10382 echo "$conftest_s" > conftest.s
2f3321ca 10383 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
10384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10385 (eval $ac_try) 2>&5
10386 ac_status=$?
10387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10388 (exit $ac_status); }; }
8ada417f
ZW
10389 then
10390 gcc_cv_as_tls=yes
10391 else
10392 echo "configure: failed program was" >&5
10393 cat conftest.s >&5
10394 fi
10395 rm -f conftest.o conftest.s
f996902d 10396 fi
f996902d 10397fi
ba479fd2
NN
10398echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
10399echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 10400if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
10401
10402cat >>confdefs.h <<\_ACEOF
f996902d 10403#define HAVE_AS_TLS 1
ba479fd2 10404_ACEOF
f996902d
RH
10405
10406fi
8ada417f
ZW
10407fi
10408
10409# Target-specific assembler checks.
f996902d 10410
3a37b08e
RH
10411case "$target" in
10412 # All TARGET_ABI_OSF targets.
10413 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
10414 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10415echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10416if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
10417 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 10418else
8ada417f
ZW
10419 gcc_cv_as_alpha_explicit_relocs=no
10420 if test $in_tree_gas = yes; then
10421 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10422 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 10423fi
8ada417f 10424 elif test x$gcc_cv_as != x; then
6e3f3080 10425 echo ' .set nomacro
3a37b08e
RH
10426 .text
10427 extbl $3, $2, $3 !lituse_bytoff!1
10428 ldq $2, a($29) !literal!1
10429 ldq $4, b($29) !literal!2
10430 ldq_u $3, 0($2) !lituse_base!1
10431 ldq $27, f($29) !literal!5
10432 jsr $26, ($27), f !lituse_jsr!5
10433 ldah $29, 0($26) !gpdisp!3
10434 lda $0, c($29) !gprel
10435 ldah $1, d($29) !gprelhigh
10436 lda $1, d($1) !gprellow
8ada417f 10437 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
10438 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10440 (eval $ac_try) 2>&5
10441 ac_status=$?
10442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443 (exit $ac_status); }; }
8ada417f
ZW
10444 then
10445 gcc_cv_as_alpha_explicit_relocs=yes
10446 else
10447 echo "configure: failed program was" >&5
10448 cat conftest.s >&5
10449 fi
10450 rm -f conftest.o conftest.s
10451 fi
cafe096b 10452fi
ba479fd2
NN
10453echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
10454echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 10455if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
10456
10457cat >>confdefs.h <<\_ACEOF
3a37b08e 10458#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 10459_ACEOF
3a37b08e 10460
8ada417f 10461fi
3a37b08e 10462 ;;
8ada417f 10463
1cb36a98 10464 sparc*-*-*)
ba479fd2
NN
10465 echo "$as_me:$LINENO: checking assembler for .register" >&5
10466echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
10467if test "${gcc_cv_as_sparc_register_op+set}" = set; then
10468 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10469else
8ada417f
ZW
10470 gcc_cv_as_sparc_register_op=no
10471 if test x$gcc_cv_as != x; then
6e3f3080 10472 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
10473 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10475 (eval $ac_try) 2>&5
10476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); }; }
8ada417f
ZW
10479 then
10480 gcc_cv_as_sparc_register_op=yes
10481 else
10482 echo "configure: failed program was" >&5
10483 cat conftest.s >&5
10484 fi
10485 rm -f conftest.o conftest.s
10486 fi
cafe096b 10487fi
ba479fd2
NN
10488echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
10489echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 10490if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
10491
10492cat >>confdefs.h <<\_ACEOF
1cb36a98 10493#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 10494_ACEOF
1cb36a98 10495
8ada417f 10496fi
1cb36a98 10497
ba479fd2
NN
10498 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
10499echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
10500if test "${gcc_cv_as_sparc_relax+set}" = set; then
10501 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 10502else
8ada417f
ZW
10503 gcc_cv_as_sparc_relax=no
10504 if test x$gcc_cv_as != x; then
6e3f3080 10505 echo '.text' > conftest.s
ba479fd2
NN
10506 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
10507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10508 (eval $ac_try) 2>&5
10509 ac_status=$?
10510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10511 (exit $ac_status); }; }
8ada417f
ZW
10512 then
10513 gcc_cv_as_sparc_relax=yes
10514 else
10515 echo "configure: failed program was" >&5
10516 cat conftest.s >&5
10517 fi
10518 rm -f conftest.o conftest.s
10519 fi
cafe096b 10520fi
ba479fd2
NN
10521echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
10522echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 10523if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
10524
10525cat >>confdefs.h <<\_ACEOF
e95b1e6a 10526#define HAVE_AS_RELAX_OPTION 1
ba479fd2 10527_ACEOF
e95b1e6a 10528
8ada417f 10529fi
e95b1e6a 10530
ba479fd2
NN
10531 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
10532echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
10533if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
10534 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 10535else
8ada417f
ZW
10536 gcc_cv_as_sparc_ua_pcrel=no
10537 if test x$gcc_cv_as != x; then
6e3f3080 10538 echo '.text
8ada417f
ZW
10539foo:
10540 nop
10541.data
10542.align 4
10543.byte 0
10544.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
10545 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10547 (eval $ac_try) 2>&5
10548 ac_status=$?
10549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10550 (exit $ac_status); }; }
8ada417f
ZW
10551 then
10552 if test x$gcc_cv_ld != x \
10553 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
10554 gcc_cv_as_sparc_ua_pcrel=yes
10555 fi
10556 rm -f conftest
10557 else
10558 echo "configure: failed program was" >&5
10559 cat conftest.s >&5
10560 fi
10561 rm -f conftest.o conftest.s
10562 fi
cafe096b 10563fi
ba479fd2
NN
10564echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
10565echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 10566if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
10567
10568cat >>confdefs.h <<\_ACEOF
17e9e88c 10569#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 10570_ACEOF
17e9e88c 10571
17e9e88c 10572
ba479fd2
NN
10573 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
10574echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
10575if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
10576 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 10577else
8ada417f
ZW
10578 gcc_cv_as_sparc_ua_pcrel_hidden=no
10579 if test x$gcc_cv_as != x; then
6e3f3080 10580 echo '.data
8ada417f
ZW
10581.align 4
10582.byte 0x31
10583.uaword %r_disp32(foo)
10584.byte 0x32, 0x33, 0x34
10585.global foo
10586.hidden foo
10587foo:
10588.skip 4' > conftest.s
ba479fd2
NN
10589 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
10590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10591 (eval $ac_try) 2>&5
10592 ac_status=$?
10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594 (exit $ac_status); }; }
8ada417f
ZW
10595 then
10596 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
10597 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
10598 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
10599 | grep ' 31000000 07323334' > /dev/null 2>&1; then
10600 if $gcc_cv_objdump -R conftest 2> /dev/null \
10601 | grep 'DISP32' > /dev/null 2>&1; then
10602 :
10603 else
10604 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 10605 fi
8ada417f
ZW
10606 fi
10607 rm -f conftest
10608 else
10609 echo "configure: failed program was" >&5
10610 cat conftest.s >&5
10611 fi
10612 rm -f conftest.o conftest.s
10613 fi
cafe096b 10614fi
ba479fd2
NN
10615echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
10616echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 10617if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
10618
10619cat >>confdefs.h <<\_ACEOF
cf7b8b0d 10620#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 10621_ACEOF
cf7b8b0d 10622
8ada417f 10623fi
ba479fd2 10624
8ada417f 10625fi # unaligned pcrel relocs
cf7b8b0d 10626
ba479fd2
NN
10627 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
10628echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
10629if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
10630 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 10631else
8ada417f
ZW
10632 gcc_cv_as_sparc_offsetable_lo10=no
10633 if test x$gcc_cv_as != x; then
6e3f3080 10634 echo '.text
8ada417f
ZW
10635 or %g1, %lo(ab) + 12, %g1
10636 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
10637 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
10638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10639 (eval $ac_try) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); }; }
8ada417f
ZW
10643 then
10644 if test x$gcc_cv_objdump != x \
10645 && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
10646 | grep ' 82106000 82106000' > /dev/null 2>&1; then
10647 gcc_cv_as_offsetable_lo10=yes
10648 fi
10649 else
10650 echo "configure: failed program was" >&5
10651 cat conftest.s >&5
10652 fi
10653 rm -f conftest.o conftest.s
10654 fi
cafe096b 10655fi
ba479fd2
NN
10656echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
10657echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 10658if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
10659
10660cat >>confdefs.h <<\_ACEOF
1cb36a98 10661#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 10662_ACEOF
1cb36a98 10663
8ada417f 10664fi
1cb36a98
RH
10665 ;;
10666
c307e6dd 10667 i[34567]86-*-* | x86_64-*-*)
ba479fd2
NN
10668 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
10669echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
10670if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
10671 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10672else
10673 gcc_cv_as_ix86_filds_fists=no
10674 if test $in_tree_gas = yes; then
10675 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
10676 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 10677fi
8ada417f 10678 elif test x$gcc_cv_as != x; then
6e3f3080 10679 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
10680 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10682 (eval $ac_try) 2>&5
10683 ac_status=$?
10684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685 (exit $ac_status); }; }
8ada417f
ZW
10686 then
10687 gcc_cv_as_ix86_filds_fists=yes
10688 else
10689 echo "configure: failed program was" >&5
10690 cat conftest.s >&5
981d4858 10691 fi
8ada417f
ZW
10692 rm -f conftest.o conftest.s
10693 fi
10694fi
ba479fd2
NN
10695echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
10696echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 10697if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
10698
10699cat >>confdefs.h <<\_ACEOF
8ada417f 10700#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 10701_ACEOF
ad9c4d9f 10702
f6f5dff2
RO
10703fi
10704
ba479fd2
NN
10705 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
10706echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
10707if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
10708 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
10709else
10710 gcc_cv_as_ix86_cmov_sun_syntax=no
10711 if test x$gcc_cv_as != x; then
6e3f3080 10712 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
10713 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10715 (eval $ac_try) 2>&5
10716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); }; }
f6f5dff2
RO
10719 then
10720 gcc_cv_as_ix86_cmov_sun_syntax=yes
10721 else
10722 echo "configure: failed program was" >&5
10723 cat conftest.s >&5
10724 fi
10725 rm -f conftest.o conftest.s
10726 fi
10727fi
ba479fd2
NN
10728echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
10729echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 10730if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
10731
10732cat >>confdefs.h <<\_ACEOF
f6f5dff2 10733#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 10734_ACEOF
f6f5dff2 10735
ad9c4d9f
NN
10736fi
10737
6f3ca281
ZW
10738 # This one is used unconditionally by i386.[ch]; it is to be defined
10739 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
10740 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
10741echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
10742if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
10743 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10744else
10745 gcc_cv_as_ix86_gotoff_in_data=no
10746 if test $in_tree_gas = yes; then
10747 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10748 then gcc_cv_as_ix86_gotoff_in_data=yes
10749fi
10750 elif test x$gcc_cv_as != x; then
6e3f3080 10751 echo ' .text
f88c65f7
RH
10752.L0:
10753 nop
10754 .data
8ada417f 10755 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
10756 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10758 (eval $ac_try) 2>&5
10759 ac_status=$?
10760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10761 (exit $ac_status); }; }
8ada417f
ZW
10762 then
10763 gcc_cv_as_ix86_gotoff_in_data=yes
10764 else
10765 echo "configure: failed program was" >&5
10766 cat conftest.s >&5
f88c65f7 10767 fi
8ada417f
ZW
10768 rm -f conftest.o conftest.s
10769 fi
10770fi
ba479fd2
NN
10771echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
10772echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 10773
6f3ca281 10774
ba479fd2 10775cat >>confdefs.h <<_ACEOF
6f3ca281 10776#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 10777_ACEOF
f88c65f7 10778
1cb36a98 10779 ;;
ef1ecf87
RH
10780
10781 ia64*-*-*)
ba479fd2
NN
10782 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
10783echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
10784if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
10785 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 10786else
8ada417f
ZW
10787 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
10788 if test $in_tree_gas = yes; then
10789 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10790 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 10791fi
8ada417f 10792 elif test x$gcc_cv_as != x; then
6e3f3080 10793 echo ' .text
ef1ecf87
RH
10794 addl r15 = @ltoffx(x#), gp
10795 ;;
cfa9ee99 10796 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
10797 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10799 (eval $ac_try) 2>&5
10800 ac_status=$?
10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10802 (exit $ac_status); }; }
8ada417f 10803 then
cfa9ee99 10804 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
10805 else
10806 echo "configure: failed program was" >&5
10807 cat conftest.s >&5
2c4a9cff 10808 fi
8ada417f
ZW
10809 rm -f conftest.o conftest.s
10810 fi
10811fi
ba479fd2
NN
10812echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
10813echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 10814if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
10815
10816cat >>confdefs.h <<\_ACEOF
cfa9ee99 10817#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 10818_ACEOF
8ada417f 10819
cfa9ee99 10820fi
8ada417f 10821
2c4a9cff 10822 ;;
8ada417f 10823
2c4a9cff 10824 powerpc*-*-*)
8ada417f
ZW
10825 case $target in
10826 *-*-aix) conftest_s=' .csect .textPR';;
10827 *) conftest_s=' .text';;
10828 esac
10829 conftest_s="$conftest_s
10830 mfcr 3,128"
10831
ba479fd2
NN
10832 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
10833echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
10834if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
10835 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 10836else
8ada417f
ZW
10837 gcc_cv_as_powerpc_mfcrf=no
10838 if test $in_tree_gas = yes; then
10839 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10840 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 10841fi
8ada417f 10842 elif test x$gcc_cv_as != x; then
6e3f3080 10843 echo "$conftest_s" > conftest.s
ba479fd2
NN
10844 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10846 (eval $ac_try) 2>&5
10847 ac_status=$?
10848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10849 (exit $ac_status); }; }
8ada417f
ZW
10850 then
10851 gcc_cv_as_powerpc_mfcrf=yes
10852 else
10853 echo "configure: failed program was" >&5
10854 cat conftest.s >&5
10855 fi
10856 rm -f conftest.o conftest.s
10857 fi
2c4a9cff 10858fi
ba479fd2
NN
10859echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
10860echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 10861if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
10862
10863cat >>confdefs.h <<\_ACEOF
2c4a9cff 10864#define HAVE_AS_MFCRF 1
ba479fd2 10865_ACEOF
ef1ecf87 10866
8ada417f
ZW
10867fi
10868 ;;
10869
10870 mips*-*-*)
ba479fd2
NN
10871 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10872echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10873if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
10874 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10875else
10876 gcc_cv_as_mips_explicit_relocs=no
10877 if test $in_tree_gas = yes; then
10878 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
10879 then gcc_cv_as_mips_explicit_relocs=yes
10880fi
10881 elif test x$gcc_cv_as != x; then
6e3f3080 10882 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
10883 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10885 (eval $ac_try) 2>&5
10886 ac_status=$?
10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888 (exit $ac_status); }; }
8ada417f
ZW
10889 then
10890 gcc_cv_as_mips_explicit_relocs=yes
10891 else
10892 echo "configure: failed program was" >&5
10893 cat conftest.s >&5
ef1ecf87 10894 fi
8ada417f
ZW
10895 rm -f conftest.o conftest.s
10896 fi
10897fi
ba479fd2
NN
10898echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
10899echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
10900if test $gcc_cv_as_mips_explicit_relocs = yes; then
10901 if test x$target_cpu_default = x
10902 then target_cpu_default=MASK_EXPLICIT_RELOCS
10903 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
10904 fi
10905fi
10906
ef1ecf87 10907 ;;
1cb36a98 10908esac
9d147085
RH
10909# ??? Not all targets support dwarf2 debug_line, even within a version
10910# of gas. Moreover, we need to emit a valid instruction to trigger any
10911# info to the output file. So, as supported targets are added to gas 2.11,
10912# add some instruction here to (also) show we expect this might work.
10913# ??? Once 2.11 is released, probably need to add first known working
10914# version to the per-target configury.
10915case "$target" in
80486e06 10916 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 10917 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 10918 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
10919 insn="nop"
10920 ;;
10921 ia64*-*-*)
10922 insn="nop 0"
10923 ;;
2853bc5a
HPN
10924 mmix-*-*)
10925 insn="swym 0"
10926 ;;
8ada417f
ZW
10927esac
10928if test x"$insn" != x; then
10929 conftest_s="\
10930 .file 1 \"conftest.s\"
10931 .loc 1 3 0
10932 $insn"
ba479fd2
NN
10933 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
10934echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
10935if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
10936 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10937else
10938 gcc_cv_as_dwarf2_debug_line=no
10939 if test $in_tree_gas = yes; then
10940 if test $in_tree_gas_is_elf = yes \
10941 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10942 then gcc_cv_as_dwarf2_debug_line=yes
10943fi
10944 elif test x$gcc_cv_as != x; then
6e3f3080 10945 echo "$conftest_s" > conftest.s
ba479fd2
NN
10946 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10948 (eval $ac_try) 2>&5
10949 ac_status=$?
10950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951 (exit $ac_status); }; }
8ada417f
ZW
10952 then
10953 # ??? This fails with non-gnu grep. Maybe use objdump?
10954 if grep debug_line conftest.o > /dev/null 2>&1; then
10955 gcc_cv_as_dwarf2_debug_line=yes
10956 fi
10957 else
10958 echo "configure: failed program was" >&5
10959 cat conftest.s >&5
10960 fi
10961 rm -f conftest.o conftest.s
10962 fi
10963fi
ba479fd2
NN
10964echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
10965echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 10966
ad9c4d9f 10967
8ada417f
ZW
10968# The .debug_line file table must be in the exact order that
10969# we specified the files, since these indices are also used
10970# by DW_AT_decl_file. Approximate this test by testing if
10971# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
10972 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
10973echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
10974if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
10975 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10976else
10977 gcc_cv_as_dwarf2_file_buggy=no
10978 if test x$gcc_cv_as != x; then
6e3f3080 10979 echo ' .file 1 "foo.s"
8ada417f 10980 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
10981 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10983 (eval $ac_try) 2>&5
10984 ac_status=$?
10985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986 (exit $ac_status); }; }
8ada417f
ZW
10987 then
10988 gcc_cv_as_dwarf2_file_buggy=yes
10989 else
10990 echo "configure: failed program was" >&5
10991 cat conftest.s >&5
10992 fi
10993 rm -f conftest.o conftest.s
10994 fi
ad9c4d9f 10995fi
ba479fd2
NN
10996echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
10997echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
10998
10999
11000 if test $gcc_cv_as_dwarf2_debug_line = yes \
11001 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
11002
11003cat >>confdefs.h <<\_ACEOF
9d147085 11004#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 11005_ACEOF
9d147085 11006
8ada417f 11007 fi
ad9c4d9f 11008
ba479fd2
NN
11009 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
11010echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
11011if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11013else
11014 gcc_cv_as_gdwarf2_flag=no
11015 if test $in_tree_gas = yes; then
11016 if test $in_tree_gas_is_elf = yes \
11017 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11018 then gcc_cv_as_gdwarf2_flag=yes
11019fi
11020 elif test x$gcc_cv_as != x; then
6e3f3080 11021 echo "$insn" > conftest.s
ba479fd2
NN
11022 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
11023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11024 (eval $ac_try) 2>&5
11025 ac_status=$?
11026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11027 (exit $ac_status); }; }
8ada417f
ZW
11028 then
11029 gcc_cv_as_gdwarf2_flag=yes
11030 else
11031 echo "configure: failed program was" >&5
11032 cat conftest.s >&5
11033 fi
11034 rm -f conftest.o conftest.s
11035 fi
ad9c4d9f 11036fi
ba479fd2
NN
11037echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
11038echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 11039if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
11040
11041cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11042#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 11043_ACEOF
5f0e9ea2
GK
11044
11045fi
ad9c4d9f 11046
ba479fd2
NN
11047 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
11048echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
11049if test "${gcc_cv_as_gstabs_flag+set}" = set; then
11050 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11051else
11052 gcc_cv_as_gstabs_flag=no
11053 if test $in_tree_gas = yes; then
11054 if test $in_tree_gas_is_elf = yes \
11055 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11056 then gcc_cv_as_gstabs_flag=yes
11057fi
11058 elif test x$gcc_cv_as != x; then
6e3f3080 11059 echo "$insn" > conftest.s
ba479fd2
NN
11060 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
11061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11062 (eval $ac_try) 2>&5
11063 ac_status=$?
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065 (exit $ac_status); }; }
8ada417f
ZW
11066 then
11067 # The native Solaris 9/Intel assembler doesn't understand --gstabs
11068 # and warns about it, but still exits successfully. So check for
11069 # this.
ba479fd2
NN
11070 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
11071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075 (exit $ac_status); }; }
8ada417f
ZW
11076 then :
11077 else gcc_cv_as_gstabs_flag=yes
11078 fi
11079 else
11080 echo "configure: failed program was" >&5
11081 cat conftest.s >&5
11082 fi
11083 rm -f conftest.o conftest.s
11084 fi
ad9c4d9f 11085fi
ba479fd2
NN
11086echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
11087echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 11088if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
11089
11090cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11091#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 11092_ACEOF
5f0e9ea2
GK
11093
11094fi
8ada417f 11095fi
5f0e9ea2 11096
ba479fd2
NN
11097echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
11098echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 11099gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 11100if test $in_tree_ld = yes ; then
5408ac6c
HPN
11101 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 \
11102 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
11103 gcc_cv_ld_ro_rw_mix=read-write
11104 fi
11105elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
11106 echo '.section myfoosect, "a"' > conftest1.s
11107 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 11108 echo '.byte 1' >> conftest2.s
90e145da 11109 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 11110 echo '.byte 0' >> conftest3.s
6cd656d0
KC
11111 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
11112 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
11113 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 11114 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 11115 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 11116 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 11117 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
11118 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
11119 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
11120 gcc_cv_ld_ro_rw_mix=read-only
11121 else
11122 gcc_cv_ld_ro_rw_mix=read-write
11123 fi
11124 fi
11125 fi
11126 rm -f conftest.* conftest[123].*
11127fi
11128if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
11129
11130cat >>confdefs.h <<\_ACEOF
96d0f4dc 11131#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 11132_ACEOF
96d0f4dc
JJ
11133
11134fi
ba479fd2
NN
11135echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
11136echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 11137
ba479fd2
NN
11138echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
11139echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 11140gcc_cv_ld_eh_frame_hdr=no
34a86c2b 11141if test $in_tree_ld = yes ; then
5408ac6c
HPN
11142 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 \
11143 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
11144 gcc_cv_ld_eh_frame_hdr=yes
11145 fi
11146elif test x$gcc_cv_ld != x; then
11147 # Check if linker supports --eh-frame-hdr option
11148 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
11149 gcc_cv_ld_eh_frame_hdr=yes
11150 fi
11151fi
11152if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
11153
11154cat >>confdefs.h <<\_ACEOF
275b60d6 11155#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 11156_ACEOF
275b60d6
JJ
11157
11158fi
ba479fd2
NN
11159echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
11160echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 11161
ba479fd2
NN
11162echo "$as_me:$LINENO: checking linker position independent executable support" >&5
11163echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
11164gcc_cv_ld_pie=no
11165if test $in_tree_ld = yes ; then
5408ac6c
HPN
11166 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 \
11167 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
11168 gcc_cv_ld_pie=yes
11169 fi
11170elif test x$gcc_cv_ld != x; then
11171 # Check if linker supports -pie option
11172 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
11173 gcc_cv_ld_pie=yes
11174 fi
11175fi
11176if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
11177
11178cat >>confdefs.h <<\_ACEOF
24a4dd31 11179#define HAVE_LD_PIE 1
ba479fd2 11180_ACEOF
24a4dd31
JJ
11181
11182fi
ba479fd2
NN
11183echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
11184echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 11185
9fb28a67 11186if test x$with_sysroot = x && test x$host = x$target \
047d636f 11187 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
11188
11189cat >>confdefs.h <<_ACEOF
793e9558 11190#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 11191_ACEOF
793e9558
PB
11192
11193fi
11194
861bb6c1 11195# Figure out what language subdirectories are present.
71205e0b
MH
11196# Look if the user specified --enable-languages="..."; if not, use
11197# the environment variable $LANGUAGES if defined. $LANGUAGES might
11198# go away some day.
cc9a08e0 11199# NB: embedded tabs in this IF block -- do not untabify
71205e0b
MH
11200if test x"${enable_languages+set}" != xset; then
11201 if test x"${LANGUAGES+set}" = xset; then
cc9a08e0 11202 enable_languages="${LANGUAGES}"
ba479fd2
NN
11203 { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5
11204echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;}
cc9a08e0 11205
71205e0b
MH
11206 else
11207 enable_languages=all
11208 fi
d6c6b553 11209else
015089dd
TJ
11210 if test x"${enable_languages}" = x \
11211 || test x"${enable_languages}" = xyes;
cc9a08e0 11212 then
ba479fd2
NN
11213 { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5
11214echo "$as_me: error: --enable-languages needs at least one language argument" >&2;}
11215 { (exit 1); exit 1; }; }
d6c6b553 11216 fi
71205e0b 11217fi
cc9a08e0 11218enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
75382c6d
TT
11219
11220# First scan to see if an enabled language requires some other language.
11221# We assume that a given config-lang.in will list all the language
11222# front ends it requires, even if some are required indirectly.
c406e779 11223for lang in ${srcdir}/*/config-lang.in
75382c6d
TT
11224do
11225 case $lang in
75382c6d
TT
11226 # The odd quoting in the next line works around
11227 # an apparent bug in bash 1.12 on linux.
11228 ${srcdir}/[*]/config-lang.in)
11229 ;;
11230 *)
11231 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
11232 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
11233 for other in $this_lang_requires
11234 do
11235 case ,${enable_languages}, in
11236 *,$other,*)
11237 ;;
11238 *,all,*)
11239 ;;
1bf17cc4 11240 *,$lang_alias,*)
75382c6d
TT
11241 enable_languages="$enable_languages,$other"
11242 ;;
11243 esac
11244 done
11245 ;;
11246 esac
11247done
11248
015089dd
TJ
11249expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
11250found_languages=
861bb6c1 11251subdirs=
c406e779 11252for lang in ${srcdir}/*/config-lang.in
861bb6c1
JL
11253do
11254 case $lang in
861bb6c1
JL
11255 # The odd quoting in the next line works around
11256 # an apparent bug in bash 1.12 on linux.
11257 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
11258 *)
11259 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
2b60b2cb
AO
11260 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
11261 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
71205e0b
MH
11262 if test "x$lang_alias" = x
11263 then
11264 echo "$lang doesn't set \$language." 1>&2
11265 exit 1
11266 fi
2b60b2cb
AO
11267 case ${build_by_default},${enable_languages}, in
11268 *,$lang_alias,*) add_this_lang=yes ;;
11269 no,*) add_this_lang=no ;;
11270 *,all,*) add_this_lang=yes ;;
11271 *) add_this_lang=no ;;
11272 esac
015089dd 11273 found_languages="${found_languages} ${lang_alias}"
71205e0b
MH
11274 if test x"${add_this_lang}" = xyes; then
11275 case $lang in
11276 ${srcdir}/ada/config-lang.in)
1ffc5c6e 11277 if test x$have_gnat = xyes ; then
71205e0b
MH
11278 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11279 fi
11280 ;;
11281 *)
11282 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
11283 ;;
11284 esac
11285 fi
11286 ;;
861bb6c1
JL
11287 esac
11288done
11289
015089dd
TJ
11290missing_languages=
11291for expected_language in ${expected_languages} ..
ba479fd2 11292do
015089dd
TJ
11293 if test "${expected_language}" != ..; then
11294 missing_language="${expected_language}"
11295 if test "${expected_language}" = "c" \
11296 || test "${expected_language}" = "all"; then
11297 missing_language=
11298 fi
11299 for found_language in ${found_languages} ..
ba479fd2 11300 do
015089dd
TJ
11301 if test "${found_language}" != ..; then
11302 if test "${expected_language}" = "${found_language}"; then
11303 missing_language=
11304 fi
11305 fi
11306 done
11307 if test "x${missing_language}" != x; then
11308 missing_languages="${missing_languages} ${missing_language}"
11309 fi
11310 fi
11311done
11312
11313if test "x$missing_languages" != x; then
ba479fd2 11314 { { echo "$as_me:$LINENO: error:
015089dd 11315The following requested languages were not found:${missing_languages}
ba479fd2
NN
11316The following languages were available: c${found_languages}" >&5
11317echo "$as_me: error:
11318The following requested languages were not found:${missing_languages}
11319The following languages were available: c${found_languages}" >&2;}
11320 { (exit 1); exit 1; }; }
02ef40d9
TJ
11321fi
11322
f24af81b
TT
11323# Make gthr-default.h if we have a thread file.
11324gthread_flags=
75bffa71 11325if test $thread_file != single; then
f24af81b 11326 rm -f gthr-default.h
db0d1ed9 11327 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
11328 gthread_flags=-DHAVE_GTHR_DEFAULT
11329fi
11330
11331
81bf3d9e 11332# Find out what GC implementation we want, or may, use.
ba479fd2 11333
81bf3d9e
RH
11334# Check whether --with-gc or --without-gc was given.
11335if test "${with_gc+set}" = set; then
11336 withval="$with_gc"
11337 case "$withval" in
59415997 11338 page | zone)
81bf3d9e
RH
11339 GGC=ggc-$withval
11340 ;;
11341 *)
ba479fd2
NN
11342 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
11343echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
11344 { (exit 1); exit 1; }; }
81bf3d9e
RH
11345 ;;
11346esac
11347else
005537df 11348 GGC=ggc-page
ba479fd2 11349fi;
81bf3d9e
RH
11350
11351echo "Using $GGC for garbage collection."
11352
3c809ba4 11353# Use the system's zlib library.
b8dad04b
ZW
11354zlibdir=-L../zlib
11355zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 11356
3c809ba4
AG
11357# Check whether --with-system-zlib or --without-system-zlib was given.
11358if test "${with_system_zlib+set}" = set; then
11359 withval="$with_system_zlib"
11360 zlibdir=
11361zlibinc=
11362
ba479fd2 11363fi;
3c809ba4
AG
11364
11365
11366
dc6746e7 11367
ba479fd2
NN
11368echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
11369echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
11370 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
11371if test "${enable_maintainer_mode+set}" = set; then
11372 enableval="$enable_maintainer_mode"
11373 maintainer_mode=$enableval
11374else
11375 maintainer_mode=no
ba479fd2 11376fi;
63cf211a 11377
ba479fd2
NN
11378echo "$as_me:$LINENO: result: $maintainer_mode" >&5
11379echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
11380
11381if test "$maintainer_mode" = "yes"; then
11382 MAINT=''
11383else
11384 MAINT='#'
11385fi
11386
861bb6c1
JL
11387# Make empty files to contain the specs and options for each language.
11388# Then add #include lines to for a compiler that has specs and/or options.
11389
d7b42618 11390lang_opt_files=
861bb6c1 11391lang_specs_files=
3103b7db 11392lang_tree_files=
861bb6c1
JL
11393for subdir in . $subdirs
11394do
d7b42618
NB
11395 if test -f $srcdir/$subdir/lang.opt; then
11396 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
11397 fi
75bffa71 11398 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 11399 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 11400 fi
3103b7db 11401 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 11402 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 11403 fi
861bb6c1
JL
11404done
11405
11406# These (without "all_") are set in each config-lang.in.
11407# `language' must be a single word so is spelled singularly.
11408all_languages=
11409all_boot_languages=
11410all_compilers=
11411all_stagestuff=
6eb95e99 11412all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders'
861bb6c1 11413# List of language makefile fragments.
2ed26f6b
ZW
11414all_lang_makefrags=
11415# List of language subdirectory makefiles. Deprecated.
861bb6c1 11416all_lang_makefiles=
e2500fed 11417# Files for gengtype
ef69da62 11418all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
11419# Files for gengtype with language
11420all_gtfiles_files_langs=
11421all_gtfiles_files_files=
861bb6c1
JL
11422
11423# Add the language fragments.
11424# Languages are added via two mechanisms. Some information must be
11425# recorded in makefile variables, these are defined in config-lang.in.
11426# We accumulate them and plug them into the main Makefile.
11427# The other mechanism is a set of hooks for each of the main targets
11428# like `clean', `install', etc.
11429
861bb6c1 11430language_hooks="Make-hooks"
861bb6c1 11431
c406e779 11432for s in $subdirs
861bb6c1 11433do
861bb6c1
JL
11434 language=
11435 boot_language=
11436 compilers=
11437 stagestuff=
861bb6c1 11438 outputs=
e2500fed 11439 gtfiles=
861bb6c1 11440 . ${srcdir}/$s/config-lang.in
75bffa71 11441 if test "x$language" = x
861bb6c1
JL
11442 then
11443 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
11444 exit 1
11445 fi
2ed26f6b 11446 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 11447 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 11448 then all_lang_makefiles="$s/Makefile"
72aaffbd 11449 fi
861bb6c1 11450 all_languages="$all_languages $language"
75bffa71 11451 if test "x$boot_language" = xyes
861bb6c1
JL
11452 then
11453 all_boot_languages="$all_boot_languages $language"
11454 fi
11455 all_compilers="$all_compilers $compilers"
11456 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 11457 all_outputs="$all_outputs $outputs"
e2500fed 11458 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11459 for f in $gtfiles
8ac9d31f 11460 do
8ac9d31f
TJ
11461 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11462 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 11463 done
861bb6c1
JL
11464done
11465
8ac9d31f
TJ
11466# Pick up gtfiles for c
11467gtfiles=
11468s="c"
11469. ${srcdir}/c-config-lang.in
11470all_gtfiles="$all_gtfiles $gtfiles"
c406e779 11471for f in $gtfiles
8ac9d31f 11472do
8ac9d31f
TJ
11473 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
11474 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
11475done
11476
cbc59f01 11477check_languages=
c406e779 11478for language in $all_languages
cbc59f01 11479do
cbc59f01 11480 check_languages="$check_languages check-$language"
cbc59f01
DD
11481done
11482
62b81e45
MM
11483# We link each language in with a set of hooks, reached indirectly via
11484# lang.${target}.
861bb6c1
JL
11485
11486rm -f Make-hooks
11487touch Make-hooks
65ebbf81 11488target_list="all.build all.cross start.encap rest.encap tags \
a207b594 11489 install-normal install-common install-man \
a541f69d 11490 uninstall info man srcextra srcman srcinfo \
a03ad584 11491 mostlyclean clean distclean maintainer-clean \
8f231b5d 11492 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
11493for t in $target_list
11494do
11495 x=
c406e779 11496 for lang in $all_languages
861bb6c1 11497 do
ab87f8c8 11498 x="$x $lang.$t"
861bb6c1
JL
11499 done
11500 echo "lang.$t: $x" >> Make-hooks
11501done
11502
cc06d68c 11503# Create .gdbinit.
861bb6c1 11504
cc06d68c
GP
11505echo "dir ." > .gdbinit
11506echo "dir ${srcdir}" >> .gdbinit
11507if test x$gdb_needs_out_file_path = xyes
11508then
11509 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
11510fi
11511if test "x$subdirs" != x; then
11512 for s in $subdirs
11513 do
11514 echo "dir ${srcdir}/$s" >> .gdbinit
11515 done
861bb6c1 11516fi
cc06d68c 11517echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 11518
8f8d3278
NC
11519# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
11520# absolute path for gcc_tooldir based on inserting the number of up-directory
11521# movements required to get from $(exec_prefix) to $(prefix) into the basic
11522# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
11523# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
11524# make and thus we'd get different behavior depending on where we built the
11525# sources.
5949a9fc 11526if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 11527 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 11528else
8f8d3278
NC
11529# An explanation of the sed strings:
11530# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
11531# -e 's|/$||' match a trailing forward slash and eliminates it
11532# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 11533# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
11534#
11535# (*) Note this pattern overwrites the first character of the string
11536# with a forward slash if one is not already present. This is not a
11537# problem because the exact names of the sub-directories concerned is
11538# unimportant, just the number of them matters.
11539#
11540# The practical upshot of these patterns is like this:
11541#
11542# prefix exec_prefix result
11543# ------ ----------- ------
11544# /foo /foo/bar ../
11545# /foo/ /foo/bar ../
11546# /foo /foo/bar/ ../
11547# /foo/ /foo/bar/ ../
11548# /foo /foo/bar/ugg ../../
11549#
4c112cda 11550 dollar='$$'
caa55b1e 11551 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
11552fi
11553
11554
2ce3c6c6 11555
2bbea3a6
RH
11556# Find a directory in which to install a shared libgcc.
11557
11558# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
11559if test "${enable_version_specific_runtime_libs+set}" = set; then
11560 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
11561
11562fi;
2bbea3a6
RH
11563
11564
5b15f277
RH
11565# Check whether --with-slibdir or --without-slibdir was given.
11566if test "${with_slibdir+set}" = set; then
11567 withval="$with_slibdir"
11568 slibdir="$with_slibdir"
11569else
11570 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 11571 slibdir='$(libsubdir)'
5b15f277 11572elif test "$host" != "$target"; then
2bbea3a6
RH
11573 slibdir='$(build_tooldir)/lib'
11574else
5b15f277 11575 slibdir='$(libdir)'
2bbea3a6 11576fi
ba479fd2 11577fi;
2bbea3a6
RH
11578
11579
1e6347d8 11580objdir=`${PWDCMD-pwd}`
7e717196
JL
11581
11582
861bb6c1
JL
11583# Substitute configuration variables
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
9b16d2c4 11630
e9a25f70 11631
6e26218f 11632
c8724862 11633
e061d1ce 11634
d8bb17c8 11635
11642c3a
ZW
11636
11637
11638
11639
11640
11641
11642
3d9d2476 11643
596151e1 11644
8ac9d31f
TJ
11645
11646
11647
e2500fed 11648
51b9ff45
KC
11649
11650
861bb6c1 11651
a541f69d
KC
11652# If it doesn't already exist, create document directory
11653echo "checking for the document directory." 1>&2
11654if test -d doc ; then
11655 true
11656else
11657 mkdir doc
11658fi
861bb6c1 11659
6e3f3080
NN
11660# Echo link setup.
11661if test x${build} = x${host} ; then
11662 if test x${host} = x${target} ; then
11663 echo "Links are now set up to build a native compiler for ${target}." 1>&2
11664 else
11665 echo "Links are now set up to build a cross-compiler" 1>&2
11666 echo " from ${host} to ${target}." 1>&2
11667 fi
11668else
11669 if test x${host} = x${target} ; then
11670 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
11671 echo " for ${target}." 1>&2
11672 else
11673 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
11674 echo " from ${host} to ${target}." 1>&2
11675 fi
11676fi
11677
11678# Configure the subdirectories
11679# AC_CONFIG_SUBDIRS($subdirs)
11680
11681# Create the Makefile
11682# and configure language subdirectories
ba479fd2 11683 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
11684
11685
ba479fd2 11686 ac_config_commands="$ac_config_commands default"
914c5af7 11687
ba479fd2 11688cat >confcache <<\_ACEOF
6e3f3080
NN
11689# This file is a shell script that caches the results of configure
11690# tests run on this system so they can be shared between configure
ba479fd2
NN
11691# scripts and configure runs, see configure's option --config-cache.
11692# It is not useful on other systems. If it contains results you don't
11693# want to keep, you may remove or edit it.
6e3f3080 11694#
ba479fd2
NN
11695# config.status only pays attention to the cache file if you give it
11696# the --recheck option to rerun configure.
6e3f3080 11697#
ba479fd2
NN
11698# `ac_cv_env_foo' variables (set or unset) will be overridden when
11699# loading this file, other *unset* `ac_cv_foo' will be assigned the
11700# following values.
11701
11702_ACEOF
11703
6e3f3080
NN
11704# The following way of writing the cache mishandles newlines in values,
11705# but we know of no workaround that is simple, portable, and efficient.
11706# So, don't put newlines in cache variables' values.
11707# Ultrix sh set writes to stderr and can't be redirected directly,
11708# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
11709{
11710 (set) 2>&1 |
11711 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11712 *ac_space=\ *)
11713 # `set' does not quote correctly, so add quotes (double-quote
11714 # substitution turns \\\\ into \\, and sed turns \\ into \).
11715 sed -n \
11716 "s/'/'\\\\''/g;
11717 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11718 ;;
11719 *)
11720 # `set' quotes correctly as required by POSIX, so do not add quotes.
11721 sed -n \
11722 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11723 ;;
11724 esac;
11725} |
11726 sed '
11727 t clear
11728 : clear
11729 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11730 t end
11731 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11732 : end' >>confcache
11733if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 11734 if test -w $cache_file; then
ba479fd2
NN
11735 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11736 cat confcache >$cache_file
6e3f3080
NN
11737 else
11738 echo "not updating unwritable cache $cache_file"
11739 fi
11740fi
11741rm -f confcache
11742
11743test "x$prefix" = xNONE && prefix=$ac_default_prefix
11744# Let make expand exec_prefix.
11745test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11746
ba479fd2
NN
11747# VPATH may cause trouble with some makes, so we remove $(srcdir),
11748# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11749# trailing colons and then remove the whole line if VPATH becomes empty
11750# (actually we leave an empty line to preserve line numbers).
6e3f3080 11751if test "x$srcdir" = x.; then
ba479fd2
NN
11752 ac_vpsub='/^[ ]*VPATH[ ]*=/{
11753s/:*\$(srcdir):*/:/;
11754s/:*\${srcdir}:*/:/;
11755s/:*@srcdir@:*/:/;
11756s/^\([^=]*=[ ]*\):*/\1/;
11757s/:*$//;
11758s/^[^=]*=[ ]*$//;
11759}'
6e3f3080
NN
11760fi
11761
63cf211a 11762DEFS=-DHAVE_CONFIG_H
6e3f3080 11763
ba479fd2
NN
11764ac_libobjs=
11765ac_ltlibobjs=
11766for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11767 # 1. Remove the extension, and $U if already installed.
11768 ac_i=`echo "$ac_i" |
11769 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
11770 # 2. Add them.
11771 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
11772 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
11773done
11774LIBOBJS=$ac_libobjs
63cf211a 11775
ba479fd2
NN
11776LTLIBOBJS=$ac_ltlibobjs
11777
11778
11779
11780: ${CONFIG_STATUS=./config.status}
11781ac_clean_files_save=$ac_clean_files
11782ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11783{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11784echo "$as_me: creating $CONFIG_STATUS" >&6;}
11785cat >$CONFIG_STATUS <<_ACEOF
11786#! $SHELL
11787# Generated by $as_me.
6e3f3080
NN
11788# Run this file to recreate the current configuration.
11789# Compiler output produced by configure, useful for debugging
ba479fd2 11790# configure, is in config.log if it exists.
6e3f3080 11791
ba479fd2
NN
11792debug=false
11793ac_cs_recheck=false
11794ac_cs_silent=false
11795SHELL=\${CONFIG_SHELL-$SHELL}
11796_ACEOF
11797
11798cat >>$CONFIG_STATUS <<\_ACEOF
11799## --------------------- ##
11800## M4sh Initialization. ##
11801## --------------------- ##
11802
11803# Be Bourne compatible
11804if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11805 emulate sh
11806 NULLCMD=:
11807 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11808 # is contrary to our usage. Disable this feature.
11809 alias -g '${1+"$@"}'='"$@"'
11810elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11811 set -o posix
11812fi
11813
11814# Support unset when possible.
11815if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11816 as_unset=unset
11817else
11818 as_unset=false
11819fi
11820
11821
11822# Work around bugs in pre-3.0 UWIN ksh.
11823$as_unset ENV MAIL MAILPATH
11824PS1='$ '
11825PS2='> '
11826PS4='+ '
11827
11828# NLS nuisances.
11829for as_var in \
11830 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11831 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11832 LC_TELEPHONE LC_TIME
6e3f3080 11833do
ba479fd2
NN
11834 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
11835 eval $as_var=C; export $as_var
11836 else
11837 $as_unset $as_var
11838 fi
6e3f3080
NN
11839done
11840
ba479fd2
NN
11841# Required to use basename.
11842if expr a : '\(a\)' >/dev/null 2>&1; then
11843 as_expr=expr
11844else
11845 as_expr=false
11846fi
6e3f3080 11847
ba479fd2
NN
11848if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
11849 as_basename=basename
11850else
11851 as_basename=false
11852fi
6e3f3080
NN
11853
11854
ba479fd2
NN
11855# Name of the executable.
11856as_me=`$as_basename "$0" ||
11857$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11858 X"$0" : 'X\(//\)$' \| \
11859 X"$0" : 'X\(/\)$' \| \
11860 . : '\(.\)' 2>/dev/null ||
11861echo X/"$0" |
11862 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
11863 /^X\/\(\/\/\)$/{ s//\1/; q; }
11864 /^X\/\(\/\).*/{ s//\1/; q; }
11865 s/.*/./; q'`
11866
6e3f3080 11867
ba479fd2
NN
11868# PATH needs CR, and LINENO needs CR and PATH.
11869# Avoid depending upon Character Ranges.
11870as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11871as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11872as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11873as_cr_digits='0123456789'
11874as_cr_alnum=$as_cr_Letters$as_cr_digits
11875
11876# The user is always right.
11877if test "${PATH_SEPARATOR+set}" != set; then
11878 echo "#! /bin/sh" >conf$$.sh
11879 echo "exit 0" >>conf$$.sh
11880 chmod +x conf$$.sh
11881 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11882 PATH_SEPARATOR=';'
6e3f3080 11883 else
ba479fd2
NN
11884 PATH_SEPARATOR=:
11885 fi
11886 rm -f conf$$.sh
11887fi
11888
11889
11890 as_lineno_1=$LINENO
11891 as_lineno_2=$LINENO
11892 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11893 test "x$as_lineno_1" != "x$as_lineno_2" &&
11894 test "x$as_lineno_3" = "x$as_lineno_2" || {
11895 # Find who we are. Look in the path if we contain no path at all
11896 # relative or not.
11897 case $0 in
11898 *[\\/]* ) as_myself=$0 ;;
11899 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11900for as_dir in $PATH
11901do
11902 IFS=$as_save_IFS
11903 test -z "$as_dir" && as_dir=.
11904 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11905done
11906
11907 ;;
11908 esac
11909 # We did not find ourselves, most probably we were run as `sh COMMAND'
11910 # in which case we are not to be found in the path.
11911 if test "x$as_myself" = x; then
11912 as_myself=$0
11913 fi
11914 if test ! -f "$as_myself"; then
11915 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
11916echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
11917 { (exit 1); exit 1; }; }
6e3f3080 11918 fi
ba479fd2
NN
11919 case $CONFIG_SHELL in
11920 '')
11921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11922for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
11923do
11924 IFS=$as_save_IFS
11925 test -z "$as_dir" && as_dir=.
11926 for as_base in sh bash ksh sh5; do
11927 case $as_dir in
11928 /*)
11929 if ("$as_dir/$as_base" -c '
11930 as_lineno_1=$LINENO
11931 as_lineno_2=$LINENO
11932 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11933 test "x$as_lineno_1" != "x$as_lineno_2" &&
11934 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
11935 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
11936 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
11937 CONFIG_SHELL=$as_dir/$as_base
11938 export CONFIG_SHELL
11939 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
11940 fi;;
11941 esac
11942 done
11943done
11944;;
11945 esac
11946
11947 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11948 # uniformly replaced by the line number. The first 'sed' inserts a
11949 # line-number line before each line; the second 'sed' does the real
11950 # work. The second script uses 'N' to pair each line-number line
11951 # with the numbered line, and appends trailing '-' during
11952 # substitution so that $LINENO is not a special case at line end.
11953 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11954 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
11955 sed '=' <$as_myself |
11956 sed '
11957 N
11958 s,$,-,
11959 : loop
11960 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
11961 t loop
11962 s,-$,,
11963 s,^['$as_cr_digits']*\n,,
11964 ' >$as_me.lineno &&
11965 chmod +x $as_me.lineno ||
11966 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
11967echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
11968 { (exit 1); exit 1; }; }
11969
11970 # Don't try to exec as it changes $[0], causing all sort of problems
11971 # (the dirname of $[0] is not the place where we might find the
11972 # original and so on. Autoconf is especially sensible to this).
11973 . ./$as_me.lineno
11974 # Exit status is that of the last command.
11975 exit
11976}
11977
11978
11979case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
11980 *c*,-n*) ECHO_N= ECHO_C='
11981' ECHO_T=' ' ;;
11982 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
11983 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
11984esac
11985
11986if expr a : '\(a\)' >/dev/null 2>&1; then
11987 as_expr=expr
11988else
11989 as_expr=false
11990fi
11991
11992rm -f conf$$ conf$$.exe conf$$.file
11993echo >conf$$.file
11994if ln -s conf$$.file conf$$ 2>/dev/null; then
11995 # We could just check for DJGPP; but this test a) works b) is more generic
11996 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11997 if test -f conf$$.exe; then
11998 # Don't use ln at all; we don't have any links
11999 as_ln_s='cp -p'
6e3f3080 12000 else
ba479fd2 12001 as_ln_s='ln -s'
6e3f3080 12002 fi
ba479fd2
NN
12003elif ln conf$$.file conf$$ 2>/dev/null; then
12004 as_ln_s=ln
12005else
12006 as_ln_s='cp -p'
12007fi
12008rm -f conf$$ conf$$.exe conf$$.file
12009
12010if mkdir -p . 2>/dev/null; then
12011 as_mkdir_p=:
12012else
12013 as_mkdir_p=false
12014fi
12015
12016as_executable_p="test -f"
12017
12018# Sed expression to map a string onto a valid CPP name.
12019as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
12020
12021# Sed expression to map a string onto a valid variable name.
12022as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
12023
12024
12025# IFS
12026# We need space, tab and new line, in precisely that order.
12027as_nl='
12028'
12029IFS=" $as_nl"
12030
12031# CDPATH.
12032$as_unset CDPATH
12033
12034exec 6>&1
12035
12036# Open the log real soon, to keep \$[0] and so on meaningful, and to
12037# report actual input values of CONFIG_FILES etc. instead of their
12038# values after options handling. Logging --version etc. is OK.
12039exec 5>>config.log
12040{
12041 echo
12042 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12043## Running $as_me. ##
12044_ASBOX
12045} >&5
12046cat >&5 <<_CSEOF
12047
12048This file was extended by $as_me, which was
12049generated by GNU Autoconf 2.57. Invocation command line was
12050
12051 CONFIG_FILES = $CONFIG_FILES
12052 CONFIG_HEADERS = $CONFIG_HEADERS
12053 CONFIG_LINKS = $CONFIG_LINKS
12054 CONFIG_COMMANDS = $CONFIG_COMMANDS
12055 $ $0 $@
12056
12057_CSEOF
12058echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12059echo >&5
12060_ACEOF
12061
12062# Files that config.status was made for.
12063if test -n "$ac_config_files"; then
12064 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12065fi
12066
12067if test -n "$ac_config_headers"; then
12068 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12069fi
12070
12071if test -n "$ac_config_links"; then
12072 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12073fi
12074
12075if test -n "$ac_config_commands"; then
12076 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12077fi
12078
12079cat >>$CONFIG_STATUS <<\_ACEOF
12080
12081ac_cs_usage="\
12082\`$as_me' instantiates files from templates according to the
12083current configuration.
12084
12085Usage: $0 [OPTIONS] [FILE]...
12086
12087 -h, --help print this help, then exit
12088 -V, --version print version number, then exit
12089 -q, --quiet do not print progress messages
12090 -d, --debug don't remove temporary files
12091 --recheck update $as_me by reconfiguring in the same conditions
12092 --file=FILE[:TEMPLATE]
12093 instantiate the configuration file FILE
12094 --header=FILE[:TEMPLATE]
12095 instantiate the configuration header FILE
12096
12097Configuration files:
12098$config_files
12099
12100Configuration headers:
12101$config_headers
12102
12103Configuration commands:
12104$config_commands
12105
12106Report bugs to <bug-autoconf@gnu.org>."
12107_ACEOF
12108
12109cat >>$CONFIG_STATUS <<_ACEOF
12110ac_cs_version="\\
12111config.status
12112configured by $0, generated by GNU Autoconf 2.57,
12113 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12114
12115Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12116Free Software Foundation, Inc.
12117This config.status script is free software; the Free Software Foundation
12118gives unlimited permission to copy, distribute and modify it."
12119srcdir=$srcdir
12120_ACEOF
12121
12122cat >>$CONFIG_STATUS <<\_ACEOF
12123# If no file are specified by the user, then we need to provide default
12124# value. By we need to know if files were specified by the user.
12125ac_need_defaults=:
12126while test $# != 0
12127do
12128 case $1 in
12129 --*=*)
12130 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12131 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12132 ac_shift=:
12133 ;;
12134 -*)
12135 ac_option=$1
12136 ac_optarg=$2
12137 ac_shift=shift
12138 ;;
12139 *) # This is not an option, so the user has probably given explicit
12140 # arguments.
12141 ac_option=$1
12142 ac_need_defaults=false;;
12143 esac
12144
12145 case $ac_option in
12146 # Handling of the options.
12147_ACEOF
12148cat >>$CONFIG_STATUS <<\_ACEOF
12149 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12150 ac_cs_recheck=: ;;
12151 --version | --vers* | -V )
12152 echo "$ac_cs_version"; exit 0 ;;
12153 --he | --h)
12154 # Conflict between --help and --header
12155 { { echo "$as_me:$LINENO: error: ambiguous option: $1
12156Try \`$0 --help' for more information." >&5
12157echo "$as_me: error: ambiguous option: $1
12158Try \`$0 --help' for more information." >&2;}
12159 { (exit 1); exit 1; }; };;
12160 --help | --hel | -h )
12161 echo "$ac_cs_usage"; exit 0 ;;
12162 --debug | --d* | -d )
12163 debug=: ;;
12164 --file | --fil | --fi | --f )
12165 $ac_shift
12166 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12167 ac_need_defaults=false;;
12168 --header | --heade | --head | --hea )
12169 $ac_shift
12170 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12171 ac_need_defaults=false;;
12172 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12173 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12174 ac_cs_silent=: ;;
12175
12176 # This is an error.
12177 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12178Try \`$0 --help' for more information." >&5
12179echo "$as_me: error: unrecognized option: $1
12180Try \`$0 --help' for more information." >&2;}
12181 { (exit 1); exit 1; }; } ;;
12182
12183 *) ac_config_targets="$ac_config_targets $1" ;;
12184
12185 esac
12186 shift
6e3f3080 12187done
ba479fd2
NN
12188
12189ac_configure_extra_args=
12190
12191if $ac_cs_silent; then
12192 exec 6>/dev/null
12193 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
12194fi
12195
ba479fd2
NN
12196_ACEOF
12197cat >>$CONFIG_STATUS <<_ACEOF
12198if \$ac_cs_recheck; then
12199 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12200 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12201fi
861bb6c1 12202
ba479fd2
NN
12203_ACEOF
12204
12205cat >>$CONFIG_STATUS <<_ACEOF
12206#
12207# INIT-COMMANDS section.
12208#
12209
12210subdirs='$subdirs'
12211symbolic_link='$symbolic_link'
12212
12213
12214_ACEOF
12215
12216
12217
12218cat >>$CONFIG_STATUS <<\_ACEOF
12219for ac_config_target in $ac_config_targets
12220do
12221 case "$ac_config_target" in
12222 # Handling of arguments.
12223 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
12224 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12225 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
12226 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12227echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12228 { (exit 1); exit 1; }; };;
861bb6c1 12229 esac
ba479fd2
NN
12230done
12231
12232# If the user did not use the arguments to specify the items to instantiate,
12233# then the envvar interface is used. Set only those that are not.
12234# We use the long form for the default assignment because of an extremely
12235# bizarre bug on SunOS 4.1.3.
12236if $ac_need_defaults; then
12237 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12238 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12239 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12240fi
12241
12242# Have a temporary directory for convenience. Make it in the build tree
12243# simply because there is no reason to put it here, and in addition,
12244# creating and moving files from /tmp can sometimes cause problems.
12245# Create a temporary directory, and hook for its removal unless debugging.
12246$debug ||
12247{
12248 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12249 trap '{ (exit 1); exit 1; }' 1 2 13 15
12250}
861bb6c1 12251
ba479fd2 12252# Create a (secure) tmp directory for tmp files.
6e3f3080 12253
ba479fd2
NN
12254{
12255 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
12256 test -n "$tmp" && test -d "$tmp"
12257} ||
12258{
12259 tmp=./confstat$$-$RANDOM
12260 (umask 077 && mkdir $tmp)
12261} ||
12262{
12263 echo "$me: cannot create a temporary directory in ." >&2
12264 { (exit 1); exit 1; }
12265}
12266
12267_ACEOF
12268
12269cat >>$CONFIG_STATUS <<_ACEOF
12270
12271#
12272# CONFIG_FILES section.
12273#
12274
12275# No need to generate the scripts if there are no CONFIG_FILES.
12276# This happens for instance when ./config.status config.h
12277if test -n "\$CONFIG_FILES"; then
12278 # Protect against being on the right side of a sed subst in config.status.
12279 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12280 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12281s,@SHELL@,$SHELL,;t t
12282s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12283s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12284s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12285s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12286s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12287s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12288s,@exec_prefix@,$exec_prefix,;t t
12289s,@prefix@,$prefix,;t t
12290s,@program_transform_name@,$program_transform_name,;t t
12291s,@bindir@,$bindir,;t t
12292s,@sbindir@,$sbindir,;t t
12293s,@libexecdir@,$libexecdir,;t t
12294s,@datadir@,$datadir,;t t
12295s,@sysconfdir@,$sysconfdir,;t t
12296s,@sharedstatedir@,$sharedstatedir,;t t
12297s,@localstatedir@,$localstatedir,;t t
12298s,@libdir@,$libdir,;t t
12299s,@includedir@,$includedir,;t t
12300s,@oldincludedir@,$oldincludedir,;t t
12301s,@infodir@,$infodir,;t t
12302s,@mandir@,$mandir,;t t
12303s,@build_alias@,$build_alias,;t t
12304s,@host_alias@,$host_alias,;t t
12305s,@target_alias@,$target_alias,;t t
12306s,@DEFS@,$DEFS,;t t
12307s,@ECHO_C@,$ECHO_C,;t t
12308s,@ECHO_N@,$ECHO_N,;t t
12309s,@ECHO_T@,$ECHO_T,;t t
12310s,@LIBS@,$LIBS,;t t
12311s,@build@,$build,;t t
12312s,@build_cpu@,$build_cpu,;t t
12313s,@build_vendor@,$build_vendor,;t t
12314s,@build_os@,$build_os,;t t
12315s,@host@,$host,;t t
12316s,@host_cpu@,$host_cpu,;t t
12317s,@host_vendor@,$host_vendor,;t t
12318s,@host_os@,$host_os,;t t
12319s,@target@,$target,;t t
12320s,@target_cpu@,$target_cpu,;t t
12321s,@target_vendor@,$target_vendor,;t t
12322s,@target_os@,$target_os,;t t
12323s,@build_subdir@,$build_subdir,;t t
12324s,@host_subdir@,$host_subdir,;t t
12325s,@target_subdir@,$target_subdir,;t t
03787dfd 12326s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
12327s,@CC@,$CC,;t t
12328s,@CFLAGS@,$CFLAGS,;t t
12329s,@LDFLAGS@,$LDFLAGS,;t t
12330s,@CPPFLAGS@,$CPPFLAGS,;t t
12331s,@ac_ct_CC@,$ac_ct_CC,;t t
12332s,@EXEEXT@,$EXEEXT,;t t
12333s,@OBJEXT@,$OBJEXT,;t t
12334s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
12335s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
12336s,@CPP@,$CPP,;t t
12337s,@GNATBIND@,$GNATBIND,;t t
12338s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
12339s,@strict1_warn@,$strict1_warn,;t t
12340s,@warn_cflags@,$warn_cflags,;t t
12341s,@WERROR@,$WERROR,;t t
12342s,@nocommon_flag@,$nocommon_flag,;t t
12343s,@EGREP@,$EGREP,;t t
12344s,@valgrind_path@,$valgrind_path,;t t
12345s,@valgrind_path_defines@,$valgrind_path_defines,;t t
12346s,@valgrind_command@,$valgrind_command,;t t
12347s,@coverage_flags@,$coverage_flags,;t t
12348s,@enable_multilib@,$enable_multilib,;t t
12349s,@enable_shared@,$enable_shared,;t t
12350s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
12351s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
12352s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
12353s,@onestep@,$onestep,;t t
12354s,@SET_MAKE@,$SET_MAKE,;t t
12355s,@AWK@,$AWK,;t t
12356s,@LN@,$LN,;t t
12357s,@LN_S@,$LN_S,;t t
12358s,@RANLIB@,$RANLIB,;t t
12359s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12360s,@INSTALL@,$INSTALL,;t t
12361s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12362s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12363s,@make_compare_target@,$make_compare_target,;t t
12364s,@have_mktemp_command@,$have_mktemp_command,;t t
12365s,@MAKEINFO@,$MAKEINFO,;t t
12366s,@BUILD_INFO@,$BUILD_INFO,;t t
12367s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
12368s,@FLEX@,$FLEX,;t t
12369s,@BISON@,$BISON,;t t
12370s,@stage1_cflags@,$stage1_cflags,;t t
12371s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
12372s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
12373s,@LDEXP_LIB@,$LDEXP_LIB,;t t
12374s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
12375s,@LIBICONV@,$LIBICONV,;t t
12376s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
12377s,@manext@,$manext,;t t
12378s,@objext@,$objext,;t t
12379s,@extra_modes_file@,$extra_modes_file,;t t
12380s,@FORBUILD@,$FORBUILD,;t t
12381s,@PACKAGE@,$PACKAGE,;t t
12382s,@VERSION@,$VERSION,;t t
12383s,@USE_NLS@,$USE_NLS,;t t
12384s,@LIBINTL@,$LIBINTL,;t t
12385s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
12386s,@INCINTL@,$INCINTL,;t t
12387s,@XGETTEXT@,$XGETTEXT,;t t
12388s,@GMSGFMT@,$GMSGFMT,;t t
12389s,@POSUB@,$POSUB,;t t
12390s,@CATALOGS@,$CATALOGS,;t t
12391s,@CROSS@,$CROSS,;t t
12392s,@ALL@,$ALL,;t t
12393s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
12394s,@inhibit_libc@,$inhibit_libc,;t t
12395s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t
12396s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t
12397s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
12398s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12399s,@STMP_FIXINC@,$STMP_FIXINC,;t t
12400s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
12401s,@libgcc_visibility@,$libgcc_visibility,;t t
12402s,@gthread_flags@,$gthread_flags,;t t
12403s,@GGC@,$GGC,;t t
12404s,@zlibdir@,$zlibdir,;t t
12405s,@zlibinc@,$zlibinc,;t t
12406s,@MAINT@,$MAINT,;t t
12407s,@gcc_tooldir@,$gcc_tooldir,;t t
12408s,@dollar@,$dollar,;t t
12409s,@slibdir@,$slibdir,;t t
12410s,@objdir@,$objdir,;t t
12411s,@subdirs@,$subdirs,;t t
12412s,@srcdir@,$srcdir,;t t
ba479fd2
NN
12413s,@all_boot_languages@,$all_boot_languages,;t t
12414s,@all_compilers@,$all_compilers,;t t
12415s,@all_gtfiles@,$all_gtfiles,;t t
12416s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
12417s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
12418s,@all_lang_makefrags@,$all_lang_makefrags,;t t
12419s,@all_lang_makefiles@,$all_lang_makefiles,;t t
12420s,@all_languages@,$all_languages,;t t
12421s,@all_stagestuff@,$all_stagestuff,;t t
12422s,@build_exeext@,$build_exeext,;t t
12423s,@build_install_headers_dir@,$build_install_headers_dir,;t t
12424s,@build_xm_file_list@,$build_xm_file_list,;t t
12425s,@build_xm_include_list@,$build_xm_include_list,;t t
12426s,@build_xm_defines@,$build_xm_defines,;t t
12427s,@check_languages@,$check_languages,;t t
12428s,@cc_set_by_configure@,$cc_set_by_configure,;t t
12429s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
12430s,@cpp_install_dir@,$cpp_install_dir,;t t
12431s,@xmake_file@,$xmake_file,;t t
12432s,@tmake_file@,$tmake_file,;t t
12433s,@extra_headers_list@,$extra_headers_list,;t t
12434s,@extra_objs@,$extra_objs,;t t
12435s,@extra_parts@,$extra_parts,;t t
12436s,@extra_passes@,$extra_passes,;t t
12437s,@extra_programs@,$extra_programs,;t t
12438s,@float_h_file@,$float_h_file,;t t
12439s,@gcc_config_arguments@,$gcc_config_arguments,;t t
12440s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
12441s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
12442s,@gcc_version@,$gcc_version,;t t
12443s,@gcc_version_full@,$gcc_version_full,;t t
12444s,@gcc_version_trigger@,$gcc_version_trigger,;t t
12445s,@host_exeext@,$host_exeext,;t t
12446s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t
12447s,@host_xm_file_list@,$host_xm_file_list,;t t
12448s,@host_xm_include_list@,$host_xm_include_list,;t t
12449s,@host_xm_defines@,$host_xm_defines,;t t
12450s,@out_host_hook_obj@,$out_host_hook_obj,;t t
12451s,@install@,$install,;t t
12452s,@lang_opt_files@,$lang_opt_files,;t t
12453s,@lang_specs_files@,$lang_specs_files,;t t
12454s,@lang_tree_files@,$lang_tree_files,;t t
12455s,@local_prefix@,$local_prefix,;t t
12456s,@md_file@,$md_file,;t t
12457s,@objc_boehm_gc@,$objc_boehm_gc,;t t
12458s,@out_file@,$out_file,;t t
12459s,@out_object_file@,$out_object_file,;t t
12460s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
12461s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
12462s,@symbolic_link@,$symbolic_link,;t t
12463s,@thread_file@,$thread_file,;t t
12464s,@tm_file_list@,$tm_file_list,;t t
12465s,@tm_include_list@,$tm_include_list,;t t
12466s,@tm_defines@,$tm_defines,;t t
12467s,@tm_p_file_list@,$tm_p_file_list,;t t
12468s,@tm_p_include_list@,$tm_p_include_list,;t t
12469s,@xm_file_list@,$xm_file_list,;t t
12470s,@xm_include_list@,$xm_include_list,;t t
12471s,@xm_defines@,$xm_defines,;t t
12472s,@target_noncanonical@,$target_noncanonical,;t t
12473s,@c_target_objs@,$c_target_objs,;t t
12474s,@cxx_target_objs@,$cxx_target_objs,;t t
12475s,@target_cpu_default@,$target_cpu_default,;t t
12476s,@LIBOBJS@,$LIBOBJS,;t t
12477s,@LTLIBOBJS@,$LTLIBOBJS,;t t
12478/@language_hooks@/r $language_hooks
12479s,@language_hooks@,,;t t
12480CEOF
12481
12482_ACEOF
12483
12484 cat >>$CONFIG_STATUS <<\_ACEOF
12485 # Split the substitutions into bite-sized pieces for seds with
12486 # small command number limits, like on Digital OSF/1 and HP-UX.
12487 ac_max_sed_lines=48
12488 ac_sed_frag=1 # Number of current file.
12489 ac_beg=1 # First line for current file.
12490 ac_end=$ac_max_sed_lines # Line after last line for current file.
12491 ac_more_lines=:
12492 ac_sed_cmds=
12493 while $ac_more_lines; do
12494 if test $ac_beg -gt 1; then
12495 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12496 else
12497 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12498 fi
12499 if test ! -s $tmp/subs.frag; then
12500 ac_more_lines=false
12501 else
12502 # The purpose of the label and of the branching condition is to
12503 # speed up the sed processing (if there are no `@' at all, there
12504 # is no need to browse any of the substitutions).
12505 # These are the two extra sed commands mentioned above.
12506 (echo ':t
12507 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12508 if test -z "$ac_sed_cmds"; then
12509 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12510 else
12511 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12512 fi
12513 ac_sed_frag=`expr $ac_sed_frag + 1`
12514 ac_beg=$ac_end
12515 ac_end=`expr $ac_end + $ac_max_sed_lines`
12516 fi
12517 done
12518 if test -z "$ac_sed_cmds"; then
12519 ac_sed_cmds=cat
63cf211a 12520 fi
ba479fd2 12521fi # test -n "$CONFIG_FILES"
cafe096b 12522
ba479fd2
NN
12523_ACEOF
12524cat >>$CONFIG_STATUS <<\_ACEOF
12525for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12526 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12527 case $ac_file in
12528 - | *:- | *:-:* ) # input from stdin
12529 cat >$tmp/stdin
12530 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12531 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12532 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12533 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12534 * ) ac_file_in=$ac_file.in ;;
63cf211a 12535 esac
cafe096b 12536
ba479fd2
NN
12537 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12538 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12539$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12540 X"$ac_file" : 'X\(//\)[^/]' \| \
12541 X"$ac_file" : 'X\(//\)$' \| \
12542 X"$ac_file" : 'X\(/\)' \| \
12543 . : '\(.\)' 2>/dev/null ||
12544echo X"$ac_file" |
12545 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12546 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12547 /^X\(\/\/\)$/{ s//\1/; q; }
12548 /^X\(\/\).*/{ s//\1/; q; }
12549 s/.*/./; q'`
12550 { if $as_mkdir_p; then
12551 mkdir -p "$ac_dir"
12552 else
12553 as_dir="$ac_dir"
12554 as_dirs=
12555 while test ! -d "$as_dir"; do
12556 as_dirs="$as_dir $as_dirs"
12557 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12558$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12559 X"$as_dir" : 'X\(//\)[^/]' \| \
12560 X"$as_dir" : 'X\(//\)$' \| \
12561 X"$as_dir" : 'X\(/\)' \| \
12562 . : '\(.\)' 2>/dev/null ||
12563echo X"$as_dir" |
12564 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12565 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12566 /^X\(\/\/\)$/{ s//\1/; q; }
12567 /^X\(\/\).*/{ s//\1/; q; }
12568 s/.*/./; q'`
12569 done
12570 test ! -n "$as_dirs" || mkdir $as_dirs
12571 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12572echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12573 { (exit 1); exit 1; }; }; }
6e3f3080 12574
ba479fd2
NN
12575 ac_builddir=.
12576
12577if test "$ac_dir" != .; then
12578 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12579 # A "../" for each directory in $ac_dir_suffix.
12580 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12581else
12582 ac_dir_suffix= ac_top_builddir=
12583fi
12584
12585case $srcdir in
12586 .) # No --srcdir option. We are building in place.
12587 ac_srcdir=.
12588 if test -z "$ac_top_builddir"; then
12589 ac_top_srcdir=.
12590 else
12591 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12592 fi ;;
12593 [\\/]* | ?:[\\/]* ) # Absolute path.
12594 ac_srcdir=$srcdir$ac_dir_suffix;
12595 ac_top_srcdir=$srcdir ;;
12596 *) # Relative path.
12597 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12598 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12599esac
12600# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12601# absolute.
12602ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12603ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12604ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12605ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12606
12607
12608
12609 if test x"$ac_file" != x-; then
12610 { echo "$as_me:$LINENO: creating $ac_file" >&5
12611echo "$as_me: creating $ac_file" >&6;}
12612 rm -f "$ac_file"
12613 fi
12614 # Let's still pretend it is `configure' which instantiates (i.e., don't
12615 # use $as_me), people would be surprised to read:
12616 # /* config.h. Generated by config.status. */
12617 if test x"$ac_file" = x-; then
12618 configure_input=
12619 else
12620 configure_input="$ac_file. "
12621 fi
12622 configure_input=$configure_input"Generated from `echo $ac_file_in |
12623 sed 's,.*/,,'` by configure."
12624
12625 # First look for the input files in the build tree, otherwise in the
12626 # src tree.
12627 ac_file_inputs=`IFS=:
12628 for f in $ac_file_in; do
12629 case $f in
12630 -) echo $tmp/stdin ;;
12631 [\\/$]*)
12632 # Absolute (can't be DOS-style, as IFS=:)
12633 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12634echo "$as_me: error: cannot find input file: $f" >&2;}
12635 { (exit 1); exit 1; }; }
12636 echo $f;;
12637 *) # Relative
12638 if test -f "$f"; then
12639 # Build tree
12640 echo $f
12641 elif test -f "$srcdir/$f"; then
12642 # Source tree
12643 echo $srcdir/$f
12644 else
12645 # /dev/null tree
12646 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12647echo "$as_me: error: cannot find input file: $f" >&2;}
12648 { (exit 1); exit 1; }; }
12649 fi;;
12650 esac
12651 done` || { (exit 1); exit 1; }
12652_ACEOF
12653cat >>$CONFIG_STATUS <<_ACEOF
12654 sed "$ac_vpsub
12655$extrasub
12656_ACEOF
12657cat >>$CONFIG_STATUS <<\_ACEOF
12658:t
12659/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12660s,@configure_input@,$configure_input,;t t
12661s,@srcdir@,$ac_srcdir,;t t
12662s,@abs_srcdir@,$ac_abs_srcdir,;t t
12663s,@top_srcdir@,$ac_top_srcdir,;t t
12664s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
12665s,@builddir@,$ac_builddir,;t t
12666s,@abs_builddir@,$ac_abs_builddir,;t t
12667s,@top_builddir@,$ac_top_builddir,;t t
12668s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
12669" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12670 rm -f $tmp/stdin
12671 if test x"$ac_file" != x-; then
12672 mv $tmp/out $ac_file
12673 else
12674 cat $tmp/out
12675 rm -f $tmp/out
12676 fi
12677
12678done
12679_ACEOF
12680cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 12681
ba479fd2
NN
12682#
12683# CONFIG_HEADER section.
12684#
861bb6c1
JL
12685
12686# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12687# NAME is the cpp macro being defined and VALUE is the value it is being given.
12688#
12689# ac_d sets the value in "#define NAME VALUE" lines.
ba479fd2
NN
12690ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
12691ac_dB='[ ].*$,\1#\2'
12692ac_dC=' '
12693ac_dD=',;t'
12694# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12695ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
12696ac_uB='$,\1#\2define\3'
861bb6c1 12697ac_uC=' '
ba479fd2
NN
12698ac_uD=',;t'
12699
12700for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 12701 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
12702 case $ac_file in
12703 - | *:- | *:-:* ) # input from stdin
12704 cat >$tmp/stdin
12705 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12706 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12707 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12708 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12709 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
12710 esac
12711
ba479fd2
NN
12712 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
12713echo "$as_me: creating $ac_file" >&6;}
12714
12715 # First look for the input files in the build tree, otherwise in the
12716 # src tree.
12717 ac_file_inputs=`IFS=:
12718 for f in $ac_file_in; do
12719 case $f in
12720 -) echo $tmp/stdin ;;
12721 [\\/$]*)
12722 # Absolute (can't be DOS-style, as IFS=:)
12723 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12724echo "$as_me: error: cannot find input file: $f" >&2;}
12725 { (exit 1); exit 1; }; }
12726 echo $f;;
12727 *) # Relative
12728 if test -f "$f"; then
12729 # Build tree
12730 echo $f
12731 elif test -f "$srcdir/$f"; then
12732 # Source tree
12733 echo $srcdir/$f
12734 else
12735 # /dev/null tree
12736 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
12737echo "$as_me: error: cannot find input file: $f" >&2;}
12738 { (exit 1); exit 1; }; }
12739 fi;;
12740 esac
12741 done` || { (exit 1); exit 1; }
12742 # Remove the trailing spaces.
12743 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
12744
12745_ACEOF
12746
12747# Transform confdefs.h into two sed scripts, `conftest.defines' and
12748# `conftest.undefs', that substitutes the proper values into
12749# config.h.in to produce config.h. The first handles `#define'
12750# templates, and the second `#undef' templates.
12751# And first: Protect against being on the right side of a sed subst in
12752# config.status. Protect against being in an unquoted here document
12753# in config.status.
12754rm -f conftest.defines conftest.undefs
12755# Using a here document instead of a string reduces the quoting nightmare.
12756# Putting comments in sed scripts is not portable.
12757#
12758# `end' is used to avoid that the second main sed command (meant for
12759# 0-ary CPP macros) applies to n-ary macro definitions.
12760# See the Autoconf documentation for `clear'.
12761cat >confdef2sed.sed <<\_ACEOF
12762s/[\\&,]/\\&/g
12763s,[\\$`],\\&,g
12764t clear
12765: clear
12766s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
12767t end
12768s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
12769: end
12770_ACEOF
12771# If some macros were called several times there might be several times
12772# the same #defines, which is useless. Nevertheless, we may not want to
12773# sort them, since we want the *last* AC-DEFINE to be honored.
12774uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
12775sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
12776rm -f confdef2sed.sed
861bb6c1
JL
12777
12778# This sed command replaces #undef with comments. This is necessary, for
12779# example, in the case of _POSIX_SOURCE, which is predefined and required
12780# on some systems where configure will not decide to define it.
ba479fd2
NN
12781cat >>conftest.undefs <<\_ACEOF
12782s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
12783_ACEOF
12784
12785# Break up conftest.defines because some shells have a limit on the size
12786# of here documents, and old seds have small limits too (100 cmds).
12787echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
12788echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
12789echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
12790echo ' :' >>$CONFIG_STATUS
12791rm -f conftest.tail
12792while grep . conftest.defines >/dev/null
12793do
12794 # Write a limited-size here document to $tmp/defines.sed.
12795 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
12796 # Speed up: don't consider the non `#define' lines.
12797 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
12798 # Work around the forget-to-reset-the-flag bug.
12799 echo 't clr' >>$CONFIG_STATUS
12800 echo ': clr' >>$CONFIG_STATUS
12801 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
12802 echo 'CEOF
12803 sed -f $tmp/defines.sed $tmp/in >$tmp/out
12804 rm -f $tmp/in
12805 mv $tmp/out $tmp/in
12806' >>$CONFIG_STATUS
12807 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
12808 rm -f conftest.defines
12809 mv conftest.tail conftest.defines
12810done
12811rm -f conftest.defines
12812echo ' fi # grep' >>$CONFIG_STATUS
12813echo >>$CONFIG_STATUS
861bb6c1 12814
ba479fd2
NN
12815# Break up conftest.undefs because some shells have a limit on the size
12816# of here documents, and old seds have small limits too (100 cmds).
12817echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 12818rm -f conftest.tail
ba479fd2 12819while grep . conftest.undefs >/dev/null
861bb6c1 12820do
ba479fd2
NN
12821 # Write a limited-size here document to $tmp/undefs.sed.
12822 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
12823 # Speed up: don't consider the non `#undef'
12824 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
12825 # Work around the forget-to-reset-the-flag bug.
12826 echo 't clr' >>$CONFIG_STATUS
12827 echo ': clr' >>$CONFIG_STATUS
12828 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 12829 echo 'CEOF
ba479fd2
NN
12830 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
12831 rm -f $tmp/in
12832 mv $tmp/out $tmp/in
12833' >>$CONFIG_STATUS
12834 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
12835 rm -f conftest.undefs
12836 mv conftest.tail conftest.undefs
861bb6c1 12837done
ba479fd2
NN
12838rm -f conftest.undefs
12839
12840cat >>$CONFIG_STATUS <<\_ACEOF
12841 # Let's still pretend it is `configure' which instantiates (i.e., don't
12842 # use $as_me), people would be surprised to read:
12843 # /* config.h. Generated by config.status. */
12844 if test x"$ac_file" = x-; then
12845 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 12846 else
ba479fd2 12847 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 12848 fi
ba479fd2
NN
12849 cat $tmp/in >>$tmp/config.h
12850 rm -f $tmp/in
12851 if test x"$ac_file" != x-; then
12852 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
12853 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
12854echo "$as_me: $ac_file is unchanged" >&6;}
12855 else
12856 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12857$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12858 X"$ac_file" : 'X\(//\)[^/]' \| \
12859 X"$ac_file" : 'X\(//\)$' \| \
12860 X"$ac_file" : 'X\(/\)' \| \
12861 . : '\(.\)' 2>/dev/null ||
12862echo X"$ac_file" |
12863 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12864 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12865 /^X\(\/\/\)$/{ s//\1/; q; }
12866 /^X\(\/\).*/{ s//\1/; q; }
12867 s/.*/./; q'`
12868 { if $as_mkdir_p; then
12869 mkdir -p "$ac_dir"
12870 else
12871 as_dir="$ac_dir"
12872 as_dirs=
12873 while test ! -d "$as_dir"; do
12874 as_dirs="$as_dir $as_dirs"
12875 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12876$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12877 X"$as_dir" : 'X\(//\)[^/]' \| \
12878 X"$as_dir" : 'X\(//\)$' \| \
12879 X"$as_dir" : 'X\(/\)' \| \
12880 . : '\(.\)' 2>/dev/null ||
12881echo X"$as_dir" |
12882 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12883 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12884 /^X\(\/\/\)$/{ s//\1/; q; }
12885 /^X\(\/\).*/{ s//\1/; q; }
12886 s/.*/./; q'`
12887 done
12888 test ! -n "$as_dirs" || mkdir $as_dirs
12889 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12890echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12891 { (exit 1); exit 1; }; }; }
63cf211a 12892
ba479fd2
NN
12893 rm -f $ac_file
12894 mv $tmp/config.h $ac_file
12895 fi
12896 else
12897 cat $tmp/config.h
12898 rm -f $tmp/config.h
12899 fi
12900done
12901_ACEOF
12902cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 12903
ba479fd2
NN
12904#
12905# CONFIG_COMMANDS section.
12906#
12907for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12908 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12909 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12910 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
12911$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12912 X"$ac_dest" : 'X\(//\)[^/]' \| \
12913 X"$ac_dest" : 'X\(//\)$' \| \
12914 X"$ac_dest" : 'X\(/\)' \| \
12915 . : '\(.\)' 2>/dev/null ||
12916echo X"$ac_dest" |
12917 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12918 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12919 /^X\(\/\/\)$/{ s//\1/; q; }
12920 /^X\(\/\).*/{ s//\1/; q; }
12921 s/.*/./; q'`
12922 ac_builddir=.
12923
12924if test "$ac_dir" != .; then
12925 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12926 # A "../" for each directory in $ac_dir_suffix.
12927 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12928else
12929 ac_dir_suffix= ac_top_builddir=
12930fi
12931
12932case $srcdir in
12933 .) # No --srcdir option. We are building in place.
12934 ac_srcdir=.
12935 if test -z "$ac_top_builddir"; then
12936 ac_top_srcdir=.
12937 else
12938 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12939 fi ;;
12940 [\\/]* | ?:[\\/]* ) # Absolute path.
12941 ac_srcdir=$srcdir$ac_dir_suffix;
12942 ac_top_srcdir=$srcdir ;;
12943 *) # Relative path.
12944 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12945 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12946esac
12947# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
12948# absolute.
12949ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
12950ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
12951ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
12952ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
12953
12954
12955 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
12956echo "$as_me: executing $ac_dest commands" >&6;}
12957 case $ac_dest in
12958 default )
f1faaabd
NN
12959case ${CONFIG_HEADERS} in
12960 *auto-host.h:config.in*)
12961 echo > cstamp-h ;;
861bb6c1 12962esac
2ed26f6b 12963# Make sure all the subdirs exist.
c406e779 12964for d in $subdirs
2ed26f6b 12965do
2ed26f6b 12966 test -d $d || mkdir $d
2ed26f6b 12967done
93cf819d
BK
12968# If the host supports symlinks, point stage[1234] at ../stage[1234] so
12969# bootstrapping and the installation procedure can still use
12970# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
12971# FLAGS_TO_PASS has been modified to solve the problem there.
12972# This is virtually a duplicate of what happens in configure.lang; we do
12973# an extra check to make sure this only happens if ln -s can be used.
75bffa71 12974if test "$symbolic_link" = "ln -s"; then
c406e779 12975 for d in ${subdirs} fixinc ; do
1e6347d8 12976 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 12977 cd $d
6a1b7268 12978 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
12979 do
12980 rm -f $t
12981 $symbolic_link ../$t $t 2>/dev/null
12982 done
12983 cd $STARTDIR
93cf819d
BK
12984 done
12985else true ; fi
ba479fd2
NN
12986 ;;
12987 esac
12988done
12989_ACEOF
cafe096b 12990
ba479fd2
NN
12991cat >>$CONFIG_STATUS <<\_ACEOF
12992
12993{ (exit 0); exit 0; }
12994_ACEOF
861bb6c1 12995chmod +x $CONFIG_STATUS
ba479fd2
NN
12996ac_clean_files=$ac_clean_files_save
12997
12998
12999# configure is writing to config.log, and then calls config.status.
13000# config.status does its own redirection, appending to config.log.
13001# Unfortunately, on DOS this fails, as config.log is still kept open
13002# by configure, so config.status won't be able to write to it; its
13003# output is simply discarded. So we exec the FD to /dev/null,
13004# effectively closing config.log, so it can be properly (re)opened and
13005# appended to by config.status. When coming back to configure, we
13006# need to make the FD available again.
13007if test "$no_create" != yes; then
13008 ac_cs_success=:
13009 ac_config_status_args=
13010 test "$silent" = yes &&
13011 ac_config_status_args="$ac_config_status_args --quiet"
13012 exec 5>/dev/null
13013 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13014 exec 5>>config.log
13015 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13016 # would make configure fail if this is the last instruction.
13017 $ac_cs_success || { (exit 1); exit 1; }
13018fi
861bb6c1 13019