]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
rs6000.c (struct processor_costs): Add new fields for simple floating point operation...
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
8ab705be 3# Generated by GNU Autoconf 2.59.
861bb6c1 4#
86da66b5 5# Copyright (C) 2003 Free Software Foundation, Inc.
861bb6c1
JL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
86da66b5 22DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
23
24# Support unset when possible.
86da66b5 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
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
86da66b5 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
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
86da66b5 221 test -d ./-p && rmdir ./-p
ba479fd2
NN
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
86da66b5 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
229
230# Sed expression to map a string onto a valid variable name.
86da66b5 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
861bb6c1 254ac_default_prefix=/usr/local
ba479fd2
NN
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="tree.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
343a6100 312ac_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 strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER 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_S LN RANLIB ac_ct_RANLIB ranlib_flags 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 gthread_flags 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 collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB 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_gcc_objs 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_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 GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ba479fd2 313ac_subst_files='language_hooks'
861bb6c1
JL
314
315# Initialize some variables set by options.
ba479fd2
NN
316ac_init_help=
317ac_init_version=false
861bb6c1
JL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
ba479fd2 320cache_file=/dev/null
861bb6c1 321exec_prefix=NONE
861bb6c1 322no_create=
861bb6c1
JL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
861bb6c1
JL
331verbose=
332x_includes=NONE
333x_libraries=NONE
ba479fd2
NN
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
861bb6c1
JL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
861bb6c1
JL
353ac_prev=
354for ac_option
355do
861bb6c1
JL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
ba479fd2 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
861bb6c1
JL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
ba479fd2 367 case $ac_option in
861bb6c1
JL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 372 bindir=$ac_optarg ;;
861bb6c1
JL
373
374 -build | --build | --buil | --bui | --bu)
ba479fd2 375 ac_prev=build_alias ;;
861bb6c1 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 377 build_alias=$ac_optarg ;;
861bb6c1
JL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
861bb6c1
JL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
ba479fd2 393 datadir=$ac_optarg ;;
861bb6c1
JL
394
395 -disable-* | --disable-*)
ba479fd2 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 397 # Reject names that are not valid shell variable names.
ba479fd2
NN
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
861bb6c1
JL
403
404 -enable-* | --enable-*)
ba479fd2 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 406 # Reject names that are not valid shell variable names.
ba479fd2
NN
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
413 *) ac_optarg=yes ;;
414 esac
ba479fd2 415 eval "enable_$ac_feature='$ac_optarg'" ;;
861bb6c1
JL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
ba479fd2 424 exec_prefix=$ac_optarg ;;
861bb6c1
JL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
ba479fd2
NN
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
861bb6c1
JL
436
437 -host | --host | --hos | --ho)
ba479fd2 438 ac_prev=host_alias ;;
861bb6c1 439 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 440 host_alias=$ac_optarg ;;
861bb6c1
JL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 447 includedir=$ac_optarg ;;
861bb6c1
JL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 452 infodir=$ac_optarg ;;
861bb6c1
JL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 457 libdir=$ac_optarg ;;
861bb6c1
JL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
ba479fd2 464 libexecdir=$ac_optarg ;;
861bb6c1
JL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
ba479fd2 473 localstatedir=$ac_optarg ;;
861bb6c1
JL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 478 mandir=$ac_optarg ;;
861bb6c1
JL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 485 | --no-cr | --no-c | -n)
861bb6c1
JL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 499 oldincludedir=$ac_optarg ;;
861bb6c1
JL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 504 prefix=$ac_optarg ;;
861bb6c1
JL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 511 program_prefix=$ac_optarg ;;
861bb6c1
JL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 518 program_suffix=$ac_optarg ;;
861bb6c1
JL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 535 program_transform_name=$ac_optarg ;;
861bb6c1
JL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
ba479fd2 545 sbindir=$ac_optarg ;;
861bb6c1
JL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
ba479fd2 556 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
ba479fd2 561 site=$ac_optarg ;;
861bb6c1
JL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 566 srcdir=$ac_optarg ;;
861bb6c1
JL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 573 sysconfdir=$ac_optarg ;;
861bb6c1
JL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 576 ac_prev=target_alias ;;
861bb6c1 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 578 target_alias=$ac_optarg ;;
861bb6c1
JL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
ba479fd2
NN
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
861bb6c1
JL
585
586 -with-* | --with-*)
ba479fd2 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 588 # Reject names that are not valid shell variable names.
ba479fd2
NN
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
861bb6c1 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
ba479fd2
NN
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
861bb6c1
JL
595 *) ac_optarg=yes ;;
596 esac
ba479fd2 597 eval "with_$ac_package='$ac_optarg'" ;;
861bb6c1
JL
598
599 -without-* | --without-*)
ba479fd2 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 601 # Reject names that are not valid shell variable names.
ba479fd2
NN
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
861bb6c1
JL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 617 x_includes=$ac_optarg ;;
861bb6c1
JL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 624 x_libraries=$ac_optarg ;;
861bb6c1 625
ba479fd2
NN
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
861bb6c1
JL
629 ;;
630
ba479fd2
NN
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
861bb6c1 641 *)
ba479fd2
NN
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
ba479fd2
NN
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
63cf211a 656fi
63cf211a 657
ba479fd2
NN
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
093e61a6 668
ba479fd2
NN
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
86da66b5 671 localstatedir libdir includedir oldincludedir infodir mandir
861bb6c1 672do
ba479fd2
NN
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
861bb6c1
JL
678 esac
679done
680
ba479fd2
NN
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
6e3f3080 698
ba479fd2
NN
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
861bb6c1 703
861bb6c1
JL
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
ba479fd2
NN
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
861bb6c1
JL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
ba479fd2
NN
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
63cf211a 732 else
ba479fd2
NN
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
63cf211a
NN
735 fi
736fi
ba479fd2
NN
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
6de9cd9a
DN
773ac_env_GMPLIBS_set=${GMPLIBS+set}
774ac_env_GMPLIBS_value=$GMPLIBS
775ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776ac_cv_env_GMPLIBS_value=$GMPLIBS
777ac_env_GMPINC_set=${GMPINC+set}
778ac_env_GMPINC_value=$GMPINC
779ac_cv_env_GMPINC_set=${GMPINC+set}
780ac_cv_env_GMPINC_value=$GMPINC
63cf211a 781
ba479fd2
NN
782#
783# Report the --help message.
784#
785if test "$ac_init_help" = "long"; then
786 # Omit some internal or obsolete options to make the list less imposing.
787 # This message is too long to be a string in the A/UX 3.1 sh.
788 cat <<_ACEOF
789\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 790
ba479fd2 791Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 792
ba479fd2
NN
793To assign environment variables (e.g., CC, CFLAGS...), specify them as
794VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 795
ba479fd2 796Defaults for the options are specified in brackets.
861bb6c1 797
ba479fd2
NN
798Configuration:
799 -h, --help display this help and exit
800 --help=short display options specific to this package
801 --help=recursive display the short help of all the included packages
802 -V, --version display version information and exit
803 -q, --quiet, --silent do not print \`checking...' messages
804 --cache-file=FILE cache test results in FILE [disabled]
805 -C, --config-cache alias for \`--cache-file=config.cache'
806 -n, --no-create do not create output files
807 --srcdir=DIR find the sources in DIR [configure dir or \`..']
808
809_ACEOF
810
811 cat <<_ACEOF
812Installation directories:
813 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 814 [$ac_default_prefix]
ba479fd2 815 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 816 [PREFIX]
861bb6c1 817
ba479fd2
NN
818By default, \`make install' will install all the files in
819\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
820an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821for instance \`--prefix=\$HOME'.
13c22933 822
ba479fd2 823For better control, use the options below.
13c22933 824
ba479fd2
NN
825Fine tuning of the installation directories:
826 --bindir=DIR user executables [EPREFIX/bin]
827 --sbindir=DIR system admin executables [EPREFIX/sbin]
828 --libexecdir=DIR program executables [EPREFIX/libexec]
829 --datadir=DIR read-only architecture-independent data [PREFIX/share]
830 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
831 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
832 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
833 --libdir=DIR object code libraries [EPREFIX/lib]
834 --includedir=DIR C header files [PREFIX/include]
835 --oldincludedir=DIR C header files for non-gcc [/usr/include]
836 --infodir=DIR info documentation [PREFIX/info]
837 --mandir=DIR man documentation [PREFIX/man]
838_ACEOF
13c22933 839
ba479fd2 840 cat <<\_ACEOF
13c22933 841
ba479fd2
NN
842Program names:
843 --program-prefix=PREFIX prepend PREFIX to installed program names
844 --program-suffix=SUFFIX append SUFFIX to installed program names
845 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 846
ba479fd2
NN
847System types:
848 --build=BUILD configure for building on BUILD [guessed]
849 --host=HOST cross-compile to build programs to run on HOST [BUILD]
850 --target=TARGET configure for building compilers for TARGET [HOST]
851_ACEOF
13c22933
JJ
852fi
853
ba479fd2 854if test -n "$ac_init_help"; then
13c22933 855
ba479fd2 856 cat <<\_ACEOF
13c22933 857
ba479fd2
NN
858Optional Features:
859 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
860 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
861 --enable-generated-files-in-srcdir
862 put copies of generated files in source dir
863 intended for creating source tarballs for users
864 without texinfo bison or flex.
09a9c095 865 --enable-werror-always enable -Werror always
ba479fd2
NN
866 --enable-werror enable -Werror in bootstrap stage2 and later
867 --enable-checking=LIST
868 enable expensive run-time checks. With LIST,
869 enable only specific categories of checks.
870 Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
871 default is misc,tree,gc,rtlflag
74ee1642 872 --enable-mapped-location location_t is fileline integer cookie
ba479fd2
NN
873 --enable-coverage=LEVEL
874 enable compiler\'s code coverage collection.
875 Use to measure compiler performance and locate
876 unused parts of the compiler. With LEVEL, specify
877 optimization. Values are opt, noopt,
878 default is noopt
879 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
880 --enable-multilib enable library support for multiple ABIs
881 --enable-__cxa_atexit enable __cxa_atexit for C++
882 --enable-threads enable thread usage for target GCC
883 --enable-threads=LIB use LIB thread package for target GCC
884 --enable-objc-gc enable the use of Boehm's garbage collector with
885 the GNU Objective-C runtime
886 --disable-shared don't provide a shared libgcc
887 --enable-intermodule build the compiler in one step
f3c9f174 888 --enable-languages=LIST specify which front-ends to build
ba479fd2
NN
889 --enable-initfini-array use .init_array/.fini_array sections
890 --enable-sjlj-exceptions
891 arrange to use setjmp/longjmp exception handling
892 --enable-libunwind-exceptions force use libunwind for exceptions
893 --disable-win32-registry
894 disable lookup of installation paths in the
895 Registry on Windows hosts
896 --enable-win32-registry enable registry lookup (default)
897 --enable-win32-registry=KEY
898 use KEY instead of GCC version as the last portion
899 of the registry key
900 --enable-maintainer-mode
901 enable make rules and dependencies not useful
902 (and sometimes confusing) to the casual installer
903 --enable-version-specific-runtime-libs
904 specify that runtime libraries should be
905 installed in a compiler-specific directory
093e61a6 906
ba479fd2
NN
907Optional Packages:
908 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
909 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
910 --with-local-prefix=DIR specifies directory to put local include
911 --with-gxx-include-dir=DIR
912 specifies directory to put g++ header files
913 --with-cpp-install-dir=DIR
914 install the user visible C preprocessor in DIR
915 (relative to PREFIX) as well as PREFIX/bin
916 --with-gnu-ld arrange to work with GNU ld.
917 --with-ld arrange to use the specified ld (full pathname)
918 --with-gnu-as arrange to work with GNU as
919 --with-as arrange to use the specified as (full pathname)
920 --with-stabs arrange to use stabs instead of host debug format
921 --with-dwarf2 force the default debug format to be DWARF 2
922 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
923 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
59415997 924 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
925 with the compiler
926 --with-system-zlib use installed libz
6de9cd9a 927 --with-libbanshee enable libbanshee
ba479fd2 928 --with-slibdir=DIR shared libraries in DIR LIBDIR
13c22933 929
ba479fd2
NN
930Some influential environment variables:
931 CC C compiler command
932 CFLAGS C compiler flags
933 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
934 nonstandard directory <lib dir>
935 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
936 headers in a nonstandard directory <include dir>
937 CPP C preprocessor
6de9cd9a
DN
938 GMPLIBS How to link GMP
939 GMPINC How to find GMP include files
13c22933 940
ba479fd2
NN
941Use these variables to override the choices made by `configure' or to help
942it to find libraries and programs with nonstandard names/locations.
73458fb7 943
ba479fd2
NN
944_ACEOF
945fi
6e3f3080 946
ba479fd2
NN
947if test "$ac_init_help" = "recursive"; then
948 # If there are subdirs, report their specific --help.
949 ac_popdir=`pwd`
950 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
951 test -d $ac_dir || continue
952 ac_builddir=.
953
954if test "$ac_dir" != .; then
955 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
956 # A "../" for each directory in $ac_dir_suffix.
957 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
958else
959 ac_dir_suffix= ac_top_builddir=
960fi
961
962case $srcdir in
963 .) # No --srcdir option. We are building in place.
964 ac_srcdir=.
965 if test -z "$ac_top_builddir"; then
966 ac_top_srcdir=.
967 else
968 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
969 fi ;;
970 [\\/]* | ?:[\\/]* ) # Absolute path.
971 ac_srcdir=$srcdir$ac_dir_suffix;
972 ac_top_srcdir=$srcdir ;;
973 *) # Relative path.
974 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
975 ac_top_srcdir=$ac_top_builddir$srcdir ;;
976esac
8ab705be
KC
977
978# Do not use `cd foo && pwd` to compute absolute paths, because
979# the directories may not exist.
980case `pwd` in
981.) ac_abs_builddir="$ac_dir";;
86da66b5 982*)
8ab705be
KC
983 case "$ac_dir" in
984 .) ac_abs_builddir=`pwd`;;
985 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
986 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
987 esac;;
988esac
8ab705be 989case $ac_abs_builddir in
86da66b5
HPN
990.) ac_abs_top_builddir=${ac_top_builddir}.;;
991*)
992 case ${ac_top_builddir}. in
8ab705be 993 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 994 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 995 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
996 esac;;
997esac
8ab705be 998case $ac_abs_builddir in
86da66b5
HPN
999.) ac_abs_srcdir=$ac_srcdir;;
1000*)
1001 case $ac_srcdir in
8ab705be 1002 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 1003 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 1004 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
1005 esac;;
1006esac
8ab705be 1007case $ac_abs_builddir in
86da66b5
HPN
1008.) ac_abs_top_srcdir=$ac_top_srcdir;;
1009*)
1010 case $ac_top_srcdir in
8ab705be 1011 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 1012 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 1013 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
1014 esac;;
1015esac
ba479fd2
NN
1016
1017 cd $ac_dir
1018 # Check for guested configure; otherwise get Cygnus style configure.
1019 if test -f $ac_srcdir/configure.gnu; then
1020 echo
1021 $SHELL $ac_srcdir/configure.gnu --help=recursive
1022 elif test -f $ac_srcdir/configure; then
1023 echo
1024 $SHELL $ac_srcdir/configure --help=recursive
1025 elif test -f $ac_srcdir/configure.ac ||
86da66b5 1026 test -f $ac_srcdir/configure.in; then
ba479fd2
NN
1027 echo
1028 $ac_configure --help
1029 else
1030 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1031 fi
2fac9c01 1032 cd $ac_popdir
ba479fd2
NN
1033 done
1034fi
1035
1036test -n "$ac_init_help" && exit 0
1037if $ac_init_version; then
1038 cat <<\_ACEOF
1039
86da66b5 1040Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
1041This configure script is free software; the Free Software Foundation
1042gives unlimited permission to copy, distribute and modify it.
1043_ACEOF
1044 exit 0
1045fi
1046exec 5>config.log
1047cat >&5 <<_ACEOF
1048This file contains any messages produced by compilers while
1049running configure, to aid debugging if configure makes a mistake.
1050
1051It was created by $as_me, which was
8ab705be 1052generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
1053
1054 $ $0 $@
1055
1056_ACEOF
1057{
1058cat <<_ASUNAME
1059## --------- ##
1060## Platform. ##
1061## --------- ##
1062
1063hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1064uname -m = `(uname -m) 2>/dev/null || echo unknown`
1065uname -r = `(uname -r) 2>/dev/null || echo unknown`
1066uname -s = `(uname -s) 2>/dev/null || echo unknown`
1067uname -v = `(uname -v) 2>/dev/null || echo unknown`
1068
1069/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1070/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1071
1072/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1073/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1074/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1075hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1076/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1077/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1078/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1079
1080_ASUNAME
1081
1082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1083for as_dir in $PATH
1084do
1085 IFS=$as_save_IFS
1086 test -z "$as_dir" && as_dir=.
1087 echo "PATH: $as_dir"
1088done
1089
1090} >&5
1091
1092cat >&5 <<_ACEOF
1093
1094
1095## ----------- ##
1096## Core tests. ##
1097## ----------- ##
1098
1099_ACEOF
1100
1101
1102# Keep a trace of the command line.
1103# Strip out --no-create and --no-recursion so they do not pile up.
1104# Strip out --silent because we don't want to record it for future runs.
1105# Also quote any args containing shell meta-characters.
1106# Make two passes to allow for proper duplicate-argument suppression.
1107ac_configure_args=
1108ac_configure_args0=
1109ac_configure_args1=
1110ac_sep=
1111ac_must_keep_next=false
1112for ac_pass in 1 2
1113do
1114 for ac_arg
1115 do
1116 case $ac_arg in
1117 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 continue ;;
1121 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1122 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1123 esac
1124 case $ac_pass in
1125 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1126 2)
1127 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1128 if test $ac_must_keep_next = true; then
86da66b5 1129 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1130 else
86da66b5
HPN
1131 case $ac_arg in
1132 *=* | --config-cache | -C | -disable-* | --disable-* \
1133 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1134 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1135 | -with-* | --with-* | -without-* | --without-* | --x)
1136 case "$ac_configure_args0 " in
1137 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1138 esac
1139 ;;
1140 -* ) ac_must_keep_next=true ;;
1141 esac
ba479fd2
NN
1142 fi
1143 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1144 # Get rid of the leading space.
1145 ac_sep=" "
1146 ;;
1147 esac
1148 done
1149done
1150$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1151$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1152
1153# When interrupted or exit'd, cleanup temporary files, and complete
1154# config.log. We remove comments because anyway the quotes in there
1155# would cause problems or look ugly.
1156# WARNING: Be sure not to use single quotes in there, as some shells,
1157# such as our DU 5.0 friend, will then `close' the trap.
1158trap 'exit_status=$?
1159 # Save into config.log some information that might help in debugging.
1160 {
1161 echo
1162
1163 cat <<\_ASBOX
1164## ---------------- ##
1165## Cache variables. ##
1166## ---------------- ##
1167_ASBOX
1168 echo
1169 # The following way of writing the cache mishandles newlines in values,
1170{
1171 (set) 2>&1 |
1172 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1173 *ac_space=\ *)
1174 sed -n \
86da66b5
HPN
1175 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1176 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
ba479fd2
NN
1177 ;;
1178 *)
1179 sed -n \
86da66b5 1180 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
1181 ;;
1182 esac;
1183}
1184 echo
1185
1186 cat <<\_ASBOX
1187## ----------------- ##
1188## Output variables. ##
1189## ----------------- ##
1190_ASBOX
1191 echo
1192 for ac_var in $ac_subst_vars
1193 do
1194 eval ac_val=$`echo $ac_var`
1195 echo "$ac_var='"'"'$ac_val'"'"'"
1196 done | sort
1197 echo
1198
1199 if test -n "$ac_subst_files"; then
1200 cat <<\_ASBOX
1201## ------------- ##
1202## Output files. ##
1203## ------------- ##
1204_ASBOX
1205 echo
1206 for ac_var in $ac_subst_files
1207 do
1208 eval ac_val=$`echo $ac_var`
86da66b5 1209 echo "$ac_var='"'"'$ac_val'"'"'"
ba479fd2
NN
1210 done | sort
1211 echo
1212 fi
1213
1214 if test -s confdefs.h; then
1215 cat <<\_ASBOX
1216## ----------- ##
1217## confdefs.h. ##
1218## ----------- ##
1219_ASBOX
1220 echo
1221 sed "/^$/d" confdefs.h | sort
1222 echo
1223 fi
1224 test "$ac_signal" != 0 &&
1225 echo "$as_me: caught signal $ac_signal"
1226 echo "$as_me: exit $exit_status"
1227 } >&5
86da66b5 1228 rm -f core *.core &&
ba479fd2
NN
1229 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1230 exit $exit_status
1231 ' 0
1232for ac_signal in 1 2 13 15; do
1233 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1234done
1235ac_signal=0
1236
1237# confdefs.h avoids OS command line length limits that DEFS can exceed.
1238rm -rf conftest* confdefs.h
1239# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1240echo >confdefs.h
1241
1242# Predefined preprocessor variables.
1243
1244cat >>confdefs.h <<_ACEOF
1245#define PACKAGE_NAME "$PACKAGE_NAME"
1246_ACEOF
1247
1248
1249cat >>confdefs.h <<_ACEOF
1250#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1251_ACEOF
1252
1253
1254cat >>confdefs.h <<_ACEOF
1255#define PACKAGE_VERSION "$PACKAGE_VERSION"
1256_ACEOF
1257
1258
1259cat >>confdefs.h <<_ACEOF
1260#define PACKAGE_STRING "$PACKAGE_STRING"
1261_ACEOF
1262
1263
1264cat >>confdefs.h <<_ACEOF
1265#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1266_ACEOF
1267
1268
1269# Let the site file select an alternate cache file if it wants to.
1270# Prefer explicitly selected file to automatically selected ones.
1271if test -z "$CONFIG_SITE"; then
1272 if test "x$prefix" != xNONE; then
1273 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1274 else
1275 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1276 fi
1277fi
1278for ac_site_file in $CONFIG_SITE; do
1279 if test -r "$ac_site_file"; then
1280 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1281echo "$as_me: loading site script $ac_site_file" >&6;}
1282 sed 's/^/| /' "$ac_site_file" >&5
1283 . "$ac_site_file"
1284 fi
1285done
1286
1287if test -r "$cache_file"; then
1288 # Some versions of bash will fail to source /dev/null (special
1289 # files actually), so we avoid doing that.
1290 if test -f "$cache_file"; then
1291 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1292echo "$as_me: loading cache $cache_file" >&6;}
1293 case $cache_file in
1294 [\\/]* | ?:[\\/]* ) . $cache_file;;
1295 *) . ./$cache_file;;
1296 esac
1297 fi
1298else
1299 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1300echo "$as_me: creating cache $cache_file" >&6;}
1301 >$cache_file
1302fi
1303
1304# Check that the precious variables saved in the cache have kept the same
1305# value.
1306ac_cache_corrupted=false
1307for ac_var in `(set) 2>&1 |
86da66b5 1308 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
ba479fd2
NN
1309 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1310 eval ac_new_set=\$ac_env_${ac_var}_set
1311 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1312 eval ac_new_val="\$ac_env_${ac_var}_value"
1313 case $ac_old_set,$ac_new_set in
1314 set,)
1315 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1316echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1317 ac_cache_corrupted=: ;;
1318 ,set)
1319 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1320echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1321 ac_cache_corrupted=: ;;
1322 ,);;
1323 *)
1324 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1325 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1326echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1327 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1328echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1329 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1330echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1331 ac_cache_corrupted=:
ba479fd2
NN
1332 fi;;
1333 esac
1334 # Pass precious variables to config.status.
1335 if test "$ac_new_set" = set; then
1336 case $ac_new_val in
1337 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1338 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1339 *) ac_arg=$ac_var=$ac_new_val ;;
1340 esac
1341 case " $ac_configure_args " in
1342 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1343 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1344 esac
1345 fi
1346done
1347if $ac_cache_corrupted; then
1348 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1349echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1350 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1351echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1352 { (exit 1); exit 1; }; }
1353fi
1354
1355ac_ext=c
1356ac_cpp='$CPP $CPPFLAGS'
1357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1359ac_compiler_gnu=$ac_cv_c_compiler_gnu
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
914c5af7 1379
ba479fd2
NN
1380 ac_config_headers="$ac_config_headers auto-host.h:config.in"
1381
1382
1383# Determine the host, build, and target systems
1384ac_aux_dir=
1385for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1386 if test -f $ac_dir/install-sh; then
1387 ac_aux_dir=$ac_dir
1388 ac_install_sh="$ac_aux_dir/install-sh -c"
1389 break
1390 elif test -f $ac_dir/install.sh; then
1391 ac_aux_dir=$ac_dir
1392 ac_install_sh="$ac_aux_dir/install.sh -c"
1393 break
1394 elif test -f $ac_dir/shtool; then
1395 ac_aux_dir=$ac_dir
1396 ac_install_sh="$ac_aux_dir/shtool install -c"
1397 break
1398 fi
1399done
1400if test -z "$ac_aux_dir"; then
1401 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1402echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1403 { (exit 1); exit 1; }; }
1404fi
1405ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1406ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1407ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1408
1409# Make sure we can run config.sub.
1410$ac_config_sub sun4 >/dev/null 2>&1 ||
1411 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1412echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1413 { (exit 1); exit 1; }; }
1414
1415echo "$as_me:$LINENO: checking build system type" >&5
1416echo $ECHO_N "checking build system type... $ECHO_C" >&6
1417if test "${ac_cv_build+set}" = set; then
1418 echo $ECHO_N "(cached) $ECHO_C" >&6
1419else
1420 ac_cv_build_alias=$build_alias
1421test -z "$ac_cv_build_alias" &&
1422 ac_cv_build_alias=`$ac_config_guess`
1423test -z "$ac_cv_build_alias" &&
1424 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1425echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1426 { (exit 1); exit 1; }; }
1427ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1428 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1429echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1430 { (exit 1); exit 1; }; }
1431
1432fi
1433echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1434echo "${ECHO_T}$ac_cv_build" >&6
1435build=$ac_cv_build
1436build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1437build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1438build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1439
1440
1441echo "$as_me:$LINENO: checking host system type" >&5
1442echo $ECHO_N "checking host system type... $ECHO_C" >&6
1443if test "${ac_cv_host+set}" = set; then
1444 echo $ECHO_N "(cached) $ECHO_C" >&6
1445else
1446 ac_cv_host_alias=$host_alias
1447test -z "$ac_cv_host_alias" &&
1448 ac_cv_host_alias=$ac_cv_build_alias
1449ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1450 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1451echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1452 { (exit 1); exit 1; }; }
1453
1454fi
1455echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1456echo "${ECHO_T}$ac_cv_host" >&6
1457host=$ac_cv_host
1458host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1459host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1460host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1461
1462
1463echo "$as_me:$LINENO: checking target system type" >&5
1464echo $ECHO_N "checking target system type... $ECHO_C" >&6
1465if test "${ac_cv_target+set}" = set; then
1466 echo $ECHO_N "(cached) $ECHO_C" >&6
1467else
1468 ac_cv_target_alias=$target_alias
1469test "x$ac_cv_target_alias" = "x" &&
1470 ac_cv_target_alias=$ac_cv_host_alias
1471ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1472 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1473echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1474 { (exit 1); exit 1; }; }
1475
1476fi
1477echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1478echo "${ECHO_T}$ac_cv_target" >&6
1479target=$ac_cv_target
1480target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1481target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1482target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1483
1484
1485# The aliases save the names the user supplied, while $host etc.
1486# will get canonicalized.
1487test -n "$target_alias" &&
1488 test "$program_prefix$program_suffix$program_transform_name" = \
1489 NONENONEs,x,x, &&
1490 program_prefix=${target_alias}-
1491
1492# Determine the noncanonical target name, for directory use.
1493 case ${build_alias} in
1494 "") build_noncanonical=${build} ;;
6e3f3080
NN
1495 *) build_noncanonical=${build_alias} ;;
1496esac
73458fb7 1497
4665e56c
NN
1498 case ${host_alias} in
1499 "") host_noncanonical=${build_noncanonical} ;;
1500 *) host_noncanonical=${host_alias} ;;
1501esac
73458fb7 1502
4665e56c
NN
1503 case ${target_alias} in
1504 "") target_noncanonical=${host_noncanonical} ;;
1505 *) target_noncanonical=${target_alias} ;;
1506esac
093e61a6 1507
caa55b1e
NN
1508
1509# Determine the target- and build-specific subdirectories
4665e56c
NN
1510 # Prefix 'build-' so this never conflicts with target_subdir.
1511build_subdir="build-${build_noncanonical}"
1512# Not really a subdirectory, but here for completeness.
1513host_subdir=.
1514# No prefix.
1515target_subdir=${target_noncanonical}
ba479fd2 1516
73458fb7 1517
093e61a6 1518# Set program_transform_name
13c22933 1519test "$program_prefix" != NONE &&
ba479fd2 1520 program_transform_name="s,^,$program_prefix,;$program_transform_name"
13c22933
JJ
1521# Use a double $ so make ignores it.
1522test "$program_suffix" != NONE &&
ba479fd2
NN
1523 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1524# Double any \ or $. echo might interpret backslashes.
1525# By default was `s,x,x', remove it if useless.
1526cat <<\_ACEOF >conftest.sed
1527s/[\\$]/&&/g;s/;s,x,x,$//
1528_ACEOF
1529program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1530rm conftest.sed
13c22933
JJ
1531
1532
34a86c2b
NN
1533# Check for bogus environment variables.
1534# Test if LIBRARY_PATH contains the notation for the current directory
1535# since this would lead to problems installing/building glibc.
1536# LIBRARY_PATH contains the current directory if one of the following
1537# is true:
1538# - one of the terminals (":" and ";") is the first or last sign
1539# - two terminals occur directly after each other
1540# - the path contains an element with a dot in it
ba479fd2
NN
1541echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1542echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
34a86c2b
NN
1543case ${LIBRARY_PATH} in
1544 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1545 library_path_setting="contains current directory"
1546 ;;
1547 *)
1548 library_path_setting="ok"
1549 ;;
1550esac
ba479fd2
NN
1551echo "$as_me:$LINENO: result: $library_path_setting" >&5
1552echo "${ECHO_T}$library_path_setting" >&6
34a86c2b 1553if test "$library_path_setting" != "ok"; then
ba479fd2 1554{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
1555*** LIBRARY_PATH shouldn't contain the current directory when
1556*** building gcc. Please change the environment variable
ba479fd2
NN
1557*** and run configure again." >&5
1558echo "$as_me: error:
1559*** LIBRARY_PATH shouldn't contain the current directory when
1560*** building gcc. Please change the environment variable
1561*** and run configure again." >&2;}
1562 { (exit 1); exit 1; }; }
e9a25f70
JL
1563fi
1564
34a86c2b
NN
1565# Test if GCC_EXEC_PREFIX contains the notation for the current directory
1566# since this would lead to problems installing/building glibc.
1567# GCC_EXEC_PREFIX contains the current directory if one of the following
1568# is true:
1569# - one of the terminals (":" and ";") is the first or last sign
1570# - two terminals occur directly after each other
1571# - the path contains an element with a dot in it
ba479fd2
NN
1572echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1573echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
34a86c2b
NN
1574case ${GCC_EXEC_PREFIX} in
1575 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1576 gcc_exec_prefix_setting="contains current directory"
1577 ;;
1578 *)
1579 gcc_exec_prefix_setting="ok"
1580 ;;
1581esac
ba479fd2
NN
1582echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1583echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
34a86c2b 1584if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
1585{ { echo "$as_me:$LINENO: error:
1586*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1587*** building gcc. Please change the environment variable
1588*** and run configure again." >&5
1589echo "$as_me: error:
cafe096b
EC
1590*** GCC_EXEC_PREFIX shouldn't contain the current directory when
1591*** building gcc. Please change the environment variable
ba479fd2
NN
1592*** and run configure again." >&2;}
1593 { (exit 1); exit 1; }; }
34a86c2b
NN
1594fi
1595
1596# -----------
1597# Directories
1598# -----------
1599
1600# Specify the local prefix
1601local_prefix=
ba479fd2 1602
34a86c2b
NN
1603# Check whether --with-local-prefix or --without-local-prefix was given.
1604if test "${with_local_prefix+set}" = set; then
1605 withval="$with_local_prefix"
1606 case "${withval}" in
ba479fd2
NN
1607yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1608echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1609 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1610no) ;;
1611*) local_prefix=$with_local_prefix ;;
1612esac
ba479fd2 1613fi;
34a86c2b
NN
1614
1615# Default local prefix if it is empty
1616if test x$local_prefix = x; then
1617 local_prefix=/usr/local
1618fi
1619
1620# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1621# passed in by the toplevel make and thus we'd get different behavior
1622# depending on where we built the sources.
1623gcc_gxx_include_dir=
1624# Specify the g++ header file directory
ba479fd2 1625
34a86c2b
NN
1626# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1627if test "${with_gxx_include_dir+set}" = set; then
1628 withval="$with_gxx_include_dir"
1629 case "${withval}" in
ba479fd2
NN
1630yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1631echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1632 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
1633no) ;;
1634*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
1635esac
ba479fd2 1636fi;
34a86c2b
NN
1637
1638if test x${gcc_gxx_include_dir} = x; then
1639 if test x${enable_version_specific_runtime_libs} = xyes; then
1640 gcc_gxx_include_dir='${libsubdir}/include/c++'
1641 else
1642 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
1643 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
1644 fi
1645fi
1646
ba479fd2 1647
34a86c2b
NN
1648# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1649if test "${with_cpp_install_dir+set}" = set; then
1650 withval="$with_cpp_install_dir"
1651 if test x$withval = xyes; then
ba479fd2
NN
1652 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1653echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1654 { (exit 1); exit 1; }; }
34a86c2b
NN
1655elif test x$withval != xno; then
1656 cpp_install_dir=$withval
1657fi
ba479fd2 1658fi;
34a86c2b 1659
51b9ff45 1660# We would like to our source tree to be readonly. However when releases or
ba479fd2 1661# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 1662# various formats of manuals need to be included along with the rest of the
ba479fd2 1663# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
1664# just that.
1665
03787dfd
KC
1666echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1667echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1668 # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
51b9ff45
KC
1669if test "${enable_generated_files_in_srcdir+set}" = set; then
1670 enableval="$enable_generated_files_in_srcdir"
03787dfd 1671 generated_files_in_srcdir=$enableval
51b9ff45 1672else
03787dfd 1673 generated_files_in_srcdir=no
ba479fd2 1674fi;
51b9ff45 1675
03787dfd
KC
1676echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1677echo "${ECHO_T}$generated_files_in_srcdir" >&6
1678
1679if test "$generated_files_in_srcdir" = "yes"; then
1680 GENINSRC=''
03787dfd
KC
1681else
1682 GENINSRC='#'
03787dfd
KC
1683fi
1684
1685
34a86c2b
NN
1686# -------------------
1687# Find default linker
1688# -------------------
1689
1690# With GNU ld
ba479fd2 1691
34a86c2b
NN
1692# Check whether --with-gnu-ld or --without-gnu-ld was given.
1693if test "${with_gnu_ld+set}" = set; then
1694 withval="$with_gnu_ld"
1695 gnu_ld_flag="$with_gnu_ld"
1696else
1697 gnu_ld_flag=no
ba479fd2 1698fi;
6e3f3080 1699
63cf211a 1700# With pre-defined ld
ba479fd2 1701
34a86c2b
NN
1702# Check whether --with-ld or --without-ld was given.
1703if test "${with_ld+set}" = set; then
1704 withval="$with_ld"
1705 DEFAULT_LINKER="$with_ld"
ba479fd2 1706fi;
34a86c2b
NN
1707if test x"${DEFAULT_LINKER+set}" = x"set"; then
1708 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
1709 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1710echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1711 { (exit 1); exit 1; }; }
34a86c2b
NN
1712 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1713 gnu_ld_flag=yes
1714 fi
ba479fd2
NN
1715
1716cat >>confdefs.h <<_ACEOF
34a86c2b 1717#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 1718_ACEOF
34a86c2b
NN
1719
1720fi
1721
ba479fd2
NN
1722echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1723echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
34a86c2b
NN
1724if test x"${DEFAULT_LINKER+set}" = x"set"; then
1725 if test x"$gnu_ld_flag" = x"no"; then
ba479fd2
NN
1726 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1727echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
34a86c2b 1728 else
ba479fd2
NN
1729 echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1730echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
34a86c2b
NN
1731 fi
1732else
ba479fd2
NN
1733 echo "$as_me:$LINENO: result: no" >&5
1734echo "${ECHO_T}no" >&6
34a86c2b
NN
1735fi
1736
1737# ----------------------
1738# Find default assembler
1739# ----------------------
1740
1741# With GNU as
ba479fd2 1742
34a86c2b
NN
1743# Check whether --with-gnu-as or --without-gnu-as was given.
1744if test "${with_gnu_as+set}" = set; then
1745 withval="$with_gnu_as"
1746 gas_flag="$with_gnu_as"
1747else
1748 gas_flag=no
ba479fd2 1749fi;
34a86c2b
NN
1750
1751
1752# Check whether --with-as or --without-as was given.
1753if test "${with_as+set}" = set; then
1754 withval="$with_as"
1755 DEFAULT_ASSEMBLER="$with_as"
ba479fd2 1756fi;
34a86c2b
NN
1757if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1758 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
1759 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1760echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1761 { (exit 1); exit 1; }; }
34a86c2b
NN
1762 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1763 gas_flag=yes
1764 fi
ba479fd2
NN
1765
1766cat >>confdefs.h <<_ACEOF
34a86c2b 1767#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 1768_ACEOF
34a86c2b
NN
1769
1770fi
1771
ba479fd2
NN
1772echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1773echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
34a86c2b
NN
1774if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1775 if test x"$gas_flag" = x"no"; then
ba479fd2
NN
1776 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1777echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
34a86c2b 1778 else
ba479fd2
NN
1779 echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1780echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
34a86c2b
NN
1781 fi
1782else
ba479fd2
NN
1783 echo "$as_me:$LINENO: result: no" >&5
1784echo "${ECHO_T}no" >&6
34a86c2b
NN
1785fi
1786
1787# ---------------
1788# Find C compiler
1789# ---------------
1790
426ca3ca
RO
1791# If a non-executable a.out is present (e.g. created by GNU as above even if
1792# invoked with -v only), the IRIX 6 native ld just overwrites the existing
1793# file, even when creating an executable, so an execution test fails.
1794# Remove possible default executable files to avoid this.
1795#
1796# FIXME: This really belongs into AC_PROG_CC and can be removed once
1797# Autoconf includes it.
1798rm -f a.out a.exe b.out
1799
34a86c2b 1800# Find the native compiler
ba479fd2
NN
1801ac_ext=c
1802ac_cpp='$CPP $CPPFLAGS'
1803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
1806if test -n "$ac_tool_prefix"; then
1807 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1808set dummy ${ac_tool_prefix}gcc; ac_word=$2
1809echo "$as_me:$LINENO: checking for $ac_word" >&5
1810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1811if test "${ac_cv_prog_CC+set}" = set; then
1812 echo $ECHO_N "(cached) $ECHO_C" >&6
1813else
1814 if test -n "$CC"; then
1815 ac_cv_prog_CC="$CC" # Let the user override the test.
1816else
1817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1818for as_dir in $PATH
1819do
1820 IFS=$as_save_IFS
1821 test -z "$as_dir" && as_dir=.
1822 for ac_exec_ext in '' $ac_executable_extensions; do
1823 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1824 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1826 break 2
1827 fi
1828done
1829done
1830
1831fi
1832fi
1833CC=$ac_cv_prog_CC
1834if test -n "$CC"; then
1835 echo "$as_me:$LINENO: result: $CC" >&5
1836echo "${ECHO_T}$CC" >&6
1837else
1838 echo "$as_me:$LINENO: result: no" >&5
1839echo "${ECHO_T}no" >&6
1840fi
1841
1842fi
1843if test -z "$ac_cv_prog_CC"; then
1844 ac_ct_CC=$CC
1845 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 1846set dummy gcc; ac_word=$2
ba479fd2
NN
1847echo "$as_me:$LINENO: checking for $ac_word" >&5
1848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1849if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1850 echo $ECHO_N "(cached) $ECHO_C" >&6
1851else
1852 if test -n "$ac_ct_CC"; then
1853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1854else
1855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1856for as_dir in $PATH
1857do
1858 IFS=$as_save_IFS
1859 test -z "$as_dir" && as_dir=.
1860 for ac_exec_ext in '' $ac_executable_extensions; do
1861 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1862 ac_cv_prog_ac_ct_CC="gcc"
1863 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1864 break 2
1865 fi
1866done
1867done
1868
1869fi
1870fi
1871ac_ct_CC=$ac_cv_prog_ac_ct_CC
1872if test -n "$ac_ct_CC"; then
1873 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1874echo "${ECHO_T}$ac_ct_CC" >&6
1875else
1876 echo "$as_me:$LINENO: result: no" >&5
1877echo "${ECHO_T}no" >&6
1878fi
1879
1880 CC=$ac_ct_CC
1881else
1882 CC="$ac_cv_prog_CC"
1883fi
1884
1885if test -z "$CC"; then
1886 if test -n "$ac_tool_prefix"; then
1887 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1888set dummy ${ac_tool_prefix}cc; ac_word=$2
1889echo "$as_me:$LINENO: checking for $ac_word" >&5
1890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1891if test "${ac_cv_prog_CC+set}" = set; then
1892 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
1893else
1894 if test -n "$CC"; then
1895 ac_cv_prog_CC="$CC" # Let the user override the test.
1896else
ba479fd2
NN
1897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1898for as_dir in $PATH
1899do
1900 IFS=$as_save_IFS
1901 test -z "$as_dir" && as_dir=.
1902 for ac_exec_ext in '' $ac_executable_extensions; do
1903 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1904 ac_cv_prog_CC="${ac_tool_prefix}cc"
1905 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1906 break 2
1907 fi
1908done
1909done
1910
cd9e5e7c
MK
1911fi
1912fi
ba479fd2 1913CC=$ac_cv_prog_CC
cd9e5e7c 1914if test -n "$CC"; then
ba479fd2
NN
1915 echo "$as_me:$LINENO: result: $CC" >&5
1916echo "${ECHO_T}$CC" >&6
1917else
1918 echo "$as_me:$LINENO: result: no" >&5
1919echo "${ECHO_T}no" >&6
1920fi
1921
1922fi
1923if test -z "$ac_cv_prog_CC"; then
1924 ac_ct_CC=$CC
1925 # Extract the first word of "cc", so it can be a program name with args.
1926set dummy cc; ac_word=$2
1927echo "$as_me:$LINENO: checking for $ac_word" >&5
1928echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1929if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1930 echo $ECHO_N "(cached) $ECHO_C" >&6
1931else
1932 if test -n "$ac_ct_CC"; then
1933 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1934else
1935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1936for as_dir in $PATH
1937do
1938 IFS=$as_save_IFS
1939 test -z "$as_dir" && as_dir=.
1940 for ac_exec_ext in '' $ac_executable_extensions; do
1941 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1942 ac_cv_prog_ac_ct_CC="cc"
1943 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1944 break 2
1945 fi
1946done
1947done
1948
1949fi
1950fi
1951ac_ct_CC=$ac_cv_prog_ac_ct_CC
1952if test -n "$ac_ct_CC"; then
1953 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1954echo "${ECHO_T}$ac_ct_CC" >&6
1955else
1956 echo "$as_me:$LINENO: result: no" >&5
1957echo "${ECHO_T}no" >&6
1958fi
1959
1960 CC=$ac_ct_CC
cd9e5e7c 1961else
ba479fd2 1962 CC="$ac_cv_prog_CC"
e9a25f70 1963fi
6e3f3080 1964
ba479fd2 1965fi
6e3f3080
NN
1966if test -z "$CC"; then
1967 # Extract the first word of "cc", so it can be a program name with args.
1968set dummy cc; ac_word=$2
ba479fd2
NN
1969echo "$as_me:$LINENO: checking for $ac_word" >&5
1970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1971if test "${ac_cv_prog_CC+set}" = set; then
1972 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
1973else
1974 if test -n "$CC"; then
1975 ac_cv_prog_CC="$CC" # Let the user override the test.
1976else
1977 ac_prog_rejected=no
ba479fd2
NN
1978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1979for as_dir in $PATH
1980do
1981 IFS=$as_save_IFS
1982 test -z "$as_dir" && as_dir=.
1983 for ac_exec_ext in '' $ac_executable_extensions; do
1984 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1985 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1986 ac_prog_rejected=yes
1987 continue
1988 fi
1989 ac_cv_prog_CC="cc"
1990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1991 break 2
1992 fi
1993done
1994done
1995
6e3f3080
NN
1996if test $ac_prog_rejected = yes; then
1997 # We found a bogon in the path, so make sure we never use it.
1998 set dummy $ac_cv_prog_CC
1999 shift
ba479fd2 2000 if test $# != 0; then
6e3f3080
NN
2001 # We chose a different compiler from the bogus one.
2002 # However, it has the same basename, so the bogon will be chosen
2003 # first if we set CC to just the basename; use the full file name.
2004 shift
ba479fd2 2005 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2006 fi
6e3f3080
NN
2007fi
2008fi
2009fi
ba479fd2 2010CC=$ac_cv_prog_CC
6e3f3080 2011if test -n "$CC"; then
ba479fd2
NN
2012 echo "$as_me:$LINENO: result: $CC" >&5
2013echo "${ECHO_T}$CC" >&6
e9a25f70 2014else
ba479fd2
NN
2015 echo "$as_me:$LINENO: result: no" >&5
2016echo "${ECHO_T}no" >&6
e9a25f70 2017fi
6e3f3080 2018
ba479fd2
NN
2019fi
2020if test -z "$CC"; then
2021 if test -n "$ac_tool_prefix"; then
2022 for ac_prog in cl
2023 do
2024 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2025set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2026echo "$as_me:$LINENO: checking for $ac_word" >&5
2027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2028if test "${ac_cv_prog_CC+set}" = set; then
2029 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2030else
6e3f3080
NN
2031 if test -n "$CC"; then
2032 ac_cv_prog_CC="$CC" # Let the user override the test.
2033else
ba479fd2
NN
2034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2043 break 2
2044 fi
2045done
2046done
2047
093e61a6 2048fi
6e3f3080 2049fi
ba479fd2 2050CC=$ac_cv_prog_CC
6e3f3080 2051if test -n "$CC"; then
ba479fd2
NN
2052 echo "$as_me:$LINENO: result: $CC" >&5
2053echo "${ECHO_T}$CC" >&6
6e3f3080 2054else
ba479fd2
NN
2055 echo "$as_me:$LINENO: result: no" >&5
2056echo "${ECHO_T}no" >&6
093e61a6 2057fi
cafe096b 2058
ba479fd2
NN
2059 test -n "$CC" && break
2060 done
2061fi
2062if test -z "$CC"; then
2063 ac_ct_CC=$CC
2064 for ac_prog in cl
2065do
2066 # Extract the first word of "$ac_prog", so it can be a program name with args.
2067set dummy $ac_prog; ac_word=$2
2068echo "$as_me:$LINENO: checking for $ac_word" >&5
2069echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2070if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2071 echo $ECHO_N "(cached) $ECHO_C" >&6
2072else
2073 if test -n "$ac_ct_CC"; then
2074 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2075else
2076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2077for as_dir in $PATH
2078do
2079 IFS=$as_save_IFS
2080 test -z "$as_dir" && as_dir=.
2081 for ac_exec_ext in '' $ac_executable_extensions; do
2082 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2083 ac_cv_prog_ac_ct_CC="$ac_prog"
2084 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2085 break 2
2086 fi
2087done
2088done
6e3f3080 2089
ba479fd2
NN
2090fi
2091fi
2092ac_ct_CC=$ac_cv_prog_ac_ct_CC
2093if test -n "$ac_ct_CC"; then
2094 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2095echo "${ECHO_T}$ac_ct_CC" >&6
2096else
2097 echo "$as_me:$LINENO: result: no" >&5
2098echo "${ECHO_T}no" >&6
2099fi
6e3f3080 2100
ba479fd2
NN
2101 test -n "$ac_ct_CC" && break
2102done
63cf211a 2103
ba479fd2
NN
2104 CC=$ac_ct_CC
2105fi
2106
2107fi
2108
2109
2110test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2111See \`config.log' for more details." >&5
2112echo "$as_me: error: no acceptable C compiler found in \$PATH
2113See \`config.log' for more details." >&2;}
2114 { (exit 1); exit 1; }; }
2115
2116# Provide some information about the compiler.
2117echo "$as_me:$LINENO:" \
2118 "checking for C compiler version" >&5
2119ac_compiler=`set X $ac_compile; echo $2`
2120{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2121 (eval $ac_compiler --version </dev/null >&5) 2>&5
2122 ac_status=$?
2123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2124 (exit $ac_status); }
2125{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2126 (eval $ac_compiler -v </dev/null >&5) 2>&5
2127 ac_status=$?
2128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2129 (exit $ac_status); }
2130{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2131 (eval $ac_compiler -V </dev/null >&5) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }
2135
2136cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2137/* confdefs.h. */
2138_ACEOF
2139cat confdefs.h >>conftest.$ac_ext
2140cat >>conftest.$ac_ext <<_ACEOF
2141/* end confdefs.h. */
2142
2143int
2144main ()
2145{
63cf211a 2146
ba479fd2
NN
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151ac_clean_files_save=$ac_clean_files
2152ac_clean_files="$ac_clean_files a.out a.exe b.out"
2153# Try to create an executable without -o first, disregard a.out.
2154# It will help us diagnose broken compilers, and finding out an intuition
2155# of exeext.
86da66b5
HPN
2156echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2157echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ba479fd2
NN
2158ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2159if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2160 (eval $ac_link_default) 2>&5
2161 ac_status=$?
2162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163 (exit $ac_status); }; then
2164 # Find the output, starting from the most likely. This scheme is
2165# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2166# resort.
2167
2168# Be careful to initialize this variable, since it used to be cached.
2169# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2170ac_cv_exeext=
2171# b.out is created by i960 compilers.
2172for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2173do
2174 test -f "$ac_file" || continue
2175 case $ac_file in
2176 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
86da66b5 2177 ;;
ba479fd2 2178 conftest.$ac_ext )
86da66b5
HPN
2179 # This is the source file.
2180 ;;
ba479fd2 2181 [ab].out )
86da66b5
HPN
2182 # We found the default executable, but exeext='' is most
2183 # certainly right.
2184 break;;
ba479fd2 2185 *.* )
86da66b5
HPN
2186 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2187 # FIXME: I believe we export ac_cv_exeext for Libtool,
2188 # but it would be cool to find out if it's true. Does anybody
2189 # maintain Libtool? --akim.
2190 export ac_cv_exeext
2191 break;;
ba479fd2 2192 * )
86da66b5 2193 break;;
ba479fd2
NN
2194 esac
2195done
2196else
2197 echo "$as_me: failed program was:" >&5
2198sed 's/^/| /' conftest.$ac_ext >&5
2199
2200{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2201See \`config.log' for more details." >&5
2202echo "$as_me: error: C compiler cannot create executables
2203See \`config.log' for more details." >&2;}
2204 { (exit 77); exit 77; }; }
2205fi
2206
2207ac_exeext=$ac_cv_exeext
2208echo "$as_me:$LINENO: result: $ac_file" >&5
2209echo "${ECHO_T}$ac_file" >&6
2210
2211# Check the compiler produces executables we can run. If not, either
2212# the compiler is broken, or we cross compile.
2213echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2214echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2215# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2216# If not cross compiling, check that we can run a simple program.
2217if test "$cross_compiling" != yes; then
2218 if { ac_try='./$ac_file'
2219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2220 (eval $ac_try) 2>&5
2221 ac_status=$?
2222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223 (exit $ac_status); }; }; then
2224 cross_compiling=no
6e3f3080 2225 else
ba479fd2
NN
2226 if test "$cross_compiling" = maybe; then
2227 cross_compiling=yes
2228 else
2229 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2230If you meant to cross compile, use \`--host'.
2231See \`config.log' for more details." >&5
2232echo "$as_me: error: cannot run C compiled programs.
2233If you meant to cross compile, use \`--host'.
2234See \`config.log' for more details." >&2;}
2235 { (exit 1); exit 1; }; }
2236 fi
6e3f3080
NN
2237 fi
2238fi
ba479fd2
NN
2239echo "$as_me:$LINENO: result: yes" >&5
2240echo "${ECHO_T}yes" >&6
2241
2242rm -f a.out a.exe conftest$ac_cv_exeext b.out
2243ac_clean_files=$ac_clean_files_save
2244# Check the compiler produces executables we can run. If not, either
2245# the compiler is broken, or we cross compile.
2246echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2247echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2248echo "$as_me:$LINENO: result: $cross_compiling" >&5
2249echo "${ECHO_T}$cross_compiling" >&6
2250
2251echo "$as_me:$LINENO: checking for suffix of executables" >&5
2252echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2254 (eval $ac_link) 2>&5
2255 ac_status=$?
2256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2257 (exit $ac_status); }; then
2258 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2259# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2260# work properly (i.e., refer to `conftest.exe'), while it won't with
2261# `rm'.
2262for ac_file in conftest.exe conftest conftest.*; do
2263 test -f "$ac_file" || continue
2264 case $ac_file in
2265 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2266 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5
HPN
2267 export ac_cv_exeext
2268 break;;
ba479fd2
NN
2269 * ) break;;
2270 esac
2271done
e9a25f70 2272else
ba479fd2
NN
2273 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2274See \`config.log' for more details." >&5
2275echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2276See \`config.log' for more details." >&2;}
2277 { (exit 1); exit 1; }; }
2278fi
2279
2280rm -f conftest$ac_cv_exeext
2281echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2282echo "${ECHO_T}$ac_cv_exeext" >&6
2283
2284rm -f conftest.$ac_ext
2285EXEEXT=$ac_cv_exeext
2286ac_exeext=$EXEEXT
2287echo "$as_me:$LINENO: checking for suffix of object files" >&5
2288echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2289if test "${ac_cv_objext+set}" = set; then
2290 echo $ECHO_N "(cached) $ECHO_C" >&6
2291else
2292 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2293/* confdefs.h. */
2294_ACEOF
2295cat confdefs.h >>conftest.$ac_ext
2296cat >>conftest.$ac_ext <<_ACEOF
2297/* end confdefs.h. */
2298
2299int
2300main ()
2301{
6e3f3080 2302
ba479fd2
NN
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307rm -f conftest.o conftest.obj
2308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2309 (eval $ac_compile) 2>&5
2310 ac_status=$?
2311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312 (exit $ac_status); }; then
2313 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2314 case $ac_file in
2315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2316 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2317 break;;
2318 esac
2319done
63cf211a 2320else
ba479fd2
NN
2321 echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2325See \`config.log' for more details." >&5
2326echo "$as_me: error: cannot compute suffix of object files: cannot compile
2327See \`config.log' for more details." >&2;}
2328 { (exit 1); exit 1; }; }
2329fi
2330
2331rm -f conftest.$ac_cv_objext conftest.$ac_ext
2332fi
2333echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2334echo "${ECHO_T}$ac_cv_objext" >&6
2335OBJEXT=$ac_cv_objext
2336ac_objext=$OBJEXT
2337echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2338echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2339if test "${ac_cv_c_compiler_gnu+set}" = set; then
2340 echo $ECHO_N "(cached) $ECHO_C" >&6
2341else
2342 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2343/* confdefs.h. */
2344_ACEOF
2345cat confdefs.h >>conftest.$ac_ext
2346cat >>conftest.$ac_ext <<_ACEOF
2347/* end confdefs.h. */
2348
2349int
2350main ()
2351{
2352#ifndef __GNUC__
2353 choke me
2354#endif
6e3f3080 2355
ba479fd2
NN
2356 ;
2357 return 0;
2358}
2359_ACEOF
2360rm -f conftest.$ac_objext
2361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2362 (eval $ac_compile) 2>conftest.er1
ba479fd2 2363 ac_status=$?
86da66b5
HPN
2364 grep -v '^ *+' conftest.er1 >conftest.err
2365 rm -f conftest.er1
2366 cat conftest.err >&5
ba479fd2
NN
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); } &&
2fac9c01
ZW
2369 { ac_try='test -z "$ac_c_werror_flag"
2370 || test ! -s conftest.err'
86da66b5
HPN
2371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2372 (eval $ac_try) 2>&5
2373 ac_status=$?
2374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2375 (exit $ac_status); }; } &&
2376 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2378 (eval $ac_try) 2>&5
2379 ac_status=$?
2380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2381 (exit $ac_status); }; }; then
2382 ac_compiler_gnu=yes
2383else
2384 echo "$as_me: failed program was:" >&5
2385sed 's/^/| /' conftest.$ac_ext >&5
2386
2387ac_compiler_gnu=no
2388fi
86da66b5 2389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2390ac_cv_c_compiler_gnu=$ac_compiler_gnu
2391
2392fi
2393echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2394echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2395GCC=`test $ac_compiler_gnu = yes && echo yes`
2396ac_test_CFLAGS=${CFLAGS+set}
2397ac_save_CFLAGS=$CFLAGS
2398CFLAGS="-g"
2399echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2400echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2401if test "${ac_cv_prog_cc_g+set}" = set; then
2402 echo $ECHO_N "(cached) $ECHO_C" >&6
2403else
2404 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2405/* confdefs.h. */
2406_ACEOF
2407cat confdefs.h >>conftest.$ac_ext
2408cat >>conftest.$ac_ext <<_ACEOF
2409/* end confdefs.h. */
2410
2411int
2412main ()
2413{
2414
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419rm -f conftest.$ac_objext
2420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2421 (eval $ac_compile) 2>conftest.er1
ba479fd2 2422 ac_status=$?
86da66b5
HPN
2423 grep -v '^ *+' conftest.er1 >conftest.err
2424 rm -f conftest.er1
2425 cat conftest.err >&5
ba479fd2
NN
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); } &&
2fac9c01
ZW
2428 { ac_try='test -z "$ac_c_werror_flag"
2429 || test ! -s conftest.err'
86da66b5
HPN
2430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2431 (eval $ac_try) 2>&5
2432 ac_status=$?
2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434 (exit $ac_status); }; } &&
2435 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2437 (eval $ac_try) 2>&5
2438 ac_status=$?
2439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2440 (exit $ac_status); }; }; then
6e3f3080
NN
2441 ac_cv_prog_cc_g=yes
2442else
ba479fd2
NN
2443 echo "$as_me: failed program was:" >&5
2444sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 2445
ba479fd2 2446ac_cv_prog_cc_g=no
6e3f3080 2447fi
86da66b5 2448rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2449fi
2450echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2451echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
cd9e5e7c 2452if test "$ac_test_CFLAGS" = set; then
ba479fd2 2453 CFLAGS=$ac_save_CFLAGS
cd9e5e7c
MK
2454elif test $ac_cv_prog_cc_g = yes; then
2455 if test "$GCC" = yes; then
e9a25f70
JL
2456 CFLAGS="-g -O2"
2457 else
cd9e5e7c 2458 CFLAGS="-g"
81814e35 2459 fi
3723cad9 2460else
cd9e5e7c
MK
2461 if test "$GCC" = yes; then
2462 CFLAGS="-O2"
2463 else
2464 CFLAGS=
2465 fi
e9a25f70 2466fi
ba479fd2
NN
2467echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2468echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2469if test "${ac_cv_prog_cc_stdc+set}" = set; then
2470 echo $ECHO_N "(cached) $ECHO_C" >&6
2471else
2472 ac_cv_prog_cc_stdc=no
2473ac_save_CC=$CC
2474cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2475/* confdefs.h. */
2476_ACEOF
2477cat confdefs.h >>conftest.$ac_ext
2478cat >>conftest.$ac_ext <<_ACEOF
2479/* end confdefs.h. */
2480#include <stdarg.h>
2481#include <stdio.h>
2482#include <sys/types.h>
2483#include <sys/stat.h>
2484/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2485struct buf { int x; };
2486FILE * (*rcsopen) (struct buf *, struct stat *, int);
2487static char *e (p, i)
2488 char **p;
2489 int i;
2490{
2491 return p[i];
2492}
2493static char *f (char * (*g) (char **, int), char **p, ...)
2494{
2495 char *s;
2496 va_list v;
2497 va_start (v,p);
2498 s = g (p, va_arg (v,int));
2499 va_end (v);
2500 return s;
2501}
86da66b5
HPN
2502
2503/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2504 function prototypes and stuff, but not '\xHH' hex character constants.
2505 These don't provoke an error unfortunately, instead are silently treated
2506 as 'x'. The following induces an error, until -std1 is added to get
2507 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2508 array size at least. It's necessary to write '\x00'==0 to get something
2509 that's true only with -std1. */
2510int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2511
ba479fd2
NN
2512int test (int i, double x);
2513struct s1 {int (*f) (int a);};
2514struct s2 {int (*f) (double a);};
2515int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2516int argc;
2517char **argv;
2518int
2519main ()
2520{
2521return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2522 ;
2523 return 0;
2524}
2525_ACEOF
2526# Don't try gcc -ansi; that turns off useful extensions and
2527# breaks some systems' header files.
2528# AIX -qlanglvl=ansi
2529# Ultrix and OSF/1 -std1
2530# HP-UX 10.20 and later -Ae
2531# HP-UX older versions -Aa -D_HPUX_SOURCE
2532# SVR4 -Xc -D__EXTENSIONS__
2533for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2534do
2535 CC="$ac_save_CC $ac_arg"
2536 rm -f conftest.$ac_objext
2537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2538 (eval $ac_compile) 2>conftest.er1
ba479fd2 2539 ac_status=$?
86da66b5
HPN
2540 grep -v '^ *+' conftest.er1 >conftest.err
2541 rm -f conftest.er1
2542 cat conftest.err >&5
ba479fd2
NN
2543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2544 (exit $ac_status); } &&
2fac9c01
ZW
2545 { ac_try='test -z "$ac_c_werror_flag"
2546 || test ! -s conftest.err'
86da66b5
HPN
2547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2548 (eval $ac_try) 2>&5
2549 ac_status=$?
2550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2551 (exit $ac_status); }; } &&
2552 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2554 (eval $ac_try) 2>&5
2555 ac_status=$?
2556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557 (exit $ac_status); }; }; then
2558 ac_cv_prog_cc_stdc=$ac_arg
2559break
2560else
2561 echo "$as_me: failed program was:" >&5
2562sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 2563
ba479fd2 2564fi
86da66b5 2565rm -f conftest.err conftest.$ac_objext
ba479fd2
NN
2566done
2567rm -f conftest.$ac_ext conftest.$ac_objext
2568CC=$ac_save_CC
2569
2570fi
2571
2572case "x$ac_cv_prog_cc_stdc" in
2573 x|xno)
2574 echo "$as_me:$LINENO: result: none needed" >&5
2575echo "${ECHO_T}none needed" >&6 ;;
2576 *)
2577 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2578echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2579 CC="$CC $ac_cv_prog_cc_stdc" ;;
2580esac
2581
2582# Some people use a C++ compiler to compile C. Since we use `exit',
2583# in C++ we need to declare it. In case someone uses the same compiler
2584# for both compiling C and C++ we need to have the C++ compiler decide
2585# the declaration of exit, since it's the most demanding environment.
2586cat >conftest.$ac_ext <<_ACEOF
2587#ifndef __cplusplus
2588 choke me
2589#endif
2590_ACEOF
2591rm -f conftest.$ac_objext
2592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2593 (eval $ac_compile) 2>conftest.er1
ba479fd2 2594 ac_status=$?
86da66b5
HPN
2595 grep -v '^ *+' conftest.er1 >conftest.err
2596 rm -f conftest.er1
2597 cat conftest.err >&5
ba479fd2
NN
2598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2599 (exit $ac_status); } &&
2fac9c01
ZW
2600 { ac_try='test -z "$ac_c_werror_flag"
2601 || test ! -s conftest.err'
86da66b5
HPN
2602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2603 (eval $ac_try) 2>&5
2604 ac_status=$?
2605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2606 (exit $ac_status); }; } &&
2607 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2609 (eval $ac_try) 2>&5
2610 ac_status=$?
2611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2612 (exit $ac_status); }; }; then
2613 for ac_declaration in \
86da66b5 2614 '' \
ba479fd2
NN
2615 'extern "C" void std::exit (int) throw (); using std::exit;' \
2616 'extern "C" void std::exit (int); using std::exit;' \
2617 'extern "C" void exit (int) throw ();' \
2618 'extern "C" void exit (int);' \
2619 'void exit (int);'
2620do
2621 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2622/* confdefs.h. */
2623_ACEOF
2624cat confdefs.h >>conftest.$ac_ext
2625cat >>conftest.$ac_ext <<_ACEOF
2626/* end confdefs.h. */
33e70558 2627$ac_declaration
86da66b5 2628#include <stdlib.h>
ba479fd2
NN
2629int
2630main ()
2631{
2632exit (42);
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637rm -f conftest.$ac_objext
2638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2639 (eval $ac_compile) 2>conftest.er1
ba479fd2 2640 ac_status=$?
86da66b5
HPN
2641 grep -v '^ *+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
ba479fd2
NN
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } &&
2fac9c01
ZW
2646 { ac_try='test -z "$ac_c_werror_flag"
2647 || test ! -s conftest.err'
86da66b5
HPN
2648 { (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); }; } &&
2653 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2655 (eval $ac_try) 2>&5
2656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }; }; then
2659 :
2660else
2661 echo "$as_me: failed program was:" >&5
2662sed 's/^/| /' conftest.$ac_ext >&5
2663
2664continue
2665fi
86da66b5 2666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2 2667 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2668/* confdefs.h. */
2669_ACEOF
2670cat confdefs.h >>conftest.$ac_ext
2671cat >>conftest.$ac_ext <<_ACEOF
2672/* end confdefs.h. */
2673$ac_declaration
2674int
2675main ()
2676{
2677exit (42);
2678 ;
2679 return 0;
2680}
2681_ACEOF
2682rm -f conftest.$ac_objext
2683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 2684 (eval $ac_compile) 2>conftest.er1
ba479fd2 2685 ac_status=$?
86da66b5
HPN
2686 grep -v '^ *+' conftest.er1 >conftest.err
2687 rm -f conftest.er1
2688 cat conftest.err >&5
ba479fd2
NN
2689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2690 (exit $ac_status); } &&
2fac9c01
ZW
2691 { ac_try='test -z "$ac_c_werror_flag"
2692 || test ! -s conftest.err'
86da66b5
HPN
2693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; } &&
2698 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
2699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2700 (eval $ac_try) 2>&5
2701 ac_status=$?
2702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2703 (exit $ac_status); }; }; then
2704 break
3ec83fc2 2705else
ba479fd2
NN
2706 echo "$as_me: failed program was:" >&5
2707sed 's/^/| /' conftest.$ac_ext >&5
2708
6e3f3080 2709fi
86da66b5 2710rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2711done
2712rm -f conftest*
2713if test -n "$ac_declaration"; then
2714 echo '#ifdef __cplusplus' >>confdefs.h
2715 echo $ac_declaration >>confdefs.h
2716 echo '#endif' >>confdefs.h
2717fi
2718
3ec83fc2 2719else
ba479fd2
NN
2720 echo "$as_me: failed program was:" >&5
2721sed 's/^/| /' conftest.$ac_ext >&5
2722
2723fi
86da66b5 2724rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730
2731if test "x$CC" != xcc; then
2732 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2733echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2734else
2735 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2736echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2737fi
2738set dummy $CC; ac_cc=`echo $2 |
2739 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2740if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2741 echo $ECHO_N "(cached) $ECHO_C" >&6
2742else
2743 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2744/* confdefs.h. */
2745_ACEOF
2746cat confdefs.h >>conftest.$ac_ext
2747cat >>conftest.$ac_ext <<_ACEOF
2748/* end confdefs.h. */
2749
2750int
2751main ()
2752{
2753
2754 ;
2755 return 0;
2756}
2757_ACEOF
3ec83fc2
RH
2758# Make sure it works both with $CC and with simple cc.
2759# We do the test twice because some compilers refuse to overwrite an
2760# existing .o file with -o, though they will create one.
ba479fd2
NN
2761ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2762if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2763 (eval $ac_try) 2>&5
2764 ac_status=$?
2765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2766 (exit $ac_status); } &&
2767 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2768 (eval $ac_try) 2>&5
2769 ac_status=$?
2770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2771 (exit $ac_status); };
3ec83fc2
RH
2772then
2773 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2774 if test "x$CC" != xcc; then
2775 # Test first that cc exists at all.
ba479fd2
NN
2776 if { ac_try='cc -c conftest.$ac_ext >&5'
2777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2778 (eval $ac_try) 2>&5
2779 ac_status=$?
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); }; }; then
2782 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2783 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2784 (eval $ac_try) 2>&5
2785 ac_status=$?
2786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787 (exit $ac_status); } &&
2788 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); };
3ec83fc2 2793 then
86da66b5
HPN
2794 # cc works too.
2795 :
3ec83fc2 2796 else
86da66b5
HPN
2797 # cc exists but doesn't like -o.
2798 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
2799 fi
2800 fi
2801 fi
2802else
2803 eval ac_cv_prog_cc_${ac_cc}_c_o=no
2804fi
2805rm -f conftest*
2806
2807fi
2808if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
ba479fd2
NN
2809 echo "$as_me:$LINENO: result: yes" >&5
2810echo "${ECHO_T}yes" >&6
3ec83fc2 2811else
ba479fd2
NN
2812 echo "$as_me:$LINENO: result: no" >&5
2813echo "${ECHO_T}no" >&6
2814
2815cat >>confdefs.h <<\_ACEOF
3ec83fc2 2816#define NO_MINUS_C_MINUS_O 1
ba479fd2 2817_ACEOF
3ec83fc2
RH
2818
2819fi
2820
414d23ae
HPN
2821# autoconf is lame and doesn't give us any substitution variable for this.
2822if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2823 NO_MINUS_C_MINUS_O=yes
2824else
2825 OUTPUT_OPTION='-o $@'
2826fi
2827
2828
2829
73458fb7
NN
2830# -------------------------
2831# Check C compiler features
2832# -------------------------
2833
ba479fd2
NN
2834ac_ext=c
2835ac_cpp='$CPP $CPPFLAGS'
2836ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2837ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2838ac_compiler_gnu=$ac_cv_c_compiler_gnu
2839echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2840echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
84c041a1
ZW
2841# On Suns, sometimes $CPP names a directory.
2842if test -n "$CPP" && test -d "$CPP"; then
2843 CPP=
2844fi
2845if test -z "$CPP"; then
ba479fd2
NN
2846 if test "${ac_cv_prog_CPP+set}" = set; then
2847 echo $ECHO_N "(cached) $ECHO_C" >&6
2848else
2849 # Double quotes because CPP needs to be expanded
2850 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2851 do
2852 ac_preproc_ok=false
2853for ac_c_preproc_warn_flag in '' yes
2854do
2855 # Use a header file that comes with gcc, so configuring glibc
2856 # with a fresh cross-compiler works.
2857 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2858 # <limits.h> exists even on freestanding compilers.
84c041a1 2859 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
2860 # not just through cpp. "Syntax error" is here to catch this case.
2861 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2862/* confdefs.h. */
2863_ACEOF
2864cat confdefs.h >>conftest.$ac_ext
2865cat >>conftest.$ac_ext <<_ACEOF
2866/* end confdefs.h. */
2867#ifdef __STDC__
2868# include <limits.h>
2869#else
2870# include <assert.h>
2871#endif
86da66b5 2872 Syntax error
ba479fd2
NN
2873_ACEOF
2874if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2876 ac_status=$?
2877 grep -v '^ *+' conftest.er1 >conftest.err
2878 rm -f conftest.er1
2879 cat conftest.err >&5
2880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881 (exit $ac_status); } >/dev/null; then
2882 if test -s conftest.err; then
2883 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2884 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2885 else
2886 ac_cpp_err=
2887 fi
2888else
2889 ac_cpp_err=yes
2890fi
2891if test -z "$ac_cpp_err"; then
093e61a6 2892 :
cafe096b 2893else
ba479fd2
NN
2894 echo "$as_me: failed program was:" >&5
2895sed 's/^/| /' conftest.$ac_ext >&5
2896
2897 # Broken: fails on valid input.
2898continue
2899fi
2900rm -f conftest.err conftest.$ac_ext
2901
2902 # OK, works on sane cases. Now check whether non-existent headers
2903 # can be detected and how.
2904 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
2910#include <ac_nonexistent.h>
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
86da66b5 2922 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2923 else
2924 ac_cpp_err=
2925 fi
2926else
2927 ac_cpp_err=yes
2928fi
2929if test -z "$ac_cpp_err"; then
2930 # Broken: success on invalid input.
2931continue
2932else
2933 echo "$as_me: failed program was:" >&5
2934sed 's/^/| /' conftest.$ac_ext >&5
2935
2936 # Passes both tests.
2937ac_preproc_ok=:
2938break
2939fi
2940rm -f conftest.err conftest.$ac_ext
2941
2942done
2943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2944rm -f conftest.err conftest.$ac_ext
2945if $ac_preproc_ok; then
2946 break
2947fi
2948
2949 done
2950 ac_cv_prog_CPP=$CPP
2951
2952fi
2953 CPP=$ac_cv_prog_CPP
2954else
2955 ac_cv_prog_CPP=$CPP
2956fi
2957echo "$as_me:$LINENO: result: $CPP" >&5
2958echo "${ECHO_T}$CPP" >&6
2959ac_preproc_ok=false
2960for ac_c_preproc_warn_flag in '' yes
2961do
2962 # Use a header file that comes with gcc, so configuring glibc
2963 # with a fresh cross-compiler works.
2964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2965 # <limits.h> exists even on freestanding compilers.
2966 # On the NeXT, cc -E runs the code through the compiler's parser,
2967 # not just through cpp. "Syntax error" is here to catch this case.
2968 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2969/* confdefs.h. */
2970_ACEOF
2971cat confdefs.h >>conftest.$ac_ext
2972cat >>conftest.$ac_ext <<_ACEOF
2973/* end confdefs.h. */
2974#ifdef __STDC__
2975# include <limits.h>
2976#else
2977# include <assert.h>
2978#endif
86da66b5 2979 Syntax error
ba479fd2
NN
2980_ACEOF
2981if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2982 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2983 ac_status=$?
2984 grep -v '^ *+' conftest.er1 >conftest.err
2985 rm -f conftest.er1
2986 cat conftest.err >&5
2987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2988 (exit $ac_status); } >/dev/null; then
2989 if test -s conftest.err; then
2990 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 2991 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
2992 else
2993 ac_cpp_err=
2994 fi
2995else
2996 ac_cpp_err=yes
2997fi
2998if test -z "$ac_cpp_err"; then
6e3f3080 2999 :
414d23ae 3000else
ba479fd2
NN
3001 echo "$as_me: failed program was:" >&5
3002sed 's/^/| /' conftest.$ac_ext >&5
3003
3004 # Broken: fails on valid input.
3005continue
3006fi
3007rm -f conftest.err conftest.$ac_ext
3008
3009 # OK, works on sane cases. Now check whether non-existent headers
3010 # can be detected and how.
3011 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
3017#include <ac_nonexistent.h>
3018_ACEOF
3019if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3020 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3021 ac_status=$?
3022 grep -v '^ *+' conftest.er1 >conftest.err
3023 rm -f conftest.er1
3024 cat conftest.err >&5
3025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026 (exit $ac_status); } >/dev/null; then
3027 if test -s conftest.err; then
3028 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 3029 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
3030 else
3031 ac_cpp_err=
3032 fi
6e3f3080 3033else
ba479fd2 3034 ac_cpp_err=yes
63cf211a 3035fi
ba479fd2
NN
3036if test -z "$ac_cpp_err"; then
3037 # Broken: success on invalid input.
3038continue
3039else
3040 echo "$as_me: failed program was:" >&5
3041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043 # Passes both tests.
3044ac_preproc_ok=:
3045break
63cf211a 3046fi
ba479fd2
NN
3047rm -f conftest.err conftest.$ac_ext
3048
3049done
3050# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3051rm -f conftest.err conftest.$ac_ext
3052if $ac_preproc_ok; then
3053 :
6e3f3080 3054else
ba479fd2
NN
3055 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3056See \`config.log' for more details." >&5
3057echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3058See \`config.log' for more details." >&2;}
3059 { (exit 1); exit 1; }; }
6e3f3080
NN
3060fi
3061
ba479fd2
NN
3062ac_ext=c
3063ac_cpp='$CPP $CPPFLAGS'
3064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3066ac_compiler_gnu=$ac_cv_c_compiler_gnu
3067
b5472e1d 3068
ba479fd2
NN
3069echo "$as_me:$LINENO: checking for inline" >&5
3070echo $ECHO_N "checking for inline... $ECHO_C" >&6
3071if test "${ac_cv_c_inline+set}" = set; then
3072 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3073else
3074 ac_cv_c_inline=no
3075for ac_kw in inline __inline__ __inline; do
ba479fd2 3076 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3077/* confdefs.h. */
3078_ACEOF
3079cat confdefs.h >>conftest.$ac_ext
3080cat >>conftest.$ac_ext <<_ACEOF
3081/* end confdefs.h. */
3082#ifndef __cplusplus
3083typedef int foo_t;
3084static $ac_kw foo_t static_foo () {return 0; }
3085$ac_kw foo_t foo () {return 0; }
3086#endif
414d23ae 3087
ba479fd2
NN
3088_ACEOF
3089rm -f conftest.$ac_objext
3090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3091 (eval $ac_compile) 2>conftest.er1
ba479fd2 3092 ac_status=$?
86da66b5
HPN
3093 grep -v '^ *+' conftest.er1 >conftest.err
3094 rm -f conftest.er1
3095 cat conftest.err >&5
ba479fd2
NN
3096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3097 (exit $ac_status); } &&
2fac9c01
ZW
3098 { ac_try='test -z "$ac_c_werror_flag"
3099 || test ! -s conftest.err'
86da66b5
HPN
3100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3101 (eval $ac_try) 2>&5
3102 ac_status=$?
3103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3104 (exit $ac_status); }; } &&
3105 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3107 (eval $ac_try) 2>&5
3108 ac_status=$?
3109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110 (exit $ac_status); }; }; then
414d23ae
HPN
3111 ac_cv_c_inline=$ac_kw; break
3112else
ba479fd2
NN
3113 echo "$as_me: failed program was:" >&5
3114sed 's/^/| /' conftest.$ac_ext >&5
3115
414d23ae 3116fi
86da66b5 3117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3118done
3119
3120fi
ba479fd2
NN
3121echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3122echo "${ECHO_T}$ac_cv_c_inline" >&6
86da66b5
HPN
3123
3124
ba479fd2 3125case $ac_cv_c_inline in
414d23ae 3126 inline | yes) ;;
86da66b5
HPN
3127 *)
3128 case $ac_cv_c_inline in
3129 no) ac_val=;;
3130 *) ac_val=$ac_cv_c_inline;;
3131 esac
3132 cat >>confdefs.h <<_ACEOF
3133#ifndef __cplusplus
3134#define inline $ac_val
3135#endif
ba479fd2 3136_ACEOF
86da66b5 3137 ;;
414d23ae
HPN
3138esac
3139
414d23ae 3140
ba479fd2
NN
3141echo "$as_me:$LINENO: checking for long long int" >&5
3142echo $ECHO_N "checking for long long int... $ECHO_C" >&6
3143if test "${ac_cv_c_long_long+set}" = set; then
3144 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3145else
ba479fd2 3146 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3147/* confdefs.h. */
3148_ACEOF
3149cat confdefs.h >>conftest.$ac_ext
3150cat >>conftest.$ac_ext <<_ACEOF
3151/* end confdefs.h. */
414d23ae 3152
ba479fd2
NN
3153int
3154main ()
3155{
414d23ae 3156long long int i;
ba479fd2
NN
3157 ;
3158 return 0;
3159}
3160_ACEOF
3161rm -f conftest.$ac_objext
3162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3163 (eval $ac_compile) 2>conftest.er1
ba479fd2 3164 ac_status=$?
86da66b5
HPN
3165 grep -v '^ *+' conftest.er1 >conftest.err
3166 rm -f conftest.er1
3167 cat conftest.err >&5
ba479fd2
NN
3168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3169 (exit $ac_status); } &&
2fac9c01
ZW
3170 { ac_try='test -z "$ac_c_werror_flag"
3171 || test ! -s conftest.err'
86da66b5
HPN
3172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3173 (eval $ac_try) 2>&5
3174 ac_status=$?
3175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3176 (exit $ac_status); }; } &&
3177 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3179 (eval $ac_try) 2>&5
3180 ac_status=$?
3181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3182 (exit $ac_status); }; }; then
414d23ae
HPN
3183 ac_cv_c_long_long=yes
3184else
ba479fd2
NN
3185 echo "$as_me: failed program was:" >&5
3186sed 's/^/| /' conftest.$ac_ext >&5
3187
3188ac_cv_c_long_long=no
414d23ae 3189fi
86da66b5 3190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3191fi
ba479fd2
NN
3192echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5
3193echo "${ECHO_T}$ac_cv_c_long_long" >&6
63cf211a 3194 if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3195
3196cat >>confdefs.h <<\_ACEOF
414d23ae 3197#define HAVE_LONG_LONG 1
ba479fd2 3198_ACEOF
414d23ae
HPN
3199
3200 fi
ba479fd2
NN
3201echo "$as_me:$LINENO: checking for __int64" >&5
3202echo $ECHO_N "checking for __int64... $ECHO_C" >&6
3203if test "${ac_cv_c___int64+set}" = set; then
3204 echo $ECHO_N "(cached) $ECHO_C" >&6
3205else
3206 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3207/* confdefs.h. */
3208_ACEOF
3209cat confdefs.h >>conftest.$ac_ext
3210cat >>conftest.$ac_ext <<_ACEOF
3211/* end confdefs.h. */
3212
3213int
3214main ()
3215{
414d23ae 3216__int64 i;
ba479fd2
NN
3217 ;
3218 return 0;
3219}
3220_ACEOF
3221rm -f conftest.$ac_objext
3222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3223 (eval $ac_compile) 2>conftest.er1
ba479fd2 3224 ac_status=$?
86da66b5
HPN
3225 grep -v '^ *+' conftest.er1 >conftest.err
3226 rm -f conftest.er1
3227 cat conftest.err >&5
ba479fd2
NN
3228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3229 (exit $ac_status); } &&
2fac9c01
ZW
3230 { ac_try='test -z "$ac_c_werror_flag"
3231 || test ! -s conftest.err'
86da66b5
HPN
3232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3233 (eval $ac_try) 2>&5
3234 ac_status=$?
3235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3236 (exit $ac_status); }; } &&
3237 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3239 (eval $ac_try) 2>&5
3240 ac_status=$?
3241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242 (exit $ac_status); }; }; then
414d23ae
HPN
3243 ac_cv_c___int64=yes
3244else
ba479fd2
NN
3245 echo "$as_me: failed program was:" >&5
3246sed 's/^/| /' conftest.$ac_ext >&5
3247
3248ac_cv_c___int64=no
414d23ae 3249fi
86da66b5 3250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3251fi
ba479fd2
NN
3252echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5
3253echo "${ECHO_T}$ac_cv_c___int64" >&6
63cf211a 3254 if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3255
3256cat >>confdefs.h <<\_ACEOF
414d23ae 3257#define HAVE___INT64 1
ba479fd2 3258_ACEOF
414d23ae
HPN
3259
3260 fi
3261
414d23ae
HPN
3262
3263# sizeof(char) is 1 by definition.
ba479fd2
NN
3264echo "$as_me:$LINENO: checking size of void *" >&5
3265echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3266if test "${ac_cv_sizeof_void_p+set}" = set; then
3267 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd
KG
3268else
3269 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3270 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3271/* confdefs.h. */
3272_ACEOF
3273cat confdefs.h >>conftest.$ac_ext
3274cat >>conftest.$ac_ext <<_ACEOF
3275/* end confdefs.h. */
75b6f3fd
KG
3276#include "confdefs.h"
3277#include <sys/types.h>
3278
3279
ba479fd2
NN
3280int
3281main ()
3282{
75b6f3fd 3283switch (0) case 0: case (sizeof (void *) == $ac_size):;
ba479fd2
NN
3284 ;
3285 return 0;
3286}
3287_ACEOF
3288rm -f conftest.$ac_objext
3289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3290 (eval $ac_compile) 2>conftest.er1
ba479fd2 3291 ac_status=$?
86da66b5
HPN
3292 grep -v '^ *+' conftest.er1 >conftest.err
3293 rm -f conftest.er1
3294 cat conftest.err >&5
ba479fd2
NN
3295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296 (exit $ac_status); } &&
2fac9c01
ZW
3297 { ac_try='test -z "$ac_c_werror_flag"
3298 || test ! -s conftest.err'
86da66b5
HPN
3299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3300 (eval $ac_try) 2>&5
3301 ac_status=$?
3302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3303 (exit $ac_status); }; } &&
3304 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3306 (eval $ac_try) 2>&5
3307 ac_status=$?
3308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3309 (exit $ac_status); }; }; then
75b6f3fd
KG
3310 ac_cv_sizeof_void_p=$ac_size
3311else
ba479fd2
NN
3312 echo "$as_me: failed program was:" >&5
3313sed 's/^/| /' conftest.$ac_ext >&5
3314
75b6f3fd 3315fi
86da66b5 3316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd
KG
3317 if test x$ac_cv_sizeof_void_p != x ; then break; fi
3318done
3319
3320fi
3321
3322if test x$ac_cv_sizeof_void_p = x ; then
ba479fd2
NN
3323 { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5
3324echo "$as_me: error: cannot determine a size for void *" >&2;}
3325 { (exit 1); exit 1; }; }
75b6f3fd 3326fi
ba479fd2
NN
3327echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3328echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3329
3330cat >>confdefs.h <<_ACEOF
75b6f3fd 3331#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
ba479fd2 3332_ACEOF
75b6f3fd
KG
3333
3334
ba479fd2
NN
3335echo "$as_me:$LINENO: checking size of short" >&5
3336echo $ECHO_N "checking size of short... $ECHO_C" >&6
3337if test "${ac_cv_sizeof_short+set}" = set; then
3338 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 3339else
4977bab6 3340 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3341 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3342/* confdefs.h. */
3343_ACEOF
3344cat confdefs.h >>conftest.$ac_ext
3345cat >>conftest.$ac_ext <<_ACEOF
3346/* end confdefs.h. */
414d23ae
HPN
3347#include "confdefs.h"
3348#include <sys/types.h>
3349
3350
ba479fd2
NN
3351int
3352main ()
3353{
414d23ae 3354switch (0) case 0: case (sizeof (short) == $ac_size):;
ba479fd2
NN
3355 ;
3356 return 0;
3357}
3358_ACEOF
3359rm -f conftest.$ac_objext
3360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3361 (eval $ac_compile) 2>conftest.er1
ba479fd2 3362 ac_status=$?
86da66b5
HPN
3363 grep -v '^ *+' conftest.er1 >conftest.err
3364 rm -f conftest.er1
3365 cat conftest.err >&5
ba479fd2
NN
3366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3367 (exit $ac_status); } &&
2fac9c01
ZW
3368 { ac_try='test -z "$ac_c_werror_flag"
3369 || test ! -s conftest.err'
86da66b5
HPN
3370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3371 (eval $ac_try) 2>&5
3372 ac_status=$?
3373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3374 (exit $ac_status); }; } &&
3375 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3377 (eval $ac_try) 2>&5
3378 ac_status=$?
3379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3380 (exit $ac_status); }; }; then
414d23ae
HPN
3381 ac_cv_sizeof_short=$ac_size
3382else
ba479fd2
NN
3383 echo "$as_me: failed program was:" >&5
3384sed 's/^/| /' conftest.$ac_ext >&5
3385
84c041a1 3386fi
86da66b5 3387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3388 if test x$ac_cv_sizeof_short != x ; then break; fi
3389done
3390
84c041a1 3391fi
414d23ae
HPN
3392
3393if test x$ac_cv_sizeof_short = x ; then
ba479fd2
NN
3394 { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
3395echo "$as_me: error: cannot determine a size for short" >&2;}
3396 { (exit 1); exit 1; }; }
84c041a1 3397fi
ba479fd2
NN
3398echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
3399echo "${ECHO_T}$ac_cv_sizeof_short" >&6
3400
3401cat >>confdefs.h <<_ACEOF
414d23ae 3402#define SIZEOF_SHORT $ac_cv_sizeof_short
ba479fd2 3403_ACEOF
84c041a1 3404
414d23ae 3405
ba479fd2
NN
3406echo "$as_me:$LINENO: checking size of int" >&5
3407echo $ECHO_N "checking size of int... $ECHO_C" >&6
3408if test "${ac_cv_sizeof_int+set}" = set; then
3409 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3410else
4977bab6 3411 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3412 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3413/* confdefs.h. */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h. */
414d23ae
HPN
3418#include "confdefs.h"
3419#include <sys/types.h>
3420
75e93faa 3421
ba479fd2
NN
3422int
3423main ()
3424{
414d23ae 3425switch (0) case 0: case (sizeof (int) == $ac_size):;
ba479fd2
NN
3426 ;
3427 return 0;
3428}
3429_ACEOF
3430rm -f conftest.$ac_objext
3431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3432 (eval $ac_compile) 2>conftest.er1
ba479fd2 3433 ac_status=$?
86da66b5
HPN
3434 grep -v '^ *+' conftest.er1 >conftest.err
3435 rm -f conftest.er1
3436 cat conftest.err >&5
ba479fd2
NN
3437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3438 (exit $ac_status); } &&
2fac9c01
ZW
3439 { ac_try='test -z "$ac_c_werror_flag"
3440 || test ! -s conftest.err'
86da66b5
HPN
3441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3442 (eval $ac_try) 2>&5
3443 ac_status=$?
3444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445 (exit $ac_status); }; } &&
3446 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3448 (eval $ac_try) 2>&5
3449 ac_status=$?
3450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3451 (exit $ac_status); }; }; then
414d23ae 3452 ac_cv_sizeof_int=$ac_size
75e93faa 3453else
ba479fd2
NN
3454 echo "$as_me: failed program was:" >&5
3455sed 's/^/| /' conftest.$ac_ext >&5
3456
75e93faa 3457fi
86da66b5 3458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 3459 if test x$ac_cv_sizeof_int != x ; then break; fi
75e93faa
ZW
3460done
3461
3462fi
3463
414d23ae 3464if test x$ac_cv_sizeof_int = x ; then
ba479fd2
NN
3465 { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
3466echo "$as_me: error: cannot determine a size for int" >&2;}
3467 { (exit 1); exit 1; }; }
414d23ae 3468fi
ba479fd2
NN
3469echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
3470echo "${ECHO_T}$ac_cv_sizeof_int" >&6
3471
3472cat >>confdefs.h <<_ACEOF
414d23ae 3473#define SIZEOF_INT $ac_cv_sizeof_int
ba479fd2 3474_ACEOF
75e93faa 3475
414d23ae 3476
ba479fd2
NN
3477echo "$as_me:$LINENO: checking size of long" >&5
3478echo $ECHO_N "checking size of long... $ECHO_C" >&6
3479if test "${ac_cv_sizeof_long+set}" = set; then
3480 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3481else
4977bab6 3482 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3483 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3484/* confdefs.h. */
3485_ACEOF
3486cat confdefs.h >>conftest.$ac_ext
3487cat >>conftest.$ac_ext <<_ACEOF
3488/* end confdefs.h. */
75e93faa 3489#include "confdefs.h"
414d23ae
HPN
3490#include <sys/types.h>
3491
75e93faa 3492
ba479fd2
NN
3493int
3494main ()
3495{
414d23ae 3496switch (0) case 0: case (sizeof (long) == $ac_size):;
ba479fd2
NN
3497 ;
3498 return 0;
3499}
3500_ACEOF
3501rm -f conftest.$ac_objext
3502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3503 (eval $ac_compile) 2>conftest.er1
ba479fd2 3504 ac_status=$?
86da66b5
HPN
3505 grep -v '^ *+' conftest.er1 >conftest.err
3506 rm -f conftest.er1
3507 cat conftest.err >&5
ba479fd2
NN
3508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3509 (exit $ac_status); } &&
2fac9c01
ZW
3510 { ac_try='test -z "$ac_c_werror_flag"
3511 || test ! -s conftest.err'
86da66b5
HPN
3512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3513 (eval $ac_try) 2>&5
3514 ac_status=$?
3515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3516 (exit $ac_status); }; } &&
3517 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3519 (eval $ac_try) 2>&5
3520 ac_status=$?
3521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522 (exit $ac_status); }; }; then
414d23ae 3523 ac_cv_sizeof_long=$ac_size
75e93faa 3524else
ba479fd2
NN
3525 echo "$as_me: failed program was:" >&5
3526sed 's/^/| /' conftest.$ac_ext >&5
3527
75e93faa 3528fi
86da66b5 3529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3530 if test x$ac_cv_sizeof_long != x ; then break; fi
3531done
75e93faa 3532
414d23ae 3533fi
75e93faa 3534
414d23ae 3535if test x$ac_cv_sizeof_long = x ; then
ba479fd2
NN
3536 { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
3537echo "$as_me: error: cannot determine a size for long" >&2;}
3538 { (exit 1); exit 1; }; }
75e93faa 3539fi
ba479fd2
NN
3540echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
3541echo "${ECHO_T}$ac_cv_sizeof_long" >&6
3542
3543cat >>confdefs.h <<_ACEOF
414d23ae 3544#define SIZEOF_LONG $ac_cv_sizeof_long
ba479fd2 3545_ACEOF
75e93faa
ZW
3546
3547
414d23ae 3548if test $ac_cv_c_long_long = yes; then
ba479fd2
NN
3549 echo "$as_me:$LINENO: checking size of long long" >&5
3550echo $ECHO_N "checking size of long long... $ECHO_C" >&6
3551if test "${ac_cv_sizeof_long_long+set}" = set; then
3552 echo $ECHO_N "(cached) $ECHO_C" >&6
04cabffc 3553else
4977bab6 3554 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3555 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3556/* confdefs.h. */
3557_ACEOF
3558cat confdefs.h >>conftest.$ac_ext
3559cat >>conftest.$ac_ext <<_ACEOF
3560/* end confdefs.h. */
414d23ae
HPN
3561#include "confdefs.h"
3562#include <sys/types.h>
3563
04cabffc 3564
ba479fd2
NN
3565int
3566main ()
3567{
414d23ae 3568switch (0) case 0: case (sizeof (long long) == $ac_size):;
ba479fd2
NN
3569 ;
3570 return 0;
3571}
3572_ACEOF
3573rm -f conftest.$ac_objext
3574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3575 (eval $ac_compile) 2>conftest.er1
ba479fd2 3576 ac_status=$?
86da66b5
HPN
3577 grep -v '^ *+' conftest.er1 >conftest.err
3578 rm -f conftest.er1
3579 cat conftest.err >&5
ba479fd2
NN
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3581 (exit $ac_status); } &&
2fac9c01
ZW
3582 { ac_try='test -z "$ac_c_werror_flag"
3583 || test ! -s conftest.err'
86da66b5
HPN
3584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3585 (eval $ac_try) 2>&5
3586 ac_status=$?
3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588 (exit $ac_status); }; } &&
3589 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3591 (eval $ac_try) 2>&5
3592 ac_status=$?
3593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594 (exit $ac_status); }; }; then
414d23ae 3595 ac_cv_sizeof_long_long=$ac_size
04cabffc 3596else
ba479fd2
NN
3597 echo "$as_me: failed program was:" >&5
3598sed 's/^/| /' conftest.$ac_ext >&5
3599
04cabffc 3600fi
86da66b5 3601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3602 if test x$ac_cv_sizeof_long_long != x ; then break; fi
3603done
3604
04cabffc
KG
3605fi
3606
414d23ae 3607if test x$ac_cv_sizeof_long_long = x ; then
ba479fd2
NN
3608 { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5
3609echo "$as_me: error: cannot determine a size for long long" >&2;}
3610 { (exit 1); exit 1; }; }
414d23ae 3611fi
ba479fd2
NN
3612echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
3613echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
3614
3615cat >>confdefs.h <<_ACEOF
414d23ae 3616#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
ba479fd2 3617_ACEOF
04cabffc 3618
04cabffc 3619
414d23ae
HPN
3620fi
3621if test $ac_cv_c___int64 = yes; then
ba479fd2
NN
3622 echo "$as_me:$LINENO: checking size of __int64" >&5
3623echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
3624if test "${ac_cv_sizeof___int64+set}" = set; then
3625 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa 3626else
4977bab6 3627 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
ba479fd2 3628 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3629/* confdefs.h. */
3630_ACEOF
3631cat confdefs.h >>conftest.$ac_ext
3632cat >>conftest.$ac_ext <<_ACEOF
3633/* end confdefs.h. */
414d23ae
HPN
3634#include "confdefs.h"
3635#include <sys/types.h>
3636
61842080 3637
ba479fd2
NN
3638int
3639main ()
3640{
414d23ae 3641switch (0) case 0: case (sizeof (__int64) == $ac_size):;
ba479fd2
NN
3642 ;
3643 return 0;
3644}
3645_ACEOF
3646rm -f conftest.$ac_objext
3647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 3648 (eval $ac_compile) 2>conftest.er1
ba479fd2 3649 ac_status=$?
86da66b5
HPN
3650 grep -v '^ *+' conftest.er1 >conftest.err
3651 rm -f conftest.er1
3652 cat conftest.err >&5
ba479fd2
NN
3653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3654 (exit $ac_status); } &&
2fac9c01
ZW
3655 { ac_try='test -z "$ac_c_werror_flag"
3656 || test ! -s conftest.err'
86da66b5
HPN
3657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3658 (eval $ac_try) 2>&5
3659 ac_status=$?
3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3661 (exit $ac_status); }; } &&
3662 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
3663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3664 (eval $ac_try) 2>&5
3665 ac_status=$?
3666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3667 (exit $ac_status); }; }; then
414d23ae 3668 ac_cv_sizeof___int64=$ac_size
75e93faa 3669else
ba479fd2
NN
3670 echo "$as_me: failed program was:" >&5
3671sed 's/^/| /' conftest.$ac_ext >&5
3672
75e93faa 3673fi
86da66b5 3674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae
HPN
3675 if test x$ac_cv_sizeof___int64 != x ; then break; fi
3676done
3677
75e93faa
ZW
3678fi
3679
414d23ae 3680if test x$ac_cv_sizeof___int64 = x ; then
ba479fd2
NN
3681 { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5
3682echo "$as_me: error: cannot determine a size for __int64" >&2;}
3683 { (exit 1); exit 1; }; }
414d23ae 3684fi
ba479fd2
NN
3685echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
3686echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
3687
3688cat >>confdefs.h <<_ACEOF
414d23ae 3689#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 3690_ACEOF
414d23ae 3691
cafe096b 3692
414d23ae
HPN
3693fi
3694
34a86c2b
NN
3695# ---------------------
3696# Warnings and checking
3697# ---------------------
3698
b5472e1d
NN
3699# Check $CC warning features (if it's GCC).
3700# We want to use -pedantic, but we don't want warnings about
3701# * 'long long'
3702# * variadic macros
3703# So, we only use -pedantic if we can disable those warnings.
3704
3705echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
3706echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
3707if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
3710 save_CFLAGS="$CFLAGS"
3711 CFLAGS="-Wno-long-long"
3712 cat >conftest.$ac_ext <<_ACEOF
3713/* confdefs.h. */
3714_ACEOF
3715cat confdefs.h >>conftest.$ac_ext
3716cat >>conftest.$ac_ext <<_ACEOF
3717/* end confdefs.h. */
3718
3719_ACEOF
3720rm -f conftest.$ac_objext
3721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3722 (eval $ac_compile) 2>conftest.er1
3723 ac_status=$?
3724 grep -v '^ *+' conftest.er1 >conftest.err
3725 rm -f conftest.er1
3726 cat conftest.err >&5
3727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3728 (exit $ac_status); } &&
2fac9c01
ZW
3729 { ac_try='test -z "$ac_c_werror_flag"
3730 || test ! -s conftest.err'
b5472e1d
NN
3731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3732 (eval $ac_try) 2>&5
3733 ac_status=$?
3734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3735 (exit $ac_status); }; } &&
3736 { ac_try='test -s conftest.$ac_objext'
3737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3738 (eval $ac_try) 2>&5
3739 ac_status=$?
3740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3741 (exit $ac_status); }; }; then
3742 ac_cv_prog_cc_w_no_long_long=yes
3743else
3744 echo "$as_me: failed program was:" >&5
3745sed 's/^/| /' conftest.$ac_ext >&5
3746
3747ac_cv_prog_cc_w_no_long_long=no
3748fi
3749rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3750 CFLAGS="$save_CFLAGS"
3751
3752fi
3753echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
3754echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
3755
3756echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
3757echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
3758if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
3759 echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761 save_CFLAGS="$CFLAGS"
3762 CFLAGS="-Wno-variadic-macros"
3763 cat >conftest.$ac_ext <<_ACEOF
3764/* confdefs.h. */
3765_ACEOF
3766cat confdefs.h >>conftest.$ac_ext
3767cat >>conftest.$ac_ext <<_ACEOF
3768/* end confdefs.h. */
3769
3770_ACEOF
3771rm -f conftest.$ac_objext
3772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3773 (eval $ac_compile) 2>conftest.er1
3774 ac_status=$?
3775 grep -v '^ *+' conftest.er1 >conftest.err
3776 rm -f conftest.er1
3777 cat conftest.err >&5
3778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3779 (exit $ac_status); } &&
2fac9c01
ZW
3780 { ac_try='test -z "$ac_c_werror_flag"
3781 || test ! -s conftest.err'
b5472e1d
NN
3782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3783 (eval $ac_try) 2>&5
3784 ac_status=$?
3785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3786 (exit $ac_status); }; } &&
3787 { ac_try='test -s conftest.$ac_objext'
3788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3789 (eval $ac_try) 2>&5
3790 ac_status=$?
3791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3792 (exit $ac_status); }; }; then
3793 ac_cv_prog_cc_w_no_variadic_macros=yes
3794else
3795 echo "$as_me: failed program was:" >&5
3796sed 's/^/| /' conftest.$ac_ext >&5
3797
3798ac_cv_prog_cc_w_no_variadic_macros=no
3799fi
3800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3801 CFLAGS="$save_CFLAGS"
3802
3803fi
3804echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
3805echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
3806
34a86c2b 3807strict1_warn=
b5472e1d
NN
3808if test $ac_cv_prog_cc_w_no_long_long = yes \
3809 && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
3810 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
34a86c2b
NN
3811fi
3812
3813
643d3bd2
NN
3814# Add -Wold-style-definition if it's accepted
3815echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
3816echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
3817if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
3818 echo $ECHO_N "(cached) $ECHO_C" >&6
3819else
3820 save_CFLAGS="$CFLAGS"
3821 CFLAGS="-Wold-style-definition"
3822 cat >conftest.$ac_ext <<_ACEOF
3823/* confdefs.h. */
3824_ACEOF
3825cat confdefs.h >>conftest.$ac_ext
3826cat >>conftest.$ac_ext <<_ACEOF
3827/* end confdefs.h. */
3828
3829_ACEOF
3830rm -f conftest.$ac_objext
3831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3832 (eval $ac_compile) 2>conftest.er1
3833 ac_status=$?
3834 grep -v '^ *+' conftest.er1 >conftest.err
3835 rm -f conftest.er1
3836 cat conftest.err >&5
3837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3838 (exit $ac_status); } &&
2fac9c01
ZW
3839 { ac_try='test -z "$ac_c_werror_flag"
3840 || test ! -s conftest.err'
643d3bd2
NN
3841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3842 (eval $ac_try) 2>&5
3843 ac_status=$?
3844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3845 (exit $ac_status); }; } &&
3846 { ac_try='test -s conftest.$ac_objext'
3847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3848 (eval $ac_try) 2>&5
3849 ac_status=$?
3850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3851 (exit $ac_status); }; }; then
3852 ac_cv_prog_cc_w_old_style_definition=yes
3853else
3854 echo "$as_me: failed program was:" >&5
3855sed 's/^/| /' conftest.$ac_ext >&5
3856
3857ac_cv_prog_cc_w_old_style_definition=no
3858fi
3859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3860 CFLAGS="$save_CFLAGS"
3861
3862fi
3863echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
3864echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
3865if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
3866 strict1_warn="${strict1_warn} -Wold-style-definition"
3867fi
3868
09a9c095
NN
3869# Enable -Werror, period.
3870# Check whether --enable-werror_always or --disable-werror_always was given.
3871if test "${enable_werror_always+set}" = set; then
3872 enableval="$enable_werror_always"
3873
3874else
3875 enable_werror_always=no
3876fi;
3877if test x${enable_werror_always} = xyes ; then
3878 strict1_warn="${strict1_warn} -Werror"
3879 WERROR=-Werror
3880fi
3881
ba479fd2 3882# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
3883# That's useful for people building cross-compilers, or just running a
3884# quick `make'.
3885warn_cflags=
3886if test "x$GCC" = "xyes"; then
3887 warn_cflags='$(GCC_WARN_CFLAGS)'
3888fi
3889
3890
dd859b8a
KG
3891# Enable -Werror in bootstrap stage2 and later.
3892# Change the default to "no" on release branches.
3893# Check whether --enable-werror or --disable-werror was given.
3894if test "${enable_werror+set}" = set; then
3895 enableval="$enable_werror"
ba479fd2 3896
dd859b8a
KG
3897else
3898 enable_werror=yes
ba479fd2 3899fi;
dd859b8a
KG
3900if test x$enable_werror = xyes ; then
3901 WERROR=-Werror
3902fi
3903
3904
414d23ae
HPN
3905# Enable expensive internal checks
3906# Check whether --enable-checking or --disable-checking was given.
3907if test "${enable_checking+set}" = set; then
3908 enableval="$enable_checking"
3909 ac_checking=
3910ac_tree_checking=
3911ac_rtl_checking=
3912ac_rtlflag_checking=
3913ac_gc_checking=
3914ac_gc_always_collect=
5dfa45d0 3915ac_fold_checking=
414d23ae
HPN
3916case "${enableval}" in
3917yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
3918 ac_rtlflag_checking=1 ;;
3919no) ;;
3920*) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
3921 set fnord $enableval; shift
3922 IFS="$ac_save_IFS"
3923 for check
3924 do
3925 case $check in
3926 misc) ac_checking=1 ;;
3927 tree) ac_tree_checking=1 ;;
3928 rtlflag) ac_rtlflag_checking=1 ;;
3929 rtl) ac_rtl_checking=1 ;;
3930 gc) ac_gc_checking=1 ;;
3931 gcac) ac_gc_always_collect=1 ;;
5dfa45d0 3932 fold) ac_fold_checking=1 ;;
414d23ae 3933 valgrind) ac_checking_valgrind=1 ;;
ba479fd2
NN
3934 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
3935echo "$as_me: error: unknown check category $check" >&2;}
3936 { (exit 1); exit 1; }; } ;;
414d23ae
HPN
3937 esac
3938 done
3939 ;;
3940esac
3941
75e93faa 3942else
414d23ae
HPN
3943 # Enable some checks by default for development versions of GCC
3944ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
ba479fd2
NN
3945fi;
3946nocommon_flag=""
3947if test x$ac_checking != x ; then
3948
3949cat >>confdefs.h <<\_ACEOF
3950#define ENABLE_CHECKING 1
3951_ACEOF
3952
3953 nocommon_flag=-fno-common
3954fi
3955
3956if test x$ac_tree_checking != x ; then
3957
3958cat >>confdefs.h <<\_ACEOF
3959#define ENABLE_TREE_CHECKING 1
3960_ACEOF
3961
13f05fd0 3962 TREEBROWSER=tree-browser.o
ba479fd2 3963fi
13f05fd0 3964
ba479fd2
NN
3965if test x$ac_rtl_checking != x ; then
3966
3967cat >>confdefs.h <<\_ACEOF
3968#define ENABLE_RTL_CHECKING 1
3969_ACEOF
3970
3971fi
3972if test x$ac_rtlflag_checking != x ; then
3973
3974cat >>confdefs.h <<\_ACEOF
3975#define ENABLE_RTL_FLAG_CHECKING 1
3976_ACEOF
3977
3978fi
3979if test x$ac_gc_checking != x ; then
3980
3981cat >>confdefs.h <<\_ACEOF
3982#define ENABLE_GC_CHECKING 1
3983_ACEOF
3984
3985fi
3986if test x$ac_gc_always_collect != x ; then
3987
3988cat >>confdefs.h <<\_ACEOF
3989#define ENABLE_GC_ALWAYS_COLLECT 1
3990_ACEOF
3991
3992fi
3993if test x$ac_fold_checking != x ; then
3994
3995cat >>confdefs.h <<\_ACEOF
3996#define ENABLE_FOLD_CHECKING 1
3997_ACEOF
3998
3999fi
4000valgrind_path_defines=
4001valgrind_command=
4002
4003
4004echo "$as_me:$LINENO: checking for egrep" >&5
4005echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4006if test "${ac_cv_prog_egrep+set}" = set; then
4007 echo $ECHO_N "(cached) $ECHO_C" >&6
4008else
4009 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4010 then ac_cv_prog_egrep='grep -E'
4011 else ac_cv_prog_egrep='egrep'
4012 fi
4013fi
4014echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4015echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4016 EGREP=$ac_cv_prog_egrep
4017
4018
4019echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4020echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4021if test "${ac_cv_header_stdc+set}" = set; then
4022 echo $ECHO_N "(cached) $ECHO_C" >&6
4023else
4024 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4025/* confdefs.h. */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h. */
4030#include <stdlib.h>
4031#include <stdarg.h>
4032#include <string.h>
4033#include <float.h>
4034
4035int
4036main ()
4037{
4038
4039 ;
4040 return 0;
4041}
4042_ACEOF
4043rm -f conftest.$ac_objext
4044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4045 (eval $ac_compile) 2>conftest.er1
ba479fd2 4046 ac_status=$?
86da66b5
HPN
4047 grep -v '^ *+' conftest.er1 >conftest.err
4048 rm -f conftest.er1
4049 cat conftest.err >&5
ba479fd2
NN
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); } &&
2fac9c01
ZW
4052 { ac_try='test -z "$ac_c_werror_flag"
4053 || test ! -s conftest.err'
86da66b5
HPN
4054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4055 (eval $ac_try) 2>&5
4056 ac_status=$?
4057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4058 (exit $ac_status); }; } &&
4059 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
4060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4061 (eval $ac_try) 2>&5
4062 ac_status=$?
4063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 (exit $ac_status); }; }; then
4065 ac_cv_header_stdc=yes
4066else
4067 echo "$as_me: failed program was:" >&5
4068sed 's/^/| /' conftest.$ac_ext >&5
4069
4070ac_cv_header_stdc=no
4071fi
86da66b5 4072rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4073
4074if test $ac_cv_header_stdc = yes; then
4075 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4076 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4077/* confdefs.h. */
4078_ACEOF
4079cat confdefs.h >>conftest.$ac_ext
4080cat >>conftest.$ac_ext <<_ACEOF
4081/* end confdefs.h. */
4082#include <string.h>
4083
4084_ACEOF
4085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4086 $EGREP "memchr" >/dev/null 2>&1; then
4087 :
4088else
4089 ac_cv_header_stdc=no
4090fi
4091rm -f conftest*
4092
4093fi
4094
4095if test $ac_cv_header_stdc = yes; then
4096 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4097 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4098/* confdefs.h. */
4099_ACEOF
4100cat confdefs.h >>conftest.$ac_ext
4101cat >>conftest.$ac_ext <<_ACEOF
4102/* end confdefs.h. */
4103#include <stdlib.h>
4104
4105_ACEOF
4106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4107 $EGREP "free" >/dev/null 2>&1; then
4108 :
4109else
4110 ac_cv_header_stdc=no
4111fi
4112rm -f conftest*
4113
4114fi
4115
4116if test $ac_cv_header_stdc = yes; then
4117 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4118 if test "$cross_compiling" = yes; then
4119 :
4120else
4121 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4122/* confdefs.h. */
4123_ACEOF
4124cat confdefs.h >>conftest.$ac_ext
4125cat >>conftest.$ac_ext <<_ACEOF
4126/* end confdefs.h. */
4127#include <ctype.h>
4128#if ((' ' & 0x0FF) == 0x020)
4129# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4130# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4131#else
4132# define ISLOWER(c) \
86da66b5
HPN
4133 (('a' <= (c) && (c) <= 'i') \
4134 || ('j' <= (c) && (c) <= 'r') \
4135 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
4136# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4137#endif
4138
4139#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4140int
4141main ()
4142{
4143 int i;
4144 for (i = 0; i < 256; i++)
4145 if (XOR (islower (i), ISLOWER (i))
86da66b5 4146 || toupper (i) != TOUPPER (i))
ba479fd2
NN
4147 exit(2);
4148 exit (0);
4149}
4150_ACEOF
4151rm -f conftest$ac_exeext
4152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4153 (eval $ac_link) 2>&5
4154 ac_status=$?
4155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4158 (eval $ac_try) 2>&5
4159 ac_status=$?
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); }; }; then
4162 :
4163else
4164 echo "$as_me: program exited with status $ac_status" >&5
4165echo "$as_me: failed program was:" >&5
4166sed 's/^/| /' conftest.$ac_ext >&5
4167
4168( exit $ac_status )
4169ac_cv_header_stdc=no
63cf211a 4170fi
86da66b5 4171rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4172fi
4173fi
4174fi
4175echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4176echo "${ECHO_T}$ac_cv_header_stdc" >&6
4177if test $ac_cv_header_stdc = yes; then
63cf211a 4178
ba479fd2
NN
4179cat >>confdefs.h <<\_ACEOF
4180#define STDC_HEADERS 1
4181_ACEOF
75e93faa 4182
414d23ae 4183fi
827ae6cf 4184
ba479fd2
NN
4185# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4186
4187
4188
827ae6cf 4189
6e3f3080
NN
4190
4191
6e3f3080 4192
6e3f3080 4193
ba479fd2
NN
4194
4195for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
86da66b5 4196 inttypes.h stdint.h unistd.h
ba479fd2
NN
4197do
4198as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4199echo "$as_me:$LINENO: checking for $ac_header" >&5
4200echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4201if eval "test \"\${$as_ac_Header+set}\" = set"; then
4202 echo $ECHO_N "(cached) $ECHO_C" >&6
4203else
4204 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4205/* confdefs.h. */
4206_ACEOF
4207cat confdefs.h >>conftest.$ac_ext
4208cat >>conftest.$ac_ext <<_ACEOF
4209/* end confdefs.h. */
4210$ac_includes_default
4211
4212#include <$ac_header>
4213_ACEOF
4214rm -f conftest.$ac_objext
4215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4216 (eval $ac_compile) 2>conftest.er1
ba479fd2 4217 ac_status=$?
86da66b5
HPN
4218 grep -v '^ *+' conftest.er1 >conftest.err
4219 rm -f conftest.er1
4220 cat conftest.err >&5
ba479fd2
NN
4221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222 (exit $ac_status); } &&
2fac9c01
ZW
4223 { ac_try='test -z "$ac_c_werror_flag"
4224 || test ! -s conftest.err'
86da66b5
HPN
4225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4226 (eval $ac_try) 2>&5
4227 ac_status=$?
4228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4229 (exit $ac_status); }; } &&
4230 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
4231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4232 (eval $ac_try) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); }; }; then
4236 eval "$as_ac_Header=yes"
4237else
4238 echo "$as_me: failed program was:" >&5
4239sed 's/^/| /' conftest.$ac_ext >&5
4240
4241eval "$as_ac_Header=no"
4242fi
86da66b5 4243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4244fi
4245echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4246echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4247if test `eval echo '${'$as_ac_Header'}'` = yes; then
4248 cat >>confdefs.h <<_ACEOF
4249#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4250_ACEOF
6e3f3080 4251
63cf211a 4252fi
6e3f3080 4253
ba479fd2
NN
4254done
4255
4256
4257if test "${ac_cv_header_valgrind_h+set}" = set; then
4258 echo "$as_me:$LINENO: checking for valgrind.h" >&5
4259echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4260if test "${ac_cv_header_valgrind_h+set}" = set; then
4261 echo $ECHO_N "(cached) $ECHO_C" >&6
4262fi
4263echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4264echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4265else
4266 # Is the header compilable?
4267echo "$as_me:$LINENO: checking valgrind.h usability" >&5
4268echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
4269cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4270/* confdefs.h. */
4271_ACEOF
4272cat confdefs.h >>conftest.$ac_ext
4273cat >>conftest.$ac_ext <<_ACEOF
4274/* end confdefs.h. */
4275$ac_includes_default
63cf211a 4276#include <valgrind.h>
ba479fd2
NN
4277_ACEOF
4278rm -f conftest.$ac_objext
4279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 4280 (eval $ac_compile) 2>conftest.er1
ba479fd2 4281 ac_status=$?
86da66b5
HPN
4282 grep -v '^ *+' conftest.er1 >conftest.err
4283 rm -f conftest.er1
4284 cat conftest.err >&5
ba479fd2
NN
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
2fac9c01
ZW
4287 { ac_try='test -z "$ac_c_werror_flag"
4288 || test ! -s conftest.err'
86da66b5
HPN
4289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4290 (eval $ac_try) 2>&5
4291 ac_status=$?
4292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293 (exit $ac_status); }; } &&
4294 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
4295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4296 (eval $ac_try) 2>&5
4297 ac_status=$?
4298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4299 (exit $ac_status); }; }; then
4300 ac_header_compiler=yes
4301else
4302 echo "$as_me: failed program was:" >&5
4303sed 's/^/| /' conftest.$ac_ext >&5
4304
4305ac_header_compiler=no
4306fi
86da66b5 4307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
4308echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4309echo "${ECHO_T}$ac_header_compiler" >&6
4310
4311# Is the header present?
4312echo "$as_me:$LINENO: checking valgrind.h presence" >&5
4313echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
4314cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4315/* confdefs.h. */
4316_ACEOF
4317cat confdefs.h >>conftest.$ac_ext
4318cat >>conftest.$ac_ext <<_ACEOF
4319/* end confdefs.h. */
4320#include <valgrind.h>
4321_ACEOF
4322if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4323 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4324 ac_status=$?
4325 grep -v '^ *+' conftest.er1 >conftest.err
4326 rm -f conftest.er1
4327 cat conftest.err >&5
4328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4329 (exit $ac_status); } >/dev/null; then
4330 if test -s conftest.err; then
4331 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4332 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4333 else
4334 ac_cpp_err=
4335 fi
4336else
4337 ac_cpp_err=yes
4338fi
4339if test -z "$ac_cpp_err"; then
4340 ac_header_preproc=yes
4341else
4342 echo "$as_me: failed program was:" >&5
4343sed 's/^/| /' conftest.$ac_ext >&5
4344
4345 ac_header_preproc=no
4346fi
4347rm -f conftest.err conftest.$ac_ext
4348echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4349echo "${ECHO_T}$ac_header_preproc" >&6
4350
4351# So? What about this header?
86da66b5
HPN
4352case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4353 yes:no: )
ba479fd2
NN
4354 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
4355echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
4356 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
4357echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
4358 ac_header_preproc=yes
ba479fd2 4359 ;;
86da66b5 4360 no:yes:* )
ba479fd2
NN
4361 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
4362echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
4363 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
4364echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
4365 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
4366echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
4367 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
4368echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
4369 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
4370echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
4371 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
4372echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ba479fd2
NN
4373 (
4374 cat <<\_ASBOX
86da66b5
HPN
4375## ------------------------------------------ ##
4376## Report this to the AC_PACKAGE_NAME lists. ##
4377## ------------------------------------------ ##
ba479fd2
NN
4378_ASBOX
4379 ) |
4380 sed "s/^/$as_me: WARNING: /" >&2
4381 ;;
4382esac
4383echo "$as_me:$LINENO: checking for valgrind.h" >&5
4384echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
4385if test "${ac_cv_header_valgrind_h+set}" = set; then
4386 echo $ECHO_N "(cached) $ECHO_C" >&6
4387else
4388 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 4389fi
ba479fd2
NN
4390echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
4391echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
4392
6e3f3080 4393fi
ba479fd2 4394if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
4395 have_valgrind_h=yes
4396else
ba479fd2 4397 have_valgrind_h=no
6938ec6c
NN
4398fi
4399
4400
ba479fd2 4401
414d23ae
HPN
4402if test x$ac_checking_valgrind != x ; then
4403 # It is certainly possible that there's valgrind but no valgrind.h.
4404 # GCC relies on making annotations so we must have both.
ba479fd2
NN
4405 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
4406echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
4407 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4408/* confdefs.h. */
4409_ACEOF
4410cat confdefs.h >>conftest.$ac_ext
4411cat >>conftest.$ac_ext <<_ACEOF
4412/* end confdefs.h. */
a207b594 4413#include <valgrind/memcheck.h>
14011ca4
AJ
4414#ifndef VALGRIND_DISCARD
4415#error VALGRIND_DISCARD not defined
4416#endif
ba479fd2
NN
4417_ACEOF
4418if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4419 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4420 ac_status=$?
4421 grep -v '^ *+' conftest.er1 >conftest.err
4422 rm -f conftest.er1
4423 cat conftest.err >&5
4424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4425 (exit $ac_status); } >/dev/null; then
4426 if test -s conftest.err; then
4427 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4428 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4429 else
4430 ac_cpp_err=
4431 fi
4432else
4433 ac_cpp_err=yes
4434fi
4435if test -z "$ac_cpp_err"; then
a207b594
HPN
4436 gcc_cv_header_valgrind_memcheck_h=yes
4437else
ba479fd2
NN
4438 echo "$as_me: failed program was:" >&5
4439sed 's/^/| /' conftest.$ac_ext >&5
4440
a207b594
HPN
4441 gcc_cv_header_valgrind_memcheck_h=no
4442fi
ba479fd2
NN
4443rm -f conftest.err conftest.$ac_ext
4444 echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
4445echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
4446 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
4447echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
4448 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
4449/* confdefs.h. */
4450_ACEOF
4451cat confdefs.h >>conftest.$ac_ext
4452cat >>conftest.$ac_ext <<_ACEOF
4453/* end confdefs.h. */
a207b594
HPN
4454#include <memcheck.h>
4455#ifndef VALGRIND_DISCARD
4456#error VALGRIND_DISCARD not defined
4457#endif
ba479fd2
NN
4458_ACEOF
4459if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4460 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4461 ac_status=$?
4462 grep -v '^ *+' conftest.er1 >conftest.err
4463 rm -f conftest.er1
4464 cat conftest.err >&5
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } >/dev/null; then
4467 if test -s conftest.err; then
4468 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 4469 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
4470 else
4471 ac_cpp_err=
4472 fi
4473else
4474 ac_cpp_err=yes
4475fi
4476if test -z "$ac_cpp_err"; then
14011ca4
AJ
4477 gcc_cv_header_memcheck_h=yes
4478else
ba479fd2
NN
4479 echo "$as_me: failed program was:" >&5
4480sed 's/^/| /' conftest.$ac_ext >&5
4481
cafe096b
EC
4482 gcc_cv_header_memcheck_h=no
4483fi
ba479fd2
NN
4484rm -f conftest.err conftest.$ac_ext
4485 echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
4486echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
4487
56694dd9
ZW
4488# Prepare PATH_SEPARATOR.
4489# The user is always right.
4490if test "${PATH_SEPARATOR+set}" != set; then
4491 echo "#! /bin/sh" >conf$$.sh
4492 echo "exit 0" >>conf$$.sh
4493 chmod +x conf$$.sh
4494 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4495 PATH_SEPARATOR=';'
4496 else
4497 PATH_SEPARATOR=:
4498 fi
4499 rm -f conf$$.sh
4500fi
4501
4502# Find out how to test for executable files. Don't use a zero-byte file,
4503# as systems may use methods other than mode bits to determine executability.
4504cat >conf$$.file <<_ASEOF
4505#! /bin/sh
4506exit 0
4507_ASEOF
4508chmod +x conf$$.file
4509if test -x conf$$.file >/dev/null 2>&1; then
4510 ac_executable_p="test -x"
4511else
4512 ac_executable_p="test -f"
4513fi
4514rm -f conf$$.file
4515
4516# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 4517set dummy valgrind; ac_word=$2
ba479fd2
NN
4518echo "$as_me:$LINENO: checking for $ac_word" >&5
4519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4520if test "${ac_cv_path_valgrind_path+set}" = set; then
4521 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
4522else
4523 case "$valgrind_path" in
56694dd9
ZW
4524 [\\/]* | ?:[\\/]*)
4525 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
4526 ;;
414d23ae 4527 *)
56694dd9
ZW
4528 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
4529 for ac_dir in $PATH; do
4530 IFS="$ac_save_IFS"
4531 test -z "$ac_dir" && ac_dir=.
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
4534 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
4535 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
4536 break 2
4537 fi
4538 fi
4539 done
4540 done
4541 IFS="$ac_save_IFS"
4542 ;;
414d23ae 4543esac
75e93faa 4544fi
414d23ae
HPN
4545valgrind_path="$ac_cv_path_valgrind_path"
4546if test -n "$valgrind_path"; then
ba479fd2
NN
4547 echo "$as_me:$LINENO: result: $valgrind_path" >&5
4548echo "${ECHO_T}$valgrind_path" >&6
414d23ae 4549else
ba479fd2
NN
4550 echo "$as_me:$LINENO: result: no" >&5
4551echo "${ECHO_T}no" >&6
414d23ae
HPN
4552fi
4553
a207b594
HPN
4554 if test "x$valgrind_path" = "x" \
4555 || (test $have_valgrind_h = no \
4556 && test $gcc_cv_header_memcheck_h = no \
4557 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
4558 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
4559echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
4560 { (exit 1); exit 1; }; }
414d23ae
HPN
4561 fi
4562 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
4563 valgrind_command="$valgrind_path -q"
ba479fd2
NN
4564
4565cat >>confdefs.h <<\_ACEOF
414d23ae 4566#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 4567_ACEOF
75e93faa 4568
a207b594 4569 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
4570
4571cat >>confdefs.h <<\_ACEOF
a207b594 4572#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 4573_ACEOF
a207b594
HPN
4574
4575 fi
14011ca4 4576 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
4577
4578cat >>confdefs.h <<\_ACEOF
14011ca4 4579#define HAVE_MEMCHECK_H 1
ba479fd2 4580_ACEOF
14011ca4
AJ
4581
4582 fi
414d23ae 4583fi
75e93faa 4584
75e93faa
ZW
4585
4586
74ee1642
PB
4587# Check whether --enable-mapped-location or --disable-mapped-location was given.
4588if test "${enable_mapped_location+set}" = set; then
4589 enableval="$enable_mapped_location"
4590
4591else
4592 enable_mapped_location=no
4593fi;
4594
4595if test "$enable_mapped_location" = yes ; then
4596
4597cat >>confdefs.h <<\_ACEOF
4598#define USE_MAPPED_LOCATION 1
4599_ACEOF
4600
4601fi
4602
414d23ae
HPN
4603# Enable code coverage collection
4604# Check whether --enable-coverage or --disable-coverage was given.
4605if test "${enable_coverage+set}" = set; then
4606 enableval="$enable_coverage"
4607 case "${enableval}" in
6dd297da
NN
4608 yes|noopt)
4609 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
4610 ;;
4611 opt)
4612 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
4613 ;;
4614 no)
4615 # a.k.a. --disable-coverage
4616 coverage_flags=""
4617 ;;
4618 *)
4619 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
4620echo "$as_me: error: unknown coverage setting $enableval" >&2;}
4621 { (exit 1); exit 1; }; }
6dd297da 4622 ;;
414d23ae 4623esac
75e93faa 4624else
414d23ae 4625 coverage_flags=""
ba479fd2 4626fi;
5c3bc9fb 4627
414d23ae 4628
439a7e54
DN
4629# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
4630if test "${enable_gather_detailed_mem_stats+set}" = set; then
4631 enableval="$enable_gather_detailed_mem_stats"
ba479fd2 4632
439a7e54
DN
4633else
4634 enable_gather_detailed_mem_stats=no
ba479fd2 4635fi;
439a7e54 4636if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
4637
4638cat >>confdefs.h <<\_ACEOF
439a7e54 4639#define GATHER_STATISTICS 1
ba479fd2 4640_ACEOF
439a7e54
DN
4641
4642fi
4643
73458fb7
NN
4644# -------------------------------
4645# Miscenalleous configure options
4646# -------------------------------
34a86c2b
NN
4647
4648# With stabs
ba479fd2 4649
34a86c2b
NN
4650# Check whether --with-stabs or --without-stabs was given.
4651if test "${with_stabs+set}" = set; then
4652 withval="$with_stabs"
4653 stabs="$with_stabs"
4654else
4655 stabs=no
ba479fd2 4656fi;
cafe096b 4657
34a86c2b
NN
4658# Determine whether or not multilibs are enabled.
4659# Check whether --enable-multilib or --disable-multilib was given.
4660if test "${enable_multilib+set}" = set; then
4661 enableval="$enable_multilib"
ba479fd2 4662
34a86c2b
NN
4663else
4664 enable_multilib=yes
ba479fd2 4665fi;
75e93faa 4666
34a86c2b 4667
414d23ae
HPN
4668# Enable __cxa_atexit for C++.
4669# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
4670if test "${enable___cxa_atexit+set}" = set; then
4671 enableval="$enable___cxa_atexit"
75e93faa 4672
ba479fd2 4673fi;
75e93faa 4674
414d23ae
HPN
4675# Enable threads
4676# Pass with no value to take the default
4677# Pass with a value to specify a thread package
4678# Check whether --enable-threads or --disable-threads was given.
4679if test "${enable_threads+set}" = set; then
4680 enableval="$enable_threads"
ba479fd2 4681
414d23ae
HPN
4682else
4683 enable_threads=''
ba479fd2 4684fi;
414d23ae
HPN
4685
4686# Check whether --enable-objc-gc or --disable-objc-gc was given.
4687if test "${enable_objc_gc+set}" = set; then
4688 enableval="$enable_objc_gc"
4689 if test x$enable_objc_gc = xno; then
4690 objc_boehm_gc=''
4691else
4692 objc_boehm_gc=1
4693fi
4694else
4695 objc_boehm_gc=''
ba479fd2 4696fi;
75e93faa
ZW
4697
4698
414d23ae
HPN
4699# Check whether --with-dwarf2 or --without-dwarf2 was given.
4700if test "${with_dwarf2+set}" = set; then
4701 withval="$with_dwarf2"
4702 dwarf2="$with_dwarf2"
75e93faa 4703else
414d23ae 4704 dwarf2=no
ba479fd2 4705fi;
75e93faa 4706
414d23ae
HPN
4707# Check whether --enable-shared or --disable-shared was given.
4708if test "${enable_shared+set}" = set; then
4709 enableval="$enable_shared"
ba479fd2 4710
414d23ae
HPN
4711 case $enable_shared in
4712 yes | no) ;;
4713 *)
4714 enable_shared=no
4715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4716 for pkg in $enableval; do
4717 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
4718 enable_shared=yes
4719 fi
4720 done
4721 IFS="$ac_save_ifs"
4722 ;;
4723 esac
4724
75e93faa 4725else
414d23ae 4726 enable_shared=yes
ba479fd2 4727fi;
75e93faa 4728
75e93faa 4729
75e93faa 4730
4977bab6
ZW
4731# Check whether --with-sysroot or --without-sysroot was given.
4732if test "${with_sysroot+set}" = set; then
4733 withval="$with_sysroot"
ba479fd2 4734
4977bab6 4735 case ${with_sysroot} in
caa55b1e 4736 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
4737 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
4738 esac
ba479fd2 4739
4977bab6
ZW
4740 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
4741 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
4742
047d636f
DJ
4743 if test "x$exec_prefix" = xNONE; then
4744 if test "x$prefix" = xNONE; then
4745 test_prefix=/usr/local
4746 else
4747 test_prefix=$prefix
4748 fi
4749 else
4750 test_prefix=$exec_prefix
4751 fi
4752 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
4753 "${test_prefix}"|"${test_prefix}/"*|\
4754 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
4755 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
4756 TARGET_SYSTEM_ROOT_DEFINE="$t"
4757 ;;
4758 esac
4759
4977bab6 4760else
ba479fd2 4761
4977bab6 4762 TARGET_SYSTEM_ROOT=
db720d9a 4763 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
4764 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
4765
ba479fd2 4766fi;
4977bab6
ZW
4767
4768
4769
4770
d1bd0ded 4771# Build with intermodule optimisations
d1bd0ded
GK
4772# Check whether --enable-intermodule or --disable-intermodule was given.
4773if test "${enable_intermodule+set}" = set; then
4774 enableval="$enable_intermodule"
0c46c5c7
KC
4775 case ${enable_intermodule} in
4776 yes) onestep="-onestep";;
4777 *) onestep="";;
d1bd0ded 4778esac
0c46c5c7
KC
4779else
4780 onestep=""
ba479fd2 4781fi;
d1bd0ded
GK
4782
4783
f3c9f174
NN
4784# Sanity check enable_languages in case someone does not run the toplevel
4785# configure # script.
4786# Check whether --enable-languages or --disable-languages was given.
4787if test "${enable_languages+set}" = set; then
4788 enableval="$enable_languages"
4789 case ,${enable_languages}, in
4790 ,,|,yes,)
4791 # go safe -- we cannot be much sure without the toplevel
4792 # configure's
4793 # analysis of which target libs are present and usable
4794 enable_languages=c
4795 ;;
4796 *,all,*)
4797 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
4798echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
4799 { (exit 1); exit 1; }; }
4800 ;;
4801 *,c,*)
4802 ;;
4803 *)
4804 enable_languages=c,${enable_languages}
4805 ;;
4806esac
4807else
4808 enable_languages=c
4809fi;
4810
4811subdirs=
4812for lang in ${srcdir}/*/config-lang.in
4813do
4814 case $lang in
4815 # The odd quoting in the next line works around
4816 # an apparent bug in bash 1.12 on linux.
4817 ${srcdir}/[*]/config-lang.in) ;;
4818 *)
4819 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4820 if test "x$lang_alias" = x
4821 then
4822 echo "$lang doesn't set \$language." 1>&2
4823 exit 1
4824 fi
4825 case ",$enable_languages," in
4826 *,$lang_alias,*)
4827 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
4828 esac
4829 ;;
4830 esac
4831done
4832
4833
73458fb7
NN
4834# -------------------------
4835# Checks for other programs
4836# -------------------------
5b67ad6f 4837
ba479fd2
NN
4838echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4839echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
86da66b5 4840set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
ba479fd2
NN
4841if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4842 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 4843else
ba479fd2 4844 cat >conftest.make <<\_ACEOF
e9a25f70 4845all:
ba479fd2
NN
4846 @echo 'ac_maketemp="$(MAKE)"'
4847_ACEOF
e9a25f70 4848# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ba479fd2 4849eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
e9a25f70
JL
4850if test -n "$ac_maketemp"; then
4851 eval ac_cv_prog_make_${ac_make}_set=yes
4852else
4853 eval ac_cv_prog_make_${ac_make}_set=no
4854fi
ba479fd2 4855rm -f conftest.make
e9a25f70
JL
4856fi
4857if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
ba479fd2
NN
4858 echo "$as_me:$LINENO: result: yes" >&5
4859echo "${ECHO_T}yes" >&6
e9a25f70
JL
4860 SET_MAKE=
4861else
ba479fd2
NN
4862 echo "$as_me:$LINENO: result: no" >&5
4863echo "${ECHO_T}no" >&6
e9a25f70
JL
4864 SET_MAKE="MAKE=${MAKE-make}"
4865fi
4866
4867
861bb6c1 4868# Find some useful tools
ba479fd2 4869for ac_prog in gawk mawk nawk awk
861bb6c1 4870do
ba479fd2 4871 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 4872set dummy $ac_prog; ac_word=$2
ba479fd2
NN
4873echo "$as_me:$LINENO: checking for $ac_word" >&5
4874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4875if test "${ac_cv_prog_AWK+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4877else
4878 if test -n "$AWK"; then
4879 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4880else
ba479fd2
NN
4881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in $PATH
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
4887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4888 ac_cv_prog_AWK="$ac_prog"
4889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893done
4894
861bb6c1
JL
4895fi
4896fi
ba479fd2 4897AWK=$ac_cv_prog_AWK
861bb6c1 4898if test -n "$AWK"; then
ba479fd2
NN
4899 echo "$as_me:$LINENO: result: $AWK" >&5
4900echo "${ECHO_T}$AWK" >&6
861bb6c1 4901else
ba479fd2
NN
4902 echo "$as_me:$LINENO: result: no" >&5
4903echo "${ECHO_T}no" >&6
861bb6c1
JL
4904fi
4905
ba479fd2 4906 test -n "$AWK" && break
861bb6c1
JL
4907done
4908
776dc15d 4909# We need awk to create options.c and options.h.
2c4902b9
NN
4910# Bail out if it's missing.
4911case ${AWK} in
ba479fd2
NN
4912 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
4913echo "$as_me: error: can't build without awk, bailing out" >&2;}
4914 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
4915esac
4916
ba479fd2
NN
4917echo "$as_me:$LINENO: checking whether ln -s works" >&5
4918echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4919if test "${gcc_cv_prog_LN_S+set}" = set; then
4920 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
4921else
4922 rm -f conftestdata_t
4923echo >conftestdata_f
4924if ln -s conftestdata_f conftestdata_t 2>/dev/null
4925then
4926 gcc_cv_prog_LN_S="ln -s"
4927else
4928 if ln conftestdata_f conftestdata_t 2>/dev/null
4929 then
4930 gcc_cv_prog_LN_S=ln
4931 else
4932 gcc_cv_prog_LN_S=cp
4933 fi
4934fi
4935rm -f conftestdata_f conftestdata_t
4936
4937fi
4938LN_S="$gcc_cv_prog_LN_S"
4939if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ba479fd2
NN
4940 echo "$as_me:$LINENO: result: yes" >&5
4941echo "${ECHO_T}yes" >&6
0a4b6309
RL
4942else
4943 if test "$gcc_cv_prog_LN_S" = "ln"; then
ba479fd2
NN
4944 echo "$as_me:$LINENO: result: no, using ln" >&5
4945echo "${ECHO_T}no, using ln" >&6
0a4b6309 4946 else
ba479fd2
NN
4947 echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5
4948echo "${ECHO_T}no, and neither does ln, so using cp" >&6
0a4b6309
RL
4949 fi
4950fi
4951
ad6717df
PB
4952echo "$as_me:$LINENO: checking whether ln works" >&5
4953echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
4954if test "${acx_cv_prog_LN+set}" = set; then
4955 echo $ECHO_N "(cached) $ECHO_C" >&6
4956else
4957 rm -f conftestdata_t
4958echo >conftestdata_f
4959if ln conftestdata_f conftestdata_t 2>/dev/null
4960then
4961 acx_cv_prog_LN=ln
4962else
4963 acx_cv_prog_LN=no
4964fi
4965rm -f conftestdata_f conftestdata_t
4966
4967fi
4968if test $acx_cv_prog_LN = no; then
4969 LN="$LN_S"
4970 echo "$as_me:$LINENO: result: no, using $LN" >&5
4971echo "${ECHO_T}no, using $LN" >&6
4972else
4973 LN="$acx_cv_prog_LN"
4974 echo "$as_me:$LINENO: result: yes" >&5
4975echo "${ECHO_T}yes" >&6
4976fi
4977
ba479fd2
NN
4978if test -n "$ac_tool_prefix"; then
4979 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4980set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4981echo "$as_me:$LINENO: checking for $ac_word" >&5
4982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983if test "${ac_cv_prog_RANLIB+set}" = set; then
4984 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
4985else
4986 if test -n "$RANLIB"; then
4987 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4988else
ba479fd2
NN
4989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992 IFS=$as_save_IFS
4993 test -z "$as_dir" && as_dir=.
4994 for ac_exec_ext in '' $ac_executable_extensions; do
4995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4998 break 2
4999 fi
5000done
5001done
5002
6e3f3080
NN
5003fi
5004fi
ba479fd2 5005RANLIB=$ac_cv_prog_RANLIB
6e3f3080 5006if test -n "$RANLIB"; then
ba479fd2
NN
5007 echo "$as_me:$LINENO: result: $RANLIB" >&5
5008echo "${ECHO_T}$RANLIB" >&6
5009else
5010 echo "$as_me:$LINENO: result: no" >&5
5011echo "${ECHO_T}no" >&6
5012fi
5013
5014fi
5015if test -z "$ac_cv_prog_RANLIB"; then
5016 ac_ct_RANLIB=$RANLIB
5017 # Extract the first word of "ranlib", so it can be a program name with args.
5018set dummy ranlib; ac_word=$2
5019echo "$as_me:$LINENO: checking for $ac_word" >&5
5020echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5021if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5022 echo $ECHO_N "(cached) $ECHO_C" >&6
5023else
5024 if test -n "$ac_ct_RANLIB"; then
5025 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5026else
5027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_prog_ac_ct_RANLIB="ranlib"
5035 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5037 fi
5038done
5039done
5040
5041 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
5042fi
5043fi
5044ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5045if test -n "$ac_ct_RANLIB"; then
5046 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5047echo "${ECHO_T}$ac_ct_RANLIB" >&6
6e3f3080 5048else
ba479fd2
NN
5049 echo "$as_me:$LINENO: result: no" >&5
5050echo "${ECHO_T}no" >&6
5051fi
5052
5053 RANLIB=$ac_ct_RANLIB
5054else
5055 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
5056fi
5057
343a6100
MM
5058case "${host}" in
5059*-*-darwin*)
5060 # By default, the Darwin ranlib will not treat common symbols as
5061 # definitions when building the archive table of contents. Other
5062 # ranlibs do that; pass an option to the Darwin ranlib that makes
5063 # it behave similarly.
5064 ranlib_flags="-c"
5065 ;;
5066*)
5067 ranlib_flags=""
5068esac
5069
5070
0a4b6309
RL
5071# Find a good install program. We prefer a C program (faster),
5072# so one script is as good as another. But avoid the broken or
5073# incompatible versions:
5074# SysV /etc/install, /usr/sbin/install
5075# SunOS /usr/etc/install
5076# IRIX /sbin/install
5077# AIX /bin/install
5078# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5079# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5080# ./install, which can be erroneously created by make from ./install.sh.
ba479fd2
NN
5081echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
5082echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
0a4b6309 5083if test -z "$INSTALL"; then
ba479fd2
NN
5084if test "${ac_cv_path_install+set}" = set; then
5085 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
5086else
5087 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
5088 for ac_dir in $PATH; do
5089 # Account for people who put trailing slashes in PATH elements.
5090 case "$ac_dir/" in
5091 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
5092 *)
5093 # OSF1 and SCO ODT 3.0 have their own names for install.
5094 for ac_prog in ginstall scoinst install; do
5095 if test -f $ac_dir/$ac_prog; then
5096 if test $ac_prog = install &&
5097 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
5098 # AIX install. It has an incompatible calling convention.
5099 # OSF/1 installbsd also uses dspmsg, but is usable.
5100 :
5101 else
5102 ac_cv_path_install="$ac_dir/$ac_prog -c"
5103 break 2
5104 fi
5105 fi
5106 done
5107 ;;
5108 esac
5109 done
5110 IFS="$ac_save_IFS"
5111
5112fi
5113 if test "${ac_cv_path_install+set}" = set; then
5114 INSTALL="$ac_cv_path_install"
5115 else
5116 # As a last resort, use the slow shell script. We don't cache a
5117 # path for INSTALL within a source directory, because that will
5118 # break other packages using the cache if that directory is
5119 # removed, or if the path is relative.
5120 INSTALL="$ac_install_sh"
5121 fi
5122fi
ba479fd2
NN
5123echo "$as_me:$LINENO: result: $INSTALL" >&5
5124echo "${ECHO_T}$INSTALL" >&6
0a4b6309
RL
5125
5126# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5127# It thinks the first close brace ends the variable substitution.
5128test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5129
5130test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5131
861bb6c1 5132
3a000df0 5133# See if cmp has --ignore-initial.
ba479fd2
NN
5134echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
5135echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
5136if test "${gcc_cv_prog_cmp_skip+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
5138else
5139 echo abfoo >t1
5140 echo cdfoo >t2
269a7343 5141 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
5142 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
5143 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 5144 :
3a000df0
KC
5145 else
5146 gcc_cv_prog_cmp_skip=gnucompare
5147 fi
269a7343
KG
5148 fi
5149 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
5150 if cmp t1 t2 2 2 > /dev/null 2>&1; then
5151 if cmp t1 t2 1 1 > /dev/null 2>&1; then
5152 :
5153 else
5154 gcc_cv_prog_cmp_skip=fastcompare
5155 fi
5156 fi
3a000df0
KC
5157 fi
5158 rm t1 t2
5159
5160fi
ba479fd2
NN
5161echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
5162echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
3a000df0
KC
5163make_compare_target=$gcc_cv_prog_cmp_skip
5164
5165
5166
73458fb7
NN
5167# See if we have the mktemp command.
5168# Extract the first word of "mktemp", so it can be a program name with args.
5169set dummy mktemp; ac_word=$2
ba479fd2
NN
5170echo "$as_me:$LINENO: checking for $ac_word" >&5
5171echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5172if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
5173 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5174else
5175 if test -n "$have_mktemp_command"; then
5176 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
5177else
ba479fd2
NN
5178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179for as_dir in $PATH
5180do
5181 IFS=$as_save_IFS
5182 test -z "$as_dir" && as_dir=.
5183 for ac_exec_ext in '' $ac_executable_extensions; do
5184 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185 ac_cv_prog_have_mktemp_command="yes"
5186 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5187 break 2
5188 fi
5189done
5190done
5191
73458fb7
NN
5192 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
5193fi
5194fi
ba479fd2 5195have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 5196if test -n "$have_mktemp_command"; then
ba479fd2
NN
5197 echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
5198echo "${ECHO_T}$have_mktemp_command" >&6
73458fb7 5199else
ba479fd2
NN
5200 echo "$as_me:$LINENO: result: no" >&5
5201echo "${ECHO_T}no" >&6
73458fb7
NN
5202fi
5203
5204
5205# Do we have a single-tree copy of texinfo?
5206if test -f $srcdir/../texinfo/Makefile.in; then
5207 MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo'
5208 gcc_cv_prog_makeinfo_modern=yes
ba479fd2
NN
5209 echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5
5210echo "${ECHO_T}Using makeinfo from the unified source tree." >&6
73458fb7
NN
5211else
5212 # See if makeinfo has been installed and is modern enough
5213 # that we can use it.
5214 # Extract the first word of "makeinfo", so it can be a program name with args.
5215set dummy makeinfo; ac_word=$2
ba479fd2
NN
5216echo "$as_me:$LINENO: checking for $ac_word" >&5
5217echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5218if test "${ac_cv_prog_MAKEINFO+set}" = set; then
5219 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5220else
5221 if test -n "$MAKEINFO"; then
5222 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
5223else
ba479fd2
NN
5224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in $PATH
5226do
5227 IFS=$as_save_IFS
5228 test -z "$as_dir" && as_dir=.
5229 for ac_exec_ext in '' $ac_executable_extensions; do
5230 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231 ac_cv_prog_MAKEINFO="makeinfo"
5232 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5233 break 2
5234 fi
5235done
5236done
5237
73458fb7
NN
5238fi
5239fi
ba479fd2 5240MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 5241if test -n "$MAKEINFO"; then
ba479fd2
NN
5242 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5243echo "${ECHO_T}$MAKEINFO" >&6
73458fb7 5244else
ba479fd2
NN
5245 echo "$as_me:$LINENO: result: no" >&5
5246echo "${ECHO_T}no" >&6
73458fb7
NN
5247fi
5248
5249if test -n "$MAKEINFO"; then
5250 # Found it, now check the version.
ba479fd2
NN
5251 echo "$as_me:$LINENO: checking for modern makeinfo" >&5
5252echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
5253if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
5254 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5255else
5256 ac_prog_version=`$MAKEINFO --version 2>&1 |
5257 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
343a6100 5258 echo "configure:5258: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
5259 case $ac_prog_version in
5260 '') gcc_cv_prog_makeinfo_modern=no;;
5261 4.[2-9]*)
5262 gcc_cv_prog_makeinfo_modern=yes;;
5263 *) gcc_cv_prog_makeinfo_modern=no;;
5264 esac
5265
5266fi
ba479fd2
NN
5267echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
5268echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
73458fb7
NN
5269else
5270 gcc_cv_prog_makeinfo_modern=no
5271fi
5272
5273fi
5274
5275if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
5276 { echo "$as_me:$LINENO: WARNING:
5277*** Makeinfo is missing or too old.
5278*** Info documentation will not be built." >&5
5279echo "$as_me: WARNING:
cafe096b 5280*** Makeinfo is missing or too old.
ba479fd2 5281*** Info documentation will not be built." >&2;}
73458fb7
NN
5282 BUILD_INFO=
5283else
ba479fd2 5284 BUILD_INFO=info
73458fb7
NN
5285fi
5286
5287# Is pod2man recent enough to regenerate manpages?
ba479fd2
NN
5288echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
5289echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
73458fb7 5290if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ba479fd2
NN
5291 echo "$as_me:$LINENO: result: yes" >&5
5292echo "${ECHO_T}yes" >&6
5293 GENERATED_MANPAGES=generated-manpages
73458fb7 5294else
ba479fd2
NN
5295 echo "$as_me:$LINENO: result: no" >&5
5296echo "${ECHO_T}no" >&6
73458fb7
NN
5297 GENERATED_MANPAGES=
5298fi
5299
5300# How about lex?
9850f34a 5301if test x${build} = x${host} && test -f $srcdir/../flex/skel.c; then
73458fb7
NN
5302 FLEX='$(objdir)/../flex/flex'
5303else
5304 # Extract the first word of "flex", so it can be a program name with args.
5305set dummy flex; ac_word=$2
ba479fd2
NN
5306echo "$as_me:$LINENO: checking for $ac_word" >&5
5307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5308if test "${ac_cv_prog_FLEX+set}" = set; then
5309 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5310else
5311 if test -n "$FLEX"; then
5312 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
5313else
ba479fd2
NN
5314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317 IFS=$as_save_IFS
5318 test -z "$as_dir" && as_dir=.
5319 for ac_exec_ext in '' $ac_executable_extensions; do
5320 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5321 ac_cv_prog_FLEX="flex"
5322 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5323 break 2
5324 fi
5325done
5326done
5327
73458fb7
NN
5328 test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex"
5329fi
5330fi
ba479fd2 5331FLEX=$ac_cv_prog_FLEX
73458fb7 5332if test -n "$FLEX"; then
ba479fd2
NN
5333 echo "$as_me:$LINENO: result: $FLEX" >&5
5334echo "${ECHO_T}$FLEX" >&6
73458fb7 5335else
ba479fd2
NN
5336 echo "$as_me:$LINENO: result: no" >&5
5337echo "${ECHO_T}no" >&6
73458fb7
NN
5338fi
5339
5340fi
5341
5342# Bison?
5343# The -L switch is so bison can find its skeleton file.
9850f34a 5344if test x${build} = x${host} && test -f $srcdir/../bison/bison.simple; then
73458fb7
NN
5345 BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
5346else
5347 # Extract the first word of "bison", so it can be a program name with args.
5348set dummy bison; ac_word=$2
ba479fd2
NN
5349echo "$as_me:$LINENO: checking for $ac_word" >&5
5350echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5351if test "${ac_cv_prog_BISON+set}" = set; then
5352 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
5353else
5354 if test -n "$BISON"; then
5355 ac_cv_prog_BISON="$BISON" # Let the user override the test.
5356else
ba479fd2
NN
5357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360 IFS=$as_save_IFS
5361 test -z "$as_dir" && as_dir=.
5362 for ac_exec_ext in '' $ac_executable_extensions; do
5363 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364 ac_cv_prog_BISON="bison"
5365 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5366 break 2
5367 fi
5368done
5369done
5370
73458fb7
NN
5371 test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison"
5372fi
5373fi
ba479fd2 5374BISON=$ac_cv_prog_BISON
73458fb7 5375if test -n "$BISON"; then
ba479fd2
NN
5376 echo "$as_me:$LINENO: result: $BISON" >&5
5377echo "${ECHO_T}$BISON" >&6
73458fb7 5378else
ba479fd2
NN
5379 echo "$as_me:$LINENO: result: no" >&5
5380echo "${ECHO_T}no" >&6
73458fb7
NN
5381fi
5382
5383fi
5384
5385# --------------------
5386# Checks for C headers
5387# --------------------
5388
ba479fd2
NN
5389echo "$as_me:$LINENO: checking for GNU C library" >&5
5390echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
5391if test "${gcc_cv_glibc+set}" = set; then
5392 echo $ECHO_N "(cached) $ECHO_C" >&6
5393else
5394 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
73458fb7 5400#include <features.h>
ba479fd2
NN
5401int
5402main ()
5403{
73458fb7
NN
5404
5405#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
5406#error Not a GNU C library system
5407#endif
ba479fd2
NN
5408 ;
5409 return 0;
5410}
5411_ACEOF
5412rm -f conftest.$ac_objext
5413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5414 (eval $ac_compile) 2>conftest.er1
ba479fd2 5415 ac_status=$?
86da66b5
HPN
5416 grep -v '^ *+' conftest.er1 >conftest.err
5417 rm -f conftest.er1
5418 cat conftest.err >&5
ba479fd2
NN
5419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5420 (exit $ac_status); } &&
2fac9c01
ZW
5421 { ac_try='test -z "$ac_c_werror_flag"
5422 || test ! -s conftest.err'
86da66b5
HPN
5423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5424 (eval $ac_try) 2>&5
5425 ac_status=$?
5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427 (exit $ac_status); }; } &&
5428 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5430 (eval $ac_try) 2>&5
5431 ac_status=$?
5432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433 (exit $ac_status); }; }; then
73458fb7
NN
5434 gcc_cv_glibc=yes
5435else
ba479fd2
NN
5436 echo "$as_me: failed program was:" >&5
5437sed 's/^/| /' conftest.$ac_ext >&5
5438
5439gcc_cv_glibc=no
73458fb7 5440fi
86da66b5 5441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
5442fi
5443
ba479fd2
NN
5444echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
5445echo "${ECHO_T}$gcc_cv_glibc" >&6
73458fb7 5446if test $gcc_cv_glibc = yes; then
ba479fd2
NN
5447
5448cat >>confdefs.h <<\_ACEOF
73458fb7 5449#define _GNU_SOURCE 1
ba479fd2 5450_ACEOF
73458fb7
NN
5451
5452fi
5453
ca9bc441
NN
5454# Need to reject headers which give warnings, so that the -Werror bootstrap
5455# works later. *sigh* This needs to come before all header checks.
5456
5457ac_c_preproc_warn_flag=yes
5458
ba479fd2
NN
5459echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5460echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5461if test "${ac_cv_header_stdc+set}" = set; then
5462 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5463else
ba479fd2 5464 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5465/* confdefs.h. */
5466_ACEOF
5467cat confdefs.h >>conftest.$ac_ext
5468cat >>conftest.$ac_ext <<_ACEOF
5469/* end confdefs.h. */
956d6950
JL
5470#include <stdlib.h>
5471#include <stdarg.h>
5472#include <string.h>
5473#include <float.h>
ba479fd2
NN
5474
5475int
5476main ()
5477{
5478
5479 ;
5480 return 0;
5481}
5482_ACEOF
5483rm -f conftest.$ac_objext
5484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5485 (eval $ac_compile) 2>conftest.er1
ba479fd2 5486 ac_status=$?
86da66b5
HPN
5487 grep -v '^ *+' conftest.er1 >conftest.err
5488 rm -f conftest.er1
5489 cat conftest.err >&5
ba479fd2
NN
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } &&
2fac9c01
ZW
5492 { ac_try='test -z "$ac_c_werror_flag"
5493 || test ! -s conftest.err'
86da66b5
HPN
5494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5495 (eval $ac_try) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); }; } &&
5499 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
956d6950
JL
5505 ac_cv_header_stdc=yes
5506else
ba479fd2
NN
5507 echo "$as_me: failed program was:" >&5
5508sed 's/^/| /' conftest.$ac_ext >&5
5509
5510ac_cv_header_stdc=no
956d6950 5511fi
86da66b5 5512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
5513
5514if test $ac_cv_header_stdc = yes; then
5515 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 5516 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5517/* confdefs.h. */
5518_ACEOF
5519cat confdefs.h >>conftest.$ac_ext
5520cat >>conftest.$ac_ext <<_ACEOF
5521/* end confdefs.h. */
956d6950 5522#include <string.h>
ba479fd2
NN
5523
5524_ACEOF
956d6950 5525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5526 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
5527 :
5528else
956d6950
JL
5529 ac_cv_header_stdc=no
5530fi
5531rm -f conftest*
5532
5533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 5537 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5538/* confdefs.h. */
5539_ACEOF
5540cat confdefs.h >>conftest.$ac_ext
5541cat >>conftest.$ac_ext <<_ACEOF
5542/* end confdefs.h. */
956d6950 5543#include <stdlib.h>
ba479fd2
NN
5544
5545_ACEOF
956d6950 5546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 5547 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
5548 :
5549else
956d6950
JL
5550 ac_cv_header_stdc=no
5551fi
5552rm -f conftest*
5553
5554fi
5555
5556if test $ac_cv_header_stdc = yes; then
5557 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 5558 if test "$cross_compiling" = yes; then
956d6950
JL
5559 :
5560else
ba479fd2 5561 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5562/* confdefs.h. */
5563_ACEOF
5564cat confdefs.h >>conftest.$ac_ext
5565cat >>conftest.$ac_ext <<_ACEOF
5566/* end confdefs.h. */
956d6950 5567#include <ctype.h>
ba479fd2
NN
5568#if ((' ' & 0x0FF) == 0x020)
5569# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5570# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5571#else
5572# define ISLOWER(c) \
86da66b5
HPN
5573 (('a' <= (c) && (c) <= 'i') \
5574 || ('j' <= (c) && (c) <= 'r') \
5575 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
5576# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5577#endif
63cf211a 5578
ba479fd2
NN
5579#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5580int
5581main ()
5582{
5583 int i;
5584 for (i = 0; i < 256; i++)
5585 if (XOR (islower (i), ISLOWER (i))
86da66b5 5586 || toupper (i) != TOUPPER (i))
ba479fd2
NN
5587 exit(2);
5588 exit (0);
5589}
5590_ACEOF
5591rm -f conftest$ac_exeext
5592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5593 (eval $ac_link) 2>&5
5594 ac_status=$?
5595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5598 (eval $ac_try) 2>&5
5599 ac_status=$?
5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601 (exit $ac_status); }; }; then
956d6950
JL
5602 :
5603else
ba479fd2
NN
5604 echo "$as_me: program exited with status $ac_status" >&5
5605echo "$as_me: failed program was:" >&5
5606sed 's/^/| /' conftest.$ac_ext >&5
5607
5608( exit $ac_status )
5609ac_cv_header_stdc=no
956d6950 5610fi
86da66b5 5611rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 5612fi
956d6950
JL
5613fi
5614fi
ba479fd2
NN
5615echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5616echo "${ECHO_T}$ac_cv_header_stdc" >&6
63cf211a 5617if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
5618
5619cat >>confdefs.h <<\_ACEOF
956d6950 5620#define STDC_HEADERS 1
ba479fd2 5621_ACEOF
956d6950
JL
5622
5623fi
5624
ba479fd2
NN
5625echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
5626echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5627if test "${ac_cv_header_time+set}" = set; then
5628 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 5629else
ba479fd2 5630 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5631/* confdefs.h. */
5632_ACEOF
5633cat confdefs.h >>conftest.$ac_ext
5634cat >>conftest.$ac_ext <<_ACEOF
5635/* end confdefs.h. */
956d6950
JL
5636#include <sys/types.h>
5637#include <sys/time.h>
5638#include <time.h>
ba479fd2
NN
5639
5640int
5641main ()
5642{
5643if ((struct tm *) 0)
5644return 0;
5645 ;
5646 return 0;
5647}
5648_ACEOF
5649rm -f conftest.$ac_objext
5650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5651 (eval $ac_compile) 2>conftest.er1
ba479fd2 5652 ac_status=$?
86da66b5
HPN
5653 grep -v '^ *+' conftest.er1 >conftest.err
5654 rm -f conftest.er1
5655 cat conftest.err >&5
ba479fd2
NN
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); } &&
2fac9c01
ZW
5658 { ac_try='test -z "$ac_c_werror_flag"
5659 || test ! -s conftest.err'
86da66b5
HPN
5660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5661 (eval $ac_try) 2>&5
5662 ac_status=$?
5663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5664 (exit $ac_status); }; } &&
5665 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5667 (eval $ac_try) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); }; }; then
956d6950
JL
5671 ac_cv_header_time=yes
5672else
ba479fd2
NN
5673 echo "$as_me: failed program was:" >&5
5674sed 's/^/| /' conftest.$ac_ext >&5
5675
5676ac_cv_header_time=no
956d6950 5677fi
86da66b5 5678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 5679fi
ba479fd2
NN
5680echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5681echo "${ECHO_T}$ac_cv_header_time" >&6
63cf211a 5682if test $ac_cv_header_time = yes; then
ba479fd2
NN
5683
5684cat >>confdefs.h <<\_ACEOF
956d6950 5685#define TIME_WITH_SYS_TIME 1
ba479fd2 5686_ACEOF
956d6950
JL
5687
5688fi
5689
ba479fd2
NN
5690echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
5691echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
5692if test "${gcc_cv_header_string+set}" = set; then
5693 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309 5694else
ba479fd2 5695 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5696/* confdefs.h. */
5697_ACEOF
5698cat confdefs.h >>conftest.$ac_ext
5699cat >>conftest.$ac_ext <<_ACEOF
5700/* end confdefs.h. */
0a4b6309
RL
5701#include <string.h>
5702#include <strings.h>
ba479fd2
NN
5703int
5704main ()
5705{
0a4b6309 5706
ba479fd2
NN
5707 ;
5708 return 0;
5709}
5710_ACEOF
5711rm -f conftest.$ac_objext
5712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5713 (eval $ac_compile) 2>conftest.er1
ba479fd2 5714 ac_status=$?
86da66b5
HPN
5715 grep -v '^ *+' conftest.er1 >conftest.err
5716 rm -f conftest.er1
5717 cat conftest.err >&5
ba479fd2
NN
5718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); } &&
2fac9c01
ZW
5720 { ac_try='test -z "$ac_c_werror_flag"
5721 || test ! -s conftest.err'
86da66b5
HPN
5722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5723 (eval $ac_try) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); }; } &&
5727 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
0a4b6309
RL
5733 gcc_cv_header_string=yes
5734else
ba479fd2
NN
5735 echo "$as_me: failed program was:" >&5
5736sed 's/^/| /' conftest.$ac_ext >&5
5737
5738gcc_cv_header_string=no
0a4b6309 5739fi
86da66b5 5740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
0a4b6309 5741fi
ba479fd2
NN
5742echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
5743echo "${ECHO_T}$gcc_cv_header_string" >&6
63cf211a 5744if test $gcc_cv_header_string = yes; then
ba479fd2
NN
5745
5746cat >>confdefs.h <<\_ACEOF
0a4b6309 5747#define STRING_WITH_STRINGS 1
ba479fd2 5748_ACEOF
0a4b6309
RL
5749
5750fi
5751
ba479fd2
NN
5752echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5753echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5754if test "${ac_cv_header_sys_wait_h+set}" = set; then
5755 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 5756else
ba479fd2 5757 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5758/* confdefs.h. */
5759_ACEOF
5760cat confdefs.h >>conftest.$ac_ext
5761cat >>conftest.$ac_ext <<_ACEOF
5762/* end confdefs.h. */
e9831ca0
KG
5763#include <sys/types.h>
5764#include <sys/wait.h>
5765#ifndef WEXITSTATUS
ba479fd2 5766# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
e9831ca0
KG
5767#endif
5768#ifndef WIFEXITED
ba479fd2 5769# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 5770#endif
ba479fd2
NN
5771
5772int
5773main ()
5774{
5775 int s;
5776 wait (&s);
5777 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 5784 (eval $ac_compile) 2>conftest.er1
ba479fd2 5785 ac_status=$?
86da66b5
HPN
5786 grep -v '^ *+' conftest.er1 >conftest.err
5787 rm -f conftest.er1
5788 cat conftest.err >&5
ba479fd2
NN
5789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5790 (exit $ac_status); } &&
2fac9c01
ZW
5791 { ac_try='test -z "$ac_c_werror_flag"
5792 || test ! -s conftest.err'
86da66b5
HPN
5793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5794 (eval $ac_try) 2>&5
5795 ac_status=$?
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); }; } &&
5798 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
5799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5800 (eval $ac_try) 2>&5
5801 ac_status=$?
5802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803 (exit $ac_status); }; }; then
e9831ca0
KG
5804 ac_cv_header_sys_wait_h=yes
5805else
ba479fd2
NN
5806 echo "$as_me: failed program was:" >&5
5807sed 's/^/| /' conftest.$ac_ext >&5
5808
5809ac_cv_header_sys_wait_h=no
e9831ca0 5810fi
86da66b5 5811rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 5812fi
ba479fd2
NN
5813echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5814echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
63cf211a 5815if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
5816
5817cat >>confdefs.h <<\_ACEOF
e9831ca0 5818#define HAVE_SYS_WAIT_H 1
ba479fd2 5819_ACEOF
6e3f3080 5820
63cf211a 5821fi
6e3f3080 5822
ba479fd2
NN
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
1072ec3f 5845 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 5846 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 5847 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 5848do
ba479fd2 5849as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 5850echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
5851echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5852if eval "test \"\${$as_ac_Header+set}\" = set"; then
5853 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5854else
ca9bc441 5855 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
5861#include <$ac_header>
5862_ACEOF
5863if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5864 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5865 ac_status=$?
5866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); } >/dev/null; then
5871 if test -s conftest.err; then
5872 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 5873 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
5874 else
5875 ac_cpp_err=
5876 fi
5877else
5878 ac_cpp_err=yes
5879fi
5880if test -z "$ac_cpp_err"; then
ca9bc441 5881 eval "$as_ac_Header=yes"
ba479fd2
NN
5882else
5883 echo "$as_me: failed program was:" >&5
5884sed 's/^/| /' conftest.$ac_ext >&5
5885
ca9bc441 5886 eval "$as_ac_Header=no"
ba479fd2
NN
5887fi
5888rm -f conftest.err conftest.$ac_ext
6e3f3080 5889fi
ba479fd2
NN
5890echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5891echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
5892if test `eval echo '${'$as_ac_Header'}'` = yes; then
5893 cat >>confdefs.h <<_ACEOF
5894#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5895_ACEOF
5896
956d6950
JL
5897fi
5898done
5899
5900
f24af81b 5901# Check for thread headers.
ca9bc441 5902echo "$as_me:$LINENO: checking for thread.h" >&5
ba479fd2
NN
5903echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
5904if test "${ac_cv_header_thread_h+set}" = set; then
5905 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 5906else
ca9bc441 5907 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5908/* confdefs.h. */
5909_ACEOF
5910cat confdefs.h >>conftest.$ac_ext
5911cat >>conftest.$ac_ext <<_ACEOF
5912/* end confdefs.h. */
5913#include <thread.h>
5914_ACEOF
5915if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5916 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5917 ac_status=$?
5918 grep -v '^ *+' conftest.er1 >conftest.err
5919 rm -f conftest.er1
5920 cat conftest.err >&5
5921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5922 (exit $ac_status); } >/dev/null; then
5923 if test -s conftest.err; then
5924 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 5925 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
5926 else
5927 ac_cpp_err=
5928 fi
5929else
5930 ac_cpp_err=yes
5931fi
5932if test -z "$ac_cpp_err"; then
ca9bc441 5933 ac_cv_header_thread_h=yes
ba479fd2
NN
5934else
5935 echo "$as_me: failed program was:" >&5
5936sed 's/^/| /' conftest.$ac_ext >&5
5937
ca9bc441 5938 ac_cv_header_thread_h=no
ba479fd2
NN
5939fi
5940rm -f conftest.err conftest.$ac_ext
6e3f3080 5941fi
ba479fd2
NN
5942echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
5943echo "${ECHO_T}$ac_cv_header_thread_h" >&6
ba479fd2 5944if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
5945 have_thread_h=yes
5946else
ba479fd2 5947 have_thread_h=
f24af81b
TT
5948fi
5949
ca9bc441 5950echo "$as_me:$LINENO: checking for pthread.h" >&5
ba479fd2
NN
5951echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
5952if test "${ac_cv_header_pthread_h+set}" = set; then
5953 echo $ECHO_N "(cached) $ECHO_C" >&6
f24af81b 5954else
ca9bc441 5955 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
5956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
5961#include <pthread.h>
5962_ACEOF
5963if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5964 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5965 ac_status=$?
5966 grep -v '^ *+' conftest.er1 >conftest.err
5967 rm -f conftest.er1
5968 cat conftest.err >&5
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } >/dev/null; then
5971 if test -s conftest.err; then
5972 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 5973 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
5974 else
5975 ac_cpp_err=
5976 fi
5977else
5978 ac_cpp_err=yes
5979fi
5980if test -z "$ac_cpp_err"; then
ca9bc441 5981 ac_cv_header_pthread_h=yes
ba479fd2
NN
5982else
5983 echo "$as_me: failed program was:" >&5
5984sed 's/^/| /' conftest.$ac_ext >&5
5985
ca9bc441 5986 ac_cv_header_pthread_h=no
ba479fd2
NN
5987fi
5988rm -f conftest.err conftest.$ac_ext
6e3f3080 5989fi
ba479fd2
NN
5990echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
5991echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
ba479fd2 5992if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
5993 have_pthread_h=yes
5994else
ba479fd2 5995 have_pthread_h=
f24af81b
TT
5996fi
5997
5998
84c041a1 5999# These tests can't be done till we know if we have limits.h.
ba479fd2
NN
6000echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
6001echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
6002if test "${gcc_cv_decl_char_bit+set}" = set; then
6003 echo $ECHO_N "(cached) $ECHO_C" >&6
6004else
6005 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6006/* confdefs.h. */
6007_ACEOF
6008cat confdefs.h >>conftest.$ac_ext
6009cat >>conftest.$ac_ext <<_ACEOF
6010/* end confdefs.h. */
75e93faa
ZW
6011#ifdef HAVE_LIMITS_H
6012#include <limits.h>
6013#endif
6014#ifdef CHAR_BIT
6015found
6016#endif
ba479fd2 6017_ACEOF
75e93faa 6018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 6019 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
6020 gcc_cv_decl_char_bit=yes
6021else
75e93faa
ZW
6022 gcc_cv_decl_char_bit=no
6023fi
6024rm -f conftest*
6025
6026
6027fi
ba479fd2
NN
6028echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
6029echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
75e93faa 6030if test $gcc_cv_decl_char_bit = no; then
ba479fd2
NN
6031 echo "$as_me:$LINENO: checking number of bits in a byte" >&5
6032echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
6033if test "${gcc_cv_c_nbby+set}" = set; then
6034 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
6035else
6036 i=8
6037 gcc_cv_c_nbby=
6038 while test $i -lt 65; do
ba479fd2 6039 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
6045
6046int
6047main ()
6048{
4e70264f
ZW
6049switch(0) {
6050 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
6051 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
6052 ; }
ba479fd2
NN
6053 ;
6054 return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext
6058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6059 (eval $ac_compile) 2>conftest.er1
ba479fd2 6060 ac_status=$?
86da66b5
HPN
6061 grep -v '^ *+' conftest.er1 >conftest.err
6062 rm -f conftest.er1
6063 cat conftest.err >&5
ba479fd2
NN
6064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); } &&
2fac9c01
ZW
6066 { ac_try='test -z "$ac_c_werror_flag"
6067 || test ! -s conftest.err'
86da66b5
HPN
6068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6069 (eval $ac_try) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); }; } &&
6073 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6075 (eval $ac_try) 2>&5
6076 ac_status=$?
6077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6078 (exit $ac_status); }; }; then
4e70264f 6079 gcc_cv_c_nbby=$i; break
75e93faa 6080else
ba479fd2
NN
6081 echo "$as_me: failed program was:" >&5
6082sed 's/^/| /' conftest.$ac_ext >&5
6083
75e93faa 6084fi
86da66b5 6085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
6086 i=`expr $i + 1`
6087 done
6088 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
6089
6090fi
ba479fd2
NN
6091echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
6092echo "${ECHO_T}$gcc_cv_c_nbby" >&6
75e93faa 6093if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
6094 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
6095echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
6096 { (exit 1); exit 1; }; }
75e93faa 6097else
ba479fd2
NN
6098
6099cat >>confdefs.h <<_ACEOF
75e93faa 6100#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 6101_ACEOF
75e93faa
ZW
6102
6103fi
6104fi
ba479fd2
NN
6105echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
6106echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
6107if test "${ac_cv_c_bigendian+set}" = set; then
6108 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 6109else
4977bab6
ZW
6110 ac_cv_c_bigendian=unknown
6111# See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 6112cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6113/* confdefs.h. */
6114_ACEOF
6115cat confdefs.h >>conftest.$ac_ext
6116cat >>conftest.$ac_ext <<_ACEOF
6117/* end confdefs.h. */
4977bab6
ZW
6118#include <sys/types.h>
6119#include <sys/param.h>
ba479fd2
NN
6120int
6121main ()
6122{
2d6eb5bf 6123
4977bab6
ZW
6124#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6125 bogus endian macros
84c041a1 6126#endif
ba479fd2
NN
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131rm -f conftest.$ac_objext
6132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6133 (eval $ac_compile) 2>conftest.er1
ba479fd2 6134 ac_status=$?
86da66b5
HPN
6135 grep -v '^ *+' conftest.er1 >conftest.err
6136 rm -f conftest.er1
6137 cat conftest.err >&5
ba479fd2
NN
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139 (exit $ac_status); } &&
2fac9c01
ZW
6140 { ac_try='test -z "$ac_c_werror_flag"
6141 || test ! -s conftest.err'
86da66b5
HPN
6142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6143 (eval $ac_try) 2>&5
6144 ac_status=$?
6145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6146 (exit $ac_status); }; } &&
6147 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6149 (eval $ac_try) 2>&5
6150 ac_status=$?
6151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152 (exit $ac_status); }; }; then
4977bab6 6153 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 6154cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6155/* confdefs.h. */
6156_ACEOF
6157cat confdefs.h >>conftest.$ac_ext
6158cat >>conftest.$ac_ext <<_ACEOF
6159/* end confdefs.h. */
4977bab6
ZW
6160#include <sys/types.h>
6161#include <sys/param.h>
ba479fd2
NN
6162int
6163main ()
6164{
4977bab6
ZW
6165
6166#if BYTE_ORDER != BIG_ENDIAN
6167 not big endian
84c041a1 6168#endif
ba479fd2
NN
6169 ;
6170 return 0;
6171}
6172_ACEOF
6173rm -f conftest.$ac_objext
6174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6175 (eval $ac_compile) 2>conftest.er1
ba479fd2 6176 ac_status=$?
86da66b5
HPN
6177 grep -v '^ *+' conftest.er1 >conftest.err
6178 rm -f conftest.er1
6179 cat conftest.err >&5
ba479fd2
NN
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); } &&
2fac9c01
ZW
6182 { ac_try='test -z "$ac_c_werror_flag"
6183 || test ! -s conftest.err'
86da66b5
HPN
6184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6185 (eval $ac_try) 2>&5
6186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); }; } &&
6189 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; }; then
4977bab6
ZW
6195 ac_cv_c_bigendian=yes
6196else
ba479fd2
NN
6197 echo "$as_me: failed program was:" >&5
6198sed 's/^/| /' conftest.$ac_ext >&5
6199
6200ac_cv_c_bigendian=no
4977bab6 6201fi
86da66b5 6202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 6203else
ba479fd2
NN
6204 echo "$as_me: failed program was:" >&5
6205sed 's/^/| /' conftest.$ac_ext >&5
6206
4977bab6 6207fi
86da66b5 6208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6
ZW
6209if test $ac_cv_c_bigendian = unknown; then
6210if test "$cross_compiling" = yes; then
ba479fd2
NN
6211 echo $ac_n "cross-compiling... " 2>&6
6212else
6213 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6214/* confdefs.h. */
6215_ACEOF
6216cat confdefs.h >>conftest.$ac_ext
6217cat >>conftest.$ac_ext <<_ACEOF
6218/* end confdefs.h. */
4977bab6
ZW
6219main () {
6220 /* Are we little or big endian? From Harbison&Steele. */
6221 union
6222 {
6223 long l;
6224 char c[sizeof (long)];
6225 } u;
6226 u.l = 1;
6227 exit (u.c[sizeof (long) - 1] == 1);
6228}
ba479fd2
NN
6229_ACEOF
6230rm -f conftest$ac_exeext
6231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6232 (eval $ac_link) 2>&5
6233 ac_status=$?
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6237 (eval $ac_try) 2>&5
6238 ac_status=$?
6239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240 (exit $ac_status); }; }; then
4977bab6
ZW
6241 ac_cv_c_bigendian=no
6242else
ba479fd2
NN
6243 echo "$as_me: program exited with status $ac_status" >&5
6244echo "$as_me: failed program was:" >&5
6245sed 's/^/| /' conftest.$ac_ext >&5
6246
6247( exit $ac_status )
6248ac_cv_c_bigendian=yes
4977bab6 6249fi
86da66b5 6250rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 6251fi
4977bab6
ZW
6252fi
6253fi
ba479fd2
NN
6254echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6255echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4977bab6 6256if test $ac_cv_c_bigendian = unknown; then
ba479fd2
NN
6257echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
6258echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
2d6eb5bf 6259
4977bab6
ZW
6260cat >conftest.c <<EOF
6261short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6262short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6263void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
6264short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6265short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6266void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
6267int main() { _ascii (); _ebcdic (); return 0; }
6268EOF
6269 if test -f conftest.c ; then
3beb1315 6270 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
4977bab6
ZW
6271 if test `grep -l BIGenDianSyS conftest.o` ; then
6272 echo $ac_n ' big endian probe OK, ' 1>&6
6273 ac_cv_c_bigendian=yes
6274 fi
6275 if test `grep -l LiTTleEnDian conftest.o` ; then
6276 echo $ac_n ' little endian probe OK, ' 1>&6
6277 if test $ac_cv_c_bigendian = yes ; then
6278 ac_cv_c_bigendian=unknown;
6279 else
6280 ac_cv_c_bigendian=no
6281 fi
6282 fi
6283 echo $ac_n 'guessing bigendian ... ' >&6
6284 fi
6285 fi
ba479fd2
NN
6286echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
6287echo "${ECHO_T}$ac_cv_c_bigendian" >&6
84c041a1 6288fi
4977bab6 6289if test $ac_cv_c_bigendian = yes; then
ba479fd2
NN
6290
6291cat >>confdefs.h <<\_ACEOF
4977bab6 6292#define WORDS_BIGENDIAN 1
ba479fd2 6293_ACEOF
cafe096b 6294
ba479fd2
NN
6295
6296cat >>confdefs.h <<\_ACEOF
84c041a1 6297#define HOST_WORDS_BIG_ENDIAN 1
ba479fd2 6298_ACEOF
84c041a1 6299
4977bab6
ZW
6300 BYTEORDER=4321
6301else
6302 BYTEORDER=1234
6303fi
ba479fd2
NN
6304
6305cat >>confdefs.h <<_ACEOF
4977bab6 6306#define BYTEORDER $BYTEORDER
ba479fd2 6307_ACEOF
4977bab6
ZW
6308
6309if test $ac_cv_c_bigendian = unknown; then
3beb1315
HPN
6310 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
6311echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
6312 { (exit 1); exit 1; }; }
84c041a1
ZW
6313fi
6314
75e93faa 6315
73458fb7
NN
6316# --------
6317# UNSORTED
6318# --------
1e608388 6319
73458fb7
NN
6320# Stage specific cflags for build.
6321stage1_cflags=
6322case $build in
6323vax-*-*)
6324 if test x$GCC = xyes
6325 then
6326 stage1_cflags="-Wa,-J"
6327 else
6328 stage1_cflags="-J"
6329 fi
6330 ;;
6331powerpc-*-darwin*)
6332 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6333 # sources; use -no-cpp-precomp to get to GNU cpp.
6334 # Apple's GCC has bugs in designated initializer handling, so disable
6335 # that too.
6336 stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6337 ;;
6338esac
1e608388 6339
1e608388 6340
4e70264f
ZW
6341# These libraries may be used by collect2.
6342# We may need a special search path to get them linked.
ba479fd2
NN
6343echo "$as_me:$LINENO: checking for collect2 libraries" >&5
6344echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
6345if test "${gcc_cv_collect2_libs+set}" = set; then
6346 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
6347else
6348 save_LIBS="$LIBS"
7f2749d4 6349for libs in '' -lld -lmld \
4e70264f
ZW
6350 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
6351 '-L/usr/lib/cmplrs/cc3.11 -lmld'
6352do
6353 LIBS="$libs"
ba479fd2 6354 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6355/* confdefs.h. */
6356_ACEOF
6357cat confdefs.h >>conftest.$ac_ext
6358cat >>conftest.$ac_ext <<_ACEOF
6359/* end confdefs.h. */
6360
4e70264f 6361/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6362#ifdef __cplusplus
6363extern "C"
6364#endif
4e70264f 6365/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6366 builtin and then its argument prototype would still apply. */
6367char ldopen ();
6368int
6369main ()
6370{
6371ldopen ();
6372 ;
6373 return 0;
6374}
6375_ACEOF
6376rm -f conftest.$ac_objext conftest$ac_exeext
6377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6378 (eval $ac_link) 2>conftest.er1
ba479fd2 6379 ac_status=$?
86da66b5
HPN
6380 grep -v '^ *+' conftest.er1 >conftest.err
6381 rm -f conftest.er1
6382 cat conftest.err >&5
ba479fd2
NN
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); } &&
2fac9c01
ZW
6385 { ac_try='test -z "$ac_c_werror_flag"
6386 || test ! -s conftest.err'
86da66b5
HPN
6387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6388 (eval $ac_try) 2>&5
6389 ac_status=$?
6390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6391 (exit $ac_status); }; } &&
6392 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); }; }; then
4e70264f
ZW
6398 gcc_cv_collect2_libs="$libs"; break
6399else
ba479fd2
NN
6400 echo "$as_me: failed program was:" >&5
6401sed 's/^/| /' conftest.$ac_ext >&5
6402
4e70264f 6403fi
86da66b5
HPN
6404rm -f conftest.err conftest.$ac_objext \
6405 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
6406done
6407LIBS="$save_LIBS"
6408test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
6409fi
ba479fd2
NN
6410echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
6411echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
4e70264f
ZW
6412case $gcc_cv_collect2_libs in
6413 "none required") ;;
6414 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
6415esac
6416
6417
7f2749d4
RK
6418# When building Ada code on Alpha, we need exc_resume which is usually in
6419# -lexc. So test for it.
6420save_LIBS="$LIBS"
6421LIBS=
ba479fd2
NN
6422echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
6423echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
6424if test "${ac_cv_search_exc_resume+set}" = set; then
6425 echo $ECHO_N "(cached) $ECHO_C" >&6
6426else
6427 ac_func_search_save_LIBS=$LIBS
6428ac_cv_search_exc_resume=no
6429cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6430/* confdefs.h. */
6431_ACEOF
6432cat confdefs.h >>conftest.$ac_ext
6433cat >>conftest.$ac_ext <<_ACEOF
6434/* end confdefs.h. */
7f2749d4 6435
7f2749d4 6436/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6437#ifdef __cplusplus
6438extern "C"
6439#endif
7f2749d4 6440/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6441 builtin and then its argument prototype would still apply. */
6442char exc_resume ();
6443int
6444main ()
6445{
6446exc_resume ();
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext conftest$ac_exeext
6452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6453 (eval $ac_link) 2>conftest.er1
ba479fd2 6454 ac_status=$?
86da66b5
HPN
6455 grep -v '^ *+' conftest.er1 >conftest.err
6456 rm -f conftest.er1
6457 cat conftest.err >&5
ba479fd2
NN
6458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459 (exit $ac_status); } &&
2fac9c01
ZW
6460 { ac_try='test -z "$ac_c_werror_flag"
6461 || test ! -s conftest.err'
86da66b5
HPN
6462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6463 (eval $ac_try) 2>&5
6464 ac_status=$?
6465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466 (exit $ac_status); }; } &&
6467 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469 (eval $ac_try) 2>&5
6470 ac_status=$?
6471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472 (exit $ac_status); }; }; then
7f2749d4
RK
6473 ac_cv_search_exc_resume="none required"
6474else
ba479fd2
NN
6475 echo "$as_me: failed program was:" >&5
6476sed 's/^/| /' conftest.$ac_ext >&5
6477
7f2749d4 6478fi
86da66b5
HPN
6479rm -f conftest.err conftest.$ac_objext \
6480 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6481if test "$ac_cv_search_exc_resume" = no; then
6482 for ac_lib in exc; do
6483 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6484 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6485/* confdefs.h. */
6486_ACEOF
6487cat confdefs.h >>conftest.$ac_ext
6488cat >>conftest.$ac_ext <<_ACEOF
6489/* end confdefs.h. */
6490
7f2749d4 6491/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6492#ifdef __cplusplus
6493extern "C"
6494#endif
7f2749d4 6495/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6496 builtin and then its argument prototype would still apply. */
6497char exc_resume ();
6498int
6499main ()
6500{
6501exc_resume ();
6502 ;
6503 return 0;
6504}
6505_ACEOF
6506rm -f conftest.$ac_objext conftest$ac_exeext
6507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6508 (eval $ac_link) 2>conftest.er1
ba479fd2 6509 ac_status=$?
86da66b5
HPN
6510 grep -v '^ *+' conftest.er1 >conftest.err
6511 rm -f conftest.er1
6512 cat conftest.err >&5
ba479fd2
NN
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); } &&
2fac9c01
ZW
6515 { ac_try='test -z "$ac_c_werror_flag"
6516 || test ! -s conftest.err'
86da66b5
HPN
6517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6518 (eval $ac_try) 2>&5
6519 ac_status=$?
6520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521 (exit $ac_status); }; } &&
6522 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6524 (eval $ac_try) 2>&5
6525 ac_status=$?
6526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527 (exit $ac_status); }; }; then
6528 ac_cv_search_exc_resume="-l$ac_lib"
7f2749d4
RK
6529break
6530else
ba479fd2
NN
6531 echo "$as_me: failed program was:" >&5
6532sed 's/^/| /' conftest.$ac_ext >&5
6533
cafe096b 6534fi
86da66b5
HPN
6535rm -f conftest.err conftest.$ac_objext \
6536 conftest$ac_exeext conftest.$ac_ext
ba479fd2 6537 done
6e3f3080 6538fi
ba479fd2
NN
6539LIBS=$ac_func_search_save_LIBS
6540fi
6541echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
6542echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
6543if test "$ac_cv_search_exc_resume" != no; then
63cf211a 6544 test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
ba479fd2 6545
7f2749d4 6546fi
ba479fd2 6547
7f2749d4
RK
6548GNAT_LIBEXC="$LIBS"
6549LIBS="$save_LIBS"
6550
6551
62c9aa5f
ZW
6552# Some systems put ldexp and frexp in libm instead of libc; assume
6553# they're both in the same place. jcf-dump needs them.
6554save_LIBS="$LIBS"
6555LIBS=
ba479fd2
NN
6556echo "$as_me:$LINENO: checking for library containing ldexp" >&5
6557echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
6558if test "${ac_cv_search_ldexp+set}" = set; then
6559 echo $ECHO_N "(cached) $ECHO_C" >&6
6560else
6561 ac_func_search_save_LIBS=$LIBS
6562ac_cv_search_ldexp=no
6563cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6564/* confdefs.h. */
6565_ACEOF
6566cat confdefs.h >>conftest.$ac_ext
6567cat >>conftest.$ac_ext <<_ACEOF
6568/* end confdefs.h. */
62c9aa5f 6569
62c9aa5f 6570/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6571#ifdef __cplusplus
6572extern "C"
6573#endif
62c9aa5f 6574/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6575 builtin and then its argument prototype would still apply. */
6576char ldexp ();
6577int
6578main ()
6579{
6580ldexp ();
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585rm -f conftest.$ac_objext conftest$ac_exeext
6586if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6587 (eval $ac_link) 2>conftest.er1
ba479fd2 6588 ac_status=$?
86da66b5
HPN
6589 grep -v '^ *+' conftest.er1 >conftest.err
6590 rm -f conftest.er1
6591 cat conftest.err >&5
ba479fd2
NN
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); } &&
2fac9c01
ZW
6594 { ac_try='test -z "$ac_c_werror_flag"
6595 || test ! -s conftest.err'
86da66b5
HPN
6596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6597 (eval $ac_try) 2>&5
6598 ac_status=$?
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600 (exit $ac_status); }; } &&
6601 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603 (eval $ac_try) 2>&5
6604 ac_status=$?
6605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606 (exit $ac_status); }; }; then
62c9aa5f
ZW
6607 ac_cv_search_ldexp="none required"
6608else
ba479fd2
NN
6609 echo "$as_me: failed program was:" >&5
6610sed 's/^/| /' conftest.$ac_ext >&5
6611
62c9aa5f 6612fi
86da66b5
HPN
6613rm -f conftest.err conftest.$ac_objext \
6614 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6615if test "$ac_cv_search_ldexp" = no; then
6616 for ac_lib in m; do
6617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6618 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6619/* confdefs.h. */
6620_ACEOF
6621cat confdefs.h >>conftest.$ac_ext
6622cat >>conftest.$ac_ext <<_ACEOF
6623/* end confdefs.h. */
6624
62c9aa5f 6625/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6626#ifdef __cplusplus
6627extern "C"
6628#endif
62c9aa5f 6629/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6630 builtin and then its argument prototype would still apply. */
6631char ldexp ();
6632int
6633main ()
6634{
6635ldexp ();
6636 ;
6637 return 0;
6638}
6639_ACEOF
6640rm -f conftest.$ac_objext conftest$ac_exeext
6641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6642 (eval $ac_link) 2>conftest.er1
ba479fd2 6643 ac_status=$?
86da66b5
HPN
6644 grep -v '^ *+' conftest.er1 >conftest.err
6645 rm -f conftest.er1
6646 cat conftest.err >&5
ba479fd2
NN
6647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
2fac9c01
ZW
6649 { ac_try='test -z "$ac_c_werror_flag"
6650 || test ! -s conftest.err'
86da66b5
HPN
6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; } &&
6656 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6658 (eval $ac_try) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); }; }; then
6662 ac_cv_search_ldexp="-l$ac_lib"
62c9aa5f
ZW
6663break
6664else
ba479fd2
NN
6665 echo "$as_me: failed program was:" >&5
6666sed 's/^/| /' conftest.$ac_ext >&5
6667
cafe096b 6668fi
86da66b5
HPN
6669rm -f conftest.err conftest.$ac_objext \
6670 conftest$ac_exeext conftest.$ac_ext
ba479fd2 6671 done
6e3f3080 6672fi
ba479fd2
NN
6673LIBS=$ac_func_search_save_LIBS
6674fi
6675echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
6676echo "${ECHO_T}$ac_cv_search_ldexp" >&6
6677if test "$ac_cv_search_ldexp" != no; then
63cf211a 6678 test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
ba479fd2 6679
62c9aa5f 6680fi
ba479fd2 6681
62c9aa5f
ZW
6682LDEXP_LIB="$LIBS"
6683LIBS="$save_LIBS"
6684
6685
956d6950
JL
6686# Use <inttypes.h> only if it exists,
6687# doesn't clash with <sys/types.h>, and declares intmax_t.
ba479fd2
NN
6688echo "$as_me:$LINENO: checking for inttypes.h" >&5
6689echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
6690if test "${gcc_cv_header_inttypes_h+set}" = set; then
6691 echo $ECHO_N "(cached) $ECHO_C" >&6
6692else
6693 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6694/* confdefs.h. */
6695_ACEOF
6696cat confdefs.h >>conftest.$ac_ext
6697cat >>conftest.$ac_ext <<_ACEOF
6698/* end confdefs.h. */
956d6950
JL
6699#include <sys/types.h>
6700#include <inttypes.h>
ba479fd2
NN
6701int
6702main ()
6703{
956d6950 6704intmax_t i = -1;
ba479fd2
NN
6705 ;
6706 return 0;
6707}
6708_ACEOF
6709rm -f conftest.$ac_objext
6710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6711 (eval $ac_compile) 2>conftest.er1
ba479fd2 6712 ac_status=$?
86da66b5
HPN
6713 grep -v '^ *+' conftest.er1 >conftest.err
6714 rm -f conftest.er1
6715 cat conftest.err >&5
ba479fd2
NN
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); } &&
2fac9c01
ZW
6718 { ac_try='test -z "$ac_c_werror_flag"
6719 || test ! -s conftest.err'
86da66b5
HPN
6720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6721 (eval $ac_try) 2>&5
6722 ac_status=$?
6723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6724 (exit $ac_status); }; } &&
6725 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
6726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6727 (eval $ac_try) 2>&5
6728 ac_status=$?
6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730 (exit $ac_status); }; }; then
0056a9b5 6731 gcc_cv_header_inttypes_h=yes
956d6950 6732else
ba479fd2
NN
6733 echo "$as_me: failed program was:" >&5
6734sed 's/^/| /' conftest.$ac_ext >&5
6735
6736gcc_cv_header_inttypes_h=no
956d6950 6737fi
86da66b5 6738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
6739fi
6740
ba479fd2
NN
6741echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
6742echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
0056a9b5 6743if test $gcc_cv_header_inttypes_h = yes; then
ba479fd2
NN
6744
6745cat >>confdefs.h <<\_ACEOF
0056a9b5 6746#define HAVE_INTTYPES_H 1
ba479fd2 6747_ACEOF
0056a9b5
KG
6748
6749fi
956d6950 6750
c149cc37 6751
ba479fd2
NN
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6af8c740
KG
6777for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
6778 sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
4e87a651 6779 fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
56694dd9
ZW
6780 scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
6781 setlocale
956d6950 6782do
ba479fd2
NN
6783as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6784echo "$as_me:$LINENO: checking for $ac_func" >&5
6785echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6786if eval "test \"\${$as_ac_var+set}\" = set"; then
6787 echo $ECHO_N "(cached) $ECHO_C" >&6
6788else
6789 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6790/* confdefs.h. */
6791_ACEOF
6792cat confdefs.h >>conftest.$ac_ext
6793cat >>conftest.$ac_ext <<_ACEOF
6794/* end confdefs.h. */
86da66b5
HPN
6795/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6796 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6797#define $ac_func innocuous_$ac_func
6798
956d6950 6799/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
6800 which can conflict with char $ac_func (); below.
6801 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6802 <limits.h> exists even on freestanding compilers. */
86da66b5 6803
ba479fd2
NN
6804#ifdef __STDC__
6805# include <limits.h>
6806#else
6807# include <assert.h>
6808#endif
86da66b5
HPN
6809
6810#undef $ac_func
6811
6e3f3080 6812/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
6813#ifdef __cplusplus
6814extern "C"
6815{
6816#endif
6e3f3080 6817/* We use char because int might match the return type of a gcc2
ba479fd2
NN
6818 builtin and then its argument prototype would still apply. */
6819char $ac_func ();
956d6950
JL
6820/* The GNU C library defines this for functions which it implements
6821 to always fail with ENOSYS. Some functions are actually named
6822 something starting with __ and the normal name is an alias. */
6823#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6824choke me
6825#else
ba479fd2
NN
6826char (*f) () = $ac_func;
6827#endif
6828#ifdef __cplusplus
6829}
956d6950
JL
6830#endif
6831
ba479fd2
NN
6832int
6833main ()
6834{
6835return f != $ac_func;
6836 ;
6837 return 0;
6838}
6839_ACEOF
6840rm -f conftest.$ac_objext conftest$ac_exeext
6841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 6842 (eval $ac_link) 2>conftest.er1
ba479fd2 6843 ac_status=$?
86da66b5
HPN
6844 grep -v '^ *+' conftest.er1 >conftest.err
6845 rm -f conftest.er1
6846 cat conftest.err >&5
ba479fd2
NN
6847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848 (exit $ac_status); } &&
2fac9c01
ZW
6849 { ac_try='test -z "$ac_c_werror_flag"
6850 || test ! -s conftest.err'
86da66b5
HPN
6851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6852 (eval $ac_try) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); }; } &&
6856 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
6857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6858 (eval $ac_try) 2>&5
6859 ac_status=$?
6860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861 (exit $ac_status); }; }; then
6862 eval "$as_ac_var=yes"
6863else
6864 echo "$as_me: failed program was:" >&5
6865sed 's/^/| /' conftest.$ac_ext >&5
6866
6867eval "$as_ac_var=no"
6868fi
86da66b5
HPN
6869rm -f conftest.err conftest.$ac_objext \
6870 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
6871fi
6872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6873echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6874if test `eval echo '${'$as_ac_var'}'` = yes; then
6875 cat >>confdefs.h <<_ACEOF
6876#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6877_ACEOF
956d6950 6878
956d6950
JL
6879fi
6880done
6881
6885fc87 6882
39f6c4c8 6883if test x$ac_cv_func_mbstowcs = xyes; then
ba479fd2
NN
6884 echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
6885echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
6886if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
6887 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
6888else
6889 if test "$cross_compiling" = yes; then
6890 gcc_cv_func_mbstowcs_works=yes
6891else
ba479fd2 6892 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6893/* confdefs.h. */
6894_ACEOF
6895cat confdefs.h >>conftest.$ac_ext
6896cat >>conftest.$ac_ext <<_ACEOF
6897/* end confdefs.h. */
39f6c4c8
KW
6898#include <stdlib.h>
6899int main()
6900{
6901 mbstowcs(0, "", 0);
6902 return 0;
6903}
ba479fd2
NN
6904_ACEOF
6905rm -f conftest$ac_exeext
6906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6907 (eval $ac_link) 2>&5
6908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6912 (eval $ac_try) 2>&5
6913 ac_status=$?
6914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6915 (exit $ac_status); }; }; then
39f6c4c8
KW
6916 gcc_cv_func_mbstowcs_works=yes
6917else
ba479fd2
NN
6918 echo "$as_me: program exited with status $ac_status" >&5
6919echo "$as_me: failed program was:" >&5
6920sed 's/^/| /' conftest.$ac_ext >&5
6921
6922( exit $ac_status )
6923gcc_cv_func_mbstowcs_works=no
39f6c4c8 6924fi
86da66b5 6925rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 6926fi
39f6c4c8 6927fi
ba479fd2
NN
6928echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
6929echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
63cf211a 6930 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
6931
6932cat >>confdefs.h <<\_ACEOF
39f6c4c8 6933#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 6934_ACEOF
39f6c4c8
KW
6935
6936 fi
6937fi
6938
ba479fd2
NN
6939echo "$as_me:$LINENO: checking for ssize_t" >&5
6940echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6941if test "${ac_cv_type_ssize_t+set}" = set; then
6942 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 6943else
ba479fd2 6944 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
8b4fc07a
NN
6950$ac_includes_default
6951int
6952main ()
6953{
6954if ((ssize_t *) 0)
6955 return 0;
6956if (sizeof (ssize_t))
6957 return 0;
6958 ;
6959 return 0;
6960}
ba479fd2 6961_ACEOF
8b4fc07a
NN
6962rm -f conftest.$ac_objext
6963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 6964 (eval $ac_compile) 2>conftest.er1
8b4fc07a 6965 ac_status=$?
86da66b5
HPN
6966 grep -v '^ *+' conftest.er1 >conftest.err
6967 rm -f conftest.er1
6968 cat conftest.err >&5
8b4fc07a
NN
6969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6970 (exit $ac_status); } &&
2fac9c01
ZW
6971 { ac_try='test -z "$ac_c_werror_flag"
6972 || test ! -s conftest.err'
86da66b5
HPN
6973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6974 (eval $ac_try) 2>&5
6975 ac_status=$?
6976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6977 (exit $ac_status); }; } &&
6978 { ac_try='test -s conftest.$ac_objext'
8b4fc07a
NN
6979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6980 (eval $ac_try) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); }; }; then
cb65112a 6984 ac_cv_type_ssize_t=yes
f12bc141 6985else
8b4fc07a
NN
6986 echo "$as_me: failed program was:" >&5
6987sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 6988
8b4fc07a
NN
6989ac_cv_type_ssize_t=no
6990fi
86da66b5 6991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 6992fi
ba479fd2
NN
6993echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6994echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
8b4fc07a
NN
6995if test $ac_cv_type_ssize_t = yes; then
6996 :
6997else
ba479fd2 6998
8b4fc07a 6999cat >>confdefs.h <<_ACEOF
f12bc141 7000#define ssize_t int
ba479fd2 7001_ACEOF
f12bc141
ZW
7002
7003fi
7004
0b9d02c6 7005
e256b8b6
DA
7006# Try to determine the array type of the second argument of getgroups
7007# for the target system (int or gid_t).
ba479fd2
NN
7008echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7009echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
7010if test "${ac_cv_type_uid_t+set}" = set; then
7011 echo $ECHO_N "(cached) $ECHO_C" >&6
7012else
7013 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7014/* confdefs.h. */
7015_ACEOF
7016cat confdefs.h >>conftest.$ac_ext
7017cat >>conftest.$ac_ext <<_ACEOF
7018/* end confdefs.h. */
e256b8b6 7019#include <sys/types.h>
ba479fd2
NN
7020
7021_ACEOF
e256b8b6 7022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7023 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
7024 ac_cv_type_uid_t=yes
7025else
e256b8b6
DA
7026 ac_cv_type_uid_t=no
7027fi
7028rm -f conftest*
7029
7030fi
ba479fd2
NN
7031echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7032echo "${ECHO_T}$ac_cv_type_uid_t" >&6
63cf211a 7033if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
7034
7035cat >>confdefs.h <<\_ACEOF
e256b8b6 7036#define uid_t int
ba479fd2 7037_ACEOF
cafe096b 7038
ba479fd2
NN
7039
7040cat >>confdefs.h <<\_ACEOF
e256b8b6 7041#define gid_t int
ba479fd2 7042_ACEOF
e256b8b6
DA
7043
7044fi
7045
ba479fd2
NN
7046echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
7047echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
7048if test "${ac_cv_type_getgroups+set}" = set; then
7049 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
7050else
7051 if test "$cross_compiling" = yes; then
7052 ac_cv_type_getgroups=cross
7053else
ba479fd2 7054 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7055/* confdefs.h. */
7056_ACEOF
7057cat confdefs.h >>conftest.$ac_ext
7058cat >>conftest.$ac_ext <<_ACEOF
7059/* end confdefs.h. */
e256b8b6
DA
7060/* Thanks to Mike Rendell for this test. */
7061#include <sys/types.h>
7062#define NGID 256
7063#undef MAX
7064#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
7065
7066int
7067main ()
e256b8b6
DA
7068{
7069 gid_t gidset[NGID];
7070 int i, n;
7071 union { gid_t gval; long lval; } val;
7072
7073 val.lval = -1;
7074 for (i = 0; i < NGID; i++)
7075 gidset[i] = val.gval;
7076 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 7077 gidset);
e256b8b6
DA
7078 /* Exit non-zero if getgroups seems to require an array of ints. This
7079 happens when gid_t is short but getgroups modifies an array of ints. */
7080 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
63cf211a 7081}
ba479fd2
NN
7082_ACEOF
7083rm -f conftest$ac_exeext
7084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7085 (eval $ac_link) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090 (eval $ac_try) 2>&5
7091 ac_status=$?
7092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093 (exit $ac_status); }; }; then
7094 ac_cv_type_getgroups=gid_t
63cf211a 7095else
ba479fd2
NN
7096 echo "$as_me: program exited with status $ac_status" >&5
7097echo "$as_me: failed program was:" >&5
7098sed 's/^/| /' conftest.$ac_ext >&5
7099
7100( exit $ac_status )
7101ac_cv_type_getgroups=int
e256b8b6 7102fi
86da66b5 7103rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 7104fi
e256b8b6 7105if test $ac_cv_type_getgroups = cross; then
ba479fd2 7106 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7107/* confdefs.h. */
7108_ACEOF
7109cat confdefs.h >>conftest.$ac_ext
7110cat >>conftest.$ac_ext <<_ACEOF
7111/* end confdefs.h. */
e256b8b6 7112#include <unistd.h>
ba479fd2
NN
7113
7114_ACEOF
e256b8b6 7115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 7116 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
7117 ac_cv_type_getgroups=gid_t
7118else
e256b8b6
DA
7119 ac_cv_type_getgroups=int
7120fi
7121rm -f conftest*
7122
7123fi
7124fi
ba479fd2
NN
7125echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
7126echo "${ECHO_T}$ac_cv_type_getgroups" >&6
e256b8b6 7127
ba479fd2 7128cat >>confdefs.h <<_ACEOF
e256b8b6 7129#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 7130_ACEOF
e256b8b6
DA
7131
7132
7133if test "${target}" = "${build}"; then
7134 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
7135else
7136 case "${target}" in
7137 # This condition may need some tweaking. It should include all
7138 # targets where the array type of the second argument of getgroups
7139 # is int and the type of gid_t is not equivalent to int.
7140 *-*-sunos* | *-*-ultrix*)
7141 TARGET_GETGROUPS_T=int
7142 ;;
7143 *)
7144 TARGET_GETGROUPS_T=gid_t
7145 ;;
7146 esac
7147fi
7148
7149
ba479fd2
NN
7150echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
7151echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
7152if test "${gcc_cv_func_printf_ptr+set}" = set; then
7153 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7154else
7155 if test "$cross_compiling" = yes; then
7156 gcc_cv_func_printf_ptr=no
7157else
ba479fd2 7158 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7159/* confdefs.h. */
7160_ACEOF
7161cat confdefs.h >>conftest.$ac_ext
7162cat >>conftest.$ac_ext <<_ACEOF
7163/* end confdefs.h. */
0a4b6309
RL
7164#include <stdio.h>
7165
86cf1cbd 7166int main()
0a4b6309
RL
7167{
7168 char buf[64];
7169 char *p = buf, *q = NULL;
7170 sprintf(buf, "%p", p);
7171 sscanf(buf, "%p", &q);
86cf1cbd 7172 return (p != q);
0a4b6309 7173}
ba479fd2
NN
7174_ACEOF
7175rm -f conftest$ac_exeext
7176if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7177 (eval $ac_link) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7182 (eval $ac_try) 2>&5
7183 ac_status=$?
7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185 (exit $ac_status); }; }; then
0a4b6309
RL
7186 gcc_cv_func_printf_ptr=yes
7187else
ba479fd2
NN
7188 echo "$as_me: program exited with status $ac_status" >&5
7189echo "$as_me: failed program was:" >&5
7190sed 's/^/| /' conftest.$ac_ext >&5
7191
7192( exit $ac_status )
7193gcc_cv_func_printf_ptr=no
0a4b6309 7194fi
86da66b5 7195rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
0a4b6309 7196fi
0a4b6309
RL
7197rm -f core core.* *.core
7198fi
ba479fd2
NN
7199echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
7200echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
63cf211a 7201if test $gcc_cv_func_printf_ptr = yes ; then
ba479fd2
NN
7202
7203cat >>confdefs.h <<\_ACEOF
0a4b6309 7204#define HAVE_PRINTF_PTR 1
ba479fd2 7205_ACEOF
0a4b6309
RL
7206
7207fi
7208
1072ec3f
ZW
7209if test $ac_cv_header_sys_mman_h != yes \
7210 || test $ac_cv_func_mmap != yes; then
7211 gcc_cv_func_mmap_file=no
7212 gcc_cv_func_mmap_dev_zero=no
7213 gcc_cv_func_mmap_anon=no
7214else
ba479fd2
NN
7215 echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
7216echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
7217if test "${gcc_cv_func_mmap_file+set}" = set; then
7218 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 7219else
ba479fd2 7220 # Add a system to this blacklist if
1072ec3f
ZW
7221 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
7222 # memory area containing the same data that you'd get if you applied
7223 # read() to the same fd. The only system known to have a problem here
7224 # is VMS, where text files have record structure.
7225 case "$host_os" in
ba479fd2 7226 vms* | ultrix*)
1072ec3f
ZW
7227 gcc_cv_func_mmap_file=no ;;
7228 *)
7229 gcc_cv_func_mmap_file=yes;;
7230 esac
7231fi
ba479fd2
NN
7232echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
7233echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
7234 echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
7235echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
7236if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
7237 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
7238else
7239 # Add a system to this blacklist if it has mmap() but /dev/zero
7240 # does not exist, or if mmapping /dev/zero does not give anonymous
7241 # zeroed pages with both the following properties:
7242 # 1. If you map N consecutive pages in with one call, and then
7243 # unmap any subset of those pages, the pages that were not
7244 # explicitly unmapped remain accessible.
7245 # 2. If you map two adjacent blocks of memory and then unmap them
7246 # both at once, they must both go away.
7247 # Systems known to be in this category are Windows (all variants),
7248 # VMS, and Darwin.
7249 case "$host_os" in
2ce240d3 7250 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
7251 gcc_cv_func_mmap_dev_zero=no ;;
7252 *)
7253 gcc_cv_func_mmap_dev_zero=yes;;
7254 esac
7255fi
ba479fd2
NN
7256echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
7257echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
1072ec3f
ZW
7258
7259 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ba479fd2
NN
7260 echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
7261echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
7262if test "${gcc_cv_decl_map_anon+set}" = set; then
7263 echo $ECHO_N "(cached) $ECHO_C" >&6
7264else
7265 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7266/* confdefs.h. */
7267_ACEOF
7268cat confdefs.h >>conftest.$ac_ext
7269cat >>conftest.$ac_ext <<_ACEOF
7270/* end confdefs.h. */
1072ec3f
ZW
7271#include <sys/types.h>
7272#include <sys/mman.h>
7273#include <unistd.h>
7274
7275#ifndef MAP_ANONYMOUS
7276#define MAP_ANONYMOUS MAP_ANON
7277#endif
7278
ba479fd2
NN
7279int
7280main ()
7281{
1072ec3f 7282int n = MAP_ANONYMOUS;
ba479fd2
NN
7283 ;
7284 return 0;
7285}
7286_ACEOF
7287rm -f conftest.$ac_objext
7288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7289 (eval $ac_compile) 2>conftest.er1
ba479fd2 7290 ac_status=$?
86da66b5
HPN
7291 grep -v '^ *+' conftest.er1 >conftest.err
7292 rm -f conftest.er1
7293 cat conftest.err >&5
ba479fd2
NN
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); } &&
2fac9c01
ZW
7296 { ac_try='test -z "$ac_c_werror_flag"
7297 || test ! -s conftest.err'
86da66b5
HPN
7298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7299 (eval $ac_try) 2>&5
7300 ac_status=$?
7301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7302 (exit $ac_status); }; } &&
7303 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7305 (eval $ac_try) 2>&5
7306 ac_status=$?
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); }; }; then
1072ec3f
ZW
7309 gcc_cv_decl_map_anon=yes
7310else
ba479fd2
NN
7311 echo "$as_me: failed program was:" >&5
7312sed 's/^/| /' conftest.$ac_ext >&5
7313
7314gcc_cv_decl_map_anon=no
1072ec3f 7315fi
86da66b5 7316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 7317fi
ba479fd2
NN
7318echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
7319echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
1072ec3f
ZW
7320
7321 if test $gcc_cv_decl_map_anon = no; then
7322 gcc_cv_func_mmap_anon=no
7323 else
ba479fd2
NN
7324 echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
7325echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
7326if test "${gcc_cv_func_mmap_anon+set}" = set; then
7327 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
7328else
7329 # Add a system to this blacklist if it has mmap() and MAP_ANON or
7330 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
7331 # doesn't give anonymous zeroed pages with the same properties listed
7332 # above for use of /dev/zero.
7333 # Systems known to be in this category are Windows, VMS, and SCO Unix.
7334 case "$host_os" in
7335 vms* | cygwin* | pe | mingw* | sco* | udk* )
7336 gcc_cv_func_mmap_anon=no ;;
7337 *)
7338 gcc_cv_func_mmap_anon=yes;;
7339 esac
7340fi
ba479fd2
NN
7341echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
7342echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
1072ec3f
ZW
7343 fi
7344fi
7345
7346if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
7347
7348cat >>confdefs.h <<\_ACEOF
1072ec3f 7349#define HAVE_MMAP_FILE 1
ba479fd2 7350_ACEOF
1072ec3f
ZW
7351
7352fi
7353if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
7354
7355cat >>confdefs.h <<\_ACEOF
1072ec3f 7356#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 7357_ACEOF
1072ec3f
ZW
7358
7359fi
7360if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
7361
7362cat >>confdefs.h <<\_ACEOF
1072ec3f 7363#define HAVE_MMAP_ANON 1
ba479fd2 7364_ACEOF
1072ec3f
ZW
7365
7366fi
7367
b27d2bd5
MK
7368
7369case "${host}" in
ee262b6f 7370*-*-*vms*)
ba479fd2 7371 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
7372 # won't work, and it isn't easily adaptable. It makes more sense to
7373 # just force it.
7374 ac_cv_func_vfork_works=yes
7375 ;;
b27d2bd5 7376esac
ba479fd2
NN
7377echo "$as_me:$LINENO: checking for pid_t" >&5
7378echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7379if test "${ac_cv_type_pid_t+set}" = set; then
7380 echo $ECHO_N "(cached) $ECHO_C" >&6
7381else
7382 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7383/* confdefs.h. */
7384_ACEOF
7385cat confdefs.h >>conftest.$ac_ext
7386cat >>conftest.$ac_ext <<_ACEOF
7387/* end confdefs.h. */
7388$ac_includes_default
7389int
7390main ()
7391{
7392if ((pid_t *) 0)
7393 return 0;
7394if (sizeof (pid_t))
7395 return 0;
7396 ;
7397 return 0;
7398}
7399_ACEOF
7400rm -f conftest.$ac_objext
7401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 7402 (eval $ac_compile) 2>conftest.er1
ba479fd2 7403 ac_status=$?
86da66b5
HPN
7404 grep -v '^ *+' conftest.er1 >conftest.err
7405 rm -f conftest.er1
7406 cat conftest.err >&5
ba479fd2
NN
7407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408 (exit $ac_status); } &&
2fac9c01
ZW
7409 { ac_try='test -z "$ac_c_werror_flag"
7410 || test ! -s conftest.err'
86da66b5
HPN
7411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412 (eval $ac_try) 2>&5
7413 ac_status=$?
7414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415 (exit $ac_status); }; } &&
7416 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
7417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7418 (eval $ac_try) 2>&5
7419 ac_status=$?
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); }; }; then
cb65112a 7422 ac_cv_type_pid_t=yes
c375c43b 7423else
ba479fd2
NN
7424 echo "$as_me: failed program was:" >&5
7425sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 7426
ba479fd2
NN
7427ac_cv_type_pid_t=no
7428fi
86da66b5 7429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 7430fi
ba479fd2
NN
7431echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7432echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7433if test $ac_cv_type_pid_t = yes; then
7434 :
7435else
7436
7437cat >>confdefs.h <<_ACEOF
c375c43b 7438#define pid_t int
ba479fd2 7439_ACEOF
c375c43b
KG
7440
7441fi
7442
ba479fd2
NN
7443
7444
7445for ac_header in unistd.h vfork.h
7446do
7447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7448echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7450if eval "test \"\${$as_ac_Header+set}\" = set"; then
7451 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7452else
ca9bc441 7453 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7454/* confdefs.h. */
7455_ACEOF
7456cat confdefs.h >>conftest.$ac_ext
7457cat >>conftest.$ac_ext <<_ACEOF
7458/* end confdefs.h. */
7459#include <$ac_header>
7460_ACEOF
7461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7463 ac_status=$?
7464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); } >/dev/null; then
7469 if test -s conftest.err; then
7470 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 7471 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
7472 else
7473 ac_cpp_err=
7474 fi
093e61a6 7475else
ba479fd2
NN
7476 ac_cpp_err=yes
7477fi
7478if test -z "$ac_cpp_err"; then
ca9bc441 7479 eval "$as_ac_Header=yes"
ba479fd2
NN
7480else
7481 echo "$as_me: failed program was:" >&5
7482sed 's/^/| /' conftest.$ac_ext >&5
7483
ca9bc441 7484 eval "$as_ac_Header=no"
ba479fd2
NN
7485fi
7486rm -f conftest.err conftest.$ac_ext
c375c43b 7487fi
ba479fd2
NN
7488echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7489echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7490if test `eval echo '${'$as_ac_Header'}'` = yes; then
7491 cat >>confdefs.h <<_ACEOF
7492#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7493_ACEOF
6e3f3080
NN
7494
7495fi
ba479fd2
NN
7496done
7497
7498
7499
7500for ac_func in fork vfork
7501do
7502as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7503echo "$as_me:$LINENO: checking for $ac_func" >&5
7504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7505if eval "test \"\${$as_ac_var+set}\" = set"; then
7506 echo $ECHO_N "(cached) $ECHO_C" >&6
7507else
7508 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7509/* confdefs.h. */
7510_ACEOF
7511cat confdefs.h >>conftest.$ac_ext
7512cat >>conftest.$ac_ext <<_ACEOF
7513/* end confdefs.h. */
86da66b5
HPN
7514/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7516#define $ac_func innocuous_$ac_func
7517
c375c43b 7518/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
7519 which can conflict with char $ac_func (); below.
7520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7521 <limits.h> exists even on freestanding compilers. */
86da66b5 7522
ba479fd2
NN
7523#ifdef __STDC__
7524# include <limits.h>
7525#else
7526# include <assert.h>
7527#endif
86da66b5
HPN
7528
7529#undef $ac_func
7530
6e3f3080 7531/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
7532#ifdef __cplusplus
7533extern "C"
7534{
7535#endif
6e3f3080 7536/* We use char because int might match the return type of a gcc2
ba479fd2
NN
7537 builtin and then its argument prototype would still apply. */
7538char $ac_func ();
c375c43b
KG
7539/* The GNU C library defines this for functions which it implements
7540 to always fail with ENOSYS. Some functions are actually named
7541 something starting with __ and the normal name is an alias. */
ba479fd2 7542#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
c375c43b
KG
7543choke me
7544#else
ba479fd2
NN
7545char (*f) () = $ac_func;
7546#endif
7547#ifdef __cplusplus
7548}
c375c43b
KG
7549#endif
7550
ba479fd2
NN
7551int
7552main ()
7553{
7554return f != $ac_func;
7555 ;
7556 return 0;
7557}
7558_ACEOF
7559rm -f conftest.$ac_objext conftest$ac_exeext
7560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 7561 (eval $ac_link) 2>conftest.er1
ba479fd2 7562 ac_status=$?
86da66b5
HPN
7563 grep -v '^ *+' conftest.er1 >conftest.err
7564 rm -f conftest.er1
7565 cat conftest.err >&5
ba479fd2
NN
7566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7567 (exit $ac_status); } &&
2fac9c01
ZW
7568 { ac_try='test -z "$ac_c_werror_flag"
7569 || test ! -s conftest.err'
86da66b5
HPN
7570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7571 (eval $ac_try) 2>&5
7572 ac_status=$?
7573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574 (exit $ac_status); }; } &&
7575 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
7576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7577 (eval $ac_try) 2>&5
7578 ac_status=$?
7579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7580 (exit $ac_status); }; }; then
7581 eval "$as_ac_var=yes"
7582else
7583 echo "$as_me: failed program was:" >&5
7584sed 's/^/| /' conftest.$ac_ext >&5
7585
7586eval "$as_ac_var=no"
7587fi
86da66b5
HPN
7588rm -f conftest.err conftest.$ac_objext \
7589 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
7590fi
7591echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7592echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7593if test `eval echo '${'$as_ac_var'}'` = yes; then
7594 cat >>confdefs.h <<_ACEOF
7595#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7596_ACEOF
7597
c375c43b 7598fi
ba479fd2 7599done
c375c43b 7600
ba479fd2
NN
7601if test "x$ac_cv_func_fork" = xyes; then
7602 echo "$as_me:$LINENO: checking for working fork" >&5
7603echo $ECHO_N "checking for working fork... $ECHO_C" >&6
7604if test "${ac_cv_func_fork_works+set}" = set; then
7605 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7606else
ba479fd2
NN
7607 if test "$cross_compiling" = yes; then
7608 ac_cv_func_fork_works=cross
7609else
7610 cat >conftest.$ac_ext <<_ACEOF
7611/* By Ruediger Kuhlmann. */
7612 #include <sys/types.h>
7613 #if HAVE_UNISTD_H
7614 # include <unistd.h>
7615 #endif
7616 /* Some systems only have a dummy stub for fork() */
7617 int main ()
7618 {
86da66b5
HPN
7619 if (fork() < 0)
7620 exit (1);
7621 exit (0);
ba479fd2
NN
7622 }
7623_ACEOF
7624rm -f conftest$ac_exeext
7625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7626 (eval $ac_link) 2>&5
7627 ac_status=$?
7628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7631 (eval $ac_try) 2>&5
7632 ac_status=$?
7633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634 (exit $ac_status); }; }; then
7635 ac_cv_func_fork_works=yes
7636else
7637 echo "$as_me: program exited with status $ac_status" >&5
7638echo "$as_me: failed program was:" >&5
7639sed 's/^/| /' conftest.$ac_ext >&5
7640
7641( exit $ac_status )
7642ac_cv_func_fork_works=no
7643fi
86da66b5 7644rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
7645fi
7646fi
7647echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
7648echo "${ECHO_T}$ac_cv_func_fork_works" >&6
7649
7650else
7651 ac_cv_func_fork_works=$ac_cv_func_fork
7652fi
7653if test "x$ac_cv_func_fork_works" = xcross; then
7654 case $host in
7655 *-*-amigaos* | *-*-msdosdjgpp*)
7656 # Override, as these systems have only a dummy fork() stub
7657 ac_cv_func_fork_works=no
7658 ;;
7659 *)
7660 ac_cv_func_fork_works=yes
7661 ;;
7662 esac
7663 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
7664echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 7665fi
c375c43b 7666ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7667if test "x$ac_cv_func_vfork" = xyes; then
7668 echo "$as_me:$LINENO: checking for working vfork" >&5
7669echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
7670if test "${ac_cv_func_vfork_works+set}" = set; then
7671 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 7672else
ba479fd2
NN
7673 if test "$cross_compiling" = yes; then
7674 ac_cv_func_vfork_works=cross
7675else
7676 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7677/* confdefs.h. */
7678_ACEOF
7679cat confdefs.h >>conftest.$ac_ext
7680cat >>conftest.$ac_ext <<_ACEOF
7681/* end confdefs.h. */
c375c43b
KG
7682/* Thanks to Paul Eggert for this test. */
7683#include <stdio.h>
ba479fd2 7684#include <stdlib.h>
c375c43b
KG
7685#include <sys/types.h>
7686#include <sys/stat.h>
ba479fd2
NN
7687#include <sys/wait.h>
7688#if HAVE_UNISTD_H
7689# include <unistd.h>
c375c43b 7690#endif
ba479fd2
NN
7691#if HAVE_VFORK_H
7692# include <vfork.h>
c375c43b
KG
7693#endif
7694/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
7695 argument registers are propagated back to the parent. The compiler
7696 is told about this with #include <vfork.h>, but some compilers
7697 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
7698 static variable whose address is put into a register that is
7699 clobbered by the vfork. */
7700static void
c375c43b
KG
7701#ifdef __cplusplus
7702sparc_address_test (int arg)
ba479fd2 7703# else
c375c43b
KG
7704sparc_address_test (arg) int arg;
7705#endif
7706{
7707 static pid_t child;
7708 if (!child) {
7709 child = vfork ();
7710 if (child < 0) {
7711 perror ("vfork");
7712 _exit(2);
7713 }
7714 if (!child) {
7715 arg = getpid();
7716 write(-1, "", 0);
7717 _exit (arg);
7718 }
7719 }
7720}
ba479fd2
NN
7721
7722int
7723main ()
7724{
c375c43b
KG
7725 pid_t parent = getpid ();
7726 pid_t child;
7727
ba479fd2 7728 sparc_address_test (0);
c375c43b
KG
7729
7730 child = vfork ();
7731
7732 if (child == 0) {
ba479fd2
NN
7733 /* Here is another test for sparc vfork register problems. This
7734 test uses lots of local variables, at least as many local
7735 variables as main has allocated so far including compiler
7736 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
7737 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
7738 reuse the register of parent for one of the local variables,
7739 since it will think that parent can't possibly be used any more
7740 in this routine. Assigning to the local variable will thus
7741 munge parent in the parent process. */
c375c43b
KG
7742 pid_t
7743 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
7744 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
7745 /* Convince the compiler that p..p7 are live; otherwise, it might
7746 use the same hardware register for all 8 local variables. */
7747 if (p != p1 || p != p2 || p != p3 || p != p4
7748 || p != p5 || p != p6 || p != p7)
7749 _exit(1);
7750
ba479fd2
NN
7751 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
7752 from child file descriptors. If the child closes a descriptor
7753 before it execs or exits, this munges the parent's descriptor
7754 as well. Test for this by closing stdout in the child. */
c375c43b
KG
7755 _exit(close(fileno(stdout)) != 0);
7756 } else {
7757 int status;
7758 struct stat st;
7759
7760 while (wait(&status) != child)
7761 ;
7762 exit(
7763 /* Was there some problem with vforking? */
7764 child < 0
7765
7766 /* Did the child fail? (This shouldn't happen.) */
7767 || status
7768
7769 /* Did the vfork/compiler bug occur? */
7770 || parent != getpid()
7771
7772 /* Did the file descriptor bug occur? */
7773 || fstat(fileno(stdout), &st) != 0
7774 );
7775 }
7776}
ba479fd2
NN
7777_ACEOF
7778rm -f conftest$ac_exeext
7779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7780 (eval $ac_link) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
c375c43b
KG
7789 ac_cv_func_vfork_works=yes
7790else
ba479fd2
NN
7791 echo "$as_me: program exited with status $ac_status" >&5
7792echo "$as_me: failed program was:" >&5
7793sed 's/^/| /' conftest.$ac_ext >&5
7794
7795( exit $ac_status )
7796ac_cv_func_vfork_works=no
cafe096b 7797fi
86da66b5 7798rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 7799fi
ba479fd2
NN
7800fi
7801echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
7802echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
c375c43b 7803
ba479fd2
NN
7804fi;
7805if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 7806 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
7807 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
7808echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
7809fi
7810
ba479fd2
NN
7811if test "x$ac_cv_func_vfork_works" = xyes; then
7812
7813cat >>confdefs.h <<\_ACEOF
7814#define HAVE_WORKING_VFORK 1
7815_ACEOF
7816
7817else
7818
7819cat >>confdefs.h <<\_ACEOF
c375c43b 7820#define vfork fork
ba479fd2 7821_ACEOF
c375c43b
KG
7822
7823fi
ba479fd2
NN
7824if test "x$ac_cv_func_fork_works" = xyes; then
7825
7826cat >>confdefs.h <<\_ACEOF
7827#define HAVE_WORKING_FORK 1
7828_ACEOF
7829
7830fi
7831
c375c43b 7832
81bf3d9e 7833
f91abfce 7834
b7f2fb96 7835 am_cv_lib_iconv_ldpath=
ba479fd2
NN
7836
7837# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
f91abfce
TT
7838if test "${with_libiconv_prefix+set}" = set; then
7839 withval="$with_libiconv_prefix"
ba479fd2 7840
f91abfce
TT
7841 for dir in `echo "$withval" | tr : ' '`; do
7842 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
b7f2fb96 7843 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
f91abfce 7844 done
ba479fd2
NN
7845
7846fi;
f91abfce
TT
7847
7848
ba479fd2 7849for ac_header in iconv.h
eb158727 7850do
ba479fd2 7851as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca9bc441 7852echo "$as_me:$LINENO: checking for $ac_header" >&5
ba479fd2
NN
7853echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7854if eval "test \"\${$as_ac_Header+set}\" = set"; then
7855 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 7856else
ca9bc441 7857 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7858/* confdefs.h. */
7859_ACEOF
7860cat confdefs.h >>conftest.$ac_ext
7861cat >>conftest.$ac_ext <<_ACEOF
7862/* end confdefs.h. */
7863#include <$ac_header>
7864_ACEOF
7865if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7866 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7867 ac_status=$?
7868 grep -v '^ *+' conftest.er1 >conftest.err
7869 rm -f conftest.er1
7870 cat conftest.err >&5
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); } >/dev/null; then
7873 if test -s conftest.err; then
7874 ac_cpp_err=$ac_c_preproc_warn_flag
86da66b5 7875 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
ba479fd2
NN
7876 else
7877 ac_cpp_err=
7878 fi
7879else
7880 ac_cpp_err=yes
7881fi
7882if test -z "$ac_cpp_err"; then
ca9bc441 7883 eval "$as_ac_Header=yes"
ba479fd2
NN
7884else
7885 echo "$as_me: failed program was:" >&5
7886sed 's/^/| /' conftest.$ac_ext >&5
7887
ca9bc441 7888 eval "$as_ac_Header=no"
ba479fd2
NN
7889fi
7890rm -f conftest.err conftest.$ac_ext
6e3f3080 7891fi
ba479fd2
NN
7892echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7893echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba479fd2
NN
7894if test `eval echo '${'$as_ac_Header'}'` = yes; then
7895 cat >>confdefs.h <<_ACEOF
7896#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7897_ACEOF
7898
eb158727
ZW
7899fi
7900done
7901
7902
ba479fd2
NN
7903 echo "$as_me:$LINENO: checking for iconv" >&5
7904echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7905if test "${am_cv_func_iconv+set}" = set; then
7906 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 7907else
ba479fd2 7908
f91abfce
TT
7909 am_cv_func_iconv="no, consider installing GNU libiconv"
7910 am_cv_lib_iconv=no
ba479fd2 7911 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7912/* confdefs.h. */
7913_ACEOF
7914cat confdefs.h >>conftest.$ac_ext
7915cat >>conftest.$ac_ext <<_ACEOF
7916/* end confdefs.h. */
f91abfce
TT
7917#include <stdlib.h>
7918#include <iconv.h>
ba479fd2
NN
7919int
7920main ()
7921{
f91abfce
TT
7922iconv_t cd = iconv_open("","");
7923 iconv(cd,NULL,NULL,NULL,NULL);
7924 iconv_close(cd);
ba479fd2
NN
7925 ;
7926 return 0;
7927}
7928_ACEOF
7929rm -f conftest.$ac_objext conftest$ac_exeext
7930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 7931 (eval $ac_link) 2>conftest.er1
ba479fd2 7932 ac_status=$?
86da66b5
HPN
7933 grep -v '^ *+' conftest.er1 >conftest.err
7934 rm -f conftest.er1
7935 cat conftest.err >&5
ba479fd2
NN
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); } &&
2fac9c01
ZW
7938 { ac_try='test -z "$ac_c_werror_flag"
7939 || test ! -s conftest.err'
86da66b5
HPN
7940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7941 (eval $ac_try) 2>&5
7942 ac_status=$?
7943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7944 (exit $ac_status); }; } &&
7945 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
7946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7947 (eval $ac_try) 2>&5
7948 ac_status=$?
7949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); }; }; then
f91abfce
TT
7951 am_cv_func_iconv=yes
7952else
ba479fd2
NN
7953 echo "$as_me: failed program was:" >&5
7954sed 's/^/| /' conftest.$ac_ext >&5
7955
f91abfce 7956fi
86da66b5
HPN
7957rm -f conftest.err conftest.$ac_objext \
7958 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
7959 if test "$am_cv_func_iconv" != yes; then
7960 am_save_LIBS="$LIBS"
b7f2fb96 7961 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
ba479fd2 7962 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7963/* confdefs.h. */
7964_ACEOF
7965cat confdefs.h >>conftest.$ac_ext
7966cat >>conftest.$ac_ext <<_ACEOF
7967/* end confdefs.h. */
f91abfce
TT
7968#include <stdlib.h>
7969#include <iconv.h>
ba479fd2
NN
7970int
7971main ()
7972{
f91abfce
TT
7973iconv_t cd = iconv_open("","");
7974 iconv(cd,NULL,NULL,NULL,NULL);
7975 iconv_close(cd);
ba479fd2
NN
7976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext conftest$ac_exeext
7981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 7982 (eval $ac_link) 2>conftest.er1
ba479fd2 7983 ac_status=$?
86da66b5
HPN
7984 grep -v '^ *+' conftest.er1 >conftest.err
7985 rm -f conftest.er1
7986 cat conftest.err >&5
ba479fd2
NN
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
2fac9c01
ZW
7989 { ac_try='test -z "$ac_c_werror_flag"
7990 || test ! -s conftest.err'
86da66b5
HPN
7991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7992 (eval $ac_try) 2>&5
7993 ac_status=$?
7994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7995 (exit $ac_status); }; } &&
7996 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
7997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7998 (eval $ac_try) 2>&5
7999 ac_status=$?
8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001 (exit $ac_status); }; }; then
f91abfce
TT
8002 am_cv_lib_iconv=yes
8003 am_cv_func_iconv=yes
8004else
ba479fd2
NN
8005 echo "$as_me: failed program was:" >&5
8006sed 's/^/| /' conftest.$ac_ext >&5
8007
f91abfce 8008fi
86da66b5
HPN
8009rm -f conftest.err conftest.$ac_objext \
8010 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
8011 LIBS="$am_save_LIBS"
8012 fi
6e3f3080 8013
ba479fd2
NN
8014fi
8015echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
8016echo "${ECHO_T}$am_cv_func_iconv" >&6
63cf211a 8017 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
8018
8019cat >>confdefs.h <<\_ACEOF
f91abfce 8020#define HAVE_ICONV 1
ba479fd2 8021_ACEOF
f91abfce 8022
ba479fd2
NN
8023 echo "$as_me:$LINENO: checking for iconv declaration" >&5
8024echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
8025 if test "${am_cv_proto_iconv+set}" = set; then
8026 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 8027else
ba479fd2
NN
8028
8029 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
f91abfce
TT
8035
8036#include <stdlib.h>
8037#include <iconv.h>
8038extern
8039#ifdef __cplusplus
8040"C"
8041#endif
8042#if defined(__STDC__) || defined(__cplusplus)
8043size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8044#else
8045size_t iconv();
8046#endif
8047
ba479fd2
NN
8048int
8049main ()
8050{
f91abfce 8051
ba479fd2
NN
8052 ;
8053 return 0;
8054}
8055_ACEOF
8056rm -f conftest.$ac_objext
8057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8058 (eval $ac_compile) 2>conftest.er1
ba479fd2 8059 ac_status=$?
86da66b5
HPN
8060 grep -v '^ *+' conftest.er1 >conftest.err
8061 rm -f conftest.er1
8062 cat conftest.err >&5
ba479fd2
NN
8063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8064 (exit $ac_status); } &&
2fac9c01
ZW
8065 { ac_try='test -z "$ac_c_werror_flag"
8066 || test ! -s conftest.err'
86da66b5
HPN
8067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8068 (eval $ac_try) 2>&5
8069 ac_status=$?
8070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8071 (exit $ac_status); }; } &&
8072 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8074 (eval $ac_try) 2>&5
8075 ac_status=$?
8076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8077 (exit $ac_status); }; }; then
f91abfce
TT
8078 am_cv_proto_iconv_arg1=""
8079else
ba479fd2
NN
8080 echo "$as_me: failed program was:" >&5
8081sed 's/^/| /' conftest.$ac_ext >&5
8082
8083am_cv_proto_iconv_arg1="const"
f91abfce 8084fi
86da66b5 8085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
8086 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);"
8087fi
8088
8089 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ba479fd2
NN
8090 echo "$as_me:$LINENO: result: ${ac_t:-
8091 }$am_cv_proto_iconv" >&5
8092echo "${ECHO_T}${ac_t:-
8093 }$am_cv_proto_iconv" >&6
8094
8095cat >>confdefs.h <<_ACEOF
f91abfce 8096#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 8097_ACEOF
f91abfce
TT
8098
8099 fi
8100 LIBICONV=
8101 if test "$am_cv_lib_iconv" = yes; then
b7f2fb96 8102 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
f91abfce 8103 fi
ba479fd2 8104
f91abfce 8105
56694dd9
ZW
8106# Until we have in-tree GNU iconv:
8107LIBICONV_DEP=
8108
8109
8110
ba479fd2
NN
8111 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8112echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8113if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8114 echo $ECHO_N "(cached) $ECHO_C" >&6
56694dd9 8115else
ba479fd2 8116 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8117/* confdefs.h. */
8118_ACEOF
8119cat confdefs.h >>conftest.$ac_ext
8120cat >>conftest.$ac_ext <<_ACEOF
8121/* end confdefs.h. */
56694dd9 8122#include <locale.h>
ba479fd2
NN
8123int
8124main ()
8125{
56694dd9 8126return LC_MESSAGES
ba479fd2
NN
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext conftest$ac_exeext
8132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8133 (eval $ac_link) 2>conftest.er1
ba479fd2 8134 ac_status=$?
86da66b5
HPN
8135 grep -v '^ *+' conftest.er1 >conftest.err
8136 rm -f conftest.er1
8137 cat conftest.err >&5
ba479fd2
NN
8138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139 (exit $ac_status); } &&
2fac9c01
ZW
8140 { ac_try='test -z "$ac_c_werror_flag"
8141 || test ! -s conftest.err'
86da66b5
HPN
8142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8143 (eval $ac_try) 2>&5
8144 ac_status=$?
8145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8146 (exit $ac_status); }; } &&
8147 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8149 (eval $ac_try) 2>&5
8150 ac_status=$?
8151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8152 (exit $ac_status); }; }; then
56694dd9
ZW
8153 am_cv_val_LC_MESSAGES=yes
8154else
ba479fd2
NN
8155 echo "$as_me: failed program was:" >&5
8156sed 's/^/| /' conftest.$ac_ext >&5
8157
8158am_cv_val_LC_MESSAGES=no
56694dd9 8159fi
86da66b5
HPN
8160rm -f conftest.err conftest.$ac_objext \
8161 conftest$ac_exeext conftest.$ac_ext
56694dd9 8162fi
ba479fd2
NN
8163echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8164echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
63cf211a 8165 if test $am_cv_val_LC_MESSAGES = yes; then
ba479fd2
NN
8166
8167cat >>confdefs.h <<\_ACEOF
56694dd9 8168#define HAVE_LC_MESSAGES 1
ba479fd2 8169_ACEOF
56694dd9
ZW
8170
8171 fi
8172
f91abfce 8173
86cf1cbd
KG
8174# We will need to find libiberty.h and ansidecl.h
8175saved_CFLAGS="$CFLAGS"
8176CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8e944909 8200for ac_func in getenv atol sbrk abort atof getcwd getwd \
3b681e9d 8201 strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
236ce4b2 8202 fprintf_unlocked strstr errno snprintf vasprintf \
c1800ec8 8203 malloc realloc calloc free basename getopt clock
81bf3d9e 8204do
ad6717df 8205 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8206echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8207echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8208if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8209 echo $ECHO_N "(cached) $ECHO_C" >&6
8210else
8211 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8212/* confdefs.h. */
8213_ACEOF
8214cat confdefs.h >>conftest.$ac_ext
8215cat >>conftest.$ac_ext <<_ACEOF
8216/* end confdefs.h. */
7afe8c41
KG
8217#undef $ac_tr_decl
8218#define $ac_tr_decl 1
ba479fd2 8219
d02af173 8220#include "ansidecl.h"
86cf1cbd 8221#include "system.h"
f31e826b 8222
ba479fd2
NN
8223int
8224main ()
8225{
86cf1cbd
KG
8226#ifndef $ac_func
8227char *(*pfn) = (char *(*)) $ac_func ;
8228#endif
ba479fd2
NN
8229 ;
8230 return 0;
8231}
8232_ACEOF
8233rm -f conftest.$ac_objext
8234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8235 (eval $ac_compile) 2>conftest.er1
ba479fd2 8236 ac_status=$?
86da66b5
HPN
8237 grep -v '^ *+' conftest.er1 >conftest.err
8238 rm -f conftest.er1
8239 cat conftest.err >&5
ba479fd2
NN
8240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8241 (exit $ac_status); } &&
2fac9c01
ZW
8242 { ac_try='test -z "$ac_c_werror_flag"
8243 || test ! -s conftest.err'
86da66b5
HPN
8244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8245 (eval $ac_try) 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'
ba479fd2
NN
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
f31e826b 8255 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 8256else
ba479fd2
NN
8257 echo "$as_me: failed program was:" >&5
8258sed 's/^/| /' conftest.$ac_ext >&5
8259
8260eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 8261fi
86da66b5 8262rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
8263fi
8264
f31e826b 8265if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8266 echo "$as_me:$LINENO: result: yes" >&5
8267echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 8268#define $ac_tr_decl 1
ba479fd2
NN
8269_ACEOF
8270
81bf3d9e 8271else
ba479fd2
NN
8272 echo "$as_me:$LINENO: result: no" >&5
8273echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 8274#define $ac_tr_decl 0
ba479fd2
NN
8275_ACEOF
8276
81bf3d9e
RH
8277fi
8278
8279done
ba479fd2 8280
ba479fd2 8281
ba479fd2 8282
81bf3d9e 8283
81bf3d9e
RH
8284
8285for ac_func in getrlimit setrlimit getrusage
8286do
ad6717df 8287 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8288echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8289echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8290if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8291 echo $ECHO_N "(cached) $ECHO_C" >&6
8292else
8293 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8294/* confdefs.h. */
8295_ACEOF
8296cat confdefs.h >>conftest.$ac_ext
8297cat >>conftest.$ac_ext <<_ACEOF
8298/* end confdefs.h. */
7afe8c41
KG
8299#undef $ac_tr_decl
8300#define $ac_tr_decl 1
ba479fd2 8301
d02af173 8302#include "ansidecl.h"
86cf1cbd 8303#include "system.h"
81bf3d9e
RH
8304#ifdef HAVE_SYS_RESOURCE_H
8305#include <sys/resource.h>
8306#endif
8307
f31e826b 8308
ba479fd2
NN
8309int
8310main ()
8311{
86cf1cbd
KG
8312#ifndef $ac_func
8313char *(*pfn) = (char *(*)) $ac_func ;
8314#endif
ba479fd2
NN
8315 ;
8316 return 0;
8317}
8318_ACEOF
8319rm -f conftest.$ac_objext
8320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8321 (eval $ac_compile) 2>conftest.er1
ba479fd2 8322 ac_status=$?
86da66b5
HPN
8323 grep -v '^ *+' conftest.er1 >conftest.err
8324 rm -f conftest.er1
8325 cat conftest.err >&5
ba479fd2
NN
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); } &&
2fac9c01
ZW
8328 { ac_try='test -z "$ac_c_werror_flag"
8329 || test ! -s conftest.err'
86da66b5
HPN
8330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8331 (eval $ac_try) 2>&5
8332 ac_status=$?
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); }; } &&
8335 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8337 (eval $ac_try) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); }; }; then
f31e826b 8341 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 8342else
ba479fd2
NN
8343 echo "$as_me: failed program was:" >&5
8344sed 's/^/| /' conftest.$ac_ext >&5
8345
8346eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 8347fi
86da66b5 8348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
8349fi
8350
f31e826b 8351if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8352 echo "$as_me:$LINENO: result: yes" >&5
8353echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
86cf1cbd 8354#define $ac_tr_decl 1
ba479fd2
NN
8355_ACEOF
8356
81bf3d9e 8357else
ba479fd2
NN
8358 echo "$as_me:$LINENO: result: no" >&5
8359echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
f31e826b 8360#define $ac_tr_decl 0
ba479fd2
NN
8361_ACEOF
8362
81bf3d9e
RH
8363fi
8364
8365done
86cf1cbd 8366
81bf3d9e 8367
ba479fd2 8368cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8369/* confdefs.h. */
8370_ACEOF
8371cat confdefs.h >>conftest.$ac_ext
8372cat >>conftest.$ac_ext <<_ACEOF
8373/* end confdefs.h. */
b2522d2b
HPN
8374
8375#include "ansidecl.h"
8376#include "system.h"
8377#ifdef HAVE_SYS_RESOURCE_H
8378#include <sys/resource.h>
8379#endif
8380
ba479fd2
NN
8381int
8382main ()
8383{
b2522d2b 8384rlim_t l = 0;
ba479fd2
NN
8385 ;
8386 return 0;
8387}
8388_ACEOF
8389rm -f conftest.$ac_objext
8390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8391 (eval $ac_compile) 2>conftest.er1
ba479fd2 8392 ac_status=$?
86da66b5
HPN
8393 grep -v '^ *+' conftest.er1 >conftest.err
8394 rm -f conftest.er1
8395 cat conftest.err >&5
ba479fd2
NN
8396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8397 (exit $ac_status); } &&
2fac9c01
ZW
8398 { ac_try='test -z "$ac_c_werror_flag"
8399 || test ! -s conftest.err'
86da66b5
HPN
8400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8401 (eval $ac_try) 2>&5
8402 ac_status=$?
8403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); }; } &&
8405 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8407 (eval $ac_try) 2>&5
8408 ac_status=$?
8409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8410 (exit $ac_status); }; }; then
b2522d2b
HPN
8411 :
8412else
ba479fd2
NN
8413 echo "$as_me: failed program was:" >&5
8414sed 's/^/| /' conftest.$ac_ext >&5
8415
8416
8417cat >>confdefs.h <<\_ACEOF
b2522d2b 8418#define rlim_t long
ba479fd2 8419_ACEOF
b2522d2b
HPN
8420
8421fi
86da66b5 8422rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 8423
ad6717df 8424
351df804 8425for ac_func in ldgetname
c1800ec8 8426do
ad6717df 8427 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8428echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8429echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8430if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8431 echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8434/* confdefs.h. */
8435_ACEOF
8436cat confdefs.h >>conftest.$ac_ext
8437cat >>conftest.$ac_ext <<_ACEOF
8438/* end confdefs.h. */
c1800ec8
ZW
8439#undef $ac_tr_decl
8440#define $ac_tr_decl 1
ba479fd2 8441
351df804
KG
8442#include "ansidecl.h"
8443#include "system.h"
8444#ifdef HAVE_LDFCN_H
8445#include <ldfcn.h>
8446#endif
8447
8448
ba479fd2
NN
8449int
8450main ()
8451{
351df804
KG
8452#ifndef $ac_func
8453char *(*pfn) = (char *(*)) $ac_func ;
8454#endif
ba479fd2
NN
8455 ;
8456 return 0;
8457}
8458_ACEOF
8459rm -f conftest.$ac_objext
8460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8461 (eval $ac_compile) 2>conftest.er1
ba479fd2 8462 ac_status=$?
86da66b5
HPN
8463 grep -v '^ *+' conftest.er1 >conftest.err
8464 rm -f conftest.er1
8465 cat conftest.err >&5
ba479fd2
NN
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); } &&
2fac9c01
ZW
8468 { ac_try='test -z "$ac_c_werror_flag"
8469 || test ! -s conftest.err'
86da66b5
HPN
8470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8471 (eval $ac_try) 2>&5
8472 ac_status=$?
8473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474 (exit $ac_status); }; } &&
8475 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8477 (eval $ac_try) 2>&5
8478 ac_status=$?
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); }; }; then
351df804
KG
8481 eval "gcc_cv_have_decl_$ac_func=yes"
8482else
ba479fd2
NN
8483 echo "$as_me: failed program was:" >&5
8484sed 's/^/| /' conftest.$ac_ext >&5
8485
8486eval "gcc_cv_have_decl_$ac_func=no"
351df804 8487fi
86da66b5 8488rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
8489fi
8490
8491if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8492 echo "$as_me:$LINENO: result: yes" >&5
8493echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8494#define $ac_tr_decl 1
ba479fd2
NN
8495_ACEOF
8496
351df804 8497else
ba479fd2
NN
8498 echo "$as_me:$LINENO: result: no" >&5
8499echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
351df804 8500#define $ac_tr_decl 0
ba479fd2
NN
8501_ACEOF
8502
351df804
KG
8503fi
8504
8505done
ba479fd2 8506
351df804
KG
8507
8508
8509for ac_func in times
8510do
ad6717df 8511 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ba479fd2
NN
8512echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
8513echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
8514if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
8515 echo $ECHO_N "(cached) $ECHO_C" >&6
8516else
8517 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8518/* confdefs.h. */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h. */
351df804
KG
8523#undef $ac_tr_decl
8524#define $ac_tr_decl 1
ba479fd2 8525
c1800ec8
ZW
8526#include "ansidecl.h"
8527#include "system.h"
8528#ifdef HAVE_SYS_TIMES_H
8529#include <sys/times.h>
8530#endif
8531
8532
ba479fd2
NN
8533int
8534main ()
8535{
c1800ec8
ZW
8536#ifndef $ac_func
8537char *(*pfn) = (char *(*)) $ac_func ;
8538#endif
ba479fd2
NN
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
8544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8545 (eval $ac_compile) 2>conftest.er1
ba479fd2 8546 ac_status=$?
86da66b5
HPN
8547 grep -v '^ *+' conftest.er1 >conftest.err
8548 rm -f conftest.er1
8549 cat conftest.err >&5
ba479fd2
NN
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); } &&
2fac9c01
ZW
8552 { ac_try='test -z "$ac_c_werror_flag"
8553 || test ! -s conftest.err'
86da66b5
HPN
8554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555 (eval $ac_try) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); }; } &&
8559 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8561 (eval $ac_try) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); }; }; then
c1800ec8
ZW
8565 eval "gcc_cv_have_decl_$ac_func=yes"
8566else
ba479fd2
NN
8567 echo "$as_me: failed program was:" >&5
8568sed 's/^/| /' conftest.$ac_ext >&5
8569
8570eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 8571fi
86da66b5 8572rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
8573fi
8574
8575if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ba479fd2
NN
8576 echo "$as_me:$LINENO: result: yes" >&5
8577echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8578#define $ac_tr_decl 1
ba479fd2
NN
8579_ACEOF
8580
c1800ec8 8581else
ba479fd2
NN
8582 echo "$as_me:$LINENO: result: no" >&5
8583echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
c1800ec8 8584#define $ac_tr_decl 0
ba479fd2
NN
8585_ACEOF
8586
c1800ec8
ZW
8587fi
8588
8589done
c1800ec8
ZW
8590
8591
8592# More time-related stuff.
ba479fd2
NN
8593echo "$as_me:$LINENO: checking for struct tms" >&5
8594echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
8595if test "${ac_cv_struct_tms+set}" = set; then
8596 echo $ECHO_N "(cached) $ECHO_C" >&6
8597else
8598
8599cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
c1800ec8
ZW
8605
8606#include "ansidecl.h"
8607#include "system.h"
8608#ifdef HAVE_SYS_TIMES_H
8609#include <sys/times.h>
8610#endif
8611
ba479fd2
NN
8612int
8613main ()
8614{
c1800ec8 8615struct tms tms;
ba479fd2
NN
8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext
8621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8622 (eval $ac_compile) 2>conftest.er1
ba479fd2 8623 ac_status=$?
86da66b5
HPN
8624 grep -v '^ *+' conftest.er1 >conftest.err
8625 rm -f conftest.er1
8626 cat conftest.err >&5
ba479fd2
NN
8627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8628 (exit $ac_status); } &&
2fac9c01
ZW
8629 { ac_try='test -z "$ac_c_werror_flag"
8630 || test ! -s conftest.err'
86da66b5
HPN
8631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8632 (eval $ac_try) 2>&5
8633 ac_status=$?
8634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8635 (exit $ac_status); }; } &&
8636 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8638 (eval $ac_try) 2>&5
8639 ac_status=$?
8640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8641 (exit $ac_status); }; }; then
c1800ec8
ZW
8642 ac_cv_struct_tms=yes
8643else
ba479fd2
NN
8644 echo "$as_me: failed program was:" >&5
8645sed 's/^/| /' conftest.$ac_ext >&5
8646
8647ac_cv_struct_tms=no
c1800ec8 8648fi
86da66b5 8649rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 8650fi
ba479fd2
NN
8651echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
8652echo "${ECHO_T}$ac_cv_struct_tms" >&6
63cf211a 8653if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
8654
8655cat >>confdefs.h <<\_ACEOF
c1800ec8 8656#define HAVE_STRUCT_TMS 1
ba479fd2 8657_ACEOF
c1800ec8
ZW
8658
8659fi
8660
8661# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
8662# revisit after autoconf 2.50.
ba479fd2
NN
8663echo "$as_me:$LINENO: checking for clock_t" >&5
8664echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
8665if test "${gcc_cv_type_clock_t+set}" = set; then
8666 echo $ECHO_N "(cached) $ECHO_C" >&6
8667else
8668
8669cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8670/* confdefs.h. */
8671_ACEOF
8672cat confdefs.h >>conftest.$ac_ext
8673cat >>conftest.$ac_ext <<_ACEOF
8674/* end confdefs.h. */
c1800ec8
ZW
8675
8676#include "ansidecl.h"
8677#include "system.h"
8678
ba479fd2
NN
8679int
8680main ()
8681{
c1800ec8 8682clock_t x;
ba479fd2
NN
8683 ;
8684 return 0;
8685}
8686_ACEOF
8687rm -f conftest.$ac_objext
8688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8689 (eval $ac_compile) 2>conftest.er1
ba479fd2 8690 ac_status=$?
86da66b5
HPN
8691 grep -v '^ *+' conftest.er1 >conftest.err
8692 rm -f conftest.er1
8693 cat conftest.err >&5
ba479fd2
NN
8694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695 (exit $ac_status); } &&
2fac9c01
ZW
8696 { ac_try='test -z "$ac_c_werror_flag"
8697 || test ! -s conftest.err'
86da66b5
HPN
8698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8699 (eval $ac_try) 2>&5
8700 ac_status=$?
8701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702 (exit $ac_status); }; } &&
8703 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8705 (eval $ac_try) 2>&5
8706 ac_status=$?
8707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8708 (exit $ac_status); }; }; then
c1800ec8
ZW
8709 gcc_cv_type_clock_t=yes
8710else
ba479fd2
NN
8711 echo "$as_me: failed program was:" >&5
8712sed 's/^/| /' conftest.$ac_ext >&5
8713
8714gcc_cv_type_clock_t=no
c1800ec8 8715fi
86da66b5 8716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 8717fi
ba479fd2
NN
8718echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
8719echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
63cf211a 8720if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
8721
8722cat >>confdefs.h <<\_ACEOF
c1800ec8 8723#define HAVE_CLOCK_T 1
ba479fd2 8724_ACEOF
c1800ec8
ZW
8725
8726fi
8727
eb70d86d
AS
8728# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
8729CFLAGS="$saved_CFLAGS"
8730
07cf4226
DM
8731# Check whether --enable-initfini-array or --disable-initfini-array was given.
8732if test "${enable_initfini_array+set}" = set; then
8733 enableval="$enable_initfini_array"
ba479fd2 8734
07cf4226 8735else
ba479fd2
NN
8736
8737echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
8738echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
8739if test "${gcc_cv_initfini_array+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 8741else
eb70d86d 8742 if test "$cross_compiling" = yes; then
918c4fe4 8743 gcc_cv_initfini_array=no
eb70d86d 8744else
ba479fd2 8745 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8746/* confdefs.h. */
8747_ACEOF
8748cat confdefs.h >>conftest.$ac_ext
8749cat >>conftest.$ac_ext <<_ACEOF
8750/* end confdefs.h. */
eb70d86d 8751
07cf4226
DM
8752static int x = -1;
8753int main (void) { return x; }
8754int foo (void) { x = 0; }
8755int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
8756_ACEOF
8757rm -f conftest$ac_exeext
8758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8759 (eval $ac_link) 2>&5
8760 ac_status=$?
8761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8764 (eval $ac_try) 2>&5
8765 ac_status=$?
8766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8767 (exit $ac_status); }; }; then
918c4fe4 8768 gcc_cv_initfini_array=yes
eb70d86d 8769else
ba479fd2
NN
8770 echo "$as_me: program exited with status $ac_status" >&5
8771echo "$as_me: failed program was:" >&5
8772sed 's/^/| /' conftest.$ac_ext >&5
8773
8774( exit $ac_status )
8775gcc_cv_initfini_array=no
eb70d86d 8776fi
86da66b5 8777rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 8778fi
07cf4226 8779fi
ba479fd2
NN
8780echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
8781echo "${ECHO_T}$gcc_cv_initfini_array" >&6
eb70d86d 8782 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 8783
ba479fd2 8784fi;
63cf211a 8785if test $enable_initfini_array = yes; then
ba479fd2
NN
8786
8787cat >>confdefs.h <<\_ACEOF
eb70d86d 8788#define HAVE_INITFINI_ARRAY 1
ba479fd2 8789_ACEOF
07cf4226 8790
eb70d86d 8791fi
81bf3d9e 8792
ba479fd2
NN
8793# mkdir takes a single argument on some systems.
8794echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
8795echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
8796if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
8797 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 8798else
ba479fd2 8799 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8800/* confdefs.h. */
8801_ACEOF
8802cat confdefs.h >>conftest.$ac_ext
8803cat >>conftest.$ac_ext <<_ACEOF
8804/* end confdefs.h. */
75923b2f
MK
8805
8806#include <sys/types.h>
8807#ifdef HAVE_SYS_STAT_H
8808# include <sys/stat.h>
8809#endif
8810#ifdef HAVE_UNISTD_H
8811# include <unistd.h>
8812#endif
8813#ifdef HAVE_DIRECT_H
8814# include <direct.h>
8815#endif
ba479fd2
NN
8816int
8817main ()
8818{
75923b2f 8819mkdir ("foo", 0);
ba479fd2
NN
8820 ;
8821 return 0;
8822}
8823_ACEOF
8824rm -f conftest.$ac_objext
8825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
86da66b5 8826 (eval $ac_compile) 2>conftest.er1
ba479fd2 8827 ac_status=$?
86da66b5
HPN
8828 grep -v '^ *+' conftest.er1 >conftest.err
8829 rm -f conftest.er1
8830 cat conftest.err >&5
ba479fd2
NN
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); } &&
2fac9c01
ZW
8833 { ac_try='test -z "$ac_c_werror_flag"
8834 || test ! -s conftest.err'
86da66b5
HPN
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; } &&
8840 { ac_try='test -s conftest.$ac_objext'
ba479fd2
NN
8841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8842 (eval $ac_try) 2>&5
8843 ac_status=$?
8844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8845 (exit $ac_status); }; }; then
75923b2f
MK
8846 gcc_cv_mkdir_takes_one_arg=no
8847else
ba479fd2
NN
8848 echo "$as_me: failed program was:" >&5
8849sed 's/^/| /' conftest.$ac_ext >&5
8850
8851gcc_cv_mkdir_takes_one_arg=yes
75923b2f 8852fi
86da66b5 8853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 8854fi
ba479fd2
NN
8855echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
8856echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
63cf211a 8857if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
8858
8859cat >>confdefs.h <<\_ACEOF
75923b2f 8860#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 8861_ACEOF
75923b2f
MK
8862
8863fi
8864
8865
861bb6c1
JL
8866# File extensions
8867manext='.1'
8868objext='.o'
8869
8870
8871
4977bab6
ZW
8872# With Setjmp/Longjmp based exception handling.
8873# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
8874if test "${enable_sjlj_exceptions+set}" = set; then
8875 enableval="$enable_sjlj_exceptions"
8876 sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 8877
ba479fd2
NN
8878cat >>confdefs.h <<_ACEOF
8879#define CONFIG_SJLJ_EXCEPTIONS $sjlj
8880_ACEOF
4977bab6 8881
ba479fd2 8882fi;
4977bab6 8883
c6c51600 8884if test x$host = x$target; then
ba479fd2
NN
8885 echo "$as_me:$LINENO: checking for main in -lunwind" >&5
8886echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6
8887if test "${ac_cv_lib_unwind_main+set}" = set; then
8888 echo $ECHO_N "(cached) $ECHO_C" >&6
4977bab6 8889else
ba479fd2 8890 ac_check_lib_save_LIBS=$LIBS
4977bab6 8891LIBS="-lunwind $LIBS"
ba479fd2 8892cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8893/* confdefs.h. */
8894_ACEOF
8895cat confdefs.h >>conftest.$ac_ext
8896cat >>conftest.$ac_ext <<_ACEOF
8897/* end confdefs.h. */
4977bab6 8898
4977bab6 8899
ba479fd2
NN
8900int
8901main ()
8902{
8903main ();
8904 ;
8905 return 0;
8906}
8907_ACEOF
8908rm -f conftest.$ac_objext conftest$ac_exeext
8909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 8910 (eval $ac_link) 2>conftest.er1
ba479fd2 8911 ac_status=$?
86da66b5
HPN
8912 grep -v '^ *+' conftest.er1 >conftest.err
8913 rm -f conftest.er1
8914 cat conftest.err >&5
ba479fd2
NN
8915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); } &&
2fac9c01
ZW
8917 { ac_try='test -z "$ac_c_werror_flag"
8918 || test ! -s conftest.err'
86da66b5
HPN
8919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8920 (eval $ac_try) 2>&5
8921 ac_status=$?
8922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8923 (exit $ac_status); }; } &&
8924 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
8925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8926 (eval $ac_try) 2>&5
8927 ac_status=$?
8928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8929 (exit $ac_status); }; }; then
8930 ac_cv_lib_unwind_main=yes
8931else
8932 echo "$as_me: failed program was:" >&5
8933sed 's/^/| /' conftest.$ac_ext >&5
8934
8935ac_cv_lib_unwind_main=no
8936fi
86da66b5
HPN
8937rm -f conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
8939LIBS=$ac_check_lib_save_LIBS
8940fi
8941echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5
8942echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6
8943if test $ac_cv_lib_unwind_main = yes; then
4977bab6
ZW
8944 use_libunwind_default=yes
8945else
ba479fd2 8946 use_libunwind_default=no
4977bab6
ZW
8947fi
8948
c6c51600
AS
8949else
8950 use_libunwind_default=no
8951fi
4977bab6
ZW
8952# Use libunwind based exception handling.
8953# Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
8954if test "${enable_libunwind_exceptions+set}" = set; then
8955 enableval="$enable_libunwind_exceptions"
8956 use_libunwind_exceptions=$enableval
8957else
8958 use_libunwind_exceptions=$use_libunwind_default
ba479fd2 8959fi;
63cf211a 8960if test x"$use_libunwind_exceptions" = xyes; then
ba479fd2
NN
8961
8962cat >>confdefs.h <<\_ACEOF
4977bab6 8963#define USE_LIBUNWIND_EXCEPTIONS 1
ba479fd2 8964_ACEOF
4977bab6
ZW
8965
8966fi
8967
34a86c2b
NN
8968# --------------------------------------------------------
8969# Build, host, and target specific configuration fragments
8970# --------------------------------------------------------
8971
5b28c537
NN
8972# Collect build-machine-specific information.
8973. ${srcdir}/config.build
8974
a89ea0df
NN
8975# Collect host-machine-specific information.
8976. ${srcdir}/config.host
8977
ef69da62 8978target_gtfiles=
a89ea0df
NN
8979
8980# Collect target-machine-specific information.
8ad9fb33 8981. ${srcdir}/config.gcc
861bb6c1
JL
8982
8983extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 8984extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
8985
8986# Default the target-machine variables that were not explicitly set.
75bffa71 8987if test x"$tm_file" = x
861bb6c1
JL
8988then tm_file=$cpu_type/$cpu_type.h; fi
8989
6b2adea9 8990if test x"$extra_headers" = x
861bb6c1
JL
8991then extra_headers=; fi
8992
75bffa71 8993if test x$md_file = x
e98e406f 8994then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 8995
75bffa71 8996if test x$out_file = x
861bb6c1
JL
8997then out_file=$cpu_type/$cpu_type.c; fi
8998
75bffa71 8999if test x"$tmake_file" = x
861bb6c1
JL
9000then tmake_file=$cpu_type/t-$cpu_type
9001fi
9002
90e6a802 9003if test x"$dwarf2" = xyes
756ee602 9004then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
9005fi
9006
861bb6c1 9007# Say what files are being used for the output code and MD file.
11642c3a 9008echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
9009echo "Using \`$srcdir/config/$md_file' as machine description file."
9010
11642c3a 9011# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
9012# about them and drop them.
9013
11642c3a
ZW
9014bx=
9015for x in $build_xm_file; do
9016 if test -f $srcdir/config/$x
9017 then bx="$bx $x"
ba479fd2
NN
9018 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9019echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9020 fi
9021done
9022build_xm_file="$bx"
9023
9024hx=
9025for x in $host_xm_file; do
9026 if test -f $srcdir/config/$x
9027 then hx="$hx $x"
ba479fd2
NN
9028 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9029echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9030 fi
9031done
9032host_xm_file="$hx"
9033
9034tx=
9035for x in $xm_file; do
9036 if test -f $srcdir/config/$x
9037 then tx="$tx $x"
ba479fd2
NN
9038 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
9039echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
9040 fi
9041done
9042xm_file="$tx"
9043
861bb6c1
JL
9044count=a
9045for f in $tm_file; do
9046 count=${count}x
9047done
75bffa71 9048if test $count = ax; then
861bb6c1
JL
9049 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
9050else
9051 echo "Using the following target machine macro files:"
9052 for f in $tm_file; do
9053 echo " $srcdir/config/$f"
9054 done
9055fi
9056
4977bab6 9057if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
9058
9059cat >>confdefs.h <<\_ACEOF
4977bab6 9060#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 9061_ACEOF
4977bab6
ZW
9062
9063fi
9064
861bb6c1
JL
9065count=a
9066for f in $host_xm_file; do
9067 count=${count}x
9068done
11642c3a
ZW
9069if test $count = a; then
9070 :
9071elif test $count = ax; then
861bb6c1
JL
9072 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
9073else
9074 echo "Using the following host machine macro files:"
9075 for f in $host_xm_file; do
9076 echo " $srcdir/config/$f"
9077 done
9078fi
476d9098 9079echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 9080
75bffa71 9081if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
9082 count=a
9083 for f in $build_xm_file; do
9084 count=${count}x
9085 done
11642c3a
ZW
9086 if test $count = a; then
9087 :
9088 elif test $count = ax; then
861bb6c1
JL
9089 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
9090 else
9091 echo "Using the following build machine macro files:"
9092 for f in $build_xm_file; do
9093 echo " $srcdir/config/$f"
9094 done
9095 fi
9096fi
9097
8bb915b6
NN
9098# ---------
9099# Threading
9100# ---------
9101
c2e494a8 9102# Check if a valid thread package
615be2cf 9103case ${enable_threads} in
c2e494a8
NN
9104 "" | no)
9105 # No threads
9106 target_thread_file='single'
9107 ;;
9108 yes)
9109 # default
9110 target_thread_file='single'
9111 ;;
769e49eb
NN
9112 aix | dce | gnat | irix | posix | rtems | \
9113 single | solaris | vxworks | win32 )
615be2cf 9114 target_thread_file=${enable_threads}
c2e494a8
NN
9115 ;;
9116 *)
615be2cf 9117 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
9118 exit 1
9119 ;;
9120esac
9121
9122if test x${thread_file} = x; then
9123 # No thread file set by target-specific clauses in config.gcc,
9124 # so use file chosen by default logic above
9125 thread_file=${target_thread_file}
861bb6c1
JL
9126fi
9127
8bb915b6
NN
9128# Make gthr-default.h if we have a thread file.
9129gthread_flags=
9130if test $thread_file != single; then
9131 rm -f gthr-default.h
9132 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
9133 gthread_flags=-DHAVE_GTHR_DEFAULT
9134fi
9135
9136
9137# --------
9138# UNSORTED
9139# --------
9140
2121a768
JT
9141if test x$enable___cxa_atexit = xyes || \
9142 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
354b7da5
DH
9143 echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
9144echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
9145if test "${ac_cv_func___cxa_atexit+set}" = set; then
9146 echo $ECHO_N "(cached) $ECHO_C" >&6
9147else
9148 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
9149/* confdefs.h. */
9150_ACEOF
9151cat confdefs.h >>conftest.$ac_ext
9152cat >>conftest.$ac_ext <<_ACEOF
9153/* end confdefs.h. */
86da66b5
HPN
9154/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
9155 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9156#define __cxa_atexit innocuous___cxa_atexit
9157
354b7da5
DH
9158/* System header to define __stub macros and hopefully few prototypes,
9159 which can conflict with char __cxa_atexit (); below.
9160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9161 <limits.h> exists even on freestanding compilers. */
86da66b5 9162
354b7da5
DH
9163#ifdef __STDC__
9164# include <limits.h>
9165#else
9166# include <assert.h>
9167#endif
86da66b5
HPN
9168
9169#undef __cxa_atexit
9170
354b7da5
DH
9171/* Override any gcc2 internal prototype to avoid an error. */
9172#ifdef __cplusplus
9173extern "C"
9174{
9175#endif
9176/* We use char because int might match the return type of a gcc2
9177 builtin and then its argument prototype would still apply. */
9178char __cxa_atexit ();
9179/* The GNU C library defines this for functions which it implements
9180 to always fail with ENOSYS. Some functions are actually named
9181 something starting with __ and the normal name is an alias. */
9182#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
9183choke me
9184#else
9185char (*f) () = __cxa_atexit;
9186#endif
9187#ifdef __cplusplus
9188}
9189#endif
9190
9191int
9192main ()
9193{
9194return f != __cxa_atexit;
9195 ;
9196 return 0;
9197}
9198_ACEOF
9199rm -f conftest.$ac_objext conftest$ac_exeext
9200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9201 (eval $ac_link) 2>conftest.er1
354b7da5 9202 ac_status=$?
86da66b5
HPN
9203 grep -v '^ *+' conftest.er1 >conftest.err
9204 rm -f conftest.er1
9205 cat conftest.err >&5
354b7da5
DH
9206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207 (exit $ac_status); } &&
2fac9c01
ZW
9208 { ac_try='test -z "$ac_c_werror_flag"
9209 || test ! -s conftest.err'
86da66b5
HPN
9210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9211 (eval $ac_try) 2>&5
9212 ac_status=$?
9213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9214 (exit $ac_status); }; } &&
9215 { ac_try='test -s conftest$ac_exeext'
354b7da5
DH
9216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9217 (eval $ac_try) 2>&5
9218 ac_status=$?
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
9221 ac_cv_func___cxa_atexit=yes
9222else
9223 echo "$as_me: failed program was:" >&5
9224sed 's/^/| /' conftest.$ac_ext >&5
9225
9226ac_cv_func___cxa_atexit=no
9227fi
86da66b5
HPN
9228rm -f conftest.err conftest.$ac_objext \
9229 conftest$ac_exeext conftest.$ac_ext
354b7da5
DH
9230fi
9231echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
9232echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
9233if test $ac_cv_func___cxa_atexit = yes; then
ba479fd2
NN
9234
9235cat >>confdefs.h <<\_ACEOF
2121a768 9236#define DEFAULT_USE_CXA_ATEXIT 1
ba479fd2 9237_ACEOF
2121a768 9238
354b7da5
DH
9239else
9240 echo "__cxa_atexit can't be enabled on this target"
9241fi
9242
2121a768
JT
9243fi
9244
a5381466 9245# Look for a file containing extra machine modes.
1c0ca89d
ZW
9246if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
9247 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
9248
9249
9250cat >>confdefs.h <<_ACEOF
e22340b0 9251#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 9252_ACEOF
a5381466
ZW
9253
9254fi
9255
b7cb92ad 9256# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 9257# the first file included by config.h.
4977bab6 9258# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 9259# as well. If host!=build, we are in error and need to do more
db81d74a 9260# work to find out the build config parameters.
75bffa71 9261if test x$host = x$build
db81d74a 9262then
eaf4e618 9263 build_auto=auto-host.h
06f0b04c 9264 FORBUILD=..
b7cb92ad
JL
9265else
9266 # We create a subdir, then run autoconf in the subdir.
9267 # To prevent recursion we set host and build for the new
9268 # invocation of configure to the build for this invocation
ba479fd2 9269 # of configure.
b7cb92ad
JL
9270 tempdir=build.$$
9271 rm -rf $tempdir
9272 mkdir $tempdir
9273 cd $tempdir
9274 case ${srcdir} in
255b8a49 9275 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
9276 *) realsrcdir=../${srcdir};;
9277 esac
d920e825
L
9278 saved_CFLAGS="${CFLAGS}"
9279 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
9280 ${realsrcdir}/configure \
33e70558 9281 --enable-languages=${enable_languages-all} \
534d0cc0 9282 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 9283 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
9284
9285 # We just finished tests for the build machine, so rename
9286 # the file auto-build.h in the gcc directory.
9287 mv auto-host.h ../auto-build.h
9288 cd ..
9289 rm -rf $tempdir
eaf4e618 9290 build_auto=auto-build.h
3b1b059c 9291 FORBUILD=../${build_subdir}
db81d74a
RH
9292fi
9293
06f0b04c 9294
eaf4e618 9295tm_file="${tm_file} defaults.h"
4977bab6
ZW
9296tm_p_file="${tm_p_file} tm-preds.h"
9297host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
9298build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 9299# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477
KG
9300# put this back in temporarily.
9301xm_file="ansidecl.h ${xm_file}"
0056a9b5 9302
34a86c2b
NN
9303# --------
9304# UNSORTED
9305# --------
9306
f1943b77 9307# Get the version trigger filename from the toplevel
75bffa71 9308if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
9309 gcc_version_trigger=$with_gcc_version_trigger
9310else
9311 gcc_version_trigger=${srcdir}/version.c
9312fi
022dae81 9313gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
8763704d 9314gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
861bb6c1 9315
cc1e60ea 9316# Compile in configure arguments.
8105825d 9317if test -f configargs.h ; then
cc1e60ea 9318 # Being re-configured.
022dae81 9319 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
9320 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
9321else
9322 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
9323fi
eeae7b41
DJ
9324
9325# Double all backslashes and backslash all quotes to turn
9326# gcc_config_arguments into a C string.
9327sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
9328$gcc_config_arguments
9329EOF
9330gcc_config_arguments_str=`cat conftest.out`
9331rm -f conftest.out
9332
cc1e60ea
JM
9333cat > configargs.h <<EOF
9334/* Generated automatically. */
eeae7b41 9335static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 9336static const char thread_model[] = "$thread_file";
7816bea0
DJ
9337
9338static const struct {
9339 const char *name, *value;
9340} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
9341EOF
9342
ab87f8c8
JL
9343# Internationalization
9344PACKAGE=gcc
9345VERSION="$gcc_version"
861bb6c1 9346
ab87f8c8
JL
9347
9348
56694dd9
ZW
9349# If we haven't got the data from the intl directory,
9350# assume NLS is disabled.
ba479fd2
NN
9351USE_NLS=no
9352LIBINTL=
9353LIBINTL_DEP=
9354INCINTL=
9355XGETTEXT=
9356GMSGFMT=
9357POSUB=
56694dd9
ZW
9358if test -f ../intl/config.intl; then
9359 . ../intl/config.intl
093e61a6 9360fi
ba479fd2
NN
9361echo "$as_me:$LINENO: checking whether NLS is requested" >&5
9362echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
56694dd9 9363if test x"$USE_NLS" != xyes; then
ba479fd2
NN
9364 echo "$as_me:$LINENO: result: no" >&5
9365echo "${ECHO_T}no" >&6
56694dd9 9366else
ba479fd2
NN
9367 echo "$as_me:$LINENO: result: yes" >&5
9368echo "${ECHO_T}yes" >&6
9369
9370cat >>confdefs.h <<\_ACEOF
56694dd9 9371#define ENABLE_NLS 1
ba479fd2 9372_ACEOF
56694dd9 9373
093e61a6 9374
ba479fd2
NN
9375 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9376echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
56694dd9 9377 # Look for .po and .gmo files in the source directory.
ba479fd2 9378 CATALOGS=
56694dd9
ZW
9379 XLINGUAS=
9380 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
9381 # If there aren't any .gmo files the shell will give us the
9382 # literal string "../path/to/srcdir/po/*.gmo" which has to be
9383 # weeded out.
9384 case "$cat" in *\**)
9385 continue;;
9386 esac
9387 # The quadruple backslash is collapsed to a double backslash
9388 # by the backticks, then collapsed again by the double quotes,
9389 # leaving us with one backslash in the sed expression (right
9390 # before the dot that mustn't act as a wildcard).
9391 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
9392 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
9393 # The user is allowed to set LINGUAS to a list of languages to
9394 # install catalogs for. If it's empty that means "all of them."
9395 if test "x$LINGUAS" = x; then
9396 CATALOGS="$CATALOGS $cat"
9397 XLINGUAS="$XLINGUAS $lang"
9398 else
9399 case "$LINGUAS" in *$lang*)
9400 CATALOGS="$CATALOGS $cat"
9401 XLINGUAS="$XLINGUAS $lang"
9402 ;;
9403 esac
9404 fi
9405 done
9406 LINGUAS="$XLINGUAS"
ba479fd2
NN
9407 echo "$as_me:$LINENO: result: $LINGUAS" >&5
9408echo "${ECHO_T}$LINGUAS" >&6
56694dd9 9409fi
861bb6c1 9410
56694dd9
ZW
9411# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
9412# -liconv on the link line twice.
9413case "$LIBINTL" in *$LIBICONV*)
9414 LIBICONV= ;;
9415esac
dc6746e7 9416
56694dd9
ZW
9417# Windows32 Registry support for specifying GCC installation paths.
9418# Check whether --enable-win32-registry or --disable-win32-registry was given.
9419if test "${enable_win32_registry+set}" = set; then
9420 enableval="$enable_win32_registry"
dc6746e7 9421
ba479fd2 9422fi;
56694dd9
ZW
9423case $host_os in
9424 win32 | pe | cygwin* | mingw32* | uwin*)
ba479fd2
NN
9425echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
9426echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
56694dd9 9427if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9428
9429cat >>confdefs.h <<\_ACEOF
56694dd9 9430#define ENABLE_WIN32_REGISTRY 1
ba479fd2
NN
9431_ACEOF
9432
9433 echo "$as_me:$LINENO: result: yes" >&5
9434echo "${ECHO_T}yes" >&6
9435 echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
9436echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
9437if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
9438 echo $ECHO_N "(cached) $ECHO_C" >&6
9439else
9440 ac_func_search_save_LIBS=$LIBS
9441ac_cv_search_RegOpenKeyExA=no
9442cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9443/* confdefs.h. */
9444_ACEOF
9445cat confdefs.h >>conftest.$ac_ext
9446cat >>conftest.$ac_ext <<_ACEOF
9447/* end confdefs.h. */
861bb6c1 9448
ab87f8c8 9449/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9450#ifdef __cplusplus
9451extern "C"
9452#endif
ab87f8c8 9453/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9454 builtin and then its argument prototype would still apply. */
9455char RegOpenKeyExA ();
9456int
9457main ()
9458{
9459RegOpenKeyExA ();
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext conftest$ac_exeext
9465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9466 (eval $ac_link) 2>conftest.er1
ba479fd2 9467 ac_status=$?
86da66b5
HPN
9468 grep -v '^ *+' conftest.er1 >conftest.err
9469 rm -f conftest.er1
9470 cat conftest.err >&5
ba479fd2
NN
9471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); } &&
2fac9c01
ZW
9473 { ac_try='test -z "$ac_c_werror_flag"
9474 || test ! -s conftest.err'
86da66b5
HPN
9475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9476 (eval $ac_try) 2>&5
9477 ac_status=$?
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); }; } &&
9480 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9482 (eval $ac_try) 2>&5
9483 ac_status=$?
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
56694dd9 9486 ac_cv_search_RegOpenKeyExA="none required"
ab87f8c8 9487else
ba479fd2
NN
9488 echo "$as_me: failed program was:" >&5
9489sed 's/^/| /' conftest.$ac_ext >&5
9490
861bb6c1 9491fi
86da66b5
HPN
9492rm -f conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
ba479fd2
NN
9494if test "$ac_cv_search_RegOpenKeyExA" = no; then
9495 for ac_lib in advapi32; do
9496 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9497 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9498/* confdefs.h. */
9499_ACEOF
9500cat confdefs.h >>conftest.$ac_ext
9501cat >>conftest.$ac_ext <<_ACEOF
9502/* end confdefs.h. */
9503
56694dd9 9504/* Override any gcc2 internal prototype to avoid an error. */
ba479fd2
NN
9505#ifdef __cplusplus
9506extern "C"
9507#endif
56694dd9 9508/* We use char because int might match the return type of a gcc2
ba479fd2
NN
9509 builtin and then its argument prototype would still apply. */
9510char RegOpenKeyExA ();
9511int
9512main ()
9513{
9514RegOpenKeyExA ();
9515 ;
9516 return 0;
9517}
9518_ACEOF
9519rm -f conftest.$ac_objext conftest$ac_exeext
9520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86da66b5 9521 (eval $ac_link) 2>conftest.er1
ba479fd2 9522 ac_status=$?
86da66b5
HPN
9523 grep -v '^ *+' conftest.er1 >conftest.err
9524 rm -f conftest.er1
9525 cat conftest.err >&5
ba479fd2
NN
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
2fac9c01
ZW
9528 { ac_try='test -z "$ac_c_werror_flag"
9529 || test ! -s conftest.err'
86da66b5
HPN
9530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9531 (eval $ac_try) 2>&5
9532 ac_status=$?
9533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); }; } &&
9535 { ac_try='test -s conftest$ac_exeext'
ba479fd2
NN
9536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9537 (eval $ac_try) 2>&5
9538 ac_status=$?
9539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540 (exit $ac_status); }; }; then
9541 ac_cv_search_RegOpenKeyExA="-l$ac_lib"
56694dd9 9542break
861bb6c1 9543else
ba479fd2
NN
9544 echo "$as_me: failed program was:" >&5
9545sed 's/^/| /' conftest.$ac_ext >&5
9546
861bb6c1 9547fi
86da66b5
HPN
9548rm -f conftest.err conftest.$ac_objext \
9549 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9550 done
6e3f3080 9551fi
ba479fd2
NN
9552LIBS=$ac_func_search_save_LIBS
9553fi
9554echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
9555echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
9556if test "$ac_cv_search_RegOpenKeyExA" != no; then
63cf211a 9557 test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
ba479fd2 9558
ab87f8c8 9559fi
ba479fd2 9560
cafe096b 9561else
ba479fd2
NN
9562 echo "$as_me:$LINENO: result: no" >&5
9563echo "${ECHO_T}no" >&6
093e61a6 9564fi
ab87f8c8 9565
56694dd9
ZW
9566# Check if user specified a different registry key.
9567case "x${enable_win32_registry}" in
9568x | xyes)
9569 # default.
9570 gcc_cv_win32_registry_key="$VERSION"
9571 ;;
9572xno)
9573 # no registry lookup.
9574 gcc_cv_win32_registry_key=''
9575 ;;
9576*)
9577 # user-specified key.
9578 gcc_cv_win32_registry_key="$enable_win32_registry"
9579 ;;
9580esac
ab87f8c8 9581
56694dd9 9582if test "x$enable_win32_registry" != xno; then
ba479fd2
NN
9583 echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
9584echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
9585
9586cat >>confdefs.h <<_ACEOF
56694dd9 9587#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
ba479fd2 9588_ACEOF
cafe096b 9589
ba479fd2
NN
9590 echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
9591echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
093e61a6 9592fi
56694dd9
ZW
9593;;
9594esac
ab87f8c8 9595
56694dd9
ZW
9596# Get an absolute path to the GCC top-level source directory
9597holddir=`${PWDCMD-pwd}`
9598cd $srcdir
9599topdir=`${PWDCMD-pwd}`
9600cd $holddir
ab87f8c8 9601
56694dd9 9602# Conditionalize the makefile for this host machine.
2ed26f6b 9603xmake_file=
c406e779 9604for f in ${host_xmake_file}
56694dd9
ZW
9605do
9606 if test -f ${srcdir}/config/$f
9607 then
2ed26f6b 9608 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
9609 fi
9610done
093e61a6 9611
56694dd9 9612# Conditionalize the makefile for this target machine.
2ed26f6b 9613tmake_file_=
c406e779 9614for f in ${tmake_file}
56694dd9
ZW
9615do
9616 if test -f ${srcdir}/config/$f
9617 then
2ed26f6b 9618 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
9619 fi
9620done
2ed26f6b 9621tmake_file="${tmake_file_}"
71a94577 9622
56694dd9 9623symbolic_link='ln -s'
34a86c2b 9624
ab87f8c8
JL
9625# If the host doesn't support symlinks, modify CC in
9626# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
9627# Otherwise, we can use "CC=$(CC)".
9628rm -f symtest.tem
9629if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
9630then
9631 cc_set_by_configure="\$(CC)"
5aa82ace 9632 quoted_cc_set_by_configure="\$(CC)"
ab87f8c8 9633 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
596151e1 9634 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
ab87f8c8
JL
9635else
9636 rm -f symtest.tem
9637 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
9638 then
9639 symbolic_link="cp -p"
9640 else
9641 symbolic_link="cp"
9642 fi
9643 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 9644 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
ab87f8c8 9645 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
596151e1 9646 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
9647fi
9648rm -f symtest.tem
9649
9650out_object_file=`basename $out_file .c`.o
9651
9652tm_file_list=
e22340b0 9653tm_include_list=
ab87f8c8 9654for f in $tm_file; do
64ccbc99 9655 case $f in
d02af173 9656 defaults.h )
e22340b0
ZW
9657 tm_file_list="${tm_file_list} \$(srcdir)/$f"
9658 tm_include_list="${tm_include_list} $f"
9659 ;;
9660 * )
9661 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
9662 tm_include_list="${tm_include_list} config/$f"
9663 ;;
64ccbc99 9664 esac
ab87f8c8
JL
9665done
9666
11642c3a 9667tm_p_file_list=
e22340b0 9668tm_p_include_list=
11642c3a 9669for f in $tm_p_file; do
4977bab6
ZW
9670 case $f in
9671 tm-preds.h )
e22340b0
ZW
9672 tm_p_file_list="${tm_p_file_list} $f"
9673 tm_p_include_list="${tm_p_include_list} $f"
9674 ;;
9675 * )
9676 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
9677 tm_p_include_list="${tm_p_include_list} config/$f"
9678 esac
9679done
9680
9681xm_file_list=
9682xm_include_list=
9683for f in $xm_file; do
9684 case $f in
9685 ansidecl.h )
9686 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
9687 xm_include_list="${xm_include_list} $f"
9688 ;;
9689 auto-host.h )
9690 xm_file_list="${xm_file_list} $f"
9691 xm_include_list="${xm_include_list} $f"
9692 ;;
9693 * )
9694 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
9695 xm_include_list="${xm_include_list} config/$f"
9696 ;;
4977bab6 9697 esac
11642c3a
ZW
9698done
9699
ab87f8c8 9700host_xm_file_list=
e22340b0 9701host_xm_include_list=
ab87f8c8 9702for f in $host_xm_file; do
64ccbc99 9703 case $f in
d02af173 9704 ansidecl.h )
e22340b0
ZW
9705 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
9706 host_xm_include_list="${host_xm_include_list} $f"
9707 ;;
e2500fed 9708 auto-host.h )
e22340b0
ZW
9709 host_xm_file_list="${host_xm_file_list} $f"
9710 host_xm_include_list="${host_xm_include_list} $f"
9711 ;;
9712 * )
9713 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
9714 host_xm_include_list="${host_xm_include_list} config/$f"
9715 ;;
64ccbc99 9716 esac
ab87f8c8
JL
9717done
9718
9719build_xm_file_list=
9720for f in $build_xm_file; do
64ccbc99 9721 case $f in
d02af173 9722 ansidecl.h )
e22340b0
ZW
9723 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
9724 build_xm_include_list="${build_xm_include_list} $f"
9725 ;;
e2500fed 9726 auto-build.h | auto-host.h )
e22340b0
ZW
9727 build_xm_file_list="${build_xm_file_list} $f"
9728 build_xm_include_list="${build_xm_include_list} $f"
9729 ;;
9730 * )
9731 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
9732 build_xm_include_list="${build_xm_include_list} config/$f"
9733 ;;
64ccbc99 9734 esac
ab87f8c8
JL
9735done
9736
a078a589
ZW
9737# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
9738# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
9739CROSS=
9740ALL=all.internal
9741SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9742if test x$host != x$target
9743then
a078a589
ZW
9744 CROSS="-DCROSS_COMPILE"
9745 ALL=all.cross
9746 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
343f59d9 9747 case "$host","$target" in
3a7e8b87
GK
9748 # Darwin crosses can use the host system's libraries and headers,
9749 # because of the fat library support. Of course, it must be the
9750 # same version of Darwin on both sides. Allow the user to
9751 # just say --target=foo-darwin without a version number to mean
9752 # "the version on this system".
9753 *-*-darwin*,*-*-darwin*)
9754 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
9755 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
9756 if test $hostos = $targetos -o $targetos = darwin ; then
9757 CROSS=
9758 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
9759 with_headers=yes
9760 fi
9761 ;;
9762
343f59d9
AM
9763 i?86-*-*,x86_64-*-* \
9764 | powerpc*-*-*,powerpc64*-*-*)
9765 CROSS="$CROSS -DNATIVE_CROSS" ;;
9766 esac
7a615b25
AO
9767elif test "x$TARGET_SYSTEM_ROOT" != x; then
9768 # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
9769 SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
ab87f8c8
JL
9770fi
9771
b39d221a
EC
9772# If this is a cross-compiler that does not
9773# have its own set of headers then define
9774# inhibit_libc
9775
dc06db20
R
9776# If this is using newlib, without having the headers available now,
9777# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
9778# This prevents libgcc2 from containing any code which requires libc
9779# support.
b39d221a 9780inhibit_libc=
dc06db20
R
9781if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
9782 test x$with_newlib = xyes ; } &&
e50084fa 9783 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
b39d221a 9784 inhibit_libc=-Dinhibit_libc
b39d221a
EC
9785fi
9786
9787
a078a589
ZW
9788# When building gcc with a cross-compiler, we need to adjust things so
9789# that the generator programs are still built with the native compiler.
9790# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
9791
9792# These are the normal (build=host) settings:
ba479fd2
NN
9793BUILD_PREFIX=
9794BUILD_PREFIX_1=ignore-
9795CC_FOR_BUILD='$(CC)'
9796BUILD_CFLAGS='$(ALL_CFLAGS)'
a078a589 9797
ba479fd2 9798STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
9799
9800# Possibly disable fixproto, on a per-target basis.
9801case ${use_fixproto} in
9802 no)
9803 STMP_FIXPROTO=
9804 ;;
9805 yes)
9806 STMP_FIXPROTO=stmp-fixproto
9807 ;;
9808esac
9809
a078a589 9810
83599948
NS
9811# And these apply if build != host, or we are generating coverage data
9812if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 9813then
5c35940c
NN
9814 BUILD_PREFIX=build-
9815 BUILD_PREFIX_1=build-
b11e4747 9816 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 9817
7a615b25
AO
9818 if test "x$TARGET_SYSTEM_ROOT" = x; then
9819 STMP_FIXINC=
9820 STMP_FIXPROTO=
9821 fi
ab87f8c8
JL
9822fi
9823
9824# Expand extra_headers to include complete path.
9825# This substitutes for lots of t-* files.
9826extra_headers_list=
b1ef58c8
NN
9827# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
9828for file in ${extra_headers} ; do
9829 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
9830done
ab87f8c8 9831
c38f02df
ILT
9832# Define collect2 in Makefile.
9833case $host_can_use_collect2 in
9834 no) collect2= ;;
9835 *) collect2='collect2$(exeext)' ;;
9836esac
9837
9838
ab87f8c8 9839# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
9840case $use_collect2 in
9841 no) use_collect2= ;;
9842 "") ;;
ba479fd2 9843 *)
34a86c2b
NN
9844 host_xm_defines="${host_xm_defines} USE_COLLECT2"
9845 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
9846 case $host_can_use_collect2 in
9847 no)
9848 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
9849echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
9850 { (exit 1); exit 1; }; }
9851 ;;
9852 esac
34a86c2b
NN
9853 ;;
9854esac
ab87f8c8 9855
8bb915b6
NN
9856# ---------------------------
9857# Assembler & linker features
9858# ---------------------------
9859
d869a8c4
NN
9860# Identify the assembler which will work hand-in-glove with the newly
9861# built GCC, so that we can examine its features. This is the assembler
9862# which will be driven by the driver program.
9863#
9864# If build != host, and we aren't building gas in-tree, we identify a
9865# build->target assembler and hope that it will have the same features
9866# as the host->target assembler we'll be using.
ba479fd2
NN
9867echo "$as_me:$LINENO: checking what assembler to use" >&5
9868echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
34a86c2b 9869in_tree_gas=no
ab87f8c8 9870gcc_cv_as=
981d4858
JM
9871gcc_cv_gas_major_version=
9872gcc_cv_gas_minor_version=
ab87f8c8
JL
9873gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
9874if test -x "$DEFAULT_ASSEMBLER"; then
9875 gcc_cv_as="$DEFAULT_ASSEMBLER"
ab87f8c8
JL
9876elif test -x as$host_exeext; then
9877 # Build using assembler in the current directory.
9878 gcc_cv_as=./as$host_exeext
34a86c2b 9879elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
9880 && test -f ../gas/Makefile \
9881 && test x$build = x$host; then
9882 # Single tree build which includes gas. We want to prefer it
9883 # over whatever linker top-level may have detected, since
9884 # we'll use what we're building after installation anyway.
ad9c4d9f
NN
9885 in_tree_gas=yes
9886 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9887for f in $gcc_cv_as_bfd_srcdir/configure \
9888 $gcc_cv_as_gas_srcdir/configure \
9889 $gcc_cv_as_gas_srcdir/configure.in \
9890 $gcc_cv_as_gas_srcdir/Makefile.in ; do
9891 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
9892 if test x$gcc_cv_gas_version != x; then
9893 break
9894 fi
9895done
9896gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
9897gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
9898gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
9899case $gcc_cv_gas_patch_version in
9900 "") gcc_cv_gas_patch_version="0" ;;
9901esac
8ada417f
ZW
9902gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
9903 + $gcc_cv_gas_minor_version \) \* 1000 \
9904 + $gcc_cv_gas_patch_version`
ad9c4d9f 9905
f9c1196a
ZW
9906 rm -f as$host_exeext
9907 $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
5408ac6c
HPN
9908 in_tree_gas_is_elf=no
9909 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
9910 || (grep 'obj_format = multi' ../gas/Makefile \
9911 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
9912 then
9913 in_tree_gas_is_elf=yes
9914 fi
08d105fa
AO
9915elif test -x "$AS_FOR_TARGET"; then
9916 gcc_cv_as="$AS_FOR_TARGET"
9917elif test -x "$AS" && test x$host = x$target; then
9918 gcc_cv_as="$AS"
981d4858 9919fi
9e423e6d 9920
534d0cc0 9921if test "x$gcc_cv_as" = x; then
779243f7
JL
9922 # Search the same directories that the installed compiler will
9923 # search. Else we may find the wrong assembler and lose. If we
9924 # do not find a suitable assembler binary, then try the user's
9925 # path.
9926 #
9927 # Also note we have to check MD_EXEC_PREFIX before checking the
9928 # user's path. Unfortunately, there is no good way to get at the
9929 # value of MD_EXEC_PREFIX here. So we do a brute force search
9930 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
9931 # to be fixed as part of the make/configure rewrite too.
9932
9933 if test "x$exec_prefix" = xNONE; then
9934 if test "x$prefix" = xNONE; then
9935 test_prefix=/usr/local
9936 else
9937 test_prefix=$prefix
9938 fi
9939 else
9940 test_prefix=$exec_prefix
9941 fi
9942
9943 # If the loop below does not find an assembler, then use whatever
9944 # one we can find in the users's path.
9945 # user's path.
55a2ea2a
AM
9946 if test "x$program_prefix" != xNONE; then
9947 gcc_cv_as=${program_prefix}as$host_exeext
9948 else
9c56033f 9949 gcc_cv_as=`echo as | sed "${program_transform_name}"`$host_exeext
55a2ea2a
AM
9950 fi
9951
19baba0b
RO
9952 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
9953 $test_prefix/libexec/gcc/$target_noncanonical \
caa55b1e
NN
9954 /usr/lib/gcc/$target_noncanonical/$gcc_version \
9955 /usr/lib/gcc/$target_noncanonical \
9956 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
9957 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
9958
9959 if test x$host = x$target; then
9960 test_dirs="$test_dirs \
779243f7
JL
9961 /usr/libexec \
9962 /usr/ccs/gcc \
9963 /usr/ccs/bin \
9964 /udk/usr/ccs/bin \
9965 /bsd43/usr/lib/cmplrs/cc \
9966 /usr/cross64/usr/bin \
9967 /usr/lib/cmplrs/cc \
9968 /sysv/usr/lib/cmplrs/cc \
9969 /svr4/usr/lib/cmplrs/cc \
9970 /usr/bin"
55a2ea2a 9971 fi
779243f7
JL
9972
9973 for dir in $test_dirs; do
55a2ea2a 9974 if test -x $dir/as$host_exeext; then
779243f7
JL
9975 gcc_cv_as=$dir/as$host_exeext
9976 break;
9977 fi
9978 done
9e423e6d 9979fi
34a86c2b
NN
9980case $in_tree_gas in
9981 yes)
ba479fd2
NN
9982 echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
9983echo "${ECHO_T}\"newly built gas\"" >&6
34a86c2b
NN
9984 ;;
9985 no)
ba479fd2
NN
9986 echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
9987echo "${ECHO_T}$gcc_cv_as" >&6
34a86c2b
NN
9988 ;;
9989esac
981d4858 9990
d869a8c4
NN
9991# Identify the linker which will work hand-in-glove with the newly
9992# built GCC, so that we can examine its features. This is the linker
9993# which will be driven by the driver program.
9994#
9995# If build != host, and we aren't building gas in-tree, we identify a
9996# build->target linker and hope that it will have the same features
9997# as the host->target linker we'll be using.
ba479fd2
NN
9998echo "$as_me:$LINENO: checking what linker to use" >&5
9999echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
34a86c2b 10000in_tree_ld=no
275b60d6
JJ
10001gcc_cv_ld=
10002gcc_cv_gld_major_version=
10003gcc_cv_gld_minor_version=
10004gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
10005gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
10006if test -x "$DEFAULT_LINKER"; then
10007 gcc_cv_ld="$DEFAULT_LINKER"
f9c1196a 10008elif test -x collect-ld$host_exeext; then
275b60d6 10009 # Build using linker in the current directory.
f9c1196a 10010 gcc_cv_ld=./collect-ld$host_exeext
34a86c2b 10011elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
08d105fa
AO
10012 && test -f ../ld/Makefile \
10013 && test x$build = x$host; then
10014 # Single tree build which includes ld. We want to prefer it
10015 # over whatever linker top-level may have detected, since
10016 # we'll use what we're building after installation anyway.
34a86c2b 10017 in_tree_ld=yes
5408ac6c
HPN
10018 in_tree_ld_is_elf=no
10019 if (grep 'EMUL = .*elf' ../ld/Makefile \
10020 || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
10021 in_tree_ld_is_elf=yes
10022 fi
275b60d6
JJ
10023 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
10024 do
10025 gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
10026 if test x$gcc_cv_gld_version != x; then
10027 break
10028 fi
10029 done
10030 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
10031 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
f9c1196a
ZW
10032 rm -f collect-ld$host_exeext
10033 $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \
10034 2>/dev/null
08d105fa
AO
10035elif test -x "$LD_FOR_TARGET"; then
10036 gcc_cv_ld="$LD_FOR_TARGET"
10037elif test -x "$LD" && test x$host = x$target; then
10038 gcc_cv_ld="$LD"
275b60d6
JJ
10039fi
10040
534d0cc0 10041if test "x$gcc_cv_ld" = x; then
275b60d6
JJ
10042 # Search the same directories that the installed compiler will
10043 # search. Else we may find the wrong linker and lose. If we
10044 # do not find a suitable linker binary, then try the user's
10045 # path.
10046 #
10047 # Also note we have to check MD_EXEC_PREFIX before checking the
10048 # user's path. Unfortunately, there is no good way to get at the
10049 # value of MD_EXEC_PREFIX here. So we do a brute force search
10050 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
10051 # to be fixed as part of the make/configure rewrite too.
10052
10053 if test "x$exec_prefix" = xNONE; then
10054 if test "x$prefix" = xNONE; then
10055 test_prefix=/usr/local
10056 else
10057 test_prefix=$prefix
10058 fi
10059 else
10060 test_prefix=$exec_prefix
10061 fi
10062
10063 # If the loop below does not find an linker, then use whatever
10064 # one we can find in the users's path.
10065 # user's path.
55a2ea2a
AM
10066 if test "x$program_prefix" != xNONE; then
10067 gcc_cv_ld=${program_prefix}ld$host_exeext
10068 else
9c56033f 10069 gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$host_exeext
55a2ea2a
AM
10070 fi
10071
19baba0b
RO
10072 test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \
10073 $test_prefix/libexec/gcc/$target_noncanonical \
caa55b1e
NN
10074 /usr/lib/gcc/$target_noncanonical/$gcc_version \
10075 /usr/lib/gcc/$target_noncanonical \
10076 $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
10077 $test_prefix/$target_noncanonical/bin"
55a2ea2a
AM
10078
10079 if test x$host = x$target; then
10080 test_dirs="$test_dirs \
275b60d6
JJ
10081 /usr/libexec \
10082 /usr/ccs/gcc \
10083 /usr/ccs/bin \
10084 /udk/usr/ccs/bin \
10085 /bsd43/usr/lib/cmplrs/cc \
10086 /usr/cross64/usr/bin \
10087 /usr/lib/cmplrs/cc \
10088 /sysv/usr/lib/cmplrs/cc \
10089 /svr4/usr/lib/cmplrs/cc \
10090 /usr/bin"
55a2ea2a 10091 fi
275b60d6
JJ
10092
10093 for dir in $test_dirs; do
55a2ea2a 10094 if test -x $dir/ld$host_exeext; then
275b60d6
JJ
10095 gcc_cv_ld=$dir/ld$host_exeext
10096 break;
10097 fi
10098 done
10099fi
34a86c2b
NN
10100case $in_tree_ld in
10101 yes)
ba479fd2
NN
10102 echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
10103echo "${ECHO_T}\"newly built ld\"" >&6
34a86c2b
NN
10104 ;;
10105 no)
ba479fd2
NN
10106 echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
10107echo "${ECHO_T}$gcc_cv_ld" >&6
34a86c2b
NN
10108 ;;
10109esac
275b60d6 10110
981d4858 10111# Figure out what nm we will be using.
f9c1196a 10112gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
ba479fd2
NN
10113echo "$as_me:$LINENO: checking what nm to use" >&5
10114echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
f9c1196a 10115in_tree_nm=no
981d4858
JM
10116if test -x nm$host_exeext; then
10117 gcc_cv_nm=./nm$host_exeext
f9c1196a
ZW
10118elif test -f $gcc_cv_binutils_srcdir/configure.in \
10119 && test -f ../binutils/Makefile; then
10120 # Single tree build which includes binutils.
10121 in_tree_nm=yes
10122 gcc_cv_nm=./nm$host_exeext
10123 rm -f nm$host_exeext
10124 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
534d0cc0
AM
10125elif test "x$program_prefix" != xNONE; then
10126 gcc_cv_nm=${program_prefix}nm$host_exeext
10127else
9c56033f 10128 gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$host_exeext
981d4858 10129fi
f9c1196a 10130case $in_tree_nm in
ba479fd2
NN
10131 yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
10132echo "${ECHO_T}\"newly built nm\"" >&6 ;;
10133 no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
10134echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
f9c1196a 10135esac
981d4858 10136
3cae5780 10137# Figure out what objdump we will be using.
ba479fd2
NN
10138echo "$as_me:$LINENO: checking what objdump to use" >&5
10139echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
f9c1196a 10140in_tree_objdump=no
3cae5780
AS
10141if test -x objdump$host_exeext; then
10142 gcc_cv_objdump=./objdump$host_exeext
f9c1196a
ZW
10143elif test -f $gcc_cv_binutils_srcdir/configure.in \
10144 && test -f ../binutils/Makefile; then
10145 # Single tree build which includes binutils.
10146 in_tree_objdump=yes
10147 gcc_cv_objdump=./objdump$host_exeext
10148 rm -f objdump$host_exeext
10149 $symbolic_link ../binutils/objdump$host_exeext \
10150 objdump$host_exeext 2>/dev/null
534d0cc0
AM
10151elif test "x$program_prefix" != xNONE; then
10152 gcc_cv_objdump=${program_prefix}objdump$host_exeext
10153else
f9c1196a 10154 gcc_cv_objdump=`echo objdump | \
9c56033f 10155 sed "${program_transform_name}"`$host_exeext
3cae5780 10156fi
f9c1196a 10157case $in_tree_objdump in
ba479fd2
NN
10158 yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
10159echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
10160 no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
10161echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
f9c1196a 10162esac
3cae5780 10163
981d4858 10164# Figure out what assembler alignment features are present.
ba479fd2
NN
10165echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
10166echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
10167if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
10168 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10169else
10170 gcc_cv_as_balign_and_p2align=no
10171 if test $in_tree_gas = yes; then
10172 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
10173 then gcc_cv_as_balign_and_p2align=yes
10174fi
10175 elif test x$gcc_cv_as != x; then
6e3f3080 10176 echo '.balign 4
8ada417f 10177.p2align 2' > conftest.s
ba479fd2
NN
10178 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10180 (eval $ac_try) 2>&5
10181 ac_status=$?
10182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10183 (exit $ac_status); }; }
8ada417f
ZW
10184 then
10185 gcc_cv_as_balign_and_p2align=yes
10186 else
10187 echo "configure: failed program was" >&5
10188 cat conftest.s >&5
10189 fi
10190 rm -f conftest.o conftest.s
10191 fi
10192fi
ba479fd2
NN
10193echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
10194echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
63cf211a 10195if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
10196
10197cat >>confdefs.h <<\_ACEOF
981d4858 10198#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 10199_ACEOF
981d4858 10200
ad9c4d9f
NN
10201fi
10202
ba479fd2
NN
10203echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
10204echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
10205if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
10206 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10207else
10208 gcc_cv_as_max_skip_p2align=no
10209 if test $in_tree_gas = yes; then
10210 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
10211 then gcc_cv_as_max_skip_p2align=yes
10212fi
10213 elif test x$gcc_cv_as != x; then
6e3f3080 10214 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
10215 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10217 (eval $ac_try) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }
8ada417f
ZW
10221 then
10222 gcc_cv_as_max_skip_p2align=yes
10223 else
10224 echo "configure: failed program was" >&5
10225 cat conftest.s >&5
10226 fi
10227 rm -f conftest.o conftest.s
10228 fi
ad9c4d9f 10229fi
ba479fd2
NN
10230echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
10231echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
63cf211a 10232if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
10233
10234cat >>confdefs.h <<\_ACEOF
9e423e6d 10235#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 10236_ACEOF
9e423e6d 10237
9e423e6d 10238fi
ad9c4d9f 10239
ba479fd2
NN
10240echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
10241echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
10242if test "${gcc_cv_as_subsection_m1+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10244else
10245 gcc_cv_as_subsection_m1=no
10246 if test $in_tree_gas = yes; then
10247 if test $in_tree_gas_is_elf = yes \
10248 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
10249 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 10250fi
8ada417f 10251 elif test x$gcc_cv_as != x; then
6e3f3080 10252 echo 'conftest_label1: .word 0
d1accaa3
JJ
10253.subsection -1
10254conftest_label2: .word 0
8ada417f 10255.previous' > conftest.s
ba479fd2
NN
10256 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10258 (eval $ac_try) 2>&5
10259 ac_status=$?
10260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10261 (exit $ac_status); }; }
8ada417f
ZW
10262 then
10263 if test x$gcc_cv_nm != x; then
10264 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
10265 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
10266 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
10267 then :
10268 else gcc_cv_as_subsection_m1=yes
10269 fi
10270 rm -f conftest.nm1 conftest.nm2
10271 fi
10272 else
10273 echo "configure: failed program was" >&5
10274 cat conftest.s >&5
10275 fi
10276 rm -f conftest.o conftest.s
10277 fi
981d4858 10278fi
ba479fd2
NN
10279echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
10280echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
63cf211a 10281if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
10282
10283cat >>confdefs.h <<\_ACEOF
981d4858 10284#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 10285_ACEOF
981d4858 10286
d1accaa3 10287fi
ad9c4d9f 10288
ba479fd2
NN
10289echo "$as_me:$LINENO: checking assembler for .weak" >&5
10290echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
10291if test "${gcc_cv_as_weak+set}" = set; then
10292 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10293else
10294 gcc_cv_as_weak=no
10295 if test $in_tree_gas = yes; then
10296 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
10297 then gcc_cv_as_weak=yes
ad9c4d9f 10298fi
8ada417f 10299 elif test x$gcc_cv_as != x; then
6e3f3080 10300 echo ' .weak foobar' > conftest.s
ba479fd2
NN
10301 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10303 (eval $ac_try) 2>&5
10304 ac_status=$?
10305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10306 (exit $ac_status); }; }
8ada417f
ZW
10307 then
10308 gcc_cv_as_weak=yes
10309 else
10310 echo "configure: failed program was" >&5
10311 cat conftest.s >&5
10312 fi
10313 rm -f conftest.o conftest.s
10314 fi
981d4858 10315fi
ba479fd2
NN
10316echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
10317echo "${ECHO_T}$gcc_cv_as_weak" >&6
63cf211a 10318if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
10319
10320cat >>confdefs.h <<\_ACEOF
981d4858 10321#define HAVE_GAS_WEAK 1
ba479fd2 10322_ACEOF
981d4858 10323
12822146 10324fi
ad9c4d9f 10325
8ada417f
ZW
10326# .hidden needs to be supported in both the assembler and the linker,
10327# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
10328# This is irritatingly difficult to feature test for; we have to check the
10329# date string after the version number. If we've got an in-tree
10330# ld, we don't know its patchlevel version, so we set the baseline at 2.13
10331# to be safe.
10332# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ba479fd2
NN
10333echo "$as_me:$LINENO: checking assembler for .hidden" >&5
10334echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
10335if test "${gcc_cv_as_hidden+set}" = set; then
10336 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10337else
10338 gcc_cv_as_hidden=no
10339 if test $in_tree_gas = yes; then
10340 if test $in_tree_gas_is_elf = yes \
10341 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
10342 then gcc_cv_as_hidden=yes
10343fi
10344 elif test x$gcc_cv_as != x; then
6e3f3080 10345 echo ' .hidden foobar
8ada417f 10346foobar:' > conftest.s
ba479fd2
NN
10347 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10349 (eval $ac_try) 2>&5
10350 ac_status=$?
10351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10352 (exit $ac_status); }; }
8ada417f
ZW
10353 then
10354 gcc_cv_as_hidden=yes
10355 else
10356 echo "configure: failed program was" >&5
10357 cat conftest.s >&5
10358 fi
10359 rm -f conftest.o conftest.s
10360 fi
10361fi
ba479fd2
NN
10362echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
10363echo "${ECHO_T}$gcc_cv_as_hidden" >&6
63cf211a 10364
ad9c4d9f 10365
ba479fd2
NN
10366echo "$as_me:$LINENO: checking linker for .hidden support" >&5
10367echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
10368if test "${gcc_cv_ld_hidden+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10370else
10371 if test $in_tree_ld = yes ; then
10372 gcc_cv_ld_hidden=no
10373 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 \
10374 && test $in_tree_ld_is_elf = yes; then
10375 gcc_cv_ld_hidden=yes
10376 fi
10377else
10378 gcc_cv_ld_hidden=yes
bace148a 10379 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
10380 if echo "$ld_ver" | grep GNU > /dev/null; then
10381 ld_vers=`echo $ld_ver | sed -n \
10382 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10383 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10384 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
10385 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
10386 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
10387 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
10388 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'`
10389 if test 0"$ld_date" -lt 20020404; then
10390 if test -n "$ld_date"; then
10391 # If there was date string, but was earlier than 2002-04-04, fail
10392 gcc_cv_ld_hidden=no
10393 elif test -z "$ld_vers"; then
10394 # If there was no date string nor ld version number, something is wrong
10395 gcc_cv_ld_hidden=no
10396 else
10397 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
10398 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
10399 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10400 test -z "$ld_vers_patch" && ld_vers_patch=0
10401 if test "$ld_vers_major" -lt 2; then
10402 gcc_cv_ld_hidden=no
10403 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
10404 gcc_cv_ld_hidden="no"
10405 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
10406 gcc_cv_ld_hidden=no
c72931a6 10407 fi
8ada417f 10408 fi
789b7de5 10409 fi
8ada417f 10410 else
28690784 10411 case "${target}" in
b0fd7d27 10412 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
10413 gcc_cv_ld_hidden=yes
10414 ;;
10415 *)
10416 gcc_cv_ld_hidden=no
10417 ;;
10418 esac
8ada417f
ZW
10419 fi
10420fi
6d07784a 10421fi
ba479fd2
NN
10422echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
10423echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
8ada417f 10424libgcc_visibility=no
ad9c4d9f 10425
8e3940b2 10426if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 10427 libgcc_visibility=yes
ba479fd2
NN
10428
10429cat >>confdefs.h <<\_ACEOF
8ada417f 10430#define HAVE_GAS_HIDDEN 1
ba479fd2 10431_ACEOF
ad9c4d9f
NN
10432
10433fi
10434
8ada417f 10435# Check if we have .[us]leb128, and support symbol arithmetic with it.
ba479fd2
NN
10436echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
10437echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
10438if test "${gcc_cv_as_leb128+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10440else
10441 gcc_cv_as_leb128=no
10442 if test $in_tree_gas = yes; then
10443 if test $in_tree_gas_is_elf = yes \
10444 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
10445 then gcc_cv_as_leb128=yes
10446fi
10447 elif test x$gcc_cv_as != x; then
6e3f3080 10448 echo ' .data
b7460f24
RH
10449 .uleb128 L2 - L1
10450L1:
10451 .uleb128 1280
10452 .sleb128 -1010
8ada417f 10453L2:' > conftest.s
ba479fd2
NN
10454 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); }; }
8ada417f
ZW
10460 then
10461 # GAS versions before 2.11 do not support uleb128,
10462 # despite appearing to.
10463 # ??? There exists an elf-specific test that will crash
10464 # the assembler. Perhaps it's better to figure out whether
10465 # arbitrary sections are supported and try the test.
bace148a 10466 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
10467 if echo "$as_ver" | grep GNU > /dev/null; then
10468 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
10469 as_major=`echo $as_ver | sed 's/\..*//'`
10470 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
10471 if test $as_major -eq 2 && test $as_minor -lt 11
10472 then :
10473 else gcc_cv_as_leb128=yes
10474 fi
10475 fi
10476 else
10477 echo "configure: failed program was" >&5
10478 cat conftest.s >&5
10479 fi
10480 rm -f conftest.o conftest.s
10481 fi
b7460f24 10482fi
ba479fd2
NN
10483echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
10484echo "${ECHO_T}$gcc_cv_as_leb128" >&6
63cf211a 10485if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
10486
10487cat >>confdefs.h <<\_ACEOF
b7460f24 10488#define HAVE_AS_LEB128 1
ba479fd2 10489_ACEOF
b7460f24
RH
10490
10491fi
ad9c4d9f 10492
8ada417f
ZW
10493# GAS versions up to and including 2.11.0 may mis-optimize
10494# .eh_frame data.
ba479fd2
NN
10495echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
10496echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
10497if test "${gcc_cv_as_eh_frame+set}" = set; then
10498 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10499else
10500 gcc_cv_as_eh_frame=no
10501 if test $in_tree_gas = yes; then
10502 if test $in_tree_gas_is_elf = yes \
10503 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10504 then gcc_cv_as_eh_frame=yes
ad9c4d9f 10505fi
8ada417f 10506 elif test x$gcc_cv_as != x; then
6e3f3080 10507 echo ' .text
c64688ae
RH
10508.LFB1:
10509 .4byte 0
10510.L1:
10511 .4byte 0
10512.LFE1:
10513 .section .eh_frame,"aw",@progbits
10514__FRAME_BEGIN__:
10515 .4byte .LECIE1-.LSCIE1
10516.LSCIE1:
10517 .4byte 0x0
10518 .byte 0x1
10519 .ascii "z\0"
10520 .byte 0x1
10521 .byte 0x78
10522 .byte 0x1a
10523 .byte 0x0
10524 .byte 0x4
10525 .4byte 1
10526 .p2align 1
10527.LECIE1:
10528.LSFDE1:
10529 .4byte .LEFDE1-.LASFDE1
10530.LASFDE1:
10531 .4byte .LASFDE1-__FRAME_BEGIN__
10532 .4byte .LFB1
10533 .4byte .LFE1-.LFB1
10534 .byte 0x4
10535 .4byte .LFE1-.LFB1
10536 .byte 0x4
10537 .4byte .L1-.LFB1
8ada417f 10538.LEFDE1:' > conftest.s
ba479fd2
NN
10539 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10541 (eval $ac_try) 2>&5
10542 ac_status=$?
10543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10544 (exit $ac_status); }; }
8ada417f
ZW
10545 then
10546 cat > conftest.lit <<EOF
c64688ae
RH
10547 0000 10000000 00000000 017a0001 781a0004 .........z..x...
10548 0010 01000000 12000000 18000000 00000000 ................
093e61a6 10549 0020 08000000 04080000 0044 .........D
01efb963 10550EOF
ba479fd2 10551cat > conftest.big <<EOF
01efb963
AS
10552 0000 00000010 00000000 017a0001 781a0004 .........z..x...
10553 0010 00000001 00000012 00000018 00000000 ................
093e61a6 10554 0020 00000008 04000000 0844 .........D
c64688ae 10555EOF
8ada417f
ZW
10556 # If the assembler didn't choke, and we can objdump,
10557 # and we got the correct data, then succeed.
10558 if test x$gcc_cv_objdump != x \
10559 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
10560 | tail -3 > conftest.got \
10561 && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
10562 || cmp conftest.big conftest.got > /dev/null 2>&1; }
10563 then
10564 gcc_cv_as_eh_frame=yes
ba479fd2
NN
10565 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
10566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10567 (eval $ac_try) 2>&5
10568 ac_status=$?
10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10570 (exit $ac_status); }; }; then
8ada417f
ZW
10571 gcc_cv_as_eh_frame=buggy
10572 else
10573 # Uh oh, what do we do now?
10574 gcc_cv_as_eh_frame=no
10575 fi
10576 else
10577 echo "configure: failed program was" >&5
10578 cat conftest.s >&5
10579 fi
10580 rm -f conftest.o conftest.s
10581 fi
c64688ae 10582fi
ba479fd2
NN
10583echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
10584echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
ad9c4d9f 10585
6e3f3080 10586
63cf211a 10587if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
10588
10589cat >>confdefs.h <<\_ACEOF
8ada417f 10590#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 10591_ACEOF
ad9c4d9f
NN
10592
10593fi
10594
ba479fd2
NN
10595echo "$as_me:$LINENO: checking assembler for section merging support" >&5
10596echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
10597if test "${gcc_cv_as_shf_merge+set}" = set; then
10598 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10599else
10600 gcc_cv_as_shf_merge=no
10601 if test $in_tree_gas = yes; then
10602 if test $in_tree_gas_is_elf = yes \
10603 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10604 then gcc_cv_as_shf_merge=yes
10605fi
10606 elif test x$gcc_cv_as != x; then
6e3f3080 10607 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
10608 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
10609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10610 (eval $ac_try) 2>&5
10611 ac_status=$?
10612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10613 (exit $ac_status); }; }
8ada417f
ZW
10614 then
10615 gcc_cv_as_shf_merge=yes
10616 else
10617 echo "configure: failed program was" >&5
10618 cat conftest.s >&5
10619 fi
10620 rm -f conftest.o conftest.s
10621 fi
201556f0 10622fi
ba479fd2
NN
10623echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
10624echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
8ada417f 10625
8ad9fb33 10626
ba479fd2 10627cat >>confdefs.h <<_ACEOF
8ad9fb33 10628#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 10629_ACEOF
201556f0 10630
201556f0 10631
8ada417f 10632# Thread-local storage - the check is heavily parametrized.
f996902d
RH
10633conftest_s=
10634tls_first_major=
10635tls_first_minor=
9739c90c 10636tls_as_opt=
f996902d 10637case "$target" in
6f9b006d
RH
10638 alpha*-*-*)
10639 conftest_s='
10640 .section ".tdata","awT",@progbits
10641foo: .long 25
10642 .text
10643 ldq $27,__tls_get_addr($29) !literal!1
10644 lda $16,foo($29) !tlsgd!1
10645 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
10646 ldq $27,__tls_get_addr($29) !literal!2
10647 lda $16,foo($29) !tlsldm!2
10648 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
10649 ldq $1,foo($29) !gotdtprel
10650 ldah $2,foo($29) !dtprelhi
10651 lda $3,foo($2) !dtprello
10652 lda $4,foo($29) !dtprel
10653 ldq $1,foo($29) !gottprel
10654 ldah $2,foo($29) !tprelhi
10655 lda $3,foo($2) !tprello
10656 lda $4,foo($29) !tprel'
10657 tls_first_major=2
10658 tls_first_minor=13
2f3321ca 10659 tls_as_opt=--fatal-warnings
6f9b006d 10660 ;;
f996902d
RH
10661 i[34567]86-*-*)
10662 conftest_s='
10663 .section ".tdata","awT",@progbits
10664foo: .long 25
10665 .text
10666 movl %gs:0, %eax
10667 leal foo@TLSGD(,%ebx,1), %eax
10668 leal foo@TLSLDM(%ebx), %eax
10669 leal foo@DTPOFF(%eax), %edx
10670 movl foo@GOTTPOFF(%ebx), %eax
10671 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
10672 addl foo@GOTNTPOFF(%ebx), %eax
10673 movl foo@INDNTPOFF, %eax
f996902d
RH
10674 movl $foo@TPOFF, %eax
10675 subl $foo@TPOFF, %eax
10676 leal foo@NTPOFF(%ecx), %eax'
10677 tls_first_major=2
75d38379 10678 tls_first_minor=14
2f3321ca 10679 tls_as_opt=--fatal-warnings
75d38379
JJ
10680 ;;
10681 x86_64-*-*)
10682 conftest_s='
10683 .section ".tdata","awT",@progbits
10684foo: .long 25
10685 .text
10686 movq %fs:0, %rax
10687 leaq foo@TLSGD(%rip), %rdi
10688 leaq foo@TLSLD(%rip), %rdi
10689 leaq foo@DTPOFF(%rax), %rdx
10690 movq foo@GOTTPOFF(%rip), %rax
10691 movq $foo@TPOFF, %rax'
10692 tls_first_major=2
10693 tls_first_minor=14
2f3321ca 10694 tls_as_opt=--fatal-warnings
f996902d 10695 ;;
7b6e506e
RH
10696 ia64-*-*)
10697 conftest_s='
10698 .section ".tdata","awT",@progbits
10699foo: data8 25
10700 .text
10701 addl r16 = @ltoff(@dtpmod(foo#)), gp
10702 addl r17 = @ltoff(@dtprel(foo#)), gp
10703 addl r18 = @ltoff(@tprel(foo#)), gp
10704 addl r19 = @dtprel(foo#), gp
10705 adds r21 = @dtprel(foo#), r13
10706 movl r23 = @dtprel(foo#)
10707 addl r20 = @tprel(foo#), gp
10708 adds r22 = @tprel(foo#), r13
10709 movl r24 = @tprel(foo#)'
10710 tls_first_major=2
10711 tls_first_minor=13
2f3321ca 10712 tls_as_opt=--fatal-warnings
7b6e506e 10713 ;;
c4501e62
JJ
10714 powerpc-*-*)
10715 conftest_s='
10716 .section ".tdata","awT",@progbits
10717 .align 2
10718ld0: .space 4
10719ld1: .space 4
10720x1: .space 4
10721x2: .space 4
10722x3: .space 4
10723 .text
10724 addi 3,31,ld0@got@tlsgd
10725 bl __tls_get_addr
10726 addi 3,31,x1@got@tlsld
10727 bl __tls_get_addr
10728 addi 9,3,x1@dtprel
10729 addis 9,3,x2@dtprel@ha
10730 addi 9,9,x2@dtprel@l
10731 lwz 9,x3@got@tprel(31)
10732 add 9,9,x@tls
10733 addi 9,2,x1@tprel
10734 addis 9,2,x2@tprel@ha
10735 addi 9,9,x2@tprel@l'
10736 tls_first_major=2
10737 tls_first_minor=14
2f3321ca 10738 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
10739 ;;
10740 powerpc64-*-*)
10741 conftest_s='
10742 .section ".tdata","awT",@progbits
10743 .align 3
10744ld0: .space 8
10745ld1: .space 8
10746x1: .space 8
10747x2: .space 8
10748x3: .space 8
10749 .text
10750 addi 3,2,ld0@got@tlsgd
10751 bl .__tls_get_addr
10752 nop
10753 addi 3,2,ld1@toc
10754 bl .__tls_get_addr
10755 nop
10756 addi 3,2,x1@got@tlsld
10757 bl .__tls_get_addr
10758 nop
10759 addi 9,3,x1@dtprel
10760 bl .__tls_get_addr
10761 nop
10762 addis 9,3,x2@dtprel@ha
10763 addi 9,9,x2@dtprel@l
10764 bl .__tls_get_addr
10765 nop
10766 ld 9,x3@got@dtprel(2)
10767 add 9,9,3
10768 bl .__tls_get_addr
10769 nop'
10770 tls_first_major=2
10771 tls_first_minor=14
2f3321ca 10772 tls_as_opt="-a64 --fatal-warnings"
c4501e62 10773 ;;
fd3cd001
UW
10774 s390-*-*)
10775 conftest_s='
10776 .section ".tdata","awT",@progbits
10777foo: .long 25
10778 .text
10779 .long foo@TLSGD
10780 .long foo@TLSLDM
10781 .long foo@DTPOFF
10782 .long foo@NTPOFF
10783 .long foo@GOTNTPOFF
10784 .long foo@INDNTPOFF
10785 l %r1,foo@GOTNTPOFF(%r12)
10786 l %r1,0(%r1):tls_load:foo
10787 bas %r14,0(%r1,%r13):tls_gdcall:foo
10788 bas %r14,0(%r1,%r13):tls_ldcall:foo'
10789 tls_first_major=2
10790 tls_first_minor=14
2f3321ca 10791 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
10792 ;;
10793 s390x-*-*)
10794 conftest_s='
10795 .section ".tdata","awT",@progbits
10796foo: .long 25
10797 .text
10798 .quad foo@TLSGD
10799 .quad foo@TLSLDM
10800 .quad foo@DTPOFF
10801 .quad foo@NTPOFF
10802 .quad foo@GOTNTPOFF
10803 lg %r1,foo@GOTNTPOFF(%r12)
10804 larl %r1,foo@INDNTPOFF
10805 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
10806 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
10807 tls_first_major=2
10808 tls_first_minor=14
2f3321ca 10809 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 10810 ;;
9ff13962
KK
10811 sh-*-* | sh[34]-*-*)
10812 conftest_s='
10813 .section ".tdata","awT",@progbits
10814foo: .long 25
10815 .text
10816 .long foo@TLSGD
10817 .long foo@TLSLDM
10818 .long foo@DTPOFF
10819 .long foo@GOTTPOFF
10820 .long foo@TPOFF'
10821 tls_first_major=2
10822 tls_first_minor=13
2f3321ca 10823 tls_as_opt=--fatal-warnings
9ff13962 10824 ;;
5751a10b 10825 sparc*-*-*)
2f3321ca
EB
10826 case "$target" in
10827 sparc*-sun-solaris2.*)
10828 on_solaris=yes
10829 ;;
10830 *)
10831 on_solaris=no
10832 ;;
10833 esac
10834 if test x$on_solaris = xyes && test x$gas_flag = xno; then
10835 conftest_s='
10836 .section ".tdata",#alloc,#write,#tls
10837foo: .long 25
10838 .text
10839 sethi %tgd_hi22(foo), %o0
10840 add %o0, %tgd_lo10(foo), %o1
10841 add %l7, %o1, %o0, %tgd_add(foo)
10842 call __tls_get_addr, %tgd_call(foo)
10843 sethi %tldm_hi22(foo), %l1
10844 add %l1, %tldm_lo10(foo), %l2
10845 add %l7, %l2, %o0, %tldm_add(foo)
10846 call __tls_get_addr, %tldm_call(foo)
10847 sethi %tldo_hix22(foo), %l3
10848 xor %l3, %tldo_lox10(foo), %l4
10849 add %o0, %l4, %l5, %tldo_add(foo)
10850 sethi %tie_hi22(foo), %o3
10851 add %o3, %tie_lo10(foo), %o3
10852 ld [%l7 + %o3], %o2, %tie_ld(foo)
10853 add %g7, %o2, %o4, %tie_add(foo)
10854 sethi %tle_hix22(foo), %l1
10855 xor %l1, %tle_lox10(foo), %o5
10856 ld [%g7 + %o5], %o1'
10857 tls_first_major=0
10858 tls_first_minor=0
10859 else
10860 conftest_s='
5751a10b
JJ
10861 .section ".tdata","awT",@progbits
10862foo: .long 25
10863 .text
10864 sethi %tgd_hi22(foo), %o0
10865 add %o0, %tgd_lo10(foo), %o1
10866 add %l7, %o1, %o0, %tgd_add(foo)
10867 call __tls_get_addr, %tgd_call(foo)
10868 sethi %tldm_hi22(foo), %l1
10869 add %l1, %tldm_lo10(foo), %l2
10870 add %l7, %l2, %o0, %tldm_add(foo)
10871 call __tls_get_addr, %tldm_call(foo)
10872 sethi %tldo_hix22(foo), %l3
10873 xor %l3, %tldo_lox10(foo), %l4
10874 add %o0, %l4, %l5, %tldo_add(foo)
10875 sethi %tie_hi22(foo), %o3
10876 add %o3, %tie_lo10(foo), %o3
10877 ld [%l7 + %o3], %o2, %tie_ld(foo)
10878 add %g7, %o2, %o4, %tie_add(foo)
10879 sethi %tle_hix22(foo), %l1
10880 xor %l1, %tle_lox10(foo), %o5
10881 ld [%g7 + %o5], %o1'
10882 tls_first_major=2
10883 tls_first_minor=14
2f3321ca
EB
10884 tls_as_opt="-32 --fatal-warnings"
10885 fi
5751a10b 10886 ;;
f996902d
RH
10887esac
10888if test -z "$tls_first_major"; then
8ada417f
ZW
10889 : # If we don't have a check, assume no support.
10890else
ba479fd2
NN
10891 echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
10892echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
10893if test "${gcc_cv_as_tls+set}" = set; then
10894 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
10895else
10896 gcc_cv_as_tls=no
10897 if test $in_tree_gas = yes; then
10898 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
10899 then gcc_cv_as_tls=yes
ad9c4d9f 10900fi
8ada417f 10901 elif test x$gcc_cv_as != x; then
6e3f3080 10902 echo "$conftest_s" > conftest.s
2f3321ca 10903 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
10904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10905 (eval $ac_try) 2>&5
10906 ac_status=$?
10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); }; }
8ada417f
ZW
10909 then
10910 gcc_cv_as_tls=yes
10911 else
10912 echo "configure: failed program was" >&5
10913 cat conftest.s >&5
10914 fi
10915 rm -f conftest.o conftest.s
f996902d 10916 fi
f996902d 10917fi
ba479fd2
NN
10918echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
10919echo "${ECHO_T}$gcc_cv_as_tls" >&6
63cf211a 10920if test $gcc_cv_as_tls = yes; then
ba479fd2
NN
10921
10922cat >>confdefs.h <<\_ACEOF
f996902d 10923#define HAVE_AS_TLS 1
ba479fd2 10924_ACEOF
f996902d
RH
10925
10926fi
8ada417f
ZW
10927fi
10928
10929# Target-specific assembler checks.
f996902d 10930
3a37b08e
RH
10931case "$target" in
10932 # All TARGET_ABI_OSF targets.
10933 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ba479fd2
NN
10934 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
10935echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
10936if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 10938else
8ada417f
ZW
10939 gcc_cv_as_alpha_explicit_relocs=no
10940 if test $in_tree_gas = yes; then
10941 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
10942 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 10943fi
8ada417f 10944 elif test x$gcc_cv_as != x; then
6e3f3080 10945 echo ' .set nomacro
3a37b08e
RH
10946 .text
10947 extbl $3, $2, $3 !lituse_bytoff!1
10948 ldq $2, a($29) !literal!1
10949 ldq $4, b($29) !literal!2
10950 ldq_u $3, 0($2) !lituse_base!1
10951 ldq $27, f($29) !literal!5
10952 jsr $26, ($27), f !lituse_jsr!5
10953 ldah $29, 0($26) !gpdisp!3
10954 lda $0, c($29) !gprel
10955 ldah $1, d($29) !gprelhigh
10956 lda $1, d($1) !gprellow
8ada417f 10957 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
10958 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
10959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10960 (eval $ac_try) 2>&5
10961 ac_status=$?
10962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 (exit $ac_status); }; }
8ada417f
ZW
10964 then
10965 gcc_cv_as_alpha_explicit_relocs=yes
10966 else
10967 echo "configure: failed program was" >&5
10968 cat conftest.s >&5
10969 fi
10970 rm -f conftest.o conftest.s
10971 fi
cafe096b 10972fi
ba479fd2
NN
10973echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
10974echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
63cf211a 10975if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
10976
10977cat >>confdefs.h <<\_ACEOF
3a37b08e 10978#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 10979_ACEOF
3a37b08e 10980
86da66b5
HPN
10981fi
10982 ;;
10983
10984 cris-*-*)
10985 echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
10986echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
10987if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
10988 echo $ECHO_N "(cached) $ECHO_C" >&6
10989else
10990 gcc_cv_as_cris_no_mul_bug=no
10991 if test $in_tree_gas = yes; then
10992 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
10993 then gcc_cv_as_cris_no_mul_bug=yes
10994fi
10995 elif test x$gcc_cv_as != x; then
10996 echo '.text' > conftest.s
10997 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
10998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10999 (eval $ac_try) 2>&5
11000 ac_status=$?
11001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11002 (exit $ac_status); }; }
11003 then
11004 gcc_cv_as_cris_no_mul_bug=yes
11005 else
11006 echo "configure: failed program was" >&5
11007 cat conftest.s >&5
11008 fi
11009 rm -f conftest.o conftest.s
11010 fi
11011fi
11012echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
11013echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
11014if test $gcc_cv_as_cris_no_mul_bug = yes; then
11015
11016cat >>confdefs.h <<\_ACEOF
11017#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
11018_ACEOF
11019
8ada417f 11020fi
3a37b08e 11021 ;;
8ada417f 11022
1cb36a98 11023 sparc*-*-*)
ba479fd2
NN
11024 echo "$as_me:$LINENO: checking assembler for .register" >&5
11025echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
11026if test "${gcc_cv_as_sparc_register_op+set}" = set; then
11027 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 11028else
8ada417f
ZW
11029 gcc_cv_as_sparc_register_op=no
11030 if test x$gcc_cv_as != x; then
6e3f3080 11031 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
11032 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11034 (eval $ac_try) 2>&5
11035 ac_status=$?
11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); }; }
8ada417f
ZW
11038 then
11039 gcc_cv_as_sparc_register_op=yes
11040 else
11041 echo "configure: failed program was" >&5
11042 cat conftest.s >&5
11043 fi
11044 rm -f conftest.o conftest.s
11045 fi
cafe096b 11046fi
ba479fd2
NN
11047echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
11048echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
63cf211a 11049if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
11050
11051cat >>confdefs.h <<\_ACEOF
1cb36a98 11052#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 11053_ACEOF
1cb36a98 11054
8ada417f 11055fi
1cb36a98 11056
ba479fd2
NN
11057 echo "$as_me:$LINENO: checking assembler for -relax option" >&5
11058echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
11059if test "${gcc_cv_as_sparc_relax+set}" = set; then
11060 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 11061else
8ada417f
ZW
11062 gcc_cv_as_sparc_relax=no
11063 if test x$gcc_cv_as != x; then
6e3f3080 11064 echo '.text' > conftest.s
ba479fd2
NN
11065 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
11066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5
11068 ac_status=$?
11069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11070 (exit $ac_status); }; }
8ada417f
ZW
11071 then
11072 gcc_cv_as_sparc_relax=yes
11073 else
11074 echo "configure: failed program was" >&5
11075 cat conftest.s >&5
11076 fi
11077 rm -f conftest.o conftest.s
11078 fi
cafe096b 11079fi
ba479fd2
NN
11080echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
11081echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
63cf211a 11082if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
11083
11084cat >>confdefs.h <<\_ACEOF
e95b1e6a 11085#define HAVE_AS_RELAX_OPTION 1
ba479fd2 11086_ACEOF
e95b1e6a 11087
8ada417f 11088fi
e95b1e6a 11089
ba479fd2
NN
11090 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
11091echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
11092if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
11093 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 11094else
8ada417f
ZW
11095 gcc_cv_as_sparc_ua_pcrel=no
11096 if test x$gcc_cv_as != x; then
6e3f3080 11097 echo '.text
8ada417f
ZW
11098foo:
11099 nop
11100.data
11101.align 4
11102.byte 0
11103.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
11104 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
11105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11106 (eval $ac_try) 2>&5
11107 ac_status=$?
11108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11109 (exit $ac_status); }; }
8ada417f
ZW
11110 then
11111 if test x$gcc_cv_ld != x \
11112 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
11113 gcc_cv_as_sparc_ua_pcrel=yes
11114 fi
11115 rm -f conftest
11116 else
11117 echo "configure: failed program was" >&5
11118 cat conftest.s >&5
11119 fi
11120 rm -f conftest.o conftest.s
11121 fi
cafe096b 11122fi
ba479fd2
NN
11123echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
11124echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
63cf211a 11125if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
11126
11127cat >>confdefs.h <<\_ACEOF
17e9e88c 11128#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 11129_ACEOF
17e9e88c 11130
17e9e88c 11131
ba479fd2
NN
11132 echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
11133echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
11134if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
11135 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 11136else
8ada417f
ZW
11137 gcc_cv_as_sparc_ua_pcrel_hidden=no
11138 if test x$gcc_cv_as != x; then
6e3f3080 11139 echo '.data
8ada417f
ZW
11140.align 4
11141.byte 0x31
11142.uaword %r_disp32(foo)
11143.byte 0x32, 0x33, 0x34
11144.global foo
11145.hidden foo
11146foo:
11147.skip 4' > conftest.s
ba479fd2
NN
11148 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
11149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11150 (eval $ac_try) 2>&5
11151 ac_status=$?
11152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11153 (exit $ac_status); }; }
8ada417f
ZW
11154 then
11155 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
11156 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
11157 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
11158 | grep ' 31000000 07323334' > /dev/null 2>&1; then
11159 if $gcc_cv_objdump -R conftest 2> /dev/null \
11160 | grep 'DISP32' > /dev/null 2>&1; then
11161 :
11162 else
11163 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 11164 fi
8ada417f
ZW
11165 fi
11166 rm -f conftest
11167 else
11168 echo "configure: failed program was" >&5
11169 cat conftest.s >&5
11170 fi
11171 rm -f conftest.o conftest.s
11172 fi
cafe096b 11173fi
ba479fd2
NN
11174echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
11175echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
63cf211a 11176if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
11177
11178cat >>confdefs.h <<\_ACEOF
cf7b8b0d 11179#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 11180_ACEOF
cf7b8b0d 11181
8ada417f 11182fi
ba479fd2 11183
8ada417f 11184fi # unaligned pcrel relocs
cf7b8b0d 11185
ba479fd2
NN
11186 echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
11187echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
11188if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
11189 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 11190else
8ada417f
ZW
11191 gcc_cv_as_sparc_offsetable_lo10=no
11192 if test x$gcc_cv_as != x; then
6e3f3080 11193 echo '.text
8ada417f
ZW
11194 or %g1, %lo(ab) + 12, %g1
11195 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
11196 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
11197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11198 (eval $ac_try) 2>&5
11199 ac_status=$?
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); }; }
8ada417f
ZW
11202 then
11203 if test x$gcc_cv_objdump != x \
11204 && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
11205 | grep ' 82106000 82106000' > /dev/null 2>&1; then
11206 gcc_cv_as_offsetable_lo10=yes
11207 fi
11208 else
11209 echo "configure: failed program was" >&5
11210 cat conftest.s >&5
11211 fi
11212 rm -f conftest.o conftest.s
11213 fi
cafe096b 11214fi
ba479fd2
NN
11215echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
11216echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
63cf211a 11217if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
11218
11219cat >>confdefs.h <<\_ACEOF
1cb36a98 11220#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 11221_ACEOF
1cb36a98 11222
8ada417f 11223fi
1cb36a98
RH
11224 ;;
11225
c307e6dd 11226 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
11227 case $target_os in
11228 cygwin* | pe | mingw32*)
11229 # Used for DWARF 2 in PE
11230 echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
11231echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
11232if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
11233 echo $ECHO_N "(cached) $ECHO_C" >&6
11234else
11235 gcc_cv_as_ix86_pe_secrel32=no
11236 if test $in_tree_gas = yes; then
11237 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
11238 then gcc_cv_as_ix86_pe_secrel32=yes
11239fi
11240 elif test x$gcc_cv_as != x; then
11241 echo '.text
11242foo: nop
11243.data
11244 .secrel32 foo' > conftest.s
11245 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11247 (eval $ac_try) 2>&5
11248 ac_status=$?
11249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11250 (exit $ac_status); }; }
11251 then
11252 if test x$gcc_cv_ld != x \
11253 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
11254 gcc_cv_as_ix86_pe_secrel32=yes
11255 fi
11256 rm -f conftest
11257 else
11258 echo "configure: failed program was" >&5
11259 cat conftest.s >&5
11260 fi
11261 rm -f conftest.o conftest.s
11262 fi
11263fi
11264echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
11265echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
11266if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
11267
11268cat >>confdefs.h <<\_ACEOF
11269#define HAVE_GAS_PE_SECREL32_RELOC 1
11270_ACEOF
11271
11272fi
11273 ;;
11274 esac
11275
ba479fd2
NN
11276 echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
11277echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
11278if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
11279 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11280else
11281 gcc_cv_as_ix86_filds_fists=no
11282 if test $in_tree_gas = yes; then
11283 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
11284 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 11285fi
8ada417f 11286 elif test x$gcc_cv_as != x; then
6e3f3080 11287 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
11288 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11290 (eval $ac_try) 2>&5
11291 ac_status=$?
11292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293 (exit $ac_status); }; }
8ada417f
ZW
11294 then
11295 gcc_cv_as_ix86_filds_fists=yes
11296 else
11297 echo "configure: failed program was" >&5
11298 cat conftest.s >&5
981d4858 11299 fi
8ada417f
ZW
11300 rm -f conftest.o conftest.s
11301 fi
11302fi
ba479fd2
NN
11303echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
11304echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
63cf211a 11305if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
11306
11307cat >>confdefs.h <<\_ACEOF
8ada417f 11308#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 11309_ACEOF
ad9c4d9f 11310
f6f5dff2
RO
11311fi
11312
ba479fd2
NN
11313 echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
11314echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
11315if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
11316 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
11317else
11318 gcc_cv_as_ix86_cmov_sun_syntax=no
11319 if test x$gcc_cv_as != x; then
6e3f3080 11320 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
11321 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11323 (eval $ac_try) 2>&5
11324 ac_status=$?
11325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11326 (exit $ac_status); }; }
f6f5dff2
RO
11327 then
11328 gcc_cv_as_ix86_cmov_sun_syntax=yes
11329 else
11330 echo "configure: failed program was" >&5
11331 cat conftest.s >&5
11332 fi
11333 rm -f conftest.o conftest.s
11334 fi
11335fi
ba479fd2
NN
11336echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
11337echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
63cf211a 11338if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
11339
11340cat >>confdefs.h <<\_ACEOF
f6f5dff2 11341#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 11342_ACEOF
f6f5dff2 11343
ad9c4d9f
NN
11344fi
11345
6f3ca281
ZW
11346 # This one is used unconditionally by i386.[ch]; it is to be defined
11347 # to 1 if the feature is present, 0 otherwise.
ba479fd2
NN
11348 echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
11349echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
11350if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
11351 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11352else
11353 gcc_cv_as_ix86_gotoff_in_data=no
11354 if test $in_tree_gas = yes; then
11355 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11356 then gcc_cv_as_ix86_gotoff_in_data=yes
11357fi
11358 elif test x$gcc_cv_as != x; then
6e3f3080 11359 echo ' .text
f88c65f7
RH
11360.L0:
11361 nop
11362 .data
8ada417f 11363 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
11364 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11366 (eval $ac_try) 2>&5
11367 ac_status=$?
11368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11369 (exit $ac_status); }; }
8ada417f
ZW
11370 then
11371 gcc_cv_as_ix86_gotoff_in_data=yes
11372 else
11373 echo "configure: failed program was" >&5
11374 cat conftest.s >&5
f88c65f7 11375 fi
8ada417f
ZW
11376 rm -f conftest.o conftest.s
11377 fi
11378fi
ba479fd2
NN
11379echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
11380echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
8ada417f 11381
6f3ca281 11382
ba479fd2 11383cat >>confdefs.h <<_ACEOF
6f3ca281 11384#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 11385_ACEOF
f88c65f7 11386
1cb36a98 11387 ;;
ef1ecf87
RH
11388
11389 ia64*-*-*)
ba479fd2
NN
11390 echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
11391echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
11392if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
11393 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 11394else
8ada417f
ZW
11395 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
11396 if test $in_tree_gas = yes; then
11397 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11398 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 11399fi
8ada417f 11400 elif test x$gcc_cv_as != x; then
6e3f3080 11401 echo ' .text
ef1ecf87
RH
11402 addl r15 = @ltoffx(x#), gp
11403 ;;
cfa9ee99 11404 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
11405 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407 (eval $ac_try) 2>&5
11408 ac_status=$?
11409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410 (exit $ac_status); }; }
8ada417f 11411 then
cfa9ee99 11412 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
11413 else
11414 echo "configure: failed program was" >&5
11415 cat conftest.s >&5
2c4a9cff 11416 fi
8ada417f
ZW
11417 rm -f conftest.o conftest.s
11418 fi
11419fi
ba479fd2
NN
11420echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
11421echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
63cf211a 11422if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
11423
11424cat >>confdefs.h <<\_ACEOF
cfa9ee99 11425#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 11426_ACEOF
8ada417f 11427
cfa9ee99 11428fi
8ada417f 11429
2c4a9cff 11430 ;;
8ada417f 11431
2c4a9cff 11432 powerpc*-*-*)
8ada417f 11433 case $target in
6b37db3c
DE
11434 *-*-aix*) conftest_s=' .csect .text[PR]
11435 mfcr 3,128';;
11436 *-*-darwin*) conftest_s=' .text
11437 mfcr r3,128';;
11438 *) conftest_s=' .text
11439 mfcr 3,128';;
8ada417f 11440 esac
8ada417f 11441
ba479fd2
NN
11442 echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
11443echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
11444if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
11445 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 11446else
8ada417f
ZW
11447 gcc_cv_as_powerpc_mfcrf=no
11448 if test $in_tree_gas = yes; then
11449 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11450 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 11451fi
8ada417f 11452 elif test x$gcc_cv_as != x; then
6e3f3080 11453 echo "$conftest_s" > conftest.s
ba479fd2
NN
11454 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11456 (eval $ac_try) 2>&5
11457 ac_status=$?
11458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11459 (exit $ac_status); }; }
8ada417f
ZW
11460 then
11461 gcc_cv_as_powerpc_mfcrf=yes
11462 else
11463 echo "configure: failed program was" >&5
11464 cat conftest.s >&5
11465 fi
11466 rm -f conftest.o conftest.s
11467 fi
2c4a9cff 11468fi
ba479fd2
NN
11469echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
11470echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
63cf211a 11471if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
11472
11473cat >>confdefs.h <<\_ACEOF
2c4a9cff 11474#define HAVE_AS_MFCRF 1
ba479fd2 11475_ACEOF
ef1ecf87 11476
8ada417f
ZW
11477fi
11478 ;;
11479
11480 mips*-*-*)
ba479fd2
NN
11481 echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
11482echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
11483if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
11484 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11485else
11486 gcc_cv_as_mips_explicit_relocs=no
11487 if test $in_tree_gas = yes; then
11488 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
11489 then gcc_cv_as_mips_explicit_relocs=yes
11490fi
11491 elif test x$gcc_cv_as != x; then
6e3f3080 11492 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
11493 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11495 (eval $ac_try) 2>&5
11496 ac_status=$?
11497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); }; }
8ada417f
ZW
11499 then
11500 gcc_cv_as_mips_explicit_relocs=yes
11501 else
11502 echo "configure: failed program was" >&5
11503 cat conftest.s >&5
ef1ecf87 11504 fi
8ada417f
ZW
11505 rm -f conftest.o conftest.s
11506 fi
11507fi
ba479fd2
NN
11508echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
11509echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
8ada417f
ZW
11510if test $gcc_cv_as_mips_explicit_relocs = yes; then
11511 if test x$target_cpu_default = x
11512 then target_cpu_default=MASK_EXPLICIT_RELOCS
11513 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
11514 fi
11515fi
11516
ef1ecf87 11517 ;;
1cb36a98 11518esac
9d147085
RH
11519# ??? Not all targets support dwarf2 debug_line, even within a version
11520# of gas. Moreover, we need to emit a valid instruction to trigger any
11521# info to the output file. So, as supported targets are added to gas 2.11,
11522# add some instruction here to (also) show we expect this might work.
11523# ??? Once 2.11 is released, probably need to add first known working
11524# version to the per-target configury.
11525case "$target" in
80486e06 11526 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 11527 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
d116bdf8 11528 | xstormy16*-*-* | cris-*-* | xtensa-*-*)
9d147085
RH
11529 insn="nop"
11530 ;;
57116d8d 11531 ia64*-*-* | s390*-*-*)
9d147085
RH
11532 insn="nop 0"
11533 ;;
2853bc5a
HPN
11534 mmix-*-*)
11535 insn="swym 0"
11536 ;;
8ada417f
ZW
11537esac
11538if test x"$insn" != x; then
11539 conftest_s="\
11540 .file 1 \"conftest.s\"
11541 .loc 1 3 0
11542 $insn"
ba479fd2
NN
11543 echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
11544echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
11545if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
11546 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11547else
11548 gcc_cv_as_dwarf2_debug_line=no
11549 if test $in_tree_gas = yes; then
11550 if test $in_tree_gas_is_elf = yes \
11551 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11552 then gcc_cv_as_dwarf2_debug_line=yes
11553fi
11554 elif test x$gcc_cv_as != x; then
6e3f3080 11555 echo "$conftest_s" > conftest.s
ba479fd2
NN
11556 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11558 (eval $ac_try) 2>&5
11559 ac_status=$?
11560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561 (exit $ac_status); }; }
8ada417f
ZW
11562 then
11563 # ??? This fails with non-gnu grep. Maybe use objdump?
11564 if grep debug_line conftest.o > /dev/null 2>&1; then
11565 gcc_cv_as_dwarf2_debug_line=yes
11566 fi
11567 else
11568 echo "configure: failed program was" >&5
11569 cat conftest.s >&5
11570 fi
11571 rm -f conftest.o conftest.s
11572 fi
11573fi
ba479fd2
NN
11574echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
11575echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
ad9c4d9f 11576
ad9c4d9f 11577
8ada417f
ZW
11578# The .debug_line file table must be in the exact order that
11579# we specified the files, since these indices are also used
11580# by DW_AT_decl_file. Approximate this test by testing if
11581# the assembler bitches if the same index is assigned twice.
ba479fd2
NN
11582 echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
11583echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
11584if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
11585 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11586else
11587 gcc_cv_as_dwarf2_file_buggy=no
11588 if test x$gcc_cv_as != x; then
6e3f3080 11589 echo ' .file 1 "foo.s"
8ada417f 11590 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
11591 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
11592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11593 (eval $ac_try) 2>&5
11594 ac_status=$?
11595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596 (exit $ac_status); }; }
8ada417f
ZW
11597 then
11598 gcc_cv_as_dwarf2_file_buggy=yes
11599 else
11600 echo "configure: failed program was" >&5
11601 cat conftest.s >&5
11602 fi
11603 rm -f conftest.o conftest.s
11604 fi
ad9c4d9f 11605fi
ba479fd2
NN
11606echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
11607echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
8ada417f
ZW
11608
11609
11610 if test $gcc_cv_as_dwarf2_debug_line = yes \
11611 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
11612
11613cat >>confdefs.h <<\_ACEOF
9d147085 11614#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 11615_ACEOF
9d147085 11616
8ada417f 11617 fi
ad9c4d9f 11618
ba479fd2
NN
11619 echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
11620echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
11621if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
11622 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11623else
11624 gcc_cv_as_gdwarf2_flag=no
11625 if test $in_tree_gas = yes; then
11626 if test $in_tree_gas_is_elf = yes \
11627 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11628 then gcc_cv_as_gdwarf2_flag=yes
11629fi
11630 elif test x$gcc_cv_as != x; then
6e3f3080 11631 echo "$insn" > conftest.s
ba479fd2
NN
11632 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
11633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11634 (eval $ac_try) 2>&5
11635 ac_status=$?
11636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11637 (exit $ac_status); }; }
8ada417f
ZW
11638 then
11639 gcc_cv_as_gdwarf2_flag=yes
11640 else
11641 echo "configure: failed program was" >&5
11642 cat conftest.s >&5
11643 fi
11644 rm -f conftest.o conftest.s
11645 fi
ad9c4d9f 11646fi
ba479fd2
NN
11647echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
11648echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
63cf211a 11649if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
11650
11651cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11652#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 11653_ACEOF
5f0e9ea2
GK
11654
11655fi
ad9c4d9f 11656
ba479fd2
NN
11657 echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
11658echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
11659if test "${gcc_cv_as_gstabs_flag+set}" = set; then
11660 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
11661else
11662 gcc_cv_as_gstabs_flag=no
11663 if test $in_tree_gas = yes; then
11664 if test $in_tree_gas_is_elf = yes \
11665 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
11666 then gcc_cv_as_gstabs_flag=yes
11667fi
11668 elif test x$gcc_cv_as != x; then
6e3f3080 11669 echo "$insn" > conftest.s
ba479fd2
NN
11670 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
11671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11672 (eval $ac_try) 2>&5
11673 ac_status=$?
11674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675 (exit $ac_status); }; }
8ada417f
ZW
11676 then
11677 # The native Solaris 9/Intel assembler doesn't understand --gstabs
11678 # and warns about it, but still exits successfully. So check for
11679 # this.
ba479fd2
NN
11680 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
11681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11682 (eval $ac_try) 2>&5
11683 ac_status=$?
11684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11685 (exit $ac_status); }; }
8ada417f
ZW
11686 then :
11687 else gcc_cv_as_gstabs_flag=yes
11688 fi
11689 else
11690 echo "configure: failed program was" >&5
11691 cat conftest.s >&5
11692 fi
11693 rm -f conftest.o conftest.s
11694 fi
ad9c4d9f 11695fi
ba479fd2
NN
11696echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
11697echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
63cf211a 11698if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
11699
11700cat >>confdefs.h <<\_ACEOF
5f0e9ea2 11701#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 11702_ACEOF
5f0e9ea2
GK
11703
11704fi
8ada417f 11705fi
5f0e9ea2 11706
ba479fd2
NN
11707echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
11708echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
96d0f4dc 11709gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 11710if test $in_tree_ld = yes ; then
5408ac6c
HPN
11711 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 \
11712 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
11713 gcc_cv_ld_ro_rw_mix=read-write
11714 fi
11715elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
11716 echo '.section myfoosect, "a"' > conftest1.s
11717 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 11718 echo '.byte 1' >> conftest2.s
90e145da 11719 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 11720 echo '.byte 0' >> conftest3.s
6cd656d0
KC
11721 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
11722 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
11723 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 11724 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 11725 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 11726 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 11727 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
11728 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
11729 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
11730 gcc_cv_ld_ro_rw_mix=read-only
11731 else
11732 gcc_cv_ld_ro_rw_mix=read-write
11733 fi
11734 fi
11735 fi
11736 rm -f conftest.* conftest[123].*
11737fi
11738if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
11739
11740cat >>confdefs.h <<\_ACEOF
96d0f4dc 11741#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 11742_ACEOF
96d0f4dc
JJ
11743
11744fi
ba479fd2
NN
11745echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
11746echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
96d0f4dc 11747
ba479fd2
NN
11748echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
11749echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
275b60d6 11750gcc_cv_ld_eh_frame_hdr=no
34a86c2b 11751if test $in_tree_ld = yes ; then
5408ac6c
HPN
11752 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 \
11753 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
11754 gcc_cv_ld_eh_frame_hdr=yes
11755 fi
11756elif test x$gcc_cv_ld != x; then
11757 # Check if linker supports --eh-frame-hdr option
11758 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
11759 gcc_cv_ld_eh_frame_hdr=yes
11760 fi
11761fi
11762if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
11763
11764cat >>confdefs.h <<\_ACEOF
275b60d6 11765#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 11766_ACEOF
275b60d6
JJ
11767
11768fi
ba479fd2
NN
11769echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
11770echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
275b60d6 11771
ba479fd2
NN
11772echo "$as_me:$LINENO: checking linker position independent executable support" >&5
11773echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
24a4dd31
JJ
11774gcc_cv_ld_pie=no
11775if test $in_tree_ld = yes ; then
5408ac6c
HPN
11776 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 \
11777 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
11778 gcc_cv_ld_pie=yes
11779 fi
11780elif test x$gcc_cv_ld != x; then
11781 # Check if linker supports -pie option
11782 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
11783 gcc_cv_ld_pie=yes
11784 fi
11785fi
11786if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
11787
11788cat >>confdefs.h <<\_ACEOF
24a4dd31 11789#define HAVE_LD_PIE 1
ba479fd2 11790_ACEOF
24a4dd31
JJ
11791
11792fi
ba479fd2
NN
11793echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
11794echo "${ECHO_T}$gcc_cv_ld_pie" >&6
24a4dd31 11795
8bb915b6
NN
11796# --------
11797# UNSORTED
11798# --------
11799
765f1bf9
AM
11800echo "$as_me:$LINENO: checking linker --as-needed support" >&5
11801echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
82e923f6
RS
11802if test "${gcc_cv_ld_as_needed+set}" = set; then
11803 echo $ECHO_N "(cached) $ECHO_C" >&6
11804else
11805 gcc_cv_ld_as_needed=no
765f1bf9
AM
11806if test $in_tree_ld = yes ; then
11807 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
11808 && test $in_tree_ld_is_elf = yes; then
11809 gcc_cv_ld_as_needed=yes
11810 fi
11811elif test x$gcc_cv_ld != x; then
11812 # Check if linker supports --as-needed and --no-as-needed options
11813 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
11814 gcc_cv_ld_as_needed=yes
11815 fi
11816fi
82e923f6
RS
11817
11818fi
11819echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
11820echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
765f1bf9
AM
11821if test x"$gcc_cv_ld_as_needed" = xyes; then
11822
11823cat >>confdefs.h <<\_ACEOF
11824#define HAVE_LD_AS_NEEDED 1
11825_ACEOF
11826
11827fi
765f1bf9 11828
9fb28a67 11829if test x$with_sysroot = x && test x$host = x$target \
047d636f 11830 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
ba479fd2
NN
11831
11832cat >>confdefs.h <<_ACEOF
793e9558 11833#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 11834_ACEOF
793e9558
PB
11835
11836fi
11837
81bf3d9e 11838# Find out what GC implementation we want, or may, use.
ba479fd2 11839
81bf3d9e
RH
11840# Check whether --with-gc or --without-gc was given.
11841if test "${with_gc+set}" = set; then
11842 withval="$with_gc"
11843 case "$withval" in
59415997 11844 page | zone)
81bf3d9e
RH
11845 GGC=ggc-$withval
11846 ;;
11847 *)
ba479fd2
NN
11848 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
11849echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
11850 { (exit 1); exit 1; }; }
81bf3d9e
RH
11851 ;;
11852esac
11853else
005537df 11854 GGC=ggc-page
ba479fd2 11855fi;
81bf3d9e
RH
11856
11857echo "Using $GGC for garbage collection."
11858
3c809ba4 11859# Use the system's zlib library.
b8dad04b
ZW
11860zlibdir=-L../zlib
11861zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 11862
3c809ba4
AG
11863# Check whether --with-system-zlib or --without-system-zlib was given.
11864if test "${with_system_zlib+set}" = set; then
11865 withval="$with_system_zlib"
11866 zlibdir=
11867zlibinc=
11868
ba479fd2 11869fi;
3c809ba4
AG
11870
11871
11872
dc6746e7 11873
ba479fd2
NN
11874echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
11875echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
dc6746e7
PT
11876 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
11877if test "${enable_maintainer_mode+set}" = set; then
11878 enableval="$enable_maintainer_mode"
11879 maintainer_mode=$enableval
11880else
11881 maintainer_mode=no
ba479fd2 11882fi;
63cf211a 11883
ba479fd2
NN
11884echo "$as_me:$LINENO: result: $maintainer_mode" >&5
11885echo "${ECHO_T}$maintainer_mode" >&6
dc6746e7
PT
11886
11887if test "$maintainer_mode" = "yes"; then
11888 MAINT=''
11889else
11890 MAINT='#'
11891fi
11892
6de9cd9a
DN
11893echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5
11894echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6
11895
11896# Check whether --with-libbanshee or --without-libbanshee was given.
11897if test "${with_libbanshee+set}" = set; then
11898 withval="$with_libbanshee"
11899 libbanshee="$with_libbanshee"
11900else
11901 libbanshee=no
11902fi;
11903
11904if test x"$libbanshee" = xyes; then
11905 BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a "
11906 BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to"
11907 ANDER="tree-alias-ander.o"
11908
11909cat >>confdefs.h <<\_ACEOF
11910#define HAVE_BANSHEE 1
11911_ACEOF
11912
11913else
11914 BANSHEELIB=""
11915 BANSHEEINC=""
11916 ANDER=""
11917fi
11918echo "$as_me:$LINENO: result: $with_libbanshee" >&5
11919echo "${ECHO_T}$with_libbanshee" >&6
11920
11921
11922
11923
11924
8bb915b6
NN
11925# --------------
11926# Language hooks
11927# --------------
11928
861bb6c1
JL
11929# Make empty files to contain the specs and options for each language.
11930# Then add #include lines to for a compiler that has specs and/or options.
11931
d7b42618 11932lang_opt_files=
861bb6c1 11933lang_specs_files=
3103b7db 11934lang_tree_files=
861bb6c1
JL
11935for subdir in . $subdirs
11936do
d7b42618
NB
11937 if test -f $srcdir/$subdir/lang.opt; then
11938 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
11939 fi
75bffa71 11940 if test -f $srcdir/$subdir/lang-specs.h; then
0d24f4d1 11941 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
861bb6c1 11942 fi
3103b7db 11943 if test -f $srcdir/$subdir/$subdir-tree.def; then
0d24f4d1 11944 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
3103b7db 11945 fi
861bb6c1
JL
11946done
11947
11948# These (without "all_") are set in each config-lang.in.
11949# `language' must be a single word so is spelled singularly.
11950all_languages=
11951all_boot_languages=
11952all_compilers=
11953all_stagestuff=
69f9a345 11954all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk'
861bb6c1 11955# List of language makefile fragments.
2ed26f6b
ZW
11956all_lang_makefrags=
11957# List of language subdirectory makefiles. Deprecated.
861bb6c1 11958all_lang_makefiles=
e2500fed 11959# Files for gengtype
ef69da62 11960all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
11961# Files for gengtype with language
11962all_gtfiles_files_langs=
11963all_gtfiles_files_files=
861bb6c1
JL
11964
11965# Add the language fragments.
11966# Languages are added via two mechanisms. Some information must be
11967# recorded in makefile variables, these are defined in config-lang.in.
11968# We accumulate them and plug them into the main Makefile.
11969# The other mechanism is a set of hooks for each of the main targets
11970# like `clean', `install', etc.
11971
861bb6c1 11972language_hooks="Make-hooks"
861bb6c1 11973
c406e779 11974for s in $subdirs
861bb6c1 11975do
861bb6c1
JL
11976 language=
11977 boot_language=
11978 compilers=
11979 stagestuff=
861bb6c1 11980 outputs=
e2500fed 11981 gtfiles=
861bb6c1 11982 . ${srcdir}/$s/config-lang.in
75bffa71 11983 if test "x$language" = x
861bb6c1
JL
11984 then
11985 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
11986 exit 1
11987 fi
2ed26f6b 11988 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
72aaffbd 11989 if test -f ${srcdir}/$s/Makefile.in
2ed26f6b 11990 then all_lang_makefiles="$s/Makefile"
72aaffbd 11991 fi
861bb6c1 11992 all_languages="$all_languages $language"
75bffa71 11993 if test "x$boot_language" = xyes
861bb6c1
JL
11994 then
11995 all_boot_languages="$all_boot_languages $language"
11996 fi
11997 all_compilers="$all_compilers $compilers"
11998 all_stagestuff="$all_stagestuff $stagestuff"
861bb6c1 11999 all_outputs="$all_outputs $outputs"
e2500fed 12000 all_gtfiles="$all_gtfiles $gtfiles"
c406e779 12001 for f in $gtfiles
8ac9d31f 12002 do
8ac9d31f
TJ
12003 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
12004 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f 12005 done
861bb6c1
JL
12006done
12007
8ac9d31f
TJ
12008# Pick up gtfiles for c
12009gtfiles=
12010s="c"
12011. ${srcdir}/c-config-lang.in
12012all_gtfiles="$all_gtfiles $gtfiles"
c406e779 12013for f in $gtfiles
8ac9d31f 12014do
8ac9d31f
TJ
12015 all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
12016 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
12017done
12018
cbc59f01 12019check_languages=
c406e779 12020for language in $all_languages
cbc59f01 12021do
cbc59f01 12022 check_languages="$check_languages check-$language"
cbc59f01
DD
12023done
12024
62b81e45
MM
12025# We link each language in with a set of hooks, reached indirectly via
12026# lang.${target}.
861bb6c1
JL
12027
12028rm -f Make-hooks
12029touch Make-hooks
65ebbf81 12030target_list="all.build all.cross start.encap rest.encap tags \
a207b594 12031 install-normal install-common install-man \
a541f69d 12032 uninstall info man srcextra srcman srcinfo \
a03ad584 12033 mostlyclean clean distclean maintainer-clean \
8f231b5d 12034 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
861bb6c1
JL
12035for t in $target_list
12036do
12037 x=
c406e779 12038 for lang in $all_languages
861bb6c1 12039 do
ab87f8c8 12040 x="$x $lang.$t"
861bb6c1
JL
12041 done
12042 echo "lang.$t: $x" >> Make-hooks
12043done
12044
8bb915b6
NN
12045# --------
12046# UNSORTED
12047# --------
12048
cc06d68c 12049# Create .gdbinit.
861bb6c1 12050
cc06d68c
GP
12051echo "dir ." > .gdbinit
12052echo "dir ${srcdir}" >> .gdbinit
12053if test x$gdb_needs_out_file_path = xyes
12054then
12055 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
12056fi
12057if test "x$subdirs" != x; then
12058 for s in $subdirs
12059 do
12060 echo "dir ${srcdir}/$s" >> .gdbinit
12061 done
861bb6c1 12062fi
cc06d68c 12063echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 12064
8f8d3278
NC
12065# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
12066# absolute path for gcc_tooldir based on inserting the number of up-directory
12067# movements required to get from $(exec_prefix) to $(prefix) into the basic
12068# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
12069# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
12070# make and thus we'd get different behavior depending on where we built the
12071# sources.
5949a9fc 12072if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 12073 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 12074else
8f8d3278
NC
12075# An explanation of the sed strings:
12076# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
12077# -e 's|/$||' match a trailing forward slash and eliminates it
12078# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 12079# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
12080#
12081# (*) Note this pattern overwrites the first character of the string
12082# with a forward slash if one is not already present. This is not a
12083# problem because the exact names of the sub-directories concerned is
12084# unimportant, just the number of them matters.
12085#
12086# The practical upshot of these patterns is like this:
12087#
12088# prefix exec_prefix result
12089# ------ ----------- ------
12090# /foo /foo/bar ../
12091# /foo/ /foo/bar ../
12092# /foo /foo/bar/ ../
12093# /foo/ /foo/bar/ ../
12094# /foo /foo/bar/ugg ../../
12095#
4c112cda 12096 dollar='$$'
caa55b1e 12097 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
12098fi
12099
12100
2ce3c6c6 12101
2bbea3a6
RH
12102# Find a directory in which to install a shared libgcc.
12103
12104# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
12105if test "${enable_version_specific_runtime_libs+set}" = set; then
12106 enableval="$enable_version_specific_runtime_libs"
ba479fd2
NN
12107
12108fi;
2bbea3a6
RH
12109
12110
5b15f277
RH
12111# Check whether --with-slibdir or --without-slibdir was given.
12112if test "${with_slibdir+set}" = set; then
12113 withval="$with_slibdir"
12114 slibdir="$with_slibdir"
12115else
12116 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 12117 slibdir='$(libsubdir)'
5b15f277 12118elif test "$host" != "$target"; then
2bbea3a6
RH
12119 slibdir='$(build_tooldir)/lib'
12120else
5b15f277 12121 slibdir='$(libdir)'
2bbea3a6 12122fi
ba479fd2 12123fi;
2bbea3a6
RH
12124
12125
1e6347d8 12126objdir=`${PWDCMD-pwd}`
7e717196
JL
12127
12128
861bb6c1
JL
12129# Substitute configuration variables
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
9b16d2c4 12176
e9a25f70 12177
6e26218f 12178
c8724862 12179
e061d1ce 12180
d8bb17c8 12181
11642c3a
ZW
12182
12183
12184
12185
12186
12187
12188
3d9d2476 12189
596151e1 12190
8ac9d31f
TJ
12191
12192
12193
e2500fed 12194
51b9ff45
KC
12195
12196
861bb6c1 12197
a541f69d
KC
12198# If it doesn't already exist, create document directory
12199echo "checking for the document directory." 1>&2
12200if test -d doc ; then
12201 true
12202else
12203 mkdir doc
12204fi
861bb6c1 12205
6e3f3080
NN
12206# Echo link setup.
12207if test x${build} = x${host} ; then
12208 if test x${host} = x${target} ; then
12209 echo "Links are now set up to build a native compiler for ${target}." 1>&2
12210 else
12211 echo "Links are now set up to build a cross-compiler" 1>&2
12212 echo " from ${host} to ${target}." 1>&2
12213 fi
12214else
12215 if test x${host} = x${target} ; then
12216 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
12217 echo " for ${target}." 1>&2
12218 else
12219 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
12220 echo " from ${host} to ${target}." 1>&2
12221 fi
12222fi
12223
6de9cd9a
DN
12224
12225
12226
6e3f3080
NN
12227# Configure the subdirectories
12228# AC_CONFIG_SUBDIRS($subdirs)
12229
12230# Create the Makefile
12231# and configure language subdirectories
ba479fd2 12232 ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
12233
12234
ba479fd2 12235 ac_config_commands="$ac_config_commands default"
914c5af7 12236
ba479fd2 12237cat >confcache <<\_ACEOF
6e3f3080
NN
12238# This file is a shell script that caches the results of configure
12239# tests run on this system so they can be shared between configure
ba479fd2
NN
12240# scripts and configure runs, see configure's option --config-cache.
12241# It is not useful on other systems. If it contains results you don't
12242# want to keep, you may remove or edit it.
6e3f3080 12243#
ba479fd2
NN
12244# config.status only pays attention to the cache file if you give it
12245# the --recheck option to rerun configure.
6e3f3080 12246#
ba479fd2
NN
12247# `ac_cv_env_foo' variables (set or unset) will be overridden when
12248# loading this file, other *unset* `ac_cv_foo' will be assigned the
12249# following values.
12250
12251_ACEOF
12252
6e3f3080
NN
12253# The following way of writing the cache mishandles newlines in values,
12254# but we know of no workaround that is simple, portable, and efficient.
12255# So, don't put newlines in cache variables' values.
12256# Ultrix sh set writes to stderr and can't be redirected directly,
12257# and sets the high bit in the cache file unless we assign to the vars.
ba479fd2
NN
12258{
12259 (set) 2>&1 |
12260 case `(ac_space=' '; set | grep ac_space) 2>&1` in
12261 *ac_space=\ *)
12262 # `set' does not quote correctly, so add quotes (double-quote
12263 # substitution turns \\\\ into \\, and sed turns \\ into \).
12264 sed -n \
86da66b5
HPN
12265 "s/'/'\\\\''/g;
12266 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ba479fd2
NN
12267 ;;
12268 *)
12269 # `set' quotes correctly as required by POSIX, so do not add quotes.
12270 sed -n \
86da66b5 12271 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
ba479fd2
NN
12272 ;;
12273 esac;
12274} |
12275 sed '
12276 t clear
12277 : clear
12278 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12279 t end
12280 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12281 : end' >>confcache
12282if diff $cache_file confcache >/dev/null 2>&1; then :; else
6e3f3080 12283 if test -w $cache_file; then
ba479fd2
NN
12284 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12285 cat confcache >$cache_file
6e3f3080
NN
12286 else
12287 echo "not updating unwritable cache $cache_file"
12288 fi
12289fi
12290rm -f confcache
12291
12292test "x$prefix" = xNONE && prefix=$ac_default_prefix
12293# Let make expand exec_prefix.
12294test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12295
ba479fd2
NN
12296# VPATH may cause trouble with some makes, so we remove $(srcdir),
12297# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12298# trailing colons and then remove the whole line if VPATH becomes empty
12299# (actually we leave an empty line to preserve line numbers).
6e3f3080 12300if test "x$srcdir" = x.; then
86da66b5 12301 ac_vpsub='/^[ ]*VPATH[ ]*=/{
ba479fd2
NN
12302s/:*\$(srcdir):*/:/;
12303s/:*\${srcdir}:*/:/;
12304s/:*@srcdir@:*/:/;
86da66b5 12305s/^\([^=]*=[ ]*\):*/\1/;
ba479fd2 12306s/:*$//;
86da66b5 12307s/^[^=]*=[ ]*$//;
ba479fd2 12308}'
6e3f3080
NN
12309fi
12310
63cf211a 12311DEFS=-DHAVE_CONFIG_H
6e3f3080 12312
ba479fd2
NN
12313ac_libobjs=
12314ac_ltlibobjs=
12315for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12316 # 1. Remove the extension, and $U if already installed.
12317 ac_i=`echo "$ac_i" |
86da66b5 12318 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
ba479fd2
NN
12319 # 2. Add them.
12320 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
12321 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
12322done
12323LIBOBJS=$ac_libobjs
63cf211a 12324
ba479fd2
NN
12325LTLIBOBJS=$ac_ltlibobjs
12326
12327
12328
12329: ${CONFIG_STATUS=./config.status}
12330ac_clean_files_save=$ac_clean_files
12331ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12332{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
12333echo "$as_me: creating $CONFIG_STATUS" >&6;}
12334cat >$CONFIG_STATUS <<_ACEOF
12335#! $SHELL
12336# Generated by $as_me.
6e3f3080
NN
12337# Run this file to recreate the current configuration.
12338# Compiler output produced by configure, useful for debugging
ba479fd2 12339# configure, is in config.log if it exists.
6e3f3080 12340
ba479fd2
NN
12341debug=false
12342ac_cs_recheck=false
12343ac_cs_silent=false
12344SHELL=\${CONFIG_SHELL-$SHELL}
12345_ACEOF
12346
12347cat >>$CONFIG_STATUS <<\_ACEOF
12348## --------------------- ##
12349## M4sh Initialization. ##
12350## --------------------- ##
12351
12352# Be Bourne compatible
12353if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12354 emulate sh
12355 NULLCMD=:
12356 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12357 # is contrary to our usage. Disable this feature.
12358 alias -g '${1+"$@"}'='"$@"'
12359elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12360 set -o posix
12361fi
86da66b5 12362DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
12363
12364# Support unset when possible.
86da66b5 12365if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
12366 as_unset=unset
12367else
12368 as_unset=false
12369fi
12370
12371
12372# Work around bugs in pre-3.0 UWIN ksh.
12373$as_unset ENV MAIL MAILPATH
12374PS1='$ '
12375PS2='> '
12376PS4='+ '
12377
12378# NLS nuisances.
12379for as_var in \
12380 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12381 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12382 LC_TELEPHONE LC_TIME
6e3f3080 12383do
86da66b5 12384 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
12385 eval $as_var=C; export $as_var
12386 else
12387 $as_unset $as_var
12388 fi
6e3f3080
NN
12389done
12390
ba479fd2
NN
12391# Required to use basename.
12392if expr a : '\(a\)' >/dev/null 2>&1; then
12393 as_expr=expr
12394else
12395 as_expr=false
12396fi
6e3f3080 12397
ba479fd2
NN
12398if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
12399 as_basename=basename
12400else
12401 as_basename=false
12402fi
6e3f3080
NN
12403
12404
ba479fd2
NN
12405# Name of the executable.
12406as_me=`$as_basename "$0" ||
12407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12408 X"$0" : 'X\(//\)$' \| \
12409 X"$0" : 'X\(/\)$' \| \
12410 . : '\(.\)' 2>/dev/null ||
12411echo X/"$0" |
12412 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
12413 /^X\/\(\/\/\)$/{ s//\1/; q; }
12414 /^X\/\(\/\).*/{ s//\1/; q; }
12415 s/.*/./; q'`
12416
6e3f3080 12417
ba479fd2
NN
12418# PATH needs CR, and LINENO needs CR and PATH.
12419# Avoid depending upon Character Ranges.
12420as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12421as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12422as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12423as_cr_digits='0123456789'
12424as_cr_alnum=$as_cr_Letters$as_cr_digits
12425
12426# The user is always right.
12427if test "${PATH_SEPARATOR+set}" != set; then
12428 echo "#! /bin/sh" >conf$$.sh
12429 echo "exit 0" >>conf$$.sh
12430 chmod +x conf$$.sh
12431 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12432 PATH_SEPARATOR=';'
6e3f3080 12433 else
ba479fd2
NN
12434 PATH_SEPARATOR=:
12435 fi
12436 rm -f conf$$.sh
12437fi
12438
12439
12440 as_lineno_1=$LINENO
12441 as_lineno_2=$LINENO
12442 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12443 test "x$as_lineno_1" != "x$as_lineno_2" &&
12444 test "x$as_lineno_3" = "x$as_lineno_2" || {
12445 # Find who we are. Look in the path if we contain no path at all
12446 # relative or not.
12447 case $0 in
12448 *[\\/]* ) as_myself=$0 ;;
12449 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12450for as_dir in $PATH
12451do
12452 IFS=$as_save_IFS
12453 test -z "$as_dir" && as_dir=.
12454 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12455done
12456
12457 ;;
12458 esac
12459 # We did not find ourselves, most probably we were run as `sh COMMAND'
12460 # in which case we are not to be found in the path.
12461 if test "x$as_myself" = x; then
12462 as_myself=$0
12463 fi
12464 if test ! -f "$as_myself"; then
12465 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
12466echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
12467 { (exit 1); exit 1; }; }
6e3f3080 12468 fi
ba479fd2
NN
12469 case $CONFIG_SHELL in
12470 '')
12471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12472for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
12473do
12474 IFS=$as_save_IFS
12475 test -z "$as_dir" && as_dir=.
12476 for as_base in sh bash ksh sh5; do
12477 case $as_dir in
12478 /*)
12479 if ("$as_dir/$as_base" -c '
12480 as_lineno_1=$LINENO
12481 as_lineno_2=$LINENO
12482 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12483 test "x$as_lineno_1" != "x$as_lineno_2" &&
12484 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
12485 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
12486 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
12487 CONFIG_SHELL=$as_dir/$as_base
12488 export CONFIG_SHELL
12489 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
12490 fi;;
12491 esac
12492 done
12493done
12494;;
12495 esac
12496
12497 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12498 # uniformly replaced by the line number. The first 'sed' inserts a
12499 # line-number line before each line; the second 'sed' does the real
12500 # work. The second script uses 'N' to pair each line-number line
12501 # with the numbered line, and appends trailing '-' during
12502 # substitution so that $LINENO is not a special case at line end.
12503 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12504 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
12505 sed '=' <$as_myself |
12506 sed '
12507 N
12508 s,$,-,
12509 : loop
12510 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
12511 t loop
12512 s,-$,,
12513 s,^['$as_cr_digits']*\n,,
12514 ' >$as_me.lineno &&
12515 chmod +x $as_me.lineno ||
12516 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
12517echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
12518 { (exit 1); exit 1; }; }
12519
12520 # Don't try to exec as it changes $[0], causing all sort of problems
12521 # (the dirname of $[0] is not the place where we might find the
12522 # original and so on. Autoconf is especially sensible to this).
12523 . ./$as_me.lineno
12524 # Exit status is that of the last command.
12525 exit
12526}
12527
12528
12529case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
12530 *c*,-n*) ECHO_N= ECHO_C='
12531' ECHO_T=' ' ;;
12532 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
12533 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
12534esac
12535
12536if expr a : '\(a\)' >/dev/null 2>&1; then
12537 as_expr=expr
12538else
12539 as_expr=false
12540fi
12541
12542rm -f conf$$ conf$$.exe conf$$.file
12543echo >conf$$.file
12544if ln -s conf$$.file conf$$ 2>/dev/null; then
12545 # We could just check for DJGPP; but this test a) works b) is more generic
12546 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12547 if test -f conf$$.exe; then
12548 # Don't use ln at all; we don't have any links
12549 as_ln_s='cp -p'
6e3f3080 12550 else
ba479fd2 12551 as_ln_s='ln -s'
6e3f3080 12552 fi
ba479fd2
NN
12553elif ln conf$$.file conf$$ 2>/dev/null; then
12554 as_ln_s=ln
12555else
12556 as_ln_s='cp -p'
12557fi
12558rm -f conf$$ conf$$.exe conf$$.file
12559
12560if mkdir -p . 2>/dev/null; then
12561 as_mkdir_p=:
12562else
86da66b5 12563 test -d ./-p && rmdir ./-p
ba479fd2
NN
12564 as_mkdir_p=false
12565fi
12566
12567as_executable_p="test -f"
12568
12569# Sed expression to map a string onto a valid CPP name.
86da66b5 12570as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
12571
12572# Sed expression to map a string onto a valid variable name.
86da66b5 12573as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
12574
12575
12576# IFS
12577# We need space, tab and new line, in precisely that order.
12578as_nl='
12579'
12580IFS=" $as_nl"
12581
12582# CDPATH.
12583$as_unset CDPATH
12584
12585exec 6>&1
12586
12587# Open the log real soon, to keep \$[0] and so on meaningful, and to
12588# report actual input values of CONFIG_FILES etc. instead of their
12589# values after options handling. Logging --version etc. is OK.
12590exec 5>>config.log
12591{
12592 echo
12593 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12594## Running $as_me. ##
12595_ASBOX
12596} >&5
12597cat >&5 <<_CSEOF
12598
12599This file was extended by $as_me, which was
8ab705be 12600generated by GNU Autoconf 2.59. Invocation command line was
ba479fd2
NN
12601
12602 CONFIG_FILES = $CONFIG_FILES
12603 CONFIG_HEADERS = $CONFIG_HEADERS
12604 CONFIG_LINKS = $CONFIG_LINKS
12605 CONFIG_COMMANDS = $CONFIG_COMMANDS
12606 $ $0 $@
12607
12608_CSEOF
12609echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
12610echo >&5
12611_ACEOF
12612
12613# Files that config.status was made for.
12614if test -n "$ac_config_files"; then
12615 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12616fi
12617
12618if test -n "$ac_config_headers"; then
12619 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12620fi
12621
12622if test -n "$ac_config_links"; then
12623 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12624fi
12625
12626if test -n "$ac_config_commands"; then
12627 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12628fi
12629
12630cat >>$CONFIG_STATUS <<\_ACEOF
12631
12632ac_cs_usage="\
12633\`$as_me' instantiates files from templates according to the
12634current configuration.
12635
12636Usage: $0 [OPTIONS] [FILE]...
12637
12638 -h, --help print this help, then exit
12639 -V, --version print version number, then exit
12640 -q, --quiet do not print progress messages
12641 -d, --debug don't remove temporary files
12642 --recheck update $as_me by reconfiguring in the same conditions
12643 --file=FILE[:TEMPLATE]
86da66b5 12644 instantiate the configuration file FILE
ba479fd2 12645 --header=FILE[:TEMPLATE]
86da66b5 12646 instantiate the configuration header FILE
ba479fd2
NN
12647
12648Configuration files:
12649$config_files
12650
12651Configuration headers:
12652$config_headers
12653
12654Configuration commands:
12655$config_commands
12656
12657Report bugs to <bug-autoconf@gnu.org>."
12658_ACEOF
12659
12660cat >>$CONFIG_STATUS <<_ACEOF
12661ac_cs_version="\\
12662config.status
8ab705be 12663configured by $0, generated by GNU Autoconf 2.59,
ba479fd2
NN
12664 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12665
86da66b5 12666Copyright (C) 2003 Free Software Foundation, Inc.
ba479fd2
NN
12667This config.status script is free software; the Free Software Foundation
12668gives unlimited permission to copy, distribute and modify it."
12669srcdir=$srcdir
12670_ACEOF
12671
12672cat >>$CONFIG_STATUS <<\_ACEOF
12673# If no file are specified by the user, then we need to provide default
12674# value. By we need to know if files were specified by the user.
12675ac_need_defaults=:
12676while test $# != 0
12677do
12678 case $1 in
12679 --*=*)
12680 ac_option=`expr "x$1" : 'x\([^=]*\)='`
12681 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12682 ac_shift=:
12683 ;;
12684 -*)
12685 ac_option=$1
12686 ac_optarg=$2
12687 ac_shift=shift
12688 ;;
12689 *) # This is not an option, so the user has probably given explicit
12690 # arguments.
12691 ac_option=$1
12692 ac_need_defaults=false;;
12693 esac
12694
12695 case $ac_option in
12696 # Handling of the options.
12697_ACEOF
12698cat >>$CONFIG_STATUS <<\_ACEOF
12699 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12700 ac_cs_recheck=: ;;
12701 --version | --vers* | -V )
12702 echo "$ac_cs_version"; exit 0 ;;
12703 --he | --h)
12704 # Conflict between --help and --header
12705 { { echo "$as_me:$LINENO: error: ambiguous option: $1
12706Try \`$0 --help' for more information." >&5
12707echo "$as_me: error: ambiguous option: $1
12708Try \`$0 --help' for more information." >&2;}
12709 { (exit 1); exit 1; }; };;
12710 --help | --hel | -h )
12711 echo "$ac_cs_usage"; exit 0 ;;
12712 --debug | --d* | -d )
12713 debug=: ;;
12714 --file | --fil | --fi | --f )
12715 $ac_shift
12716 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12717 ac_need_defaults=false;;
12718 --header | --heade | --head | --hea )
12719 $ac_shift
12720 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
12721 ac_need_defaults=false;;
12722 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12723 | -silent | --silent | --silen | --sile | --sil | --si | --s)
12724 ac_cs_silent=: ;;
12725
12726 # This is an error.
12727 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
12728Try \`$0 --help' for more information." >&5
12729echo "$as_me: error: unrecognized option: $1
12730Try \`$0 --help' for more information." >&2;}
12731 { (exit 1); exit 1; }; } ;;
12732
12733 *) ac_config_targets="$ac_config_targets $1" ;;
12734
12735 esac
12736 shift
6e3f3080 12737done
ba479fd2
NN
12738
12739ac_configure_extra_args=
12740
12741if $ac_cs_silent; then
12742 exec 6>/dev/null
12743 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
12744fi
12745
ba479fd2
NN
12746_ACEOF
12747cat >>$CONFIG_STATUS <<_ACEOF
12748if \$ac_cs_recheck; then
12749 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12750 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12751fi
861bb6c1 12752
ba479fd2
NN
12753_ACEOF
12754
12755cat >>$CONFIG_STATUS <<_ACEOF
12756#
12757# INIT-COMMANDS section.
12758#
12759
12760subdirs='$subdirs'
12761symbolic_link='$symbolic_link'
12762
12763
12764_ACEOF
12765
12766
12767
12768cat >>$CONFIG_STATUS <<\_ACEOF
12769for ac_config_target in $ac_config_targets
12770do
12771 case "$ac_config_target" in
12772 # Handling of arguments.
12773 "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
12774 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12775 "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
12776 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12777echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12778 { (exit 1); exit 1; }; };;
861bb6c1 12779 esac
ba479fd2
NN
12780done
12781
12782# If the user did not use the arguments to specify the items to instantiate,
12783# then the envvar interface is used. Set only those that are not.
12784# We use the long form for the default assignment because of an extremely
12785# bizarre bug on SunOS 4.1.3.
12786if $ac_need_defaults; then
12787 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12788 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12789 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12790fi
12791
12792# Have a temporary directory for convenience. Make it in the build tree
12793# simply because there is no reason to put it here, and in addition,
12794# creating and moving files from /tmp can sometimes cause problems.
12795# Create a temporary directory, and hook for its removal unless debugging.
12796$debug ||
12797{
12798 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12799 trap '{ (exit 1); exit 1; }' 1 2 13 15
12800}
861bb6c1 12801
ba479fd2 12802# Create a (secure) tmp directory for tmp files.
6e3f3080 12803
ba479fd2
NN
12804{
12805 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
12806 test -n "$tmp" && test -d "$tmp"
12807} ||
12808{
12809 tmp=./confstat$$-$RANDOM
12810 (umask 077 && mkdir $tmp)
12811} ||
12812{
12813 echo "$me: cannot create a temporary directory in ." >&2
12814 { (exit 1); exit 1; }
12815}
12816
12817_ACEOF
12818
12819cat >>$CONFIG_STATUS <<_ACEOF
12820
12821#
12822# CONFIG_FILES section.
12823#
12824
12825# No need to generate the scripts if there are no CONFIG_FILES.
12826# This happens for instance when ./config.status config.h
12827if test -n "\$CONFIG_FILES"; then
12828 # Protect against being on the right side of a sed subst in config.status.
12829 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12830 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12831s,@SHELL@,$SHELL,;t t
12832s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12833s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12834s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12835s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12836s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12837s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12838s,@exec_prefix@,$exec_prefix,;t t
12839s,@prefix@,$prefix,;t t
12840s,@program_transform_name@,$program_transform_name,;t t
12841s,@bindir@,$bindir,;t t
12842s,@sbindir@,$sbindir,;t t
12843s,@libexecdir@,$libexecdir,;t t
12844s,@datadir@,$datadir,;t t
12845s,@sysconfdir@,$sysconfdir,;t t
12846s,@sharedstatedir@,$sharedstatedir,;t t
12847s,@localstatedir@,$localstatedir,;t t
12848s,@libdir@,$libdir,;t t
12849s,@includedir@,$includedir,;t t
12850s,@oldincludedir@,$oldincludedir,;t t
12851s,@infodir@,$infodir,;t t
12852s,@mandir@,$mandir,;t t
12853s,@build_alias@,$build_alias,;t t
12854s,@host_alias@,$host_alias,;t t
12855s,@target_alias@,$target_alias,;t t
12856s,@DEFS@,$DEFS,;t t
12857s,@ECHO_C@,$ECHO_C,;t t
12858s,@ECHO_N@,$ECHO_N,;t t
12859s,@ECHO_T@,$ECHO_T,;t t
12860s,@LIBS@,$LIBS,;t t
12861s,@build@,$build,;t t
12862s,@build_cpu@,$build_cpu,;t t
12863s,@build_vendor@,$build_vendor,;t t
12864s,@build_os@,$build_os,;t t
12865s,@host@,$host,;t t
12866s,@host_cpu@,$host_cpu,;t t
12867s,@host_vendor@,$host_vendor,;t t
12868s,@host_os@,$host_os,;t t
12869s,@target@,$target,;t t
12870s,@target_cpu@,$target_cpu,;t t
12871s,@target_vendor@,$target_vendor,;t t
12872s,@target_os@,$target_os,;t t
12873s,@build_subdir@,$build_subdir,;t t
12874s,@host_subdir@,$host_subdir,;t t
12875s,@target_subdir@,$target_subdir,;t t
03787dfd 12876s,@GENINSRC@,$GENINSRC,;t t
ba479fd2
NN
12877s,@CC@,$CC,;t t
12878s,@CFLAGS@,$CFLAGS,;t t
12879s,@LDFLAGS@,$LDFLAGS,;t t
12880s,@CPPFLAGS@,$CPPFLAGS,;t t
12881s,@ac_ct_CC@,$ac_ct_CC,;t t
12882s,@EXEEXT@,$EXEEXT,;t t
12883s,@OBJEXT@,$OBJEXT,;t t
12884s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
12885s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
12886s,@CPP@,$CPP,;t t
ba479fd2
NN
12887s,@strict1_warn@,$strict1_warn,;t t
12888s,@warn_cflags@,$warn_cflags,;t t
12889s,@WERROR@,$WERROR,;t t
12890s,@nocommon_flag@,$nocommon_flag,;t t
13f05fd0 12891s,@TREEBROWSER@,$TREEBROWSER,;t t
ba479fd2
NN
12892s,@EGREP@,$EGREP,;t t
12893s,@valgrind_path@,$valgrind_path,;t t
12894s,@valgrind_path_defines@,$valgrind_path_defines,;t t
12895s,@valgrind_command@,$valgrind_command,;t t
12896s,@coverage_flags@,$coverage_flags,;t t
12897s,@enable_multilib@,$enable_multilib,;t t
12898s,@enable_shared@,$enable_shared,;t t
12899s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
12900s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
12901s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
12902s,@onestep@,$onestep,;t t
12903s,@SET_MAKE@,$SET_MAKE,;t t
12904s,@AWK@,$AWK,;t t
ba479fd2 12905s,@LN_S@,$LN_S,;t t
ad6717df 12906s,@LN@,$LN,;t t
ba479fd2
NN
12907s,@RANLIB@,$RANLIB,;t t
12908s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
343a6100 12909s,@ranlib_flags@,$ranlib_flags,;t t
ba479fd2
NN
12910s,@INSTALL@,$INSTALL,;t t
12911s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12912s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12913s,@make_compare_target@,$make_compare_target,;t t
12914s,@have_mktemp_command@,$have_mktemp_command,;t t
12915s,@MAKEINFO@,$MAKEINFO,;t t
12916s,@BUILD_INFO@,$BUILD_INFO,;t t
12917s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
12918s,@FLEX@,$FLEX,;t t
12919s,@BISON@,$BISON,;t t
12920s,@stage1_cflags@,$stage1_cflags,;t t
12921s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
12922s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
12923s,@LDEXP_LIB@,$LDEXP_LIB,;t t
12924s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
12925s,@LIBICONV@,$LIBICONV,;t t
12926s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
12927s,@manext@,$manext,;t t
12928s,@objext@,$objext,;t t
8bb915b6 12929s,@gthread_flags@,$gthread_flags,;t t
ba479fd2
NN
12930s,@extra_modes_file@,$extra_modes_file,;t t
12931s,@FORBUILD@,$FORBUILD,;t t
12932s,@PACKAGE@,$PACKAGE,;t t
12933s,@VERSION@,$VERSION,;t t
12934s,@USE_NLS@,$USE_NLS,;t t
12935s,@LIBINTL@,$LIBINTL,;t t
12936s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
12937s,@INCINTL@,$INCINTL,;t t
12938s,@XGETTEXT@,$XGETTEXT,;t t
12939s,@GMSGFMT@,$GMSGFMT,;t t
12940s,@POSUB@,$POSUB,;t t
12941s,@CATALOGS@,$CATALOGS,;t t
12942s,@CROSS@,$CROSS,;t t
12943s,@ALL@,$ALL,;t t
12944s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
12945s,@inhibit_libc@,$inhibit_libc,;t t
12946s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t
12947s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t
12948s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
12949s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12950s,@STMP_FIXINC@,$STMP_FIXINC,;t t
12951s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
c38f02df 12952s,@collect2@,$collect2,;t t
ba479fd2 12953s,@libgcc_visibility@,$libgcc_visibility,;t t
ba479fd2
NN
12954s,@GGC@,$GGC,;t t
12955s,@zlibdir@,$zlibdir,;t t
12956s,@zlibinc@,$zlibinc,;t t
12957s,@MAINT@,$MAINT,;t t
6de9cd9a
DN
12958s,@ANDER@,$ANDER,;t t
12959s,@BANSHEEINC@,$BANSHEEINC,;t t
12960s,@BANSHEELIB@,$BANSHEELIB,;t t
ba479fd2
NN
12961s,@gcc_tooldir@,$gcc_tooldir,;t t
12962s,@dollar@,$dollar,;t t
12963s,@slibdir@,$slibdir,;t t
12964s,@objdir@,$objdir,;t t
12965s,@subdirs@,$subdirs,;t t
12966s,@srcdir@,$srcdir,;t t
ba479fd2
NN
12967s,@all_boot_languages@,$all_boot_languages,;t t
12968s,@all_compilers@,$all_compilers,;t t
12969s,@all_gtfiles@,$all_gtfiles,;t t
12970s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
12971s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
12972s,@all_lang_makefrags@,$all_lang_makefrags,;t t
12973s,@all_lang_makefiles@,$all_lang_makefiles,;t t
12974s,@all_languages@,$all_languages,;t t
12975s,@all_stagestuff@,$all_stagestuff,;t t
12976s,@build_exeext@,$build_exeext,;t t
12977s,@build_install_headers_dir@,$build_install_headers_dir,;t t
12978s,@build_xm_file_list@,$build_xm_file_list,;t t
12979s,@build_xm_include_list@,$build_xm_include_list,;t t
12980s,@build_xm_defines@,$build_xm_defines,;t t
12981s,@check_languages@,$check_languages,;t t
12982s,@cc_set_by_configure@,$cc_set_by_configure,;t t
12983s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
12984s,@cpp_install_dir@,$cpp_install_dir,;t t
12985s,@xmake_file@,$xmake_file,;t t
12986s,@tmake_file@,$tmake_file,;t t
30500d84 12987s,@extra_gcc_objs@,$extra_gcc_objs,;t t
ba479fd2
NN
12988s,@extra_headers_list@,$extra_headers_list,;t t
12989s,@extra_objs@,$extra_objs,;t t
12990s,@extra_parts@,$extra_parts,;t t
12991s,@extra_passes@,$extra_passes,;t t
12992s,@extra_programs@,$extra_programs,;t t
12993s,@float_h_file@,$float_h_file,;t t
12994s,@gcc_config_arguments@,$gcc_config_arguments,;t t
12995s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
12996s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
12997s,@gcc_version@,$gcc_version,;t t
12998s,@gcc_version_full@,$gcc_version_full,;t t
12999s,@gcc_version_trigger@,$gcc_version_trigger,;t t
13000s,@host_exeext@,$host_exeext,;t t
ba479fd2
NN
13001s,@host_xm_file_list@,$host_xm_file_list,;t t
13002s,@host_xm_include_list@,$host_xm_include_list,;t t
13003s,@host_xm_defines@,$host_xm_defines,;t t
13004s,@out_host_hook_obj@,$out_host_hook_obj,;t t
13005s,@install@,$install,;t t
13006s,@lang_opt_files@,$lang_opt_files,;t t
13007s,@lang_specs_files@,$lang_specs_files,;t t
13008s,@lang_tree_files@,$lang_tree_files,;t t
13009s,@local_prefix@,$local_prefix,;t t
13010s,@md_file@,$md_file,;t t
13011s,@objc_boehm_gc@,$objc_boehm_gc,;t t
13012s,@out_file@,$out_file,;t t
13013s,@out_object_file@,$out_object_file,;t t
13014s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
13015s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
13016s,@symbolic_link@,$symbolic_link,;t t
13017s,@thread_file@,$thread_file,;t t
13018s,@tm_file_list@,$tm_file_list,;t t
13019s,@tm_include_list@,$tm_include_list,;t t
13020s,@tm_defines@,$tm_defines,;t t
13021s,@tm_p_file_list@,$tm_p_file_list,;t t
13022s,@tm_p_include_list@,$tm_p_include_list,;t t
13023s,@xm_file_list@,$xm_file_list,;t t
13024s,@xm_include_list@,$xm_include_list,;t t
13025s,@xm_defines@,$xm_defines,;t t
13026s,@target_noncanonical@,$target_noncanonical,;t t
13027s,@c_target_objs@,$c_target_objs,;t t
13028s,@cxx_target_objs@,$cxx_target_objs,;t t
13029s,@target_cpu_default@,$target_cpu_default,;t t
6de9cd9a
DN
13030s,@GMPLIBS@,$GMPLIBS,;t t
13031s,@GMPINC@,$GMPINC,;t t
ba479fd2
NN
13032s,@LIBOBJS@,$LIBOBJS,;t t
13033s,@LTLIBOBJS@,$LTLIBOBJS,;t t
13034/@language_hooks@/r $language_hooks
13035s,@language_hooks@,,;t t
13036CEOF
13037
13038_ACEOF
13039
13040 cat >>$CONFIG_STATUS <<\_ACEOF
13041 # Split the substitutions into bite-sized pieces for seds with
13042 # small command number limits, like on Digital OSF/1 and HP-UX.
13043 ac_max_sed_lines=48
13044 ac_sed_frag=1 # Number of current file.
13045 ac_beg=1 # First line for current file.
13046 ac_end=$ac_max_sed_lines # Line after last line for current file.
13047 ac_more_lines=:
13048 ac_sed_cmds=
13049 while $ac_more_lines; do
13050 if test $ac_beg -gt 1; then
13051 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13052 else
13053 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13054 fi
13055 if test ! -s $tmp/subs.frag; then
13056 ac_more_lines=false
13057 else
13058 # The purpose of the label and of the branching condition is to
13059 # speed up the sed processing (if there are no `@' at all, there
13060 # is no need to browse any of the substitutions).
13061 # These are the two extra sed commands mentioned above.
13062 (echo ':t
13063 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
13064 if test -z "$ac_sed_cmds"; then
86da66b5 13065 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2 13066 else
86da66b5 13067 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
ba479fd2
NN
13068 fi
13069 ac_sed_frag=`expr $ac_sed_frag + 1`
13070 ac_beg=$ac_end
13071 ac_end=`expr $ac_end + $ac_max_sed_lines`
13072 fi
13073 done
13074 if test -z "$ac_sed_cmds"; then
13075 ac_sed_cmds=cat
63cf211a 13076 fi
ba479fd2 13077fi # test -n "$CONFIG_FILES"
cafe096b 13078
ba479fd2
NN
13079_ACEOF
13080cat >>$CONFIG_STATUS <<\_ACEOF
13081for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
13082 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13083 case $ac_file in
13084 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
13085 cat >$tmp/stdin
13086 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13087 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13088 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 13089 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13090 * ) ac_file_in=$ac_file.in ;;
63cf211a 13091 esac
cafe096b 13092
ba479fd2
NN
13093 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
13094 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13095$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13096 X"$ac_file" : 'X\(//\)[^/]' \| \
13097 X"$ac_file" : 'X\(//\)$' \| \
13098 X"$ac_file" : 'X\(/\)' \| \
13099 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13100echo X"$ac_file" |
13101 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13102 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13103 /^X\(\/\/\)$/{ s//\1/; q; }
13104 /^X\(\/\).*/{ s//\1/; q; }
13105 s/.*/./; q'`
13106 { if $as_mkdir_p; then
13107 mkdir -p "$ac_dir"
13108 else
13109 as_dir="$ac_dir"
13110 as_dirs=
13111 while test ! -d "$as_dir"; do
13112 as_dirs="$as_dir $as_dirs"
13113 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13114$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13115 X"$as_dir" : 'X\(//\)[^/]' \| \
13116 X"$as_dir" : 'X\(//\)$' \| \
13117 X"$as_dir" : 'X\(/\)' \| \
13118 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13119echo X"$as_dir" |
13120 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13121 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13122 /^X\(\/\/\)$/{ s//\1/; q; }
13123 /^X\(\/\).*/{ s//\1/; q; }
13124 s/.*/./; q'`
13125 done
13126 test ! -n "$as_dirs" || mkdir $as_dirs
13127 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13128echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13129 { (exit 1); exit 1; }; }; }
6e3f3080 13130
ba479fd2
NN
13131 ac_builddir=.
13132
13133if test "$ac_dir" != .; then
13134 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13135 # A "../" for each directory in $ac_dir_suffix.
13136 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13137else
13138 ac_dir_suffix= ac_top_builddir=
13139fi
13140
13141case $srcdir in
13142 .) # No --srcdir option. We are building in place.
13143 ac_srcdir=.
13144 if test -z "$ac_top_builddir"; then
13145 ac_top_srcdir=.
13146 else
13147 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13148 fi ;;
13149 [\\/]* | ?:[\\/]* ) # Absolute path.
13150 ac_srcdir=$srcdir$ac_dir_suffix;
13151 ac_top_srcdir=$srcdir ;;
13152 *) # Relative path.
13153 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13154 ac_top_srcdir=$ac_top_builddir$srcdir ;;
13155esac
8ab705be
KC
13156
13157# Do not use `cd foo && pwd` to compute absolute paths, because
13158# the directories may not exist.
13159case `pwd` in
13160.) ac_abs_builddir="$ac_dir";;
86da66b5 13161*)
8ab705be
KC
13162 case "$ac_dir" in
13163 .) ac_abs_builddir=`pwd`;;
13164 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
13165 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
13166 esac;;
13167esac
8ab705be 13168case $ac_abs_builddir in
86da66b5
HPN
13169.) ac_abs_top_builddir=${ac_top_builddir}.;;
13170*)
13171 case ${ac_top_builddir}. in
8ab705be 13172 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 13173 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 13174 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
13175 esac;;
13176esac
8ab705be 13177case $ac_abs_builddir in
86da66b5
HPN
13178.) ac_abs_srcdir=$ac_srcdir;;
13179*)
13180 case $ac_srcdir in
8ab705be 13181 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 13182 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 13183 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
13184 esac;;
13185esac
8ab705be 13186case $ac_abs_builddir in
86da66b5
HPN
13187.) ac_abs_top_srcdir=$ac_top_srcdir;;
13188*)
13189 case $ac_top_srcdir in
8ab705be 13190 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 13191 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 13192 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
13193 esac;;
13194esac
ba479fd2
NN
13195
13196
13197
2fac9c01
ZW
13198 if test x"$ac_file" != x-; then
13199 { echo "$as_me:$LINENO: creating $ac_file" >&5
13200echo "$as_me: creating $ac_file" >&6;}
13201 rm -f "$ac_file"
13202 fi
ba479fd2
NN
13203 # Let's still pretend it is `configure' which instantiates (i.e., don't
13204 # use $as_me), people would be surprised to read:
13205 # /* config.h. Generated by config.status. */
13206 if test x"$ac_file" = x-; then
13207 configure_input=
13208 else
13209 configure_input="$ac_file. "
13210 fi
13211 configure_input=$configure_input"Generated from `echo $ac_file_in |
86da66b5 13212 sed 's,.*/,,'` by configure."
ba479fd2
NN
13213
13214 # First look for the input files in the build tree, otherwise in the
13215 # src tree.
13216 ac_file_inputs=`IFS=:
13217 for f in $ac_file_in; do
13218 case $f in
13219 -) echo $tmp/stdin ;;
13220 [\\/$]*)
86da66b5
HPN
13221 # Absolute (can't be DOS-style, as IFS=:)
13222 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13223echo "$as_me: error: cannot find input file: $f" >&2;}
13224 { (exit 1); exit 1; }; }
86da66b5 13225 echo "$f";;
ba479fd2 13226 *) # Relative
86da66b5
HPN
13227 if test -f "$f"; then
13228 # Build tree
13229 echo "$f"
13230 elif test -f "$srcdir/$f"; then
13231 # Source tree
13232 echo "$srcdir/$f"
13233 else
13234 # /dev/null tree
13235 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13236echo "$as_me: error: cannot find input file: $f" >&2;}
13237 { (exit 1); exit 1; }; }
86da66b5 13238 fi;;
ba479fd2
NN
13239 esac
13240 done` || { (exit 1); exit 1; }
13241_ACEOF
13242cat >>$CONFIG_STATUS <<_ACEOF
13243 sed "$ac_vpsub
13244$extrasub
13245_ACEOF
13246cat >>$CONFIG_STATUS <<\_ACEOF
13247:t
13248/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13249s,@configure_input@,$configure_input,;t t
13250s,@srcdir@,$ac_srcdir,;t t
13251s,@abs_srcdir@,$ac_abs_srcdir,;t t
13252s,@top_srcdir@,$ac_top_srcdir,;t t
13253s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
13254s,@builddir@,$ac_builddir,;t t
13255s,@abs_builddir@,$ac_abs_builddir,;t t
13256s,@top_builddir@,$ac_top_builddir,;t t
13257s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
13258" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13259 rm -f $tmp/stdin
13260 if test x"$ac_file" != x-; then
13261 mv $tmp/out $ac_file
13262 else
13263 cat $tmp/out
13264 rm -f $tmp/out
13265 fi
13266
13267done
13268_ACEOF
13269cat >>$CONFIG_STATUS <<\_ACEOF
6e3f3080 13270
ba479fd2
NN
13271#
13272# CONFIG_HEADER section.
13273#
861bb6c1
JL
13274
13275# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13276# NAME is the cpp macro being defined and VALUE is the value it is being given.
13277#
13278# ac_d sets the value in "#define NAME VALUE" lines.
86da66b5
HPN
13279ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
13280ac_dB='[ ].*$,\1#\2'
ba479fd2
NN
13281ac_dC=' '
13282ac_dD=',;t'
13283# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
86da66b5 13284ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ba479fd2 13285ac_uB='$,\1#\2define\3'
861bb6c1 13286ac_uC=' '
ba479fd2
NN
13287ac_uD=',;t'
13288
13289for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
861bb6c1 13290 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ba479fd2
NN
13291 case $ac_file in
13292 - | *:- | *:-:* ) # input from stdin
86da66b5
HPN
13293 cat >$tmp/stdin
13294 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13295 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13296 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
86da66b5 13297 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
ba479fd2 13298 * ) ac_file_in=$ac_file.in ;;
861bb6c1
JL
13299 esac
13300
ba479fd2
NN
13301 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
13302echo "$as_me: creating $ac_file" >&6;}
13303
13304 # First look for the input files in the build tree, otherwise in the
13305 # src tree.
13306 ac_file_inputs=`IFS=:
13307 for f in $ac_file_in; do
13308 case $f in
13309 -) echo $tmp/stdin ;;
13310 [\\/$]*)
86da66b5
HPN
13311 # Absolute (can't be DOS-style, as IFS=:)
13312 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13313echo "$as_me: error: cannot find input file: $f" >&2;}
13314 { (exit 1); exit 1; }; }
86da66b5
HPN
13315 # Do quote $f, to prevent DOS paths from being IFS'd.
13316 echo "$f";;
ba479fd2 13317 *) # Relative
86da66b5
HPN
13318 if test -f "$f"; then
13319 # Build tree
13320 echo "$f"
13321 elif test -f "$srcdir/$f"; then
13322 # Source tree
13323 echo "$srcdir/$f"
13324 else
13325 # /dev/null tree
13326 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
ba479fd2
NN
13327echo "$as_me: error: cannot find input file: $f" >&2;}
13328 { (exit 1); exit 1; }; }
86da66b5 13329 fi;;
ba479fd2
NN
13330 esac
13331 done` || { (exit 1); exit 1; }
13332 # Remove the trailing spaces.
86da66b5 13333 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
ba479fd2
NN
13334
13335_ACEOF
13336
13337# Transform confdefs.h into two sed scripts, `conftest.defines' and
13338# `conftest.undefs', that substitutes the proper values into
13339# config.h.in to produce config.h. The first handles `#define'
13340# templates, and the second `#undef' templates.
13341# And first: Protect against being on the right side of a sed subst in
13342# config.status. Protect against being in an unquoted here document
13343# in config.status.
13344rm -f conftest.defines conftest.undefs
13345# Using a here document instead of a string reduces the quoting nightmare.
13346# Putting comments in sed scripts is not portable.
13347#
13348# `end' is used to avoid that the second main sed command (meant for
13349# 0-ary CPP macros) applies to n-ary macro definitions.
13350# See the Autoconf documentation for `clear'.
13351cat >confdef2sed.sed <<\_ACEOF
13352s/[\\&,]/\\&/g
13353s,[\\$`],\\&,g
13354t clear
13355: clear
86da66b5 13356s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
ba479fd2 13357t end
86da66b5 13358s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
ba479fd2
NN
13359: end
13360_ACEOF
13361# If some macros were called several times there might be several times
13362# the same #defines, which is useless. Nevertheless, we may not want to
13363# sort them, since we want the *last* AC-DEFINE to be honored.
13364uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13365sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13366rm -f confdef2sed.sed
861bb6c1
JL
13367
13368# This sed command replaces #undef with comments. This is necessary, for
13369# example, in the case of _POSIX_SOURCE, which is predefined and required
13370# on some systems where configure will not decide to define it.
ba479fd2 13371cat >>conftest.undefs <<\_ACEOF
86da66b5 13372s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ba479fd2
NN
13373_ACEOF
13374
13375# Break up conftest.defines because some shells have a limit on the size
13376# of here documents, and old seds have small limits too (100 cmds).
13377echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
86da66b5 13378echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
ba479fd2
NN
13379echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13380echo ' :' >>$CONFIG_STATUS
13381rm -f conftest.tail
13382while grep . conftest.defines >/dev/null
13383do
13384 # Write a limited-size here document to $tmp/defines.sed.
13385 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13386 # Speed up: don't consider the non `#define' lines.
86da66b5 13387 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
ba479fd2
NN
13388 # Work around the forget-to-reset-the-flag bug.
13389 echo 't clr' >>$CONFIG_STATUS
13390 echo ': clr' >>$CONFIG_STATUS
13391 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13392 echo 'CEOF
13393 sed -f $tmp/defines.sed $tmp/in >$tmp/out
13394 rm -f $tmp/in
13395 mv $tmp/out $tmp/in
13396' >>$CONFIG_STATUS
13397 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13398 rm -f conftest.defines
13399 mv conftest.tail conftest.defines
13400done
13401rm -f conftest.defines
13402echo ' fi # grep' >>$CONFIG_STATUS
13403echo >>$CONFIG_STATUS
861bb6c1 13404
ba479fd2
NN
13405# Break up conftest.undefs because some shells have a limit on the size
13406# of here documents, and old seds have small limits too (100 cmds).
13407echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
861bb6c1 13408rm -f conftest.tail
ba479fd2 13409while grep . conftest.undefs >/dev/null
861bb6c1 13410do
ba479fd2
NN
13411 # Write a limited-size here document to $tmp/undefs.sed.
13412 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13413 # Speed up: don't consider the non `#undef'
86da66b5 13414 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
ba479fd2
NN
13415 # Work around the forget-to-reset-the-flag bug.
13416 echo 't clr' >>$CONFIG_STATUS
13417 echo ': clr' >>$CONFIG_STATUS
13418 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
861bb6c1 13419 echo 'CEOF
ba479fd2
NN
13420 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13421 rm -f $tmp/in
13422 mv $tmp/out $tmp/in
13423' >>$CONFIG_STATUS
13424 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13425 rm -f conftest.undefs
13426 mv conftest.tail conftest.undefs
861bb6c1 13427done
ba479fd2
NN
13428rm -f conftest.undefs
13429
13430cat >>$CONFIG_STATUS <<\_ACEOF
13431 # Let's still pretend it is `configure' which instantiates (i.e., don't
13432 # use $as_me), people would be surprised to read:
13433 # /* config.h. Generated by config.status. */
13434 if test x"$ac_file" = x-; then
13435 echo "/* Generated by configure. */" >$tmp/config.h
6e3f3080 13436 else
ba479fd2 13437 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
cafe096b 13438 fi
ba479fd2
NN
13439 cat $tmp/in >>$tmp/config.h
13440 rm -f $tmp/in
13441 if test x"$ac_file" != x-; then
13442 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
13443 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
13444echo "$as_me: $ac_file is unchanged" >&6;}
13445 else
13446 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13447$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13448 X"$ac_file" : 'X\(//\)[^/]' \| \
13449 X"$ac_file" : 'X\(//\)$' \| \
13450 X"$ac_file" : 'X\(/\)' \| \
13451 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13452echo X"$ac_file" |
13453 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13454 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13455 /^X\(\/\/\)$/{ s//\1/; q; }
13456 /^X\(\/\).*/{ s//\1/; q; }
13457 s/.*/./; q'`
13458 { if $as_mkdir_p; then
13459 mkdir -p "$ac_dir"
13460 else
13461 as_dir="$ac_dir"
13462 as_dirs=
13463 while test ! -d "$as_dir"; do
13464 as_dirs="$as_dir $as_dirs"
13465 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13466$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13467 X"$as_dir" : 'X\(//\)[^/]' \| \
13468 X"$as_dir" : 'X\(//\)$' \| \
13469 X"$as_dir" : 'X\(/\)' \| \
13470 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13471echo X"$as_dir" |
13472 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13473 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13474 /^X\(\/\/\)$/{ s//\1/; q; }
13475 /^X\(\/\).*/{ s//\1/; q; }
13476 s/.*/./; q'`
13477 done
13478 test ! -n "$as_dirs" || mkdir $as_dirs
13479 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13480echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13481 { (exit 1); exit 1; }; }; }
63cf211a 13482
ba479fd2
NN
13483 rm -f $ac_file
13484 mv $tmp/config.h $ac_file
13485 fi
13486 else
13487 cat $tmp/config.h
13488 rm -f $tmp/config.h
13489 fi
13490done
13491_ACEOF
13492cat >>$CONFIG_STATUS <<\_ACEOF
861bb6c1 13493
ba479fd2
NN
13494#
13495# CONFIG_COMMANDS section.
13496#
13497for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13498 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13499 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13500 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
13501$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
13502 X"$ac_dest" : 'X\(//\)[^/]' \| \
13503 X"$ac_dest" : 'X\(//\)$' \| \
13504 X"$ac_dest" : 'X\(/\)' \| \
13505 . : '\(.\)' 2>/dev/null ||
ba479fd2
NN
13506echo X"$ac_dest" |
13507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13508 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13509 /^X\(\/\/\)$/{ s//\1/; q; }
13510 /^X\(\/\).*/{ s//\1/; q; }
13511 s/.*/./; q'`
86da66b5
HPN
13512 { if $as_mkdir_p; then
13513 mkdir -p "$ac_dir"
13514 else
13515 as_dir="$ac_dir"
13516 as_dirs=
13517 while test ! -d "$as_dir"; do
13518 as_dirs="$as_dir $as_dirs"
13519 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13520$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13521 X"$as_dir" : 'X\(//\)[^/]' \| \
13522 X"$as_dir" : 'X\(//\)$' \| \
13523 X"$as_dir" : 'X\(/\)' \| \
13524 . : '\(.\)' 2>/dev/null ||
13525echo X"$as_dir" |
13526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13527 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13528 /^X\(\/\/\)$/{ s//\1/; q; }
13529 /^X\(\/\).*/{ s//\1/; q; }
13530 s/.*/./; q'`
13531 done
13532 test ! -n "$as_dirs" || mkdir $as_dirs
13533 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13534echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13535 { (exit 1); exit 1; }; }; }
13536
ba479fd2
NN
13537 ac_builddir=.
13538
13539if test "$ac_dir" != .; then
13540 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13541 # A "../" for each directory in $ac_dir_suffix.
13542 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13543else
13544 ac_dir_suffix= ac_top_builddir=
13545fi
13546
13547case $srcdir in
13548 .) # No --srcdir option. We are building in place.
13549 ac_srcdir=.
13550 if test -z "$ac_top_builddir"; then
13551 ac_top_srcdir=.
13552 else
13553 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13554 fi ;;
13555 [\\/]* | ?:[\\/]* ) # Absolute path.
13556 ac_srcdir=$srcdir$ac_dir_suffix;
13557 ac_top_srcdir=$srcdir ;;
13558 *) # Relative path.
13559 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13560 ac_top_srcdir=$ac_top_builddir$srcdir ;;
13561esac
8ab705be
KC
13562
13563# Do not use `cd foo && pwd` to compute absolute paths, because
13564# the directories may not exist.
13565case `pwd` in
13566.) ac_abs_builddir="$ac_dir";;
86da66b5 13567*)
8ab705be
KC
13568 case "$ac_dir" in
13569 .) ac_abs_builddir=`pwd`;;
13570 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
13571 *) ac_abs_builddir=`pwd`/"$ac_dir";;
86da66b5
HPN
13572 esac;;
13573esac
8ab705be 13574case $ac_abs_builddir in
86da66b5
HPN
13575.) ac_abs_top_builddir=${ac_top_builddir}.;;
13576*)
13577 case ${ac_top_builddir}. in
8ab705be 13578 .) ac_abs_top_builddir=$ac_abs_builddir;;
86da66b5 13579 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8ab705be 13580 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
86da66b5
HPN
13581 esac;;
13582esac
8ab705be 13583case $ac_abs_builddir in
86da66b5
HPN
13584.) ac_abs_srcdir=$ac_srcdir;;
13585*)
13586 case $ac_srcdir in
8ab705be 13587 .) ac_abs_srcdir=$ac_abs_builddir;;
86da66b5 13588 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8ab705be 13589 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
86da66b5
HPN
13590 esac;;
13591esac
8ab705be 13592case $ac_abs_builddir in
86da66b5
HPN
13593.) ac_abs_top_srcdir=$ac_top_srcdir;;
13594*)
13595 case $ac_top_srcdir in
8ab705be 13596 .) ac_abs_top_srcdir=$ac_abs_builddir;;
86da66b5 13597 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8ab705be 13598 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
86da66b5
HPN
13599 esac;;
13600esac
ba479fd2
NN
13601
13602
13603 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
13604echo "$as_me: executing $ac_dest commands" >&6;}
13605 case $ac_dest in
13606 default )
f1faaabd
NN
13607case ${CONFIG_HEADERS} in
13608 *auto-host.h:config.in*)
13609 echo > cstamp-h ;;
861bb6c1 13610esac
2ed26f6b 13611# Make sure all the subdirs exist.
c406e779 13612for d in $subdirs
2ed26f6b 13613do
2ed26f6b 13614 test -d $d || mkdir $d
2ed26f6b 13615done
93cf819d
BK
13616# If the host supports symlinks, point stage[1234] at ../stage[1234] so
13617# bootstrapping and the installation procedure can still use
13618# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
13619# FLAGS_TO_PASS has been modified to solve the problem there.
13620# This is virtually a duplicate of what happens in configure.lang; we do
13621# an extra check to make sure this only happens if ln -s can be used.
75bffa71 13622if test "$symbolic_link" = "ln -s"; then
c406e779 13623 for d in ${subdirs} fixinc ; do
1e6347d8 13624 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 13625 cd $d
6a1b7268 13626 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
13627 do
13628 rm -f $t
13629 $symbolic_link ../$t $t 2>/dev/null
13630 done
13631 cd $STARTDIR
93cf819d
BK
13632 done
13633else true ; fi
ba479fd2
NN
13634 ;;
13635 esac
13636done
13637_ACEOF
cafe096b 13638
ba479fd2
NN
13639cat >>$CONFIG_STATUS <<\_ACEOF
13640
13641{ (exit 0); exit 0; }
13642_ACEOF
861bb6c1 13643chmod +x $CONFIG_STATUS
ba479fd2
NN
13644ac_clean_files=$ac_clean_files_save
13645
13646
13647# configure is writing to config.log, and then calls config.status.
13648# config.status does its own redirection, appending to config.log.
13649# Unfortunately, on DOS this fails, as config.log is still kept open
13650# by configure, so config.status won't be able to write to it; its
13651# output is simply discarded. So we exec the FD to /dev/null,
13652# effectively closing config.log, so it can be properly (re)opened and
13653# appended to by config.status. When coming back to configure, we
13654# need to make the FD available again.
13655if test "$no_create" != yes; then
13656 ac_cs_success=:
13657 ac_config_status_args=
13658 test "$silent" = yes &&
13659 ac_config_status_args="$ac_config_status_args --quiet"
13660 exec 5>/dev/null
13661 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13662 exec 5>>config.log
13663 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13664 # would make configure fail if this is the last instruction.
13665 $ac_cs_success || { (exit 1); exit 1; }
13666fi
861bb6c1 13667